diff -Nru libva-1.0.1/aclocal.m4 libva-1.0.1-3+0.31.1/aclocal.m4 --- libva-1.0.1/aclocal.m4 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/aclocal.m4 2010-04-06 06:03:59.000000000 +0000 @@ -1,7 +1,7 @@ -# generated automatically by aclocal 1.11.1 -*- Autoconf -*- +# generated automatically by aclocal 1.10.1 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. +# 2005, 2006, 2007, 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. @@ -13,194 +13,108 @@ m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],, -[m4_warning([this file was generated for autoconf 2.65. +m4_if(AC_AUTOCONF_VERSION, [2.61],, +[m4_warning([this file was generated for autoconf 2.61. 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'.])]) # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008 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 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 56 LT_INIT +# serial 52 Debian 1.5.26-1ubuntu1 AC_PROG_LIBTOOL -# 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])]) - +# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) +# ----------------------------------------------------------- +# If this macro is not defined by Autoconf, define it here. +m4_ifdef([AC_PROVIDE_IFELSE], + [], + [m4_define([AC_PROVIDE_IFELSE], + [m4_ifdef([AC_PROVIDE_$1], + [$2], [$3])])]) -# _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 -]) +# AC_PROG_LIBTOOL +# --------------- +AC_DEFUN([AC_PROG_LIBTOOL], +[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl +dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX +dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. + AC_PROVIDE_IFELSE([AC_PROG_CXX], + [AC_LIBTOOL_CXX], + [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX + ])]) +dnl And a similar setup for Fortran 77 support + AC_PROVIDE_IFELSE([AC_PROG_F77], + [AC_LIBTOOL_F77], + [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 +])]) + +dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. +dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run +dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. + AC_PROVIDE_IFELSE([AC_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [ifdef([AC_PROG_GCJ], + [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) + ifdef([A][M_PROG_GCJ], + [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) + ifdef([LT_AC_PROG_GCJ], + [define([LT_AC_PROG_GCJ], + defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) +])])# AC_PROG_LIBTOOL -# LT_INIT([OPTIONS]) -# ------------------ -AC_DEFUN([LT_INIT], -[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT -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 -dnl Parse OPTIONS -_LT_SET_OPTIONS([$0], [$1]) +# _AC_PROG_LIBTOOL +# ---------------- +AC_DEFUN([_AC_PROG_LIBTOOL], +[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl +AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl +AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl +AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl # This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" +LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" # 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 "X$cc_temp" | $Xsed -e 's%.*/%%' -e "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 +# Prevent multiple expansion +define([AC_PROG_LIBTOOL], []) +])# _AC_PROG_LIBTOOL -# _LT_SETUP -# --------- -m4_defun([_LT_SETUP], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl +# AC_LIBTOOL_SETUP +# ---------------- +AC_DEFUN([AC_LIBTOOL_SETUP], +[AC_PREREQ(2.50)dnl +AC_REQUIRE([AC_ENABLE_SHARED])dnl +AC_REQUIRE([AC_ENABLE_STATIC])dnl +AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])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_LD])dnl +AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl +AC_REQUIRE([AC_PROG_NM])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 +AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl +# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! +AC_REQUIRE([AC_OBJEXT])dnl +AC_REQUIRE([AC_EXEEXT])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_CMD_RELOAD])dnl -m4_require([_LT_CHECK_MAGIC_METHOD])dnl -m4_require([_LT_CMD_OLD_ARCHIVE])dnl -m4_require([_LT_CMD_GLOBAL_SYMBOLS])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 +AC_LIBTOOL_SYS_MAX_CMD_LEN +AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE +AC_LIBTOOL_OBJDIR -_LT_CHECK_OBJDIR - -m4_require([_LT_TAG_COMPILER])dnl -_LT_PROG_ECHO_BACKSLASH +AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl +_LT_AC_PROG_ECHO_BACKSLASH case $host_os in aix3*) @@ -216,653 +130,116 @@ # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. -sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' +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' +[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' +# Constants: +rm="rm -f" + # Global variables: -ofile=libtool +default_ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a - +ltmain="$ac_aux_dir/ltmain.sh" +ofile="$default_ofile" with_gnu_ld="$lt_cv_prog_gnu_ld" +AC_CHECK_TOOL(AR, ar, false) +AC_CHECK_TOOL(RANLIB, ranlib, :) +AC_CHECK_TOOL(STRIP, strip, :) + old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables +test -z "$AR" && AR=ar +test -z "$AR_FLAGS" && AR_FLAGS=cru +test -z "$AS" && AS=as test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$LD" && LD=ld +test -z "$LN_S" && LN_S="ln -s" +test -z "$MAGIC_CMD" && MAGIC_CMD=file +test -z "$NM" && NM=nm +test -z "$SED" && SED=sed +test -z "$OBJDUMP" && OBJDUMP=objdump +test -z "$RANLIB" && RANLIB=: +test -z "$STRIP" && STRIP=: test -z "$ac_objext" && ac_objext=o +# 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 + _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 + AC_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_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 - - - -# 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], [[!?.]$], [], [.]) -)]) - - - - - -# _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 "X$][$1" | $Xsed -e "$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 "X$" | $Xsed -e "$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_REQUIRED_DARWIN_CHECKS -# _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])])])]) +AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) +AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], +enable_win32_dll=yes, enable_win32_dll=no) + +AC_ARG_ENABLE([libtool-lock], + [AC_HELP_STRING([--disable-libtool-lock], + [avoid locking (might break parallel builds)])]) +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes +AC_ARG_WITH([pic], + [AC_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=default -# _LT_TAGVAR(VARNAME, [TAGNAME]) -# ------------------------------ -m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) +# Use C for the default configuration in the libtool script +tagname= +AC_LIBTOOL_LANG_C_CONFIG +_LT_AC_TAGCONFIG +])# AC_LIBTOOL_SETUP -# _LT_CONFIG_COMMANDS +# _LT_AC_SYS_COMPILER # ------------------- -# 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' - -# Quote evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_quote_varnames); do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$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 "X\\\\\$\$var"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Fix-up fallback echo if it was mangled by the above quoting rules. -case \$lt_ECHO in -*'\\\[$]0 --fallback-echo"')dnl " - lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\` - ;; -esac - -_LT_OUTPUT_LIBTOOL_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]) -cat >"$CONFIG_LT" <<_LTEOF -#! $SHELL -# Generated by $as_me. -# Run this file to recreate a libtool stub with the current configuration. - -lt_cl_silent=false -SHELL=\${CONFIG_SHELL-$SHELL} -_LTEOF - -cat >>"$CONFIG_LT" <<\_LTEOF -AS_SHELL_SANITIZE -_AS_PREPARE - -exec AS_MESSAGE_FD>&1 -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) 2008 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. -if test "$no_create" != yes; then - 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) -fi -])# 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 '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - _LT_PROG_XSI_SHELLFNS - - sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - 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)]) -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], []) - - -# _LT_TAG_COMPILER -# ---------------- -m4_defun([_LT_TAG_COMPILER], +AC_DEFUN([_LT_AC_SYS_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"} @@ -871,20 +248,36 @@ # Allow CC to be a program name with arguments. compiler=$CC -])# _LT_TAG_COMPILER +])# _LT_AC_SYS_COMPILER + + +# _LT_CC_BASENAME(CC) +# ------------------- +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +AC_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 "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +]) # _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_DEFUN([_LT_COMPILER_BOILERPLATE], +[AC_REQUIRE([LT_AC_PROG_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* +$rm conftest* ])# _LT_COMPILER_BOILERPLATE @@ -892,57 +285,39 @@ # ---------------------- # 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_DEFUN([_LT_LINKER_BOILERPLATE], +[AC_REQUIRE([LT_AC_PROG_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* +$rm -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS -# ------------------------- -m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ +# -------------------------- +# Check for some things on darwin +AC_DEFUN([_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.* + # 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. + echo "int foo(void){return 1;}" > conftest.c + $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ + -dynamiclib ${wl}-single_module conftest.c + if test -f libconftest.dylib; then + lt_cv_apple_cc_single_mod=yes + rm -rf libconftest.dylib* + fi + rm conftest.c fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], @@ -951,26 +326,26 @@ 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" + [lt_cv_ld_exported_symbols_list=yes], + [lt_cv_ld_exported_symbols_list=no]) + LDFLAGS="$save_LDFLAGS" ]) case $host_os in - rhapsody* | darwin1.[[012]]) + rhapsody* | darwin1.[[0123]]) _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 + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + darwin*) # 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' ;; + 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 @@ -980,10 +355,10 @@ 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}' + _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}" fi if test "$DSYMUTIL" != ":"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' + _lt_dsymutil="~$DSYMUTIL \$lib || :" else _lt_dsymutil= fi @@ -991,51 +366,16 @@ 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 - _LT_TAGVAR(whole_archive_flag_spec, $1)='' - _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=echo - _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 -# ----------------------- +# _LT_AC_SYS_LIBPATH_AIX +# ---------------------- # 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. -m4_defun([_LT_SYS_MODULE_PATH_AIX], -[m4_require([_LT_DECL_SED])dnl +AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], +[AC_REQUIRE([LT_AC_PROG_SED])dnl AC_LINK_IFELSE(AC_LANG_PROGRAM,[ lt_aix_libpath_sed=' /Import File Strings/,/^$/ { @@ -1050,45 +390,45 @@ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -])# _LT_SYS_MODULE_PATH_AIX +])# _LT_AC_SYS_LIBPATH_AIX -# _LT_SHELL_INIT(ARG) -# ------------------- -m4_define([_LT_SHELL_INIT], +# _LT_AC_SHELL_INIT(ARG) +# ---------------------- +AC_DEFUN([_LT_AC_SHELL_INIT], [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], [AC_DIVERT_PUSH(NOTICE)]) $1 AC_DIVERT_POP -])# _LT_SHELL_INIT +])# _LT_AC_SHELL_INIT -# _LT_PROG_ECHO_BACKSLASH -# ----------------------- +# _LT_AC_PROG_ECHO_BACKSLASH +# -------------------------- # Add some code to the start of the generated configure script which # will find an echo command which doesn't interpret backslashes. -m4_defun([_LT_PROG_ECHO_BACKSLASH], -[_LT_SHELL_INIT([ +AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], +[_LT_AC_SHELL_INIT([ # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} -case X$lt_ECHO in +case X$ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). - ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` + ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` ;; esac -ECHO=${lt_ECHO-echo} +echo=${ECHO-echo} if test "X[$]1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X[$]1" = X--fallback-echo; then # Avoid inline document here, it may be left over : -elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then - # Yippee, $ECHO works! +elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then + # Yippee, $echo works! : else # Restart under the correct shell. @@ -1098,9 +438,9 @@ if test "X[$]1" = X--fallback-echo; then # used as fallback echo shift - cat <<_LT_EOF + cat </dev/null 2>&1 && unset CDPATH -if test -z "$lt_ECHO"; then - if test "X${echo_test_string+set}" != Xset; then - # find a string as large as possible, as long as the shell can cope with it - for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do - # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if { echo_test_string=`eval $cmd`; } 2>/dev/null && - { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null - then - break - fi - done - fi +if test -z "$ECHO"; then +if test "X${echo_test_string+set}" != Xset; then +# find a string as large as possible, as long as the shell can cope with it + for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do + # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... + if (echo_test_string=`eval $cmd`) 2>/dev/null && + echo_test_string=`eval $cmd` && + (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null + then + break + fi + done +fi - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - : - else - # The Solaris, AIX, and Digital Unix default echo programs unquote - # backslashes. This makes it impossible to quote backslashes using - # echo "$something" | sed 's/\\/\\\\/g' - # - # So, first we look for a working echo in the user's PATH. +if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + : +else + # The Solaris, AIX, and Digital Unix default echo programs unquote + # backslashes. This makes it impossible to quote backslashes using + # echo "$something" | sed 's/\\/\\\\/g' + # + # So, first we look for a working echo in the user's PATH. - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for dir in $PATH /usr/ucb; do - IFS="$lt_save_ifs" - if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && - test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$dir/echo" - break - fi - done + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" + if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && + test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + echo="$dir/echo" + break + fi + done + IFS="$lt_save_ifs" - if test "X$ECHO" = Xecho; then - # We didn't find a better echo, so look for alternatives. - if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # This shell has a builtin print -r that does the trick. - ECHO='print -r' - elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && - test "X$CONFIG_SHELL" != X/bin/ksh; then - # If we have ksh, try running configure again with it. - ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} - export ORIGINAL_CONFIG_SHELL - CONFIG_SHELL=/bin/ksh - export CONFIG_SHELL - exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} - else - # Try using printf. - ECHO='printf %s\n' - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && + if test "X$echo" = Xecho; then + # We didn't find a better echo, so look for alternatives. + if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # This shell has a builtin print -r that does the trick. + echo='print -r' + elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && + test "X$CONFIG_SHELL" != X/bin/ksh; then + # If we have ksh, try running configure again with it. + ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} + export ORIGINAL_CONFIG_SHELL + CONFIG_SHELL=/bin/ksh + export CONFIG_SHELL + exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} + else + # Try using printf. + echo='printf %s\n' + if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # Cool, printf works + : + elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then - # Cool, printf works - : - elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL - export CONFIG_SHELL - SHELL="$CONFIG_SHELL" - export SHELL - ECHO="$CONFIG_SHELL [$]0 --fallback-echo" - elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$CONFIG_SHELL [$]0 --fallback-echo" - else - # maybe with a smaller string... - prev=: - - for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do - if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null - then - break - fi - prev="$cmd" - done + CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL + export CONFIG_SHELL + SHELL="$CONFIG_SHELL" + export SHELL + echo="$CONFIG_SHELL [$]0 --fallback-echo" + elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + echo="$CONFIG_SHELL [$]0 --fallback-echo" + else + # maybe with a smaller string... + prev=: - if test "$prev" != 'sed 50q "[$]0"'; then - echo_test_string=`eval $prev` - export echo_test_string - exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} - else - # Oops. We lost completely, so just stick with echo. - ECHO=echo + for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do + if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null + then + break fi - fi + prev="$cmd" + done + + if test "$prev" != 'sed 50q "[$]0"'; then + echo_test_string=`eval $prev` + export echo_test_string + exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} + else + # Oops. We lost completely, so just stick with echo. + echo=echo + fi fi fi fi fi +fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. -lt_ECHO=$ECHO -if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then - lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" +ECHO=$echo +if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then + ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" fi -AC_SUBST(lt_ECHO) -]) -_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) -_LT_DECL([], [ECHO], [1], - [An echo program that does not interpret backslashes]) -])# _LT_PROG_ECHO_BACKSLASH +AC_SUBST(ECHO) +])])# _LT_AC_PROG_ECHO_BACKSLASH -# _LT_ENABLE_LOCK -# --------------- -m4_defun([_LT_ENABLE_LOCK], +# _LT_AC_LOCK +# ----------- +AC_DEFUN([_LT_AC_LOCK], [AC_ARG_ENABLE([libtool-lock], - [AS_HELP_STRING([--disable-libtool-lock], - [avoid locking (might break parallel builds)])]) + [AC_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 @@ -1239,12 +576,12 @@ 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" - ;; + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; esac fi rm -rf conftest* @@ -1253,79 +590,79 @@ # Find out which ABI we are using. echo '[#]line __oline__ "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 + 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*) +s390*-*linux*|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 - ;; + *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*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; esac fi rm -rf conftest* @@ -1337,7 +674,7 @@ 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_TRY_LINK([],[],[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 @@ -1353,7 +690,7 @@ 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 + if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; @@ -1363,63 +700,30 @@ fi rm -rf conftest* ;; + +AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], +[*-*-cygwin* | *-*-mingw* | *-*-pw32*) + AC_CHECK_TOOL(DLLTOOL, dlltool, false) + AC_CHECK_TOOL(AS, as, false) + AC_CHECK_TOOL(OBJDUMP, objdump, false) + ;; + ]) esac need_locks="$enable_libtool_lock" -])# _LT_ENABLE_LOCK - -# _LT_CMD_OLD_ARCHIVE -# ------------------- -m4_defun([_LT_CMD_OLD_ARCHIVE], -[AC_CHECK_TOOL(AR, ar, false) -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru -_LT_DECL([], [AR], [1], [The archiver]) -_LT_DECL([], [AR_FLAGS], [1]) - -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 -_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_CMD_OLD_ARCHIVE +])# _LT_AC_LOCK -# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# AC_LIBTOOL_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_DEFUN([AC_LIBTOOL_COMPILER_OPTION], +[AC_REQUIRE([LT_AC_PROG_SED]) AC_CACHE_CHECK([$1], [$2], [$2=no - m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) + ifelse([$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 @@ -1439,35 +743,29 @@ 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 "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/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* + $rm conftest* ]) if test x"[$]$2" = xyes; then - m4_if([$5], , :, [$5]) + ifelse([$5], , :, [$5]) else - m4_if([$6], , :, [$6]) + ifelse([$6], , :, [$6]) fi -])# _LT_COMPILER_OPTION +])# AC_LIBTOOL_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_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [ACTION-SUCCESS], [ACTION-FAILURE]) +# ------------------------------------------------------------ +# Check whether the given compiler option works +AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], +[AC_REQUIRE([LT_AC_PROG_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" @@ -1479,7 +777,7 @@ if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD - $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes @@ -1488,28 +786,22 @@ $2=yes fi fi - $RM -r conftest* + $rm -r conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then - m4_if([$4], , :, [$4]) + ifelse([$4], , :, [$4]) else - m4_if([$5], , :, [$5]) + ifelse([$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], []) +])# 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_LIBTOOL_SYS_MAX_CMD_LEN +# -------------------------- +AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], +[# 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 @@ -1531,7 +823,7 @@ lt_cv_sys_max_cmd_len=-1; ;; - cygwin* | mingw* | cegcc*) + cygwin* | mingw*) # 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, @@ -1586,7 +878,7 @@ sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi @@ -1597,28 +889,20 @@ 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"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ - = "XX$teststring$teststring"; } >/dev/null 2>&1 && + while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ + = "XX$teststring") >/dev/null 2>&1 && + new_result=`expr "X$teststring" : ".*" 2>&1` && + lt_cv_sys_max_cmd_len=$new_result && 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. + # 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 ;; @@ -1629,35 +913,27 @@ 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], []) +])# 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_AC_CHECK_DLFCN +# ------------------ +AC_DEFUN([_LT_AC_CHECK_DLFCN], +[AC_CHECK_HEADERS(dlfcn.h)dnl +])# _LT_AC_CHECK_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 +# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, +# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) +# --------------------------------------------------------------------- +AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], +[AC_REQUIRE([_LT_AC_CHECK_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 + cat > conftest.$ac_ext </dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? @@ -1731,13 +1011,13 @@ fi fi rm -fr conftest* -])# _LT_TRY_DLOPEN_SELF +])# _LT_AC_TRY_DLOPEN_SELF -# LT_SYS_DLOPEN_SELF -# ------------------ -AC_DEFUN([LT_SYS_DLOPEN_SELF], -[m4_require([_LT_HEADER_DLFCN])dnl +# AC_LIBTOOL_DLOPEN_SELF +# ---------------------- +AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], +[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown @@ -1753,15 +1033,15 @@ lt_cv_dlopen_self=yes ;; - mingw* | pw32* | cegcc*) + mingw* | pw32*) 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 @@ -1771,7 +1051,7 @@ lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) - ;; + ;; *) AC_CHECK_FUNC([shl_load], @@ -1813,7 +1093,7 @@ AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl - _LT_TRY_DLOPEN_SELF( + _LT_AC_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) @@ -1821,8 +1101,8 @@ 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, [dnl + _LT_AC_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) ]) @@ -1844,32 +1124,19 @@ *) 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], []) +])# 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_LIBTOOL_PROG_CC_C_O([TAGNAME]) +# --------------------------------- +# Check to see if options -c and -o are simultaneously supported by compiler +AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], +[AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_REQUIRE([_LT_AC_SYS_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 + [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], + [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no + $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out @@ -1893,41 +1160,37 @@ then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/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 + _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD - $RM conftest* + $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 + test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files + $rm out/* && rmdir out cd .. - $RM -r conftest - $RM conftest* + rmdir 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 +])# AC_LIBTOOL_PROG_CC_C_O -# _LT_COMPILER_FILE_LOCKS([TAGNAME]) -# ---------------------------------- +# AC_LIBTOOL_SYS_HARD_LINK_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]) +AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], +[AC_REQUIRE([_LT_AC_LOCK])dnl hard_links="nottested" -if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then +if test "$_LT_AC_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* + $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 @@ -1940,13 +1203,12 @@ else need_locks=no fi -_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) -])# _LT_COMPILER_FILE_LOCKS +])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS -# _LT_CHECK_OBJDIR -# ---------------- -m4_defun([_LT_CHECK_OBJDIR], +# AC_LIBTOOL_OBJDIR +# ----------------- +AC_DEFUN([AC_LIBTOOL_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null @@ -1958,46 +1220,40 @@ 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 +])# AC_LIBTOOL_OBJDIR -# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) -# -------------------------------------- +# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) +# ---------------------------------------------- # Check hardcoding attributes. -m4_defun([_LT_LINKER_HARDCODE_LIBPATH], +AC_DEFUN([AC_LIBTOOL_PROG_LD_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 +_LT_AC_TAGVAR(hardcode_action, $1)= +if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ + test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ + test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then - # We can hardcode non-existent directories. - if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && + # We can hardcode non-existant directories. + if test "$_LT_AC_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 + ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && + test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. - _LT_TAGVAR(hardcode_action, $1)=relink + _LT_AC_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. - _LT_TAGVAR(hardcode_action, $1)=immediate + _LT_AC_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 + _LT_AC_TAGVAR(hardcode_action, $1)=unsupported fi -AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) +AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) -if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || - test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then +if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || @@ -2005,70 +1261,73 @@ # 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 +])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH -# _LT_CMD_STRIPLIB -# ---------------- -m4_defun([_LT_CMD_STRIPLIB], -[m4_require([_LT_DECL_EGREP]) -striplib= +# AC_LIBTOOL_SYS_LIB_STRIP +# ------------------------ +AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], +[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 +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]) + 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 +])# AC_LIBTOOL_SYS_LIB_STRIP -# _LT_SYS_DYNAMIC_LINKER([TAG]) +# AC_LIBTOOL_SYS_DYNAMIC_LINKER # ----------------------------- # 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 +AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], +[AC_REQUIRE([LT_AC_PROG_SED])dnl AC_MSG_CHECKING([dynamic linker characteristics]) -m4_if([$1], - [], [ +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" +m4_if($1,[],[ if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then + if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then # 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 -e 's/;/ /g'` + lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` else - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. @@ -2082,7 +1341,7 @@ 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 ' + lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; @@ -2102,23 +1361,10 @@ if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` - sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` + sys_lib_search_path_spec=`echo $lt_search_path_spec` 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 @@ -2155,7 +1401,7 @@ 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 + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no @@ -2181,18 +1427,9 @@ ;; 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=`$ECHO "X$lib" | $Xsed -e '\''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 + 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=`$echo "X$lib" | $Xsed -e '\''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' ;; beos*) @@ -2215,28 +1452,25 @@ # libtool to hard-code these into programs ;; -cygwin* | mingw* | pw32* | cegcc*) +cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) + yes,cygwin* | yes,mingw* | yes,pw32*) 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'\''`~ + 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' + chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ - $RM \$dlpath' + $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in @@ -2245,20 +1479,20 @@ soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; - mingw* | cegcc*) + mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + 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"` + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) @@ -2282,13 +1516,13 @@ version_type=darwin need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' + library_names_spec='${libname}${release}${versuffix}$shared_ext ${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"]) + 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' ;; @@ -2381,18 +1615,18 @@ 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 - ;; - *) + 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 @@ -2460,7 +1694,7 @@ ;; # This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) +linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no @@ -2469,17 +1703,6 @@ 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 - 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], - [shlibpath_overrides_runpath=yes])]) - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. @@ -2487,7 +1710,7 @@ # 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;/^$/d' | tr '\n' ' '` + 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;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi @@ -2516,7 +1739,7 @@ version_type=sunos need_lib_prefix=no need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + 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' @@ -2537,16 +1760,14 @@ shlibpath_overrides_runpath=yes ;; -*nto* | *qnx*) - version_type=qnx +nto-qnx*) + version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' + shlibpath_overrides_runpath=yes ;; openbsd*) @@ -2555,13 +1776,13 @@ 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 ;; + 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 + 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 @@ -2633,6 +1854,7 @@ sni) shlibpath_overrides_runpath=no need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) @@ -2663,12 +1885,13 @@ 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' + shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" @@ -2678,17 +1901,6 @@ 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}' @@ -2703,71 +1915,301 @@ AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no +AC_CACHE_VAL([lt_cv_sys_lib_search_path_spec], +[lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"]) +sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +AC_CACHE_VAL([lt_cv_sys_lib_dlsearch_path_spec], +[lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"]) +sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" + 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 +])# AC_LIBTOOL_SYS_DYNAMIC_LINKER -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([], [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_AC_TAGCONFIG +# ---------------- +AC_DEFUN([_LT_AC_TAGCONFIG], +[AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_ARG_WITH([tags], + [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], + [include additional configurations @<:@automatic@:>@])], + [tagnames="$withval"]) + +if test -f "$ltmain" && test -n "$tagnames"; then + if test ! -f "${ofile}"; then + AC_MSG_WARN([output file `$ofile' does not exist]) + fi + + if test -z "$LTCC"; then + eval "`$SHELL ${ofile} --config | grep '^LTCC='`" + if test -z "$LTCC"; then + AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) + else + AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) + fi + fi + if test -z "$LTCFLAGS"; then + eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" + fi + # Extract list of available tagged configurations in $ofile. + # Note that this assumes the entire list is on one line. + available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` -# _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. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for tagname in $tagnames; do + IFS="$lt_save_ifs" + # Check whether tagname contains only valid characters + case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in + "") ;; + *) AC_MSG_ERROR([invalid tag name: $tagname]) + ;; + esac + + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null + then + AC_MSG_ERROR([tag name \"$tagname\" already exists]) + fi + + # Update the list of available tags. + if test -n "$tagname"; then + echo appending configuration tag \"$tagname\" to $ofile + + case $tagname in + CXX) + if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + AC_LIBTOOL_LANG_CXX_CONFIG + else + tagname="" + fi + ;; + + F77) + if test -n "$F77" && test "X$F77" != "Xno"; then + AC_LIBTOOL_LANG_F77_CONFIG + else + tagname="" + fi + ;; + + GCJ) + if test -n "$GCJ" && test "X$GCJ" != "Xno"; then + AC_LIBTOOL_LANG_GCJ_CONFIG + else + tagname="" + fi + ;; + + RC) + AC_LIBTOOL_LANG_RC_CONFIG + ;; + + *) + AC_MSG_ERROR([Unsupported tag name: $tagname]) + ;; + esac + + # Append the new tag name to the list of available tags. + if test -n "$tagname" ; then + available_tags="$available_tags $tagname" + fi + fi + done + IFS="$lt_save_ifs" + + # Now substitute the updated list of available tags. + if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then + mv "${ofile}T" "$ofile" + chmod +x "$ofile" + else + rm -f "${ofile}T" + AC_MSG_ERROR([unable to update list of available tagged configurations.]) + fi +fi +])# _LT_AC_TAGCONFIG + + +# AC_LIBTOOL_DLOPEN +# ----------------- +# enable checks for dlopen support +AC_DEFUN([AC_LIBTOOL_DLOPEN], + [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) +])# AC_LIBTOOL_DLOPEN + + +# AC_LIBTOOL_WIN32_DLL +# -------------------- +# declare package support for building win32 DLLs +AC_DEFUN([AC_LIBTOOL_WIN32_DLL], +[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) +])# AC_LIBTOOL_WIN32_DLL + + +# AC_ENABLE_SHARED([DEFAULT]) +# --------------------------- +# implement the --enable-shared flag +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +AC_DEFUN([AC_ENABLE_SHARED], +[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl +AC_ARG_ENABLE([shared], + [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], + [build shared libraries @<:@default=]AC_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=]AC_ENABLE_SHARED_DEFAULT) +])# AC_ENABLE_SHARED + + +# AC_DISABLE_SHARED +# ----------------- +# set the default shared flag to --disable-shared +AC_DEFUN([AC_DISABLE_SHARED], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +AC_ENABLE_SHARED(no) +])# AC_DISABLE_SHARED + + +# AC_ENABLE_STATIC([DEFAULT]) +# --------------------------- +# implement the --enable-static flag +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +AC_DEFUN([AC_ENABLE_STATIC], +[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl +AC_ARG_ENABLE([static], + [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], + [build static libraries @<:@default=]AC_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=]AC_ENABLE_STATIC_DEFAULT) +])# AC_ENABLE_STATIC + + +# AC_DISABLE_STATIC +# ----------------- +# set the default static flag to --disable-static +AC_DEFUN([AC_DISABLE_STATIC], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +AC_ENABLE_STATIC(no) +])# AC_DISABLE_STATIC + + +# AC_ENABLE_FAST_INSTALL([DEFAULT]) +# --------------------------------- +# implement the --enable-fast-install flag +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +AC_DEFUN([AC_ENABLE_FAST_INSTALL], +[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl +AC_ARG_ENABLE([fast-install], + [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], + [optimize for fast installation @<:@default=]AC_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=]AC_ENABLE_FAST_INSTALL_DEFAULT) +])# AC_ENABLE_FAST_INSTALL + + +# AC_DISABLE_FAST_INSTALL +# ----------------------- +# set the default to --disable-fast-install +AC_DEFUN([AC_DISABLE_FAST_INSTALL], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +AC_ENABLE_FAST_INSTALL(no) +])# AC_DISABLE_FAST_INSTALL + + +# AC_LIBTOOL_PICMODE([MODE]) +# -------------------------- +# implement the --with-pic flag +# MODE is either `yes' or `no'. If omitted, it defaults to `both'. +AC_DEFUN([AC_LIBTOOL_PICMODE], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +pic_mode=ifelse($#,1,$1,default) +])# AC_LIBTOOL_PICMODE + + +# AC_PROG_EGREP +# ------------- +# This is predefined starting with Autoconf 2.54, so this conditional +# definition can be removed once we require Autoconf 2.54 or later. +m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], +[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], + [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 + then ac_cv_prog_egrep='grep -E' + else ac_cv_prog_egrep='egrep' + fi]) + EGREP=$ac_cv_prog_egrep + AC_SUBST([EGREP]) +])]) + + +# AC_PATH_TOOL_PREFIX +# ------------------- +# find a file program which can recognize shared library +AC_DEFUN([AC_PATH_TOOL_PREFIX], +[AC_REQUIRE([AC_PROG_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])" + ac_dummy="ifelse([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. @@ -2782,7 +2224,7 @@ $EGREP "$file_magic_regex" > /dev/null; then : else - cat <<_LT_EOF 1>&2 + cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. @@ -2793,7 +2235,7 @@ *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org -_LT_EOF +EOF fi ;; esac fi @@ -2810,47 +2252,37 @@ 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 +])# AC_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 -# -------------- +# AC_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) +AC_DEFUN([AC_PATH_MAGIC], +[AC_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) + AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi -])# _LT_PATH_MAGIC +])# AC_PATH_MAGIC -# LT_PATH_LD +# AC_PROG_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 - -AC_ARG_WITH([gnu-ld], - [AS_HELP_STRING([--with-gnu-ld], +AC_DEFUN([AC_PROG_LD], +[AC_ARG_WITH([gnu-ld], + [AC_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 - + [with_gnu_ld=no]) +AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. @@ -2867,9 +2299,9 @@ [[\\/]]* | ?:[[\\/]]*) 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%/%"` + 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" ;; @@ -2919,24 +2351,15 @@ AC_MSG_RESULT(no) fi test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) -_LT_PATH_LD_GNU -AC_SUBST([LD]) +AC_PROG_LD_GNU +])# AC_PROG_LD -_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) -])# LT_PATH_LD -# Old names: -AU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) -AU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_PROG_LD], []) -dnl AC_DEFUN([AC_PROG_LD], []) - - -# _LT_PATH_LD_GNU -#- -------------- -m4_defun([_LT_PATH_LD_GNU], -[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, +# AC_PROG_LD_GNU +# -------------- +AC_DEFUN([AC_PROG_LD_GNU], +[AC_REQUIRE([AC_PROG_EGREP])dnl +AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, [# I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 /dev/null; then + 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. @@ -3099,12 +2512,12 @@ ;; # This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) +linux* | k*bsd*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + 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)$' @@ -3117,12 +2530,12 @@ lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; -*nto* | *qnx*) - lt_cv_deplibs_check_method=pass_all +nto-qnx*) + lt_cv_deplibs_check_method=unknown ;; openbsd*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + 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)$' @@ -3141,10 +2554,6 @@ 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) @@ -3172,7 +2581,7 @@ esac ;; -tpf*) +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; esac @@ -3180,20 +2589,14 @@ 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_CHECK_MAGIC_METHOD +])# AC_DEPLIBS_CHECK_METHOD -# LT_PATH_NM +# AC_PROG_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, +# find the pathname to a BSD-compatible name lister +AC_DEFUN([AC_PROG_NM], +[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" @@ -3235,51 +2638,16 @@ done IFS="$lt_save_ifs" done - : ${lt_cv_path_NM=no} + test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm 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. - AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :) - 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:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:__oline__: $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:__oline__: 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], []) +NM="$lt_cv_path_NM" +])# AC_PROG_NM -# LT_LIB_M -# -------- +# AC_CHECK_LIBM +# ------------- # check for math library -AC_DEFUN([LT_LIB_M], +AC_DEFUN([AC_CHECK_LIBM], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in @@ -3294,4696 +2662,4014 @@ AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac -AC_SUBST([LIBM]) -])# LT_LIB_M +])# AC_CHECK_LIBM -# Old name: -AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_CHECK_LIBM], []) +# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) +# ----------------------------------- +# 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. If DIRECTORY is not provided, +# it is assumed to be `libltdl'. LIBLTDL will be prefixed 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_builddir and top_srcdir appropriately in +# the Makefiles. +AC_DEFUN([AC_LIBLTDL_CONVENIENCE], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl + 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='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la + LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) + # For backwards non-gettext consistent compatibility... + INCLTDL="$LTDLINCL" +])# AC_LIBLTDL_CONVENIENCE -# _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)= +# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) +# ----------------------------------- +# 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 here. If DIRECTORY is not provided, +# and an installed libltdl is not found, it is assumed to be `libltdl'. +# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with +# '${top_srcdir}/' (note the single quotes!). If your package is not +# flat and you're not using automake, define top_builddir and top_srcdir +# appropriately in the Makefiles. +# In the future, this macro may have to be called after AC_PROG_LIBTOOL. +AC_DEFUN([AC_LIBLTDL_INSTALLABLE], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl + AC_CHECK_LIB(ltdl, lt_dlinit, + [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], + [if test x"$enable_ltdl_install" = xno; then + AC_MSG_WARN([libltdl not installed, but installation disabled]) + else + enable_ltdl_install=yes + fi + ]) + if test x"$enable_ltdl_install" = x"yes"; then + ac_configure_args="$ac_configure_args --enable-ltdl-install" + LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la + LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) + else + ac_configure_args="$ac_configure_args --enable-ltdl-install=no" + LIBLTDL="-lltdl" + LTDLINCL= + fi + # For backwards non-gettext consistent compatibility... + INCLTDL="$LTDLINCL" +])# AC_LIBLTDL_INSTALLABLE -if test "$GCC" = yes; then - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' - _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 +# AC_LIBTOOL_CXX +# -------------- +# enable support for C++ libraries +AC_DEFUN([AC_LIBTOOL_CXX], +[AC_REQUIRE([_LT_AC_LANG_CXX]) +])# AC_LIBTOOL_CXX -# _LT_CMD_GLOBAL_SYMBOLS -# ---------------------- -m4_defun([_LT_CMD_GLOBAL_SYMBOLS], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_PROG_CC])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 +# _LT_AC_LANG_CXX +# --------------- +AC_DEFUN([_LT_AC_LANG_CXX], +[AC_REQUIRE([AC_PROG_CXX]) +AC_REQUIRE([_LT_AC_PROG_CXXCPP]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) +])# _LT_AC_LANG_CXX -# 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], +# _LT_AC_PROG_CXXCPP +# ------------------ +AC_DEFUN([_LT_AC_PROG_CXXCPP], [ -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] +AC_REQUIRE([AC_PROG_CXX]) +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 +fi +])# _LT_AC_PROG_CXXCPP -# Character class describing NM global symbol codes. -symcode='[[BCDEGRST]]' +# AC_LIBTOOL_F77 +# -------------- +# enable support for Fortran 77 libraries +AC_DEFUN([AC_LIBTOOL_F77], +[AC_REQUIRE([_LT_AC_LANG_F77]) +])# AC_LIBTOOL_F77 -# 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 +# _LT_AC_LANG_F77 +# --------------- +AC_DEFUN([_LT_AC_LANG_F77], +[AC_REQUIRE([AC_PROG_F77]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) +])# _LT_AC_LANG_F77 -# 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'" +# AC_LIBTOOL_GCJ +# -------------- +# enable support for GCJ libraries +AC_DEFUN([AC_LIBTOOL_GCJ], +[AC_REQUIRE([_LT_AC_LANG_GCJ]) +])# AC_LIBTOOL_GCJ -# 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 +# _LT_AC_LANG_GCJ +# --------------- +AC_DEFUN([_LT_AC_LANG_GCJ], +[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], + [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], + [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], + [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], + [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) +])# _LT_AC_LANG_GCJ -# 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" +# AC_LIBTOOL_RC +# ------------- +# enable support for Windows resource files +AC_DEFUN([AC_LIBTOOL_RC], +[AC_REQUIRE([LT_AC_PROG_RC]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) +])# AC_LIBTOOL_RC - # 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'" + +# AC_LIBTOOL_LANG_C_CONFIG +# ------------------------ +# Ensure that the configuration vars for the C compiler are +# suitably defined. Those variables are subsequently used by +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. +AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) +AC_DEFUN([_LT_AC_LANG_C_CONFIG], +[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_AC_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_AC_SYS_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) +AC_LIBTOOL_PROG_COMPILER_PIC($1) +AC_LIBTOOL_PROG_CC_C_O($1) +AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) +AC_LIBTOOL_PROG_LD_SHLIBS($1) +AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) +AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) +AC_LIBTOOL_SYS_LIB_STRIP +AC_LIBTOOL_DLOPEN_SELF + +# 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 + ;; - # Check to see that the pipe works correctly. - pipe_works=no +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]) - 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 +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]) - 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 +AC_LIBTOOL_CONFIG($1) - # 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 -#ifdef __cplusplus -extern "C" { -#endif +AC_LANG_POP +CC="$lt_save_CC" +])# AC_LIBTOOL_LANG_C_CONFIG -_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 +# AC_LIBTOOL_LANG_CXX_CONFIG +# -------------------------- +# Ensure that the configuration vars for the C compiler are +# suitably defined. Those variables are subsequently used by +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. +AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) +AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], +[AC_LANG_PUSH(C++) +AC_REQUIRE([AC_PROG_CXX]) +AC_REQUIRE([_LT_AC_PROG_CXXCPP]) + +_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_AC_TAGVAR(allow_undefined_flag, $1)= +_LT_AC_TAGVAR(always_export_symbols, $1)=no +_LT_AC_TAGVAR(archive_expsym_cmds, $1)= +_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_AC_TAGVAR(hardcode_direct, $1)=no +_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= +_LT_AC_TAGVAR(hardcode_minus_L, $1)=no +_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported +_LT_AC_TAGVAR(hardcode_automatic, $1)=no +_LT_AC_TAGVAR(module_cmds, $1)= +_LT_AC_TAGVAR(module_expsym_cmds, $1)= +_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown +_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_AC_TAGVAR(no_undefined_flag, $1)= +_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= +_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no -/* The mapping between symbol names and symbols. */ -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} -}; +# Dependencies to place before and after the object being linked: +_LT_AC_TAGVAR(predep_objects, $1)= +_LT_AC_TAGVAR(postdep_objects, $1)= +_LT_AC_TAGVAR(predeps, $1)= +_LT_AC_TAGVAR(postdeps, $1)= +_LT_AC_TAGVAR(compiler_lib_search_path, $1)= +_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)= -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt__PROGRAM__LTX_preloaded_symbols; -} -#endif +# Source file extension for C++ test sources. +ac_ext=cpp -#ifdef __cplusplus -} -#endif -_LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_save_LIBS="$LIBS" - lt_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_save_LIBS" - CFLAGS="$lt_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 +# Object file extension for compiled C++ test sources. +objext=o +_LT_AC_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(int, char *[[]]) { return(0); }' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_AC_SYS_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_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++"} +compiler=$CC +_LT_AC_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) + +# We don't want -fno-exception wen compiling C++ code, so set the +# no_builtin_flag separately +if test "$GXX" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' +else + _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= +fi + +if test "$GXX" = yes; then + # Set up default GNU C++ configuration + + AC_PROG_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_AC_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_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi else - echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* + with_gnu_ld=no + wlarc= - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - lt_cv_sys_global_symbol_pipe= + # 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_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 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) + + # 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 "\-L"' + else - AC_MSG_RESULT(ok) + GXX=no + with_gnu_ld=no + wlarc= 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_CMD_GLOBAL_SYMBOLS +# PORTME: fill in a description of your system's C++ link characteristics +AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) +_LT_AC_TAGVAR(ld_shlibs, $1)=yes +case $host_os in + aix3*) + # FIXME: insert proper C++ library support + _LT_AC_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 -# _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)= + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi -AC_MSG_CHECKING([for $compiler option to produce PIC]) -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' + # 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_AC_TAGVAR(archive_cmds, $1)='' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - case $host_os in - aix*) - # All AIX code is PIC. + 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_AC_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_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_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 - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + # 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 + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + _LT_AC_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_AC_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an empty executable. + _LT_AC_SYS_LIBPATH_AIX + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + + _LT_AC_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 echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_AC_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_AC_SYS_LIBPATH_AIX + _LT_AC_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_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared libraries. + _LT_AC_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_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_TAGVAR(always_export_symbols, $1)=no + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + _LT_AC_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_AC_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_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + darwin* | rhapsody*) + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_automatic, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + _LT_AC_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" + if test "$GXX" = yes ; then + output_verbose_link_cmd='echo' + _LT_AC_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_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + _LT_AC_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_AC_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}" + if test "$lt_cv_apple_cc_single_mod" != "yes"; then + _LT_AC_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_AC_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 + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' + _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + fi + ;; + + dgux*) + case $cc_basename in + ec++*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + ghcx*) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + freebsd[[12]]*) + # C++ shared libraries reported to be fairly broken before switch to ELF + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + freebsd-elf*) + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + ;; + freebsd* | dragonfly*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + _LT_AC_TAGVAR(ld_shlibs, $1)=yes + ;; + gnu*) + ;; + hpux9*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + _LT_AC_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) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${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_AC_TAGVAR(ld_shlibs, $1)=no fi ;; + esac + ;; + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - 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' + hppa*64*|ia64*) ;; + *) + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac + fi + case $host_cpu in + hppa*64*|ia64*) + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; - - 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)= - ;; - 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' + *) + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. ;; 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 + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; - 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" + aCC*) + case $host_cpu in + hppa*64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_AC_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; echo $list' ;; - 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' + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then case $host_cpu in - hppa*64*|ia64*) - # +Z the default + hppa*64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac - ;; - *) - ;; - esac + fi + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi ;; - interix*) - # This is c89, which is MS Visual C++ (no shared libs) - # Anyone wants to do a port? + esac + ;; + interix[[3-9]]*) + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_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_AC_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_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -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_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; - 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. - ;; - *) - ;; + *) + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' + fi + fi + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + ;; + esac + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + linux* | k*bsd*-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_AC_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_AC_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; echo $list' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' + _LT_AC_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_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc*) + # 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_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_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_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + _LT_AC_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' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + ;; + cxx*) + # Compaq C++ + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + _LT_AC_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=`echo $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; echo $list' ;; - 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*) - # IBM XL 8.0 on PPC - _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 - ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_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; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + + # Not sure whether something based on + # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 + # would be better. + output_verbose_link_cmd='echo' + + # 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_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; esac ;; - lynxos*) + esac + ;; + lynxos*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + m88k*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + mvs*) + case $cc_basename in + cxx*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; - m88k*) + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; - mvs*) - case $cc_basename in - cxx*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' - ;; - *) - ;; - esac + esac + ;; + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_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::"' + ;; + openbsd2*) + # C++ shared libraries are fairly broken + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + openbsd*) + if test -f /usr/libexec/ld.so; then + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + _LT_AC_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_AC_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_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd='echo' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + osf3*) + 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_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' + + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + cxx*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_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=`echo $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; echo $list' ;; - netbsd* | netbsdelf*-gnu) + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_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" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_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 "\-L"' + + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi ;; - *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 + esac + ;; + 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_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + cxx*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + _LT_AC_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=`echo $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; echo $list' ;; - psos*) + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_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 "\-L"' + + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi ;; - solaris*) - case $cc_basename in - CC*) - # 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 + ;; + psos*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + lcc*) + # Lucid + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes + _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_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_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + + output_verbose_link_cmd='echo' + + # 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_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_AC_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_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; - 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' - ;; + *) + # GNU C++ compiler with Solaris linker + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' + if $CC --version | grep -v '^2\.7' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared -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 \"\-L\"" + else + # g++ 2.7 appears to require `-G' NOT `-shared' on this + # platform. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_AC_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 \"\-L\"" + fi + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; - esac + esac + fi ;; - 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 + esac + ;; + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - *) - ;; - esac + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; - vxworks*) + 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. + # 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. + # So that behaviour is only enabled if SCOABSPATH is set to a + # non-empty value in the environment. Most likely only useful for + # creating official distributions of packages. + # This is a hack until libtool officially supports absolute path + # names for shared libraries. + _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; 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' - ;; - - 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 + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; - 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 - 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' - ;; + ;; + vxworks*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; +esac +AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) +test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - 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' - ;; +_LT_AC_TAGVAR(GCC, $1)="$GXX" +_LT_AC_TAGVAR(LD, $1)="$LD" - 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' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # 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*) - # IBM XL C 8.0/Fortran 10.1 on PPC - _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)='-Wl,' - ;; - *Sun\ F*) - # 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)='' - ;; - esac - ;; - esac - ;; +AC_LIBTOOL_POSTDEP_PREDEP($1) +AC_LIBTOOL_PROG_COMPILER_PIC($1) +AC_LIBTOOL_PROG_CC_C_O($1) +AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) +AC_LIBTOOL_PROG_LD_SHLIBS($1) +AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) +AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) - newsos6) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; +AC_LIBTOOL_CONFIG($1) - *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' - ;; +AC_LANG_POP +CC=$lt_save_CC +LDCXX=$LD +LD=$lt_save_LD +GCC=$lt_save_GCC +with_gnu_ldcxx=$with_gnu_ld +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 +])# AC_LIBTOOL_LANG_CXX_CONFIG - 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' - ;; +# AC_LIBTOOL_POSTDEP_PREDEP([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. +AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP], +[AC_REQUIRE([LT_AC_PROG_SED])dnl +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... +ifelse([$1],[],[cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < $export_symbols' - 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 - 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")) && ([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*) - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' - ;; - linux* | k*bsd*-gnu) - _LT_TAGVAR(link_all_deplibs, $1)=no - ;; - *) - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' +# PORTME: override above test on systems where it is broken +ifelse([$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_AC_TAGVAR(predep_objects,$1)= + _LT_AC_TAGVAR(postdep_objects,$1)= + _LT_AC_TAGVAR(postdeps,$1)= ;; - esac - _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] -], [ - 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 +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_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - linux* | k*bsd*-gnu) - _LT_TAGVAR(link_all_deplibs, $1)=no - ;; esac + ;; - _LT_TAGVAR(ld_shlibs, $1)=yes - if test "$with_gnu_ld" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' +solaris*) + case $cc_basename in + CC*) + # 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 - # 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)= + # 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_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 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 + ;; + esac + ;; +esac +]) +case " $_LT_AC_TAGVAR(postdeps, $1) " in +*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; +esac +])# AC_LIBTOOL_POSTDEP_PREDEP - # 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 +# AC_LIBTOOL_LANG_F77_CONFIG +# -------------------------- +# Ensure that the configuration vars for the C compiler are +# suitably defined. Those variables are subsequently used by +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. +AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) +AC_DEFUN([_LT_AC_LANG_F77_CONFIG], +[AC_REQUIRE([AC_PROG_F77]) +AC_LANG_PUSH(Fortran 77) -*** Warning: the GNU linker, at least up to release 2.9.1, 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 modify your PATH -*** so that a non-GNU linker is found, and then restart. +_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_AC_TAGVAR(allow_undefined_flag, $1)= +_LT_AC_TAGVAR(always_export_symbols, $1)=no +_LT_AC_TAGVAR(archive_expsym_cmds, $1)= +_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_AC_TAGVAR(hardcode_direct, $1)=no +_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= +_LT_AC_TAGVAR(hardcode_minus_L, $1)=no +_LT_AC_TAGVAR(hardcode_automatic, $1)=no +_LT_AC_TAGVAR(module_cmds, $1)= +_LT_AC_TAGVAR(module_expsym_cmds, $1)= +_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown +_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_AC_TAGVAR(no_undefined_flag, $1)= +_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= +_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no -_LT_EOF - fi - ;; +# Source file extension for f77 test sources. +ac_ext=f - 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 - ;; +# Object file extension for compiled f77 test sources. +objext=o +_LT_AC_TAGVAR(objext, $1)=$objext - 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 - ;; +# Code to be used in simple compile tests +lt_simple_compile_test_code="\ + subroutine t + return + end +" - 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(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/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' +# Code to be used in simple link tests +lt_simple_link_test_code="\ + program t + end +" - 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 - ;; +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_AC_SYS_COMPILER - 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' - ;; +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE - 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= - 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; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95*) # 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; $ECHO \"$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]]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - 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; $ECHO \"$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' +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +CC=${F77-"f77"} +compiler=$CC +_LT_AC_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) - 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 +AC_MSG_CHECKING([if libtool supports shared libraries]) +AC_MSG_RESULT([$can_build_shared]) - case $cc_basename in - xlf*) - # 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 $compiler_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 $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; +AC_MSG_CHECKING([whether to build shared libraries]) +test "$can_build_shared" = "no" && enable_shared=no - netbsd* | netbsdelf*-gnu) - 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 $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' - fi - ;; +# 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]) - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 +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_AC_TAGVAR(GCC, $1)="$G77" +_LT_AC_TAGVAR(LD, $1)="$LD" + +AC_LIBTOOL_PROG_COMPILER_PIC($1) +AC_LIBTOOL_PROG_CC_C_O($1) +AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) +AC_LIBTOOL_PROG_LD_SHLIBS($1) +AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) +AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) -*** 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. +AC_LIBTOOL_CONFIG($1) -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _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 - ;; +AC_LANG_POP +CC="$lt_save_CC" +])# AC_LIBTOOL_LANG_F77_CONFIG - 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. +# AC_LIBTOOL_LANG_GCJ_CONFIG +# -------------------------- +# Ensure that the configuration vars for the C compiler are +# suitably defined. Those variables are subsequently used by +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. +AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) +AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], +[AC_LANG_SAVE -_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 - ;; +# Source file extension for Java test sources. +ac_ext=java - 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 - ;; +# Object file extension for compiled Java test sources. +objext=o +_LT_AC_TAGVAR(objext, $1)=$objext - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _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 - - 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 - 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")) && ([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 +# Code to be used in simple compile tests +lt_simple_compile_test_code="class foo {}" - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi +# Code to be used in simple link tests +lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' - # 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. +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_AC_SYS_COMPILER - _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,' +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE - 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 - _LT_TAGVAR(link_all_deplibs, $1)=no - 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 +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +CC=${GCJ-"gcj"} +compiler=$CC +_LT_AC_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) - _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 - _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 $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; 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 - _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' - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - _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 - ;; +# GCJ did not exist at the time GCC didn't implicitly link libc in. +_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - 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 - ;; +_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds - bsdi[[45]]*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic - ;; +AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) +AC_LIBTOOL_PROG_COMPILER_PIC($1) +AC_LIBTOOL_PROG_CC_C_O($1) +AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) +AC_LIBTOOL_PROG_LD_SHLIBS($1) +AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) +AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) - 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. - _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 `$ECHO "X$deplibs" | $Xsed -e '\''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(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - ;; +AC_LIBTOOL_CONFIG($1) - darwin* | rhapsody*) - _LT_DARWIN_LINKER_FEATURES($1) - ;; +AC_LANG_RESTORE +CC="$lt_save_CC" +])# AC_LIBTOOL_LANG_GCJ_CONFIG - 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 - ;; +# AC_LIBTOOL_LANG_RC_CONFIG +# ------------------------- +# Ensure that the configuration vars for the Windows resource compiler are +# suitably defined. Those variables are subsequently used by +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. +AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) +AC_DEFUN([_LT_AC_LANG_RC_CONFIG], +[AC_LANG_SAVE - # 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 - ;; +# Source file extension for RC test sources. +ac_ext=rc - # 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 - ;; +# Object file extension for compiled RC test sources. +objext=o +_LT_AC_TAGVAR(objext, $1)=$objext - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -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 - ;; +# Code to be used in simple compile tests +lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' - hpux9*) - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${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 +# Code to be used in simple link tests +lt_simple_link_test_code="$lt_simple_compile_test_code" - # 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' - ;; +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_AC_SYS_COMPILER - hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${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 - ;; +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE - hpux11*) - if test "$GCC" = yes -a "$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 -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${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' - ;; - *) - _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)=: +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +CC=${RC-"windres"} +compiler=$CC +_LT_AC_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) +_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - 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' +AC_LIBTOOL_CONFIG($1) - # 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 - ;; +AC_LANG_RESTORE +CC="$lt_save_CC" +])# AC_LIBTOOL_LANG_RC_CONFIG - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${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. - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - AC_LINK_IFELSE(int foo(void) {}, - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - ) - LDFLAGS="$save_LDFLAGS" - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -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" && $ECHO "X-set_version $verstring" | $Xsed` -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* | netbsdelf*-gnu) - 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 +# AC_LIBTOOL_CONFIG([TAGNAME]) +# ---------------------------- +# If TAGNAME is not passed, then 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 +# TAGNAME from the matching tagged config vars. +AC_DEFUN([AC_LIBTOOL_CONFIG], +[# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # 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 + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + _LT_AC_TAGVAR(compiler, $1) \ + _LT_AC_TAGVAR(CC, $1) \ + _LT_AC_TAGVAR(LD, $1) \ + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ + _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ + _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ + _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ + _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ + _LT_AC_TAGVAR(old_archive_cmds, $1) \ + _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ + _LT_AC_TAGVAR(predep_objects, $1) \ + _LT_AC_TAGVAR(postdep_objects, $1) \ + _LT_AC_TAGVAR(predeps, $1) \ + _LT_AC_TAGVAR(postdeps, $1) \ + _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ + _LT_AC_TAGVAR(compiler_lib_search_dirs, $1) \ + _LT_AC_TAGVAR(archive_cmds, $1) \ + _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ + _LT_AC_TAGVAR(postinstall_cmds, $1) \ + _LT_AC_TAGVAR(postuninstall_cmds, $1) \ + _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ + _LT_AC_TAGVAR(allow_undefined_flag, $1) \ + _LT_AC_TAGVAR(no_undefined_flag, $1) \ + _LT_AC_TAGVAR(export_symbols_cmds, $1) \ + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ + _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ + _LT_AC_TAGVAR(hardcode_automatic, $1) \ + _LT_AC_TAGVAR(module_cmds, $1) \ + _LT_AC_TAGVAR(module_expsym_cmds, $1) \ + _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ + _LT_AC_TAGVAR(fix_srcfile_path, $1) \ + _LT_AC_TAGVAR(exclude_expsyms, $1) \ + _LT_AC_TAGVAR(include_expsyms, $1); do + + case $var in + _LT_AC_TAGVAR(old_archive_cmds, $1) | \ + _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ + _LT_AC_TAGVAR(archive_cmds, $1) | \ + _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ + _LT_AC_TAGVAR(module_cmds, $1) | \ + _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ + _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ + _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; - - 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 + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; + esac + done - *nto* | *qnx*) - ;; + case $lt_echo in + *'\[$]0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` + ;; + esac - 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 - ;; +ifelse([$1], [], + [cfgfile="${ofile}T" + trap "$rm \"$cfgfile\"; exit 1" 1 2 15 + $rm -f "$cfgfile" + AC_MSG_NOTICE([creating $ofile])], + [cfgfile="$ofile"]) - 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' - ;; + cat <<__EOF__ >> "$cfgfile" +ifelse([$1], [], +[#! $SHELL - 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" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${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" && $ECHO "X-set_version $verstring" | $Xsed` -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)=: - ;; +# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 +# Free Software Foundation, Inc. +# +# This file is part of GNU Libtool: +# Originally by Gordon Matzigkeit , 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 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. - 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} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${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" && $ECHO "X-set_version $verstring" | $Xsed` -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 "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' +# A sed program that does not truncate output. +SED=$lt_SED - # 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)=: - ;; +# Sed that helps us avoid accidentally triggering echo(1) options like -n. +Xsed="$SED -e 1s/^X//" - solaris*) - _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${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 ${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 - ;; +# 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 - 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 - ;; +# The names of the tagged configurations supported by this script. +available_tags= - 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 - ;; +# ### BEGIN LIBTOOL CONFIG], +[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) - 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' - ;; +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: - 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 - ;; +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL - 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' +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared - 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 - ;; +# Whether or not to build static libraries. +build_old_libs=$enable_static - 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' +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) - 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 - ;; +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) - 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 - ;; +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install - *) - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os - 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 +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os -_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld +# An echo program that does not interpret backslashes. +echo=$lt_echo -_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]) +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS -# -# 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 +# A C compiler. +LTCC=$lt_LTCC - 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_MSG_CHECKING([whether -lc should be explicitly linked in]) - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS - 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_TAGVAR(archive_cmds_need_lc, $1)=no - else - _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* - AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)]) - ;; - esac - fi - ;; -esac +# A language-specific compiler. +CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) -_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([], [fix_srcfile_path], [1], - [Fix the shell variable $srcfile for the compiler]) -_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([], [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 +# Is the compiler the GNU C compiler? +with_gcc=$_LT_AC_TAGVAR(GCC, $1) +# An ERE matcher. +EGREP=$lt_EGREP -# _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) +# The linker used to build libraries. +LD=$lt_[]_LT_AC_TAGVAR(LD, $1) -# Source file extension for C test sources. -ac_ext=c +# Whether we need hard or soft links. +LN_S=$lt_LN_S -# Object file extension for compiled C test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext +# A BSD-compatible nm program. +NM=$lt_NM -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" +# A symbol stripping program +STRIP=$lt_STRIP -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD -_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 +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" -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]) +# Used on cygwin: assembler. +AS="$AS" - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no +# The name of the directory that contains temporary libtool files. +objdir=$objdir - # 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 - ;; +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds - 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]) +# How to pass a linker flag through the compiler. +wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) - 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]) +# Object file suffix (normally "o"). +objext="$ac_objext" - _LT_CONFIG($1) -fi -AC_LANG_POP -CC="$lt_save_CC" -])# _LT_LANG_C_CONFIG +# Old archive suffix (normally "a"). +libext="$libext" +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' -# _LT_PROG_CXX -# ------------ -# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++ -# compiler, we have our own version here. -m4_defun([_LT_PROG_CXX], -[ -pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes]) -AC_PROG_CXX -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 -popdef([AC_MSG_ERROR]) -])# _LT_PROG_CXX +# Executable file suffix (normally ""). +exeext="$exeext" -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([_LT_PROG_CXX], []) +# Additional compiler flags for building library objects. +pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) +pic_mode=$pic_mode +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len -# _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], -[AC_REQUIRE([_LT_PROG_CXX])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_EGREP])dnl - -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(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) -# Source file extension for C++ test sources. -ac_ext=cpp +# Must we lock files when doing compilation? +need_locks=$lt_need_locks -# Object file extension for compiled C++ test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext +# Do we need the lib prefix for modules? +need_lib_prefix=$need_lib_prefix -# 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_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++"} - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) +# Do we need a version for libraries? +need_version=$need_version - 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 +# Whether dlopen is supported. +dlopen_support=$enable_dlopen - if test "$GXX" = yes; then - # Set up default GNU C++ configuration +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self - LT_PATH_LD +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static - # 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 -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -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= +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) - # 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 +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $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 "\-L"' +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) - else - GXX=no - with_gnu_ld=no - wlarc= - fi +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) - # 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 +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) - # 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 +# Library versioning type. +version_type=$version_type - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi +# Format of library name prefix. +libname_spec=$lt_libname_spec - # 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 +# 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 - _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 - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec - _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 $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; 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 - _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' - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - _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 - ;; +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds - 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 - ;; +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) - chorus*) - case $cc_basename in - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) - 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(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 - ;; - darwin* | rhapsody*) - _LT_DARWIN_LINKER_FEATURES($1) - ;; +# Commands used to build and install a shared archive. +archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) +archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds - 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 - ;; +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) +module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) - freebsd[[12]]*) - # C++ shared libraries reported to be fairly broken before - # switch to ELF - _LT_TAGVAR(ld_shlibs, $1)=no - ;; +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib - freebsd-elf*) - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - ;; +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) - freebsd* | dragonfly*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - _LT_TAGVAR(ld_shlibs, $1)=yes - ;; +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) - gnu*) - ;; +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) - 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; $ECHO "X$list" | $Xsed' - ;; - *) - if test "$GXX" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${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 - ;; +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) - 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; $ECHO "X$list" | $Xsed' - ;; - *) - 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 -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${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 - ;; +# The directories searched by this compiler when creating a shared +# library +compiler_lib_search_dirs=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_dirs, $1) - 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" && $ECHO "X-set_version $verstring" | $Xsed` -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 -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -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 - ;; +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) - 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; $ECHO "X$list" | $Xsed' - - _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 | $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 | $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 | $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 | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - ;; - *) # Version 6 will 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 +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method - _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; $ECHO \"$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' +# Command to use when deplibs_check_method == file_magic. +file_magic_cmd=$lt_file_magic_cmd - runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $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=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - xl*) - # 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; $ECHO \"$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='echo' - - # 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 - ;; +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) - lynxos*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds - m88k*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval - 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 - ;; +# 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 - 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::"' - ;; +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - *nto* | *qnx*) - _LT_TAGVAR(ld_shlibs, $1)=yes - ;; +# 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 - 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=echo - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; +# This is the shared library runtime path variable. +runpath_var=$runpath_var - 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" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -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" && $ECHO "X-set_version $verstring" | $Xsed` -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 "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ - $RM $lib.exp' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - ;; - esac +# This is the shared library path variable. +shlibpath_var=$shlibpath_var - _LT_TAGVAR(hardcode_libdir_separator, $1)=: +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath - # 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=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - *) - 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" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${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 "\-L"' - - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; +# How to hardcode a shared library path into an executable. +hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) - psos*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs - 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 - ;; +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) - solaris*) - case $cc_basename in - CC*) - # 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 +# 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_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) - output_verbose_link_cmd='echo' +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) - # 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' +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) - # 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 -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 -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 "\-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 "\-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 - ;; +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) - 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' +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) - 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 - ;; +# 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=$_LT_AC_TAGVAR(hardcode_automatic, $1) - 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' +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" - 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 - ;; +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) - 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 - ;; +# Compile-time system search path for libraries +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - vxworks*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; +# Run-time system search path for libraries +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path=$lt_fix_srcfile_path - AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) - test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no +# Set to yes if exported symbols are required. +always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) - _LT_TAGVAR(GCC, $1)="$GXX" - _LT_TAGVAR(LD, $1)="$LD" +# The commands to list exported symbols. +export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) - ## 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 - 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 +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds -AC_LANG_POP -])# _LT_LANG_CXX_CONFIG +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) +# Symbols that must always be exported. +include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) -# _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 -# 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)= +ifelse([$1],[], +[# ### END LIBTOOL CONFIG], +[# ### END LIBTOOL TAG CONFIG: $tagname]) -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 -]) -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. +__EOF__ - # Sentinel used to keep track of whether or not we are before - # the conftest object file. - pre_test_object_deps_done=no +ifelse([$1],[], [ + case $host_os in + aix3*) + cat <<\EOF >> "$cfgfile" - for p in `eval "$output_verbose_link_cmd"`; do - case $p in +# 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 +EOF + ;; + esac - -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 - else - prev= - fi + # 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 "$pre_test_object_deps_done" = no; then - case $p 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 - ;; + mv -f "$cfgfile" "$ofile" || \ + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" +]) +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi +])# AC_LIBTOOL_CONFIG - *.$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 - ;; +# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) +# ------------------------------------------- +AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], +[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl - *) ;; # Ignore the rest. +_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - esac - done +if test "$GCC" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' - # Clean up. - rm -f a.out a.exe -else - echo "libtool.m4: error: problem compiling $1 test program" + AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], + lt_cv_prog_compiler_rtti_exceptions, + [-fno-rtti -fno-exceptions], [], + [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi +])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI -$RM -f confest.$objext - -# 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 +# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE +# --------------------------------- +AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], +[AC_REQUIRE([AC_CANONICAL_HOST]) +AC_REQUIRE([LT_AC_PROG_SED]) +AC_REQUIRE([AC_PROG_NM]) +AC_REQUIRE([AC_OBJEXT]) +# 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?!! ;)] - # 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 +# Character class describing NM global symbol codes. +symcode='[[BCDEGRST]]' - if test "$solaris_use_stlport4" != yes; then - _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; +# Regexp to match symbols that can be accessed directly from C. +sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' -solaris*) - case $cc_basename in - CC*) - # 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 +# Transform an extracted symbol line into a proper C declaration +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" - # 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 +# 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\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[[BCDT]]' + ;; +cygwin* | mingw* | pw32*) + symcode='[[ABCDGISTW]]' + ;; +hpux*) # Its linker distinguishes data from code symbols + if test "$host_cpu" = ia64; then + symcode='[[ABCDEGRST]]' + fi + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + ;; +linux* | k*bsd*-gnu) + if test "$host_cpu" = ia64; then + symcode='[[ABCDGIRSTW]]' + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + 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 -]) -case " $_LT_TAGVAR(postdeps, $1) " in -*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; +# 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 - _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_PROG_F77 -# ------------ -# Since AC_PROG_F77 is broken, in that it returns the empty string -# if there is no fortran compiler, we have our own version here. -m4_defun([_LT_PROG_F77], -[ -pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes]) -AC_PROG_F77 -if test -z "$F77" || test "X$F77" = "Xno"; then - _lt_disable_F77=yes -fi -popdef([AC_MSG_ERROR]) -])# _LT_PROG_F77 - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([_LT_PROG_F77], []) +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[[ABCDGIRSTW]]' ;; +esac +# Try without a prefix undercore, then with it. +for ac_symprfx in "" "_"; do -# _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_REQUIRE([_LT_PROG_F77])dnl -AC_LANG_PUSH(Fortran 77) + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" -_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(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + # Write the raw and C identifiers. + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" -# Source file extension for f77 test sources. -ac_ext=f + # Check to see that the pipe works correctly. + pipe_works=no -# Object file extension for compiled f77 test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext + rm -f conftest* + cat > conftest.$ac_ext < $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 - # Code to be used in simple link tests - lt_simple_link_test_code="\ - program t - end -" + # 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 < conftest.$ac_ext +#ifdef __cplusplus +extern "C" { +#endif - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER +EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' - # 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 - CC=${F77-"f77"} - 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]) + cat <> conftest.$ac_ext +#if defined (__STDC__) && __STDC__ +# define lt_ptr_t void * +#else +# define lt_ptr_t char * +# define const +#endif - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no +/* The mapping between symbol names and symbols. */ +const struct { + const char *name; + lt_ptr_t address; +} +lt_preloaded_symbols[[]] = +{ +EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext + cat <<\EOF >> conftest.$ac_ext + {0, (lt_ptr_t) 0} +}; - # 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 +#ifdef __cplusplus +} +#endif +EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_save_LIBS="$LIBS" + lt_save_CFLAGS="$CFLAGS" + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$_LT_AC_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_save_LIBS" + CFLAGS="$lt_save_CFLAGS" + else + echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 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" -fi # test "$_lt_disable_F77" != yes - -AC_LANG_POP -])# _LT_LANG_F77_CONFIG - + 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* -# _LT_PROG_FC -# ----------- -# Since AC_PROG_FC is broken, in that it returns the empty string -# if there is no fortran compiler, we have our own version here. -m4_defun([_LT_PROG_FC], -[ -pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes]) -AC_PROG_FC -if test -z "$FC" || test "X$FC" = "Xno"; then - _lt_disable_FC=yes + # 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 -popdef([AC_MSG_ERROR]) -])# _LT_PROG_FC - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([_LT_PROG_FC], []) - - -# _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_REQUIRE([_LT_PROG_FC])dnl -AC_LANG_PUSH(Fortran) - -_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(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 - CC=${FC-"f95"} - compiler=$CC - GCC=$ac_cv_fc_compiler_gnu +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 +]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE - _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_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) +# --------------------------------------- +AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], +[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= +_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= +_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no +AC_MSG_CHECKING([for $compiler option to produce PIC]) + ifelse([$1],[CXX],[ + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' - # 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" -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_GCC=$GCC -GCC=yes -CC=${GCJ-"gcj"} -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 - -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" -])# _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_GCC=$GCC -GCC= -CC=${RC-"windres"} -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" -])# _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_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" + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 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 + ;; + amigaos*) + # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | cygwin* | os2* | pw32*) + # 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_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + _LT_AC_TAGVAR(lt_prog_compiler_pic, $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_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + hpux*) + # 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*) + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + *) + _LT_AC_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_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68*) + # Green Hills C++ Compiler + # _LT_AC_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 + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + esac + ;; + dgux*) + case $cc_basename in + ec++*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + ghcx*) + # Green Hills C++ Compiler + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | dragonfly*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + if test "$host_cpu" != ia64; then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + fi + ;; + aCC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_AC_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_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux* | k*bsd*-gnu) + case $cc_basename in + KCC*) + # KAI C++ Compiler + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + icpc* | ecpc*) + # Intel C++ + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler. + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + esac + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd* | netbsdelf*-gnu) + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + ;; + RCC*) + # Rational C++ 2.4.1 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + cxx*) + # Digital/Compaq C++ + _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + lcc*) + # Lucid + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + *) + ;; + esac + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + esac + ;; + vxworks*) + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac 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], []) +], +[ + if test "$GCC" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_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_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; -# _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"}, \ - = c,a/b,, \ - && 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']) + amigaos*) + # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; -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 + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; -# 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 + mingw* | cygwin* | pw32* | os2*) + # 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_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; -# _LT_PROG_XSI_SHELLFNS -# --------------------- -# Bourne and XSI compatible variants of some useful shell functions. -m4_defun([_LT_PROG_XSI_SHELLFNS], -[case $xsi_shell in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# 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 () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac -} + interix[[3-9]]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; -# func_basename file -func_basename () -{ - func_basename_result="${1##*/}" -} + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + enable_shared=no + ;; -# 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 () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}" -} + sysv4*MP*) + if test -d /usr/nec; then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; -# 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_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}"} -} + hpux*) + # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=${1%%=*} - func_opt_split_arg=${1#*=} -} + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + esac + ;; -# func_lo2o object -func_lo2o () -{ - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac -} + mingw* | cygwin* | pw32* | os2*) + # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=${1%.*}.lo -} + hpux9* | hpux10* | hpux11*) + _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + ;; -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=$(( $[*] )) -} + irix5* | irix6* | nonstopux*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC (with -KPIC) is the default. + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=${#1} -} + newsos6) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; -_LT_EOF - ;; - *) # Bourne compatible functions. - cat << \_LT_EOF >> "$cfgfile" + linux* | k*bsd*-gnu) + case $cc_basename in + icc* | ecc*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + ccc*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All Alpha code is PIC. + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C 5.9 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + *Sun\ F*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='' + ;; + esac + ;; + esac + ;; -# 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 () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi -} + osf3* | osf4* | osf5*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All OSF/1 code is PIC. + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; -# func_basename file -func_basename () -{ - func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` -} + rdos*) + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; -dnl func_dirname_and_basename -dnl A portable version of this function is already defined in general.m4sh -dnl so there is no need for it here. - -# 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 "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; - esac -} + solaris*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; + *) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; + esac + ;; -# sed scripts: -my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' -my_sed_long_arg='1s/^-[[^=]]*=//' + sunos4*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` - func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` -} + sysv4 | sysv4.2uw2* | sysv4.3*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; -# func_lo2o object -func_lo2o () -{ - func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` -} + sysv4*MP*) + if test -d /usr/nec ;then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'` -} + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=`expr "$[@]"` -} + unicos*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` -} + uts4*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; -_LT_EOF -esac + *) + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +]) +AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) -case $lt_shell_append in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$[1]+=\$[2]" -} -_LT_EOF +# +# Check to make sure the PIC flag actually works. +# +if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then + AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], + _LT_AC_TAGVAR(lt_cv_prog_compiler_pic_works, $1), + [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], + [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in + "" | " "*) ;; + *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; + esac], + [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) +fi +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) - cat << \_LT_EOF >> "$cfgfile" + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" + ;; +esac -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$[1]=\$$[1]\$[2]" -} +# +# Check to make sure the static flag actually works. +# +wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" +AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], + _LT_AC_TAGVAR(lt_cv_prog_compiler_static_works, $1), + $lt_tmp_static_flag, + [], + [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) +]) -_LT_EOF + +# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) +# ------------------------------------ +# See if the linker supports building shared libraries. +AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], +[AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) +ifelse([$1],[CXX],[ + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + 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 + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' + else + _LT_AC_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_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" + ;; + cygwin* | mingw*) + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' + ;; + linux* | k*bsd*-gnu) + _LT_AC_TAGVAR(link_all_deplibs, $1)=no + ;; + *) + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac + _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] +],[ + runpath_var= + _LT_AC_TAGVAR(allow_undefined_flag, $1)= + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no + _LT_AC_TAGVAR(archive_cmds, $1)= + _LT_AC_TAGVAR(archive_expsym_cmds, $1)= + _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= + _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= + _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_minus_L, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown + _LT_AC_TAGVAR(hardcode_automatic, $1)=no + _LT_AC_TAGVAR(module_cmds, $1)= + _LT_AC_TAGVAR(module_expsym_cmds, $1)= + _LT_AC_TAGVAR(always_export_symbols, $1)=no + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + _LT_AC_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_AC_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= + # Just being paranoid about ensuring that cc_basename is set. + _LT_CC_BASENAME([$compiler]) + case $host_os in + cygwin* | mingw* | pw32*) + # 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 -]) -# Helper functions for option handling. -*- 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. + _LT_AC_TAGVAR(ld_shlibs, $1)=yes + if test "$with_gnu_ld" = 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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_AC_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_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [[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_AC_TAGVAR(ld_shlibs, $1)=no + cat <&2 -# serial 6 ltoptions.m4 +*** Warning: the GNU linker, at least up to release 2.9.1, 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 modify your PATH +*** so that a non-GNU linker is found, and then restart. -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) +EOF + fi + ;; + amigaos*) + _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can't use + # them. + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; -# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) -# ------------------------------------------ -m4_define([_LT_MANGLE_OPTION], -[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_TAGVAR(always_export_symbols, $1)=no + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' -# _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 -]) + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + _LT_AC_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_AC_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_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + interix[[3-9]]*) + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_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_AC_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_AC_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' + ;; -# _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])]) + gnu* | linux* | k*bsd*-gnu) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$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' ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + _LT_AC_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; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + *) + tmp_sharedflag='-shared' ;; + esac + _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + if test $supports_anon_versioning = yes; then + _LT_AC_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 + _LT_AC_TAGVAR(link_all_deplibs, $1)=no + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; -# _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 -]) + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $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_AC_TAGVAR(ld_shlibs, $1)=no + cat <&2 -# _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 +*** 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. +EOF + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_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_AC_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_AC_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 -# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) -# ----------------------------------------- -m4_define([_LT_MANGLE_DEFUN], -[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) +*** 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 + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; -# 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 + sunos4*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac -# dlopen -# ------ -LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes -]) + if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then + runpath_var= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_AC_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_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_TAGVAR(always_export_symbols, $1)=yes + _LT_AC_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_AC_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_AC_TAGVAR(hardcode_direct, $1)=unsupported + fi + ;; -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.]) -]) + 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 + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' + else + _LT_AC_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 -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) + # 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 -# win32-dll -# --------- -# Declare package support for building win32 dll's. -LT_OPTION_DEFINE([LT_INIT], [win32-dll], -[enable_win32_dll=yes + # 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. -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 + _LT_AC_TAGVAR(archive_cmds, $1)='' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes -test -z "$AS" && AS=as -_LT_DECL([], [AS], [0], [Assembler program])dnl + 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_AC_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_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_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 -test -z "$DLLTOOL" && DLLTOOL=dlltool -_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + _LT_AC_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_AC_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an empty executable. + _LT_AC_SYS_LIBPATH_AIX + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + _LT_AC_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 echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_AC_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_AC_SYS_LIBPATH_AIX + _LT_AC_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_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared libraries. + _LT_AC_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 + ;; -test -z "$OBJDUMP" && OBJDUMP=objdump -_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl -])# win32-dll + amigaos*) + _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + # see comment about different semantics on the GNU ld section + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; -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.]) -]) + bsdi[[45]]*) + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic + ;; -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) + cygwin* | mingw* | pw32*) + # 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. + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' + # FIXME: Should let the user specify the lib program. + _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' + _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + ;; + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_automatic, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + _LT_AC_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_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + _LT_AC_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_AC_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}" + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' + _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + fi + ;; -# _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" + dgux*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; - 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 + freebsd1*) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; -LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([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_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; -# Old names: -AC_DEFUN([AC_ENABLE_SHARED], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) -]) + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; -AC_DEFUN([AC_DISABLE_SHARED], -[_LT_SET_OPTION([LT_INIT], [disable-shared]) -]) + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; -AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) -AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) + hpux9*) + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${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_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(hardcode_direct, $1)=yes -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_ENABLE_SHARED], []) -dnl AC_DEFUN([AM_DISABLE_SHARED], []) + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' -# _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" + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + fi ;; - 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])]) + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: -# Old names: -AC_DEFUN([AC_ENABLE_STATIC], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) -]) + case $host_cpu in + hppa*64*|ia64*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' -AC_DEFUN([AC_DISABLE_STATIC], -[_LT_SET_OPTION([LT_INIT], [disable-static]) -]) + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + fi + ;; -AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) -AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + ;; -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_ENABLE_STATIC], []) -dnl AC_DEFUN([AM_DISABLE_STATIC], []) + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + newsos6) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + openbsd*) + if test -f /usr/libexec/ld.so; then + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + else + case $host_os in + openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + ;; + esac + fi + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; -# _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" + os2*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_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_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; - 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.]) -]) + osf3*) + if test "$GCC" = yes; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + ;; -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.]) -]) + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + else + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_AC_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~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + fi + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + ;; -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) -dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) + solaris*) + _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' + if test "$GCC" = yes; then + wlarc='${wl}' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + else + wlarc='' + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_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' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_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_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + fi + ;; + esac + _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; -# _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]) + sysv4) + case $host_vendor in + sni) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' + _LT_AC_TAGVAR(hardcode_direct, $1)=no + ;; + motorola) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; -test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) + sysv4.3*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' + ;; -_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl -])# _LT_WITH_PIC + sysv4*MP*) + if test -d /usr/nec; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + _LT_AC_TAGVAR(ld_shlibs, $1)=yes + fi + ;; -LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) -LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' -# 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.]) -]) + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) + 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_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; -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])]) + uts4*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; -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])]) + *) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + fi +]) +AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) +test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no -# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # -# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. -# Written by Gary V. Vaughan, 2004 +# Do we need to explicitly link libc? # -# 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])]) - - +case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in +x|xyes) + # Assume -lc should be added + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes -# 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])]) + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $_LT_AC_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_MSG_CHECKING([whether -lc should be explicitly linked in]) + $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_AC_TAGVAR(lt_prog_compiler_wl, $1) + pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) + _LT_AC_TAGVAR(allow_undefined_flag, $1)= + if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) + then + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + else + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + fi + _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) + ;; + esac + fi + ;; +esac +])# AC_LIBTOOL_PROG_LD_SHLIBS -# lt_dict_add(DICT, KEY, VALUE) -# ----------------------------- -m4_define([lt_dict_add], -[m4_define([$1($2)], [$3])]) +# _LT_AC_FILE_LTDLL_C +# ------------------- +# Be careful that the start marker always follows a newline. +AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ +# /* ltdll.c starts here */ +# #define WIN32_LEAN_AND_MEAN +# #include +# #undef WIN32_LEAN_AND_MEAN +# #include +# +# #ifndef __CYGWIN__ +# # ifdef __CYGWIN32__ +# # define __CYGWIN__ __CYGWIN32__ +# # endif +# #endif +# +# #ifdef __cplusplus +# extern "C" { +# #endif +# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); +# #ifdef __cplusplus +# } +# #endif +# +# #ifdef __CYGWIN__ +# #include +# DECLARE_CYGWIN_DLL( DllMain ); +# #endif +# HINSTANCE __hDllInstance_base; +# +# BOOL APIENTRY +# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) +# { +# __hDllInstance_base = hInst; +# return TRUE; +# } +# /* ltdll.c ends here */ +])# _LT_AC_FILE_LTDLL_C -# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) -# -------------------------------------------- -m4_define([lt_dict_add_subkey], -[m4_define([$1($2:$3)], [$4])]) +# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) +# --------------------------------- +AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) -# 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)])]))]) +# old names +AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) +AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) +AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) +AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) +AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) +AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) +AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) -# 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])]) +# This is just to silence aclocal about the macro not being used +ifelse([AC_DISABLE_FAST_INSTALL]) +AC_DEFUN([LT_AC_PROG_GCJ], +[AC_CHECK_TOOL(GCJ, gcj, no) + test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" + AC_SUBST(GCJFLAGS) +]) -# 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 +AC_DEFUN([LT_AC_PROG_RC], +[AC_CHECK_TOOL(RC, windres, no) ]) -# 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. -# Generated from ltversion.in. +# Cheap backport of AS_EXECUTABLE_P and required macros +# from Autoconf 2.59; we should not use $as_executable_p directly. -# serial 3017 ltversion.m4 -# This file is part of GNU Libtool +# _AS_TEST_PREPARE +# ---------------- +m4_ifndef([_AS_TEST_PREPARE], +[m4_defun([_AS_TEST_PREPARE], +[if test -x / >/dev/null 2>&1; then + as_executable_p='test -x' +else + as_executable_p='test -f' +fi +])])# _AS_TEST_PREPARE -m4_define([LT_PACKAGE_VERSION], [2.2.6b]) -m4_define([LT_PACKAGE_REVISION], [1.3017]) +# AS_EXECUTABLE_P +# --------------- +# Check whether a file is executable. +m4_ifndef([AS_EXECUTABLE_P], +[m4_defun([AS_EXECUTABLE_P], +[AS_REQUIRE([_AS_TEST_PREPARE])dnl +$as_executable_p $1[]dnl +])])# AS_EXECUTABLE_P -AC_DEFUN([LTVERSION_VERSION], -[macro_version='2.2.6b' -macro_revision='1.3017' -_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) -_LT_DECL(, macro_revision, 0) +# 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. # +# LT_AC_PROG_SED +# -------------- +# Check for a fully-functional sed program, that truncates +# as few characters as possible. Prefer GNU sed if found. +AC_DEFUN([LT_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]) ]) - -# 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])]) # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # @@ -8143,7 +6829,7 @@ fi[]dnl ])# PKG_CHECK_MODULES -# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -8155,10 +6841,10 @@ # 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' +[am__api_version='1.10' 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.1], [], +m4_if([$1], [1.10.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -8172,12 +6858,12 @@ # 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. +# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.11.1])dnl +[AM_AUTOMAKE_VERSION([1.10.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) +_AM_AUTOCONF_VERSION(AC_AUTOCONF_VERSION)]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- @@ -8234,14 +6920,14 @@ # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 +# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 # 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 +# serial 8 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- @@ -8254,7 +6940,6 @@ 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='#' @@ -8268,14 +6953,14 @@ Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 # 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 10 +# serial 9 # 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, @@ -8332,16 +7017,6 @@ 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 @@ -8359,17 +7034,7 @@ 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 @@ -8379,23 +7044,19 @@ break fi ;; - 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 + # 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. if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} 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 && + grep sub/conftest.${OBJEXT-o} 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 @@ -8452,68 +7113,57 @@ # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 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 5 +#serial 3 # _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 +[for mf in $CONFIG_FILES; 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 @@ -8545,13 +7195,13 @@ # 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. +# 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 16 +# serial 13 # 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. @@ -8568,7 +7218,7 @@ # 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 +[AC_PREREQ([2.60])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 @@ -8619,8 +7269,8 @@ 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 +AM_PROG_INSTALL_SH +AM_PROG_INSTALL_STRIP AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. @@ -8628,37 +7278,24 @@ 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([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 + [_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 + [_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_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 @@ -8681,7 +7318,7 @@ done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -8692,14 +7329,7 @@ # 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 +install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. @@ -8725,13 +7355,13 @@ # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. +# Copyright (C) 2001, 2002, 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 4 +# serial 3 # AM_MAKE_INCLUDE() # ----------------- @@ -8740,7 +7370,7 @@ [am_make=${MAKE-make} cat > confinc << 'END' am__doit: - @echo this is the am__doit target + @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. @@ -8750,24 +7380,24 @@ _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 +# We grep out `Entering directory' and `Leaving directory' +# messages which can occur if `w' ends up in MAKEFLAGS. +# In particular we don't look at `^make:' because GNU make might +# be invoked under some other name (usually "gmake"), in which +# case it prints its new name instead of `make'. +if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then + am__include=include + am__quote= + _am_result=GNU +fi # 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 + if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then + am__include=.include + am__quote="\"" + _am_result=BSD + fi fi AC_SUBST([am__include]) AC_SUBST([am__quote]) @@ -8777,14 +7407,14 @@ # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 +# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 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 6 +# serial 5 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ @@ -8801,14 +7431,7 @@ 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 +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " @@ -8846,13 +7469,13 @@ # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. +# Copyright (C) 2001, 2002, 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 4 +# serial 3 # _AM_MANGLE_OPTION(NAME) # ----------------------- @@ -8869,7 +7492,7 @@ # ---------------------------------- # 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)])]) +[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- @@ -8879,14 +7502,14 @@ # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 +# Copyright (C) 1996, 1997, 2000, 2001, 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 5 +# serial 4 # AM_SANITY_CHECK # --------------- @@ -8895,29 +7518,16 @@ # 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` + 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` + set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ @@ -8970,25 +7580,18 @@ INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006, 2008 Free Software Foundation, Inc. +# Copyright (C) 2006 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_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 Free Software Foundation, Inc. diff -Nru libva-1.0.1/Android.mk libva-1.0.1-3+0.31.1/Android.mk --- libva-1.0.1/Android.mk 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/Android.mk 2010-06-01 10:57:37.000000000 +0000 @@ -0,0 +1,5 @@ +# Recursive call sub-folder Android.mk +# +LOCAL_PATH := $(my-dir) + +include $(LOCAL_PATH)/va/Android.mk diff -Nru libva-1.0.1/config.h.in libva-1.0.1-3+0.31.1/config.h.in --- libva-1.0.1/config.h.in 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/config.h.in 2010-04-06 06:06:26.000000000 +0000 @@ -1,17 +1,8 @@ /* config.h.in. Generated from configure.ac by autoheader. */ -/* Defined to __attribute__((visibility("hidden"))) when available */ -#undef ATTRIBUTE_HIDDEN - /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H -/* Define to 1 if you have the header file. */ -#undef HAVE_GL_GLX_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_GL_GL_H - /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H @@ -39,10 +30,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#undef LT_OBJDIR - /* Name of package */ #undef PACKAGE @@ -58,9 +45,6 @@ /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME -/* Define to the home page for this package. */ -#undef PACKAGE_URL - /* Define to the version of this package. */ #undef PACKAGE_VERSION diff -Nru libva-1.0.1/configure libva-1.0.1-3+0.31.1/configure --- libva-1.0.1/configure 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/configure 2010-04-06 06:06:26.000000000 +0000 @@ -1,85 +1,62 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.65 for libva 0.31.0. +# Generated by GNU Autoconf 2.61 for libva 0.31.0. # # Report bugs to . # -# # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# -# +# 2002, 2003, 2004, 2005, 2006 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. ## -## -------------------- ## +## --------------------- ## +## 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 : +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 + # 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 ;; #( - *) : - ;; + 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 + + +# PATH needs CR +# 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 # 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=';' - } + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false fi @@ -88,18 +65,20 @@ # 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.) +as_nl=' +' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. -case $0 in #(( +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 + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done IFS=$as_save_IFS ;; @@ -110,271 +89,32 @@ 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 + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); 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 || : +# Work around bugs in pre-3.0 UWIN ksh. +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_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 - -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" - as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO - as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO - eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 -test \$(( 1 + 1 )) = 2 || exit 1" - if (eval "$as_required") 2>/dev/null; then : - as_have_required=yes -else - as_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 +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME 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 : - # 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. - BASH_ENV=/dev/null - ENV=/dev/null - (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} -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 and -$0: waldo.bastian@intel.com about your system, including -$0: any error possibly output before this message. Then -$0: install a modern shell, or manually run the script -$0: under such a shell if you do have one." + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var 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_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 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=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 - fi - $as_echo "$as_me: error: $1" >&2 - as_fn_exit $as_status -} # as_fn_error +done +# Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr @@ -388,17 +128,13 @@ 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 +# Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | +echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -413,154 +149,440 @@ } 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 +# CDPATH. +$as_unset CDPATH - 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 test "x$CONFIG_SHELL" = x; then + if (eval ":") 2>/dev/null; then + as_have_required=yes +else + as_have_required=no +fi - # 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 + if test $as_have_required = yes && (eval ": +(as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 } -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 -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -p' - fi +exitcode=0 +if as_func_success; then + : else - as_ln_s='cp -p' + exitcode=1 + echo as_func_success failed. 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 +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' +if as_func_ret_success; then + : else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' + exitcode=1 + echo as_func_ret_success failed. fi -as_executable_p=$as_test_x -# 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'" +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi +test \$exitcode = 0) || { (exit 1); exit 1; } +( + as_lineno_1=\$LINENO + as_lineno_2=\$LINENO + test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && + test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } +") 2> /dev/null; then + : +else + as_candidate_shells= + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + case $as_dir in + /*) + for as_base in sh bash ksh sh5; do + as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + done;; + esac +done +IFS=$as_save_IFS -# Check that we are running under the correct shell. -SHELL=${CONFIG_SHELL-/bin/sh} -case X$lt_ECHO in -X*--fallback-echo) - # Remove one level of quotation (which was required for Make). - ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','` - ;; + for as_shell in $as_candidate_shells $SHELL; do + # Try only shells that exist, to save several forks. + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { ("$as_shell") 2> /dev/null <<\_ASEOF +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 -ECHO=${lt_ECHO-echo} -if test "X$1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X$1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then - # Yippee, $ECHO works! - : -else - # Restart under the correct shell. - exec $SHELL "$0" --no-reexec ${1+"$@"} +fi + + +: +_ASEOF +}; then + CONFIG_SHELL=$as_shell + as_have_required=yes + if { "$as_shell" 2> /dev/null <<\_ASEOF +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 + + +: +(as_func_return () { + (exit $1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = "$1" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test $exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } + +_ASEOF +}; then + break +fi + +fi + + done + + if test "x$CONFIG_SHELL" != x; then + for as_var in BASH_ENV ENV + do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + done + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + + if test $as_have_required = no; then + echo This script requires a shell more modern than all the + echo shells that I found on your system. Please install a + echo modern shell, or manually run the script under such a + echo shell if you do have one. + { (exit 1); exit 1; } +fi + + +fi + +fi + + + +(eval "as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0") || { + echo No shell found that supports shell functions. + echo Please tell autoconf@gnu.org about your system, + echo including any error possibly output before this + echo message +} + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # scripts with optimization help from Paolo Bonzini. 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" || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # 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 +} + + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +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 +fi +echo >conf$$.file +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 -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +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=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# 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'" + + + + +# Check that we are running under the correct shell. +SHELL=${CONFIG_SHELL-/bin/sh} + +case X$ECHO in +X*--fallback-echo) + # Remove one level of quotation (which was required for Make). + ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','` + ;; +esac + +echo=${ECHO-echo} +if test "X$1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift +elif test "X$1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : +elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then + # Yippee, $echo works! + : +else + # Restart under the correct shell. + exec $SHELL "$0" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift - cat <<_LT_EOF + cat </dev/null 2>&1 && unset CDPATH -if test -z "$lt_ECHO"; then - if test "X${echo_test_string+set}" != Xset; then - # find a string as large as possible, as long as the shell can cope with it - for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do - # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if { echo_test_string=`eval $cmd`; } 2>/dev/null && - { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null - then - break - fi - done - fi +if test -z "$ECHO"; then +if test "X${echo_test_string+set}" != Xset; then +# find a string as large as possible, as long as the shell can cope with it + for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do + # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... + if (echo_test_string=`eval $cmd`) 2>/dev/null && + echo_test_string=`eval $cmd` && + (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null + then + break + fi + done +fi - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - : - else - # The Solaris, AIX, and Digital Unix default echo programs unquote - # backslashes. This makes it impossible to quote backslashes using - # echo "$something" | sed 's/\\/\\\\/g' - # - # So, first we look for a working echo in the user's PATH. +if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + : +else + # The Solaris, AIX, and Digital Unix default echo programs unquote + # backslashes. This makes it impossible to quote backslashes using + # echo "$something" | sed 's/\\/\\\\/g' + # + # So, first we look for a working echo in the user's PATH. - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for dir in $PATH /usr/ucb; do - IFS="$lt_save_ifs" - if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && - test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$dir/echo" - break - fi - done + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" + if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && + test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + echo="$dir/echo" + break + fi + done + IFS="$lt_save_ifs" - if test "X$ECHO" = Xecho; then - # We didn't find a better echo, so look for alternatives. - if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # This shell has a builtin print -r that does the trick. - ECHO='print -r' - elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && - test "X$CONFIG_SHELL" != X/bin/ksh; then - # If we have ksh, try running configure again with it. - ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} - export ORIGINAL_CONFIG_SHELL - CONFIG_SHELL=/bin/ksh - export CONFIG_SHELL - exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} - else - # Try using printf. - ECHO='printf %s\n' - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && + if test "X$echo" = Xecho; then + # We didn't find a better echo, so look for alternatives. + if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # This shell has a builtin print -r that does the trick. + echo='print -r' + elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && + test "X$CONFIG_SHELL" != X/bin/ksh; then + # If we have ksh, try running configure again with it. + ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} + export ORIGINAL_CONFIG_SHELL + CONFIG_SHELL=/bin/ksh + export CONFIG_SHELL + exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} + else + # Try using printf. + echo='printf %s\n' + if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # Cool, printf works + : + elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then - # Cool, printf works - : - elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL - export CONFIG_SHELL - SHELL="$CONFIG_SHELL" - export SHELL - ECHO="$CONFIG_SHELL $0 --fallback-echo" - elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$CONFIG_SHELL $0 --fallback-echo" - else - # maybe with a smaller string... - prev=: - - for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do - if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null - then - break - fi - prev="$cmd" - done + CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL + export CONFIG_SHELL + SHELL="$CONFIG_SHELL" + export SHELL + echo="$CONFIG_SHELL $0 --fallback-echo" + elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + echo="$CONFIG_SHELL $0 --fallback-echo" + else + # maybe with a smaller string... + prev=: - if test "$prev" != 'sed 50q "$0"'; then - echo_test_string=`eval $prev` - export echo_test_string - exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} - else - # Oops. We lost completely, so just stick with echo. - ECHO=echo + for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do + if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null + then + break fi - fi + prev="$cmd" + done + + if test "$prev" != 'sed 50q "$0"'; then + echo_test_string=`eval $prev` + export echo_test_string + exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} + else + # Oops. We lost completely, so just stick with echo. + echo=echo + fi fi fi fi fi +fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. -lt_ECHO=$ECHO -if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then - lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" +ECHO=$echo +if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then + ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" fi -test -n "$DJDIR" || exec 7<&0 &1 +tagnames=${tagnames+${tagnames},}CXX + +tagnames=${tagnames+${tagnames},}F77 + +exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, @@ -697,6 +723,7 @@ subdirs= MFLAGS= MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='libva' @@ -704,7 +731,6 @@ PACKAGE_VERSION='0.31.0' PACKAGE_STRING='libva 0.31.0' PACKAGE_BUGREPORT='waldo.bastian@intel.com' -PACKAGE_URL='' ac_unique_file="Makefile.am" # Factoring default headers for most tests. @@ -743,165 +769,142 @@ # include #endif" -ac_subst_vars='am__EXEEXT_FALSE -am__EXEEXT_TRUE -LTLIBOBJS -LIBOBJS -libvabackendlib -libvacorelib -pkgconfigdir -LIBVA_LIBS -LIBVA_CFLAGS -USE_GLX_FALSE -USE_GLX_TRUE -GL_DEPS_LIBS -GL_DEPS_CFLAGS -BUILD_I965_DRIVER_FALSE -BUILD_I965_DRIVER_TRUE -HAVE_GEN4ASM_FALSE -HAVE_GEN4ASM_TRUE -GEN4ASM_LIBS -GEN4ASM_CFLAGS -DRM_LIBS -DRM_CFLAGS -XFIXES_LIBS -XFIXES_CFLAGS -XEXT_LIBS -XEXT_CFLAGS -X11_LIBS -X11_CFLAGS -PKG_CONFIG -CPP -OTOOL64 -OTOOL -LIPO -NMEDIT -DSYMUTIL -lt_ECHO -RANLIB -AR -OBJDUMP -LN_S -NM -ac_ct_DUMPBIN -DUMPBIN -LD -FGREP -EGREP -GREP -SED -am__fastdepCC_FALSE -am__fastdepCC_TRUE -CCDEPMODE -AMDEPBACKSLASH -AMDEP_FALSE -AMDEP_TRUE -am__quote -am__include -DEPDIR -OBJEXT -EXEEXT -ac_ct_CC -CPPFLAGS -LDFLAGS -CFLAGS -CC -host_os -host_vendor -host_cpu -host -build_os -build_vendor -build_cpu +ac_subst_vars='SHELL +PATH_SEPARATOR +PACKAGE_NAME +PACKAGE_TARNAME +PACKAGE_VERSION +PACKAGE_STRING +PACKAGE_BUGREPORT +exec_prefix +prefix +program_transform_name +bindir +sbindir +libexecdir +datarootdir +datadir +sysconfdir +sharedstatedir +localstatedir +includedir +oldincludedir +docdir +infodir +htmldir +dvidir +pdfdir +psdir +libdir +localedir +mandir +DEFS +ECHO_C +ECHO_N +ECHO_T +LIBS +build_alias +host_alias +target_alias +INSTALL_PROGRAM +INSTALL_SCRIPT +INSTALL_DATA +am__isrc +CYGPATH_W +PACKAGE +VERSION +ACLOCAL +AUTOCONF +AUTOMAKE +AUTOHEADER +MAKEINFO +install_sh +STRIP +INSTALL_STRIP_PROGRAM +mkdir_p +AWK +SET_MAKE +am__leading_dot +AMTAR +am__tar +am__untar +LIBVA_MAJOR_VERSION +LIBVA_MINOR_VERSION +LIBVA_MICRO_VERSION +LIBVA_VERSION +LIBVA_LT_VERSION +LIBVA_LT_LDFLAGS +BUILD_DUMMY_DRIVER_TRUE +BUILD_DUMMY_DRIVER_FALSE +LIBVA_DRIVERS_PATH build +build_cpu +build_vendor +build_os +host +host_cpu +host_vendor +host_os +CC +CFLAGS +LDFLAGS +CPPFLAGS +ac_ct_CC +EXEEXT +OBJEXT +DEPDIR +am__include +am__quote +AMDEP_TRUE +AMDEP_FALSE +AMDEPBACKSLASH +CCDEPMODE +am__fastdepCC_TRUE +am__fastdepCC_FALSE +SED +GREP +EGREP +LN_S +ECHO +AR +RANLIB +DSYMUTIL +NMEDIT +CPP +CXX +CXXFLAGS +ac_ct_CXX +CXXDEPMODE +am__fastdepCXX_TRUE +am__fastdepCXX_FALSE +CXXCPP +F77 +FFLAGS +ac_ct_F77 LIBTOOL -LIBVA_DRIVERS_PATH -BUILD_DUMMY_DRIVER_FALSE -BUILD_DUMMY_DRIVER_TRUE -LIBVA_LT_LDFLAGS -LIBVA_LT_VERSION -LIBVA_SDS_VERSION -LIBVA_VERSION -LIBVA_MICRO_VERSION -LIBVA_MINOR_VERSION -LIBVA_MAJOR_VERSION -am__untar -am__tar -AMTAR -am__leading_dot -SET_MAKE -AWK -mkdir_p -MKDIR_P -INSTALL_STRIP_PROGRAM -STRIP -install_sh -MAKEINFO -AUTOHEADER -AUTOMAKE -AUTOCONF -ACLOCAL -VERSION -PACKAGE -CYGPATH_W -am__isrc -INSTALL_DATA -INSTALL_SCRIPT -INSTALL_PROGRAM -target_alias -host_alias -build_alias -LIBS -ECHO_T -ECHO_N -ECHO_C -DEFS -mandir -localedir -libdir -psdir -pdfdir -dvidir -htmldir -infodir -docdir -oldincludedir -includedir -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' +PKG_CONFIG +X11_CFLAGS +X11_LIBS +XEXT_CFLAGS +XEXT_LIBS +XFIXES_CFLAGS +XFIXES_LIBS +DRM_CFLAGS +DRM_LIBS +GEN4ASM_CFLAGS +GEN4ASM_LIBS +HAVE_GEN4ASM_TRUE +HAVE_GEN4ASM_FALSE +BUILD_I965_DRIVER_TRUE +BUILD_I965_DRIVER_FALSE +LIBVA_CFLAGS +LIBVA_LIBS +pkgconfigdir +libvacorelib +libvabackendlib +LIBOBJS +LTLIBOBJS' ac_subst_files='' -ac_user_opts=' -enable_option_checking -enable_glx -enable_dummy_driver -enable_i965_driver -with_drivers_path -enable_static -enable_shared -with_pic -enable_fast_install -enable_dependency_tracking -with_gnu_ld -enable_libtool_lock -enable_largefile -' ac_precious_vars='build_alias host_alias target_alias @@ -911,6 +914,12 @@ LIBS CPPFLAGS CPP +CXX +CXXFLAGS +CCC +CXXCPP +F77 +FFLAGS PKG_CONFIG X11_CFLAGS X11_LIBS @@ -927,8 +936,6 @@ # 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 @@ -1027,20 +1034,13 @@ datarootdir=$ac_optarg ;; -disable-* | --disable-*) - ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + ac_feature=`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 ;; + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` + eval enable_$ac_feature=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; @@ -1053,20 +1053,13 @@ dvidir=$ac_optarg ;; -enable-* | --enable-*) - ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + ac_feature=`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 ;; + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` + eval enable_$ac_feature=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -1257,36 +1250,22 @@ ac_init_version=: ;; -with-* | --with-*) - ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + ac_package=`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 ;; + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + eval with_$ac_package=\$ac_optarg ;; -without-* | --without-*) - ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` + ac_package=`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 ;; + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + eval with_$ac_package=no ;; --x) # Obsolete; use --with-x. @@ -1306,25 +1285,25 @@ | --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." + -*) { echo "$as_me: error: unrecognized option: $ac_option +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } ;; *=*) 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 + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { (exit 1); exit 1; }; } 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 + 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 + echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; @@ -1333,36 +1312,23 @@ 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 + { echo "$as_me: error: missing argument to $ac_option" >&2 + { (exit 1); exit 1; }; } fi -# Check all directory arguments for consistency. +# Be sure to have absolute directory names. 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" + { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' @@ -1376,7 +1342,7 @@ if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes @@ -1392,21 +1358,23 @@ 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" + { echo "$as_me: error: Working directory cannot be determined" >&2 + { (exit 1); exit 1; }; } test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error "pwd does not report name of working directory" + { echo "$as_me: error: pwd does not report name of working directory" >&2 + { (exit 1); exit 1; }; } # 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" | + ac_confdir=`$as_dirname -- "$0" || +$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$0" : 'X\(//\)[^/]' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +echo X"$0" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -1433,11 +1401,13 @@ 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" + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } 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" + cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 + { (exit 1); exit 1; }; } pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then @@ -1485,9 +1455,9 @@ Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] + [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] + [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify @@ -1497,25 +1467,25 @@ 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/libva] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] + --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/libva] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF @@ -1538,10 +1508,8 @@ 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-glx build with OpenGL for X11 support --enable-dummy-driver build dummy video driver --enable-i965-driver build i965 video driver --enable-static[=PKGS] build static libraries [default=no] @@ -1556,11 +1524,12 @@ Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-drivers-path=[path] + --with-drivers-path=path drivers path + --with-gnu-ld assume the C compiler uses GNU ld [default=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-tags[=TAGS] include additional configurations [automatic] Some influential environment variables: CC C compiler command @@ -1568,9 +1537,14 @@ 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 + CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor + CXX C++ compiler command + CXXFLAGS C++ compiler flags + CXXCPP C++ preprocessor + F77 Fortran 77 compiler command + FFLAGS Fortran 77 compiler flags PKG_CONFIG path to pkg-config utility X11_CFLAGS C compiler flags for X11, overriding pkg-config X11_LIBS linker flags for X11, overriding pkg-config @@ -1597,17 +1571,15 @@ 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 + 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|^\.[\\/]||'` + ac_dir_suffix=/`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|/||'` + ac_top_builddir_sub=`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/ ;; @@ -1643,7 +1615,7 @@ echo && $SHELL "$ac_srcdir/configure" --help=recursive else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done @@ -1653,378 +1625,21 @@ if $ac_init_version; then cat <<\_ACEOF libva configure 0.31.0 -generated by GNU Autoconf 2.65 +generated by GNU Autoconf 2.61 -Copyright (C) 2009 Free Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006 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; test "x$as_lineno_stack" = x && { as_lineno=; 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 || - $as_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; test "x$as_lineno_stack" = x && { as_lineno=; 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 { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; 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; test "x$as_lineno_stack" = x && { as_lineno=; 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; } >/dev/null && { - 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; test "x$as_lineno_stack" = x && { as_lineno=; 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; test "x$as_lineno_stack" = x && { as_lineno=; 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 { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; 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; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_func - -# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists, giving a warning if it cannot be compiled using -# the include files in INCLUDES and setting the cache variable VAR -# accordingly. -ac_fn_c_check_header_mongrel () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 -$as_echo_n "checking $2 usability... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_header_compiler=yes -else - ac_header_compiler=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 -$as_echo_n "checking $2 presence... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <$2> -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - ac_header_preproc=yes -else - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( - yes:no: ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} - ;; - no:yes:* ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( cat <<\_ASBOX -## -------------------------------------- ## -## Report this to waldo.bastian@intel.com ## -## -------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=\$ac_header_compiler" -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_header_mongrel -cat >config.log <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. +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 libva $as_me 0.31.0, which was -generated by GNU Autoconf 2.65. Invocation command line was +generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ @@ -2060,8 +1675,8 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" - done + echo "PATH: $as_dir" +done IFS=$as_save_IFS } >&5 @@ -2095,12 +1710,12 @@ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in - 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; + 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) - as_fn_append ac_configure_args1 " '$ac_arg'" + ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else @@ -2116,13 +1731,13 @@ -* ) ac_must_keep_next=true ;; esac fi - as_fn_append ac_configure_args " '$ac_arg'" + ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac done done -{ ac_configure_args0=; unset ac_configure_args0;} -{ ac_configure_args1=; unset ac_configure_args1;} +$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } +$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there @@ -2147,13 +1762,12 @@ 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;} ;; + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +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;} ;; + *) $as_unset $ac_var ;; esac ;; esac done @@ -2182,9 +1796,9 @@ do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - $as_echo "$ac_var='\''$ac_val'\''" + echo "$ac_var='\''$ac_val'\''" done | sort echo @@ -2199,9 +1813,9 @@ do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - $as_echo "$ac_var='\''$ac_val'\''" + echo "$ac_var='\''$ac_val'\''" done | sort echo fi @@ -2217,88 +1831,83 @@ echo fi test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" + echo "$as_me: caught signal $ac_signal" + 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 + trap 'ac_signal='$ac_signal'; { (exit 1); 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" +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _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 +# Prefer explicitly selected file to automatically selected ones. if test -n "$CONFIG_SITE"; then - ac_site_file1=$CONFIG_SITE + set x "$CONFIG_SITE" elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site + set x "$prefix/share/config.site" "$prefix/etc/config.site" else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site + set x "$ac_default_prefix/share/config.site" \ + "$ac_default_prefix/etc/config.site" fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" +shift +for ac_site_file 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;} + if test -r "$ac_site_file"; then + { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" 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;} + # Some versions of bash will fail to source /dev/null (special + # files actually), so we avoid doing that. + if test -f "$cache_file"; then + { echo "$as_me:$LINENO: loading cache $cache_file" >&5 +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;} + { echo "$as_me:$LINENO: creating cache $cache_file" >&5 +echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi @@ -2312,56 +1921,68 @@ 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;} + { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +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;} + { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +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;} + { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 +echo "$as_me: former value: $ac_old_val" >&2;} + { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 +echo "$as_me: current value: $ac_new_val" >&2;} + ac_cache_corrupted=: 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=`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'" ;; + *) ac_configure_args="$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. ## -## -------------------- ## + { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { (exit 1); exit 1; }; } +fi + + + + + + + + + + + + + + + + + + + + + + + + ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -2371,20 +1992,28 @@ -am__api_version='1.11' +am__api_version='1.10' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do - for ac_t in install-sh install.sh shtool; do - if test -f "$ac_dir/$ac_t"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/$ac_t -c" - break 2 - fi - done + 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 + { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 +echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} + { (exit 1); exit 1; }; } fi # These three variables are undocumented and unsupported, @@ -2409,23 +2038,22 @@ # 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; } +{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then : - $as_echo_n "(cached) " >&6 +if test "${ac_cv_path_install+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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]/* | \ + # 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[\\/]* | \ + ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. @@ -2443,29 +2071,17 @@ # 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 + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 fi fi done done ;; esac - - done +done IFS=$as_save_IFS -rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then @@ -2478,8 +2094,8 @@ INSTALL=$ac_install_sh fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 -$as_echo "$INSTALL" >&6; } +{ echo "$as_me:$LINENO: result: $INSTALL" >&5 +echo "${ECHO_T}$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. @@ -2489,34 +2105,21 @@ 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; } +{ echo "$as_me:$LINENO: checking whether build environment is sane" >&5 +echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&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` + 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` + set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ @@ -2526,8 +2129,11 @@ # 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 + { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" >&5 +echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" >&2;} + { (exit 1); exit 1; }; } fi test "$2" = conftest.file @@ -2536,191 +2142,81 @@ # Ok. : else - as_fn_error "newly created file is older than distributed files! -Check your system clock" "$LINENO" 5 + { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! +Check your system clock" >&5 +echo "$as_me: error: newly created file is older than distributed files! +Check your system clock" >&2;} + { (exit 1); exit 1; }; } fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +{ echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}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 $. +# Double any \ or $. echo might interpret backslashes. # 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"` +cat <<\_ACEOF >conftest.sed +s/[\\$]/&&/g;s/;s,x,x,$// +_ACEOF +program_transform_name=`echo $program_transform_name | sed -f conftest.sed` +rm -f conftest.sed # 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 +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # 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 + { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 +echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} 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 test "${ac_cv_prog_STRIP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +{ echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 +echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; } +if test -z "$MKDIR_P"; then + if test "${ac_cv_path_mkdir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH + 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_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$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 - 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 - + 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. + test -d ./--version && rmdir ./--version + MKDIR_P="$ac_install_sh -d" + 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 test "${ac_cv_prog_ac_ct_STRIP+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 test "${ac_cv_path_mkdir+set}" = set; 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 - { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$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; } +{ echo "$as_me:$LINENO: result: $MKDIR_P" >&5 +echo "${ECHO_T}$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in @@ -2732,10 +2228,10 @@ 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 test "${ac_cv_prog_AWK+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_AWK+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. @@ -2745,37 +2241,36 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - 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; } + { echo "$as_me:$LINENO: result: $AWK" >&5 +echo "${ECHO_T}$AWK" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi test -n "$AWK" && break done -{ $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 { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } +set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh @@ -2792,12 +2287,12 @@ 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; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } SET_MAKE= else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi @@ -2816,7 +2311,9 @@ 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 + { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 +echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} + { (exit 1); exit 1; }; } fi fi @@ -2860,6 +2357,112 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} +install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} + +# 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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $STRIP" >&5 +echo "${ECHO_T}$STRIP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_STRIP="strip" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +echo "${ECHO_T}$ac_ct_STRIP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&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" + # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. @@ -2885,27 +2488,16 @@ -LIBVA_SDS_VERSION=4 - - LIBVA_LT_CURRENT=1 -LIBVA_LT_REV=0 +LIBVA_LT_REV=1 LIBVA_LT_AGE=0 LIBVA_LT_VERSION="$LIBVA_LT_CURRENT:$LIBVA_LT_REV:$LIBVA_LT_AGE" -LIBVA_LT_LDFLAGS="-version-info $LIBVA_LT_VERSION -release $LIBVA_VERSION.$LIBVA_SDS_VERSION" - - +LIBVA_LT_LDFLAGS="-version-info $LIBVA_LT_VERSION" -# Check whether --enable-glx was given. -if test "${enable_glx+set}" = set; then : - enableval=$enable_glx; -else - enable_glx=yes -fi # Check whether --enable-dummy-driver was given. -if test "${enable_dummy_driver+set}" = set; then : +if test "${enable_dummy_driver+set}" = set; then enableval=$enable_dummy_driver; else enable_dummy_driver=yes @@ -2921,7 +2513,7 @@ # Check whether --enable-i965-driver was given. -if test "${enable_i965_driver+set}" = set; then : +if test "${enable_i965_driver+set}" = set; then enableval=$enable_i965_driver; else enable_i965_driver=no @@ -2930,10 +2522,10 @@ # Check whether --with-drivers-path was given. -if test "${with_drivers_path+set}" = set; then : +if test "${with_drivers_path+set}" = set; then withval=$with_drivers_path; else - with_drivers_path="$libdir/va/drivers" + with_drivers_path="$libdir/dri" fi @@ -2941,7 +2533,7 @@ # Check whether --enable-static was given. -if test "${enable_static+set}" = set; then : +if test "${enable_static+set}" = set; then enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; @@ -2965,60 +2557,85 @@ +# 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-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 - - -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.2.6b' -macro_revision='1.3017' - - - - - - - - - - - - - -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 test "${ac_cv_build+set}" = set; then : - $as_echo_n "(cached) " >&6 + { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 +echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} + { (exit 1); exit 1; }; } + +{ echo "$as_me:$LINENO: checking build system type" >&5 +echo $ECHO_N "checking build system type... $ECHO_C" >&6; } +if test "${ac_cv_build+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 + { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 +echo "$as_me: error: cannot guess build type; you must specify one" >&2;} + { (exit 1); exit 1; }; } 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 + { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 +echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} + { (exit 1); exit 1; }; } fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -$as_echo "$ac_cv_build" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +echo "${ECHO_T}$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; -*) as_fn_error "invalid value of canonical build" "$LINENO" 5;; +*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 +echo "$as_me: error: invalid value of canonical build" >&2;} + { (exit 1); exit 1; }; };; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' @@ -3034,24 +2651,28 @@ 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 test "${ac_cv_host+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking host system type" >&5 +echo $ECHO_N "checking host system type... $ECHO_C" >&6; } +if test "${ac_cv_host+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 + { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 +echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} + { (exit 1); exit 1; }; } fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -$as_echo "$ac_cv_host" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +echo "${ECHO_T}$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; -*) as_fn_error "invalid value of canonical host" "$LINENO" 5;; +*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 +echo "$as_me: error: invalid value of canonical host" >&2;} + { (exit 1); exit 1; }; };; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' @@ -3075,44 +2696,44 @@ am_make=${MAKE-make} cat > confinc << 'END' am__doit: - @echo this is the am__doit target + @echo done .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; } +{ echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 +echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&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 +# We grep out `Entering directory' and `Leaving directory' +# messages which can occur if `w' ends up in MAKEFLAGS. +# In particular we don't look at `^make:' because GNU make might +# be invoked under some other name (usually "gmake"), in which +# case it prints its new name instead of `make'. +if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then + am__include=include + am__quote= + _am_result=GNU +fi # 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 + if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then + am__include=.include + am__quote="\"" + _am_result=BSD + fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 -$as_echo "$_am_result" >&6; } +{ echo "$as_me:$LINENO: result: $_am_result" >&5 +echo "${ECHO_T}$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. -if test "${enable_dependency_tracking+set}" = set; then : +if test "${enable_dependency_tracking+set}" = set; then enableval=$enable_dependency_tracking; fi @@ -3137,10 +2758,10 @@ 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 test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -3150,25 +2771,25 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - 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; } + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -3177,10 +2798,10 @@ 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 test "${ac_cv_prog_ac_ct_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. @@ -3190,25 +2811,25 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - 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; } + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_CC" = x; then @@ -3216,8 +2837,12 @@ 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;} +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -3230,10 +2855,10 @@ 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 test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -3243,25 +2868,25 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - 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; } + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -3270,10 +2895,10 @@ 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 test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -3284,18 +2909,18 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then @@ -3314,11 +2939,11 @@ 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; } + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -3329,10 +2954,10 @@ 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 test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -3342,25 +2967,25 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - 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; } + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -3373,10 +2998,10 @@ 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 test "${ac_cv_prog_ac_ct_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. @@ -3386,25 +3011,25 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - 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; } + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -3416,8 +3041,12 @@ 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;} +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -3427,38 +3056,52 @@ 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; } +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } # 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" +echo "$as_me:$LINENO: checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (ac_try="$ac_compiler --version >&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 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 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. */ + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ int main () @@ -3469,38 +3112,42 @@ } _ACEOF ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" +ac_clean_files="$ac_clean_files a.out 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.*" - +{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } +ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +# +# List of possible output files, starting from the most likely. +# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) +# only as a last resort. b.out is created by i960 compilers. +ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' +# +# The IRIX 6 linker writes into existing files which may not be +# executable, retaining their permissions. Remove them first so a +# subsequent execution test works. 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_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles -if { { ac_try="$ac_link_default" +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 "echo \"\$as_me:$LINENO: $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 : + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; 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, @@ -3510,14 +3157,14 @@ 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_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.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; + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi @@ -3536,42 +3183,78 @@ 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_set_status 77 -as_fn_error "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; } + +{ echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6; } +if test -z "$ac_file"; then + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: C compiler cannot create executables +See \`config.log' for more details." >&5 +echo "$as_me: error: C compiler cannot create executables +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } +fi + ac_exeext=$ac_cv_exeext -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } +# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 +# If not cross compiling, check that we can run a simple program. +if test "$cross_compiling" != yes; then + if { ac_try='./$ac_file' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { echo "$as_me:$LINENO: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + fi + fi +fi +{ echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + +rm -f a.out 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" +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6; } + +{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 : + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; 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 @@ -3579,90 +3262,37 @@ 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_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.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; } + { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest$ac_cv_exeext +{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$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 test "${ac_cv_objext+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } +if test "${ac_cv_objext+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int @@ -3674,46 +3304,51 @@ } _ACEOF rm -f conftest.o conftest.obj -if { { ac_try="$ac_compile" +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 "echo \"\$as_me:$LINENO: $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 : + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; 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_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else - $as_echo "$as_me: failed program was:" >&5 + 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; } +{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } 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; } +{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$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 test "${ac_cv_c_compiler_gnu+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } +if test "${ac_cv_c_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int @@ -3727,34 +3362,54 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else - ac_compiler_gnu=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + 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 +{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } +GCC=`test $ac_compiler_gnu = yes && echo yes` 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 test "${ac_cv_prog_cc_g+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int @@ -3765,11 +3420,34 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int @@ -3780,12 +3458,35 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : else - ac_c_werror_flag=$ac_save_c_werror_flag + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int @@ -3796,18 +3497,42 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + 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; } +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$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 @@ -3823,14 +3548,18 @@ 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 test "${ac_cv_prog_cc_c89+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include @@ -3887,9 +3616,31 @@ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : + 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + fi + rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done @@ -3900,19 +3651,17 @@ # 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; } ;; + { echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6; } ;; xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; + { echo "$as_me:$LINENO: result: unsupported" >&5 +echo "${ECHO_T}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; } ;; + { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +echo "${ECHO_T}$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' @@ -3922,10 +3671,10 @@ 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 test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 @@ -3950,11 +3699,6 @@ 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 @@ -3972,17 +3716,7 @@ 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 @@ -3992,23 +3726,19 @@ break fi ;; - 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 + # 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. if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} 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 && + grep sub/conftest.${OBJEXT-o} 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 @@ -4032,8 +3762,8 @@ 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; } +{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if @@ -4047,122 +3777,104 @@ fi -{ $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 test "${ac_cv_path_SED+set}" = set; 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 +{ echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 +echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6; } +if test "${lt_cv_path_SED+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # 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 ac_prog in sed gsed; do + for lt_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" - { test -f "$ac_path_SED" && $as_test_x "$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 + if { test -f "$as_dir/$lt_ac_prog$ac_exec_ext" && $as_test_x "$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 +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 +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 -else - ac_cv_path_SED=$SED -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 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//" +SED=$lt_cv_path_SED +{ echo "$as_me:$LINENO: result: $SED" >&5 +echo "${ECHO_T}$SED" >&6; } - - - - - - - - -{ $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 test "${ac_cv_path_GREP+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Extract the first word of "grep ggrep" to use in msg output +if test -z "$GREP"; then +set dummy grep ggrep; ac_prog_name=$2 +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 +# 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" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue -# Check for GNU ac_path_GREP and select it if it is found. + 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" + { test -f "$ac_path_GREP" && $as_test_x "$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" + echo $ECHO_N "0123456789$ECHO_C" >"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" + 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 + ac_count=`expr $ac_count + 1` 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" @@ -4174,61 +3886,77 @@ rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac - $ac_path_GREP_found && break 3 - done - done + + $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 + + +fi + +GREP="$ac_cv_path_GREP" +if test -z "$GREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +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; } +{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +echo "${ECHO_T}$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 test "${ac_cv_path_EGREP+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 + # Extract the first word of "egrep" to use in msg output +if test -z "$EGREP"; then +set dummy egrep; ac_prog_name=$2 +if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else 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 +# 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" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue -# Check for GNU ac_path_EGREP and select it if it is found. + 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" + { test -f "$ac_path_EGREP" && $as_test_x "$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" + echo $ECHO_N "0123456789$ECHO_C" >"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" + 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 + ac_count=`expr $ac_count + 1` 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" @@ -4240,115 +3968,40 @@ rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac - $ac_path_EGREP_found && break 3 - done - done + + $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 + + +fi + +EGREP="$ac_cv_path_EGREP" +if test -z "$EGREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +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; } +{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +echo "${ECHO_T}$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 test "${ac_cv_path_FGREP+set}" = set; 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" - { test -f "$ac_path_FGREP" && $as_test_x "$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 + +# 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 @@ -4356,8 +4009,8 @@ 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; } + { echo "$as_me:$LINENO: checking for ld used by $CC" >&5 +echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw @@ -4370,9 +4023,9 @@ [\\/]* | ?:[\\/]*) 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%/%"` + 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" ;; @@ -4386,14 +4039,14 @@ ;; 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; } + { echo "$as_me:$LINENO: checking for GNU ld" >&5 +echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 -$as_echo_n "checking for non-GNU ld... " >&6; } + { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 +echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } fi -if test "${lt_cv_path_LD+set}" = set; then : - $as_echo_n "(cached) " >&6 +if test "${lt_cv_path_LD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR @@ -4423,17 +4076,19 @@ LD="$lt_cv_path_LD" if test -n "$LD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 -$as_echo "$LD" >&6; } + { echo "$as_me:$LINENO: result: $LD" >&5 +echo "${ECHO_T}$LD" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}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 test "${lt_cv_prog_gnu_ld+set}" = set; then : - $as_echo_n "(cached) " >&6 +test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 +echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} + { (exit 1); exit 1; }; } +{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } +if test "${lt_cv_prog_gnu_ld+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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; } +{ echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5 +echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld +{ echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 +echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6; } +if test "${lt_cv_ld_reload_flag+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_ld_reload_flag='-r' +fi +{ echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 +echo "${ECHO_T}$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 + 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 - - - - - - -{ $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 test "${lt_cv_path_NM+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 +echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6; } +if test "${lt_cv_path_NM+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$NM"; then # Let the user override the test. @@ -4503,1070 +4176,2167 @@ done IFS="$lt_save_ifs" done - : ${lt_cv_path_NM=no} + test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm 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 "$ac_tool_prefix"; then - for ac_prog in "dumpbin -symbols" "link -dump -symbols" - 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 test "${ac_cv_prog_DUMPBIN+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 +{ echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 +echo "${ECHO_T}$lt_cv_path_NM" >&6; } +NM="$lt_cv_path_NM" -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; } +{ echo "$as_me:$LINENO: checking whether ln -s works" >&5 +echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; } +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no, using $LN_S" >&5 +echo "${ECHO_T}no, using $LN_S" >&6; } fi - - test -n "$DUMPBIN" && break - done -fi -if test -z "$DUMPBIN"; then - ac_ct_DUMPBIN=$DUMPBIN - for ac_prog in "dumpbin -symbols" "link -dump -symbols" -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 test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; 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. +{ echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5 +echo $ECHO_N "checking how to recognize dependent libraries... $ECHO_C" >&6; } +if test "${lt_cv_deplibs_check_method+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 + 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. -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 +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 + ;; - test -n "$ac_ct_DUMPBIN" && break -done +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' + ;; - if test "x$ac_ct_DUMPBIN" = x; then - DUMPBIN=":" +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. + if ( 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 - 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 + lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' fi -fi + ;; +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; - if test "$DUMPBIN" != ":"; then - NM="$DUMPBIN" +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 -fi -test -z "$NM" && NM=nm + ;; +gnu*) + 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]) 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) + lt_cv_deplibs_check_method=pass_all + ;; -{ $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 test "${lt_cv_nm_interface+set}" = set; 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:4634: $ac_compile\"" >&5) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&5 - (eval echo "\"\$as_me:4637: $NM \\\"conftest.$ac_objext\\\"\"" >&5) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&5 - (eval echo "\"\$as_me:4640: output\"" >&5) - cat conftest.out >&5 - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" +netbsd* | netbsdelf*-gnu) + 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 - 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 +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 + ;; -# 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 test "${lt_cv_sys_max_cmd_len+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - i=0 - teststring="ABCD" +nto-qnx*) + lt_cv_deplibs_check_method=unknown + ;; - 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 - ;; +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 + ;; - 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; - ;; +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; - 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; - ;; +rdos*) + lt_cv_deplibs_check_method=pass_all + ;; - 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; - ;; +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; - 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` +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*` ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 + ncr) + lt_cv_deplibs_check_method=pass_all ;; - - 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 + 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 )' ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 + 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 ;; - 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 + siemens) + lt_cv_deplibs_check_method=pass_all ;; - *) - 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"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ - = "XX$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 + pc) + lt_cv_deplibs_check_method=pass_all ;; esac + ;; -fi +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; +esac -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 +{ echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 +echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6; } +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 no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} -: ${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"}, \ - = c,a/b,, \ - && 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; } +# Allow CC to be a program name with arguments. +compiler=$CC -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset -else - lt_unset=false +# 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 - - - -# 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' +# 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:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; 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* ;; - *) # EBCDIC based system - lt_SP2NL='tr \100 \n' - lt_NL2SP='tr \r\n \100\100' +*-*-irix6*) + # Find out which ABI we are using. + echo '#line 4433 "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; 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* ;; -esac - - - - +x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +s390*-*linux*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; 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*) + 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" + { echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 +echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6; } +if test "${lt_cv_cc_needs_belf+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +int +main () +{ -{ $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 test "${lt_cv_ld_reload_flag+set}" = set; 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 - 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 - ;; + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + lt_cv_cc_needs_belf=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + lt_cv_cc_needs_belf=no +fi +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + 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 +{ echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 +echo "${ECHO_T}$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:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; 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}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 test "${ac_cv_prog_OBJDUMP+set}" = set; 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 +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 +{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test "${ac_cv_prog_CPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 + # 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 >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + # Broken: fails on valid input. +continue 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; } + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break fi +rm -f conftest.err conftest.$ac_ext -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 test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f 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 -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; } +{ echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$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 >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + : else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue 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 ;; +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; esac - OBJDUMP=$ac_ct_OBJDUMP - fi +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue else - OBJDUMP="$ac_cv_prog_OBJDUMP" + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break fi -test -z "$OBJDUMP" && OBJDUMP=objdump +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +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 +{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } +if test "${ac_cv_header_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include +int +main () +{ + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_header_stdc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + 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 >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include -{ $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 test "${lt_cv_deplibs_check_method+set}" = set; then : - $as_echo_n "(cached) " >&6 +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then + : 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. + ac_cv_header_stdc=no +fi +rm -f conftest* -case $host_os in -aix[4-9]*) - lt_cv_deplibs_check_method=pass_all - ;; +fi -beos*) - lt_cv_deplibs_check_method=pass_all - ;; +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include -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 - ;; +_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* -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. - if ( 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 - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; +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' - ;; +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 >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; +#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 +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -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 - ;; +( exit $ac_status ) +ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi -gnu*) - 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]) 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 - ;; +fi +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then -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)$' - ;; +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_ACEOF -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 - ;; +fi -# This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - lt_cv_deplibs_check_method=pass_all - ;; +# On IRIX 5.3, sys/types and inttypes.h are conflicting. -netbsd* | netbsdelf*-gnu) - 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 - ;; +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=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default -tpf*) - lt_cv_deplibs_check_method=pass_all - ;; +#include <$ac_header> +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + eval "$as_ac_Header=no" 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_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown - - - - - - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF +fi +done -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. -set dummy ${ac_tool_prefix}ar; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AR+set}" = set; then : - $as_echo_n "(cached) " >&6 +for ac_header in dlfcn.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AR="${ac_tool_prefix}ar" - $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 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -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; } + ac_header_compiler=no fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } -fi -if test -z "$ac_cv_prog_AR"; then - ac_ct_AR=$AR - # Extract the first word of "ar", so it can be a program name with args. -set dummy ar; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_AR+set}" = set; 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. +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_AR="ar" - $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 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -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; } + ac_header_preproc=no fi - 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 ;; +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## -------------------------------------- ## +## Report this to waldo.bastian@intel.com ## +## -------------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; esac - AR=$ac_ct_AR - fi +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - AR="$ac_cv_prog_AR" + eval "$as_ac_Header=\$ac_header_preproc" fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru - - - - - - - - +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF +fi +done -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 test "${ac_cv_prog_STRIP+set}" = set; then : - $as_echo_n "(cached) " >&6 +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +if test -z "$CXX"; then + if test -n "$CCC"; then + CXX=$CCC + else + if test -n "$ac_tool_prefix"; then + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC + 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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. + if test -n "$CXX"; then + ac_cv_prog_CXX="$CXX" # 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 + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 + ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - 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; } +CXX=$ac_cv_prog_CXX +if test -n "$CXX"; then + { echo "$as_me:$LINENO: result: $CXX" >&5 +echo "${ECHO_T}$CXX" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + test -n "$CXX" && break + done 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 test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : - $as_echo_n "(cached) " >&6 +if test -z "$CXX"; then + ac_ct_CXX=$CXX + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. + if test -n "$ac_ct_CXX"; then + ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # 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 + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 + ac_cv_prog_ac_ct_CXX="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - 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; } +ac_ct_CXX=$ac_cv_prog_ac_ct_CXX +if test -n "$ac_ct_CXX"; then + { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 +echo "${ECHO_T}$ac_ct_CXX" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi - if test "x$ac_ct_STRIP" = x; then - STRIP=":" + + test -n "$ac_ct_CXX" && break +done + + if test "x$ac_ct_CXX" = x; then + CXX="g++" 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;} +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac - STRIP=$ac_ct_STRIP + CXX=$ac_ct_CXX fi -else - STRIP="$ac_cv_prog_STRIP" fi -test -z "$STRIP" && STRIP=: - - - + fi +fi +# Provide some information about the compiler. +echo "$as_me:$LINENO: checking for C++ compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; } +if test "${ac_cv_cxx_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +int +main () +{ +#ifndef __GNUC__ + choke me +#endif -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 test "${ac_cv_prog_RANLIB+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -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; } + ac_compiler_gnu=no fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_cxx_compiler_gnu=$ac_compiler_gnu 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 test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 +{ echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; } +GXX=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CXXFLAGS=${CXXFLAGS+set} +ac_save_CXXFLAGS=$CXXFLAGS +{ echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 +echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; } +if test "${ac_cv_prog_cxx_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_save_cxx_werror_flag=$ac_cxx_werror_flag + ac_cxx_werror_flag=yes + ac_cv_prog_cxx_g=no + CXXFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -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 +int +main () +{ - 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 ;; + ; + return 0; +} +_ACEOF +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 - RANLIB=$ac_ct_RANLIB - fi +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cxx_g=yes else - RANLIB="$ac_cv_prog_RANLIB" -fi - -test -z "$RANLIB" && RANLIB=: + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + CXXFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +int +main () +{ + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cxx_werror_flag=$ac_save_cxx_werror_flag + CXXFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +int +main () +{ -# 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 - + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cxx_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +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_cxx_werror_flag=$ac_save_cxx_werror_flag +fi +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; } +if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS=$ac_save_CXXFLAGS +elif test $ac_cv_prog_cxx_g = yes; then + if test "$GXX" = yes; then + CXXFLAGS="-g -O2" + else + CXXFLAGS="-g" + fi +else + if test "$GXX" = yes; then + CXXFLAGS="-O2" + else + CXXFLAGS= + fi +fi +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +depcc="$CXX" am_compiler_list= +{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } +if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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'. + 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_CXX_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + 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 + case $depmode in + 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 + ;; + none) break ;; + esac + # 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. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} 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 sub/conftest.${OBJEXT-o} 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_CXX_dependencies_compiler_type=$depmode + break + fi + fi + done + cd .. + rm -rf conftest.dir +else + am_cv_CXX_dependencies_compiler_type=none +fi +fi +{ echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6; } +CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then + am__fastdepCXX_TRUE= + am__fastdepCXX_FALSE='#' +else + am__fastdepCXX_TRUE='#' + am__fastdepCXX_FALSE= +fi +if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +{ echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 +echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6; } +if test -z "$CXXCPP"; then + if test "${ac_cv_prog_CXXCPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Double quotes because CXXCPP needs to be expanded + for CXXCPP in "$CXX -E" "/lib/cpp" + do + ac_preproc_ok=false +for ac_cxx_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 >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break +fi + done + ac_cv_prog_CXXCPP=$CXXCPP +fi + CXXCPP=$ac_cv_prog_CXXCPP +else + ac_cv_prog_CXXCPP=$CXXCPP +fi +{ echo "$as_me:$LINENO: result: $CXXCPP" >&5 +echo "${ECHO_T}$CXXCPP" >&6; } +ac_preproc_ok=false +for ac_cxx_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 >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +fi + + +ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu +if test -n "$ac_tool_prefix"; then + for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn + 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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$F77"; then + ac_cv_prog_F77="$F77" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_F77="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +F77=$ac_cv_prog_F77 +if test -n "$F77"; then + { echo "$as_me:$LINENO: result: $F77" >&5 +echo "${ECHO_T}$F77" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$F77" && break + done +fi +if test -z "$F77"; then + ac_ct_F77=$F77 + for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_F77"; then + ac_cv_prog_ac_ct_F77="$ac_ct_F77" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_F77="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_F77=$ac_cv_prog_ac_ct_F77 +if test -n "$ac_ct_F77"; then + { echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 +echo "${ECHO_T}$ac_ct_F77" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$ac_ct_F77" && break +done + + if test "x$ac_ct_F77" = x; then + F77="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + F77=$ac_ct_F77 + fi +fi + + +# Provide some information about the compiler. +echo "$as_me:$LINENO: checking for Fortran 77 compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +rm -f a.out + +# If we don't use `.F' as extension, the preprocessor is not run on the +# input file. (Note that this only needs to work for GNU compilers.) +ac_save_ext=$ac_ext +ac_ext=F +{ echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6; } +if test "${ac_cv_f77_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF + program main +#ifndef __GNUC__ + choke me +#endif + + end +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_f77_compiler_gnu=$ac_compiler_gnu + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6; } +ac_ext=$ac_save_ext +ac_test_FFLAGS=${FFLAGS+set} +ac_save_FFLAGS=$FFLAGS +FFLAGS= +{ echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 +echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6; } +if test "${ac_cv_prog_f77_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + FFLAGS=-g +cat >conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_f77_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_prog_f77_g=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 +echo "${ECHO_T}$ac_cv_prog_f77_g" >&6; } +if test "$ac_test_FFLAGS" = set; then + FFLAGS=$ac_save_FFLAGS +elif test $ac_cv_prog_f77_g = yes; then + if test "x$ac_cv_f77_compiler_gnu" = xyes; then + FFLAGS="-g -O2" + else + FFLAGS="-g" + fi +else + if test "x$ac_cv_f77_compiler_gnu" = xyes; then + FFLAGS="-O2" + else + FFLAGS= + fi +fi + +G77=`test $ac_compiler_gnu = yes && echo yes` +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 + + + +# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! +# find the maximum length of command line arguments +{ echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 +echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6; } +if test "${lt_cv_sys_max_cmd_len+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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*) + # 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; + ;; + + 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 + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \ + = "XX$teststring") >/dev/null 2>&1 && + new_result=`expr "X$teststring" : ".*" 2>&1` && + lt_cv_sys_max_cmd_len=$new_result && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + 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 + { echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 +echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6; } +else + { echo "$as_me:$LINENO: result: none" >&5 +echo "${ECHO_T}none" >&6; } +fi -# 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 test "${lt_cv_sys_global_symbol_pipe+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 +echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6; } +if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else # These are sane defaults that work on at least a few old systems. @@ -5578,18 +6348,33 @@ # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' +# Transform an extracted symbol line into a proper C declaration +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \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\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; -cygwin* | mingw* | pw32* | cegcc*) +cygwin* | mingw* | pw32*) symcode='[ABCDGISTW]' ;; -hpux*) +hpux*) # Its linker distinguishes data from code symbols if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + ;; +linux* | k*bsd*-gnu) + if test "$host_cpu" = ia64; then + symcode='[ABCDGIRSTW]' + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' @@ -5614,85 +6399,57 @@ ;; esac +# 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 + # 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'" +# Try without a prefix undercore, then with it. +for ac_symprfx in "" "_"; do -# 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" + # 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="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* - cat > conftest.$ac_ext <<_LT_EOF + cat > conftest.$ac_ext <&5 + if { (eval echo "$as_me:$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 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; 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 + if { (eval echo "$as_me:$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 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" @@ -5701,55 +6458,53 @@ 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 + if grep ' nm_test_var$' "$nlist" >/dev/null; then + if grep ' nm_test_func$' "$nlist" >/dev/null; then + cat < conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif -_LT_EOF +EOF # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' - cat <<_LT_EOF >> conftest.$ac_ext + cat <> conftest.$ac_ext +#if defined (__STDC__) && __STDC__ +# define lt_ptr_t void * +#else +# define lt_ptr_t char * +# define const +#endif -/* The mapping between symbol names and symbols. */ +/* The mapping between symbol names and symbols. */ const struct { const char *name; - void *address; + lt_ptr_t address; } -lt__PROGRAM__LTX_preloaded_symbols[] = +lt_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} +EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext + cat <<\EOF >> conftest.$ac_ext + {0, (lt_ptr_t) 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 +EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_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 + if { (eval echo "$as_me:$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 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" @@ -5783,756 +6538,783 @@ 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; } + { echo "$as_me:$LINENO: result: failed" >&5 +echo "${ECHO_T}failed" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } + { echo "$as_me:$LINENO: result: ok" >&5 +echo "${ECHO_T}ok" >&6; } fi +{ echo "$as_me:$LINENO: checking for objdir" >&5 +echo $ECHO_N "checking for objdir... $ECHO_C" >&6; } +if test "${lt_cv_objdir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 +{ echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 +echo "${ECHO_T}$lt_cv_objdir" >&6; } +objdir=$lt_cv_objdir - - - - - - - - - - - - - - - - - -# 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 5846 "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 +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 - rm -rf conftest* ;; +esac -*-*-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 test "${lt_cv_cc_needs_belf+set}" = set; 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 +# 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' - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +# Same as above, but do not quote variable references. +double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' -int -main () -{ +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - ; - 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 +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' -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 +# Constants: +rm="rm -f" -need_locks="$enable_libtool_lock" +# Global variables: +default_ofile=libtool +can_build_shared=yes +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a +ltmain="$ac_aux_dir/ltmain.sh" +ofile="$default_ofile" +with_gnu_ld="$lt_cv_prog_gnu_ld" - 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 test "${ac_cv_prog_DSYMUTIL+set}" = set; then : - $as_echo_n "(cached) " >&6 +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +set dummy ${ac_tool_prefix}ar; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_AR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test -n "$DSYMUTIL"; then - ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. + 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 + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 + ac_cv_prog_AR="${ac_tool_prefix}ar" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - 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; } +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { echo "$as_me:$LINENO: result: $AR" >&5 +echo "${ECHO_T}$AR" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}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 test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then : - $as_echo_n "(cached) " >&6 +if test -z "$ac_cv_prog_AR"; then + ac_ct_AR=$AR + # Extract the first word of "ar", so it can be a program name with args. +set dummy ar; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_AR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test -n "$ac_ct_DSYMUTIL"; then - ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. + 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 + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 + ac_cv_prog_ac_ct_AR="ar" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - 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; } +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 +echo "${ECHO_T}$ac_ct_AR" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi - if test "x$ac_ct_DSYMUTIL" = x; then - DSYMUTIL=":" + 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;} +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac - DSYMUTIL=$ac_ct_DSYMUTIL + AR=$ac_ct_AR fi else - DSYMUTIL="$ac_cv_prog_DSYMUTIL" + AR="$ac_cv_prog_AR" 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 test "${ac_cv_prog_NMEDIT+set}" = set; then : - $as_echo_n "(cached) " >&6 +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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test -n "$NMEDIT"; then - ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. + 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 + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - 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; } +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { echo "$as_me:$LINENO: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}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 test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then : - $as_echo_n "(cached) " >&6 +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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test -n "$ac_ct_NMEDIT"; then - ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. + 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 + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 + ac_cv_prog_ac_ct_RANLIB="ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - 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; } +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +echo "${ECHO_T}$ac_ct_RANLIB" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi - if test "x$ac_ct_NMEDIT" = x; then - NMEDIT=":" + 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;} +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac - NMEDIT=$ac_ct_NMEDIT + RANLIB=$ac_ct_RANLIB fi else - NMEDIT="$ac_cv_prog_NMEDIT" + RANLIB="$ac_cv_prog_RANLIB" 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 test "${ac_cv_prog_LIPO+set}" = set; then : - $as_echo_n "(cached) " >&6 +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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test -n "$LIPO"; then - ac_cv_prog_LIPO="$LIPO" # Let the user override the test. + 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 + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - 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; } +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { echo "$as_me:$LINENO: result: $STRIP" >&5 +echo "${ECHO_T}$STRIP" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}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 test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then : - $as_echo_n "(cached) " >&6 +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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test -n "$ac_ct_LIPO"; then - ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. + 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 + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 + ac_cv_prog_ac_ct_STRIP="strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - 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; } +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +echo "${ECHO_T}$ac_ct_STRIP" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi - if test "x$ac_ct_LIPO" = x; then - LIPO=":" + 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;} +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac - LIPO=$ac_ct_LIPO + STRIP=$ac_ct_STRIP fi else - LIPO="$ac_cv_prog_LIPO" + STRIP="$ac_cv_prog_STRIP" +fi + + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$AR" && AR=ar +test -z "$AR_FLAGS" && AR_FLAGS=cru +test -z "$AS" && AS=as +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$DLLTOOL" && DLLTOOL=dlltool +test -z "$LD" && LD=ld +test -z "$LN_S" && LN_S="ln -s" +test -z "$MAGIC_CMD" && MAGIC_CMD=file +test -z "$NM" && NM=nm +test -z "$SED" && SED=sed +test -z "$OBJDUMP" && OBJDUMP=objdump +test -z "$RANLIB" && RANLIB=: +test -z "$STRIP" && STRIP=: +test -z "$ac_objext" && ac_objext=o + +# 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 + +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + +# Only perform the check for file, if the check method requires it +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + { echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 +echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6; } +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 <&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 + +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 + { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 +echo "${ECHO_T}$MAGIC_CMD" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + { echo "$as_me:$LINENO: checking for file" >&5 +echo $ECHO_N "checking for file... $ECHO_C" >&6; } +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 <&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 + +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 + { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 +echo "${ECHO_T}$MAGIC_CMD" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + else + MAGIC_CMD=: + fi fi + fi + ;; +esac + + + case $host_os in + rhapsody* | darwin*) 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 test "${ac_cv_prog_OTOOL+set}" = set; then : - $as_echo_n "(cached) " >&6 + # 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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_DSYMUTIL+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test -n "$OTOOL"; then - ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. + 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 + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 + ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - 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; } +DSYMUTIL=$ac_cv_prog_DSYMUTIL +if test -n "$DSYMUTIL"; then + { echo "$as_me:$LINENO: result: $DSYMUTIL" >&5 +echo "${ECHO_T}$DSYMUTIL" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}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 test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then : - $as_echo_n "(cached) " >&6 +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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test -n "$ac_ct_OTOOL"; then - ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. + 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 + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 + ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - 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; } +ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL +if test -n "$ac_ct_DSYMUTIL"; then + { echo "$as_me:$LINENO: result: $ac_ct_DSYMUTIL" >&5 +echo "${ECHO_T}$ac_ct_DSYMUTIL" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi - if test "x$ac_ct_OTOOL" = x; then - OTOOL=":" + 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;} +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac - OTOOL=$ac_ct_OTOOL + DSYMUTIL=$ac_ct_DSYMUTIL fi else - OTOOL="$ac_cv_prog_OTOOL" + DSYMUTIL="$ac_cv_prog_DSYMUTIL" 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 test "${ac_cv_prog_OTOOL64+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OTOOL64"; then - ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. + # 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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_NMEDIT+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 + ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - 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; } +NMEDIT=$ac_cv_prog_NMEDIT +if test -n "$NMEDIT"; then + { echo "$as_me:$LINENO: result: $NMEDIT" >&5 +echo "${ECHO_T}$NMEDIT" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}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 test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then : - $as_echo_n "(cached) " >&6 +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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test -n "$ac_ct_OTOOL64"; then - ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. + 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 + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 + ac_cv_prog_ac_ct_NMEDIT="nmedit" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - 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; } +ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT +if test -n "$ac_ct_NMEDIT"; then + { echo "$as_me:$LINENO: result: $ac_ct_NMEDIT" >&5 +echo "${ECHO_T}$ac_ct_NMEDIT" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi - if test "x$ac_ct_OTOOL64" = x; then - OTOOL64=":" + 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;} +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac - OTOOL64=$ac_ct_OTOOL64 + NMEDIT=$ac_ct_NMEDIT fi else - OTOOL64="$ac_cv_prog_OTOOL64" + NMEDIT="$ac_cv_prog_NMEDIT" 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 test "${lt_cv_apple_cc_single_mod+set}" = set; then : - $as_echo_n "(cached) " >&6 + { echo "$as_me:$LINENO: checking for -single_module linker flag" >&5 +echo $ECHO_N "checking for -single_module linker flag... $ECHO_C" >&6; } +if test "${lt_cv_apple_cc_single_mod+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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.* + # 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. + echo "int foo(void){return 1;}" > conftest.c + $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ + -dynamiclib ${wl}-single_module conftest.c + if test -f libconftest.dylib; then + lt_cv_apple_cc_single_mod=yes + rm -rf libconftest.dylib* + fi + rm conftest.c 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 test "${lt_cv_ld_exported_symbols_list+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: result: $lt_cv_apple_cc_single_mod" >&5 +echo "${ECHO_T}$lt_cv_apple_cc_single_mod" >&6; } + { echo "$as_me:$LINENO: checking for -exported_symbols_list linker flag" >&5 +echo $ECHO_N "checking for -exported_symbols_list linker flag... $ECHO_C" >&6; } +if test "${lt_cv_ld_exported_symbols_list+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int @@ -6543,34 +7325,55 @@ return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then lt_cv_ld_exported_symbols_list=yes else - lt_cv_ld_exported_symbols_list=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + 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" + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + 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; } +{ echo "$as_me:$LINENO: result: $lt_cv_ld_exported_symbols_list" >&5 +echo "${ECHO_T}$lt_cv_ld_exported_symbols_list" >&6; } case $host_os in - rhapsody* | darwin1.[012]) + rhapsody* | darwin1.[0123]) _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 + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + darwin*) # 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' ;; + 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 @@ -6580,147 +7383,40 @@ 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}' + _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}" fi if test "$DSYMUTIL" != ":"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' + _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 test "${ac_cv_prog_CPP+set}" = set; 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.$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.$ac_ext +enable_dlopen=no +enable_win32_dll=no -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break +# Check whether --enable-libtool-lock was given. +if test "${enable_libtool_lock+set}" = set; then + enableval=$enable_libtool_lock; 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 : +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err 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 +# Check whether --with-pic was given. +if test "${with_pic+set}" = set; then + withval=$with_pic; pic_mode="$withval" else - # Passes both tests. -ac_preproc_ok=: -break + pic_mode=default fi -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f 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 +test -z "$pic_mode" && pic_mode=default +# Use C for the default configuration in the libtool script +tagname= +lt_save_CC="$CC" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -6728,384 +7424,6732 @@ 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 test "${ac_cv_header_stdc+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include +# Source file extension for C test sources. +ac_ext=c -int -main () -{ +# Object file extension for compiled C test sources. +objext=o +objext=$objext - ; - 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 +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;" -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 +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}' -_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* +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} -fi +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} -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 +# Allow CC to be a program name with arguments. +compiler=$CC -_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* +# 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* -fi +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* -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 : - : + + +lt_prog_compiler_no_builtin_flag= + +if test "$GCC" = yes; then + lt_prog_compiler_no_builtin_flag=' -fno-builtin' + + +{ echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 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 + 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:7490: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:7494: \$? = $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 "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/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 -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 +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +echo "${ECHO_T}$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 -# 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 -" -eval as_val=\$$as_ac_Header - if test "x$as_val" = 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" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_DLFCN_H 1 -_ACEOF +lt_prog_compiler_wl= +lt_prog_compiler_pic= +lt_prog_compiler_static= -fi +{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } -done + 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*) + # 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' + ;; -# Set options + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | cygwin* | pw32* | os2*) + # 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' + ;; - enable_dlopen=no + 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 + ;; - enable_win32_dll=no + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic=-Kconform_pic + fi + ;; + hpux*) + # 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='-fPIC' + ;; + esac + ;; - # 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" + lt_prog_compiler_pic='-fPIC' ;; esac -else - enable_shared=yes -fi + 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 + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic='-qnocommon' + lt_prog_compiler_wl='-Wl,' + ;; + esac + ;; + mingw* | cygwin* | pw32* | os2*) + # 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' + ;; + newsos6) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + linux* | k*bsd*-gnu) + case $cc_basename in + icc* | ecc*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # 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' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C 5.9 + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='-Wl,' + ;; + *Sun\ F*) + # 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='' + ;; + esac + ;; + esac + ;; + 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*) + 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' + ;; -# 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 - - - + 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' + ;; - # 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" + lt_prog_compiler_can_build_shared=no ;; esac -else - enable_fast_install=yes -fi + fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic" >&6; } +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic"; then +{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_pic_works+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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:7780: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:7784: \$? = $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 "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/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 +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works" >&5 +echo "${ECHO_T}$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 +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 +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" +{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_static_works+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 "X$_lt_linker_boilerplate" | $Xsed -e '/^$/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 +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_static_works" >&6; } +if test x"$lt_cv_prog_compiler_static_works" = xyes; then + : +else + lt_prog_compiler_static= +fi -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" +{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_c_o+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' + 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:7884: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:7888: \$? = $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 "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/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 .. + rmdir conftest + $rm conftest* +fi +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 +echo "${ECHO_T}$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 + { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&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 + { echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6; } + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +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 +{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } + runpath_var= + allow_undefined_flag= + enable_shared_with_static_runtimes=no + archive_cmds= + archive_expsym_cmds= + old_archive_From_new_cmds= + old_archive_from_expsyms_cmds= + export_dynamic_flag_spec= + whole_archive_flag_spec= + thread_safe_flag_spec= + hardcode_libdir_flag_spec= + hardcode_libdir_flag_spec_ld= + hardcode_libdir_separator= + hardcode_direct=no + hardcode_minus_L=no + hardcode_shlibpath_var=unsupported + link_all_deplibs=unknown + hardcode_automatic=no + module_cmds= + module_expsym_cmds= + always_export_symbols=no + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # 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= + # Just being paranoid about ensuring that cc_basename is set. + for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + case $host_os in + cygwin* | mingw* | pw32*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + ld_shlibs=yes + if test "$with_gnu_ld" = yes; then + # 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>/dev/null` in + *\ [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 <&2 +*** Warning: the GNU linker, at least up to release 2.9.1, 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 modify your PATH +*** so that a non-GNU linker is found, and then restart. +EOF + fi + ;; + amigaos*) + 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 + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can't use + # them. + ld_shlibs=no + ;; + 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*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' + 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/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + 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 + ;; + 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* | k*bsd*-gnu) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + 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; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # 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; $echo \"$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' ;; + 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; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + *) + tmp_sharedflag='-shared' ;; + esac + archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + if test $supports_anon_versioning = yes; 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 + link_all_deplibs=no + else + ld_shlibs=no + fi + ;; + netbsd* | netbsdelf*-gnu) + 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 $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' + fi + ;; + solaris*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + ld_shlibs=no + cat <&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. +EOF + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + 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 + ;; + 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 -test -z "$LN_S" && LN_S="ln -s" +*** 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 + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$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 $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 + 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 + 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")) && (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_libdir_separator=':' + link_all_deplibs=yes + 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 + # 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. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +int +main () +{ + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then -if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +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 "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 -$as_echo_n "checking for objdir... " >&6; } -if test "${lt_cv_objdir+set}" = set; 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 - + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +fi +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -cat >>confdefs.h <<_ACEOF -#define LT_OBJDIR "$lt_cv_objdir/" + 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 echo "${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. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +int +main () +{ + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +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 "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +fi +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; 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' + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec='$convenience' + 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*) + 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 + # see comment about different semantics on the GNU ld section + ld_shlibs=no + ;; + bsdi[45]*) + export_dynamic_flag_spec=-rdynamic + ;; + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec=' ' + 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 `echo "$deplibs" | $SED -e '\''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' + fix_srcfile_path='`cygpath -w "$srcfile"`' + enable_shared_with_static_runtimes=yes + ;; + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes + hardcode_shlibpath_var=unsupported + whole_archive_flag_spec='' + link_all_deplibs=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + 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 + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' + module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs=no + ;; + esac + 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 -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; -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 - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -sed_quote_subst='s/\(["`$\\]\)/\\\1/g' + hpux9*) + if test "$GCC" = yes; then + archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${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 -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' + # 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' + ;; -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + archive_cmds='$CC -shared -fPIC ${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_separator=: -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' + hardcode_direct=yes + export_dynamic_flag_spec='${wl}-E' -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + fi + ;; -# Global variables: -ofile=libtool -can_build_shared=yes + hpux11*) + if test "$GCC" = yes -a "$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 ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds='$CC -shared -fPIC ${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' + ;; + *) + archive_cmds='$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 + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a + case $host_cpu in + hppa*64*|ia64*) + hardcode_libdir_flag_spec_ld='+b $libdir' + hardcode_direct=no + hardcode_shlibpath_var=no + ;; + *) + hardcode_direct=yes + export_dynamic_flag_spec='${wl}-E' -with_gnu_ld="$lt_cv_prog_gnu_ld" + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + esac + fi + ;; -old_CC="$CC" -old_CFLAGS="$CFLAGS" + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_ld='-rpath $libdir' + fi + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + link_all_deplibs=yes + ;; -# 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 + netbsd* | netbsdelf*-gnu) + 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 + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct=yes + hardcode_shlibpath_var=no + 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" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + fi + 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} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${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='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -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; echo "-hidden">> $lib.exp~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_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 + hardcode_libdir_separator=: + ;; + + solaris*) + no_undefined_flag=' -z text' + if test "$GCC" = yes; then + wlarc='${wl}' + archive_cmds='$CC -shared ${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 ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + else + 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' + 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='`test -z "$SCOABSPATH" && echo ${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,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$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 + fi + +{ echo "$as_me:$LINENO: result: $ld_shlibs" >&5 +echo "${ECHO_T}$ld_shlibs" >&6; } +test "$ld_shlibs" = no && can_build_shared=no + +# +# 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. + { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } + $rm conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 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:$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=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc=no + else + archive_cmds_need_lc=yes + fi + allow_undefined_flag=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + { echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 +echo "${ECHO_T}$archive_cmds_need_lc" >&6; } + ;; + esac + fi + ;; +esac + +{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } +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" + +if test "$GCC" = yes; then + case $host_os in + darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; + *) lt_awk_arg="/^libraries:/" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then + # 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 -e 's/;/ /g'` + else + lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # 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; } +}'` + sys_lib_search_path_spec=`echo $lt_search_path_spec` +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +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*) + 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=`$echo "X$lib" | $Xsed -e '\''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' + ;; + +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*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + 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' + 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="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + 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 + ;; + 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 + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # 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}${versuffix}$shared_ext ${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 + ;; + +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' + ;; + +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) + 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 + # 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;/^$/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' + ;; + +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + 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=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 + ;; + +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 + export_dynamic_flag_spec='${wl}-Blargedynsym' + 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 + 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' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + 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' + ;; + +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 +{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6; } +test "$dynamic_linker" = no && can_build_shared=no + +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec" +fi + +sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec" +fi + +sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" + +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 + +{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } +hardcode_action= +if test -n "$hardcode_libdir_flag_spec" || \ + test -n "$runpath_var" || \ + test "X$hardcode_automatic" = "Xyes" ; then + + # We can hardcode non-existant 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_AC_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 +{ echo "$as_me:$LINENO: result: $hardcode_action" >&5 +echo "${ECHO_T}$hardcode_action" >&6; } + +if test "$hardcode_action" = relink; 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 + +striplib= +old_striplib= +{ echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 +echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&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" + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}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" + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + ;; + *) + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + ;; + esac +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*) + 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 + { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_dl_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dl_dlopen=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } +if test $ac_cv_lib_dl_dlopen = yes; 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 + + ;; + + *) + { echo "$as_me:$LINENO: checking for shl_load" >&5 +echo $ECHO_N "checking for shl_load... $ECHO_C" >&6; } +if test "${ac_cv_func_shl_load+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define shl_load to an innocuous variant, in case declares shl_load. + For example, HP-UX 11i declares gettimeofday. */ +#define shl_load innocuous_shl_load + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char shl_load (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef shl_load + +/* 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 (); +/* 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_shl_load || defined __stub___shl_load +choke me +#endif + +int +main () +{ +return shl_load (); + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_shl_load=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_shl_load=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 +echo "${ECHO_T}$ac_cv_func_shl_load" >&6; } +if test $ac_cv_func_shl_load = yes; then + lt_cv_dlopen="shl_load" +else + { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } +if test "${ac_cv_lib_dld_shl_load+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_dld_shl_load=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dld_shl_load=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } +if test $ac_cv_lib_dld_shl_load = yes; then + lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" +else + { echo "$as_me:$LINENO: checking for dlopen" >&5 +echo $ECHO_N "checking for dlopen... $ECHO_C" >&6; } +if test "${ac_cv_func_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define dlopen to an innocuous variant, in case declares dlopen. + For example, HP-UX 11i declares gettimeofday. */ +#define dlopen innocuous_dlopen + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char dlopen (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef dlopen + +/* 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 (); +/* 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_dlopen || defined __stub___dlopen +choke me +#endif + +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_dlopen=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 +echo "${ECHO_T}$ac_cv_func_dlopen" >&6; } +if test $ac_cv_func_dlopen = yes; then + lt_cv_dlopen="dlopen" +else + { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_dl_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dl_dlopen=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } +if test $ac_cv_lib_dl_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + { echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 +echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6; } +if test "${ac_cv_lib_svld_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsvld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_svld_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_svld_dlopen=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6; } +if test $ac_cv_lib_svld_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" +else + { echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 +echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6; } +if test "${ac_cv_lib_dld_dld_link+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_dld_dld_link=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dld_dld_link=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6; } +if test $ac_cv_lib_dld_dld_link = yes; 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" + + { echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 +echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6; } +if test "${lt_cv_dlopen_self+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 < +#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 + +#ifdef __cplusplus +extern "C" void exit (int); +#endif + +void fnord() { int i=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; + /* dlclose (self); */ + } + else + puts (dlerror ()); + + exit (status); +} +EOF + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && 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 +{ echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 +echo "${ECHO_T}$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\" + { echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 +echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6; } +if test "${lt_cv_dlopen_self_static+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 < +#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 + +#ifdef __cplusplus +extern "C" void exit (int); +#endif + +void fnord() { int i=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; + /* dlclose (self); */ + } + else + puts (dlerror ()); + + exit (status); +} +EOF + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && 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 +{ echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 +echo "${ECHO_T}$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 + + +# Report which library types will actually be built +{ echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 +echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: result: $can_build_shared" >&5 +echo "${ECHO_T}$can_build_shared" >&6; } + +{ echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 +echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&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 +{ echo "$as_me:$LINENO: result: $enable_shared" >&5 +echo "${ECHO_T}$enable_shared" >&6; } + +{ echo "$as_me:$LINENO: checking whether to build static libraries" >&5 +echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; } +# Make sure either enable_shared or enable_static is yes. +test "$enable_shared" = yes || enable_static=yes +{ echo "$as_me:$LINENO: result: $enable_static" >&5 +echo "${ECHO_T}$enable_static" >&6; } + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # 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 + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler \ + CC \ + LD \ + lt_prog_compiler_wl \ + lt_prog_compiler_pic \ + lt_prog_compiler_static \ + lt_prog_compiler_no_builtin_flag \ + export_dynamic_flag_spec \ + thread_safe_flag_spec \ + whole_archive_flag_spec \ + enable_shared_with_static_runtimes \ + old_archive_cmds \ + old_archive_from_new_cmds \ + predep_objects \ + postdep_objects \ + predeps \ + postdeps \ + compiler_lib_search_path \ + compiler_lib_search_dirs \ + archive_cmds \ + archive_expsym_cmds \ + postinstall_cmds \ + postuninstall_cmds \ + old_archive_from_expsyms_cmds \ + allow_undefined_flag \ + no_undefined_flag \ + export_symbols_cmds \ + hardcode_libdir_flag_spec \ + hardcode_libdir_flag_spec_ld \ + hardcode_libdir_separator \ + hardcode_automatic \ + module_cmds \ + module_expsym_cmds \ + lt_cv_prog_compiler_c_o \ + fix_srcfile_path \ + exclude_expsyms \ + include_expsyms; do + + case $var in + old_archive_cmds | \ + old_archive_from_new_cmds | \ + archive_cmds | \ + archive_expsym_cmds | \ + module_cmds | \ + module_expsym_cmds | \ + old_archive_from_expsyms_cmds | \ + export_symbols_cmds | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="${ofile}T" + trap "$rm \"$cfgfile\"; exit 1" 1 2 15 + $rm -f "$cfgfile" + { echo "$as_me:$LINENO: creating $ofile" >&5 +echo "$as_me: creating $ofile" >&6;} + + cat <<__EOF__ >> "$cfgfile" +#! $SHELL + +# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 +# Free Software Foundation, Inc. +# +# This file is part of GNU Libtool: +# Originally by Gordon Matzigkeit , 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 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. + +# 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//" + +# 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 + +# The names of the tagged configurations supported by this script. +available_tags= + +# ### BEGIN LIBTOOL CONFIG + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# 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 + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# 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 + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_compiler + +# Is the compiler the GNU C compiler? +with_gcc=$GCC + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# 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 + +# 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 + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag + +# 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 + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec + +# Library versioning type. +version_type=$version_type + +# 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 + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# 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 and install a shared archive. +archive_cmds=$lt_archive_cmds +archive_expsym_cmds=$lt_archive_expsym_cmds +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds +module_expsym_cmds=$lt_module_expsym_cmds + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps + +# The directories searched by this compiler when creating a shared +# library +compiler_lib_search_dirs=$lt_compiler_lib_search_dirs + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path + +# 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 + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# 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 + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# 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 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 + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs + +# 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 + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path=$lt_fix_srcfile_path + +# 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 + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_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 + +# ### END LIBTOOL CONFIG + +__EOF__ + + + case $host_os in + aix3*) + cat <<\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 +EOF + ;; + esac + + # 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) + + mv -f "$cfgfile" "$ofile" || \ + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + 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 + +CC="$lt_save_CC" + + +# Check whether --with-tags was given. +if test "${with_tags+set}" = set; then + withval=$with_tags; tagnames="$withval" +fi + + +if test -f "$ltmain" && test -n "$tagnames"; then + if test ! -f "${ofile}"; then + { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5 +echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;} + fi + + if test -z "$LTCC"; then + eval "`$SHELL ${ofile} --config | grep '^LTCC='`" + if test -z "$LTCC"; then + { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5 +echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;} + else + { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5 +echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;} + fi + fi + if test -z "$LTCFLAGS"; then + eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" + fi + + # Extract list of available tagged configurations in $ofile. + # Note that this assumes the entire list is on one line. + available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` + + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for tagname in $tagnames; do + IFS="$lt_save_ifs" + # Check whether tagname contains only valid characters + case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in + "") ;; + *) { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5 +echo "$as_me: error: invalid tag name: $tagname" >&2;} + { (exit 1); exit 1; }; } + ;; + esac + + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null + then + { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5 +echo "$as_me: error: tag name \"$tagname\" already exists" >&2;} + { (exit 1); exit 1; }; } + fi + + # Update the list of available tags. + if test -n "$tagname"; then + echo appending configuration tag \"$tagname\" to $ofile + + case $tagname in + CXX) + if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + + + +archive_cmds_need_lc_CXX=no +allow_undefined_flag_CXX= +always_export_symbols_CXX=no +archive_expsym_cmds_CXX= +export_dynamic_flag_spec_CXX= +hardcode_direct_CXX=no +hardcode_libdir_flag_spec_CXX= +hardcode_libdir_flag_spec_ld_CXX= +hardcode_libdir_separator_CXX= +hardcode_minus_L_CXX=no +hardcode_shlibpath_var_CXX=unsupported +hardcode_automatic_CXX=no +module_cmds_CXX= +module_expsym_cmds_CXX= +link_all_deplibs_CXX=unknown +old_archive_cmds_CXX=$old_archive_cmds +no_undefined_flag_CXX= +whole_archive_flag_spec_CXX= +enable_shared_with_static_runtimes_CXX=no + +# Dependencies to place before and after the object being linked: +predep_objects_CXX= +postdep_objects_CXX= +predeps_CXX= +postdeps_CXX= +compiler_lib_search_path_CXX= +compiler_lib_search_dirs_CXX= + +# Source file extension for C++ test sources. +ac_ext=cpp + +# Object file extension for compiled C++ test sources. +objext=o +objext_CXX=$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(int, char *[]) { return(0); }' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. + +# 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 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* + + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +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++"} +compiler=$CC +compiler_CXX=$CC +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + +# We don't want -fno-exception wen compiling C++ code, so set the +# no_builtin_flag separately +if test "$GXX" = yes; then + lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' +else + lt_prog_compiler_no_builtin_flag_CXX= +fi + +if test "$GXX" = yes; then + # Set up default GNU C++ configuration + + +# 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. + { echo "$as_me:$LINENO: checking for ld used by $CC" >&5 +echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&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 + { echo "$as_me:$LINENO: checking for GNU ld" >&5 +echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } +else + { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 +echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } +fi +if test "${lt_cv_path_LD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 +echo "${ECHO_T}$LD" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi +test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 +echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} + { (exit 1); exit 1; }; } +{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } +if test "${lt_cv_prog_gnu_ld+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 &5 +echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$lt_cv_prog_gnu_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 + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_CXX='${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 + whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_CXX= + 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. + archive_cmds_CXX='$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 "\-L"' + +else + GXX=no + with_gnu_ld=no + wlarc= +fi + +# PORTME: fill in a description of your system's C++ link characteristics +{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } +ld_shlibs_CXX=yes +case $host_os in + aix3*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=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. + + archive_cmds_CXX='' + hardcode_direct_CXX=yes + hardcode_libdir_separator_CXX=':' + link_all_deplibs_CXX=yes + + 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 + hardcode_direct_CXX=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_CXX=yes + hardcode_libdir_flag_spec_CXX='-L$libdir' + hardcode_libdir_separator_CXX= + 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 + + # 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_CXX=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_CXX='-berok' + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +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 "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" + + archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${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_CXX='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag_CXX="-z nodefs" + archive_expsym_cmds_CXX="\$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. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +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 "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_CXX='${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_CXX=' ${wl}-bernotok' + allow_undefined_flag_CXX=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_CXX='$convenience' + archive_cmds_need_lc_CXX=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds_CXX="\$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 + allow_undefined_flag_CXX=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs_CXX=no + fi + ;; + + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_CXX='-L$libdir' + allow_undefined_flag_CXX=unsupported + always_export_symbols_CXX=no + enable_shared_with_static_runtimes_CXX=yes + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds_CXX='$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... + archive_expsym_cmds_CXX='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 + ld_shlibs_CXX=no + fi + ;; + darwin* | rhapsody*) + archive_cmds_need_lc_CXX=no + hardcode_direct_CXX=no + hardcode_automatic_CXX=yes + hardcode_shlibpath_var_CXX=unsupported + whole_archive_flag_spec_CXX='' + link_all_deplibs_CXX=yes + allow_undefined_flag_CXX="$_lt_dar_allow_undefined" + if test "$GXX" = yes ; then + output_verbose_link_cmd='echo' + archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + archive_expsym_cmds_CXX="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_CXX="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}" + if test "$lt_cv_apple_cc_single_mod" != "yes"; then + archive_cmds_CXX="\$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}" + archive_expsym_cmds_CXX="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 + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' + module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs_CXX=no + ;; + esac + fi + ;; + + dgux*) + case $cc_basename in + ec++*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + ghcx*) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + freebsd[12]*) + # C++ shared libraries reported to be fairly broken before switch to ELF + ld_shlibs_CXX=no + ;; + freebsd-elf*) + archive_cmds_need_lc_CXX=no + ;; + freebsd* | dragonfly*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + ld_shlibs_CXX=yes + ;; + gnu*) + ;; + hpux9*) + hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_CXX=: + export_dynamic_flag_spec_CXX='${wl}-E' + hardcode_direct_CXX=yes + hardcode_minus_L_CXX=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 + ld_shlibs_CXX=no + ;; + aCC*) + archive_cmds_CXX='$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) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes; then + archive_cmds_CXX='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${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 + ld_shlibs_CXX=no + fi + ;; + esac + ;; + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + case $host_cpu in + hppa*64*|ia64*) ;; + *) + export_dynamic_flag_spec_CXX='${wl}-E' + ;; + esac + fi + case $host_cpu in + hppa*64*|ia64*) + hardcode_direct_CXX=no + hardcode_shlibpath_var_CXX=no + ;; + *) + hardcode_direct_CXX=yes + hardcode_minus_L_CXX=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 + ld_shlibs_CXX=no + ;; + aCC*) + case $host_cpu in + hppa*64*) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + archive_cmds_CXX='$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; echo $list' + ;; + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then + case $host_cpu in + hppa*64*) + archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${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 + ld_shlibs_CXX=no + fi + ;; + esac + ;; + interix[3-9]*) + hardcode_direct_CXX=no + hardcode_shlibpath_var_CXX=no + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + export_dynamic_flag_spec_CXX='${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_CXX='$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_CXX='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++ + archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -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. + old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' + ;; + *) + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' + fi + fi + link_all_deplibs_CXX=yes + ;; + esac + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + ;; + linux* | k*bsd*-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. + archive_cmds_CXX='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' + archive_expsym_cmds_CXX='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; echo $list' + + hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc*) + # 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."*) + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$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 + archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac + archive_cmds_need_lc_CXX=no + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + archive_expsym_cmds_CXX='$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' + + hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + ;; + cxx*) + # Compaq C++ + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$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 + hardcode_libdir_flag_spec_CXX='-rpath $libdir' + hardcode_libdir_separator_CXX=: + + # 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=`echo $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; echo $list' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + no_undefined_flag_CXX=' -zdefs' + archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' + hardcode_libdir_flag_spec_CXX='-R$libdir' + whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + + # Not sure whether something based on + # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 + # would be better. + output_verbose_link_cmd='echo' + + # 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. + old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' + ;; + esac + ;; + esac + ;; + lynxos*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + m88k*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + mvs*) + case $cc_basename in + cxx*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + hardcode_libdir_flag_spec_CXX='-R$libdir' + hardcode_direct_CXX=yes + hardcode_shlibpath_var_CXX=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::"' + ;; + openbsd2*) + # C++ shared libraries are fairly broken + ld_shlibs_CXX=no + ;; + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct_CXX=yes + hardcode_shlibpath_var_CXX=no + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + export_dynamic_flag_spec_CXX='${wl}-E' + whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd='echo' + else + ld_shlibs_CXX=no + fi + ;; + osf3*) + 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. + archive_cmds_CXX='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' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + hardcode_libdir_separator_CXX=: + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' + + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + cxx*) + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + # 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=`echo $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; echo $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + # 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 "\-L"' + + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + 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. + archive_cmds_CXX='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' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + hardcode_libdir_separator_CXX=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + cxx*) + allow_undefined_flag_CXX=' -expect_unresolved \*' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds_CXX='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' + + hardcode_libdir_flag_spec_CXX='-rpath $libdir' + hardcode_libdir_separator_CXX=: + + # 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=`echo $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; echo $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + # 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 "\-L"' + + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + psos*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + lcc*) + # Lucid + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + archive_cmds_need_lc_CXX=yes + no_undefined_flag_CXX=' -zdefs' + archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_expsym_cmds_CXX='$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' + + hardcode_libdir_flag_spec_CXX='-R$libdir' + hardcode_shlibpath_var_CXX=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?) + whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' + ;; + esac + link_all_deplibs_CXX=yes + + output_verbose_link_cmd='echo' + + # 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. + old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' + ;; + gcx*) + # Green Hills C++ Compiler + archive_cmds_CXX='$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. + old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + ;; + *) + # GNU C++ compiler with Solaris linker + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + no_undefined_flag_CXX=' ${wl}-z ${wl}defs' + if $CC --version | grep -v '^2\.7' > /dev/null; then + archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared -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 \"\-L\"" + else + # g++ 2.7 appears to require `-G' NOT `-shared' on this + # platform. + archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_expsym_cmds_CXX='$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 \"\-L\"" + fi + + hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + ;; + esac + fi + ;; + esac + ;; + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag_CXX='${wl}-z,text' + archive_cmds_need_lc_CXX=no + hardcode_shlibpath_var_CXX=no + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$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. + # 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. + # So that behaviour is only enabled if SCOABSPATH is set to a + # non-empty value in the environment. Most likely only useful for + # creating official distributions of packages. + # This is a hack until libtool officially supports absolute path + # names for shared libraries. + no_undefined_flag_CXX='${wl}-z,text' + allow_undefined_flag_CXX='${wl}-z,nodefs' + archive_cmds_need_lc_CXX=no + hardcode_shlibpath_var_CXX=no + hardcode_libdir_flag_spec_CXX='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator_CXX=':' + link_all_deplibs_CXX=yes + export_dynamic_flag_spec_CXX='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + archive_cmds_CXX='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$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 + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + vxworks*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; +esac +{ echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 +echo "${ECHO_T}$ld_shlibs_CXX" >&6; } +test "$ld_shlibs_CXX" = no && can_build_shared=no + +GCC_CXX="$GXX" +LD_CXX="$LD" + +cat > conftest.$ac_ext <&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; 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 + + # The `*' in the case matches for architectures that use `case' in + # $output_verbose_cmd can trigger glob expansion during the loop + # eval without this substitution. + output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` + + for p in `eval $output_verbose_link_cmd`; do + case $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 + else + prev= + fi + + if test "$pre_test_object_deps_done" = no; then + case $p 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 "$compiler_lib_search_path_CXX"; then + compiler_lib_search_path_CXX="${prev}${p}" + else + compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${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 "$postdeps_CXX"; then + postdeps_CXX="${prev}${p}" + else + postdeps_CXX="${postdeps_CXX} ${prev}${p}" + fi + fi + ;; + + *.$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 "$predep_objects_CXX"; then + predep_objects_CXX="$p" + else + predep_objects_CXX="$predep_objects_CXX $p" + fi + else + if test -z "$postdep_objects_CXX"; then + postdep_objects_CXX="$p" + else + postdep_objects_CXX="$postdep_objects_CXX $p" + fi + fi + ;; + + *) ;; # Ignore the rest. + + esac + done + + # Clean up. + rm -f a.out a.exe +else + echo "libtool.m4: error: problem compiling CXX test program" +fi + +$rm -f confest.$objext + +compiler_lib_search_dirs_CXX= +if test -n "$compiler_lib_search_path_CXX"; then + compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` +fi + +# PORTME: override above test on systems where it is broken +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. + predep_objects_CXX= + postdep_objects_CXX= + postdeps_CXX= + ;; + +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 + postdeps_CXX='-library=Cstd -library=Crun' + fi + ;; + esac + ;; + +solaris*) + case $cc_basename in + CC*) + # 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 + postdeps_CXX='-library=Cstd -library=Crun' + fi + ;; + esac + ;; +esac + +case " $postdeps_CXX " in +*" -lc "*) archive_cmds_need_lc_CXX=no ;; +esac + +lt_prog_compiler_wl_CXX= +lt_prog_compiler_pic_CXX= +lt_prog_compiler_static_CXX= + +{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } + + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='-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_CXX='-Bstatic' + fi + ;; + amigaos*) + # 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_CXX='-m68020 -resident32 -malways-restore-a4' + ;; + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | cygwin* | os2* | pw32*) + # 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_CXX='-DDLL_EXPORT' + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_CXX='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + lt_prog_compiler_pic_CXX= + ;; + 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_prog_compiler_pic_CXX=-Kconform_pic + fi + ;; + hpux*) + # 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*) + ;; + *) + lt_prog_compiler_pic_CXX='-fPIC' + ;; + esac + ;; + *) + lt_prog_compiler_pic_CXX='-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_prog_compiler_static_CXX='-Bstatic' + else + lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68*) + # Green Hills C++ Compiler + # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--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 + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic_CXX='-qnocommon' + lt_prog_compiler_wl_CXX='-Wl,' + ;; + esac + ;; + dgux*) + case $cc_basename in + ec++*) + lt_prog_compiler_pic_CXX='-KPIC' + ;; + ghcx*) + # Green Hills C++ Compiler + lt_prog_compiler_pic_CXX='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | dragonfly*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' + if test "$host_cpu" != ia64; then + lt_prog_compiler_pic_CXX='+Z' + fi + ;; + aCC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_CXX='+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_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux* | k*bsd*-gnu) + case $cc_basename in + KCC*) + # KAI C++ Compiler + lt_prog_compiler_wl_CXX='--backend -Wl,' + lt_prog_compiler_pic_CXX='-fPIC' + ;; + icpc* | ecpc*) + # Intel C++ + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-static' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler. + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-fpic' + lt_prog_compiler_static_CXX='-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_prog_compiler_pic_CXX= + lt_prog_compiler_static_CXX='-non_shared' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + lt_prog_compiler_wl_CXX='-Qoption ld ' + ;; + esac + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx*) + lt_prog_compiler_pic_CXX='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd* | netbsdelf*-gnu) + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + lt_prog_compiler_wl_CXX='--backend -Wl,' + ;; + RCC*) + # Rational C++ 2.4.1 + lt_prog_compiler_pic_CXX='-pic' + ;; + cxx*) + # Digital/Compaq C++ + lt_prog_compiler_wl_CXX='-Wl,' + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + lt_prog_compiler_pic_CXX= + lt_prog_compiler_static_CXX='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + lt_prog_compiler_wl_CXX='-Qoption ld ' + ;; + gcx*) + # Green Hills C++ Compiler + lt_prog_compiler_pic_CXX='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + lt_prog_compiler_pic_CXX='-pic' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + lcc*) + # Lucid + lt_prog_compiler_pic_CXX='-pic' + ;; + *) + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + lt_prog_compiler_pic_CXX='-KPIC' + ;; + *) + ;; + esac + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + esac + ;; + vxworks*) + ;; + *) + lt_prog_compiler_can_build_shared_CXX=no + ;; + esac + fi + +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6; } + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic_CXX"; then + +{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_pic_works_CXX=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_CXX -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:12762: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:12766: \$? = $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 "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/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_CXX=yes + fi + fi + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_pic_works_CXX" >&6; } + +if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then + case $lt_prog_compiler_pic_CXX in + "" | " "*) ;; + *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; + esac +else + lt_prog_compiler_pic_CXX= + lt_prog_compiler_can_build_shared_CXX=no +fi + +fi +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_CXX= + ;; + *) + lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" + ;; +esac + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" +{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_static_works_CXX=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 "X$_lt_linker_boilerplate" | $Xsed -e '/^$/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_CXX=yes + fi + else + lt_cv_prog_compiler_static_works_CXX=yes + fi + fi + $rm -r conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_CXX" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_static_works_CXX" >&6; } + +if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then + : +else + lt_prog_compiler_static_CXX= +fi + + +{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_c_o_CXX=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:12866: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:12870: \$? = $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 "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/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_CXX=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 .. + rmdir conftest + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6; } + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&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 + { echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6; } + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +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 + +{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } + + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + 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 + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + fi + ;; + pw32*) + export_symbols_cmds_CXX="$ltdll_cmds" + ;; + cygwin* | mingw*) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + ;; + linux* | k*bsd*-gnu) + link_all_deplibs_CXX=no + ;; + *) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac + exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' + +{ echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 +echo "${ECHO_T}$ld_shlibs_CXX" >&6; } +test "$ld_shlibs_CXX" = no && can_build_shared=no + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc_CXX" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc_CXX=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds_CXX 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. + { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } + $rm conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_CXX + pic_flag=$lt_prog_compiler_pic_CXX + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_CXX + allow_undefined_flag_CXX= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc_CXX=no + else + archive_cmds_need_lc_CXX=yes + fi + allow_undefined_flag_CXX=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 +echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6; } + ;; + esac + fi + ;; +esac + +{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } +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*) + 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=`$echo "X$lib" | $Xsed -e '\''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' + ;; + +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*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + 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' + 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="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + 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 + ;; + 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 + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # 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}${versuffix}$shared_ext ${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_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 + ;; + +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' + ;; + +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) + 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 + # 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;/^$/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' + ;; + +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + 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=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 + ;; + +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 + export_dynamic_flag_spec='${wl}-Blargedynsym' + 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 + 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' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + 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' + ;; + +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 +{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6; } +test "$dynamic_linker" = no && can_build_shared=no + +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec" +fi + +sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec" +fi + +sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" + +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 + +{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } +hardcode_action_CXX= +if test -n "$hardcode_libdir_flag_spec_CXX" || \ + test -n "$runpath_var_CXX" || \ + test "X$hardcode_automatic_CXX" = "Xyes" ; then + + # We can hardcode non-existant directories. + if test "$hardcode_direct_CXX" != 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_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no && + test "$hardcode_minus_L_CXX" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action_CXX=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_CXX=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_CXX=unsupported +fi +{ echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 +echo "${ECHO_T}$hardcode_action_CXX" >&6; } + +if test "$hardcode_action_CXX" = relink; 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 + + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # 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 + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_CXX \ + CC_CXX \ + LD_CXX \ + lt_prog_compiler_wl_CXX \ + lt_prog_compiler_pic_CXX \ + lt_prog_compiler_static_CXX \ + lt_prog_compiler_no_builtin_flag_CXX \ + export_dynamic_flag_spec_CXX \ + thread_safe_flag_spec_CXX \ + whole_archive_flag_spec_CXX \ + enable_shared_with_static_runtimes_CXX \ + old_archive_cmds_CXX \ + old_archive_from_new_cmds_CXX \ + predep_objects_CXX \ + postdep_objects_CXX \ + predeps_CXX \ + postdeps_CXX \ + compiler_lib_search_path_CXX \ + compiler_lib_search_dirs_CXX \ + archive_cmds_CXX \ + archive_expsym_cmds_CXX \ + postinstall_cmds_CXX \ + postuninstall_cmds_CXX \ + old_archive_from_expsyms_cmds_CXX \ + allow_undefined_flag_CXX \ + no_undefined_flag_CXX \ + export_symbols_cmds_CXX \ + hardcode_libdir_flag_spec_CXX \ + hardcode_libdir_flag_spec_ld_CXX \ + hardcode_libdir_separator_CXX \ + hardcode_automatic_CXX \ + module_cmds_CXX \ + module_expsym_cmds_CXX \ + lt_cv_prog_compiler_c_o_CXX \ + fix_srcfile_path_CXX \ + exclude_expsyms_CXX \ + include_expsyms_CXX; do + + case $var in + old_archive_cmds_CXX | \ + old_archive_from_new_cmds_CXX | \ + archive_cmds_CXX | \ + archive_expsym_cmds_CXX | \ + module_cmds_CXX | \ + module_expsym_cmds_CXX | \ + old_archive_from_expsyms_cmds_CXX | \ + export_symbols_cmds_CXX | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="$ofile" + + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_CXX + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# 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 + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_compiler_CXX + +# Is the compiler the GNU C compiler? +with_gcc=$GCC_CXX + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD_CXX + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_CXX + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_CXX +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# 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 + +# 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 + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_CXX + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX + +# Library versioning type. +version_type=$version_type + +# 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 + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds_CXX +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX + +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds_CXX +archive_expsym_cmds=$lt_archive_expsym_cmds_CXX +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds_CXX +module_expsym_cmds=$lt_module_expsym_cmds_CXX + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects_CXX + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects_CXX + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_CXX + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps_CXX + +# The directories searched by this compiler when creating a shared +# library +compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_CXX + +# 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 + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_CXX + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_CXX + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# 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 + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_CXX + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# 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_CXX + +# 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_CXX + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct_CXX + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L_CXX + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX + +# 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_CXX + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_CXX + +# 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 + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path=$lt_fix_srcfile_path + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols_CXX + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_CXX + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_CXX + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_CXX + +# ### END LIBTOOL TAG CONFIG: $tagname + +__EOF__ + + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + 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 + +CC=$lt_save_CC +LDCXX=$LD +LD=$lt_save_LD +GCC=$lt_save_GCC +with_gnu_ldcxx=$with_gnu_ld +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 + + else + tagname="" + fi + ;; + + F77) + if test -n "$F77" && test "X$F77" != "Xno"; then + +ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu + + +archive_cmds_need_lc_F77=no +allow_undefined_flag_F77= +always_export_symbols_F77=no +archive_expsym_cmds_F77= +export_dynamic_flag_spec_F77= +hardcode_direct_F77=no +hardcode_libdir_flag_spec_F77= +hardcode_libdir_flag_spec_ld_F77= +hardcode_libdir_separator_F77= +hardcode_minus_L_F77=no +hardcode_automatic_F77=no +module_cmds_F77= +module_expsym_cmds_F77= +link_all_deplibs_F77=unknown +old_archive_cmds_F77=$old_archive_cmds +no_undefined_flag_F77= +whole_archive_flag_spec_F77= +enable_shared_with_static_runtimes_F77=no + +# Source file extension for f77 test sources. +ac_ext=f + +# Object file extension for compiled f77 test sources. +objext=o +objext_F77=$objext + +# 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. + +# 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 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* + + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +CC=${F77-"f77"} +compiler=$CC +compiler_F77=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; @@ -7114,2073 +14158,4129 @@ *) break;; esac done -cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + +{ echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 +echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: result: $can_build_shared" >&5 +echo "${ECHO_T}$can_build_shared" >&6; } + +{ echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 +echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&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 +{ echo "$as_me:$LINENO: result: $enable_shared" >&5 +echo "${ECHO_T}$enable_shared" >&6; } + +{ echo "$as_me:$LINENO: checking whether to build static libraries" >&5 +echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; } +# Make sure either enable_shared or enable_static is yes. +test "$enable_shared" = yes || enable_static=yes +{ echo "$as_me:$LINENO: result: $enable_static" >&5 +echo "${ECHO_T}$enable_static" >&6; } + +GCC_F77="$G77" +LD_F77="$LD" + +lt_prog_compiler_wl_F77= +lt_prog_compiler_pic_F77= +lt_prog_compiler_static_F77= + +{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } + + if test "$GCC" = yes; then + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_static_F77='-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_F77='-Bstatic' + fi + ;; + + amigaos*) + # 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_F77='-m68020 -resident32 -malways-restore-a4' + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2*) + # 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_F77='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_F77='-fno-common' + ;; + + 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_F77=no + enable_shared=no + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_F77=-Kconform_pic + fi + ;; + + hpux*) + # 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_F77='-fPIC' + ;; + esac + ;; + + *) + lt_prog_compiler_pic_F77='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl_F77='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_F77='-Bstatic' + else + lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp' + fi + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic_F77='-qnocommon' + lt_prog_compiler_wl_F77='-Wl,' + ;; + esac + ;; + + mingw* | cygwin* | pw32* | os2*) + # 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_F77='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl_F77='-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_F77='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static_F77='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl_F77='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static_F77='-non_shared' + ;; + + newsos6) + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + linux* | k*bsd*-gnu) + case $cc_basename in + icc* | ecc*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-fpic' + lt_prog_compiler_static_F77='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl_F77='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static_F77='-non_shared' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C 5.9 + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + lt_prog_compiler_wl_F77='-Wl,' + ;; + *Sun\ F*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + lt_prog_compiler_wl_F77='' + ;; + esac + ;; + esac + ;; + osf3* | osf4* | osf5*) + lt_prog_compiler_wl_F77='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static_F77='-non_shared' + ;; -# 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 test "${lt_cv_path_MAGIC_CMD+set}" = set; 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 + rdos*) + lt_prog_compiler_static_F77='-non_shared' + ;; -*** 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 + solaris*) + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + lt_prog_compiler_wl_F77='-Qoption ld ';; + *) + lt_prog_compiler_wl_F77='-Wl,';; + esac + ;; -_LT_EOF - fi ;; - esac + sunos4*) + lt_prog_compiler_wl_F77='-Qoption ld ' + lt_prog_compiler_pic_F77='-PIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic_F77='-Kconform_pic' + lt_prog_compiler_static_F77='-Bstatic' fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_can_build_shared_F77=no + ;; + + uts4*) + lt_prog_compiler_pic_F77='-pic' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared_F77=no + ;; + esac + fi + +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6; } + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic_F77"; then + +{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_pic_works_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_pic_works_F77=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_F77" + # 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:14464: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:14468: \$? = $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 "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/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_F77=yes + fi + fi + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_F77" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_pic_works_F77" >&6; } + +if test x"$lt_cv_prog_compiler_pic_works_F77" = xyes; then + case $lt_prog_compiler_pic_F77 in + "" | " "*) ;; + *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; + esac +else + lt_prog_compiler_pic_F77= + lt_prog_compiler_can_build_shared_F77=no +fi + +fi +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_F77= + ;; + *) + lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" + ;; esac + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\" +{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_static_works_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_static_works_F77=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 "X$_lt_linker_boilerplate" | $Xsed -e '/^$/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_F77=yes + fi + else + lt_cv_prog_compiler_static_works_F77=yes + fi + fi + $rm -r conftest* + LDFLAGS="$save_LDFLAGS" + fi +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_F77" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_static_works_F77" >&6; } -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; } +if test x"$lt_cv_prog_compiler_static_works_F77" = xyes; then + : else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + lt_prog_compiler_static_F77= fi +{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_c_o_F77=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:14568: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:14572: \$? = $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 "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/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_F77=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 .. + rmdir conftest + $rm conftest* +fi +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6; } -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 test "${lt_cv_path_MAGIC_CMD+set}" = set; then : - $as_echo_n "(cached) " >&6 +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&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 + { echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6; } + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi 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 + need_locks=no +fi + +{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } + + runpath_var= + allow_undefined_flag_F77= + enable_shared_with_static_runtimes_F77=no + archive_cmds_F77= + archive_expsym_cmds_F77= + old_archive_From_new_cmds_F77= + old_archive_from_expsyms_cmds_F77= + export_dynamic_flag_spec_F77= + whole_archive_flag_spec_F77= + thread_safe_flag_spec_F77= + hardcode_libdir_flag_spec_F77= + hardcode_libdir_flag_spec_ld_F77= + hardcode_libdir_separator_F77= + hardcode_direct_F77=no + hardcode_minus_L_F77=no + hardcode_shlibpath_var_F77=unsupported + link_all_deplibs_F77=unknown + hardcode_automatic_F77=no + module_cmds_F77= + module_expsym_cmds_F77= + always_export_symbols_F77=no + export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms_F77= + # 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_F77='_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= + # Just being paranoid about ensuring that cc_basename is set. + for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + case $host_os in + cygwin* | mingw* | pw32*) + # 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 -*** 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 + ld_shlibs_F77=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' -_LT_EOF - fi ;; - esac - fi - break + # 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_F77='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_F77='${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_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_F77= fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac -fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [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 -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 + # 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_F77=no + cat <&2 +*** Warning: the GNU linker, at least up to release 2.9.1, 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 modify your PATH +*** so that a non-GNU linker is found, and then restart. - else - MAGIC_CMD=: - fi -fi +EOF + fi + ;; - fi - ;; -esac + amigaos*) + archive_cmds_F77='$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_F77='-L$libdir' + hardcode_minus_L_F77=yes + + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can't use + # them. + ld_shlibs_F77=no + ;; -# Use C for the default configuration in the libtool script + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag_F77=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs_F77=no + fi + ;; -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 + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_F77='-L$libdir' + allow_undefined_flag_F77=unsupported + always_export_symbols_F77=no + enable_shared_with_static_runtimes_F77=yes + export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds_F77='$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_F77='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_F77=no + fi + ;; -# Source file extension for C test sources. -ac_ext=c + interix[3-9]*) + hardcode_direct_F77=no + hardcode_shlibpath_var_F77=no + hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' + export_dynamic_flag_spec_F77='${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_F77='$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_F77='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' + ;; -# Object file extension for compiled C test sources. -objext=o -objext=$objext + gnu* | linux* | k*bsd*-gnu) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$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' ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + whole_archive_flag_spec_F77='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + *) + tmp_sharedflag='-shared' ;; + esac + archive_cmds_F77='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" + if test $supports_anon_versioning = yes; then + archive_expsym_cmds_F77='$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 + link_all_deplibs_F77=no + else + ld_shlibs_F77=no + fi + ;; -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $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_F77=no + cat <&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. +EOF + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_F77=no + fi + ;; + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs_F77=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 + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + else + ld_shlibs_F77=no + fi + ;; + esac + ;; -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} + sunos4*) + archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_F77=no + fi + ;; + esac -# Allow CC to be a program name with arguments. -compiler=$CC + if test "$ld_shlibs_F77" = no; then + runpath_var= + hardcode_libdir_flag_spec_F77= + export_dynamic_flag_spec_F77= + whole_archive_flag_spec_F77= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag_F77=unsupported + always_export_symbols_F77=yes + archive_expsym_cmds_F77='$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_F77=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_F77=unsupported + fi + ;; -# 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 + 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 + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds_F77='$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 -# 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* + # 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 -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* + 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. -if test -n "$compiler"; then + archive_cmds_F77='' + hardcode_direct_F77=yes + hardcode_libdir_separator_F77=':' + link_all_deplibs_F77=yes -lt_prog_compiler_no_builtin_flag= + 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_F77=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_F77=yes + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_libdir_separator_F77= + 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 -if test "$GCC" = yes; then - lt_prog_compiler_no_builtin_flag=' -fno-builtin' + # 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_F77=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_F77='-berok' + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF + program main - { $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 test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; 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:7342: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:7346: \$? = $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 "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/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* + end +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +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 "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 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 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -fi +fi +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${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_F77='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag_F77="-z nodefs" + archive_expsym_cmds_F77="\$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. + cat >conftest.$ac_ext <<_ACEOF + program main + end +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +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 "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - lt_prog_compiler_wl= -lt_prog_compiler_pic= -lt_prog_compiler_static= -{ $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; } +fi - if test "$GCC" = yes; then - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_static='-static' +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - 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' + hardcode_libdir_flag_spec_F77='${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_F77=' ${wl}-bernotok' + allow_undefined_flag_F77=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_F77='$convenience' + archive_cmds_need_lc_F77=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds_F77="\$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_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 + archive_cmds_F77='$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_F77='-L$libdir' + hardcode_minus_L_F77=yes + # see comment about different semantics on the GNU ld section + ld_shlibs_F77=no ;; - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. + bsdi[45]*) + export_dynamic_flag_spec_F77=-rdynamic ;; - 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' + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec_F77=' ' + allow_undefined_flag_F77=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_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_From_new_cmds_F77='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds_F77='lib -OUT:$oldlib$oldobjs$old_deplibs' + fix_srcfile_path_F77='`cygpath -w "$srcfile"`' + enable_shared_with_static_runtimes_F77=yes ;; darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic='-fno-common' - ;; - - 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' - ;; + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag_F77='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + archive_cmds_need_lc_F77=no + hardcode_direct_F77=no + hardcode_automatic_F77=yes + hardcode_shlibpath_var_F77=unsupported + whole_archive_flag_spec_F77='' + link_all_deplibs_F77=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + archive_cmds_F77="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + module_cmds_F77="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + archive_expsym_cmds_F77="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_F77="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 + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' + module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs_F77=no + ;; esac + fi ;; - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. + dgux*) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_shlibpath_var_F77=no ;; - 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 + freebsd1*) + ld_shlibs_F77=no ;; - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' + # 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_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no ;; - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic=-Kconform_pic - fi + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=yes + hardcode_minus_L_F77=yes + hardcode_shlibpath_var_F77=no ;; - *) - lt_prog_compiler_pic='-fPIC' + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no ;; - 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' + + hpux9*) + if test "$GCC" = yes; then + archive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${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_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' + archive_cmds_F77='$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_F77='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_F77=: + hardcode_direct_F77=yes - 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' + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_F77=yes + export_dynamic_flag_spec_F77='${wl}-E' ;; - 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' - ;; + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$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_F77='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_F77=: - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static='-non_shared' + hardcode_direct_F77=yes + export_dynamic_flag_spec_F77='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_F77=yes + fi ;; - 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' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # 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*) - # IBM XL C 8.0/Fortran 10.1 on PPC - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-qpic' - lt_prog_compiler_static='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C 5.9 - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='-Wl,' + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_F77='$CC -shared -fPIC ${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_F77='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; - *Sun\ F*) - # 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='' + *) + archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac - ;; - esac + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_F77=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_libdir_flag_spec_ld_F77='+b $libdir' + hardcode_direct_F77=no + hardcode_shlibpath_var_F77=no + ;; + *) + hardcode_direct_F77=yes + export_dynamic_flag_spec_F77='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_F77=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_ld_F77='-rpath $libdir' + fi + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_F77=: + link_all_deplibs_F77=yes + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no ;; newsos6) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=yes + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_F77=: + hardcode_shlibpath_var_F77=no ;; - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' + export_dynamic_flag_spec_F77='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_F77='-R$libdir' + ;; + *) + archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' + ;; + esac + fi + else + ld_shlibs_F77=no + fi ;; - osf3* | osf4* | osf5*) - lt_prog_compiler_wl='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static='-non_shared' + os2*) + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_minus_L_F77=yes + allow_undefined_flag_F77=unsupported + archive_cmds_F77='$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_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; - rdos*) - lt_prog_compiler_static='-non_shared' + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag_F77=' -expect_unresolved \*' + archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + fi + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_F77=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag_F77=' -expect_unresolved \*' + archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_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_F77='-rpath $libdir' + fi + hardcode_libdir_separator_F77=: ;; solaris*) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - lt_prog_compiler_wl='-Qoption ld ';; + no_undefined_flag_F77=' -z text' + if test "$GCC" = yes; then + wlarc='${wl}' + archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + else + wlarc='' + archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds_F77='$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' + fi + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_shlibpath_var_F77=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; *) - lt_prog_compiler_wl='-Wl,';; + # 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_F77='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' + fi + ;; esac + link_all_deplibs_F77=yes ;; sunos4*) - lt_prog_compiler_wl='-Qoption ld ' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' + 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_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_direct_F77=yes + hardcode_minus_L_F77=yes + hardcode_shlibpath_var_F77=no ;; - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' + sysv4) + case $host_vendor in + sni) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds_F77='$CC -r -o $output$reload_objs' + hardcode_direct_F77=no + ;; + motorola) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var_F77=no + ;; + + sysv4.3*) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_F77=no + export_dynamic_flag_spec_F77='-Bexport' ;; sysv4*MP*) - if test -d /usr/nec ;then - lt_prog_compiler_pic='-Kconform_pic' - lt_prog_compiler_static='-Bstatic' + if test -d /usr/nec; then + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_F77=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs_F77=yes fi ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag_F77='${wl}-z,text' + archive_cmds_need_lc_F77=no + hardcode_shlibpath_var_F77=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi ;; - unicos*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_can_build_shared=no + 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_F77='${wl}-z,text' + allow_undefined_flag_F77='${wl}-z,nodefs' + archive_cmds_need_lc_F77=no + hardcode_shlibpath_var_F77=no + hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator_F77=':' + link_all_deplibs_F77=yes + export_dynamic_flag_spec_F77='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds_F77='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi ;; uts4*) - lt_prog_compiler_pic='-pic' - lt_prog_compiler_static='-Bstatic' + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_shlibpath_var_F77=no ;; *) - lt_prog_compiler_can_build_shared=no + ld_shlibs_F77=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}: result: $lt_prog_compiler_pic" >&5 -$as_echo "$lt_prog_compiler_pic" >&6; } - - - - - +{ echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5 +echo "${ECHO_T}$ld_shlibs_F77" >&6; } +test "$ld_shlibs_F77" = no && can_build_shared=no # -# Check to make sure the PIC flag actually works. +# Do we need to explicitly link libc? # -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 test "${lt_cv_prog_compiler_pic_works+set}" = set; 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:7681: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:7685: \$? = $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 "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/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 - - - - +case "x$archive_cmds_need_lc_F77" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc_F77=yes + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds_F77 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. + { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } + $rm conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext -# -# 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 test "${lt_cv_prog_compiler_static_works+set}" = set; 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 "X$_lt_linker_boilerplate" | $Xsed -e '/^$/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" + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_F77 + pic_flag=$lt_prog_compiler_pic_F77 + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_F77 + allow_undefined_flag_F77= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc_F77=no + else + archive_cmds_need_lc_F77=yes + fi + allow_undefined_flag_F77=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5 +echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6; } + ;; + esac + fi + ;; +esac -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; } +{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } +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" -if test x"$lt_cv_prog_compiler_static_works" = xyes; then - : -else - lt_prog_compiler_static= -fi +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*) + 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=`$echo "X$lib" | $Xsed -e '\''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' + ;; +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; - { $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 test "${lt_cv_prog_compiler_c_o+set}" = set; 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 +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 + ;; - 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:7786: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:7790: \$? = $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 "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/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* +cygwin* | mingw* | pw32*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no -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; } + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + 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' + 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="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + 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 + ;; + 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 + ;; + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # 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}${versuffix}$shared_ext ${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_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 + ;; - { $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 test "${lt_cv_prog_compiler_c_o+set}" = set; 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 +freebsd1*) + dynamic_linker=no + ;; - 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:7841: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:7845: \$? = $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 "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/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* +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 + ;; -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; } +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 + ;; +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' + ;; +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 + ;; -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 +# 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) + 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 + # 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;/^$/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' + ;; +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; +netbsd*) + version_type=sunos + need_lib_prefix=no + 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 + ;; - { $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; } +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 + ;; - 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= +nto-qnx*) + 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 + ;; +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 - 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 - ;; - linux* | k*bsd*-gnu) - link_all_deplibs=no - ;; + 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 + ;; - ld_shlibs=yes - if test "$with_gnu_ld" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' +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 + ;; - # 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 +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" + ;; - # 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 +rdos*) + dynamic_linker=no + ;; -*** Warning: the GNU linker, at least up to release 2.9.1, 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 modify your PATH -*** so that a non-GNU linker is found, and then restart. +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' + ;; -_LT_EOF - fi - ;; +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 + ;; - 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 +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 + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH ;; - - 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 + 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 + ;; - 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' - 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/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' +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 + ;; - 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 - ;; +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 + 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' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + 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' + ;; - 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' - ;; +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 + ;; - 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= - 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; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95*) # 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; $ECHO \"$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]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - 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; $ECHO \"$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' +*) + dynamic_linker=no + ;; +esac +{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6; } +test "$dynamic_linker" = no && can_build_shared=no - 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 +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec" +fi - case $cc_basename in - xlf*) - # 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 $compiler_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 $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - ld_shlibs=no - fi - ;; +sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec" +fi - netbsd* | netbsdelf*-gnu) - 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 $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' - fi - ;; +sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" + +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 + +{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } +hardcode_action_F77= +if test -n "$hardcode_libdir_flag_spec_F77" || \ + test -n "$runpath_var_F77" || \ + test "X$hardcode_automatic_F77" = "Xyes" ; then + + # We can hardcode non-existant directories. + if test "$hardcode_direct_F77" != 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_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no && + test "$hardcode_minus_L_F77" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action_F77=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_F77=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_F77=unsupported +fi +{ echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5 +echo "${ECHO_T}$hardcode_action_F77" >&6; } - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 +if test "$hardcode_action_F77" = relink; 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 -*** 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 $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 +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # 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 + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_F77 \ + CC_F77 \ + LD_F77 \ + lt_prog_compiler_wl_F77 \ + lt_prog_compiler_pic_F77 \ + lt_prog_compiler_static_F77 \ + lt_prog_compiler_no_builtin_flag_F77 \ + export_dynamic_flag_spec_F77 \ + thread_safe_flag_spec_F77 \ + whole_archive_flag_spec_F77 \ + enable_shared_with_static_runtimes_F77 \ + old_archive_cmds_F77 \ + old_archive_from_new_cmds_F77 \ + predep_objects_F77 \ + postdep_objects_F77 \ + predeps_F77 \ + postdeps_F77 \ + compiler_lib_search_path_F77 \ + compiler_lib_search_dirs_F77 \ + archive_cmds_F77 \ + archive_expsym_cmds_F77 \ + postinstall_cmds_F77 \ + postuninstall_cmds_F77 \ + old_archive_from_expsyms_cmds_F77 \ + allow_undefined_flag_F77 \ + no_undefined_flag_F77 \ + export_symbols_cmds_F77 \ + hardcode_libdir_flag_spec_F77 \ + hardcode_libdir_flag_spec_ld_F77 \ + hardcode_libdir_separator_F77 \ + hardcode_automatic_F77 \ + module_cmds_F77 \ + module_expsym_cmds_F77 \ + lt_cv_prog_compiler_c_o_F77 \ + fix_srcfile_path_F77 \ + exclude_expsyms_F77 \ + include_expsyms_F77; do + + case $var in + old_archive_cmds_F77 | \ + old_archive_from_new_cmds_F77 | \ + archive_cmds_F77 | \ + archive_expsym_cmds_F77 | \ + module_cmds_F77 | \ + module_expsym_cmds_F77 | \ + old_archive_from_expsyms_cmds_F77 | \ + export_symbols_cmds_F77 | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; + esac + done - 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 + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac -*** 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. +cfgfile="$ofile" -_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 - ;; + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname - sunos4*) - archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - 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 +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL - 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 - ;; +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared - 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 - 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")) && (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 +# Whether or not to build static libraries. +build_old_libs=$enable_static - # 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 +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_F77 - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77 - # 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. +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install - archive_cmds='' - hardcode_direct=yes - hardcode_direct_absolute=yes - hardcode_libdir_separator=':' - link_all_deplibs=yes - file_list_spec='${wl}-f,' +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os - 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 - link_all_deplibs=no - 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 +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os - 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. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +# An echo program that does not interpret backslashes. +echo=$lt_echo -int -main () -{ +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : +# A C compiler. +LTCC=$lt_LTCC -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -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 "$aix_libpath"; then - 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 "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS - 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 $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; 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. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +# A language-specific compiler. +CC=$lt_compiler_F77 -int -main () -{ +# Is the compiler the GNU C compiler? +with_gcc=$GCC_F77 - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : +# An ERE matcher. +EGREP=$lt_EGREP -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -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 "$aix_libpath"; then - 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 "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi +# The linker used to build libraries. +LD=$lt_LD_F77 - 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' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec='$convenience' - 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 - ;; +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM - 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 - ;; +# A symbol stripping program +STRIP=$lt_STRIP - bsdi[45]*) - export_dynamic_flag_spec=-rdynamic - ;; +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec=' ' - 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 `$ECHO "X$deplibs" | $Xsed -e '\''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' - fix_srcfile_path='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes=yes - ;; +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" - darwin* | rhapsody*) +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" +# Used on cygwin: assembler. +AS="$AS" - archive_cmds_need_lc=no - hardcode_direct=no - hardcode_automatic=yes - hardcode_shlibpath_var=unsupported - whole_archive_flag_spec='' - 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=echo - 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}" +# The name of the directory that contains temporary libtool files. +objdir=$objdir - else - ld_shlibs=no - fi +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds - ;; +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_F77 - dgux*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; +# Object file suffix (normally "o"). +objext="$ac_objext" - freebsd1*) - ld_shlibs=no - ;; +# Old archive suffix (normally "a"). +libext="$libext" - # 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 - ;; +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' - # 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 - ;; +# Executable file suffix (normally ""). +exeext="$exeext" - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_F77 +pic_mode=$pic_mode - hpux9*) - if test "$GCC" = yes; then - archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${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 +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len - # 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' - ;; +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77 - hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - archive_cmds='$CC -shared -fPIC ${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 - ;; +# Must we lock files when doing compilation? +need_locks=$lt_need_locks - hpux11*) - if test "$GCC" = yes -a "$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 -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds='$CC -shared -fPIC ${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' - ;; - *) - archive_cmds='$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 - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: +# Do we need the lib prefix for modules? +need_lib_prefix=$need_lib_prefix - 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' +# Do we need a version for libraries? +need_version=$need_version - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - ;; - esac - fi - ;; +# Whether dlopen is supported. +dlopen_support=$enable_dlopen - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${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. - 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) {} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" - else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -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 - ;; +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static - netbsd* | netbsdelf*-gnu) - 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 - ;; +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_F77 - 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 - ;; +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77 - *nto* | *qnx*) - ;; +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77 - 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 - ;; +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77 - 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' - ;; +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77 - 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" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${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" && $ECHO "X-set_version $verstring" | $Xsed` -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=: - ;; +# Library versioning type. +version_type=$version_type + +# 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 + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds_F77 +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77 + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77 + +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds_F77 +archive_expsym_cmds=$lt_archive_expsym_cmds_F77 +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds - 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} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${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" && $ECHO "X-set_version $verstring" | $Xsed` -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 "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds_F77 +module_expsym_cmds=$lt_module_expsym_cmds_F77 - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec='-rpath $libdir' - fi - archive_cmds_need_lc='no' - hardcode_libdir_separator=: - ;; +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib - solaris*) - no_undefined_flag=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' - archive_cmds='$CC -shared ${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 ${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 - ;; +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects_F77 + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects_F77 + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_F77 + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps_F77 + +# The directories searched by this compiler when creating a shared +# library +compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_F77 + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_F77 - 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 - ;; +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method - 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 - ;; +# Command to use when deplibs_check_method == file_magic. +file_magic_cmd=$lt_file_magic_cmd - sysv4.3*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - export_dynamic_flag_spec='-Bexport' - ;; +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_F77 - 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 - ;; +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_F77 - 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' +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds - 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 - ;; +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval - 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' +# 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 - 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 - ;; +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - uts4*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; +# 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 - *) - ld_shlibs=no - ;; - esac +# This is the shared library runtime path variable. +runpath_var=$runpath_var - 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 +# This is the shared library path variable. +shlibpath_var=$shlibpath_var -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 -$as_echo "$ld_shlibs" >&6; } -test "$ld_shlibs" = no && can_build_shared=no +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath -with_gnu_ld=$with_gnu_ld +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_F77 +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs +# 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_F77 +# 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_F77 + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77 + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct_F77 + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L_F77 + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_F77 + +# 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_F77 +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_F77 +# 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 +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path=$lt_fix_srcfile_path +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols_F77 +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_F77 +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_F77 +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_F77 +# ### END LIBTOOL TAG CONFIG: $tagname -# -# 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 +__EOF__ - 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; } - $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 - archive_cmds_need_lc=no - else - archive_cmds_need_lc=yes - fi - allow_undefined_flag=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc" >&5 -$as_echo "$archive_cmds_need_lc" >&6; } - ;; - esac +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" fi - ;; -esac +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" + else + tagname="" + fi + ;; + GCJ) + if test -n "$GCJ" && test "X$GCJ" != "Xno"; then +# Source file extension for Java test sources. +ac_ext=java +# Object file extension for compiled Java test sources. +objext=o +objext_GCJ=$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. +# 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 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* +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +CC=${GCJ-"gcj"} +compiler=$CC +compiler_GCJ=$CC +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +# GCJ did not exist at the time GCC didn't implicitly link libc in. +archive_cmds_need_lc_GCJ=no +old_archive_cmds_GCJ=$old_archive_cmds +lt_prog_compiler_no_builtin_flag_GCJ= +if test "$GCC" = yes; then + lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin' +{ echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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:16788: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:16792: \$? = $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 "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/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 +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; } +if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then + lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions" +else + : +fi +fi +lt_prog_compiler_wl_GCJ= +lt_prog_compiler_pic_GCJ= +lt_prog_compiler_static_GCJ= +{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } + if test "$GCC" = yes; then + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_static_GCJ='-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_GCJ='-Bstatic' + fi + ;; + amigaos*) + # 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_GCJ='-m68020 -resident32 -malways-restore-a4' + ;; + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | cygwin* | pw32* | os2*) + # 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 + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_GCJ='-fno-common' + ;; + 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_GCJ=no + enable_shared=no + ;; + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_GCJ=-Kconform_pic + fi + ;; + hpux*) + # 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_GCJ='-fPIC' + ;; + esac + ;; + *) + lt_prog_compiler_pic_GCJ='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl_GCJ='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_GCJ='-Bstatic' + else + lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp' + fi + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic_GCJ='-qnocommon' + lt_prog_compiler_wl_GCJ='-Wl,' + ;; + esac + ;; + mingw* | cygwin* | pw32* | os2*) + # 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). + ;; + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl_GCJ='-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_GCJ='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive' + ;; + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl_GCJ='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static_GCJ='-non_shared' + ;; + newsos6) + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + linux* | k*bsd*-gnu) + case $cc_basename in + icc* | ecc*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-fpic' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl_GCJ='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static_GCJ='-non_shared' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C 5.9 + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + lt_prog_compiler_wl_GCJ='-Wl,' + ;; + *Sun\ F*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + lt_prog_compiler_wl_GCJ='' + ;; + esac + ;; + esac + ;; + osf3* | osf4* | osf5*) + lt_prog_compiler_wl_GCJ='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static_GCJ='-non_shared' + ;; + rdos*) + lt_prog_compiler_static_GCJ='-non_shared' + ;; + solaris*) + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + lt_prog_compiler_wl_GCJ='-Qoption ld ';; + *) + lt_prog_compiler_wl_GCJ='-Wl,';; + esac + ;; + sunos4*) + lt_prog_compiler_wl_GCJ='-Qoption ld ' + lt_prog_compiler_pic_GCJ='-PIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic_GCJ='-Kconform_pic' + lt_prog_compiler_static_GCJ='-Bstatic' + fi + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + unicos*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_can_build_shared_GCJ=no + ;; + uts4*) + lt_prog_compiler_pic_GCJ='-pic' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + *) + lt_prog_compiler_can_build_shared_GCJ=no + ;; + esac + fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6; } +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic_GCJ"; then +{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_pic_works_GCJ+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_pic_works_GCJ=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_GCJ" + # 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:17078: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:17082: \$? = $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 "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/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_GCJ=yes + fi + fi + $rm conftest* +fi +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_GCJ" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_pic_works_GCJ" >&6; } +if test x"$lt_cv_prog_compiler_pic_works_GCJ" = xyes; then + case $lt_prog_compiler_pic_GCJ in + "" | " "*) ;; + *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;; + esac +else + lt_prog_compiler_pic_GCJ= + lt_prog_compiler_can_build_shared_GCJ=no +fi +fi +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_GCJ= + ;; + *) + lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ" + ;; +esac +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\" +{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_static_works_GCJ+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_static_works_GCJ=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 "X$_lt_linker_boilerplate" | $Xsed -e '/^$/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_GCJ=yes + fi + else + lt_cv_prog_compiler_static_works_GCJ=yes + fi + fi + $rm -r conftest* + LDFLAGS="$save_LDFLAGS" +fi +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_GCJ" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_static_works_GCJ" >&6; } +if test x"$lt_cv_prog_compiler_static_works_GCJ" = xyes; then + : +else + lt_prog_compiler_static_GCJ= +fi +{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_c_o_GCJ=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:17182: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:17186: \$? = $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 "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/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_GCJ=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 .. + rmdir conftest + $rm conftest* +fi +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6; } +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&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 + { echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6; } + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +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 +{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } + runpath_var= + allow_undefined_flag_GCJ= + enable_shared_with_static_runtimes_GCJ=no + archive_cmds_GCJ= + archive_expsym_cmds_GCJ= + old_archive_From_new_cmds_GCJ= + old_archive_from_expsyms_cmds_GCJ= + export_dynamic_flag_spec_GCJ= + whole_archive_flag_spec_GCJ= + thread_safe_flag_spec_GCJ= + hardcode_libdir_flag_spec_GCJ= + hardcode_libdir_flag_spec_ld_GCJ= + hardcode_libdir_separator_GCJ= + hardcode_direct_GCJ=no + hardcode_minus_L_GCJ=no + hardcode_shlibpath_var_GCJ=unsupported + link_all_deplibs_GCJ=unknown + hardcode_automatic_GCJ=no + module_cmds_GCJ= + module_expsym_cmds_GCJ= + always_export_symbols_GCJ=no + export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms_GCJ= + # 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_GCJ='_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= + # Just being paranoid about ensuring that cc_basename is set. + for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + case $host_os in + cygwin* | mingw* | pw32*) + # 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_GCJ=yes + if test "$with_gnu_ld" = 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_GCJ='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_GCJ='${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_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_GCJ= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [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_GCJ=no + cat <&2 +*** Warning: the GNU linker, at least up to release 2.9.1, 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 modify your PATH +*** so that a non-GNU linker is found, and then restart. +EOF + fi + ;; + amigaos*) + archive_cmds_GCJ='$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_GCJ='-L$libdir' + hardcode_minus_L_GCJ=yes + + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can't use + # them. + ld_shlibs_GCJ=no + ;; + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag_GCJ=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_GCJ='-L$libdir' + allow_undefined_flag_GCJ=unsupported + always_export_symbols_GCJ=no + enable_shared_with_static_runtimes_GCJ=yes + export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds_GCJ='$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_GCJ='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_GCJ=no + fi + ;; + interix[3-9]*) + hardcode_direct_GCJ=no + hardcode_shlibpath_var_GCJ=no + hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' + export_dynamic_flag_spec_GCJ='${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_GCJ='$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_GCJ='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* | k*bsd*-gnu) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$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' ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + whole_archive_flag_spec_GCJ='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + *) + tmp_sharedflag='-shared' ;; + esac + archive_cmds_GCJ='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + if test $supports_anon_versioning = yes; then + archive_expsym_cmds_GCJ='$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 + link_all_deplibs_GCJ=no + else + ld_shlibs_GCJ=no + fi + ;; + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $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_GCJ=no + cat <&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. +EOF + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs_GCJ=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 + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; + esac + ;; + sunos4*) + archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; + esac + if test "$ld_shlibs_GCJ" = no; then + runpath_var= + hardcode_libdir_flag_spec_GCJ= + export_dynamic_flag_spec_GCJ= + whole_archive_flag_spec_GCJ= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag_GCJ=unsupported + always_export_symbols_GCJ=yes + archive_expsym_cmds_GCJ='$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_GCJ=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_GCJ=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 + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds_GCJ='$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_GCJ='' + hardcode_direct_GCJ=yes + hardcode_libdir_separator_GCJ=':' + link_all_deplibs_GCJ=yes + 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_GCJ=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_GCJ=yes + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_libdir_separator_GCJ= + 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 + # 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_GCJ=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_GCJ='-berok' + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +int +main () +{ + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +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 "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +fi +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${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_GCJ='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag_GCJ="-z nodefs" + archive_expsym_cmds_GCJ="\$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. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +int +main () +{ + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +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 "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +fi +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + hardcode_libdir_flag_spec_GCJ='${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_GCJ=' ${wl}-bernotok' + allow_undefined_flag_GCJ=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_GCJ='$convenience' + archive_cmds_need_lc_GCJ=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds_GCJ="\$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*) + archive_cmds_GCJ='$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_GCJ='-L$libdir' + hardcode_minus_L_GCJ=yes + # see comment about different semantics on the GNU ld section + ld_shlibs_GCJ=no + ;; + bsdi[45]*) + export_dynamic_flag_spec_GCJ=-rdynamic + ;; + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec_GCJ=' ' + allow_undefined_flag_GCJ=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_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_From_new_cmds_GCJ='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds_GCJ='lib -OUT:$oldlib$oldobjs$old_deplibs' + fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`' + enable_shared_with_static_runtimes_GCJ=yes + ;; + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + archive_cmds_need_lc_GCJ=no + hardcode_direct_GCJ=no + hardcode_automatic_GCJ=yes + hardcode_shlibpath_var_GCJ=unsupported + whole_archive_flag_spec_GCJ='' + link_all_deplibs_GCJ=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + archive_cmds_GCJ="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + module_cmds_GCJ="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + archive_expsym_cmds_GCJ="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_GCJ="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 + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' + module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs_GCJ=no + ;; + esac + fi + ;; + dgux*) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_shlibpath_var_GCJ=no + ;; + freebsd1*) + ld_shlibs_GCJ=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_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=yes + hardcode_minus_L_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + hpux9*) + if test "$GCC" = yes; then + archive_cmds_GCJ='$rm $output_objdir/$soname~$CC -shared -fPIC ${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_GCJ='$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_GCJ='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + hardcode_direct_GCJ=yes + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_GCJ=yes + export_dynamic_flag_spec_GCJ='${wl}-E' + ;; + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$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_GCJ='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + hardcode_direct_GCJ=yes + export_dynamic_flag_spec_GCJ='${wl}-E' + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_GCJ=yes + fi + ;; + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_GCJ='$CC -shared -fPIC ${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_GCJ='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_GCJ='$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 + hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + case $host_cpu in + hppa*64*|ia64*) + hardcode_libdir_flag_spec_ld_GCJ='+b $libdir' + hardcode_direct_GCJ=no + hardcode_shlibpath_var_GCJ=no + ;; + *) + hardcode_direct_GCJ=yes + export_dynamic_flag_spec_GCJ='${wl}-E' + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_GCJ=yes + ;; + esac + fi + ;; + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir' + fi + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + link_all_deplibs_GCJ=yes + ;; + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + newsos6) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=yes + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + hardcode_shlibpath_var_GCJ=no + ;; + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' + export_dynamic_flag_spec_GCJ='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_GCJ='-R$libdir' + ;; + *) + archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' + ;; + esac + fi + else + ld_shlibs_GCJ=no + fi + ;; + os2*) + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_minus_L_GCJ=yes + allow_undefined_flag_GCJ=unsupported + archive_cmds_GCJ='$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_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag_GCJ=' -expect_unresolved \*' + archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + fi + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + ;; + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag_GCJ=' -expect_unresolved \*' + archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_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_GCJ='-rpath $libdir' + fi + hardcode_libdir_separator_GCJ=: + ;; + solaris*) + no_undefined_flag_GCJ=' -z text' + if test "$GCC" = yes; then + wlarc='${wl}' + archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + else + wlarc='' + archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds_GCJ='$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' + fi + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_shlibpath_var_GCJ=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_GCJ='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' + fi + ;; + esac + link_all_deplibs_GCJ=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_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_direct_GCJ=yes + hardcode_minus_L_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + sysv4) + case $host_vendor in + sni) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds_GCJ='$CC -r -o $output$reload_objs' + hardcode_direct_GCJ=no + ;; + motorola) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var_GCJ=no + ;; + sysv4.3*) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_GCJ=no + export_dynamic_flag_spec_GCJ='-Bexport' + ;; + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_GCJ=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs_GCJ=yes + fi + ;; + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag_GCJ='${wl}-z,text' + archive_cmds_need_lc_GCJ=no + hardcode_shlibpath_var_GCJ=no + runpath_var='LD_RUN_PATH' + if test "$GCC" = yes; then + archive_cmds_GCJ='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$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_GCJ='${wl}-z,text' + allow_undefined_flag_GCJ='${wl}-z,nodefs' + archive_cmds_need_lc_GCJ=no + hardcode_shlibpath_var_GCJ=no + hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator_GCJ=':' + link_all_deplibs_GCJ=yes + export_dynamic_flag_spec_GCJ='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + if test "$GCC" = yes; then + archive_cmds_GCJ='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + uts4*) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_shlibpath_var_GCJ=no + ;; + *) + ld_shlibs_GCJ=no + ;; + esac + fi +{ echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5 +echo "${ECHO_T}$ld_shlibs_GCJ" >&6; } +test "$ld_shlibs_GCJ" = no && can_build_shared=no +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc_GCJ" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc_GCJ=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 -$as_echo_n "checking dynamic linker characteristics... " >&6; } + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds_GCJ 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. + { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } + $rm conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext -if test "$GCC" = yes; then - case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then - # 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 -e 's/;/ /g'` - else - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_GCJ + pic_flag=$lt_prog_compiler_pic_GCJ + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ + allow_undefined_flag_GCJ= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc_GCJ=no + else + archive_cmds_need_lc_GCJ=yes + fi + allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5 +echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6; } + ;; + esac fi - # 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; } -}'` - sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi + ;; +esac + +{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } library_names_spec= libname_spec='lib$name' soname_spec= @@ -9194,6 +18294,7 @@ 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 @@ -9230,7 +18331,7 @@ 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 + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no @@ -9256,18 +18357,9 @@ ;; 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=`$ECHO "X$lib" | $Xsed -e '\''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 + 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=`$echo "X$lib" | $Xsed -e '\''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' ;; beos*) @@ -9290,28 +18382,25 @@ # libtool to hard-code these into programs ;; -cygwin* | mingw* | pw32* | cegcc*) +cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) + yes,cygwin* | yes,mingw* | yes,pw32*) 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'\''`~ + 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' + chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ - $RM \$dlpath' + $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in @@ -9320,20 +18409,20 @@ soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; - mingw* | cegcc*) + mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + 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"` + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) @@ -9357,13 +18446,12 @@ version_type=darwin need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' + library_names_spec='${libname}${release}${versuffix}$shared_ext ${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' ;; @@ -9456,18 +18544,18 @@ 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 - ;; - *) + 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 @@ -9535,7 +18623,7 @@ ;; # This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) +linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no @@ -9544,32 +18632,6 @@ 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 - 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 : - 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 - # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. @@ -9577,7 +18639,7 @@ # 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;/^$/d' | tr '\n' ' '` + 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;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi @@ -9606,7 +18668,7 @@ version_type=sunos need_lib_prefix=no need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + 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' @@ -9627,16 +18689,14 @@ shlibpath_overrides_runpath=yes ;; -*nto* | *qnx*) - version_type=qnx +nto-qnx*) + version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' + shlibpath_overrides_runpath=yes ;; openbsd*) @@ -9645,13 +18705,13 @@ 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 ;; + 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 + 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 @@ -9723,6 +18783,7 @@ sni) shlibpath_overrides_runpath=no need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) @@ -9741,187 +18802,98 @@ 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 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 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 + 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' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + 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' + ;; +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 +{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6; } +test "$dynamic_linker" = no && can_build_shared=no +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec" +fi +sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec" +fi +sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" +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 - { $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 +{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } +hardcode_action_GCJ= +if test -n "$hardcode_libdir_flag_spec_GCJ" || \ + test -n "$runpath_var_GCJ" || \ + test "X$hardcode_automatic_GCJ" = "Xyes" ; then - # We can hardcode non-existent directories. - if test "$hardcode_direct" != no && + # We can hardcode non-existant directories. + if test "$hardcode_direct_GCJ" != 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 + ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no && + test "$hardcode_minus_L_GCJ" != no; then # Linking always hardcodes the temporary library directory. - hardcode_action=relink + hardcode_action_GCJ=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action=immediate + hardcode_action_GCJ=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. - hardcode_action=unsupported + hardcode_action_GCJ=unsupported fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 -$as_echo "$hardcode_action" >&6; } +{ echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5 +echo "${ECHO_T}$hardcode_action_GCJ" >&6; } -if test "$hardcode_action" = relink || - test "$inherit_rpath" = yes; then +if test "$hardcode_action_GCJ" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || @@ -9931,4633 +18903,4406 @@ fi +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # 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 + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_GCJ \ + CC_GCJ \ + LD_GCJ \ + lt_prog_compiler_wl_GCJ \ + lt_prog_compiler_pic_GCJ \ + lt_prog_compiler_static_GCJ \ + lt_prog_compiler_no_builtin_flag_GCJ \ + export_dynamic_flag_spec_GCJ \ + thread_safe_flag_spec_GCJ \ + whole_archive_flag_spec_GCJ \ + enable_shared_with_static_runtimes_GCJ \ + old_archive_cmds_GCJ \ + old_archive_from_new_cmds_GCJ \ + predep_objects_GCJ \ + postdep_objects_GCJ \ + predeps_GCJ \ + postdeps_GCJ \ + compiler_lib_search_path_GCJ \ + compiler_lib_search_dirs_GCJ \ + archive_cmds_GCJ \ + archive_expsym_cmds_GCJ \ + postinstall_cmds_GCJ \ + postuninstall_cmds_GCJ \ + old_archive_from_expsyms_cmds_GCJ \ + allow_undefined_flag_GCJ \ + no_undefined_flag_GCJ \ + export_symbols_cmds_GCJ \ + hardcode_libdir_flag_spec_GCJ \ + hardcode_libdir_flag_spec_ld_GCJ \ + hardcode_libdir_separator_GCJ \ + hardcode_automatic_GCJ \ + module_cmds_GCJ \ + module_expsym_cmds_GCJ \ + lt_cv_prog_compiler_c_o_GCJ \ + fix_srcfile_path_GCJ \ + exclude_expsyms_GCJ \ + include_expsyms_GCJ; do + + case $var in + old_archive_cmds_GCJ | \ + old_archive_from_new_cmds_GCJ | \ + archive_cmds_GCJ | \ + archive_expsym_cmds_GCJ | \ + module_cmds_GCJ | \ + module_expsym_cmds_GCJ | \ + old_archive_from_expsyms_cmds_GCJ | \ + export_symbols_cmds_GCJ | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac +cfgfile="$ofile" + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname - 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= +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL - mingw* | pw32* | cegcc*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; +# Whether or not to build static libraries. +build_old_libs=$enable_static - 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 test "${ac_cv_lib_dl_dlopen+set}" = set; 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. */ +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_GCJ -/* 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" = x""yes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install -fi +# 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 - *) - ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" -if test "x$ac_cv_func_shl_load" = x""yes; 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 test "${ac_cv_lib_dld_shl_load+set}" = set; 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. */ +# An echo program that does not interpret backslashes. +echo=$lt_echo -/* 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" = x""yes; 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" = x""yes; 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 test "${ac_cv_lib_dl_dlopen+set}" = set; 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. */ +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS -/* 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" = x""yes; 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 test "${ac_cv_lib_svld_dlopen+set}" = set; 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. */ +# A C compiler. +LTCC=$lt_LTCC -/* 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" = x""yes; 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 test "${ac_cv_lib_dld_dld_link+set}" = set; 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. */ +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS -/* 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" = x""yes; then : - lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" -fi +# A language-specific compiler. +CC=$lt_compiler_GCJ + +# Is the compiler the GNU C compiler? +with_gcc=$GCC_GCJ + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD_GCJ + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM +# A symbol stripping program +STRIP=$lt_STRIP -fi +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" -fi +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" +# Used on cygwin: assembler. +AS="$AS" -fi +# The name of the directory that contains temporary libtool files. +objdir=$objdir +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds -fi +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_GCJ +# Object file suffix (normally "o"). +objext="$ac_objext" -fi +# Old archive suffix (normally "a"). +libext="$libext" - ;; - esac +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi +# Executable file suffix (normally ""). +exeext="$exeext" - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_GCJ +pic_mode=$pic_mode - save_LDFLAGS="$LDFLAGS" - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ - { $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 test "${lt_cv_dlopen_self+set}" = set; 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 10225 "configure" -#include "confdefs.h" +# Must we lock files when doing compilation? +need_locks=$lt_need_locks -#if HAVE_DLFCN_H -#include -#endif +# Do we need the lib prefix for modules? +need_lib_prefix=$need_lib_prefix -#include +# Do we need a version for libraries? +need_version=$need_version -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif +# Whether dlopen is supported. +dlopen_support=$enable_dlopen -/* 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 +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - else - puts (dlerror ()); +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_GCJ - 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* +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 -$as_echo "$lt_cv_dlopen_self" >&6; } +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ - 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 test "${lt_cv_dlopen_self_static+set}" = set; 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 10321 "configure" -#include "confdefs.h" +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ -#if HAVE_DLFCN_H -#include -#endif +# Library versioning type. +version_type=$version_type -#include +# Format of library name prefix. +libname_spec=$lt_libname_spec -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif +# 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 -/* 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 +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds_GCJ +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - else - puts (dlerror ()); +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ - 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* +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds_GCJ +archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 -$as_echo "$lt_cv_dlopen_self_static" >&6; } - fi +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds_GCJ +module_expsym_cmds=$lt_module_expsym_cmds_GCJ - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects_GCJ + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects_GCJ + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_GCJ + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps_GCJ + +# The directories searched by this compiler when creating a shared +# library +compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_GCJ + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ - 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 +# 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 + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_GCJ + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_GCJ + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# 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 + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_GCJ +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs +# 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_GCJ +# 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_GCJ + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct_GCJ + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L_GCJ + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ + +# 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_GCJ +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_GCJ +# 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 +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path=$lt_fix_srcfile_path +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols_GCJ +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_GCJ +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_GCJ +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_GCJ +# ### END LIBTOOL TAG CONFIG: $tagname +__EOF__ -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 + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + 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 +CC="$lt_save_CC" + else + tagname="" + fi + ;; + RC) +# Source file extension for RC test sources. +ac_ext=rc +# Object file extension for compiled RC test sources. +objext=o +objext_RC=$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. - # 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; } +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} - { $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 +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - # 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 - ;; +# Allow CC to be a program name with arguments. +compiler=$CC - 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; } +# 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* +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +CC=${RC-"windres"} +compiler=$CC +compiler_RC=$CC +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` -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 +lt_cv_prog_compiler_c_o_RC=yes -CC="$lt_save_CC" +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # 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 + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_RC \ + CC_RC \ + LD_RC \ + lt_prog_compiler_wl_RC \ + lt_prog_compiler_pic_RC \ + lt_prog_compiler_static_RC \ + lt_prog_compiler_no_builtin_flag_RC \ + export_dynamic_flag_spec_RC \ + thread_safe_flag_spec_RC \ + whole_archive_flag_spec_RC \ + enable_shared_with_static_runtimes_RC \ + old_archive_cmds_RC \ + old_archive_from_new_cmds_RC \ + predep_objects_RC \ + postdep_objects_RC \ + predeps_RC \ + postdeps_RC \ + compiler_lib_search_path_RC \ + compiler_lib_search_dirs_RC \ + archive_cmds_RC \ + archive_expsym_cmds_RC \ + postinstall_cmds_RC \ + postuninstall_cmds_RC \ + old_archive_from_expsyms_cmds_RC \ + allow_undefined_flag_RC \ + no_undefined_flag_RC \ + export_symbols_cmds_RC \ + hardcode_libdir_flag_spec_RC \ + hardcode_libdir_flag_spec_ld_RC \ + hardcode_libdir_separator_RC \ + hardcode_automatic_RC \ + module_cmds_RC \ + module_expsym_cmds_RC \ + lt_cv_prog_compiler_c_o_RC \ + fix_srcfile_path_RC \ + exclude_expsyms_RC \ + include_expsyms_RC; do + + case $var in + old_archive_cmds_RC | \ + old_archive_from_new_cmds_RC | \ + archive_cmds_RC | \ + archive_expsym_cmds_RC | \ + module_cmds_RC | \ + module_expsym_cmds_RC | \ + old_archive_from_expsyms_cmds_RC | \ + export_symbols_cmds_RC | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac +cfgfile="$ofile" + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared +# Whether or not to build static libraries. +build_old_libs=$enable_static +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_RC +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install +# 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 - ac_config_commands="$ac_config_commands libtool" +# An echo program that does not interpret backslashes. +echo=$lt_echo +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS +# A C compiler. +LTCC=$lt_LTCC +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS -# Only expand once: +# A language-specific compiler. +CC=$lt_compiler_RC +# Is the compiler the GNU C compiler? +with_gcc=$GCC_RC -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 test "${ac_cv_prog_CC+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 +# An ERE matcher. +EGREP=$lt_EGREP -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 +# The linker used to build libraries. +LD=$lt_LD_RC +# Whether we need hard or soft links. +LN_S=$lt_LN_S -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 test "${ac_cv_prog_ac_ct_CC+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 +# A BSD-compatible nm program. +NM=$lt_NM -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 +# A symbol stripping program +STRIP=$lt_STRIP - 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 +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD -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 test "${ac_cv_prog_CC+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" -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 +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" +# Used on cygwin: assembler. +AS="$AS" - 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 test "${ac_cv_prog_CC+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_RC -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 +# Object file suffix (normally "o"). +objext="$ac_objext" +# Old archive suffix (normally "a"). +libext="$libext" -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 test "${ac_cv_prog_CC+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' -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 +# Executable file suffix (normally ""). +exeext="$exeext" +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_RC +pic_mode=$pic_mode - 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 test "${ac_cv_prog_ac_ct_CC+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len -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 +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC +# Must we lock files when doing compilation? +need_locks=$lt_need_locks - test -n "$ac_ct_CC" && break -done +# Do we need the lib prefix for modules? +need_lib_prefix=$need_lib_prefix - 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 +# Do we need a version for libraries? +need_version=$need_version -fi +# Whether dlopen is supported. +dlopen_support=$enable_dlopen +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self -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; } +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static -# 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 +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_RC -{ $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 test "${ac_cv_c_compiler_gnu+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC -int -main () -{ -#ifndef __GNUC__ - choke me -#endif +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC - ; - 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 +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC -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 test "${ac_cv_prog_cc_g+set}" = set; 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. */ +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC -int -main () -{ +# Library versioning type. +version_type=$version_type - ; - 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. */ +# Format of library name prefix. +libname_spec=$lt_libname_spec -int -main () -{ +# 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 - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec -else - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds_RC +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds -int -main () -{ +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC - ; - 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 test "${ac_cv_prog_cc_c89+set}" = set; 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 -#include -#include -/* 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; -} +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC + +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds_RC +archive_expsym_cmds=$lt_archive_expsym_cmds_RC +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds_RC +module_expsym_cmds=$lt_module_expsym_cmds_RC + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects_RC + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects_RC + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_RC + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps_RC + +# The directories searched by this compiler when creating a shared +# library +compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_RC + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_RC + +# 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 -/* 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]; +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_RC -/* 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]; +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_RC -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 +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds -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 : +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval -fi +# 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 -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 +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl -depcc="$CC" am_compiler_list= +# 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 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if test "${am_cv_CC_dependencies_compiler_type+set}" = set; 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'. - 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 +# This is the shared library runtime path variable. +runpath_var=$runpath_var - 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 +# This is the shared library path variable. +shlibpath_var=$shlibpath_var - 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 +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath - # 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 - ;; - 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 +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_RC - cd .. - rm -rf conftest.dir -else - am_cv_CC_dependencies_compiler_type=none -fi +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs -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 +# 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_RC - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then - am__fastdepCC_TRUE= - am__fastdepCC_FALSE='#' -else - am__fastdepCC_TRUE='#' - am__fastdepCC_FALSE= -fi +# If 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_RC + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct_RC + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L_RC + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_RC + +# 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_RC +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_RC -{ $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 test "${ac_cv_header_stdc+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include +# Compile-time system search path for libraries +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec -int -main () -{ +# Run-time system search path for libraries +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec - ; - 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 +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path=$lt_fix_srcfile_path -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 +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols_RC -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_RC -else - ac_cv_header_stdc=no -fi -rm -f conftest* +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds -fi +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_RC -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 +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_RC + +# ### END LIBTOOL TAG CONFIG: $tagname + +__EOF__ -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : else - ac_cv_header_stdc=no + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi 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 +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 -#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 : +CC="$lt_save_CC" + + ;; + + *) + { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5 +echo "$as_me: error: Unsupported tag name: $tagname" >&2;} + { (exit 1); exit 1; }; } + ;; + esac + + # Append the new tag name to the list of available tags. + if test -n "$tagname" ; then + available_tags="$available_tags $tagname" + fi + fi + done + IFS="$lt_save_ifs" -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 + # Now substitute the updated list of available tags. + if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then + mv "${ofile}T" "$ofile" + chmod +x "$ofile" + else + rm -f "${ofile}T" + { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5 +echo "$as_me: error: unable to update list of available tagged configurations." >&2;} + { (exit 1); exit 1; }; } + fi 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 +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' + +# Prevent multiple expansion + + + + + + + + + + + -# Check whether --enable-largefile was given. -if test "${enable_largefile+set}" = set; then : - enableval=$enable_largefile; -fi -if test "$enable_largefile" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 -$as_echo_n "checking for special C compiler options needed for large files... " >&6; } -if test "${ac_cv_sys_largefile_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 + + + + + + +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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_sys_largefile_CC=no - if test "$GCC" != yes; then - ac_save_CC=$CC - while :; do - # IRIX 6.2 and later do not support large files by default, - # so use the C compiler's -n32 option if that helps. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main () -{ + 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS - ; - return 0; -} -_ACEOF - if ac_fn_c_try_compile "$LINENO"; then : - break fi -rm -f core conftest.err conftest.$ac_objext - CC="$CC -n32" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_sys_largefile_CC=' -n32'; break fi -rm -f core conftest.err conftest.$ac_objext - break - done - CC=$ac_save_CC - rm -f conftest.$ac_ext - fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 -$as_echo "$ac_cv_sys_largefile_CC" >&6; } - if test "$ac_cv_sys_largefile_CC" != no; then - CC=$CC$ac_cv_sys_largefile_CC - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 -$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } -if test "${ac_cv_sys_file_offset_bits+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main () -{ - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_sys_file_offset_bits=no; break fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#define _FILE_OFFSET_BITS 64 -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main () -{ +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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_sys_file_offset_bits=64; break fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cv_sys_file_offset_bits=unknown - break -done fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 -$as_echo "$ac_cv_sys_file_offset_bits" >&6; } -case $ac_cv_sys_file_offset_bits in #( - no | unknown) ;; - *) -cat >>confdefs.h <<_ACEOF -#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits -_ACEOF -;; -esac -rm -rf conftest* - if test $ac_cv_sys_file_offset_bits = unknown; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 -$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } -if test "${ac_cv_sys_large_files+set}" = set; then : - $as_echo_n "(cached) " >&6 +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } else - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_sys_large_files=no; break + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#define _LARGE_FILES 1 -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main () -{ - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_sys_large_files=1; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cv_sys_large_files=unknown - break -done -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 -$as_echo "$ac_cv_sys_large_files" >&6; } -case $ac_cv_sys_large_files in #( - no | unknown) ;; - *) -cat >>confdefs.h <<_ACEOF -#define _LARGE_FILES $ac_cv_sys_large_files -_ACEOF -;; + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; esac -rm -rf conftest* + CC=$ac_ct_CC fi +else + CC="$ac_cv_prog_CC" fi - - - -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 test "${ac_cv_path_PKG_CONFIG+set}" = set; then : - $as_echo_n "(cached) " >&6 +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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 + 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 + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 + ac_cv_prog_CC="${ac_tool_prefix}cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - 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; } +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + 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 test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then : - $as_echo_n "(cached) " >&6 +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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 + 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 + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - 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 +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 -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 - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X11" >&5 -$as_echo_n "checking for X11... " >&6; } - -if test -n "$PKG_CONFIG"; then - if test -n "$X11_CFLAGS"; then - pkg_cv_X11_CFLAGS="$X11_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11\""; } >&5 - ($PKG_CONFIG --exists --print-errors "x11") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_X11_CFLAGS=`$PKG_CONFIG --cflags "x11" 2>/dev/null` -else - pkg_failed=yes -fi - fi -else - pkg_failed=untried -fi -if test -n "$PKG_CONFIG"; then - if test -n "$X11_LIBS"; then - pkg_cv_X11_LIBS="$X11_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11\""; } >&5 - ($PKG_CONFIG --exists --print-errors "x11") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_X11_LIBS=`$PKG_CONFIG --libs "x11" 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 - X11_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11"` - else - X11_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11"` - fi - # Put the nasty error message in config.log where it belongs - echo "$X11_PKG_ERRORS" >&5 - - as_fn_error "Package requirements (x11) were not met: - -$X11_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables X11_CFLAGS -and X11_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" "$LINENO" 5 -elif test $pkg_failed = untried; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables X11_CFLAGS -and X11_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details." "$LINENO" 5; } +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - X11_CFLAGS=$pkg_cv_X11_CFLAGS - X11_LIBS=$pkg_cv_X11_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - : + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XEXT" >&5 -$as_echo_n "checking for XEXT... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$XEXT_CFLAGS"; then - pkg_cv_XEXT_CFLAGS="$XEXT_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xext\""; } >&5 - ($PKG_CONFIG --exists --print-errors "xext") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_XEXT_CFLAGS=`$PKG_CONFIG --cflags "xext" 2>/dev/null` -else - pkg_failed=yes 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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - pkg_failed=untried -fi -if test -n "$PKG_CONFIG"; then - if test -n "$XEXT_LIBS"; then - pkg_cv_XEXT_LIBS="$XEXT_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xext\""; } >&5 - ($PKG_CONFIG --exists --print-errors "xext") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_XEXT_LIBS=`$PKG_CONFIG --libs "xext" 2>/dev/null` + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. else - pkg_failed=yes +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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + 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 +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - _pkg_short_errors_supported=no + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi - if test $_pkg_short_errors_supported = yes; then - XEXT_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xext"` - else - XEXT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xext"` - fi - # Put the nasty error message in config.log where it belongs - echo "$XEXT_PKG_ERRORS" >&5 - - as_fn_error "Package requirements (xext) were not met: - -$XEXT_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables XEXT_CFLAGS -and XEXT_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" "$LINENO" 5 -elif test $pkg_failed = untried; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. -Alternatively, you may set the environment variables XEXT_CFLAGS -and XEXT_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -To get pkg-config, see . -See \`config.log' for more details." "$LINENO" 5; } -else - XEXT_CFLAGS=$pkg_cv_XEXT_CFLAGS - XEXT_LIBS=$pkg_cv_XEXT_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - : + test -n "$CC" && break + done fi - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XFIXES" >&5 -$as_echo_n "checking for XFIXES... " >&6; } - -if test -n "$PKG_CONFIG"; then - if test -n "$XFIXES_CFLAGS"; then - pkg_cv_XFIXES_CFLAGS="$XFIXES_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xfixes\""; } >&5 - ($PKG_CONFIG --exists --print-errors "xfixes") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_XFIXES_CFLAGS=`$PKG_CONFIG --cflags "xfixes" 2>/dev/null` +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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - pkg_failed=yes -fi - fi + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else - pkg_failed=untried +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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + fi -if test -n "$PKG_CONFIG"; then - if test -n "$XFIXES_LIBS"; then - pkg_cv_XFIXES_LIBS="$XFIXES_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xfixes\""; } >&5 - ($PKG_CONFIG --exists --print-errors "xfixes") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_XFIXES_LIBS=`$PKG_CONFIG --libs "xfixes" 2>/dev/null` -else - pkg_failed=yes fi - fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } else - pkg_failed=untried + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + test -n "$ac_ct_CC" && break +done -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 + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi fi - if test $_pkg_short_errors_supported = yes; then - XFIXES_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xfixes"` - else - XFIXES_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xfixes"` - fi - # Put the nasty error message in config.log where it belongs - echo "$XFIXES_PKG_ERRORS" >&5 - - as_fn_error "Package requirements (xfixes) were not met: -$XFIXES_PKG_ERRORS +fi -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. -Alternatively, you may set the environment variables XFIXES_CFLAGS -and XFIXES_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" "$LINENO" 5 -elif test $pkg_failed = untried; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } -Alternatively, you may set the environment variables XFIXES_CFLAGS -and XFIXES_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. +# Provide some information about the compiler. +echo "$as_me:$LINENO: checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } -To get pkg-config, see . -See \`config.log' for more details." "$LINENO" 5; } +{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } +if test "${ac_cv_c_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - XFIXES_CFLAGS=$pkg_cv_XFIXES_CFLAGS - XFIXES_LIBS=$pkg_cv_XFIXES_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - : -fi + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DRM" >&5 -$as_echo_n "checking for DRM... " >&6; } +int +main () +{ +#ifndef __GNUC__ + choke me +#endif -if test -n "$PKG_CONFIG"; then - if test -n "$DRM_CFLAGS"; then - pkg_cv_DRM_CFLAGS="$DRM_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdrm\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libdrm") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_DRM_CFLAGS=`$PKG_CONFIG --cflags "libdrm" 2>/dev/null` -else - pkg_failed=yes -fi - fi -else - pkg_failed=untried -fi -if test -n "$PKG_CONFIG"; then - if test -n "$DRM_LIBS"; then - pkg_cv_DRM_LIBS="$DRM_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdrm\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libdrm") 2>&5 + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_DRM_LIBS=`$PKG_CONFIG --libs "libdrm" 2>/dev/null` -else - pkg_failed=yes -fi - fi + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes else - pkg_failed=untried -fi - + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_compiler_gnu=no +fi -if test $pkg_failed = yes; then +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu -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 - DRM_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libdrm"` - else - DRM_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libdrm"` - fi - # Put the nasty error message in config.log where it belongs - echo "$DRM_PKG_ERRORS" >&5 - - as_fn_error "Package requirements (libdrm) were not met: +{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } +GCC=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -$DRM_PKG_ERRORS +int +main () +{ -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -Alternatively, you may set the environment variables DRM_CFLAGS -and DRM_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" "$LINENO" 5 -elif test $pkg_failed = untried; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. + CFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -Alternatively, you may set the environment variables DRM_CFLAGS -and DRM_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. +int +main () +{ -To get pkg-config, see . -See \`config.log' for more details." "$LINENO" 5; } + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : else - DRM_CFLAGS=$pkg_cv_DRM_CFLAGS - DRM_LIBS=$pkg_cv_DRM_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - : -fi + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GEN4ASM" >&5 -$as_echo_n "checking for GEN4ASM... " >&6; } +int +main () +{ -if test -n "$PKG_CONFIG"; then - if test -n "$GEN4ASM_CFLAGS"; then - pkg_cv_GEN4ASM_CFLAGS="$GEN4ASM_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"intel-gen4asm >= 1.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "intel-gen4asm >= 1.0") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_GEN4ASM_CFLAGS=`$PKG_CONFIG --cflags "intel-gen4asm >= 1.0" 2>/dev/null` -else - pkg_failed=yes -fi - fi -else - pkg_failed=untried -fi -if test -n "$PKG_CONFIG"; then - if test -n "$GEN4ASM_LIBS"; then - pkg_cv_GEN4ASM_LIBS="$GEN4ASM_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"intel-gen4asm >= 1.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "intel-gen4asm >= 1.0") 2>&5 + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_GEN4ASM_LIBS=`$PKG_CONFIG --libs "intel-gen4asm >= 1.0" 2>/dev/null` -else - pkg_failed=yes -fi - fi + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes else - pkg_failed=untried -fi + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +fi -if test $pkg_failed = yes; then +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - if test $_pkg_short_errors_supported = yes; then - GEN4ASM_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "intel-gen4asm >= 1.0"` - else - GEN4ASM_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "intel-gen4asm >= 1.0"` - fi - # Put the nasty error message in config.log where it belongs - echo "$GEN4ASM_PKG_ERRORS" >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - gen4asm=no -elif test $pkg_failed = untried; then - gen4asm=no -else - GEN4ASM_CFLAGS=$pkg_cv_GEN4ASM_CFLAGS - GEN4ASM_LIBS=$pkg_cv_GEN4ASM_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - gen4asm=yes +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag fi - if test x$gen4asm = xyes; then - HAVE_GEN4ASM_TRUE= - HAVE_GEN4ASM_FALSE='#' +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$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 - HAVE_GEN4ASM_TRUE='#' - HAVE_GEN4ASM_FALSE= + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi fi +{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include +/* 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]; -# Check for libdrm >= 2.4 (needed for i965_drv_video.so) -if test x$enable_i965_driver = xyes && ! $PKG_CONFIG --atleast-version=2.4 libdrm; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libdrm < 2.4 found, disabling build of i965 video driver" >&5 -$as_echo "$as_me: WARNING: libdrm < 2.4 found, disabling build of i965 video driver" >&2;} - enable_i965_driver=no -fi - if test x$enable_i965_driver = xyes; then - BUILD_I965_DRIVER_TRUE= - BUILD_I965_DRIVER_FALSE='#' -else - BUILD_I965_DRIVER_TRUE='#' - BUILD_I965_DRIVER_FALSE= -fi +/* 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" + 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_c89=$ac_arg +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __attribute__((visibility())) is supported" >&5 -$as_echo_n "checking whether __attribute__((visibility())) is supported... " >&6; } -if test "${libva_cv_visibility_attribute+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat > conftest.c </dev/null 2>&1; then - if grep '\.hidden.*foo' conftest.s >/dev/null; then - if grep '\.protected.*bar' conftest.s >/dev/null; then - libva_cv_visibility_attribute=yes - fi - fi - fi - rm -f conftest.cs fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libva_cv_visibility_attribute" >&5 -$as_echo "$libva_cv_visibility_attribute" >&6; } -ATTRIBUTE_HIDDEN="" -if test $libva_cv_visibility_attribute = yes; then - ATTRIBUTE_HIDDEN="__attribute__((visibility(\"hidden\")))" + +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) + { echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6; } ;; + xno) + { echo "$as_me:$LINENO: result: unsupported" >&5 +echo "${ECHO_T}unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; +esac -cat >>confdefs.h <<_ACEOF -#define ATTRIBUTE_HIDDEN $ATTRIBUTE_HIDDEN -_ACEOF +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 -# Check for OpenGL (X11) -USE_GLX="no" -GL_DEPS_CFLAGS="" -GL_DEPS_LIBS="" +depcc="$CC" am_compiler_list= -if test x$enable_glx = xyes; then - for ac_header in GL/gl.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "GL/gl.h" "ac_cv_header_GL_gl_h" "$ac_includes_default" -if test "x$ac_cv_header_GL_gl_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GL_GL_H 1 -_ACEOF +{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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'. + 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 -fi + 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 + 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 -done + case $depmode in + 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 + ;; + none) break ;; + esac + # 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. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} 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 sub/conftest.${OBJEXT-o} 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 - for ac_header in GL/glx.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "GL/glx.h" "ac_cv_header_GL_glx_h" "$ac_includes_default" -if test "x$ac_cv_header_GL_glx_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GL_GLX_H 1 -_ACEOF + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +echo "${ECHO_T}$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 -done - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for glXCreateContext in -lGL" >&5 -$as_echo_n "checking for glXCreateContext in -lGL... " >&6; } -if test "${ac_cv_lib_GL_glXCreateContext+set}" = set; then : - $as_echo_n "(cached) " >&6 + +{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } +if test "${ac_cv_header_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lGL $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +#include +#include +#include +#include -/* 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 glXCreateContext (); int main () { -return glXCreateContext (); + ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_GL_glXCreateContext=yes +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_header_stdc=yes else - ac_cv_lib_GL_glXCreateContext=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_GL_glXCreateContext" >&5 -$as_echo "$ac_cv_lib_GL_glXCreateContext" >&6; } -if test "x$ac_cv_lib_GL_glXCreateContext" = x""yes; then : - - USE_GLX="yes" - GL_DEPS_LIBS="-lX11 -lGL" - -fi - -fi - + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - if test "$USE_GLX" = "yes"; then - USE_GLX_TRUE= - USE_GLX_FALSE='#' -else - USE_GLX_TRUE='#' - USE_GLX_FALSE= + ac_cv_header_stdc=no fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -# We only need the headers, we don't link against the DRM libraries -LIBVA_CFLAGS="$DRM_CFLAGS" - - - -pkgconfigdir=${libdir}/pkgconfig - - -LIBVA_DISPLAY=x11 -libvacorelib=libva.la -libvabackendlib=libva-$LIBVA_DISPLAY.la - - - -ac_config_files="$ac_config_files Makefile src/Makefile src/va_version.h src/x11/Makefile src/glx/Makefile dummy_drv_video/Makefile i965_drv_video/Makefile i965_drv_video/shaders/Makefile i965_drv_video/shaders/mpeg2/Makefile i965_drv_video/shaders/mpeg2/vld/Makefile i965_drv_video/shaders/render/Makefile test/Makefile libva.pc libva-x11.pc libva-glx.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. - +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include -# 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 - test "x$cache_file" != "x/dev/null" && - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} - cat confcache >$cache_file - 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}' - -DEFS=-DHAVE_CONFIG_H - -ac_libobjs= -ac_ltlibobjs= -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 -n "$EXEEXT"; then - am__EXEEXT_TRUE= - am__EXEEXT_FALSE='#' +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then + : else - am__EXEEXT_TRUE='#' - am__EXEEXT_FALSE= + ac_cv_header_stdc=no fi +rm -f conftest* -if test -z "${BUILD_DUMMY_DRIVER_TRUE}" && test -z "${BUILD_DUMMY_DRIVER_FALSE}"; then - as_fn_error "conditional \"BUILD_DUMMY_DRIVER\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - as_fn_error "conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - as_fn_error "conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - as_fn_error "conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${HAVE_GEN4ASM_TRUE}" && test -z "${HAVE_GEN4ASM_FALSE}"; then - as_fn_error "conditional \"HAVE_GEN4ASM\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_I965_DRIVER_TRUE}" && test -z "${BUILD_I965_DRIVER_FALSE}"; then - as_fn_error "conditional \"BUILD_I965_DRIVER\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${USE_GLX_TRUE}" && test -z "${USE_GLX_FALSE}"; then - as_fn_error "conditional \"USE_GLX\" 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. ## -## -------------------- ## +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include -# 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 +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then + : 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' + ac_cv_header_stdc=no fi +rm -f conftest* -# 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 +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 >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 -# 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. -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 +#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 +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - ;; -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 +( exit $ac_status ) +ac_cv_header_stdc=no fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 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 +fi +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_ACEOF -# as_fn_error 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=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 - fi - $as_echo "$as_me: error: $1" >&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 +fi -# 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 +# Check whether --enable-largefile was given. +if test "${enable_largefile+set}" = set; then + enableval=$enable_largefile; +fi +if test "$enable_largefile" != no; then -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr + { echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5 +echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6; } +if test "${ac_cv_sys_largefile_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - as_expr=false -fi + ac_cv_sys_largefile_CC=no + if test "$GCC" != yes; then + ac_save_CC=$CC + while :; do + # IRIX 6.2 and later do not support large files by default, + # so use the C compiler's -n32 option if that helps. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename + ; + return 0; +} +_ACEOF + 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + break else - as_basename=false -fi + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + -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'` +rm -f core conftest.err conftest.$ac_objext + CC="$CC -n32" + 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_sys_largefile_CC=' -n32'; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -# 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 +fi -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 +rm -f core conftest.err conftest.$ac_objext + break + done + CC=$ac_save_CC + rm -f conftest.$ac_ext + fi 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 -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -p' +{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5 +echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6; } + if test "$ac_cv_sys_largefile_CC" != no; then + CC=$CC$ac_cv_sys_largefile_CC fi -else - as_ln_s='cp -p' -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 () + { echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5 +echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6; } +if test "${ac_cv_sys_file_offset_bits+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () { - 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" + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_sys_file_offset_bits=no; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -} # 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 -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#define _FILE_OFFSET_BITS 64 +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ -# 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'" + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_sys_file_offset_bits=64; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" +fi -exec 6>&1 -## ----------------------------------- ## -## Main body of $CONFIG_STATUS script. ## -## ----------------------------------- ## -_ASEOF -test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_file_offset_bits=unknown + break +done +fi +{ echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5 +echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6; } +case $ac_cv_sys_file_offset_bits in #( + no | unknown) ;; + *) +cat >>confdefs.h <<_ACEOF +#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits +_ACEOF +;; +esac +rm -f conftest* + if test $ac_cv_sys_file_offset_bits = unknown; then + { echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5 +echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6; } +if test "${ac_cv_sys_large_files+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ -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 libva $as_me 0.31.0, which was -generated by GNU Autoconf 2.65. Invocation command line was + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_sys_large_files=no; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - 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` -" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#define _LARGE_FILES 1 +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ -case $ac_config_files in *" -"*) set x $ac_config_files; shift; ac_config_files=$*;; + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_sys_large_files=1; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi -case $ac_config_headers in *" -"*) set x $ac_config_headers; shift; ac_config_headers=$*;; +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_large_files=unknown + break +done +fi +{ echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5 +echo "${ECHO_T}$ac_cv_sys_large_files" >&6; } +case $ac_cv_sys_large_files in #( + no | unknown) ;; + *) +cat >>confdefs.h <<_ACEOF +#define _LARGE_FILES $ac_cv_sys_large_files +_ACEOF +;; esac +rm -f conftest* + fi +fi -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# Files that config.status was made for. -config_files="$ac_config_files" -config_headers="$ac_config_headers" -config_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. +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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS -Usage: $0 [OPTION]... [TAG]... + ;; +esac +fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG +if test -n "$PKG_CONFIG"; then + { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +echo "${ECHO_T}$PKG_CONFIG" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - --config print configuration, then exit - -q, --quiet, --silent - do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE -Configuration files: -$config_files +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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS -Configuration headers: -$config_headers + ;; +esac +fi +ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG +if test -n "$ac_pt_PKG_CONFIG"; then + { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5 +echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi -Configuration commands: -$config_commands + if test "x$ac_pt_PKG_CONFIG" = x; then + PKG_CONFIG="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + PKG_CONFIG=$ac_pt_PKG_CONFIG + fi +else + PKG_CONFIG="$ac_cv_path_PKG_CONFIG" +fi -Report bugs to ." +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=0.9.0 + { echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5 +echo $ECHO_N "checking pkg-config is at least version $_pkg_min_version... $ECHO_C" >&6; } + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + PKG_CONFIG="" + fi -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" -ac_cs_version="\\ -libva config.status 0.31.0 -configured by $0, generated by GNU Autoconf 2.65, - with options \\"\$ac_cs_config\\" +fi -Copyright (C) 2009 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." +pkg_failed=no +{ echo "$as_me:$LINENO: checking for X11" >&5 +echo $ECHO_N "checking for X11... $ECHO_C" >&6; } -ac_pwd='$ac_pwd' -srcdir='$srcdir' -INSTALL='$INSTALL' -MKDIR_P='$MKDIR_P' -AWK='$AWK' -test -n "\$AWK" || AWK=awk -_ACEOF +if test -n "$PKG_CONFIG"; then + if test -n "$X11_CFLAGS"; then + pkg_cv_X11_CFLAGS="$X11_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11\"") >&5 + ($PKG_CONFIG --exists --print-errors "x11") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_X11_CFLAGS=`$PKG_CONFIG --cflags "x11" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$X11_LIBS"; then + pkg_cv_X11_LIBS="$X11_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11\"") >&5 + ($PKG_CONFIG --exists --print-errors "x11") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_X11_LIBS=`$PKG_CONFIG --libs "x11" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi -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=$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"` ;; - esac - as_fn_append CONFIG_FILES " '$ac_optarg'" - ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append CONFIG_HEADERS " '$ac_optarg'" - ac_need_defaults=false;; - --he | --h) - # Conflict between --help and --header - as_fn_error "ambiguous option: \`$1' -Try \`$0 --help' for more information.";; - --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." ;; +if test $pkg_failed = yes; then - *) as_fn_append ac_config_targets " $1" - ac_need_defaults=false ;; +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 + X11_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11"` + else + X11_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11"` + fi + # Put the nasty error message in config.log where it belongs + echo "$X11_PKG_ERRORS" >&5 - esac - shift -done + { { echo "$as_me:$LINENO: error: Package requirements (x11) were not met: -ac_configure_extra_args= +$X11_PKG_ERRORS -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. -_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 +Alternatively, you may set the environment variables X11_CFLAGS +and X11_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +echo "$as_me: error: Package requirements (x11) were not met: -_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 +$X11_PKG_ERRORS -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# -# INIT-COMMANDS -# -AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. +Alternatively, you may set the environment variables X11_CFLAGS +and X11_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} + { (exit 1); exit 1; }; } +elif test $pkg_failed = untried; then + { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. -# 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 +Alternatively, you may set the environment variables X11_CFLAGS +and X11_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. -sed_quote_subst='$sed_quote_subst' -double_quote_subst='$double_quote_subst' -delay_variable_subst='$delay_variable_subst' -enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`' -macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`' -macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`' -enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`' -pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`' -enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`' -host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`' -host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`' -host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`' -build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`' -build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`' -build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`' -SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`' -Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`' -GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`' -EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`' -FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`' -LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`' -NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`' -LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`' -max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`' -ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`' -exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`' -lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`' -lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`' -lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`' -reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`' -reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`' -OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`' -deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`' -file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`' -AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`' -AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`' -STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`' -RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`' -old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' -CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`' -CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`' -compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`' -GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' -objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`' -SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`' -ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`' -MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`' -need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`' -DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`' -NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`' -LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`' -OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`' -OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`' -libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`' -shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`' -extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`' -export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' -whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' -compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' -archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' -module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`' -module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' -with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`' -allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' -no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`' -inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`' -link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`' -fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`' -always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`' -export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`' -exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`' -include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`' -prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`' -file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`' -variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`' -need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' -need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`' -version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`' -runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`' -shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' -shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`' -libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`' -library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`' -soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`' -postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`' -finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`' -sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`' -sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`' -enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`' -enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`' -enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`' -old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`' -striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`' - -LTCC='$LTCC' -LTCFLAGS='$LTCFLAGS' -compiler='$compiler_DEFAULT' - -# Quote evaled strings. -for var in SED \ -GREP \ -EGREP \ -FGREP \ -LD \ -NM \ -LN_S \ -lt_SP2NL \ -lt_NL2SP \ -reload_flag \ -OBJDUMP \ -deplibs_check_method \ -file_magic_cmd \ -AR \ -AR_FLAGS \ -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 \ -SHELL \ -ECHO \ -lt_prog_compiler_no_builtin_flag \ -lt_prog_compiler_wl \ -lt_prog_compiler_pic \ -lt_prog_compiler_static \ -lt_cv_prog_compiler_c_o \ -need_locks \ -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 \ -fix_srcfile_path \ -exclude_expsyms \ -include_expsyms \ -file_list_spec \ -variables_saved_for_relink \ -libname_spec \ -library_names_spec \ -soname_spec \ -finish_eval \ -old_striplib \ -striplib; do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in - *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done +To get pkg-config, see . +See \`config.log' for more details." >&5 +echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. -# 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 \ -postinstall_cmds \ -postuninstall_cmds \ -finish_cmds \ -sys_lib_search_path_spec \ -sys_lib_dlsearch_path_spec; do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in - *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done +Alternatively, you may set the environment variables X11_CFLAGS +and X11_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. -# Fix-up fallback echo if it was mangled by the above quoting rules. -case \$lt_ECHO in -*'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\` - ;; -esac +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + X11_CFLAGS=$pkg_cv_X11_CFLAGS + X11_LIBS=$pkg_cv_X11_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + : +fi -ac_aux_dir='$ac_aux_dir' -xsi_shell='$xsi_shell' -lt_shell_append='$lt_shell_append' +pkg_failed=no +{ echo "$as_me:$LINENO: checking for XEXT" >&5 +echo $ECHO_N "checking for XEXT... $ECHO_C" >&6; } -# 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 +if test -n "$PKG_CONFIG"; then + if test -n "$XEXT_CFLAGS"; then + pkg_cv_XEXT_CFLAGS="$XEXT_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xext\"") >&5 + ($PKG_CONFIG --exists --print-errors "xext") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XEXT_CFLAGS=`$PKG_CONFIG --cflags "xext" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$XEXT_LIBS"; then + pkg_cv_XEXT_LIBS="$XEXT_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xext\"") >&5 + ($PKG_CONFIG --exists --print-errors "xext") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XEXT_LIBS=`$PKG_CONFIG --libs "xext" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried fi - PACKAGE='$PACKAGE' - VERSION='$VERSION' - TIMESTAMP='$TIMESTAMP' - RM='$RM' - ofile='$ofile' +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 + XEXT_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xext"` + else + XEXT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xext"` + fi + # Put the nasty error message in config.log where it belongs + echo "$XEXT_PKG_ERRORS" >&5 + { { echo "$as_me:$LINENO: error: Package requirements (xext) were not met: -_ACEOF +$XEXT_PKG_ERRORS -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; - "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; - "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; - "src/va_version.h") CONFIG_FILES="$CONFIG_FILES src/va_version.h" ;; - "src/x11/Makefile") CONFIG_FILES="$CONFIG_FILES src/x11/Makefile" ;; - "src/glx/Makefile") CONFIG_FILES="$CONFIG_FILES src/glx/Makefile" ;; - "dummy_drv_video/Makefile") CONFIG_FILES="$CONFIG_FILES dummy_drv_video/Makefile" ;; - "i965_drv_video/Makefile") CONFIG_FILES="$CONFIG_FILES i965_drv_video/Makefile" ;; - "i965_drv_video/shaders/Makefile") CONFIG_FILES="$CONFIG_FILES i965_drv_video/shaders/Makefile" ;; - "i965_drv_video/shaders/mpeg2/Makefile") CONFIG_FILES="$CONFIG_FILES i965_drv_video/shaders/mpeg2/Makefile" ;; - "i965_drv_video/shaders/mpeg2/vld/Makefile") CONFIG_FILES="$CONFIG_FILES i965_drv_video/shaders/mpeg2/vld/Makefile" ;; - "i965_drv_video/shaders/render/Makefile") CONFIG_FILES="$CONFIG_FILES i965_drv_video/shaders/render/Makefile" ;; - "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;; - "libva.pc") CONFIG_FILES="$CONFIG_FILES libva.pc" ;; - "libva-x11.pc") CONFIG_FILES="$CONFIG_FILES libva-x11.pc" ;; - "libva-glx.pc") CONFIG_FILES="$CONFIG_FILES libva-glx.pc" ;; +Alternatively, you may set the environment variables XEXT_CFLAGS +and XEXT_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +echo "$as_me: error: Package requirements (xext) were not met: - *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; - esac -done +$XEXT_PKG_ERRORS +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. -# 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_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers - test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands -fi +Alternatively, you may set the environment variables XEXT_CFLAGS +and XEXT_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} + { (exit 1); exit 1; }; } +elif test $pkg_failed = untried; then + { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. -# 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= - trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status -' 0 - trap 'as_fn_exit 1' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. +Alternatively, you may set the environment variables XEXT_CFLAGS +and XEXT_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 +To get pkg-config, see . +See \`config.log' for more details." >&5 +echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. -# 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 +Alternatively, you may set the environment variables XEXT_CFLAGS +and XEXT_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + XEXT_CFLAGS=$pkg_cv_XEXT_CFLAGS + XEXT_LIBS=$pkg_cv_XEXT_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + : +fi +pkg_failed=no +{ echo "$as_me:$LINENO: checking for XFIXES" >&5 +echo $ECHO_N "checking for XFIXES... $ECHO_C" >&6; } -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\' +if test -n "$PKG_CONFIG"; then + if test -n "$XFIXES_CFLAGS"; then + pkg_cv_XFIXES_CFLAGS="$XFIXES_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xfixes\"") >&5 + ($PKG_CONFIG --exists --print-errors "xfixes") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XFIXES_CFLAGS=`$PKG_CONFIG --cflags "xfixes" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$XFIXES_LIBS"; then + pkg_cv_XFIXES_LIBS="$XFIXES_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xfixes\"") >&5 + ($PKG_CONFIG --exists --print-errors "xfixes") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XFIXES_LIBS=`$PKG_CONFIG --libs "xfixes" 2>/dev/null` +else + pkg_failed=yes 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' + fi else - ac_cs_awk_cr=$ac_cr + pkg_failed=untried fi -echo 'BEGIN {' >"$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 +if test $pkg_failed = yes; then - 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 +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 + XFIXES_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xfixes"` + else + XFIXES_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xfixes"` + fi + # Put the nasty error message in config.log where it belongs + echo "$XFIXES_PKG_ERRORS" >&5 -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$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 >>"\$tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" + { { echo "$as_me:$LINENO: error: Package requirements (xfixes) were not met: -} -{ - 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 - } +$XFIXES_PKG_ERRORS - print line -} +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. -_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 < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || as_fn_error "could not setup config files machinery" "$LINENO" 5 -_ACEOF +Alternatively, you may set the environment variables XFIXES_CFLAGS +and XFIXES_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +echo "$as_me: error: Package requirements (xfixes) were not met: -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ 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[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ -s/:*$// -s/^[^=]*=[ ]*$// -}' -fi +$XFIXES_PKG_ERRORS -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -fi # test -n "$CONFIG_FILES" +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. -# Set up the scripts for CONFIG_HEADERS section. -# No need to generate them if there are no CONFIG_HEADERS. -# This happens for instance with `./config.status Makefile'. -if test -n "$CONFIG_HEADERS"; then -cat >"$tmp/defines.awk" <<\_ACAWK || -BEGIN { -_ACEOF +Alternatively, you may set the environment variables XFIXES_CFLAGS +and XFIXES_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} + { (exit 1); exit 1; }; } +elif test $pkg_failed = untried; then + { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. -# Transform confdefs.h into an awk script `defines.awk', embedded as -# here-document in config.status, that substitutes the proper values into -# config.h.in to produce config.h. +Alternatively, you may set the environment variables XFIXES_CFLAGS +and XFIXES_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. -# Create a delimiter string that does not exist in confdefs.h, to ease -# handling of long lines. -ac_delim='%!_!# ' -for ac_last_try in false false :; do - ac_t=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_t"; then - break - elif $ac_last_try; then - as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done +To get pkg-config, see . +See \`config.log' for more details." >&5 +echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. -# For the awk script, D is an array of macro values keyed by name, -# likewise P contains macro parameters if any. Preserve backslash -# newline sequences. +Alternatively, you may set the environment variables XFIXES_CFLAGS +and XFIXES_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. -ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* -sed -n ' -s/.\{148\}/&'"$ac_delim"'/g -t rset -:rset -s/^[ ]*#[ ]*define[ ][ ]*/ / -t def -d -:def -s/\\$// -t bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3"/p -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p -d -:bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3\\\\\\n"\\/p -t cont -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p -t cont -d -:cont -n -s/.\{148\}/&'"$ac_delim"'/g -t clear -:clear -s/\\$// -t bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/"/p -d -:bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p -b cont -' >$CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - for (key in D) D_is_set[key] = 1 - FS = "" -} -/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { - line = \$ 0 - split(line, arg, " ") - if (arg[1] == "#") { - defundef = arg[2] - mac1 = arg[3] - } else { - defundef = substr(arg[1], 2) - mac1 = arg[2] - } - split(mac1, mac2, "(") #) - macro = mac2[1] - prefix = substr(line, 1, index(line, defundef) - 1) - if (D_is_set[macro]) { - # Preserve the white space surrounding the "#". - print prefix "define", macro P[macro] D[macro] - next - } else { - # Replace #undef with comments. This is necessary, for example, - # in the case of _POSIX_SOURCE, which is predefined and required - # on some systems where configure will not decide to define it. - if (defundef == "undef") { - print "/*", prefix defundef, macro, "*/" - next - } - } -} -{ print } -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - as_fn_error "could not setup config headers machinery" "$LINENO" 5 -fi # test -n "$CONFIG_HEADERS" +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + XFIXES_CFLAGS=$pkg_cv_XFIXES_CFLAGS + XFIXES_LIBS=$pkg_cv_XFIXES_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + : +fi +pkg_failed=no +{ echo "$as_me:$LINENO: checking for DRM" >&5 +echo $ECHO_N "checking for DRM... $ECHO_C" >&6; } -eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :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 +if test -n "$PKG_CONFIG"; then + if test -n "$DRM_CFLAGS"; then + pkg_cv_DRM_CFLAGS="$DRM_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libdrm\"") >&5 + ($PKG_CONFIG --exists --print-errors "libdrm") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_DRM_CFLAGS=`$PKG_CONFIG --cflags "libdrm" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$DRM_LIBS"; then + pkg_cv_DRM_LIBS="$DRM_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libdrm\"") >&5 + ($PKG_CONFIG --exists --print-errors "libdrm") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_DRM_LIBS=`$PKG_CONFIG --libs "libdrm" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$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 "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 >"$tmp/stdin" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; - esac - ;; - esac +if test $pkg_failed = yes; then - 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=. +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 + DRM_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libdrm"` + else + DRM_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libdrm"` + fi + # Put the nasty error message in config.log where it belongs + echo "$DRM_PKG_ERRORS" >&5 -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 + { { echo "$as_me:$LINENO: error: Package requirements (libdrm) were not met: -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 +$DRM_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. +Alternatively, you may set the environment variables DRM_CFLAGS +and DRM_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +echo "$as_me: error: Package requirements (libdrm) were not met: - case $ac_mode in - :F) - # - # CONFIG_FILE - # +$DRM_PKG_ERRORS - 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 +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. -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 +Alternatively, you may set the environment variables DRM_CFLAGS +and DRM_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} + { (exit 1); exit 1; }; } +elif test $pkg_failed = untried; then + { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. -# 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 "$tmp/subs.awk" >$tmp/out \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 +Alternatively, you may set the environment variables DRM_CFLAGS +and DRM_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$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;} +To get pkg-config, see . +See \`config.log' for more details." >&5 +echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. - rm -f "$tmp/stdin" - case $ac_file in - -) cat "$tmp/out" && rm -f "$tmp/out";; - *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; - esac \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 - ;; - :H) - # - # CONFIG_HEADER - # - if test x"$ac_file" != x-; then - { - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" - } >"$tmp/config.h" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 - if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 -$as_echo "$as_me: $ac_file is unchanged" >&6;} - else - rm -f "$ac_file" - mv "$tmp/config.h" "$ac_file" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 - fi - else - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error "could not create -" "$LINENO" 5 - fi -# Compute "$ac_file"'s index in $config_headers. -_am_arg="$ac_file" -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || -$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$_am_arg" : 'X\(//\)[^/]' \| \ - X"$_am_arg" : 'X\(//\)$' \| \ - X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$_am_arg" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'`/stamp-h$_am_stamp_count - ;; +Alternatively, you may set the environment variables DRM_CFLAGS +and DRM_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. - :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 -$as_echo "$as_me: executing $ac_file commands" >&6;} - ;; - esac +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + DRM_CFLAGS=$pkg_cv_DRM_CFLAGS + DRM_LIBS=$pkg_cv_DRM_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + : +fi - case $ac_file$ac_mode in - "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'` +pkg_failed=no +{ echo "$as_me:$LINENO: checking for GEN4ASM" >&5 +echo $ECHO_N "checking for GEN4ASM... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$GEN4ASM_CFLAGS"; then + pkg_cv_GEN4ASM_CFLAGS="$GEN4ASM_CFLAGS" else - continue + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"intel-gen4asm >= 1.0\"") >&5 + ($PKG_CONFIG --exists --print-errors "intel-gen4asm >= 1.0") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_GEN4ASM_CFLAGS=`$PKG_CONFIG --cflags "intel-gen4asm >= 1.0" 2>/dev/null` +else + pkg_failed=yes +fi 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 -} - ;; - "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 +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$GEN4ASM_LIBS"; then + pkg_cv_GEN4ASM_LIBS="$GEN4ASM_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"intel-gen4asm >= 1.0\"") >&5 + ($PKG_CONFIG --exists --print-errors "intel-gen4asm >= 1.0") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_GEN4ASM_LIBS=`$PKG_CONFIG --libs "intel-gen4asm >= 1.0" 2>/dev/null` +else + pkg_failed=yes +fi fi +else + pkg_failed=untried +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 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. +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 + GEN4ASM_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "intel-gen4asm >= 1.0"` + else + GEN4ASM_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "intel-gen4asm >= 1.0"` + fi + # Put the nasty error message in config.log where it belongs + echo "$GEN4ASM_PKG_ERRORS" >&5 + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + gen4asm=no +elif test $pkg_failed = untried; then + gen4asm=no +else + GEN4ASM_CFLAGS=$pkg_cv_GEN4ASM_CFLAGS + GEN4ASM_LIBS=$pkg_cv_GEN4ASM_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + gen4asm=yes +fi + if test x$gen4asm = xyes; then + HAVE_GEN4ASM_TRUE= + HAVE_GEN4ASM_FALSE='#' +else + HAVE_GEN4ASM_TRUE='#' + HAVE_GEN4ASM_FALSE= +fi + +# Check for libdrm >= 2.4 (needed for i965_drv_video.so) +if test x$enable_i965_driver = xyes && ! $PKG_CONFIG --atleast-version=2.4 libdrm; then + { echo "$as_me:$LINENO: WARNING: libdrm < 2.4 found, disabling build of i965 video driver" >&5 +echo "$as_me: WARNING: libdrm < 2.4 found, disabling build of i965 video driver" >&2;} + enable_i965_driver=no +fi + if test x$enable_i965_driver = xyes; then + BUILD_I965_DRIVER_TRUE= + BUILD_I965_DRIVER_FALSE='#' +else + BUILD_I965_DRIVER_TRUE='#' + BUILD_I965_DRIVER_FALSE= +fi -# The names of the tagged configurations supported by this script. -available_tags="" -# ### BEGIN LIBTOOL CONFIG +# We only need the headers, we don't link against the DRM libraries +LIBVA_CFLAGS="$DRM_CFLAGS" -# Whether or not to build static libraries. -build_old_libs=$enable_static -# Which release of libtool.m4 was used? -macro_version=$macro_version -macro_revision=$macro_revision -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared +pkgconfigdir=${libdir}/pkgconfig -# What type of objects to build. -pic_mode=$pic_mode -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install +LIBVA_DISPLAY=x11 +libvacorelib=libva.la +libvabackendlib=libva-$LIBVA_DISPLAY.la -# 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 +ac_config_files="$ac_config_files Makefile src/Makefile src/va_version.h src/x11/Makefile dummy_drv_video/Makefile i965_drv_video/Makefile i965_drv_video/shaders/Makefile i965_drv_video/shaders/mpeg2/Makefile i965_drv_video/shaders/mpeg2/vld/Makefile i965_drv_video/shaders/render/Makefile test/Makefile test/basic/Makefile test/decode/Makefile test/putsurface/Makefile test/encode/Makefile libva.pc libva-x11.pc" -# Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="\$SED -e 1s/^X//" +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. -# A grep program that handles long lines. -GREP=$lt_GREP +_ACEOF -# An ERE matcher. -EGREP=$lt_EGREP +# 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_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done -# A literal string matcher. -FGREP=$lt_FGREP + (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 + test "x$cache_file" != "x/dev/null" && + { echo "$as_me:$LINENO: updating cache $cache_file" >&5 +echo "$as_me: updating cache $cache_file" >&6;} + cat confcache >$cache_file + else + { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 +echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache -# A BSD- or MS-compatible name lister. -NM=$lt_NM +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' -# Whether we need soft or hard links. -LN_S=$lt_LN_S +DEFS=-DHAVE_CONFIG_H -# What is the maximum length of a command? -max_cmd_len=$max_cmd_len +ac_libobjs= +ac_ltlibobjs= +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=`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. + ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs -# Object file suffix (normally "o"). -objext=$ac_objext +LTLIBOBJS=$ac_ltlibobjs -# Executable file suffix (normally ""). -exeext=$exeext -# whether the shell understands "unset". -lt_unset=$lt_unset +if test -z "${BUILD_DUMMY_DRIVER_TRUE}" && test -z "${BUILD_DUMMY_DRIVER_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"BUILD_DUMMY_DRIVER\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"BUILD_DUMMY_DRIVER\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_GEN4ASM_TRUE}" && test -z "${HAVE_GEN4ASM_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_GEN4ASM\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_GEN4ASM\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${BUILD_I965_DRIVER_TRUE}" && test -z "${BUILD_I965_DRIVER_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"BUILD_I965_DRIVER\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"BUILD_I965_DRIVER\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi -# turn spaces into newlines. -SP2NL=$lt_lt_SP2NL +: ${CONFIG_STATUS=./config.status} +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF +#! $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. -# turn newlines into spaces. -NL2SP=$lt_lt_NL2SP +debug=false +ac_cs_recheck=false +ac_cs_silent=false +SHELL=\${CONFIG_SHELL-$SHELL} +_ACEOF -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds +cat >>$CONFIG_STATUS <<\_ACEOF +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## -# An object symbol dumper. -OBJDUMP=$lt_OBJDUMP +# 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=: + # 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 -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method +fi -# Command to use when deplibs_check_method == "file_magic". -file_magic_cmd=$lt_file_magic_cmd -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS -# 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 +# PATH needs CR +# 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 -# A C compiler. -LTCC=$lt_CC +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi -# LTCC compiler flags. -LTCFLAGS=$lt_CFLAGS +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi -# 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 +# 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.) +as_nl=' +' +IFS=" "" $as_nl" -# 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 +# Find who we are. Look in the path if we contain no directory separator. +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 -# 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 + ;; +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 + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi -# The name of the directory that contains temporary libtool files. -objdir=$objdir +# Work around bugs in pre-3.0 UWIN ksh. +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done +PS1='$ ' +PS2='> ' +PS4='+ ' -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + fi +done -# An echo program that does not interpret backslashes. -ECHO=$lt_ECHO +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi -# Used to examine libraries when file_magic_cmd begins with "file". -MAGIC_CMD=$MAGIC_CMD +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi -# Must we lock files when doing compilation? -need_locks=$lt_need_locks -# Tool to manipulate archived DWARF debug symbol files on Mac OS X. -DSYMUTIL=$lt_DSYMUTIL +# Name of the executable. +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` -# Tool to change global to local symbols on Mac OS X. -NMEDIT=$lt_NMEDIT +# CDPATH. +$as_unset CDPATH -# 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 + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # scripts with optimization help from Paolo Bonzini. 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" || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } -# Old archive suffix (normally "a"). -libext=$libext + # 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 +} -# 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 +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi -# Variables whose values should be saved in libtool wrapper scripts and -# restored at link time. -variables_saved_for_relink=$lt_variables_saved_for_relink +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac -# Do we need the "lib" prefix for modules? -need_lib_prefix=$need_lib_prefix +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi -# Do we need a version for libraries? -need_version=$need_version +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 +fi +echo >conf$$.file +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 -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null -# Library versioning type. -version_type=$version_type +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi -# Shared library runtime path variable. -runpath_var=$runpath_var +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x -# Shared library path variable. -shlibpath_var=$shlibpath_var +# 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'" -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -# 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 +exec 6>&1 -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec +# 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 libva $as_me 0.31.0, which was +generated by GNU Autoconf 2.61. Invocation command line was -# Command to use after installation of a shared archive. -postinstall_cmds=$lt_postinstall_cmds + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ -# Command to use after uninstallation of a shared archive. -postuninstall_cmds=$lt_postuninstall_cmds +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds +_ACEOF -# As "finish_cmds", except a single script fragment to be evaled but -# not shown. -finish_eval=$lt_finish_eval +cat >>$CONFIG_STATUS <<_ACEOF +# Files that config.status was made for. +config_files="$ac_config_files" +config_headers="$ac_config_headers" +config_commands="$ac_config_commands" -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs +_ACEOF -# Compile-time system search path for libraries. -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec +cat >>$CONFIG_STATUS <<\_ACEOF +ac_cs_usage="\ +\`$as_me' instantiates files from templates according to the +current configuration. -# Run-time system search path for libraries. -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec +Usage: $0 [OPTIONS] [FILE]... -# Whether dlopen is supported. -dlopen_support=$enable_dlopen + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self +Configuration files: +$config_files -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static +Configuration headers: +$config_headers -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib +Configuration commands: +$config_commands +Report bugs to ." -# The linker used to build libraries. -LD=$lt_LD +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +ac_cs_version="\\ +libva config.status 0.31.0 +configured by $0, generated by GNU Autoconf 2.61, + with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" -# Commands used to build an old-style archive. -old_archive_cmds=$lt_old_archive_cmds +Copyright (C) 2006 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." -# A language specific compiler. -CC=$lt_compiler +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' +MKDIR_P='$MKDIR_P' +_ACEOF -# Is the compiler the GNU compiler? -with_gcc=$GCC +cat >>$CONFIG_STATUS <<\_ACEOF +# If no file are specified by the user, then we need to provide default +# value. By we need to know if files were specified by the user. +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=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag + 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 ) + echo "$ac_cs_version"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + CONFIG_FILES="$CONFIG_FILES $ac_optarg" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header + { echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl + # This is an error. + -*) { echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } ;; -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic + *) ac_config_targets="$ac_config_targets $1" + ac_need_defaults=false ;; -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static + esac + shift +done -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o +ac_configure_extra_args= -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi -# Whether or not to disallow shared libs when runtime libs are static. -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +if \$ac_cs_recheck; then + echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + CONFIG_SHELL=$SHELL + export CONFIG_SHELL + exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion +fi -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + echo "$ac_log" +} >&5 -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +# +# INIT-COMMANDS +# +AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" -# Whether the compiler copes with passing no objects directly. -compiler_needs_object=$lt_compiler_needs_object +_ACEOF -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds +cat >>$CONFIG_STATUS <<\_ACEOF -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; + "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; + "src/va_version.h") CONFIG_FILES="$CONFIG_FILES src/va_version.h" ;; + "src/x11/Makefile") CONFIG_FILES="$CONFIG_FILES src/x11/Makefile" ;; + "dummy_drv_video/Makefile") CONFIG_FILES="$CONFIG_FILES dummy_drv_video/Makefile" ;; + "i965_drv_video/Makefile") CONFIG_FILES="$CONFIG_FILES i965_drv_video/Makefile" ;; + "i965_drv_video/shaders/Makefile") CONFIG_FILES="$CONFIG_FILES i965_drv_video/shaders/Makefile" ;; + "i965_drv_video/shaders/mpeg2/Makefile") CONFIG_FILES="$CONFIG_FILES i965_drv_video/shaders/mpeg2/Makefile" ;; + "i965_drv_video/shaders/mpeg2/vld/Makefile") CONFIG_FILES="$CONFIG_FILES i965_drv_video/shaders/mpeg2/vld/Makefile" ;; + "i965_drv_video/shaders/render/Makefile") CONFIG_FILES="$CONFIG_FILES i965_drv_video/shaders/render/Makefile" ;; + "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;; + "test/basic/Makefile") CONFIG_FILES="$CONFIG_FILES test/basic/Makefile" ;; + "test/decode/Makefile") CONFIG_FILES="$CONFIG_FILES test/decode/Makefile" ;; + "test/putsurface/Makefile") CONFIG_FILES="$CONFIG_FILES test/putsurface/Makefile" ;; + "test/encode/Makefile") CONFIG_FILES="$CONFIG_FILES test/encode/Makefile" ;; + "libva.pc") CONFIG_FILES="$CONFIG_FILES libva.pc" ;; + "libva-x11.pc") CONFIG_FILES="$CONFIG_FILES libva-x11.pc" ;; -# Commands used to build a shared archive. -archive_cmds=$lt_archive_cmds -archive_expsym_cmds=$lt_archive_expsym_cmds + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; + esac +done -# 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 +# 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_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands +fi -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag +# 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= + trap 'exit_status=$? + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status +' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. -# Flag that enforces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || +{ + echo "$me: cannot create a temporary directory in ." >&2 + { (exit 1); exit 1; } +} -# 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 +# +# Set up the sed scripts for CONFIG_FILES section. +# -# 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 +# No need to generate the scripts if there are no CONFIG_FILES. +# This happens for instance when ./config.status config.h +if test -n "$CONFIG_FILES"; then -# Whether we need a single "-rpath" flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator +_ACEOF -# 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 +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +SHELL!$SHELL$ac_delim +PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim +PACKAGE_NAME!$PACKAGE_NAME$ac_delim +PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim +PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim +PACKAGE_STRING!$PACKAGE_STRING$ac_delim +PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim +exec_prefix!$exec_prefix$ac_delim +prefix!$prefix$ac_delim +program_transform_name!$program_transform_name$ac_delim +bindir!$bindir$ac_delim +sbindir!$sbindir$ac_delim +libexecdir!$libexecdir$ac_delim +datarootdir!$datarootdir$ac_delim +datadir!$datadir$ac_delim +sysconfdir!$sysconfdir$ac_delim +sharedstatedir!$sharedstatedir$ac_delim +localstatedir!$localstatedir$ac_delim +includedir!$includedir$ac_delim +oldincludedir!$oldincludedir$ac_delim +docdir!$docdir$ac_delim +infodir!$infodir$ac_delim +htmldir!$htmldir$ac_delim +dvidir!$dvidir$ac_delim +pdfdir!$pdfdir$ac_delim +psdir!$psdir$ac_delim +libdir!$libdir$ac_delim +localedir!$localedir$ac_delim +mandir!$mandir$ac_delim +DEFS!$DEFS$ac_delim +ECHO_C!$ECHO_C$ac_delim +ECHO_N!$ECHO_N$ac_delim +ECHO_T!$ECHO_T$ac_delim +LIBS!$LIBS$ac_delim +build_alias!$build_alias$ac_delim +host_alias!$host_alias$ac_delim +target_alias!$target_alias$ac_delim +INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim +INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim +INSTALL_DATA!$INSTALL_DATA$ac_delim +am__isrc!$am__isrc$ac_delim +CYGPATH_W!$CYGPATH_W$ac_delim +PACKAGE!$PACKAGE$ac_delim +VERSION!$VERSION$ac_delim +ACLOCAL!$ACLOCAL$ac_delim +AUTOCONF!$AUTOCONF$ac_delim +AUTOMAKE!$AUTOMAKE$ac_delim +AUTOHEADER!$AUTOHEADER$ac_delim +MAKEINFO!$MAKEINFO$ac_delim +install_sh!$install_sh$ac_delim +STRIP!$STRIP$ac_delim +INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim +mkdir_p!$mkdir_p$ac_delim +AWK!$AWK$ac_delim +SET_MAKE!$SET_MAKE$ac_delim +am__leading_dot!$am__leading_dot$ac_delim +AMTAR!$AMTAR$ac_delim +am__tar!$am__tar$ac_delim +am__untar!$am__untar$ac_delim +LIBVA_MAJOR_VERSION!$LIBVA_MAJOR_VERSION$ac_delim +LIBVA_MINOR_VERSION!$LIBVA_MINOR_VERSION$ac_delim +LIBVA_MICRO_VERSION!$LIBVA_MICRO_VERSION$ac_delim +LIBVA_VERSION!$LIBVA_VERSION$ac_delim +LIBVA_LT_VERSION!$LIBVA_LT_VERSION$ac_delim +LIBVA_LT_LDFLAGS!$LIBVA_LT_LDFLAGS$ac_delim +BUILD_DUMMY_DRIVER_TRUE!$BUILD_DUMMY_DRIVER_TRUE$ac_delim +BUILD_DUMMY_DRIVER_FALSE!$BUILD_DUMMY_DRIVER_FALSE$ac_delim +LIBVA_DRIVERS_PATH!$LIBVA_DRIVERS_PATH$ac_delim +build!$build$ac_delim +build_cpu!$build_cpu$ac_delim +build_vendor!$build_vendor$ac_delim +build_os!$build_os$ac_delim +host!$host$ac_delim +host_cpu!$host_cpu$ac_delim +host_vendor!$host_vendor$ac_delim +host_os!$host_os$ac_delim +CC!$CC$ac_delim +CFLAGS!$CFLAGS$ac_delim +LDFLAGS!$LDFLAGS$ac_delim +CPPFLAGS!$CPPFLAGS$ac_delim +ac_ct_CC!$ac_ct_CC$ac_delim +EXEEXT!$EXEEXT$ac_delim +OBJEXT!$OBJEXT$ac_delim +DEPDIR!$DEPDIR$ac_delim +am__include!$am__include$ac_delim +am__quote!$am__quote$ac_delim +AMDEP_TRUE!$AMDEP_TRUE$ac_delim +AMDEP_FALSE!$AMDEP_FALSE$ac_delim +AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim +CCDEPMODE!$CCDEPMODE$ac_delim +am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim +am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim +SED!$SED$ac_delim +GREP!$GREP$ac_delim +EGREP!$EGREP$ac_delim +LN_S!$LN_S$ac_delim +ECHO!$ECHO$ac_delim +_ACEOF -# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR -# into the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done -# 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 +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi -# Set to yes if linker adds runtime paths of dependent libraries -# to runtime path list. -inherit_rpath=$inherit_rpath +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +CEOF$ac_eof +_ACEOF -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +AR!$AR$ac_delim +RANLIB!$RANLIB$ac_delim +DSYMUTIL!$DSYMUTIL$ac_delim +NMEDIT!$NMEDIT$ac_delim +CPP!$CPP$ac_delim +CXX!$CXX$ac_delim +CXXFLAGS!$CXXFLAGS$ac_delim +ac_ct_CXX!$ac_ct_CXX$ac_delim +CXXDEPMODE!$CXXDEPMODE$ac_delim +am__fastdepCXX_TRUE!$am__fastdepCXX_TRUE$ac_delim +am__fastdepCXX_FALSE!$am__fastdepCXX_FALSE$ac_delim +CXXCPP!$CXXCPP$ac_delim +F77!$F77$ac_delim +FFLAGS!$FFLAGS$ac_delim +ac_ct_F77!$ac_ct_F77$ac_delim +LIBTOOL!$LIBTOOL$ac_delim +PKG_CONFIG!$PKG_CONFIG$ac_delim +X11_CFLAGS!$X11_CFLAGS$ac_delim +X11_LIBS!$X11_LIBS$ac_delim +XEXT_CFLAGS!$XEXT_CFLAGS$ac_delim +XEXT_LIBS!$XEXT_LIBS$ac_delim +XFIXES_CFLAGS!$XFIXES_CFLAGS$ac_delim +XFIXES_LIBS!$XFIXES_LIBS$ac_delim +DRM_CFLAGS!$DRM_CFLAGS$ac_delim +DRM_LIBS!$DRM_LIBS$ac_delim +GEN4ASM_CFLAGS!$GEN4ASM_CFLAGS$ac_delim +GEN4ASM_LIBS!$GEN4ASM_LIBS$ac_delim +HAVE_GEN4ASM_TRUE!$HAVE_GEN4ASM_TRUE$ac_delim +HAVE_GEN4ASM_FALSE!$HAVE_GEN4ASM_FALSE$ac_delim +BUILD_I965_DRIVER_TRUE!$BUILD_I965_DRIVER_TRUE$ac_delim +BUILD_I965_DRIVER_FALSE!$BUILD_I965_DRIVER_FALSE$ac_delim +LIBVA_CFLAGS!$LIBVA_CFLAGS$ac_delim +LIBVA_LIBS!$LIBVA_LIBS$ac_delim +pkgconfigdir!$pkgconfigdir$ac_delim +libvacorelib!$libvacorelib$ac_delim +libvabackendlib!$libvabackendlib$ac_delim +LIBOBJS!$LIBOBJS$ac_delim +LTLIBOBJS!$LTLIBOBJS$ac_delim +_ACEOF -# Set to "yes" if exported symbols are required. -always_export_symbols=$always_export_symbols + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 38; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +:end +s/|#_!!_#|//g +CEOF$ac_eof +_ACEOF -# 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 +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ 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[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ +s/:*$// +s/^[^=]*=[ ]*$// +}' +fi -# Commands necessary for linking programs (against libraries) with templates. -prelink_cmds=$lt_prelink_cmds +cat >>$CONFIG_STATUS <<\_ACEOF +fi # test -n "$CONFIG_FILES" -# 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 +for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 +echo "$as_me: error: Invalid tag $ac_tag." >&2;} + { (exit 1); exit 1; }; };; + :[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 -# ### END LIBTOOL CONFIG + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$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 || + { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 +echo "$as_me: error: cannot find input file: $ac_f" >&2;} + { (exit 1); exit 1; }; };; + esac + ac_file_inputs="$ac_file_inputs $ac_f" + done -_LT_EOF + # 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 "`IFS=: + echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + fi - 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 + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin";; + 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 || +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" + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`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 || +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" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +echo "$as_me: error: cannot create directory $as_dir" >&2;} + { (exit 1); exit 1; }; }; } + ac_builddir=. -ltmain="$ac_aux_dir/ltmain.sh" - +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`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 - # 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 '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) +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 $xsi_shell in - yes) - cat << \_LT_EOF >> "$cfgfile" -# 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 () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; + 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 -# func_basename file -func_basename () -{ - func_basename_result="${1##*/}" -} +cat >>$CONFIG_STATUS <<\_ACEOF +# 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= -# 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 () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}" +case `sed -n '/datarootdir/ { + p + q } +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p +' $ac_file_inputs` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF + 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 -# 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_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}"} -} +# 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 + sed "$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s&@configure_input@&$configure_input&;t t +s&@top_builddir@&$ac_top_builddir_sub&;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 +" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=${1%%=*} - func_opt_split_arg=${1#*=} -} +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&5 +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;} -# func_lo2o object -func_lo2o () -{ - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; + rm -f "$tmp/stdin" + case $ac_file in + -) cat "$tmp/out"; rm -f "$tmp/out";; + *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; esac -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=${1%.*}.lo -} + ;; + :H) + # + # CONFIG_HEADER + # +_ACEOF -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=$(( $* )) -} +# Transform confdefs.h into a sed script `conftest.defines', that +# substitutes the proper values into config.h.in to produce config.h. +rm -f conftest.defines conftest.tail +# First, append a space to every undef/define line, to ease matching. +echo 's/$/ /' >conftest.defines +# Then, protect against being on the right side of a sed subst, or in +# an unquoted here document, in config.status. If some macros were +# called several times there might be several #defines for the same +# symbol, which is useless. But do not sort them, since the last +# AC_DEFINE must be honored. +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where +# NAME is the cpp macro being defined, VALUE is the value it is being given. +# PARAMS is the parameter list in the macro definition--in most cases, it's +# just an empty string. +ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*' +ac_dB='\\)[ (].*,\\1define\\2' +ac_dC=' ' +ac_dD=' ,' -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=${#1} -} +uniq confdefs.h | + sed -n ' + t rset + :rset + s/^[ ]*#[ ]*define[ ][ ]*// + t ok + d + :ok + s/[\\&,]/\\&/g + s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p + s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p + ' >>conftest.defines + +# Remove the space that was appended to ease matching. +# Then replace #undef with comments. This is necessary, for +# example, in the case of _POSIX_SOURCE, which is predefined and required +# on some systems where configure will not decide to define it. +# (The regexp can be short, since the line contains either #define or #undef.) +echo 's/ $// +s,^[ #]*u.*,/* & */,' >>conftest.defines + +# Break up conftest.defines: +ac_max_sed_lines=50 + +# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1" +# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2" +# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1" +# et cetera. +ac_in='$ac_file_inputs' +ac_out='"$tmp/out1"' +ac_nxt='"$tmp/out2"' -_LT_EOF - ;; - *) # Bourne compatible functions. - cat << \_LT_EOF >> "$cfgfile" +while : +do + # Write a here document: + cat >>$CONFIG_STATUS <<_ACEOF + # First, check the format of the line: + cat >"\$tmp/defines.sed" <<\\CEOF +/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def +/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def +b +:def +_ACEOF + sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS + echo 'CEOF + sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS + ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in + sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail + grep . conftest.tail >/dev/null || break + rm -f conftest.defines + mv conftest.tail conftest.defines +done +rm -f conftest.defines conftest.tail -# 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 () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" +echo "ac_result=$ac_in" >>$CONFIG_STATUS +cat >>$CONFIG_STATUS <<\_ACEOF + if test x"$ac_file" != x-; then + echo "/* $configure_input */" >"$tmp/config.h" + cat "$ac_result" >>"$tmp/config.h" + if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then + { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 +echo "$as_me: $ac_file is unchanged" >&6;} + else + rm -f $ac_file + mv "$tmp/config.h" $ac_file + fi else - func_dirname_result="$func_dirname_result${2}" + echo "/* $configure_input */" + cat "$ac_result" fi -} - -# func_basename file -func_basename () -{ - func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` -} - - -# 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 "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; + rm -f "$tmp/out12" +# Compute $ac_file's index in $config_headers. +_am_arg=$ac_file +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac -} - -# sed scripts: -my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' -my_sed_long_arg='1s/^-[^=]*=//' - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` - func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` -} - -# func_lo2o object -func_lo2o () -{ - func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'` -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=`expr "$@"` -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` -} - -_LT_EOF -esac - -case $lt_shell_append in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$1+=\$2" -} -_LT_EOF - ;; - *) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$1=\$$1\$2" -} +done +echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || +$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$_am_arg" : 'X\(//\)[^/]' \| \ + X"$_am_arg" : 'X\(//\)$' \| \ + X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || +echo X"$_am_arg" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'`/stamp-h$_am_stamp_count + ;; -_LT_EOF - ;; + :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 +echo "$as_me: executing $ac_file commands" >&6;} + ;; esac - sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" - + case $ac_file$ac_mode in + "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; 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 || +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 || +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 + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`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 || +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" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +echo "$as_me: error: cannot create directory $as_dir" >&2;} + { (exit 1); exit 1; }; }; } + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done +done ;; esac done # for ac_tag -as_fn_exit 0 +{ (exit 0); exit 0; } _ACEOF +chmod +x $CONFIG_STATUS 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. @@ -14577,11 +23322,7 @@ 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 $? -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;} + $ac_cs_success || { (exit 1); exit 1; } fi diff -Nru libva-1.0.1/configure.ac libva-1.0.1-3+0.31.1/configure.ac --- libva-1.0.1/configure.ac 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/configure.ac 2010-07-07 12:20:30.000000000 +0000 @@ -23,13 +23,13 @@ # libva package version number, (as distinct from shared library version) m4_define([libva_major_version], [0]) m4_define([libva_minor_version], [31]) -m4_define([libva_micro_version], [0]) +m4_define([libva_micro_version], [1]) m4_define([libva_version], [libva_major_version.libva_minor_version.libva_micro_version]) # if the library source code has changed, increment revision -m4_define([libva_lt_revision], [0]) +m4_define([libva_lt_revision], [3]) # if any interface was added/removed/changed, then inc current, reset revision m4_define([libva_lt_current], [1]) # if any interface was added since last public release, then increment age @@ -60,12 +60,22 @@ AC_SUBST(LIBVA_LT_VERSION) AC_SUBST(LIBVA_LT_LDFLAGS) +AC_ARG_ENABLE(glx, + [AC_HELP_STRING([--enable-glx], + [build with OpenGL for X11 support])], + [], [enable_glx=yes]) + AC_ARG_ENABLE(dummy-driver, [AC_HELP_STRING([--enable-dummy-driver], [build dummy video driver])], [], [enable_dummy_driver=yes]) AM_CONDITIONAL(BUILD_DUMMY_DRIVER, test x$enable_dummy_driver = xyes) +AC_ARG_ENABLE(dummy-backend, + [AC_HELP_STRING([--enable-dummy-backend], + [build dummy libva backend])], + [], [enable_dummy_backend=no]) + AC_ARG_ENABLE(i965-driver, [AC_HELP_STRING([--enable-i965-driver], [build i965 video driver])], @@ -100,6 +110,30 @@ fi AM_CONDITIONAL(BUILD_I965_DRIVER, test x$enable_i965_driver = xyes) +if test x$enable_dummy_backend = xyes; then + PKG_CHECK_MODULES([UDEV], [libudev], [libudev=yes], [libudev=no]) +fi +if test x$libudev = xno; then + enable_dummy_backend=no +fi +AM_CONDITIONAL(BUILD_DUMMY_BACKEND, test x$enable_dummy_backend = xyes) + +# Check for OpenGL (X11) +USE_GLX="no" +GL_DEPS_CFLAGS="" +GL_DEPS_LIBS="" +if test x$enable_glx = xyes; then + AC_CHECK_HEADERS([GL/gl.h]) + AC_CHECK_HEADERS([GL/glx.h]) + AC_CHECK_LIB(GL, glXCreateContext, [ + USE_GLX="yes" + GL_DEPS_LIBS="-lX11 -lGL" + ]) +fi +AC_SUBST(GL_DEPS_CFLAGS) +AC_SUBST(GL_DEPS_LIBS) +AM_CONDITIONAL(USE_GLX, test "$USE_GLX" = "yes") + # We only need the headers, we don't link against the DRM libraries LIBVA_CFLAGS="$DRM_CFLAGS" AC_SUBST(LIBVA_CFLAGS) @@ -116,17 +150,26 @@ AC_OUTPUT([ Makefile - src/Makefile - src/va_version.h - src/x11/Makefile + va/Makefile + va/va_version.h + va/x11/Makefile + va/glx/Makefile + va/dummy/Makefile dummy_drv_video/Makefile i965_drv_video/Makefile i965_drv_video/shaders/Makefile + i965_drv_video/shaders/h264/Makefile + i965_drv_video/shaders/h264/mc/Makefile i965_drv_video/shaders/mpeg2/Makefile i965_drv_video/shaders/mpeg2/vld/Makefile i965_drv_video/shaders/render/Makefile test/Makefile + test/basic/Makefile + test/decode/Makefile + test/putsurface/Makefile + test/encode/Makefile libva.pc libva-x11.pc + libva-glx.pc ]) diff -Nru libva-1.0.1/.cvsignore libva-1.0.1-3+0.31.1/.cvsignore --- libva-1.0.1/.cvsignore 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/.cvsignore 2010-02-12 12:05:55.000000000 +0000 @@ -0,0 +1,3 @@ +*~ +Makefile.in +Makefile diff -Nru libva-1.0.1/debian/changelog libva-1.0.1-3+0.31.1/debian/changelog --- libva-1.0.1/debian/changelog 2010-10-03 13:26:08.000000000 +0000 +++ libva-1.0.1-3+0.31.1/debian/changelog 2010-10-05 10:27:16.000000000 +0000 @@ -1,23 +1,121 @@ -libva (1.0.1-3+0.31sds9.1) maverick; urgency=low +libva (1.0.1-3+0.31.1-1+sds4) maverick; urgency=low - * Non-maintainer upload. - * maverick commit + * Upload for maverick - -- Luca Forina Tue, 03 Oct 2010 14:20:06 +0200 + -- Maarten Fonville Tue, 05 Oct 2010 11:53:46 +0200 -libva (0.31.0-1+sds9.1) hardy; urgency=low +libva (0.31.1-1+sds4) hardy; urgency=low - * Non-maintainer upload. - * Updated to libhva 0.31 - * Added missing dependency on libxfixes-dev + * Fix detection of fglrx. Use AMD Display Library. + * H.264 decoder updates to Ironlake (2010/07/13): + - Allow vaGetImage() with arbitrary region. + - Use original width/height for rendering. + - Fix rendering of subpictures. + - Fix vaGetImage() with empty VA surfaces. + - Fix VA surface type (NV12 or I420) earlier in vaCreateContext(). - -- José Bernardo Bandos Tue, 04 May 2010 12:38:38 +0200 + -- Gwenole Beauchesne Tue, 13 Jul 2010 13:53:46 +0200 + +libva (0.31.1-1+sds3) hardy; urgency=low + + * Fix vaErrorStr() for VA_STATUS_ERROR_INVALID_IMAGE_FORMAT. + * H.264 decoder updates to Ironlake (2010/07/07): + - Fix issue with different slice types within a same picture. + - Fix BSD batch buffer size. + - Fix the start of a slice for an MBAFF picture. + - Fix slice_data_bit_offset. e.g. fix BASQP1_Sony_C.jsv. + - Fix rendering to a Pixmap. i.e. allow VA/GLX to work again. + + -- Gwenole Beauchesne Wed, 07 Jul 2010 11:56:08 +0200 + +libva (0.31.1-1+sds2) hardy; urgency=low + + * H.264 decoder updates to Ironlake (2010/06/25): + - Fix register blocks for ILDB. + - Fix motion compensation kernel. + - Fix chroma issue. + * OpenGL extensions updates: + - Drop GLX 1.3 requirement. + - Fix all TFP functions to be called through a vtable. + + -- Gwenole Beauchesne Thu, 01 Jul 2010 10:59:23 +0200 + +libva (0.31.1-1+sds1) hardy; urgency=low + + * Add VA_STATUS_ERROR_INVALID_IMAGE_FORMAT. + * Update DRI2 code to support swapbuffer (Haihao Xiang). + * G45 updates: + - Fix vaTerminate(). + - Drop vaDeriveImage(). Prefer 2x 1080p streams decode capability. + * Update Ironlake H.264 decoder from i965_h264 branch (2010/06/08): + - Add support for in-loop deblocking step. + - Increase number of threads used for decoding. + - Lower graphics memory usage to enable 2 HD streams decoding. + * Upgrade to GIT snapshot 2010/06/04: + - Add VA/GLX extensions. + - Add support for Android. + - Add JPEG encoding support. + - Fix H.264 encoding support. + + -- Gwenole Beauchesne Wed, 09 Jun 2010 09:01:23 +0200 + +libva (0.31.0-1+sds13) hardy; urgency=low + + * Fix default OpenGL implementation for XBMC. + * Fix compat buffers destruction in vaTerminate(). + * G45 updates: + - Add NV12 image format. + - Add H.264 decoder from i965_h264 branch (2010/04/19). + - Don't clobber internal functions with system definitions. + + -- Gwenole Beauchesne Wed, 28 Apr 2010 15:29:56 +0200 + +libva (0.31.0-1+sds12) hardy; urgency=low + + * G45 updates: + - Add I420 image format. + - Fix destruction of image created by vaDeriveImage(). + * OpenGL extensions updates: + - Fix vaCopySurfaceGLX() to handle the postprocessing flags. + - Fix default implementation with TFP + FBO. Requires GLX 1.3. + - Fix vaCreateSurfaceGLX() to handle GL_RGBA8 internal formats. + + -- Gwenole Beauchesne Sun, 04 Apr 2010 07:56:59 +0200 + +libva (0.31.0-1+sds11) hardy; urgency=low + + * G45 updates: + - Add vaDeriveImage(). + - Fix YV12 image format. + * OpenGL extensions updates: + - Dynamically allocate VA/GLX vtable. + - Fix display context destruction chain. + * Upgrade to GIT snapshot 2010/03/08: + - Merge SDS patches 010, 320. + - Fix test/encode/h264encode.c issue. + + -- Gwenole Beauchesne Fri, 26 Feb 2010 10:26:13 +0000 + +libva (0.31.0-1+sds10) hardy; urgency=low + + * Add detection of Broadcom Crystal HD chip. + * Require vaDriverInit() function to include SDS API version. + * OpenGL extensions updates: + - Drop the 'bind' API. Only keep vaCopySurfaceGLX(). + - Fix FBO check for the generic implementation with TFP. + * Compat: strip vaPutSurface() flags to match older API. + - This fixes deinterlacing support with GMA500 "psb" driver. + * Upgrade to GIT snapshot 2009/12/17: + - Add a "magic" number to VADisplayContext. + - Add more test programs, including h264 encoding. + + -- Gwenole Beauchesne Tue, 23 Feb 2010 11:29:52 +0000 libva (0.31.0-1+sds9) hardy; urgency=low * Add extra picture info for VDPAU/MPEG-4. - -- Mon, 23 Nov 2009 09:48:39 +0000 + -- Gwenole Beauchesne Mon, 23 Nov 2009 09:48:39 +0000 libva (0.31.0-1+sds8) hardy; urgency=low @@ -26,7 +124,7 @@ - Merge in some G45 fixes and additions. - Add VA_STATUS_ERROR_SURFACE_IN_DISPLAYING. - -- Fri, 20 Nov 2009 10:44:07 +0000 + -- Gwenole Beauchesne Fri, 20 Nov 2009 10:44:07 +0000 libva (0.31.0-1+sds7) hardy; urgency=low @@ -37,7 +135,7 @@ - Fix return value for unimplemented functions. - Fix vaPutSurface() to handle cliprects (up to 80). - -- Wed, 04 Nov 2009 12:16:11 +0000 + -- Gwenole Beauchesne Wed, 04 Nov 2009 12:16:11 +0000 libva (0.31.0-1+sds6) hardy; urgency=low @@ -48,7 +146,7 @@ - Fix rendering of subpictures (extra level of scaling). - Fix subpicture palette upload (IA44 and AI44 formats for now). - -- Fri, 30 Oct 2009 14:17:00 +0000 + -- Gwenole Beauchesne Fri, 30 Oct 2009 14:17:00 +0000 libva (0.31.0-1+sds5) hardy; urgency=low @@ -58,7 +156,7 @@ - Add vaQueryDisplayAttributes() as a no-op. - Fix vaQueryImageFormats() to return 0 formats at this time. - -- Thu, 24 Sep 2009 12:23:49 +0000 + -- Gwenole Beauchesne Thu, 24 Sep 2009 12:23:49 +0000 libva (0.31.0-1+sds4) hardy; urgency=low @@ -71,41 +169,41 @@ - Merge in SDS patches 001, 201, 202. - i965_drv_driver: use the horizontal position of a slice. - -- Tue, 22 Sep 2009 13:15:40 +0000 + -- Gwenole Beauchesne Tue, 22 Sep 2009 13:15:40 +0000 libva (0.31.0-1+sds3) hardy; urgency=low * Fix detection of ATI chipsets with fglrx >= 8.66-RC1. * Add VASliceParameterBufferMPEG2.slice_horizontal_position for i965 driver. - -- Thu, 10 Sep 2009 13:42:05 +0000 + -- Gwenole Beauchesne Thu, 10 Sep 2009 13:42:05 +0000 libva (0.31.0-1+sds2) hardy; urgency=low * Upgrade to GIT snapshot 2009/09/07. * Add generic VA/GLX implementation with TFP and FBO. - -- Tue, 08 Sep 2009 12:26:18 +0000 + -- Gwenole Beauchesne Tue, 08 Sep 2009 12:26:18 +0000 libva (0.31.0-1+sds1) hardy; urgency=low * Upgrade to VA API version 0.31 (2009/09/02 snapshot). * Add drmOpenOnce() / drmCloseOnce() replacements for libdrm < 2.3. - -- Wed, 02 Sep 2009 12:06:45 +0000 + -- Gwenole Beauchesne Wed, 02 Sep 2009 12:06:45 +0000 libva (0.30.4-1+sds6) hardy; urgency=low * Add OpenGL extensions (v3). - -- Fri, 28 Aug 2009 11:16:11 +0000 + -- Gwenole Beauchesne Fri, 28 Aug 2009 11:16:11 +0000 libva (0.30.4-1+sds5) hardy; urgency=low * Add VA_STATUS_ERROR_UNIMPLEMENTED. * Add vaBindSurfaceToTextureGLX() and vaReleaseSurfaceFromTextureGLX(). - -- Wed, 26 Aug 2009 12:40:31 +0000 + -- Gwenole Beauchesne Wed, 26 Aug 2009 12:40:31 +0000 libva (0.30.4-1+sds4) hardy; urgency=low @@ -113,14 +211,14 @@ * Fix NVIDIA driver version check. * Fix libva-x11-VERSION.so.* build dependencies. - -- Tue, 18 Aug 2009 08:38:56 +0000 + -- Gwenole Beauchesne Tue, 18 Aug 2009 08:38:56 +0000 libva (0.30.4-1+sds3) hardy; urgency=low * Fix build of i965_drv_video.so (Paul Bender). * Check for libdrm >= 2.4 prior to allowing build of i965_drv_video.so. - -- Mon, 06 Jul 2009 10:58:19 +0000 + -- Gwenole Beauchesne Mon, 06 Jul 2009 10:58:19 +0000 libva (0.30.4-1+sds2) hardy; urgency=low @@ -130,48 +228,48 @@ * Fix VAEncSliceParameterBuffer compat thunk for 0.30 drivers. * Make the libva1 package own /usr/lib/va/drivers/ directory. - -- Thu, 02 Jul 2009 13:29:38 +0000 + -- Gwenole Beauchesne Thu, 02 Jul 2009 13:29:38 +0000 libva (0.30.4-1+sds1) hardy; urgency=low * Upgrade to VA API version 0.30.4. - -- Thu, 02 Jul 2009 09:30:15 +0000 + -- Gwenole Beauchesne Thu, 02 Jul 2009 09:30:15 +0000 libva (0.30-1+sds1) hardy; urgency=low * Upgrade to VA API version 0.30. * Fix vainfo and few build issues. - -- Thu, 25 Jun 2009 15:31:07 +0000 + -- Gwenole Beauchesne Thu, 25 Jun 2009 15:31:07 +0000 libva (0.29-2+sds12) hardy; urgency=low * Add debug package (libva1-dbg). * Fix va_IsIntelBuffer() for IEGD. - -- Thu, 16 Apr 2009 11:16:31 +0000 + -- Gwenole Beauchesne Thu, 16 Apr 2009 11:16:31 +0000 libva (0.29-2+sds11) hardy; urgency=low * Add VASliceParameterBufferBase. * Add new bit to signal VC-1 skipped P-frames. - -- Fri, 20 Mar 2009 13:23:59 +0000 + -- Gwenole Beauchesne Fri, 20 Mar 2009 13:23:59 +0000 libva (0.29-2+sds10) hardy; urgency=low * Rework library SONAME patch. * Rename MAKEFOURCC to VA_FOURCC. - -- Mon, 02 Mar 2009 15:50:54 +0000 + -- Gwenole Beauchesne Mon, 02 Mar 2009 15:50:54 +0000 libva (0.29-2+sds9) hardy; urgency=low * Lower libdrm-dev requirements. Drop libgl-dev build-dep. * Add H.264 reference_pic_flag (nal_ref_idc != 0) for VDPAU and XvBA. - -- Thu, 05 Feb 2009 13:34:49 +0000 + -- Gwenole Beauchesne Thu, 05 Feb 2009 13:34:49 +0000 libva (0.29-2+sds8) hardy; urgency=low @@ -179,21 +277,21 @@ * Set drivers path to LIBDIR/va-API_VERSION/drivers. * Drop drivers info retrieval through GLX. - -- Wed, 28 Jan 2009 09:56:13 +0000 + -- Gwenole Beauchesne Wed, 28 Jan 2009 09:56:13 +0000 libva (0.29-2+sds7) hardy; urgency=low * Add extra VC-1 info for VDPAU backend. * Make the API change clear in VAPictureH264 too. - -- Tue, 20 Jan 2009 12:26:16 +0000 + -- Gwenole Beauchesne Tue, 20 Jan 2009 12:26:16 +0000 libva (0.29-2+sds6) hardy; urgency=low * The H.264 additions require an ABI change. * Add compatibility layer with upstream libVA 0.29 buffers. - -- Fri, 16 Jan 2009 10:18:55 +0000 + -- Gwenole Beauchesne Fri, 16 Jan 2009 10:18:55 +0000 libva (0.29-2+sds5) hardy; urgency=low @@ -201,34 +299,34 @@ * Add extra H.264 info for VDPAU backend. * Add for versioning helpers. - -- Tue, 13 Jan 2009 16:56:49 +0000 + -- Gwenole Beauchesne Tue, 13 Jan 2009 16:56:49 +0000 libva (0.29-2+sds4) hardy; urgency=low * Split libVA for Core and Display interfaces. * Allow X11 backend to gather driver info through GLX. - -- Fri, 09 Jan 2009 14:25:03 +0000 + -- Gwenole Beauchesne Fri, 09 Jan 2009 14:25:03 +0000 libva (0.29-2+sds3) unstable; urgency=low * Migrate SONAME to libva-VERSION.so.MAJOR. - -- Thu, 08 Jan 2009 16:53:51 +0000 + -- Gwenole Beauchesne Thu, 08 Jan 2009 16:53:51 +0000 libva (0.29-2+sds2) hardy; urgency=low * Add MIT license file. * Add new testcase from upstream (actual MPEG-2 decoding). - -- Thu, 20 Nov 2008 13:07:36 +0000 + -- Gwenole Beauchesne Thu, 20 Nov 2008 13:07:36 +0000 libva (0.29-2+sds1) unstable; urgency=low * Allow SMP build. * Set drivers path to /usr/lib/xorg/modules/drivers - -- Fri, 31 Oct 2008 15:29:41 +0000 + -- Gwenole Beauchesne Fri, 31 Oct 2008 15:29:41 +0000 libva (0.29-2) gaston; urgency=low diff -Nru libva-1.0.1/debian/control libva-1.0.1-3+0.31.1/debian/control --- libva-1.0.1/debian/control 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/debian/control 2010-07-01 10:45:05.000000000 +0000 @@ -4,12 +4,13 @@ Build-Depends: cdbs, debhelper (>= 5), autotools-dev, - libdrm-dev, + libdrm-dev (>= 2.4), x11proto-xext-dev, libxext-dev, - libgl1-mesa-dev, + libxfixes-dev, + libgl-dev, pkg-config, - automake1.9, libtool, libxfixes-dev + automake1.9, libtool Standards-Version: 3.7.2 Section: libs @@ -17,7 +18,7 @@ Section: libdevel Architecture: any Depends: libva1 (= ${binary:Version}), - libdrm-dev, + libdrm-dev (>= 2.4), pkg-config Conflicts: libva-0.29-dev Replaces: libva-0.29-dev @@ -48,3 +49,16 @@ . This package contains the debug files. +Package: libva-driver-i965 +Section: libs +Architecture: any +Depends: ${shlibs:Depends} +Description: Video Acceleration (VA) API for Linux -- driver for Intel G45 cores + The libva library implements the Video Acceleration (VA) API for Linux. + The library loads a hardware dependendent driver. + . + This package contains the driver for Intel G45 cores: + - Intel GMA X4500 + - Intel GMA X4500HD + - Intel GMA 4500MHD + - Intel HD Graphics (Core i3/i5/i7 IGP) diff -Nru libva-1.0.1/debian/control.driver.i965 libva-1.0.1-3+0.31.1/debian/control.driver.i965 --- libva-1.0.1/debian/control.driver.i965 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/debian/control.driver.i965 2010-07-01 10:39:09.000000000 +0000 @@ -0,0 +1,13 @@ +Package: libva-driver-i965 +Section: libs +Architecture: any +Depends: ${shlibs:Depends} +Description: Video Acceleration (VA) API for Linux -- driver for Intel G45 cores + The libva library implements the Video Acceleration (VA) API for Linux. + The library loads a hardware dependendent driver. + . + This package contains the driver for Intel G45 cores: + - Intel GMA X4500 + - Intel GMA X4500HD + - Intel GMA 4500MHD + - Intel HD Graphics (Core i3/i5/i7 IGP) diff -Nru libva-1.0.1/debian/control.in libva-1.0.1-3+0.31.1/debian/control.in --- libva-1.0.1/debian/control.in 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/debian/control.in 2010-07-01 10:40:10.000000000 +0000 @@ -0,0 +1,50 @@ +Source: libva +Priority: extra +Maintainer: Waldo Bastian +Build-Depends: cdbs, + debhelper (>= 5), + autotools-dev, + libdrm-dev (>= @LIBDRM_VERSION@), + x11proto-xext-dev, + libxext-dev, + libxfixes-dev, + libgl-dev, + pkg-config, + automake1.9, libtool +Standards-Version: 3.7.2 +Section: libs + +Package: libva-dev +Section: libdevel +Architecture: any +Depends: libva1 (= ${binary:Version}), + libdrm-dev (>= @LIBDRM_VERSION@), + pkg-config +Conflicts: libva-0.29-dev +Replaces: libva-0.29-dev +Description: Video Acceleration (VA) API for Linux -- development files + The libva library implements the Video Acceleration (VA) API for Linux. + The library loads a hardware dependendent driver. + . + This package provides the development environment for libva. + +Package: libva1 +Section: libs +Architecture: any +Depends: ${shlibs:Depends} +Conflicts: libva-0.29-0 +Replaces: libva-0.29-0 +Provides: libva-0.29-0 +Description: Video Acceleration (VA) API for Linux -- runtime + The libva library implements the Video Acceleration (VA) API for Linux. + The library loads a hardware dependendent driver. + +Package: libva1-dbg +Section: libdevel +Architecture: any +Depends: libva1 (= ${Source-Version}) +Description: Video Acceleration (VA) API for Linux -- runtime + The libva library implements the Video Acceleration (VA) API for Linux. + The library loads a hardware dependendent driver. + . + This package contains the debug files. diff -Nru libva-1.0.1/debian/libva-driver-i965.install libva-1.0.1-3+0.31.1/debian/libva-driver-i965.install --- libva-1.0.1/debian/libva-driver-i965.install 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/debian/libva-driver-i965.install 2010-06-10 09:08:10.000000000 +0000 @@ -0,0 +1 @@ +debian/tmp/usr/lib/va/drivers/i965_drv_video.so diff -Nru libva-1.0.1/debian/patches/031_g45_h264_decoder_check_disable.patch libva-1.0.1-3+0.31.1/debian/patches/031_g45_h264_decoder_check_disable.patch --- libva-1.0.1/debian/patches/031_g45_h264_decoder_check_disable.patch 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/debian/patches/031_g45_h264_decoder_check_disable.patch 2010-07-12 09:13:10.000000000 +0000 @@ -0,0 +1,133 @@ +commit 7a5921d092674b92c85c0d2c76e5f912784ec169 +Author: Gwenole Beauchesne +Date: Wed Apr 28 18:43:04 2010 +0200 + + [G45] Fix build without proper libdrm updates. + +diff --git a/i965_drv_video/i965_drv_video.c b/i965_drv_video/i965_drv_video.c +index b8d622d..9482b18 100644 +--- a/i965_drv_video/i965_drv_video.c ++++ b/i965_drv_video/i965_drv_video.c +@@ -121,9 +121,11 @@ i965_QueryConfigProfiles(VADriverContextP ctx, + + profile_list[i++] = VAProfileMPEG2Simple; + profile_list[i++] = VAProfileMPEG2Main; ++#ifndef DISABLE_H264_DECODER + profile_list[i++] = VAProfileH264Baseline; + profile_list[i++] = VAProfileH264Main; + profile_list[i++] = VAProfileH264High; ++#endif + + /* If the assert fails then I965_MAX_PROFILES needs to be bigger */ + assert(i <= I965_MAX_PROFILES); +@@ -147,12 +149,14 @@ i965_QueryConfigEntrypoints(VADriverContextP ctx, + entrypoint_list[0] = VAEntrypointVLD; + break; + ++#ifndef DISABLE_H264_DECODER + case VAProfileH264Baseline: + case VAProfileH264Main: + case VAProfileH264High: + *num_entrypoints = 1; + entrypoint_list[0] = VAEntrypointVLD; + break; ++#endif + + default: + vaStatus = VA_STATUS_ERROR_UNSUPPORTED_PROFILE; +@@ -249,6 +253,7 @@ i965_CreateConfig(VADriverContextP ctx, + } + break; + ++#ifndef DISABLE_H264_DECODER + case VAProfileH264Baseline: + case VAProfileH264Main: + case VAProfileH264High: +@@ -257,8 +262,8 @@ i965_CreateConfig(VADriverContextP ctx, + } else { + vaStatus = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT; + } +- + break; ++#endif + + default: + vaStatus = VA_STATUS_ERROR_UNSUPPORTED_PROFILE; +@@ -720,11 +725,13 @@ i965_CreateContext(VADriverContextP ctx, + } + + switch (obj_config->profile) { ++#ifndef DISABLE_H264_DECODER + case VAProfileH264Baseline: + case VAProfileH264Main: + case VAProfileH264High: + render_state->interleaved_uv = 1; + break; ++#endif + default: + render_state->interleaved_uv = 0; + } +@@ -967,11 +974,13 @@ i965_BeginPicture(VADriverContextP ctx, + vaStatus = VA_STATUS_SUCCESS; + break; + ++#ifndef DISABLE_H264_DECODER + case VAProfileH264Baseline: + case VAProfileH264Main: + case VAProfileH264High: + vaStatus = VA_STATUS_SUCCESS; + break; ++#endif + + default: + assert(0); +diff --git a/i965_drv_video/intel_batchbuffer.c b/i965_drv_video/intel_batchbuffer.c +index abe548e..c592b52 100644 +--- a/i965_drv_video/intel_batchbuffer.c ++++ b/i965_drv_video/intel_batchbuffer.c +@@ -33,6 +33,17 @@ + + #include "intel_batchbuffer.h" + ++#ifdef DISABLE_H264_DECODER ++/* XXX: also add a run-time check for exec2 support */ ++#define drm_intel_bo_mrb_exec local_drm_intel_bo_mrb_exec ++static int drm_intel_bo_mrb_exec(drm_intel_bo *bo, int used, ++ drm_clip_rect_t * cliprects, int num_cliprects, ++ int DR4, int ring_flag) ++{ ++ return drm_intel_bo_exec(bo, used, cliprects, num_cliprects, DR4); ++} ++#endif ++ + static void + intel_batchbuffer_reset(struct intel_batchbuffer *batch) + { +diff --git a/i965_drv_video/intel_driver.h b/i965_drv_video/intel_driver.h +index ffa8cad..1dccaf8 100644 +--- a/i965_drv_video/intel_driver.h ++++ b/i965_drv_video/intel_driver.h +@@ -17,6 +17,23 @@ + #define INLINE + #endif + ++#ifndef I915_EXEC_RENDER ++#ifdef ON_RENDER_RING ++#define I915_EXEC_RENDER ON_RENDER_RING ++#else ++#define I915_EXEC_RENDER (1 << 0) ++#define DISABLE_H264_DECODER ++#endif ++#endif ++#ifndef I915_EXEC_BSD ++#ifdef ON_BSD_RING ++#define I915_EXEC_BSD ON_BSD_RING ++#else ++#define I915_EXEC_BSD (1 << 1) ++#define DISABLE_H264_DECODER ++#endif ++#endif ++ + #define BATCH_SIZE 0x10000 + #define BATCH_RESERVED 0x10 + diff -Nru libva-1.0.1/debian/patches/032_g45_fix_subpic_rendering.patch libva-1.0.1-3+0.31.1/debian/patches/032_g45_fix_subpic_rendering.patch --- libva-1.0.1/debian/patches/032_g45_fix_subpic_rendering.patch 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/debian/patches/032_g45_fix_subpic_rendering.patch 2010-07-13 14:53:47.000000000 +0000 @@ -0,0 +1,25 @@ +commit 6c8d6635906bf6b30f66973a49b7972da151d136 +Author: Gwenole Beauchesne +Date: Tue Jul 13 16:55:29 2010 +0200 + + [G45] Fix rendering of subpictures. + +diff --git a/i965_drv_video/i965_render.c b/i965_drv_video/i965_render.c +index ed1450d..675f30b 100644 +--- a/i965_drv_video/i965_render.c ++++ b/i965_drv_video/i965_render.c +@@ -813,12 +813,8 @@ i965_subpic_render_upload_vertex(VADriverContextP ctx, + struct object_surface *obj_surface = SURFACE(surface); + struct object_subpic *obj_subpic = SUBPIC(obj_surface->subpic); + +- const float psx = (float)obj_surface->width / (float)obj_subpic->width; +- const float psy = (float)obj_surface->height / (float)obj_subpic->height; +- const float ssx = (float)output_rect->width / (float)obj_surface->width; +- const float ssy = (float)output_rect->height / (float)obj_surface->height; +- const float sx = psx * ssx; +- const float sy = psy * ssy; ++ const float sx = output_rect->width / (float)obj_surface->orig_width; ++ const float sy = output_rect->height / (float)obj_surface->orig_height; + float *vb, tx1, tx2, ty1, ty2, x1, x2, y1, y2; + int i = 0; + diff -Nru libva-1.0.1/debian/patches/033_g45_add_rgba_subpic.patch libva-1.0.1-3+0.31.1/debian/patches/033_g45_add_rgba_subpic.patch --- libva-1.0.1/debian/patches/033_g45_add_rgba_subpic.patch 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/debian/patches/033_g45_add_rgba_subpic.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,111 +0,0 @@ -From 6622e8eba85cea476f8ef5b8c3620c4a0f024dcd Mon Sep 17 00:00:00 2001 -From: Gwenole Beauchesne -Date: Wed, 4 Nov 2009 10:56:54 +0000 -Subject: [PATCH] [G45] Add RGBA subpictures. - ---- - i965_drv_video/i965_drv_video.c | 18 ++++++++++++++++++ - i965_drv_video/i965_drv_video.h | 3 ++- - i965_drv_video/i965_render.c | 8 ++++---- - 3 files changed, 24 insertions(+), 5 deletions(-) - -diff --git a/i965_drv_video/i965_drv_video.c b/i965_drv_video/i965_drv_video.c -index 8f4bfc1..92c4785 100644 ---- a/i965_drv_video/i965_drv_video.c -+++ b/i965_drv_video/i965_drv_video.c -@@ -70,6 +70,14 @@ i965_subpic_formats_map[I965_MAX_SUBPIC_FORMATS + 1] = { - { I965_SURFACETYPE_INDEXED, I965_SURFACEFORMAT_A4P4_UNORM, - { VA_FOURCC('A','I','4','4'), VA_MSB_FIRST, 8, }, - 0 }, -+ { I965_SURFACETYPE_RGBA, I965_SURFACEFORMAT_B8G8R8A8_UNORM, -+ { VA_FOURCC('B','G','R','A'), VA_LSB_FIRST, 32, -+ 32, 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000 }, -+ 0 }, -+ { I965_SURFACETYPE_RGBA, I965_SURFACEFORMAT_R8G8B8A8_UNORM, -+ { VA_FOURCC('R','G','B','A'), VA_LSB_FIRST, 32, -+ 32, 0x000000ff, 0x0000ff00, 0x00ff0000, 0xff000000 }, -+ 0 }, - }; - - static const i965_subpic_format_map_t * -@@ -467,6 +475,7 @@ i965_CreateSubpicture(VADriverContextP ctx, - obj_subpic->format = m->format; - obj_subpic->width = obj_image->image.width; - obj_subpic->height = obj_image->image.height; -+ obj_subpic->pitch = obj_image->image.pitches[0]; - obj_subpic->bo = obj_image->bo; - return VA_STATUS_SUCCESS; - } -@@ -1218,6 +1227,15 @@ i965_CreateImage(VADriverContextP ctx, - image->component_order[1] = 'G'; - image->component_order[2] = 'B'; - break; -+ case VA_FOURCC('A','R','G','B'): -+ case VA_FOURCC('A','B','G','R'): -+ case VA_FOURCC('B','G','R','A'): -+ case VA_FOURCC('R','G','B','A'): -+ image->num_planes = 1; -+ image->pitches[0] = width * 4; -+ image->offsets[0] = 0; -+ image->data_size = image->offsets[0] + image->pitches[0] * height; -+ break; - default: - goto error; - } -diff --git a/i965_drv_video/i965_drv_video.h b/i965_drv_video/i965_drv_video.h -index c95c799..4d775da 100644 ---- a/i965_drv_video/i965_drv_video.h -+++ b/i965_drv_video/i965_drv_video.h -@@ -42,7 +42,7 @@ - #define I965_MAX_ENTRYPOINTS 5 - #define I965_MAX_CONFIG_ATTRIBUTES 10 - #define I965_MAX_IMAGE_FORMATS 10 --#define I965_MAX_SUBPIC_FORMATS 2 -+#define I965_MAX_SUBPIC_FORMATS 4 - #define I965_MAX_DISPLAY_ATTRIBUTES 4 - #define I965_STR_VENDOR "i965 Driver 0.1" - -@@ -124,6 +124,7 @@ struct object_subpic - unsigned int format; - int width; - int height; -+ int pitch; - dri_bo *bo; - }; - -diff --git a/i965_drv_video/i965_render.c b/i965_drv_video/i965_render.c -index f105e90..0476087 100644 ---- a/i965_drv_video/i965_render.c -+++ b/i965_drv_video/i965_render.c -@@ -586,7 +586,7 @@ i965_subpic_render_src_surface_state(VADriverContextP ctx, - int index, - dri_bo *region, - unsigned long offset, -- int w, int h, int format) -+ int w, int h, int p, int format) - { - struct i965_driver_data *i965 = i965_driver_data(ctx); - struct i965_render_state *render_state = &i965->render_state; -@@ -620,7 +620,7 @@ i965_subpic_render_src_surface_state(VADriverContextP ctx, - ss->ss2.mip_count = 0; - ss->ss2.render_target_rotation = 0; - -- ss->ss3.pitch = w - 1; -+ ss->ss3.pitch = p - 1; - - dri_bo_emit_reloc(ss_bo, - I915_GEM_DOMAIN_SAMPLER, 0, -@@ -678,8 +678,8 @@ i965_subpic_render_src_surfaces_state(VADriverContextP ctx, - region = obj_surface->bo; - subpic_region = obj_image->bo; - /*subpicture surface*/ -- i965_subpic_render_src_surface_state(ctx, 1, subpic_region, 0, obj_subpic->width, obj_subpic->height, obj_subpic->format); -- i965_subpic_render_src_surface_state(ctx, 2, subpic_region, 0, obj_subpic->width, obj_subpic->height, obj_subpic->format); -+ i965_subpic_render_src_surface_state(ctx, 1, subpic_region, 0, obj_subpic->width, obj_subpic->height, obj_subpic->pitch, obj_subpic->format); -+ i965_subpic_render_src_surface_state(ctx, 2, subpic_region, 0, obj_subpic->width, obj_subpic->height, obj_subpic->pitch, obj_subpic->format); - } - - static void --- -1.5.4.3 - diff -Nru libva-1.0.1/debian/patches/034_g45_fix_return_for_unimpl.patch libva-1.0.1-3+0.31.1/debian/patches/034_g45_fix_return_for_unimpl.patch --- libva-1.0.1/debian/patches/034_g45_fix_return_for_unimpl.patch 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/debian/patches/034_g45_fix_return_for_unimpl.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,83 +0,0 @@ -From 3935c6a836b8f90947f0af658a76b97a08a03c67 Mon Sep 17 00:00:00 2001 -From: Gwenole Beauchesne -Date: Wed, 4 Nov 2009 13:23:40 +0000 -Subject: [PATCH] [G45] Don't return VA_STATUS_SUCCESS for unimplemented functions. - ---- - i965_drv_video/i965_drv_video.c | 18 +++++++++++------- - 1 files changed, 11 insertions(+), 7 deletions(-) - -diff --git a/i965_drv_video/i965_drv_video.c b/i965_drv_video/i965_drv_video.c -index 10baffb..d8a7bd1 100644 ---- a/i965_drv_video/i965_drv_video.c -+++ b/i965_drv_video/i965_drv_video.c -@@ -534,7 +534,8 @@ i965_SetSubpictureImage(VADriverContextP ctx, - VASubpictureID subpicture, - VAImageID image) - { -- return VA_STATUS_SUCCESS; -+ /* TODO */ -+ return VA_STATUS_ERROR_UNIMPLEMENTED; - } - - VAStatus -@@ -544,7 +545,8 @@ i965_SetSubpictureChromakey(VADriverContextP ctx, - unsigned int chromakey_max, - unsigned int chromakey_mask) - { -- return VA_STATUS_SUCCESS; -+ /* TODO */ -+ return VA_STATUS_ERROR_UNIMPLEMENTED; - } - - VAStatus -@@ -552,7 +554,8 @@ i965_SetSubpictureGlobalAlpha(VADriverContextP ctx, - VASubpictureID subpicture, - float global_alpha) - { -- return VA_STATUS_SUCCESS; -+ /* TODO */ -+ return VA_STATUS_ERROR_UNIMPLEMENTED; - } - - VAStatus -@@ -1141,7 +1144,7 @@ i965_GetDisplayAttributes(VADriverContextP ctx, - int num_attributes) - { - /* TODO */ -- return VA_STATUS_ERROR_UNKNOWN; -+ return VA_STATUS_ERROR_UNIMPLEMENTED; - } - - /* -@@ -1156,7 +1159,7 @@ i965_SetDisplayAttributes(VADriverContextP ctx, - int num_attributes) - { - /* TODO */ -- return VA_STATUS_ERROR_UNKNOWN; -+ return VA_STATUS_ERROR_UNIMPLEMENTED; - } - - VAStatus -@@ -1166,7 +1169,7 @@ i965_DbgCopySurfaceToBuffer(VADriverContextP ctx, - unsigned int *stride) /* out */ - { - /* TODO */ -- return VA_STATUS_ERROR_UNKNOWN; -+ return VA_STATUS_ERROR_UNIMPLEMENTED; - } - - static VAStatus -@@ -1318,7 +1321,8 @@ VAStatus i965_DeriveImage(VADriverContextP ctx, - VASurfaceID surface, - VAImage *image) /* out */ - { -- return VA_STATUS_SUCCESS; -+ /* TODO */ -+ return VA_STATUS_ERROR_OPERATION_FAILED; - } - - static void --- -1.5.4.3 - diff -Nru libva-1.0.1/debian/patches/035_g45_add_yv12_image_format.patch libva-1.0.1-3+0.31.1/debian/patches/035_g45_add_yv12_image_format.patch --- libva-1.0.1/debian/patches/035_g45_add_yv12_image_format.patch 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/debian/patches/035_g45_add_yv12_image_format.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,102 +0,0 @@ -From 23b23e8d65551779f10aedddee7882c2e71ac162 Mon Sep 17 00:00:00 2001 -From: Gwenole Beauchesne -Date: Wed, 4 Nov 2009 13:01:44 +0000 -Subject: [PATCH] [G45] Add YV12 image format. - ---- - i965_drv_video/i965_drv_video.c | 50 ++++++++++++++++++++++++++++++++++++++- - i965_drv_video/i965_drv_video.h | 2 +- - 2 files changed, 50 insertions(+), 2 deletions(-) - -diff --git a/i965_drv_video/i965_drv_video.c b/i965_drv_video/i965_drv_video.c -index 1f026bc..8558d0e 100644 ---- a/i965_drv_video/i965_drv_video.c -+++ b/i965_drv_video/i965_drv_video.c -@@ -54,6 +54,36 @@ enum { - I965_SURFACETYPE_INDEXED - }; - -+/* List of supported image formats */ -+typedef struct { -+ unsigned int type; -+ VAImageFormat va_format; -+} i965_image_format_map_t; -+ -+static const i965_image_format_map_t -+i965_image_formats_map[I965_MAX_IMAGE_FORMATS + 1] = { -+ { I965_SURFACETYPE_YUV, -+ { VA_FOURCC('Y','V','1','2'), VA_LSB_FIRST, 12, } }, -+}; -+ -+static const i965_image_format_map_t * -+get_image_format(const VAImageFormat *va_format) -+{ -+ unsigned int i; -+ for (i = 0; i965_image_formats_map[i].type != 0; i++) { -+ const i965_image_format_map_t * const m = &i965_image_formats_map[i]; -+ if (m->va_format.fourcc == va_format->fourcc && -+ (m->type == I965_SURFACETYPE_RGBA ? -+ (m->va_format.byte_order == va_format->byte_order && -+ m->va_format.red_mask == va_format->red_mask && -+ m->va_format.green_mask == va_format->green_mask && -+ m->va_format.blue_mask == va_format->blue_mask && -+ m->va_format.alpha_mask == va_format->alpha_mask) : 1)) -+ return m; -+ } -+ return NULL; -+} -+ - /* List of supported subpicture formats */ - typedef struct { - unsigned int type; -@@ -398,8 +428,16 @@ i965_QueryImageFormats(VADriverContextP ctx, - VAImageFormat *format_list, /* out */ - int *num_formats) /* out */ - { -+ int n; -+ -+ for (n = 0; i965_image_formats_map[n].va_format.fourcc != 0; n++) { -+ const i965_image_format_map_t * const m = &i965_image_formats_map[n]; -+ if (format_list) -+ format_list[n] = m->va_format; -+ } -+ - if (num_formats) -- *num_formats = 0; -+ *num_formats = n; - - return VA_STATUS_SUCCESS; - } -@@ -1236,6 +1274,16 @@ i965_CreateImage(VADriverContextP ctx, - image->offsets[0] = 0; - image->data_size = image->offsets[0] + image->pitches[0] * height; - break; -+ case VA_FOURCC('Y','V','1','2'): -+ image->num_planes = 3; -+ image->pitches[0] = width; -+ image->offsets[0] = 0; -+ image->pitches[1] = width2; -+ image->offsets[1] = size; -+ image->pitches[2] = width2; -+ image->offsets[2] = size + size2; -+ image->data_size = size + 2 * size2; -+ break; - default: - goto error; - } -diff --git a/i965_drv_video/i965_drv_video.h b/i965_drv_video/i965_drv_video.h -index 4d775da..f512793 100644 ---- a/i965_drv_video/i965_drv_video.h -+++ b/i965_drv_video/i965_drv_video.h -@@ -41,7 +41,7 @@ - #define I965_MAX_PROFILES 11 - #define I965_MAX_ENTRYPOINTS 5 - #define I965_MAX_CONFIG_ATTRIBUTES 10 --#define I965_MAX_IMAGE_FORMATS 10 -+#define I965_MAX_IMAGE_FORMATS 1 - #define I965_MAX_SUBPIC_FORMATS 4 - #define I965_MAX_DISPLAY_ATTRIBUTES 4 - #define I965_STR_VENDOR "i965 Driver 0.1" --- -1.5.4.3 - diff -Nru libva-1.0.1/debian/patches/036_g45_add_vaGetImage.patch libva-1.0.1-3+0.31.1/debian/patches/036_g45_add_vaGetImage.patch --- libva-1.0.1/debian/patches/036_g45_add_vaGetImage.patch 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/debian/patches/036_g45_add_vaGetImage.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,71 +0,0 @@ -From 37f40c0cdc9667907dfb784874b42fb16c2c9bde Mon Sep 17 00:00:00 2001 -From: Gwenole Beauchesne -Date: Wed, 4 Nov 2009 13:16:34 +0000 -Subject: [PATCH] =?utf-8?q?[G45]=C2=A0Implement=20vaGetImage()=20for=20full-sized=20surface=20readback.?= -MIME-Version: 1.0 -Content-Type: text/plain; charset=utf-8 -Content-Transfer-Encoding: 8bit - ---- - i965_drv_video/i965_drv_video.c | 45 ++++++++++++++++++++++++++++++++++++++- - 1 files changed, 44 insertions(+), 1 deletions(-) - -diff --git a/i965_drv_video/i965_drv_video.c b/i965_drv_video/i965_drv_video.c -index 8558d0e..10baffb 100644 ---- a/i965_drv_video/i965_drv_video.c -+++ b/i965_drv_video/i965_drv_video.c -@@ -1388,7 +1388,50 @@ i965_GetImage(VADriverContextP ctx, - unsigned int height, - VAImageID image) - { -- return VA_STATUS_SUCCESS; -+ struct i965_driver_data *i965 = i965_driver_data(ctx); -+ -+ struct object_surface *obj_surface = SURFACE(surface); -+ if (!obj_surface) -+ return VA_STATUS_ERROR_INVALID_SURFACE; -+ -+ struct object_image *obj_image = IMAGE(image); -+ if (!obj_image) -+ return VA_STATUS_ERROR_INVALID_IMAGE; -+ -+ /* XXX: we only support full-size surface readback */ -+ if (x != 0 || -+ y != 0 || -+ width != obj_surface->width || -+ height != obj_surface->height) -+ return VA_STATUS_ERROR_INVALID_PARAMETER; -+ -+ /* XXX: we only support 1:1 image copies */ -+ if (width != obj_image->image.width || -+ height != obj_image->image.height) -+ return VA_STATUS_ERROR_INVALID_PARAMETER; -+ -+ VAStatus va_status; -+ void *image_data = NULL; -+ -+ va_status = i965_MapBuffer(ctx, obj_image->image.buf, &image_data); -+ if (va_status != VA_STATUS_SUCCESS) -+ return va_status; -+ -+ dri_bo_map(obj_surface->bo, 0); -+ -+ switch (obj_image->image.format.fourcc) { -+ case VA_FOURCC('Y','V','1','2'): /* YV12 is native format here */ -+ memcpy(image_data, obj_surface->bo->virtual, obj_surface->bo->size); -+ break; -+ default: -+ va_status = VA_STATUS_ERROR_OPERATION_FAILED; -+ break; -+ } -+ -+ dri_bo_unmap(obj_surface->bo); -+ -+ i965_UnmapBuffer(ctx, obj_image->image.buf); -+ return va_status; - } - - VAStatus --- -1.5.4.3 - diff -Nru libva-1.0.1/debian/patches/037_g45_add_vaPutImage.patch libva-1.0.1-3+0.31.1/debian/patches/037_g45_add_vaPutImage.patch --- libva-1.0.1/debian/patches/037_g45_add_vaPutImage.patch 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/debian/patches/037_g45_add_vaPutImage.patch 2010-07-12 09:13:37.000000000 +0000 @@ -1,34 +1,28 @@ -From 000807cfbd8bcbc9cd4bf28a066087fee43396b4 Mon Sep 17 00:00:00 2001 -From: Gwenole Beauchesne -Date: Wed, 4 Nov 2009 13:36:39 +0000 -Subject: [PATCH] =?utf-8?q?[G45]=C2=A0Implement=20vaPutImage()=20for=20full-sized=20surface=20uploads.?= -MIME-Version: 1.0 -Content-Type: text/plain; charset=utf-8 -Content-Transfer-Encoding: 8bit +commit d4b63e6a92660f487d631c8a0f5319d2bd5817d6 +Author: Gwenole Beauchesne +Date: Wed Nov 4 13:36:39 2009 +0000 ---- - i965_drv_video/i965_drv_video.c | 78 +++++++++++++++++++++++++++++++-------- - 1 files changed, 62 insertions(+), 16 deletions(-) + [G45] Implement vaPutImage() for full-sized surface uploads. diff --git a/i965_drv_video/i965_drv_video.c b/i965_drv_video/i965_drv_video.c -index d8a7bd1..e8f638c 100644 +index 8dfb39e..6696728 100644 --- a/i965_drv_video/i965_drv_video.c +++ b/i965_drv_video/i965_drv_video.c -@@ -443,22 +443,6 @@ i965_QueryImageFormats(VADriverContextP ctx, +@@ -457,22 +457,6 @@ i965_QueryImageFormats(VADriverContextP ctx, } VAStatus -i965_PutImage(VADriverContextP ctx, -- VASurfaceID surface, -- VAImageID image, -- int src_x, -- int src_y, -- unsigned int src_width, -- unsigned int src_height, -- int dest_x, -- int dest_y, -- unsigned int dest_width, -- unsigned int dest_height) +- VASurfaceID surface, +- VAImageID image, +- int src_x, +- int src_y, +- unsigned int src_width, +- unsigned int src_height, +- int dest_x, +- int dest_y, +- unsigned int dest_width, +- unsigned int dest_height) -{ - return VA_STATUS_SUCCESS; -} @@ -37,7 +31,7 @@ i965_QuerySubpictureFormats(VADriverContextP ctx, VAImageFormat *format_list, /* out */ unsigned int *flags, /* out */ -@@ -1439,6 +1423,68 @@ i965_GetImage(VADriverContextP ctx, +@@ -1649,6 +1633,80 @@ i965_GetImage(VADriverContextP ctx, } VAStatus @@ -54,6 +48,7 @@ + unsigned int dest_height) +{ + struct i965_driver_data *i965 = i965_driver_data(ctx); ++ struct i965_render_state *render_state = &i965->render_state; + + struct object_surface *obj_surface = SURFACE(surface); + if (!obj_surface) @@ -88,10 +83,21 @@ + dri_bo_map(obj_surface->bo, 1); + + switch (obj_image->image.format.fourcc) { -+ case VA_FOURCC('Y','V','1','2'): /* YV12 is native format here */ ++ case VA_FOURCC('Y','V','1','2'): ++ case VA_FOURCC('I','4','2','0'): ++ /* I420 is native format for MPEG-2 decoded surfaces */ ++ if (render_state->interleaved_uv) ++ goto operation_failed; ++ memcpy(obj_surface->bo->virtual, image_data, obj_surface->bo->size); ++ break; ++ case VA_FOURCC('N','V','1','2'): ++ /* NV12 is native format for H.264 decoded surfaces */ ++ if (!render_state->interleaved_uv) ++ goto operation_failed; + memcpy(obj_surface->bo->virtual, image_data, obj_surface->bo->size); + break; + default: ++ operation_failed: + va_status = VA_STATUS_ERROR_OPERATION_FAILED; + break; + } @@ -106,6 +112,3 @@ i965_PutSurface(VADriverContextP ctx, VASurfaceID surface, Drawable draw, /* X Drawable */ --- -1.5.4.3 - diff -Nru libva-1.0.1/debian/patches/038_g45_vaPutSurface_cliprects.patch libva-1.0.1-3+0.31.1/debian/patches/038_g45_vaPutSurface_cliprects.patch --- libva-1.0.1/debian/patches/038_g45_vaPutSurface_cliprects.patch 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/debian/patches/038_g45_vaPutSurface_cliprects.patch 2010-07-13 14:53:47.000000000 +0000 @@ -1,24 +1,16 @@ -From 90de12a47e26ccc0b4cc8189c76991609481870d Mon Sep 17 00:00:00 2001 -From: Gwenole Beauchesne -Date: Wed, 4 Nov 2009 17:34:53 +0000 -Subject: [PATCH] [G45] Handle cliprects in vaPutSurface(). +commit d865489385316b2036e2f9543509dfa203553ca2 +Author: Gwenole Beauchesne +Date: Wed Nov 4 17:34:53 2009 +0000 ---- - i965_drv_video/i965_drv_video.c | 39 ++++-- - i965_drv_video/i965_render.c | 284 +++++++++++++++++++-------------------- - i965_drv_video/i965_render.h | 30 ++--- - 3 files changed, 176 insertions(+), 177 deletions(-) + [G45] Handle cliprects in vaPutSurface(). diff --git a/i965_drv_video/i965_drv_video.c b/i965_drv_video/i965_drv_video.c -index e8f638c..20d6bab 100644 +index 41d0828..7c26f24 100644 --- a/i965_drv_video/i965_drv_video.c +++ b/i965_drv_video/i965_drv_video.c -@@ -1507,13 +1507,23 @@ i965_PutSurface(VADriverContextP ctx, - union dri_buffer *buffer; - struct intel_region *dest_region; +@@ -1733,7 +1733,9 @@ i965_PutSurface(VADriverContextP ctx, struct object_surface *obj_surface; -- int ret; -+ int ret; + int ret; uint32_t name; + VARectangle src_rect, dst_rect; Bool new_region = False; @@ -26,32 +18,24 @@ /* Currently don't support DRI1 */ if (dri_state->driConnectedFlag != VA_DRI2) return VA_STATUS_ERROR_UNKNOWN; +@@ -1745,6 +1747,10 @@ i965_PutSurface(VADriverContextP ctx, + if (obj_surface->bo == NULL) + return VA_STATUS_SUCCESS; + /* XXX: we currently only support up to 64 cliprects */ + if (number_cliprects > MAX_CLIP_RECTS) + return VA_STATUS_ERROR_OPERATION_FAILED; + -+ obj_surface = SURFACE(surface); -+ if (!obj_surface) -+ return VA_STATUS_ERROR_INVALID_SURFACE; -+ dri_drawable = dri_get_drawable(ctx, draw); assert(dri_drawable); -@@ -1552,17 +1562,24 @@ i965_PutSurface(VADriverContextP ctx, +@@ -1783,15 +1789,22 @@ i965_PutSurface(VADriverContextP ctx, assert(ret == 0); } - i965_render_put_surface(ctx, surface, - srcx, srcy, srcw, srch, - destx, desty, destw, desth); -- obj_surface = SURFACE(surface); -- if(obj_surface->subpic != VA_INVALID_ID) { -- i965_render_put_subpic(ctx, surface, -- srcx, srcy, srcw, srch, -- destx, desty, destw, desth); -- } -- dri_swap_buffer(ctx, dri_drawable); + src_rect.x = srcx; + src_rect.y = srcy; + src_rect.width = srcw; @@ -61,23 +45,26 @@ + dst_rect.y = desty; + dst_rect.width = destw; + dst_rect.height = desth; - ++ + i965_render_put_surface(ctx, surface, &src_rect, &dst_rect, + cliprects, number_cliprects); -+ + +- if(obj_surface->subpic != VA_INVALID_ID) { +- i965_render_put_subpic(ctx, surface, +- srcx, srcy, srcw, srch, +- destx, desty, destw, desth); +- } + if (obj_surface->subpic != VA_INVALID_ID) + i965_render_put_subpic(ctx, surface, &src_rect, &dst_rect, + cliprects, number_cliprects); -+ -+ dri_swap_buffer(ctx, dri_drawable); - return VA_STATUS_SUCCESS; - } + dri_swap_buffer(ctx, dri_drawable); + obj_surface->flags |= SURFACE_DISPLAYED; diff --git a/i965_drv_video/i965_render.c b/i965_drv_video/i965_render.c -index 0476087..d7cd8fe 100644 +index 675f30b..62f6200 100644 --- a/i965_drv_video/i965_render.c +++ b/i965_drv_video/i965_render.c -@@ -787,13 +787,81 @@ i965_render_binding_table(VADriverContextP ctx) +@@ -803,20 +803,86 @@ i965_render_binding_table(VADriverContextP ctx) dri_bo_unmap(render_state->wm.binding_table); } @@ -163,16 +150,14 @@ struct object_surface *obj_surface = SURFACE(surface); struct object_subpic *obj_subpic = SUBPIC(obj_surface->subpic); -@@ -803,8 +871,6 @@ i965_subpic_render_upload_vertex(VADriverContextP ctx, - const float ssy = (float)output_rect->height / (float)obj_surface->height; - const float sx = psx * ssx; - const float sy = psy * ssy; + const float sx = output_rect->width / (float)obj_surface->orig_width; + const float sy = output_rect->height / (float)obj_surface->orig_height; - float *vb, tx1, tx2, ty1, ty2, x1, x2, y1, y2; - int i = 0; VARectangle dst_rect; dst_rect.x = output_rect->x + sx * (float)obj_subpic->dst_rect.x; -@@ -812,106 +878,38 @@ i965_subpic_render_upload_vertex(VADriverContextP ctx, +@@ -824,93 +890,30 @@ i965_subpic_render_upload_vertex(VADriverContextP ctx, dst_rect.width = sx * (float)obj_subpic->dst_rect.width; dst_rect.height = sy * (float)obj_subpic->dst_rect.height; @@ -243,8 +228,8 @@ - - obj_surface = SURFACE(surface); - assert(surface); -- width = obj_surface->width; -- height = obj_surface->height; +- width = obj_surface->orig_width; +- height = obj_surface->orig_height; - - u1 = (float)srcx / width; - v1 = (float)srcy / height; @@ -275,12 +260,18 @@ - dri_bo_unmap(render_state->vb.vertex_buffer); + return i965_render_do_upload_vertex(ctx, -+ obj_surface->width, obj_surface->height, ++ obj_surface->orig_width, ++ obj_surface->orig_height, + src_rect, + dst_rect, + cliprects, num_cliprects); } + static void +@@ -936,17 +939,13 @@ i965_render_upload_constants(VADriverContextP ctx) + render_state->curbe.upload = 1; + } + -static void +static unsigned int i965_surface_render_state_setup(VADriverContextP ctx, @@ -301,13 +292,14 @@ { i965_render_vs_unit(ctx); i965_render_sf_unit(ctx); -@@ -922,21 +920,17 @@ i965_surface_render_state_setup(VADriverContextP ctx, +@@ -957,22 +956,18 @@ i965_surface_render_state_setup(VADriverContextP ctx, i965_render_cc_viewport(ctx); i965_render_cc_unit(ctx); i965_render_binding_table(ctx); - i965_render_upload_vertex(ctx, surface, - srcx, srcy, srcw, srch, - destx, desty, destw, desth); + i965_render_upload_constants(ctx); + return i965_render_upload_vertex(ctx, surface, src_rect, dst_rect, + cliprects, num_cliprects); } @@ -332,7 +324,7 @@ { i965_render_vs_unit(ctx); i965_render_sf_unit(ctx); -@@ -947,16 +941,10 @@ i965_subpic_render_state_setup(VADriverContextP ctx, +@@ -983,13 +978,8 @@ i965_subpic_render_state_setup(VADriverContextP ctx, i965_render_cc_viewport(ctx); i965_subpic_render_cc_unit(ctx); i965_render_binding_table(ctx); @@ -347,11 +339,8 @@ + cliprects, num_cliprects); } -- - static void - i965_render_pipeline_select(VADriverContextP ctx) - { -@@ -1192,7 +1180,7 @@ i965_render_upload_image_palette( + +@@ -1242,7 +1232,7 @@ i965_render_upload_image_palette( } static void @@ -360,16 +349,16 @@ { struct i965_driver_data *i965 = i965_driver_data(ctx); struct i965_render_state *render_state = &i965->render_state; -@@ -1203,7 +1191,7 @@ i965_render_startup(VADriverContextP ctx) +@@ -1253,7 +1243,7 @@ i965_render_startup(VADriverContextP ctx) (0 << VB0_BUFFER_INDEX_SHIFT) | VB0_VERTEXDATA | ((4 * 4) << VB0_BUFFER_PITCH_SHIFT)); - OUT_RELOC(ctx, render_state->vb.vertex_buffer, I915_GEM_DOMAIN_VERTEX, 0, 0); + OUT_RELOC(ctx, render_state->vb.vertex_buffer, I915_GEM_DOMAIN_VERTEX, 0, vb_offset); - if (IS_IGDNG(i965->intel.device_id)) + if (IS_IRONLAKE(i965->intel.device_id)) OUT_RELOC(ctx, render_state->vb.vertex_buffer, I915_GEM_DOMAIN_VERTEX, 0, 12 * 4); -@@ -1268,8 +1256,10 @@ i965_clear_dest_region(VADriverContextP ctx) +@@ -1318,8 +1308,10 @@ i965_clear_dest_region(VADriverContextP ctx) } static void @@ -381,8 +370,8 @@ intel_batchbuffer_start_atomic(ctx, 0x1000); intel_batchbuffer_emit_mi_flush(ctx); i965_clear_dest_region(ctx); -@@ -1283,13 +1273,16 @@ i965_surface_render_pipeline_setup(VADriverContextP ctx) - i965_render_cs_urb_layout(ctx); +@@ -1334,13 +1326,16 @@ i965_surface_render_pipeline_setup(VADriverContextP ctx) + i965_render_constant_buffer(ctx); i965_render_drawing_rectangle(ctx); i965_render_vertex_elements(ctx); - i965_render_startup(ctx); @@ -400,7 +389,7 @@ intel_batchbuffer_start_atomic(ctx, 0x1000); intel_batchbuffer_emit_mi_flush(ctx); i965_render_pipeline_select(ctx); -@@ -1302,7 +1295,8 @@ i965_subpic_render_pipeline_setup(VADriverContextP ctx) +@@ -1353,7 +1348,8 @@ i965_subpic_render_pipeline_setup(VADriverContextP ctx) i965_render_cs_urb_layout(ctx); i965_render_drawing_rectangle(ctx); i965_render_vertex_elements(ctx); @@ -410,7 +399,7 @@ intel_batchbuffer_end_atomic(ctx); } -@@ -1396,45 +1390,39 @@ i965_render_initialize(VADriverContextP ctx) +@@ -1447,45 +1443,39 @@ i965_render_initialize(VADriverContextP ctx) void i965_render_put_surface(VADriverContextP ctx, VASurfaceID surface, @@ -476,7 +465,7 @@ intel_batchbuffer_flush(ctx); } diff --git a/i965_drv_video/i965_render.h b/i965_drv_video/i965_render.h -index e3dce02..d2e23f1 100644 +index 9abb81f..3a58430 100644 --- a/i965_drv_video/i965_render.h +++ b/i965_drv_video/i965_render.h @@ -28,6 +28,7 @@ @@ -487,7 +476,7 @@ #define MAX_RENDER_SURFACES 16 #define MAX_SAMPLERS 16 -@@ -65,27 +66,20 @@ struct i965_render_state +@@ -69,27 +70,20 @@ struct i965_render_state Bool i965_render_init(VADriverContextP ctx); Bool i965_render_terminate(VADriverContextP ctx); @@ -526,6 +515,3 @@ + unsigned int num_cliprects); + #endif /* _I965_RENDER_H_ */ --- -1.5.4.3 - diff -Nru libva-1.0.1/debian/patches/041_g45_internals.patch libva-1.0.1-3+0.31.1/debian/patches/041_g45_internals.patch --- libva-1.0.1/debian/patches/041_g45_internals.patch 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/debian/patches/041_g45_internals.patch 2010-07-12 09:14:21.000000000 +0000 @@ -0,0 +1,35 @@ +commit fbbe2012098459bfdb694b529f45ba119ec40085 +Author: Gwenole Beauchesne +Date: Mon Apr 19 14:01:55 2010 +0200 + + [G45] Don't export internal symbols as they can be mixed up + with those from the system i965_dri.so. + +diff --git a/i965_drv_video/Makefile.am b/i965_drv_video/Makefile.am +index 058b525..426ae18 100644 +--- a/i965_drv_video/Makefile.am ++++ b/i965_drv_video/Makefile.am +@@ -22,7 +22,7 @@ + + SUBDIRS = shaders + +-AM_CFLAGS = -Wall -I$(top_srcdir) -I$(top_srcdir)/va -I$(top_srcdir)/va/x11 @DRM_CFLAGS@ ++AM_CFLAGS = -Wall -I$(top_srcdir) -I$(top_srcdir)/va -I$(top_srcdir)/va/x11 @DRM_CFLAGS@ -fvisibility=hidden + + i965_drv_video_la_LTLIBRARIES = i965_drv_video.la + i965_drv_video_ladir = @LIBVA_DRIVERS_PATH@ +diff --git a/i965_drv_video/i965_drv_video.c b/i965_drv_video/i965_drv_video.c +index 936870f..1e88927 100644 +--- a/i965_drv_video/i965_drv_video.c ++++ b/i965_drv_video/i965_drv_video.c +@@ -1848,6 +1848,10 @@ i965_Terminate(VADriverContextP ctx) + + VAStatus + __vaDriverInit_0_31( VADriverContextP ctx ) ++ __attribute__((__visibility__("default"))); ++ ++VAStatus ++__vaDriverInit_0_31( VADriverContextP ctx ) + { + struct i965_driver_data *i965; + int result; diff -Nru libva-1.0.1/debian/patches/101_dont_install_test_programs.patch libva-1.0.1-3+0.31.1/debian/patches/101_dont_install_test_programs.patch --- libva-1.0.1/debian/patches/101_dont_install_test_programs.patch 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/debian/patches/101_dont_install_test_programs.patch 2010-06-03 10:10:26.000000000 +0000 @@ -0,0 +1,58 @@ +commit 16864159654cb6c77b3db36dd218e4103e3bd0c2 +Author: Gwenole Beauchesne +Date: Thu Jun 3 09:23:45 2010 +0200 + + Don't install test programs. + +diff --git a/test/basic/Makefile.am b/test/basic/Makefile.am +index a2519a2..8022a36 100644 +--- a/test/basic/Makefile.am ++++ b/test/basic/Makefile.am +@@ -20,7 +20,7 @@ + # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +-bin_PROGRAMS = test_01 test_02 test_03 test_04 test_05 test_06 \ ++check_PROGRAMS = test_01 test_02 test_03 test_04 test_05 test_06 \ + test_07 test_08 test_09 test_10 test_11 + + AM_CFLAGS = -I$(top_srcdir)/va -I$(top_srcdir)/src/x11 +diff --git a/test/decode/Makefile.am b/test/decode/Makefile.am +index ea30643..23a086f 100644 +--- a/test/decode/Makefile.am ++++ b/test/decode/Makefile.am +@@ -20,7 +20,7 @@ + # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +-bin_PROGRAMS = mpeg2vldemo ++check_PROGRAMS = mpeg2vldemo + + AM_CFLAGS = -I$(top_srcdir)/va -I$(top_srcdir)/src/x11 + +diff --git a/test/encode/Makefile.am b/test/encode/Makefile.am +index 80c882a..98b2bc4 100644 +--- a/test/encode/Makefile.am ++++ b/test/encode/Makefile.am +@@ -20,7 +20,7 @@ + # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +-bin_PROGRAMS = h264encode ++check_PROGRAMS = h264encode + + AM_CFLAGS = -I$(top_srcdir)/va -I$(top_srcdir)/src/x11 + +diff --git a/test/putsurface/Makefile.am b/test/putsurface/Makefile.am +index fe18388..d06006c 100644 +--- a/test/putsurface/Makefile.am ++++ b/test/putsurface/Makefile.am +@@ -20,7 +20,7 @@ + # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +-bin_PROGRAMS = putsurface ++check_PROGRAMS = putsurface + + AM_CFLAGS = -I$(top_srcdir)/va -I$(top_srcdir)/src/x11 + diff -Nru libva-1.0.1/debian/patches/102_attribute_visibility.patch libva-1.0.1-3+0.31.1/debian/patches/102_attribute_visibility.patch --- libva-1.0.1/debian/patches/102_attribute_visibility.patch 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/debian/patches/102_attribute_visibility.patch 2010-06-01 11:09:07.000000000 +0000 @@ -1,22 +1,16 @@ -commit 8d0004cbd40305114bbe8019122319b43d25a772 -Author: Gwenole Beauchesne -Date: Tue Sep 8 12:34:39 2009 +0000 - - Fix ATTRIBUTE_HIDDEN definition if __attribute__((visibility("hidden"))) is not supported. - -commit 7a8bf489ffd436d853364dd0d3c9a6734b8cc7eb +commit 21607fa8c52972199e983f27d3b37a5a54144fc7 Author: Gwenole Beauchesne Date: Thu Sep 3 15:46:37 2009 +0000 Check for __attribute__((visibility("hidden"))). diff --git a/configure.ac b/configure.ac -index da96872..abef435 100644 +index 1358253..834b9c4 100644 --- a/configure.ac +++ b/configure.ac -@@ -132,6 +132,30 @@ if test x$enable_i965_driver = xyes && ! $PKG_CONFIG --atleast-version=2.4 libdr +@@ -118,6 +118,30 @@ if test x$libudev = xno; then fi - AM_CONDITIONAL(BUILD_I965_DRIVER, test x$enable_i965_driver = xyes) + AM_CONDITIONAL(BUILD_DUMMY_BACKEND, test x$enable_dummy_backend = xyes) +dnl Check for __attribute__((visibility())) +AC_CACHE_CHECK([whether __attribute__((visibility())) is supported], @@ -42,6 +36,6 @@ +AC_DEFINE_UNQUOTED([ATTRIBUTE_HIDDEN], [$ATTRIBUTE_HIDDEN], + [Defined to __attribute__((visibility("hidden"))) when available]) + - # We only need the headers, we don't link against the DRM libraries - LIBVA_CFLAGS="$DRM_CFLAGS" - AC_SUBST(LIBVA_CFLAGS) + # Check for OpenGL (X11) + USE_GLX="no" + GL_DEPS_CFLAGS="" diff -Nru libva-1.0.1/debian/patches/103_drmOpenOnce_replacement.patch libva-1.0.1-3+0.31.1/debian/patches/103_drmOpenOnce_replacement.patch --- libva-1.0.1/debian/patches/103_drmOpenOnce_replacement.patch 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/debian/patches/103_drmOpenOnce_replacement.patch 2010-07-12 10:59:29.000000000 +0000 @@ -0,0 +1,114 @@ +commit 878a17ff0b178485d7c95f78e6d03e95da9be77b +Author: Gwenole Beauchesne +Date: Thu Sep 3 15:36:04 2009 +0000 + + Add drmOpenOnce() / drmCloseOnce() replacements for libdrm < 2.3. + +diff --git a/configure.ac b/configure.ac +index d1afdac..6202e46 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -100,6 +100,27 @@ PKG_CHECK_MODULES([XEXT],[xext]) + PKG_CHECK_MODULES([XFIXES], [xfixes]) + PKG_CHECK_MODULES([DRM], [libdrm]) + ++dnl Check for drmOpenOnce() (libdrm >= 2.3) ++AC_CACHE_CHECK([for dmOpenOnce], ++ ac_cv_libdrm_drmOpenOnce, [ ++ saved_CFLAGS="$CFLAGS" ++ saved_LIBS="$LIBS" ++ CFLAGS="$CFLAGS $DRM_CFLAGS" ++ LIBS="$LIBS $DRM_LIBS" ++ AC_TRY_LINK([ ++ #include ++ ], [ ++ drmOpenOnce(0,0,0); ++ ], ++ [ac_cv_libdrm_drmOpenOnce="yes"], ++ [ac_cv_libdrm_drmOpenOnce="no"]) ++ CFLAGS="$saved_CFLAGS" ++ LIBS="$saved_LIBS" ++]) ++if test "$ac_cv_libdrm_drmOpenOnce" = "yes"; then ++ AC_DEFINE(HAVE_DRM_OPEN_ONCE, 1, [Defined to 1 if drmOpenOnce() is available]) ++fi ++ + PKG_CHECK_MODULES(GEN4ASM, [intel-gen4asm >= 1.0], [gen4asm=yes], [gen4asm=no]) + AM_CONDITIONAL(HAVE_GEN4ASM, test x$gen4asm = xyes) + +diff --git a/va/x11/dri1_util.c b/va/x11/dri1_util.c +index d9afca6..e2ad749 100644 +--- a/va/x11/dri1_util.c ++++ b/va/x11/dri1_util.c +@@ -1,3 +1,4 @@ ++#include "config.h" + #include + #include + #include +@@ -21,6 +22,66 @@ struct dri1_drawable + int height; + }; + ++#ifndef HAVE_DRM_OPEN_ONCE ++#include ++#include ++ ++#define DRM_MAX_FDS 16 ++static struct { ++ char *BusID; ++ int fd; ++ int refcount; ++} connection[DRM_MAX_FDS]; ++ ++static int nr_fds = 0; ++ ++static int drmOpenOnce(void *unused, const char *BusID, int *newlyopened) ++{ ++ int i; ++ int fd; ++ ++ for (i = 0; i < nr_fds; i++) ++ if (strcmp(BusID, connection[i].BusID) == 0) { ++ connection[i].refcount++; ++ *newlyopened = 0; ++ return connection[i].fd; ++ } ++ ++ fd = drmOpen(unused, BusID); ++ if (fd <= 0 || nr_fds == DRM_MAX_FDS) ++ return fd; ++ ++ connection[nr_fds].BusID = strdup(BusID); ++ connection[nr_fds].fd = fd; ++ connection[nr_fds].refcount = 1; ++ *newlyopened = 1; ++ ++ if (0) ++ fprintf(stderr, "saved connection %d for %s %d\n", ++ nr_fds, connection[nr_fds].BusID, ++ strcmp(BusID, connection[nr_fds].BusID)); ++ nr_fds++; ++ return fd; ++} ++ ++void drmCloseOnce(int fd) ++{ ++ int i; ++ ++ for (i = 0; i < nr_fds; i++) { ++ if (fd == connection[i].fd) { ++ if (--connection[i].refcount == 0) { ++ drmClose(connection[i].fd); ++ free(connection[i].BusID); ++ if (i < --nr_fds) ++ connection[i] = connection[nr_fds]; ++ return; ++ } ++ } ++ } ++} ++#endif ++ + static struct dri_drawable * + dri1CreateDrawable(VADriverContextP ctx, XID x_drawable) + { diff -Nru libva-1.0.1/debian/patches/103_fix_vainfo_deps.patch libva-1.0.1-3+0.31.1/debian/patches/103_fix_vainfo_deps.patch --- libva-1.0.1/debian/patches/103_fix_vainfo_deps.patch 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/debian/patches/103_fix_vainfo_deps.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,24 +0,0 @@ -commit 11e626a3610daf0fce253ef48ab8736bce6178f9 -Author: Gwenole Beauchesne -Date: Tue Sep 22 12:29:56 2009 +0000 - - Fix vainfo dependencies (Konstantin Pavlov). - -diff --git a/test/Makefile.am b/test/Makefile.am -index 58e1677..ee78d34 100644 ---- a/test/Makefile.am -+++ b/test/Makefile.am -@@ -31,10 +31,10 @@ AM_CFLAGS = -I$(top_srcdir)/../../include/external/ -I$(top_srcdir)/src -I$(top_ - - TESTS = $(check_PROGRAMS) - --TEST_LIBS = $(top_srcdir)/src/$(libvabackendlib) -+TEST_LIBS = $(top_srcdir)/src/libva.la $(top_srcdir)/src/$(libvabackendlib) - --vainfo_LDADD = $(top_srcdir)/src/$(libvabackendlib) --vainfo_DEPENDENCIES = $(top_srcdir)/src/$(libvabackendlib) -+vainfo_LDADD = $(top_srcdir)/src/libva.la $(top_srcdir)/src/$(libvabackendlib) -+vainfo_DEPENDENCIES = $(top_srcdir)/src/libva.la $(top_srcdir)/src/$(libvabackendlib) - vainfo_SOURCES = vainfo.c - - test_01_LDADD = $(TEST_LIBS) diff -Nru libva-1.0.1/debian/patches/104_fix_libva_pkgconfig_deps.patch libva-1.0.1-3+0.31.1/debian/patches/104_fix_libva_pkgconfig_deps.patch --- libva-1.0.1/debian/patches/104_fix_libva_pkgconfig_deps.patch 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/debian/patches/104_fix_libva_pkgconfig_deps.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,18 +0,0 @@ -commit f0b352251894becfcec50de1430bda12c314a464 -Author: Gwenole Beauchesne -Date: Tue Sep 22 13:00:34 2009 +0000 - - Fix libva-x11 pkgconfig dependencies. - -diff --git a/libva-x11.pc.in b/libva-x11.pc.in -index 75e4f0b..6dde07f 100644 ---- a/libva-x11.pc.in -+++ b/libva-x11.pc.in -@@ -6,6 +6,7 @@ display=x11 - - Name: libva-${display} - Description: Userspace Video Acceleration (VA) ${display} interface -+Requires: libva - Version: @PACKAGE_VERSION@ - Libs: -L${libdir} -lva-${display} - Cflags: -I${includedir} diff -Nru libva-1.0.1/debian/patches/105_dont_search_LIBGL_DRIVERS_PATH.patch libva-1.0.1-3+0.31.1/debian/patches/105_dont_search_LIBGL_DRIVERS_PATH.patch --- libva-1.0.1/debian/patches/105_dont_search_LIBGL_DRIVERS_PATH.patch 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/debian/patches/105_dont_search_LIBGL_DRIVERS_PATH.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,21 +0,0 @@ -commit 035374378644216fb3a7d3974a8c46b1bd425918 -Author: Gwenole Beauchesne -Date: Tue Sep 22 13:03:23 2009 +0000 - - Don't search LIBGL_DRIVERS_PATH, stick to LIBVA_DRIVERS_PATH only or the default path. - -diff --git a/src/va.c b/src/va.c -index 12662cd..723235e 100644 ---- a/src/va.c -+++ b/src/va.c -@@ -134,10 +134,6 @@ static VAStatus va_openDriver(VADisplay dpy, char *driver_name) - { - /* don't allow setuid apps to use LIBVA_DRIVERS_PATH */ - search_path = getenv("LIBVA_DRIVERS_PATH"); -- if (!search_path) -- { -- search_path = getenv("LIBGL_DRIVERS_PATH"); -- } - } - if (!search_path) - { diff -Nru libva-1.0.1/debian/patches/108_drivers_path.patch libva-1.0.1-3+0.31.1/debian/patches/108_drivers_path.patch --- libva-1.0.1/debian/patches/108_drivers_path.patch 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/debian/patches/108_drivers_path.patch 2010-03-08 12:03:25.000000000 +0000 @@ -1,14 +1,11 @@ -From 332bfec6020b5cfcef5d655f4bf525dab67c0b92 Mon Sep 17 00:00:00 2001 -From: Gwenole Beauchesne -Date: Wed, 24 Jun 2009 08:12:13 +0000 -Subject: [PATCH] Install drivers into pkglibdir/va/. +commit 43becedcfa2b9b040006868a63c686a131c9ba74 +Author: Gwenole Beauchesne +Date: Wed Jun 24 08:12:13 2009 +0000 ---- - configure.ac | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + Install drivers into pkglibdir/va/. diff --git a/configure.ac b/configure.ac -index 4be2b56..d595ac9 100644 +index f2d0ea4..ebe5df6 100644 --- a/configure.ac +++ b/configure.ac @@ -73,7 +73,7 @@ AC_ARG_ENABLE(i965-driver, @@ -20,6 +17,3 @@ LIBVA_DRIVERS_PATH="$with_drivers_path" AC_SUBST(LIBVA_DRIVERS_PATH) --- -1.5.4.3 - diff -Nru libva-1.0.1/debian/patches/202_check_crystalhd.patch libva-1.0.1-3+0.31.1/debian/patches/202_check_crystalhd.patch --- libva-1.0.1/debian/patches/202_check_crystalhd.patch 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/debian/patches/202_check_crystalhd.patch 2010-06-02 06:54:48.000000000 +0000 @@ -0,0 +1,157 @@ +commit 1df06d813ab8363dee2dc3c5d7856b155c1c8da2 +Author: Gwenole Beauchesne +Date: Tue Feb 23 10:05:25 2010 +0000 + + Detect Broadcom Crystal HD chip. + +diff --git a/va/Makefile.am b/va/Makefile.am +index 2ff3a23..633d42b 100644 +--- a/va/Makefile.am ++++ b/va/Makefile.am +@@ -27,7 +27,7 @@ INCLUDES = \ + LDADD = \ + $(LIBVA_LT_LDFLAGS) + +-libva_la_SOURCES = va.c va_trace.c ++libva_la_SOURCES = va.c va_trace.c va_crystalhd.c + libva_ladir = $(libdir) + libva_la_LDFLAGS = $(LDADD) -no-undefined + libva_la_LIBADD = $(LIBVA_LIBS) -ldl +@@ -87,4 +87,5 @@ DISTCLEANFILES = \ + va_version.h + + EXTRA_DIST = \ +- va_version.h.in ++ va_version.h.in \ ++ va_crystalhd.h +diff --git a/va/va.c b/va/va.c +index 5ff3563..cfdb5b4 100644 +--- a/va/va.c ++++ b/va/va.c +@@ -23,9 +23,11 @@ + */ + + #define _GNU_SOURCE 1 ++ ++#include "config.h" + #include "va.h" + #include "va_backend.h" +-#include "config.h" ++#include "va_crystalhd.h" + + #include + #include +@@ -360,6 +362,15 @@ VAStatus vaInitialize ( + vaStatus = va_openDriver(dpy, driver_name); + va_infoMessage("va_openDriver() returns %d\n", vaStatus); + ++ if (vaStatus != VA_STATUS_SUCCESS && !driver_name_env) ++ { ++ if (va_hasCrystalHD()) ++ { ++ vaStatus = va_openDriver(dpy, "crystalhd"); ++ va_infoMessage("va_openDriver() returns %d\n", vaStatus); ++ } ++ } ++ + *major_version = VA_MAJOR_VERSION; + *minor_version = VA_MINOR_VERSION; + } +diff --git a/va/va_crystalhd.c b/va/va_crystalhd.c +new file mode 100644 +index 0000000..1ddd4fe +--- /dev/null ++++ b/va/va_crystalhd.c +@@ -0,0 +1,54 @@ ++/* ++ * Copyright (C) 2010 Splitted-Desktop Systems. All Rights Reserved. ++ * ++ * 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, sub license, 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 (including the ++ * next paragraph) 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 NON-INFRINGEMENT. ++ * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ++ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, ++ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE ++ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include "config.h" ++#include "va_crystalhd.h" ++ ++/* Checks if the Broadcom Crystal HD decoder is available */ ++int va_hasCrystalHD(void) ++{ ++ char line[1024]; ++ int len, vendor, device, dummy, found = 0; ++ FILE *fp; ++ ++ fp = fopen("/proc/bus/pci/devices", "r"); ++ if (!fp) ++ return 0; ++ ++ while (!found && fgets(line, sizeof(line), fp)) { ++ len = strlen(line); ++ if (len == 0) ++ continue; ++ line[len - 1] = 0; ++ if (sscanf(line, "%x %04x%04x", &dummy, &vendor, &device) == 3) { ++ if (vendor == 0x14e4 && device == 0x1612) /* BCM70012 */ ++ found = 1; ++ } ++ } ++ fclose(fp); ++ return found; ++} +diff --git a/va/va_crystalhd.h b/va/va_crystalhd.h +new file mode 100644 +index 0000000..44a39d9 +--- /dev/null ++++ b/va/va_crystalhd.h +@@ -0,0 +1,32 @@ ++/* ++ * Copyright (C) 2010 Splitted-Desktop Systems. All Rights Reserved. ++ * ++ * 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, sub license, 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 (including the ++ * next paragraph) 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 NON-INFRINGEMENT. ++ * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ++ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, ++ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE ++ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ++ */ ++ ++#ifndef VA_CRYSTALHD_H ++#define VA_CRYSTALHD_H ++ ++/** Checks if the Broadcom Crystal HD decoder is available */ ++int va_hasCrystalHD(void) ++ ATTRIBUTE_HIDDEN; ++ ++#endif /* VA_CRYSTALHD_H */ diff -Nru libva-1.0.1/debian/patches/203_fix_fglrx_detection.patch libva-1.0.1-3+0.31.1/debian/patches/203_fix_fglrx_detection.patch --- libva-1.0.1/debian/patches/203_fix_fglrx_detection.patch 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/debian/patches/203_fix_fglrx_detection.patch 2010-07-12 11:12:24.000000000 +0000 @@ -1,212 +1,43 @@ -commit fb6ccda5984eda96bcb394b23255143dcbc21f18 +commit 899026f2d0b5d61cd41fbef81873c9d03459dd4c Author: Gwenole Beauchesne -Date: Thu Sep 10 12:22:17 2009 +0000 +Date: Mon Jul 12 13:11:08 2010 +0200 - Don't link against libdrm to workaround XvBA / fglrx >= 8.66-RC1 bugs. + Fix detection of fglrx. -commit ab3c0f65182462b54729d2d82d4d645c8be5b2d1 -Author: Gwenole Beauchesne -Date: Wed Sep 9 13:24:46 2009 +0000 - - Fix DRM device opening with fglrx >= 8.66-RC1. - -diff --git a/src/x11/Makefile.am b/src/x11/Makefile.am -index c70380d..b6916f2 100644 ---- a/src/x11/Makefile.am -+++ b/src/x11/Makefile.am +diff --git a/va/Makefile.am b/va/Makefile.am +index 633d42b..e20e0a5 100644 +--- a/va/Makefile.am ++++ b/va/Makefile.am +@@ -43,7 +43,7 @@ libva_x11_backend = libva-x11.la + libva_x11_backenddir = x11 + + libva_x11_la_SOURCES = +-libva_x11_la_LIBADD = $(libvacorelib) x11/libva_x11.la $(LIBVA_LIBS) $(X11_LIBS) $(XEXT_LIBS) $(DRM_LIBS) $(XFIXES_LIBS) ++libva_x11_la_LIBADD = $(libvacorelib) x11/libva_x11.la $(LIBVA_LIBS) $(X11_LIBS) $(XEXT_LIBS) $(DRM_LIBS) $(XFIXES_LIBS) -ldl + libva_x11_la_LDFLAGS = $(LDADD) + libva_x11_la_DEPENDENCIES = $(libvacorelib) x11/libva_x11.la + +diff --git a/va/x11/Makefile.am b/va/x11/Makefile.am +index 40346f1..2e3619c 100644 +--- a/va/x11/Makefile.am ++++ b/va/x11/Makefile.am @@ -25,6 +25,6 @@ noinst_LTLIBRARIES = libva_x11.la libva_x11includedir = ${includedir}/va - libva_x11include_HEADERS = va_x11.h va_dri.h va_dri2.h va_dricommon.h + libva_x11include_HEADERS = va_dri.h va_dri2.h va_dricommon.h -libva_x11_la_SOURCES = va_x11.c va_dri.c va_dri2.c va_dricommon.c dri2_util.c dri1_util.c va_nvctrl.c -+libva_x11_la_SOURCES = va_x11.c va_dri.c va_dri2.c va_dricommon.c dri2_util.c dri1_util.c va_nvctrl.c libdrm_glue.c ++libva_x11_la_SOURCES = va_x11.c va_dri.c va_dri2.c va_dricommon.c dri2_util.c dri1_util.c va_nvctrl.c va_fglrx.c -EXTRA_DIST = va_dristr.h va_dri2str.h va_dri2tokens.h va_nvctrl.h -+EXTRA_DIST = va_dristr.h va_dri2str.h va_dri2tokens.h va_nvctrl.h libdrm_glue.h -diff --git a/src/x11/dri1_util.c b/src/x11/dri1_util.c -index b3db5b4..3bd490f 100644 ---- a/src/x11/dri1_util.c -+++ b/src/x11/dri1_util.c -@@ -1,10 +1,12 @@ -+#include "config.h" -+#include - #include - #include - #include - #include - #include - --#include -+#include "libdrm_glue.h" - - #include "X11/Xlib.h" - #include "va.h" -@@ -21,6 +23,75 @@ struct dri1_drawable - int height; - }; - -+static int -+firegl_drmOpenMinor(int minor) -+{ -+ char buf[64]; -+ int fd; -+ -+ sprintf(buf, "/dev/ati/card%d", minor); -+ if ((fd = open(buf, O_RDWR, 0)) >= 0) -+ return fd; -+ return -1; -+} -+ -+static int -+firegl_drmOpenByBusID(const char *busid) -+{ -+ int i, fd; -+ drmSetVersion sv; -+ const char *buf; -+ -+ for (i = 0; i < DRM_MAX_MINOR; i++) { -+ if ((fd = firegl_drmOpenMinor(i)) < 0) -+ continue; -+ sv.drm_di_major = 1; -+ sv.drm_di_minor = 1; -+ sv.drm_dd_major = -1; -+ sv.drm_dd_minor = -1; -+ libdrm_drmSetInterfaceVersion(fd, &sv); -+ buf = libdrm_drmGetBusid(fd); -+ if (buf && strcasecmp(buf, busid) == 0) { /* XXX: drmMatchBusID() */ -+ libdrm_drmFreeBusid(buf); -+ return fd; -+ } -+ if (buf) -+ libdrm_drmFreeBusid(buf); -+ close(fd); -+ } -+ return -1; -+} -+ -+static int -+drm_open_once(struct dri_state *dri_state, const char *BusID, int *newlyopened) -+{ -+ dri_state->driConnectedFlag = VA_NONE; -+ dri_state->fd = libdrm_drmOpenOnce(NULL, BusID, newlyopened); -+ if (dri_state->fd < 0) { -+ dri_state->fd = firegl_drmOpenByBusID(BusID); -+ if (dri_state->fd >= 0) { -+ *newlyopened = 1; -+ dri_state->driConnectedFlag |= VA_DRI_AMD; -+ } -+ } -+ return dri_state->fd; -+} -+ -+static void -+drm_close_once(struct dri_state *dri_state) -+{ -+ /* XXX: dri_state->close() doesn't seem to be called, thus this -+ function is never called either */ -+ if (dri_state->fd < 0) -+ return; -+ if (dri_state->driConnectedFlag & VA_DRI_AMD) -+ close(dri_state->fd); -+ else -+ libdrm_drmCloseOnce(dri_state->fd); -+ dri_state->fd = -1; -+ dri_state->driConnectedFlag = VA_NONE; -+} -+ - static struct dri_drawable * - dri1CreateDrawable(VADriverContextP ctx, XID x_drawable) - { -@@ -64,9 +135,9 @@ dri1Close(VADriverContextP ctx) - free_drawable_hashtable(ctx); - VA_DRIDestroyContext(ctx->x11_dpy, ctx->x11_screen, dri_state->hwContextID); - assert(dri_state->pSAREA != MAP_FAILED); -- drmUnmap(dri_state->pSAREA, SAREA_MAX); -+ libdrm_drmUnmap(dri_state->pSAREA, SAREA_MAX); - assert(dri_state->fd >= 0); -- drmCloseOnce(dri_state->fd); -+ drm_close_once(dri_state); - VA_DRICloseConnection(ctx->x11_dpy, ctx->x11_screen); - } - -@@ -104,21 +175,20 @@ isDRI1Connected(VADriverContextP ctx, char **driver_name) - &dri_state->hSAREA, &BusID)) - goto err_out0; - -- -- dri_state->fd = drmOpenOnce(NULL, BusID, &newlyopened); -+ drm_open_once(dri_state, BusID, &newlyopened); - XFree(BusID); - - if (dri_state->fd < 0) - goto err_out1; - - -- if (drmGetMagic(dri_state->fd, &magic)) -+ if (libdrm_drmGetMagic(dri_state->fd, &magic)) - goto err_out1; - - if (newlyopened && !VA_DRIAuthConnection(ctx->x11_dpy, ctx->x11_screen, magic)) - goto err_out1; - -- if (drmMap(dri_state->fd, dri_state->hSAREA, SAREA_MAX, &dri_state->pSAREA)) -+ if (libdrm_drmMap(dri_state->fd, dri_state->hSAREA, SAREA_MAX, &dri_state->pSAREA)) - goto err_out1; - - if (!VA_DRICreateContext(ctx->x11_dpy, ctx->x11_screen, -@@ -127,7 +196,8 @@ isDRI1Connected(VADriverContextP ctx, char **driver_name) - &dri_state->hwContextID, &dri_state->hwContext)) - goto err_out1; - -- dri_state->driConnectedFlag = VA_DRI1; -+ dri_state->driConnectedFlag &= VA_DRI_AMD; /* clear flags but AMD bit */ -+ dri_state->driConnectedFlag |= VA_DRI1; - dri_state->createDrawable = dri1CreateDrawable; - dri_state->destroyDrawable = dri1DestroyDrawable; - dri_state->swapBuffer = dri1SwapBuffer; -@@ -138,10 +208,10 @@ isDRI1Connected(VADriverContextP ctx, char **driver_name) - - err_out1: - if (dri_state->pSAREA != MAP_FAILED) -- drmUnmap(dri_state->pSAREA, SAREA_MAX); -+ libdrm_drmUnmap(dri_state->pSAREA, SAREA_MAX); - - if (dri_state->fd >= 0) -- drmCloseOnce(dri_state->fd); -+ drm_close_once(dri_state); - - VA_DRICloseConnection(ctx->x11_dpy, ctx->x11_screen); - -diff --git a/src/x11/dri2_util.c b/src/x11/dri2_util.c -index ebe7a2c..b727e97 100644 ---- a/src/x11/dri2_util.c -+++ b/src/x11/dri2_util.c -@@ -3,7 +3,7 @@ - #include - #include - --#include -+#include "libdrm_glue.h" - - #include - #include -@@ -166,7 +166,7 @@ isDRI2Connected(VADriverContextP ctx, char **driver_name) - if (dri_state->fd < 0) - goto err_out; - -- if (drmGetMagic(dri_state->fd, &magic)) -+ if (libdrm_drmGetMagic(dri_state->fd, &magic)) - goto err_out; - - if (!VA_DRI2Authenticate(ctx->x11_dpy, RootWindow(ctx->x11_dpy, ctx->x11_screen), -diff --git a/src/x11/libdrm_glue.c b/src/x11/libdrm_glue.c ++EXTRA_DIST = va_dristr.h va_dri2str.h va_dri2tokens.h va_nvctrl.h va_fglrx.h +diff --git a/va/x11/va_fglrx.c b/va/x11/va_fglrx.c new file mode 100644 -index 0000000..b72a2d1 +index 0000000..247409d --- /dev/null -+++ b/src/x11/libdrm_glue.c -@@ -0,0 +1,208 @@ ++++ b/va/x11/va_fglrx.c +@@ -0,0 +1,225 @@ +/* -+ * Copyright (C) 2009 Splitted-Desktop Systems. All Rights Reserved. ++ * Copyright (C) 2010 Splitted-Desktop Systems. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the @@ -229,198 +60,215 @@ + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + -+#define _GNU_SOURCE 1 -+#include "libdrm_glue.h" +#include ++#include +#include +#include -+#include ++#include + -+#define LOAD_FUNC_(NAME, RET, ARGS, FALLBACK) \ -+ static RET (*lib_##NAME) ARGS; \ -+ if (lib_##NAME == NULL) { \ -+ lib_##NAME = libdrm_symbol(#NAME); \ -+ if (!lib_##NAME) \ -+ lib_##NAME = FALLBACK; \ -+ } \ -+ assert(lib_##NAME != NULL) ++#define ADL_OK 0 ++#define ADL_MAX_PATH 256 + -+#define LOAD_FUNC(NAME, RET, ARGS) \ -+ LOAD_FUNC_(NAME, RET, ARGS, NULL) -+ -+static void *libdrm_handle; -+static int libdrm_handle_ok = -1; -+ -+static inline void *libdrm_symbol(const char *name) -+{ -+ if (!libdrm_open()) -+ return NULL; -+ return dlsym(libdrm_handle, name); -+} -+ -+int libdrm_open(void) -+{ -+ if (libdrm_handle_ok < 0) { -+ libdrm_handle = dlopen("libdrm.so.2", RTLD_LOCAL|RTLD_LAZY); -+ libdrm_handle_ok = libdrm_handle != NULL; ++/* ++ * Based on public AMD Display Library (ADL) SDK: ++ * ++ */ ++typedef struct AdapterInfo { ++ int iSize; ++ int iAdapterIndex; ++ char strUDID[ADL_MAX_PATH]; ++ int iBusNumber; ++ int iDeviceNumber; ++ int iFunctionNumber; ++ int iVendorID; ++ char strAdapterName[ADL_MAX_PATH]; ++ char strDisplayName[ADL_MAX_PATH]; ++ int iPresent; ++ int iXScreenNum; ++ int iDrvIndex; ++ char strXScreenConfigName[ADL_MAX_PATH]; ++} AdapterInfo, *LPAdapterInfo; ++ ++typedef struct XScreenInfo { ++ int iXScreenNum; ++ char strXScreenConfigName[ADL_MAX_PATH]; ++} XScreenInfo, *LPXScreenInfo; ++ ++typedef void *(*ADL_MAIN_MALLOC_CALLBACK)(int); ++typedef int (*ADL_MAIN_CONTROL_CREATE)(ADL_MAIN_MALLOC_CALLBACK, int); ++typedef int (*ADL_MAIN_CONTROL_DESTROY)(void); ++typedef int (*ADL_ADAPTER_NUMBEROFADAPTERS_GET)(int *); ++typedef int (*ADL_ADAPTER_ADAPTERINFO_GET)(LPAdapterInfo, int); ++typedef int (*ADL_ADAPTER_XSCREENINFO_GET)(LPXScreenInfo, int); ++ ++static void *ADL_Main_Memory_Alloc(int iSize) ++{ ++ return malloc(iSize); ++} ++ ++static void ADL_Main_Memory_Free(void *arg) ++{ ++ void ** const lpBuffer = arg; ++ ++ if (lpBuffer && *lpBuffer) { ++ free(*lpBuffer); ++ *lpBuffer = NULL; + } -+ assert(libdrm_handle); -+ return libdrm_handle_ok; +} + -+void libdrm_close(void) ++static int match_display(Display *x11_dpy, const char *display_name) +{ -+ if (libdrm_handle) -+ dlclose(libdrm_handle); -+} ++ Display *test_dpy; ++ char *test_dpy_name, *x11_dpy_name; ++ int m; + -+// Default drmOpenOnce() and drmCloseOnce() implementations based on current GIT -+#define DRM_MAX_FDS 16 -+static struct { -+ char *BusID; -+ int fd; -+ int refcount; -+} connection[DRM_MAX_FDS]; -+ -+static int nr_fds = 0; -+ -+// Default implementation for drmOpenOnce() if none exists in the library -+static int -+libdrm_default_drmOpenOnce(void *unused, const char *BusID, int *newlyopened) -+{ -+ int i; -+ int fd; ++ test_dpy = XOpenDisplay(display_name); ++ if (!test_dpy) ++ return 0; + -+ for (i = 0; i < nr_fds; i++) -+ if (strcmp(BusID, connection[i].BusID) == 0) { -+ connection[i].refcount++; -+ *newlyopened = 0; -+ return connection[i].fd; -+ } ++ test_dpy_name = XDisplayString(test_dpy); ++ x11_dpy_name = XDisplayString(x11_dpy); + -+ fd = libdrm_drmOpen(unused, BusID); -+ if (fd <= 0 || nr_fds == DRM_MAX_FDS) -+ return fd; -+ -+ connection[nr_fds].BusID = strdup(BusID); -+ connection[nr_fds].fd = fd; -+ connection[nr_fds].refcount = 1; -+ *newlyopened = 1; -+ -+ if (0) -+ fprintf(stderr, "saved connection %d for %s %d\n", -+ nr_fds, connection[nr_fds].BusID, -+ strcmp(BusID, connection[nr_fds].BusID)); -+ nr_fds++; -+ return fd; -+} ++ if (x11_dpy_name && test_dpy_name) ++ m = strcmp(x11_dpy_name, test_dpy_name) == 0; ++ else ++ m = !x11_dpy_name && !test_dpy_name; + -+// Default implementation for drmCloseOnce() if none exists in the library -+static void libdrm_default_drmCloseOnce(int fd) -+{ -+ int i; ++ XCloseDisplay(test_dpy); ++ return m; ++} + -+ for (i = 0; i < nr_fds; i++) { -+ if (fd == connection[i].fd) { -+ if (--connection[i].refcount == 0) { -+ libdrm_drmClose(connection[i].fd); -+ free(connection[i].BusID); -+ if (i < --nr_fds) -+ connection[i] = connection[nr_fds]; -+ return; -+ } ++Bool VA_FGLRXGetClientDriverName( Display *dpy, int screen, ++ int *ddxDriverMajorVersion, int *ddxDriverMinorVersion, ++ int *ddxDriverPatchVersion, char **clientDriverName ) ++{ ++ ADL_MAIN_CONTROL_CREATE ADL_Main_Control_Create; ++ ADL_MAIN_CONTROL_DESTROY ADL_Main_Control_Destroy; ++ ADL_ADAPTER_NUMBEROFADAPTERS_GET ADL_Adapter_NumberOfAdapters_Get; ++ ADL_ADAPTER_ADAPTERINFO_GET ADL_Adapter_AdapterInfo_Get; ++ ADL_ADAPTER_XSCREENINFO_GET ADL_Adapter_XScreenInfo_Get; ++ ++ LPAdapterInfo lpAdapterInfo = NULL; ++ LPXScreenInfo lpXScreenInfo = NULL; ++ void *libadl_handle = NULL; ++ Bool success = False; ++ int is_adl_initialized = 0; ++ int i, num_adapters, lpAdapterInfo_size, lpXScreenInfo_size; ++ ++ if (ddxDriverMajorVersion) ++ *ddxDriverMajorVersion = 0; ++ if (ddxDriverMinorVersion) ++ *ddxDriverMinorVersion = 0; ++ if (ddxDriverPatchVersion) ++ *ddxDriverPatchVersion = 0; ++ if (clientDriverName) ++ *clientDriverName = NULL; ++ ++ libadl_handle = dlopen("libatiadlxx.so", RTLD_LAZY|RTLD_GLOBAL); ++ if (!libadl_handle) ++ goto end; ++ ++ dlerror(); ++ ADL_Main_Control_Create = (ADL_MAIN_CONTROL_CREATE) ++ dlsym(libadl_handle,"ADL_Main_Control_Create"); ++ if (dlerror()) ++ goto end; ++ ++ ADL_Main_Control_Destroy = (ADL_MAIN_CONTROL_DESTROY) ++ dlsym(libadl_handle,"ADL_Main_Control_Destroy"); ++ if (dlerror()) ++ goto end; ++ ++ ADL_Adapter_NumberOfAdapters_Get = (ADL_ADAPTER_NUMBEROFADAPTERS_GET) ++ dlsym(libadl_handle,"ADL_Adapter_NumberOfAdapters_Get"); ++ if (dlerror()) ++ goto end; ++ ++ ADL_Adapter_AdapterInfo_Get = (ADL_ADAPTER_ADAPTERINFO_GET) ++ dlsym(libadl_handle,"ADL_Adapter_AdapterInfo_Get"); ++ if (dlerror()) ++ goto end; ++ ++ ADL_Adapter_XScreenInfo_Get = (ADL_ADAPTER_XSCREENINFO_GET) ++ dlsym(libadl_handle,"ADL_Adapter_XScreenInfo_Get"); ++ if (dlerror()) ++ goto end; ++ ++ if (ADL_Main_Control_Create(ADL_Main_Memory_Alloc, 1) != ADL_OK) ++ goto end; ++ is_adl_initialized = 1; ++ ++ if (ADL_Adapter_NumberOfAdapters_Get(&num_adapters) != ADL_OK) ++ goto end; ++ if (num_adapters <= 0) ++ goto end; ++ ++ lpAdapterInfo_size = num_adapters * sizeof(*lpAdapterInfo); ++ lpAdapterInfo = ADL_Main_Memory_Alloc(lpAdapterInfo_size); ++ if (!lpAdapterInfo) ++ goto end; ++ memset(lpAdapterInfo, 0, lpAdapterInfo_size); ++ ++ for (i = 0; i < num_adapters; i++) ++ lpAdapterInfo[i].iSize = sizeof(lpAdapterInfo[i]); ++ ++ lpXScreenInfo_size = num_adapters * sizeof(*lpXScreenInfo); ++ lpXScreenInfo = ADL_Main_Memory_Alloc(lpXScreenInfo_size); ++ if (!lpXScreenInfo) ++ goto end; ++ memset(lpXScreenInfo, 0, lpXScreenInfo_size); ++ ++ if (ADL_Adapter_AdapterInfo_Get(lpAdapterInfo, lpAdapterInfo_size) != ADL_OK) ++ goto end; ++ ++ if (ADL_Adapter_XScreenInfo_Get(lpXScreenInfo, lpXScreenInfo_size) != ADL_OK) ++ goto end; ++ ++ for (i = 0; i < num_adapters; i++) { ++ LPXScreenInfo const lpCurrXScreenInfo = &lpXScreenInfo[i]; ++ LPAdapterInfo const lpCurrAdapterInfo = &lpAdapterInfo[i]; ++ if (!lpCurrAdapterInfo->iPresent) ++ continue; ++#if 0 ++ printf("Adapter %d:\n", i); ++ printf(" iAdapterIndex: %d\n", lpCurrAdapterInfo->iAdapterIndex); ++ printf(" strUDID: '%s'\n", lpCurrAdapterInfo->strUDID); ++ printf(" iBusNumber: %d\n", lpCurrAdapterInfo->iBusNumber); ++ printf(" iDeviceNumber: %d\n", lpCurrAdapterInfo->iDeviceNumber); ++ printf(" iFunctionNumber: %d\n", lpCurrAdapterInfo->iFunctionNumber); ++ printf(" iVendorID: 0x%04x\n", lpCurrAdapterInfo->iVendorID); ++ printf(" strAdapterName: '%s'\n", lpCurrAdapterInfo->strAdapterName); ++ printf(" strDisplayName: '%s'\n", lpCurrAdapterInfo->strDisplayName); ++ printf(" iPresent: %d\n", lpCurrAdapterInfo->iPresent); ++ printf(" iXScreenNum: %d\n", lpCurrXScreenInfo->iXScreenNum); ++#endif ++ if (match_display(dpy, lpCurrAdapterInfo->strDisplayName) && ++ screen == lpXScreenInfo->iXScreenNum) { ++ *clientDriverName = strdup("fglrx"); ++ break; + } + } -+} -+ -+// Determine whether the DRM kernel driver has been loaded -+int libdrm_drmAvailable(void) -+{ -+ LOAD_FUNC(drmAvailable, int, (void)); -+ return lib_drmAvailable(); -+} -+ -+// Open the DRM device -+int libdrm_drmOpen(const char *name, const char *busid) -+{ -+ LOAD_FUNC(drmOpen, int, (const char *, const char *)); -+ return lib_drmOpen(name, busid); -+} -+ -+// Close the device -+int libdrm_drmClose(int fd) -+{ -+ LOAD_FUNC(drmClose, int, (int)); -+ return lib_drmClose(fd); -+} -+ -+// Open the DRM device (re-use an existing connection) -+int libdrm_drmOpenOnce(void *unused, const char *BusID, int *newlyopened) -+{ -+ LOAD_FUNC_(drmOpenOnce, int, (void *, const char *, int *), -+ libdrm_default_drmOpenOnce); -+ return lib_drmOpenOnce(unused, BusID, newlyopened); -+} -+ -+// Close the device (unref an existing connection prior to actually closing it) -+void libdrm_drmCloseOnce(int fd) -+{ -+ LOAD_FUNC_(drmCloseOnce, void, (int), libdrm_default_drmCloseOnce); -+ lib_drmCloseOnce(fd); -+} -+ -+// DRM connection cookie -+int libdrm_drmGetMagic(int fd, drm_magic_t * magic) -+{ -+ LOAD_FUNC(drmGetMagic, int, (int, drm_magic_t *)); -+ return lib_drmGetMagic(fd, magic); -+} -+ -+// Issue a set-version ioctl -+int libdrm_drmSetInterfaceVersion(int fd, drmSetVersion *version) -+{ -+ LOAD_FUNC(drmSetInterfaceVersion, int, (int, drmSetVersion *)); -+ return lib_drmSetInterfaceVersion(fd, version); -+} + -+// Get the bus ID of the device -+char *libdrm_drmGetBusid(int fd) -+{ -+ LOAD_FUNC(drmGetBusid, char *, (int)); -+ return lib_drmGetBusid(fd); ++ success = True; ++end: ++ if (lpXScreenInfo) ++ ADL_Main_Memory_Free(&lpXScreenInfo); ++ if (lpAdapterInfo) ++ ADL_Main_Memory_Free(&lpAdapterInfo); ++ if (is_adl_initialized) ++ ADL_Main_Control_Destroy(); ++ if (libadl_handle) ++ dlclose(libadl_handle); ++ return success; +} -+ -+// Free the bus ID information -+void libdrm_drmFreeBusid(const char *busid) -+{ -+ LOAD_FUNC(drmFreeBusid, void, (const char *)); -+ lib_drmFreeBusid(busid); -+} -+ -+// Map a region of memory -+int libdrm_drmMap(int fd, -+ drm_handle_t handle, -+ drmSize size, -+ drmAddressPtr address) -+{ -+ LOAD_FUNC(drmMap, int, (int, drm_handle_t, drmSize, drmAddressPtr)); -+ return lib_drmMap(fd, handle, size, address); -+} -+ -+// Unmap mappings obtained with drmMap() -+int libdrm_drmUnmap(drmAddress address, drmSize size) -+{ -+ LOAD_FUNC(drmUnmap, int, (drmAddress, drmSize)); -+ return lib_drmUnmap(address, size); -+} -diff --git a/src/x11/libdrm_glue.h b/src/x11/libdrm_glue.h +diff --git a/va/x11/va_fglrx.h b/va/x11/va_fglrx.h new file mode 100644 -index 0000000..878470b +index 0000000..6616044 --- /dev/null -+++ b/src/x11/libdrm_glue.h -@@ -0,0 +1,73 @@ ++++ b/va/x11/va_fglrx.h +@@ -0,0 +1,34 @@ +/* -+ * Copyright (C) 2009 Splitted-Desktop Systems. All Rights Reserved. ++ * Copyright (C) 2010 Splitted-Desktop Systems. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the @@ -443,100 +291,60 @@ + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + -+#ifndef LIBDRM_GLUE_H -+#define LIBDRM_GLUE_H ++#ifndef VA_FGLRX_H ++#define VA_FGLRX_H + -+#include "config.h" -+#include ++#include + -+int libdrm_open(void) -+ ATTRIBUTE_HIDDEN; -+ -+void libdrm_close(void) -+ ATTRIBUTE_HIDDEN; -+ -+int libdrm_drmAvailable(void) -+ ATTRIBUTE_HIDDEN; -+ -+int libdrm_drmOpen(const char *name, const char *busid) -+ ATTRIBUTE_HIDDEN; -+ -+int libdrm_drmClose(int fd) -+ ATTRIBUTE_HIDDEN; -+ -+int libdrm_drmOpenOnce(void *unused, const char *BusID, int *newlyopened) -+ ATTRIBUTE_HIDDEN; -+ -+void libdrm_drmCloseOnce(int fd) -+ ATTRIBUTE_HIDDEN; -+ -+int libdrm_drmGetMagic(int fd, drm_magic_t * magic) -+ ATTRIBUTE_HIDDEN; -+ -+int libdrm_drmSetInterfaceVersion(int fd, drmSetVersion *version) -+ ATTRIBUTE_HIDDEN; -+ -+char *libdrm_drmGetBusid(int fd) -+ ATTRIBUTE_HIDDEN; -+ -+void libdrm_drmFreeBusid(const char *busid) -+ ATTRIBUTE_HIDDEN; -+ -+int libdrm_drmMap(int fd, -+ drm_handle_t handle, -+ drmSize size, -+ drmAddressPtr address) -+ ATTRIBUTE_HIDDEN; -+ -+int libdrm_drmUnmap(drmAddress address, drmSize size) -+ ATTRIBUTE_HIDDEN; -+ -+#endif /* LIBDRM_GLUE_H */ -diff --git a/src/x11/va_dricommon.h b/src/x11/va_dricommon.h -index a2a51a6..0da35fe 100644 ---- a/src/x11/va_dricommon.h -+++ b/src/x11/va_dricommon.h -@@ -13,7 +13,8 @@ enum - { - VA_NONE = 0, - VA_DRI1 = 1, -- VA_DRI2 = 2 -+ VA_DRI2 = 2, -+ VA_DRI_AMD = 4 /* AMD DRI implementation */ - }; - - union dri_buffer -diff --git a/src/x11/va_x11.c b/src/x11/va_x11.c -index b8c60fa..414c261 100644 ---- a/src/x11/va_x11.c -+++ b/src/x11/va_x11.c ++Bool VA_FGLRXGetClientDriverName( Display *dpy, int screen, ++ int *ddxDriverMajorVersion, int *ddxDriverMinorVersion, ++ int *ddxDriverPatchVersion, char **clientDriverName ); ++ ++#endif /* VA_FGLRX_H */ +diff --git a/va/x11/va_x11.c b/va/x11/va_x11.c +index 7f8fbd6..cbd2614 100644 +--- a/va/x11/va_x11.c ++++ b/va/x11/va_x11.c @@ -31,6 +31,7 @@ #include "va_dri2.h" #include "va_dricommon.h" #include "va_nvctrl.h" -+#include "libdrm_glue.h" ++#include "va_fglrx.h" #include + #include #include - #include -@@ -94,6 +75,8 @@ static void va_DisplayContextDestroy ( - } - ctx = &((*ctx)->pNext); - } -+ -+ libdrm_close(); - free(pDisplayContext->pDriverContext->dri_state); - free(pDisplayContext->pDriverContext); - free(pDisplayContext); -diff --git a/src/Makefile.am b/src/Makefile.am -index e50a15f..d1f8f70 100644 ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -45,7 +45,7 @@ libva_la_LDFLAGS = $(LDADD) -no-undefined - libva_la_LIBADD = $(LIBVA_LIBS) -ldl +@@ -130,6 +131,24 @@ static VAStatus va_NVCTRL_GetDriverName ( + return VA_STATUS_SUCCESS; + } - libva_x11_la_SOURCES = --libva_x11_la_LIBADD = $(libvacorelib) x11/libva_x11.la $(LIBVA_LIBS) $(X11_LIBS) $(XEXT_LIBS) $(DRM_LIBS) $(XFIXES_LIBS) -+libva_x11_la_LIBADD = $(libvacorelib) x11/libva_x11.la $(LIBVA_LIBS) $(X11_LIBS) $(XEXT_LIBS) $(XFIXES_LIBS) -ldl - libva_x11_la_LDFLAGS = $(LDADD) - libva_x11_la_DEPENDENCIES = $(libvacorelib) x11/libva_x11.la ++static VAStatus va_FGLRX_GetDriverName ( ++ VADisplayContextP pDisplayContext, ++ char **driver_name ++) ++{ ++ VADriverContextP ctx = pDisplayContext->pDriverContext; ++ int driver_major, driver_minor, driver_patch; ++ Bool result; ++ ++ result = VA_FGLRXGetClientDriverName(ctx->native_dpy, ctx->x11_screen, ++ &driver_major, &driver_minor, ++ &driver_patch, driver_name); ++ if (!result) ++ return VA_STATUS_ERROR_UNKNOWN; ++ ++ return VA_STATUS_SUCCESS; ++} ++ + static VAStatus va_DisplayContextGetDriverName ( + VADisplayContextP pDisplayContext, + char **driver_name +@@ -145,7 +164,8 @@ static VAStatus va_DisplayContextGetDriverName ( + vaStatus = va_DRIGetDriverName(pDisplayContext, driver_name); + if (vaStatus != VA_STATUS_SUCCESS) + vaStatus = va_NVCTRL_GetDriverName(pDisplayContext, driver_name); +- ++ if (vaStatus != VA_STATUS_SUCCESS) ++ vaStatus = va_FGLRX_GetDriverName(pDisplayContext, driver_name); + return vaStatus; + } diff -Nru libva-1.0.1/debian/patches/204_check_ATIFGLEXTENSION.patch libva-1.0.1-3+0.31.1/debian/patches/204_check_ATIFGLEXTENSION.patch --- libva-1.0.1/debian/patches/204_check_ATIFGLEXTENSION.patch 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/debian/patches/204_check_ATIFGLEXTENSION.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,312 +0,0 @@ -commit d91645f8b37aa43bafa76da3146dcdc9c17963ff -Author: Gwenole Beauchesne -Date: Fri Nov 20 15:51:22 2009 +0000 - - Fix detection of fglrx. - -diff --git a/src/x11/Makefile.am b/src/x11/Makefile.am -index b6916f2..0b61c33 100644 ---- a/src/x11/Makefile.am -+++ b/src/x11/Makefile.am -@@ -25,6 +25,23 @@ noinst_LTLIBRARIES = libva_x11.la - libva_x11includedir = ${includedir}/va - libva_x11include_HEADERS = va_x11.h va_dri.h va_dri2.h va_dricommon.h - --libva_x11_la_SOURCES = va_x11.c va_dri.c va_dri2.c va_dricommon.c dri2_util.c dri1_util.c va_nvctrl.c libdrm_glue.c -+libva_x11_la_SOURCES = \ -+ dri1_util.c \ -+ dri2_util.c \ -+ libdrm_glue.c \ -+ va_dri.c \ -+ va_dri2.c \ -+ va_dricommon.c \ -+ va_fglext.c \ -+ va_nvctrl.c \ -+ va_x11.c \ -+ $(NULL) - --EXTRA_DIST = va_dristr.h va_dri2str.h va_dri2tokens.h va_nvctrl.h libdrm_glue.h -+EXTRA_DIST = \ -+ libdrm_glue.h \ -+ va_dri2str.h \ -+ va_dri2tokens.h \ -+ va_dristr.h \ -+ va_fglext.h \ -+ va_nvctrl.h \ -+ $(NULL) -diff --git a/src/x11/va_fglext.c b/src/x11/va_fglext.c -new file mode 100644 -index 0000000..bc58e8b ---- /dev/null -+++ b/src/x11/va_fglext.c -@@ -0,0 +1,175 @@ -+/* -+ * Copyright (C) 2009 Splitted-Desktop Systems. All Rights Reserved. -+ * -+ * 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, sub license, 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 (including the -+ * next paragraph) 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 NON-INFRINGEMENT. -+ * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR -+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -+ */ -+ -+#define _GNU_SOURCE 1 -+#include -+ -+#define NEED_REPLIES -+#include -+#include -+#include -+#include -+#include -+#include "va_fglext.h" -+ -+#define ATIFGL_EXTENSION_NAME "ATIFGLEXTENSION" -+#define ATIFGL_EXTENSION_EVENTS 0 -+ -+typedef struct _FGLGetDriverData { -+ CARD8 reqType; -+ CARD8 fireglReqType; -+ CARD16 length B16; -+ CARD32 screen B32; -+ CARD16 size B16; -+ CARD16 pad1; -+} xFGLGetDriverDataReq; -+#define sz_xFGLGetDriverDataReq sizeof(xFGLGetDriverDataReq) -+ -+typedef struct { -+ BYTE type; -+ BYTE pad1; -+ CARD16 sequenceNumber B16; -+ CARD32 length B32; -+ CARD8 majorVersion; -+ CARD8 minorVersion; -+ CARD8 patchlevel B16; -+ CARD8 BIOSVersionMajor; -+ CARD8 BIOSVersionMinor; -+ CARD8 HasSecondary; -+ CARD16 pad3 B16; -+ CARD32 pad4 B32; -+ CARD32 pad5 B32; -+ CARD32 pad6 B32; -+ CARD32 pad7 B32; -+ // ... there are more fields -+} xFGLGetDriverDataReply; -+#define sz_xFGLGetDriverDataReply sizeof(xFGLGetDriverDataReply) -+ -+#define X_FGLGetDriverData 0 -+ -+static XExtensionInfo _fglext_ext_info_data; -+static XExtensionInfo *fglext_ext_info = &_fglext_ext_info_data; -+static /* const */ char *fglext_extension_name = ATIFGL_EXTENSION_NAME; -+ -+#define xFGLCheckExtension(dpy,i,val) \ -+ XextCheckExtension (dpy, i, fglext_extension_name, val) -+ -+static int close_display(); -+static /* const */ XExtensionHooks fglext_extension_hooks = { -+ NULL, /* create_gc */ -+ NULL, /* copy_gc */ -+ NULL, /* flush_gc */ -+ NULL, /* free_gc */ -+ NULL, /* create_font */ -+ NULL, /* free_font */ -+ close_display, /* close_display */ -+ NULL, /* wire_to_event */ -+ NULL, /* event_to_wire */ -+ NULL, /* error */ -+ NULL, /* error_string */ -+}; -+ -+static XEXT_GENERATE_FIND_DISPLAY (find_display, fglext_ext_info, -+ fglext_extension_name, -+ &fglext_extension_hooks, -+ ATIFGL_EXTENSION_EVENTS, NULL) -+ -+static XEXT_GENERATE_CLOSE_DISPLAY (close_display, fglext_ext_info) -+ -+Bool VA_FGLEXTQueryDirectRenderingCapable( Display *dpy, int screen, -+ Bool *isCapable ) -+{ -+ char **extensions; -+ int i, n_extensions, has_fglext = 0, has_fglrxdri = 0; -+ -+ if (isCapable) -+ *isCapable = False; -+ -+ extensions = XListExtensions(dpy, &n_extensions); -+ if (!extensions) -+ return False; -+ -+ for (i = 0; i < n_extensions; i++) { -+ if (strcmp(extensions[i], ATIFGL_EXTENSION_NAME) == 0) -+ has_fglext = 1; -+ if (strcmp(extensions[i], "ATIFGLRXDRI") == 0) -+ has_fglrxdri = 1; -+ } -+ XFreeExtensionList(extensions); -+ -+ if (!has_fglext) -+ return False; -+ -+ if (isCapable) -+ *isCapable = has_fglrxdri; -+ -+ return True; -+} -+ -+Bool VA_FGLEXTGetClientDriverName( Display *dpy, int screen, -+ int *ddxDriverMajorVersion, int *ddxDriverMinorVersion, -+ int *ddxDriverPatchVersion, char **clientDriverName ) -+{ -+ XExtDisplayInfo *info = find_display (dpy); -+ xFGLGetDriverDataReply rep; -+ xFGLGetDriverDataReq *req; -+ -+ if (ddxDriverMajorVersion) -+ *ddxDriverMajorVersion = 0; -+ if (ddxDriverMinorVersion) -+ *ddxDriverMinorVersion = 0; -+ if (ddxDriverPatchVersion) -+ *ddxDriverPatchVersion = 0; -+ if (clientDriverName) -+ *clientDriverName = NULL; -+ -+ if(!XextHasExtension(info)) -+ return False; -+ -+ xFGLCheckExtension (dpy, info, False); -+ -+ LockDisplay (dpy); -+ GetReq (FGLGetDriverData, req); -+ req->reqType = info->codes->major_opcode; -+ req->fireglReqType = X_FGLGetDriverData; -+ req->screen = screen; -+ if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) { -+ UnlockDisplay (dpy); -+ SyncHandle (); -+ return False; -+ } -+ UnlockDisplay (dpy); -+ SyncHandle (); -+ -+ if (ddxDriverMajorVersion) -+ *ddxDriverMajorVersion = rep.majorVersion; -+ if (ddxDriverMinorVersion) -+ *ddxDriverMinorVersion = rep.minorVersion; -+ if (ddxDriverPatchVersion) -+ *ddxDriverPatchVersion = rep.patchlevel; -+ if (clientDriverName) -+ *clientDriverName = strdup("fglrx"); -+ -+ return True; -+} -diff --git a/src/x11/va_fglext.h b/src/x11/va_fglext.h -new file mode 100644 -index 0000000..f2d87c3 ---- /dev/null -+++ b/src/x11/va_fglext.h -@@ -0,0 +1,37 @@ -+/* -+ * Copyright (C) 2009 Splitted-Desktop Systems. All Rights Reserved. -+ * -+ * 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, sub license, 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 (including the -+ * next paragraph) 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 NON-INFRINGEMENT. -+ * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR -+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -+ */ -+ -+#ifndef VA_FGLEXTLIB_H -+#define VA_FGLEXTLIB_H -+ -+#include -+ -+Bool VA_FGLEXTQueryDirectRenderingCapable( Display *dpy, int screen, -+ Bool *isCapable ); -+ -+Bool VA_FGLEXTGetClientDriverName( Display *dpy, int screen, -+ int *ddxDriverMajorVersion, int *ddxDriverMinorVersion, -+ int *ddxDriverPatchVersion, char **clientDriverName ); -+ -+#endif /* VA_FGLEXTLIB_H */ -diff --git a/src/x11/va_x11.c b/src/x11/va_x11.c -index 414c261..0510e00 100644 ---- a/src/x11/va_x11.c -+++ b/src/x11/va_x11.c -@@ -31,6 +31,7 @@ - #include "va_dri2.h" - #include "va_dricommon.h" - #include "va_nvctrl.h" -+#include "va_fglext.h" - #include "libdrm_glue.h" - #include - #include -@@ -132,6 +133,29 @@ static VAStatus va_NVCTRL_GetDriverName ( - return VA_STATUS_SUCCESS; - } - -+static VAStatus va_FGLEXT_GetDriverName( -+ VADisplayContextP pDisplayContext, -+ char **driver_name -+) -+{ -+ VADriverContextP ctx = pDisplayContext->pDriverContext; -+ int direct_capable, driver_major, driver_minor, driver_patch; -+ Bool result; -+ -+ result = VA_FGLEXTQueryDirectRenderingCapable(ctx->x11_dpy, ctx->x11_screen, -+ &direct_capable); -+ if (!result || !direct_capable) -+ return VA_STATUS_ERROR_UNKNOWN; -+ -+ result = VA_FGLEXTGetClientDriverName(ctx->x11_dpy, ctx->x11_screen, -+ &driver_major, &driver_minor, -+ &driver_patch, driver_name); -+ if (!result) -+ return VA_STATUS_ERROR_UNKNOWN; -+ -+ return VA_STATUS_SUCCESS; -+} -+ - static VAStatus va_DisplayContextGetDriverName ( - VADisplayContextP pDisplayContext, - char **driver_name -@@ -156,7 +180,8 @@ static VAStatus va_DisplayContextGetDriverName ( - vaStatus = va_DRIGetDriverName(pDisplayContext, driver_name); - if (vaStatus != VA_STATUS_SUCCESS) - vaStatus = va_NVCTRL_GetDriverName(pDisplayContext, driver_name); -- -+ if (vaStatus != VA_STATUS_SUCCESS) -+ vaStatus = va_FGLEXT_GetDriverName(pDisplayContext, driver_name); - return vaStatus; - } - diff -Nru libva-1.0.1/debian/patches/300_sds_version.patch libva-1.0.1-3+0.31.1/debian/patches/300_sds_version.patch --- libva-1.0.1/debian/patches/300_sds_version.patch 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/debian/patches/300_sds_version.patch 2010-07-07 12:20:21.000000000 +0000 @@ -1,22 +1,22 @@ -commit 890acc1975ed9f6b7173ff6fbf9d689943590913 +commit 3ddf9c5bbc1d4dffbccd6551cb9102d5c921bba1 Author: Gwenole Beauchesne Date: Wed Jun 24 11:32:40 2009 +0000 Explicit API extensions from SDS. diff --git a/configure.ac b/configure.ac -index 3999dc4..17b0403 100644 +index 23cd277..cb9af00 100644 --- a/configure.ac +++ b/configure.ac -@@ -28,6 +28,9 @@ m4_define([libva_micro_version], [0]) +@@ -28,6 +28,9 @@ m4_define([libva_micro_version], [1]) m4_define([libva_version], [libva_major_version.libva_minor_version.libva_micro_version]) +# increase this number for each API change -+m4_define([libva_sds_version], [4]) ++m4_define([libva_sds_version], [1]) + # if the library source code has changed, increment revision - m4_define([libva_lt_revision], [0]) + m4_define([libva_lt_revision], [2]) # if any interface was added/removed/changed, then inc current, reset revision @@ -52,11 +55,14 @@ AC_SUBST(LIBVA_MINOR_VERSION) AC_SUBST(LIBVA_MICRO_VERSION) @@ -34,34 +34,43 @@ AC_SUBST(LIBVA_LT_VERSION) AC_SUBST(LIBVA_LT_LDFLAGS) -diff --git a/src/va.c b/src/va.c -index f9791f8..b60ac12 100644 ---- a/src/va.c -+++ b/src/va.c -@@ -35,6 +35,7 @@ - #include - - #define DRIVER_INIT_FUNC "__vaDriverInit_0_31" -+#define DRIVER_INIT_FUNC_SDS "__vaDriverInit_0_31_sds" - - #define DRIVER_EXTENSION "_drv_video.so" - -@@ -160,6 +161,11 @@ static VAStatus va_openDriver(VADisplay dpy, char *driver_name) - init_func = (VADriverInit) dlsym(handle, DRIVER_INIT_FUNC); - if (!init_func) - { -+ /* Then try SDS extensions (VDPAU and XvBA backends) */ -+ init_func = (VADriverInit) dlsym(handle, DRIVER_INIT_FUNC_SDS); -+ } +diff --git a/libva.pc.in b/libva.pc.in +index 60f1483..0b37945 100644 +--- a/libva.pc.in ++++ b/libva.pc.in +@@ -3,6 +3,7 @@ exec_prefix=@exec_prefix@ + libdir=@libdir@ + includedir=@includedir@ + driverdir=@LIBVA_DRIVERS_PATH@ ++sdsversion=@LIBVA_SDS_VERSION@ + + Name: libva + Description: Userspace Video Acceleration (VA) core interface +diff --git a/va/va.c b/va/va.c +index cfdb5b4..410abaf 100644 +--- a/va/va.c ++++ b/va/va.c +@@ -173,7 +173,15 @@ static VAStatus va_openDriver(VADisplay dpy, char *driver_name) + else + { + VADriverInit init_func; +- init_func = (VADriverInit) dlsym(handle, DRIVER_INIT_FUNC); ++ char driver_init_func_sds[32]; ++ /* First, try SDS extensions (VDPAU and XvBA backends) */ ++ sprintf(driver_init_func_sds, "%s_%d_sds%d", ++ DRIVER_INIT_FUNC, VA_MICRO_VERSION, VA_SDS_VERSION); ++ init_func = (VADriverInit) dlsym(handle, driver_init_func_sds); + if (!init_func) + { ++ init_func = (VADriverInit) dlsym(handle, DRIVER_INIT_FUNC); ++ } + if (!init_func) + { va_errorMessage("%s has no function %s\n", driver_path, DRIVER_INIT_FUNC); - dlclose(handle); - } -diff --git a/src/va_version.h.in b/src/va_version.h.in +diff --git a/va/va_version.h.in b/va/va_version.h.in index c9ea97a..197c482 100644 ---- a/src/va_version.h.in -+++ b/src/va_version.h.in +--- a/va/va_version.h.in ++++ b/va/va_version.h.in @@ -47,6 +47,13 @@ #define VA_MICRO_VERSION (@LIBVA_MICRO_VERSION@) diff -Nru libva-1.0.1/debian/patches/301_vdpau_mpeg4.patch libva-1.0.1-3+0.31.1/debian/patches/301_vdpau_mpeg4.patch --- libva-1.0.1/debian/patches/301_vdpau_mpeg4.patch 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/debian/patches/301_vdpau_mpeg4.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,26 +0,0 @@ -commit 3c2d45290e1369083a27d53a5f94276c82512974 -Author: Gwenole Beauchesne -Date: Mon Nov 23 12:21:24 2009 +0000 - - Add extra picture info fields for VDPAU/MPEG-4. - -diff --git a/src/va.h b/src/va.h -index fa34850..f89a5cb 100755 ---- a/src/va.h -+++ b/src/va.h -@@ -672,6 +672,7 @@ typedef struct _VAPictureParameterBufferMPEG4 - unsigned int quarter_sample : 1; - unsigned int data_partitioned : 1; - unsigned int reversible_vlc : 1; -+ unsigned int resync_marker_disable : 1; - } bits; - unsigned int value; - } vol_fields; -@@ -692,6 +693,7 @@ typedef struct _VAPictureParameterBufferMPEG4 - } vop_fields; - unsigned char vop_fcode_forward; - unsigned char vop_fcode_backward; -+ unsigned short vop_time_increment_resolution; - /* short header related */ - unsigned char num_gobs_in_vop; - unsigned char num_macroblocks_in_gob; diff -Nru libva-1.0.1/debian/patches/320_move_vaPutSurface_flags_def.patch libva-1.0.1-3+0.31.1/debian/patches/320_move_vaPutSurface_flags_def.patch --- libva-1.0.1/debian/patches/320_move_vaPutSurface_flags_def.patch 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/debian/patches/320_move_vaPutSurface_flags_def.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,60 +0,0 @@ -commit c682fb5ebd1964638f90590f66edf49629e7481d -Author: Gwenole Beauchesne -Date: Fri Aug 21 11:34:50 2009 +0000 - - Move vaPutSurface() flags to header. - -diff --git a/src/va.h b/src/va.h -index 0519f6f..6b4bbd4 100755 ---- a/src/va.h -+++ b/src/va.h -@@ -127,6 +127,22 @@ typedef int VAStatus; /* Return status type from functions */ - #define VA_STATUS_ERROR_RESOLUTION_NOT_SUPPORTED 0x00000013 - #define VA_STATUS_ERROR_UNKNOWN 0xFFFFFFFF - -+/* De-interlacing flags for vaPutSurface() */ -+#define VA_FRAME_PICTURE 0x00000000 -+#define VA_TOP_FIELD 0x00000001 -+#define VA_BOTTOM_FIELD 0x00000002 -+ -+/* -+ * Clears the drawable with background color. -+ * for hardware overlay based implementation this flag -+ * can be used to turn off the overlay -+ */ -+#define VA_CLEAR_DRAWABLE 0x00000008 -+ -+/* Color space conversion flags for vaPutSurface() */ -+#define VA_SRC_BT601 0x00000010 -+#define VA_SRC_BT709 0x00000020 -+ - /* - * Returns a short english description of error_status - */ -diff --git a/src/x11/va_x11.h b/src/x11/va_x11.h -index 2171ac6..5ab5200 100644 ---- a/src/x11/va_x11.h -+++ b/src/x11/va_x11.h -@@ -27,22 +27,6 @@ VADisplay vaGetDisplay ( - * color space conversion and scaling to the destination - * rectangle - */ --/* de-interlacing flags for vaPutSurface */ --#define VA_FRAME_PICTURE 0x00000000 --#define VA_TOP_FIELD 0x00000001 --#define VA_BOTTOM_FIELD 0x00000002 -- --/* -- * clears the drawable with background color. -- * for hardware overlay based implementation this flag -- * can be used to turn off the overlay -- */ --#define VA_CLEAR_DRAWABLE 0x00000008 -- --/* color space conversion flags for vaPutSurface */ --#define VA_SRC_BT601 0x00000010 --#define VA_SRC_BT709 0x00000020 -- - VAStatus vaPutSurface ( - VADisplay dpy, - VASurfaceID surface, diff -Nru libva-1.0.1/debian/patches/321_libva_glx.base.patch libva-1.0.1-3+0.31.1/debian/patches/321_libva_glx.base.patch --- libva-1.0.1/debian/patches/321_libva_glx.base.patch 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/debian/patches/321_libva_glx.base.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,212 +0,0 @@ -commit f0b352251894becfcec50de1430bda12c314a464 -Author: Gwenole Beauchesne -Date: Tue Sep 22 13:00:34 2009 +0000 - - Fix libva-glx pkgconfig dependencies. - -commit df0953a951d8a2e5e4b0a28a95ae0f1ac735726e -Author: Gwenole Beauchesne -Date: Tue Sep 8 12:25:14 2009 +0000 - - Add generic VA/GLX implementation with TFP and FBO. - -commit f640b1cf9eab4e5d478239b608ed0d8b68f6c5f6 -Author: Gwenole Beauchesne -Date: Tue Sep 8 12:15:35 2009 +0000 - - Move GLX VTable to a new file. - -commit 70d9cb6d1aa2fc2dde6646f3b692433e0d93d431 -Author: Gwenole Beauchesne -Date: Fri Aug 28 11:15:51 2009 +0000 - - Add OpenGL extensions (v3). - -diff --git a/Makefile.am b/Makefile.am -index 07385e6..6fb4cae 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -32,10 +32,13 @@ endif - - pcfiles = libva.pc - pcfiles += libva-x11.pc -+if USE_GLX -+pcfiles += libva-glx.pc -+endif - - pkgconfigdir = @pkgconfigdir@ - pkgconfig_DATA = $(pcfiles) - --EXTRA_DIST = libva.pc.in libva-x11.pc.in -+EXTRA_DIST = libva.pc.in libva-x11.pc.in libva-glx.pc.in - - CLEANFILES = $(pcfiles) -diff --git a/configure.ac b/configure.ac -index c3aba90..abef435 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -52,6 +55,11 @@ AC_SUBST(LIBVA_MINOR_VERSION) - AC_SUBST(LIBVA_LT_VERSION) - AC_SUBST(LIBVA_LT_LDFLAGS) - -+AC_ARG_ENABLE(glx, -+ [AC_HELP_STRING([--enable-glx], -+ [build with OpenGL for X11 support])], -+ [], [enable_glx=yes]) -+ - AC_ARG_ENABLE(dummy-driver, - [AC_HELP_STRING([--enable-dummy-driver], - [build dummy video driver])], -@@ -100,6 +132,23 @@ if test x$enable_i965_driver = xyes && ! $PKG_CONFIG --atleast-version=2.4 libdr - AC_DEFINE_UNQUOTED([ATTRIBUTE_HIDDEN], [$ATTRIBUTE_HIDDEN], - [Defined to __attribute__((visibility("hidden"))) when available]) - -+# Check for OpenGL (X11) -+USE_GLX="no" -+GL_DEPS_CFLAGS="" -+GL_DEPS_LIBS="" -+ -+if test x$enable_glx = xyes; then -+ AC_CHECK_HEADERS([GL/gl.h]) -+ AC_CHECK_HEADERS([GL/glx.h]) -+ AC_CHECK_LIB(GL, glXCreateContext, [ -+ USE_GLX="yes" -+ GL_DEPS_LIBS="-lX11 -lGL" -+ ]) -+fi -+AC_SUBST(GL_DEPS_CFLAGS) -+AC_SUBST(GL_DEPS_LIBS) -+AM_CONDITIONAL(USE_GLX, test "$USE_GLX" = "yes") -+ - # We only need the headers, we don't link against the DRM libraries - LIBVA_CFLAGS="$DRM_CFLAGS" - AC_SUBST(LIBVA_CFLAGS) -@@ -119,6 +192,7 @@ AC_OUTPUT([ - src/Makefile - src/va_version.h - src/x11/Makefile -+ src/glx/Makefile - dummy_drv_video/Makefile - i965_drv_video/Makefile - i965_drv_video/shaders/Makefile -@@ -128,5 +202,6 @@ AC_OUTPUT([ - test/Makefile - libva.pc - libva-x11.pc -+ libva-glx.pc - ]) - -diff --git a/libva-glx.pc.in b/libva-glx.pc.in -new file mode 100644 -index 0000000..20ba20a ---- /dev/null -+++ b/libva-glx.pc.in -@@ -0,0 +1,12 @@ -+prefix=@prefix@ -+exec_prefix=@exec_prefix@ -+libdir=@libdir@ -+includedir=@includedir@ -+display=glx -+ -+Name: libva-${display} -+Description: Userspace Video Acceleration (VA) ${display} interface -+Requires: libva -+Version: @PACKAGE_VERSION@ -+Libs: -L${libdir} -lva-${display} -+Cflags: -I${includedir} -diff --git a/src/Makefile.am b/src/Makefile.am -index 2f4210a..e50a15f 100644 ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -28,9 +28,17 @@ INCLUDES = \ - LDADD = \ - $(LIBVA_LT_LDFLAGS) - --lib_LTLIBRARIES = \ -- libva.la \ -- libva-x11.la -+libva_x11_backend = libva-x11.la -+libva_x11_backenddir = x11 -+if USE_GLX -+libva_glx_backend = libva-glx.la -+libva_glx_backenddir = glx -+else -+libva_glx_backend = -+libva_glx_backenddir = -+endif -+ -+lib_LTLIBRARIES = libva.la $(libva_x11_backend) $(libva_glx_backend) - - libva_ladir = $(libdir) - libva_la_LDFLAGS = $(LDADD) -no-undefined -@@ -41,7 +49,14 @@ libva_x11_la_LIBADD = $(libvacorelib) x11/libva_x11.la $(LIBVA_LIBS) $(X11_LIBS - libva_x11_la_LDFLAGS = $(LDADD) - libva_x11_la_DEPENDENCIES = $(libvacorelib) x11/libva_x11.la - --SUBDIRS = x11 -+libva_glx_la_SOURCES = -+libva_glx_la_LIBADD = $(libvacorelib) glx/libva_glx.la libva-x11.la $(GL_DEPS_LIBS) -ldl -+libva_glx_la_LDFLAGS = $(LDADD) -+libva_glx_la_DEPENDENCIES = $(libvacorelib) glx/libva_glx.la libva-x11.la -+ -+SUBDIRS = $(libva_x11_backenddir) $(libva_glx_backenddir) -+ -+DIST_SUBDIRS = x11 glx - - libva_la_SOURCES = va.c - -diff --git a/src/va_backend.h b/src/va_backend.h -index 6f858f5..8f722a3 100644 ---- a/src/va_backend.h -+++ b/src/va_backend.h -@@ -32,9 +32,11 @@ - #ifdef IN_LIBVA - #include "va.h" - #include "x11/va_x11.h" -+#include "glx/va_backend_glx.h" - #else - #include - #include -+#include - #endif - - #include -@@ -372,6 +374,9 @@ struct VADriverVTable - unsigned int *chroma_v_offset, - void **buffer - ); -+ -+ /* Optional: GLX support hooks */ -+ struct VADriverVTableGLX glx; - }; - - struct VADriverContext -@@ -394,6 +399,7 @@ struct VADriverContext - void *handle; /* dlopen handle */ - - void *dri_state; -+ void *glx; /* opaque for GLX code */ - }; - - struct VADisplayContext -@@ -413,6 +420,8 @@ struct VADisplayContext - VADisplayContextP ctx, - char **driver_name - ); -+ -+ void *opaque; /* opaque for display extensions (e.g. GLX) */ - }; - - typedef VAStatus (*VADriverInit) ( -diff --git a/src/x11/va_x11.c b/src/x11/va_x11.c -index 9de904e..b8c60fa 100644 ---- a/src/x11/va_x11.c -+++ b/src/x11/va_x11.c -@@ -243,6 +243,7 @@ VADisplay vaGetDisplay ( - pDisplayContext->vaIsValid = va_DisplayContextIsValid; - pDisplayContext->vaDestroy = va_DisplayContextDestroy; - pDisplayContext->vaGetDriverName = va_DisplayContextGetDriverName; -+ pDisplayContext->opaque = NULL; - pDisplayContexts = pDisplayContext; - pDriverContext->dri_state = dri_state; - dpy = (VADisplay)pDisplayContext; diff -Nru libva-1.0.1/debian/patches/322_libva_glx.patch libva-1.0.1-3+0.31.1/debian/patches/322_libva_glx.patch --- libva-1.0.1/debian/patches/322_libva_glx.patch 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/debian/patches/322_libva_glx.patch 2010-06-04 07:46:54.000000000 +0000 @@ -1,2024 +1,20 @@ -commit 8e76000abce070da5f1c902a6290f4ccaa3eccc8 +commit 699a57e13dbac03af16cfd49d838cd233d189dbd Author: Gwenole Beauchesne -Date: Fri Sep 18 15:51:08 2009 +0000 +Date: Tue Apr 13 04:54:11 2010 +0200 - Add C++ guards. + Add OpenGL extensions (v3) and generic implementation with TFP and FBO. -commit bf1ae22ef324fbb347f5369e1ba307e847553fe8 -Author: Gwenole Beauchesne -Date: Fri Sep 18 15:49:55 2009 +0000 - - Fix check for GL extensions. - -commit df0953a951d8a2e5e4b0a28a95ae0f1ac735726e -Author: Gwenole Beauchesne -Date: Tue Sep 8 12:25:14 2009 +0000 - - Add generic VA/GLX implementation with TFP and FBO. - -commit f640b1cf9eab4e5d478239b608ed0d8b68f6c5f6 -Author: Gwenole Beauchesne -Date: Tue Sep 8 12:15:35 2009 +0000 - - Move GLX VTable to a new file. - -commit 70d9cb6d1aa2fc2dde6646f3b692433e0d93d431 -Author: Gwenole Beauchesne -Date: Fri Aug 28 11:15:51 2009 +0000 - - Add OpenGL extensions (v3). - -diff --git a/src/glx/Makefile.am b/src/glx/Makefile.am -new file mode 100644 -index 0000000..7783d8c ---- /dev/null -+++ b/src/glx/Makefile.am -@@ -0,0 +1,41 @@ -+# Copyright (C) 2009 Splitted-Desktop Systems. All Rights Reserved. -+# -+# 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, sub license, 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 (including the -+# next paragraph) 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 NON-INFRINGEMENT. -+# IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR -+# ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -+# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -+# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -+ -+AM_CFLAGS = -DLINUX -DIN_LIBVA -I$(top_srcdir)/src -I$(top_srcdir)/src/x11 -+ -+source_c = \ -+ va_glx.c \ -+ va_glx_impl.c -+ -+source_h = \ -+ va_glx.h \ -+ va_backend_glx.h -+ -+source_h_priv = \ -+ va_glx_impl.h \ -+ va_glx_private.h -+ -+noinst_LTLIBRARIES = libva_glx.la -+libva_glxincludedir = ${includedir}/va -+libva_glxinclude_HEADERS = $(source_h) -+libva_glx_la_SOURCES = $(source_c) -+noinst_HEADERS = $(source_h_priv) -diff --git a/src/glx/va_backend_glx.h b/src/glx/va_backend_glx.h -new file mode 100644 -index 0000000..3885d30 ---- /dev/null -+++ b/src/glx/va_backend_glx.h -@@ -0,0 +1,87 @@ -+/* -+ * Copyright (C) 2009 Splitted-Desktop Systems. All Rights Reserved. -+ * -+ * 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, sub license, 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 (including the -+ * next paragraph) 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 NON-INFRINGEMENT. -+ * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR -+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -+ */ -+ -+#ifndef VA_BACKEND_GLX_H -+#define VA_BACKEND_GLX_H -+ -+struct VADriverContext; -+ -+struct VADriverVTableGLX { -+ /* Optional: create a surface used for display to OpenGL */ -+ VAStatus (*vaCreateSurfaceGLX)( -+ struct VADriverContext *ctx, -+ unsigned int gl_target, -+ unsigned int gl_texture, -+ void **gl_surface -+ ); -+ -+ /* Optional: destroy a VA/GLX surface */ -+ VAStatus (*vaDestroySurfaceGLX)( -+ struct VADriverContext *ctx, -+ void *gl_surface -+ ); -+ -+ /* Optional: associate a VA surface to a VA/GLX surface */ -+ VAStatus (*vaAssociateSurfaceGLX)( -+ struct VADriverContext *ctx, -+ void *gl_surface, -+ VASurfaceID surface, -+ unsigned int flags -+ ); -+ -+ /* Optional: deassociate a VA surface from a VA/GLX surface */ -+ VAStatus (*vaDeassociateSurfaceGLX)( -+ struct VADriverContext *ctx, -+ void *gl_surface -+ ); -+ -+ /* Optional: synchronize a VA/GLX surface */ -+ VAStatus (*vaSyncSurfaceGLX)( -+ struct VADriverContext *ctx, -+ void *gl_surface -+ ); -+ -+ /* Optional: prepare VA/GLX surface for rendering */ -+ VAStatus (*vaBeginRenderSurfaceGLX)( -+ struct VADriverContext *ctx, -+ void *gl_surface -+ ); -+ -+ /* Optional: notify the server that the VA/GLX surface is no -+ longer used for rendering */ -+ VAStatus (*vaEndRenderSurfaceGLX)( -+ struct VADriverContext *ctx, -+ void *gl_surface -+ ); -+ -+ /* Optional: copy a VA surface to a VA/GLX surface */ -+ VAStatus (*vaCopySurfaceGLX)( -+ struct VADriverContext *ctx, -+ void *gl_surface, -+ VASurfaceID surface, -+ unsigned int flags -+ ); -+}; -+ -+#endif /* VA_BACKEND_GLX_H */ -diff --git a/src/glx/va_glx.c b/src/glx/va_glx.c -new file mode 100644 -index 0000000..f6ec2c3 ---- /dev/null -+++ b/src/glx/va_glx.c -@@ -0,0 +1,295 @@ -+/* -+ * Copyright (C) 2009 Splitted-Desktop Systems. All Rights Reserved. -+ * -+ * 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, sub license, 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 (including the -+ * next paragraph) 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 NON-INFRINGEMENT. -+ * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR -+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -+ */ -+ -+#include "va_glx_private.h" -+#include "va_glx_impl.h" -+ -+#define INIT_CONTEXT(ctx, dpy) do { \ -+ if (!vaDisplayIsValid(dpy)) \ -+ return VA_STATUS_ERROR_INVALID_DISPLAY; \ -+ \ -+ ctx = ((VADisplayContextP)(dpy))->pDriverContext; \ -+ if (!(ctx)) \ -+ return VA_STATUS_ERROR_INVALID_DISPLAY; \ -+ \ -+ VAStatus status = va_glx_init_context(ctx); \ -+ if (status != VA_STATUS_SUCCESS) \ -+ return status; \ -+ } while (0) -+ -+#define INIT_SURFACE(surface, surface_arg) do { \ -+ surface = (VASurfaceGLXP)(surface_arg); \ -+ if (!vaSurfaceIsValid(surface)) \ -+ return VA_STATUS_ERROR_INVALID_SURFACE; \ -+ } while (0) -+ -+#define INVOKE(ctx, func, args) do { \ -+ VADriverVTableGLXP vtable; \ -+ vtable = &VA_DRIVER_CONTEXT_GLX(ctx)->vtable; \ -+ if (!vtable->va##func##GLX) \ -+ return VA_STATUS_ERROR_UNIMPLEMENTED; \ -+ status = vtable->va##func##GLX args; \ -+ } while (0) -+ -+// Check VADisplay is valid -+static inline int vaDisplayIsValid(VADisplay dpy) -+{ -+ VADisplayContextP pDisplayContext = (VADisplayContextP)dpy; -+ -+ return (pDisplayContext && -+ pDisplayContext->vaIsValid && -+ pDisplayContext->vaIsValid(pDisplayContext)); -+} -+ -+// Check VASurfaceGLX is valid -+static inline int vaSurfaceIsValid(VASurfaceGLXP pSurfaceGLX) -+{ -+ return pSurfaceGLX && pSurfaceGLX->magic == VA_SURFACE_GLX_MAGIC; -+} -+ -+// Destroy VA/GLX display context -+static void va_DisplayContextDestroy(VADisplayContextP pDisplayContext) -+{ -+ VADisplayContextGLXP pDisplayContextGLX; -+ VADriverContextP pDriverContext; -+ VADriverContextGLXP pDriverContextGLX; -+ -+ if (!pDisplayContext) -+ return; -+ -+ pDriverContext = pDisplayContext->pDriverContext; -+ pDriverContextGLX = pDriverContext->glx; -+ if (pDriverContextGLX) { -+ free(pDriverContextGLX); -+ pDriverContext->glx = NULL; -+ } -+ -+ pDisplayContextGLX = pDisplayContext->opaque; -+ if (pDisplayContextGLX) { -+ if (pDisplayContextGLX->vaDestroy) -+ pDisplayContextGLX->vaDestroy(pDisplayContext); -+ free(pDisplayContextGLX); -+ pDisplayContext->opaque = NULL; -+ } -+} -+ -+// Return a suitable VADisplay for VA API -+VADisplay vaGetDisplayGLX(Display *native_dpy) -+{ -+ VADisplay dpy = NULL; -+ VADisplayContextP pDisplayContext = NULL; -+ VADisplayContextGLXP pDisplayContextGLX = NULL; -+ VADriverContextP pDriverContext; -+ VADriverContextGLXP pDriverContextGLX = NULL; -+ -+ dpy = vaGetDisplay(native_dpy); -+ if (!dpy) -+ return NULL; -+ pDisplayContext = (VADisplayContextP)dpy; -+ pDriverContext = pDisplayContext->pDriverContext; -+ -+ pDisplayContextGLX = calloc(1, sizeof(*pDisplayContextGLX)); -+ if (!pDisplayContextGLX) -+ goto error; -+ -+ pDriverContextGLX = calloc(1, sizeof(*pDriverContextGLX)); -+ if (!pDriverContextGLX) -+ goto error; -+ -+ pDisplayContextGLX->vaDestroy = pDisplayContext->vaDestroy; -+ pDisplayContext->vaDestroy = va_DisplayContextDestroy; -+ pDisplayContext->opaque = pDisplayContextGLX; -+ pDriverContext->glx = pDriverContextGLX; -+ return dpy; -+ -+error: -+ free(pDriverContextGLX); -+ free(pDisplayContextGLX); -+ pDisplayContext->vaDestroy(pDisplayContext); -+ return NULL; -+} -+ -+// Create a surface used for display to OpenGL -+VAStatus vaCreateSurfaceGLX( -+ VADisplay dpy, -+ GLenum target, -+ GLuint texture, -+ void **gl_surface -+) -+{ -+ VADriverContextP ctx; -+ VASurfaceGLXP pSurfaceGLX; -+ VAStatus status; -+ -+ /* Make sure it is a valid GL texture object */ -+ if (!glIsTexture(texture)) -+ return VA_STATUS_ERROR_INVALID_PARAMETER; -+ -+ INIT_CONTEXT(ctx, dpy); -+ -+ pSurfaceGLX = va_glx_create_surface(ctx, target, texture); -+ if (!pSurfaceGLX) -+ return VA_STATUS_ERROR_ALLOCATION_FAILED; -+ -+ INVOKE(ctx, CreateSurface, (ctx, target, texture, &pSurfaceGLX->priv)); -+ -+ if (status != VA_STATUS_SUCCESS) -+ va_glx_destroy_surface(ctx, &pSurfaceGLX); -+ -+ *gl_surface = pSurfaceGLX; -+ return status; -+} -+ -+// Destroy a VA/GLX surface -+VAStatus vaDestroySurfaceGLX( -+ VADisplay dpy, -+ void *gl_surface -+) -+{ -+ VADriverContextP ctx; -+ VASurfaceGLXP pSurfaceGLX; -+ VAStatus status; -+ -+ INIT_CONTEXT(ctx, dpy); -+ INIT_SURFACE(pSurfaceGLX, gl_surface); -+ -+ INVOKE(ctx, DestroySurface, (ctx, pSurfaceGLX)); -+ -+ free(pSurfaceGLX); -+ return status; -+} -+ -+// Associate a VA surface to a VA/GLX surface -+VAStatus vaAssociateSurfaceGLX( -+ VADisplay dpy, -+ void *gl_surface, -+ VASurfaceID surface, -+ unsigned int flags -+) -+{ -+ VADriverContextP ctx; -+ VASurfaceGLXP pSurfaceGLX; -+ VAStatus status; -+ -+ INIT_CONTEXT(ctx, dpy); -+ INIT_SURFACE(pSurfaceGLX, gl_surface); -+ -+ INVOKE(ctx, AssociateSurface, (ctx, pSurfaceGLX, surface, flags)); -+ -+ if (status == VA_STATUS_SUCCESS) -+ pSurfaceGLX->surface = surface; -+ -+ return status; -+} -+ -+// Deassociate a VA surface from a VA/GLX surface -+VAStatus vaDeassociateSurfaceGLX( -+ VADisplay dpy, -+ void *gl_surface -+) -+{ -+ VADriverContextP ctx; -+ VASurfaceGLXP pSurfaceGLX; -+ VAStatus status; -+ -+ INIT_CONTEXT(ctx, dpy); -+ INIT_SURFACE(pSurfaceGLX, gl_surface); -+ -+ INVOKE(ctx, DeassociateSurface, (ctx, pSurfaceGLX)); -+ -+ if (status == VA_STATUS_SUCCESS) -+ pSurfaceGLX->surface = VA_INVALID_SURFACE; -+ -+ return status; -+} -+ -+// Synchronize a VA/GLX surface -+VAStatus vaSyncSurfaceGLX( -+ VADisplay dpy, -+ void *gl_surface -+) -+{ -+ VADriverContextP ctx; -+ VASurfaceGLXP pSurfaceGLX; -+ VAStatus status; -+ -+ INIT_CONTEXT(ctx, dpy); -+ INIT_SURFACE(pSurfaceGLX, gl_surface); -+ -+ INVOKE(ctx, SyncSurface, (ctx, pSurfaceGLX)); -+ return status; -+} -+ -+// Prepare VA/GLX surface for rendering -+VAStatus vaBeginRenderSurfaceGLX( -+ VADisplay dpy, -+ void *gl_surface -+) -+{ -+ VADriverContextP ctx; -+ VASurfaceGLXP pSurfaceGLX; -+ VAStatus status; -+ -+ INIT_CONTEXT(ctx, dpy); -+ INIT_SURFACE(pSurfaceGLX, gl_surface); -+ -+ INVOKE(ctx, BeginRenderSurface, (ctx, pSurfaceGLX)); -+ return status; -+} -+ -+// Notify the server that the VA/GLX surface is no longer used for rendering -+VAStatus vaEndRenderSurfaceGLX( -+ VADisplay dpy, -+ void *gl_surface -+) -+{ -+ VADriverContextP ctx; -+ VASurfaceGLXP pSurfaceGLX; -+ VAStatus status; -+ -+ INIT_CONTEXT(ctx, dpy); -+ INIT_SURFACE(pSurfaceGLX, gl_surface); -+ -+ INVOKE(ctx, EndRenderSurface, (ctx, pSurfaceGLX)); -+ return status; -+} -+ -+// Copy a VA surface to a VA/GLX surface -+VAStatus vaCopySurfaceGLX( -+ VADisplay dpy, -+ void *gl_surface, -+ VASurfaceID surface, -+ unsigned int flags -+) -+{ -+ VADriverContextP ctx; -+ VASurfaceGLXP pSurfaceGLX; -+ VAStatus status; -+ -+ INIT_CONTEXT(ctx, dpy); -+ INIT_SURFACE(pSurfaceGLX, gl_surface); -+ -+ INVOKE(ctx, CopySurface, (ctx, pSurfaceGLX, surface, flags)); -+ return status; -+} -diff --git a/src/glx/va_glx.h b/src/glx/va_glx.h -new file mode 100644 -index 0000000..183ef3a ---- /dev/null -+++ b/src/glx/va_glx.h -@@ -0,0 +1,217 @@ -+/* -+ * Copyright (C) 2009 Splitted-Desktop Systems. All Rights Reserved. -+ * -+ * 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, sub license, 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 (including the -+ * next paragraph) 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 NON-INFRINGEMENT. -+ * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR -+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -+ */ -+ -+#ifndef VA_GLX_H -+#define VA_GLX_H -+ -+#ifdef IN_LIBVA -+#include "va.h" -+#else -+#include -+#endif -+#include -+ -+#ifdef __cplusplus -+extern "C" { -+#endif -+ -+/** -+ * Return a suitable VADisplay for VA API -+ * -+ * @param[in] dpy the X11 display -+ * @return a VADisplay -+ */ -+VADisplay vaGetDisplayGLX( -+ Display *dpy -+); -+ -+/** -+ * Create a surface used for display to OpenGL -+ * -+ * The application shall maintain the live GLX context itself. -+ * Implementations are free to use glXGetCurrentContext() and -+ * glXGetCurrentDrawable() functions for internal purposes. -+ * -+ * @param[in] dpy the VA display -+ * @param[in] target the GL target to which the texture needs to be bound -+ * @param[in] texture the GL texture -+ * @param[out] gl_surface the VA/GLX surface -+ * @return VA_STATUS_SUCCESS if successful -+ */ -+VAStatus vaCreateSurfaceGLX( -+ VADisplay dpy, -+ GLenum target, -+ GLuint texture, -+ void **gl_surface -+); -+ -+/** -+ * Destroy a VA/GLX surface -+ * -+ * The application shall maintain the live GLX context itself. -+ * Implementations are free to use glXGetCurrentContext() and -+ * glXGetCurrentDrawable() functions for internal purposes. -+ * -+ * @param[in] dpy the VA display -+ * @param[in] gl_surface the VA surface -+ * @return VA_STATUS_SUCCESS if successful -+ */ -+VAStatus vaDestroySurfaceGLX( -+ VADisplay dpy, -+ void *gl_surface -+); -+ -+/** -+ * Associate a VA surface to a VA/GLX surface -+ * -+ * The association is live until vaDeassociateSurfaceGLX(), -+ * vaCopySurfaceGLX() or the next call to vaBeginPicture() with the -+ * specificed VA surface. -+ * -+ * The application shall maintain the live GLX context itself. -+ * Implementations are free to use glXGetCurrentContext() and -+ * glXGetCurrentDrawable() functions for internal purposes. -+ * -+ * @param[in] dpy the VA display -+ * @param[in] gl_surface the VA/GLX surface -+ * @param[in] surface the VA surface -+ * @param[in] flags the PutSurface flags -+ * @return VA_STATUS_SUCCESS if successful -+ */ -+VAStatus vaAssociateSurfaceGLX( -+ VADisplay dpy, -+ void *gl_surface, -+ VASurfaceID surface, -+ unsigned int flags -+); -+ -+/** -+ * Deassociate a VA surface from a VA/GLX surface -+ * -+ * The application shall maintain the live GLX context itself. -+ * Implementations are free to use glXGetCurrentContext() and -+ * glXGetCurrentDrawable() functions for internal purposes. -+ * -+ * @param[in] dpy the VA display -+ * @param[in] gl_surface the VA surface -+ * @return VA_STATUS_SUCCESS if successful -+ */ -+VAStatus vaDeassociateSurfaceGLX( -+ VADisplay dpy, -+ void *gl_surface -+); -+ -+/** -+ * Synchronize a VA/GLX surface -+ * -+ * This function blocks until all pending operations on the VA/GLX -+ * surface have been completed. -+ * -+ * The application shall maintain the live GLX context itself. -+ * Implementations are free to use glXGetCurrentContext() and -+ * glXGetCurrentDrawable() functions for internal purposes. -+ * -+ * @param[in] dpy the VA display -+ * @param[in] gl_surface the VA surface -+ * @return VA_STATUS_SUCCESS if successful -+ */ -+VAStatus vaSyncSurfaceGLX( -+ VADisplay dpy, -+ void *gl_surface -+); -+ -+/** -+ * Prepare VA/GLX surface for rendering -+ * -+ * This function performs an implicit vaSyncSurfaceGLX(). -+ * -+ * Implementations using the GLX texture-from-pixmap extension will -+ * generally call glXBindTexImage() here. -+ * -+ * The application shall maintain the live GLX context itself. -+ * Implementations are free to use glXGetCurrentContext() and -+ * glXGetCurrentDrawable() functions for internal purposes. -+ * -+ * @param[in] dpy the VA display -+ * @param[in] gl_surface the VA surface -+ * @return VA_STATUS_SUCCESS if successful -+ */ -+VAStatus vaBeginRenderSurfaceGLX( -+ VADisplay dpy, -+ void *gl_surface -+); -+ -+/** -+ * Notify the server that the VA/GLX surface is no longer used for -+ * rendering -+ * -+ * Implementations using the GLX texture-from-pixmap extension will -+ * generally call glXReleaseTexImage() here. -+ * -+ * The application shall maintain the live GLX context itself. -+ * Implementations are free to use glXGetCurrentContext() and -+ * glXGetCurrentDrawable() functions for internal purposes. -+ * -+ * @param[in] dpy the VA display -+ * @param[in] gl_surface the VA surface -+ * @return VA_STATUS_SUCCESS if successful -+ */ -+VAStatus vaEndRenderSurfaceGLX( -+ VADisplay dpy, -+ void *gl_surface -+); -+ -+/** -+ * Copy a VA surface to a VA/GLX surface -+ * -+ * This function kills any association that was previously made with -+ * vaAssociateSurfaceGLX() and will not return until the copy is -+ * completed. -+ * -+ * Upon successful return, the underlying GL texture will contain the -+ * complete pixels and no call to vaBeginRenderSurfaceGLX() or -+ * vaEndRenderSurfaceGLX() is required. -+ * -+ * The application shall maintain the live GLX context itself. -+ * Implementations are free to use glXGetCurrentContext() and -+ * glXGetCurrentDrawable() functions for internal purposes. -+ * -+ * @param[in] dpy the VA display -+ * @param[in] gl_surface the VA/GLX destination surface -+ * @param[in] surface the VA source surface -+ * @param[in] flags the PutSurface flags -+ * @return VA_STATUS_SUCCESS if successful -+ */ -+VAStatus vaCopySurfaceGLX( -+ VADisplay dpy, -+ void *gl_surface, -+ VASurfaceID surface, -+ unsigned int flags -+); -+ -+#ifdef __cplusplus -+} -+#endif -+ -+#endif /* VA_GLX_H */ -diff --git a/src/glx/va_glx_impl.c b/src/glx/va_glx_impl.c -new file mode 100644 -index 0000000..d4f9c1d ---- /dev/null -+++ b/src/glx/va_glx_impl.c -@@ -0,0 +1,1168 @@ -+/* -+ * Copyright (C) 2009 Splitted-Desktop Systems. All Rights Reserved. -+ * -+ * 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, sub license, 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 (including the -+ * next paragraph) 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 NON-INFRINGEMENT. -+ * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR -+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -+ */ -+ -+#define _GNU_SOURCE 1 -+#include "va_glx_private.h" -+#include "va_glx_impl.h" -+#include -+#include -+#include -+#include -+#include -+ -+static void va_glx_error_message(const char *format, ...) -+{ -+ va_list args; -+ va_start(args, format); -+ fprintf(stderr, "[%s] ", PACKAGE_NAME); -+ vfprintf(stderr, format, args); -+ va_end(args); -+} -+ -+// X error trap -+static int x11_error_code = 0; -+static int (*old_error_handler)(Display *, XErrorEvent *); -+ -+static int error_handler(Display *dpy, XErrorEvent *error) -+{ -+ x11_error_code = error->error_code; -+ return 0; -+} -+ -+static void x11_trap_errors(void) -+{ -+ x11_error_code = 0; -+ old_error_handler = XSetErrorHandler(error_handler); -+} -+ -+static int x11_untrap_errors(void) -+{ -+ XSetErrorHandler(old_error_handler); -+ return x11_error_code; -+} -+ -+// Returns a string representation of an OpenGL error -+static const char *gl_get_error_string(GLenum error) -+{ -+ static const struct { -+ GLenum val; -+ const char *str; -+ } -+ gl_errors[] = { -+ { GL_NO_ERROR, "no error" }, -+ { GL_INVALID_ENUM, "invalid enumerant" }, -+ { GL_INVALID_VALUE, "invalid value" }, -+ { GL_INVALID_OPERATION, "invalid operation" }, -+ { GL_STACK_OVERFLOW, "stack overflow" }, -+ { GL_STACK_UNDERFLOW, "stack underflow" }, -+ { GL_OUT_OF_MEMORY, "out of memory" }, -+#ifdef GL_INVALID_FRAMEBUFFER_OPERATION_EXT -+ { GL_INVALID_FRAMEBUFFER_OPERATION_EXT, "invalid framebuffer operation" }, -+#endif -+ { ~0, NULL } -+ }; -+ -+ int i; -+ for (i = 0; gl_errors[i].str; i++) { -+ if (gl_errors[i].val == error) -+ return gl_errors[i].str; -+ } -+ return "unknown"; -+} -+ -+static inline int gl_do_check_error(int report) -+{ -+ GLenum error; -+ int is_error = 0; -+ while ((error = glGetError()) != GL_NO_ERROR) { -+ if (report) -+ va_glx_error_message("glError: %s caught\n", -+ gl_get_error_string(error)); -+ is_error = 1; -+ } -+ return is_error; -+} -+ -+static inline void gl_purge_errors(void) -+{ -+ gl_do_check_error(0); -+} -+ -+static inline int gl_check_error(void) -+{ -+ return gl_do_check_error(1); -+} -+ -+// glGetFloatv() wrapper -+static int gl_get_current_color(float color[4]) -+{ -+ gl_purge_errors(); -+ glGetFloatv(GL_CURRENT_COLOR, color); -+ if (gl_check_error()) -+ return -1; -+ return 0; -+} -+ -+// glGetIntegerv() wrapper -+static int gl_get_param(GLenum param, unsigned int *pval) -+{ -+ GLint val; -+ -+ gl_purge_errors(); -+ glGetIntegerv(param, &val); -+ if (gl_check_error()) -+ return -1; -+ if (pval) -+ *pval = val; -+ return 0; -+} -+ -+// glGetTexLevelParameteriv() wrapper -+static int gl_get_texture_param(GLenum param, unsigned int *pval) -+{ -+ GLint val; -+ -+ gl_purge_errors(); -+ glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, param, &val); -+ if (gl_check_error()) -+ return -1; -+ if (pval) -+ *pval = val; -+ return 0; -+} -+ -+// Returns the OpenGL VTable -+static inline VAOpenGLVTableP gl_get_vtable(VADriverContextP ctx) -+{ -+ return &VA_DRIVER_CONTEXT_GLX(ctx)->gl_vtable; -+} -+ -+// Lookup for a GLX function -+typedef void (*GLFuncPtr)(void); -+typedef GLFuncPtr (*GLXGetProcAddressProc)(const char *); -+ -+static GLFuncPtr get_proc_address_default(const char *name) -+{ -+ return NULL; -+} -+ -+static GLXGetProcAddressProc get_proc_address_func(void) -+{ -+ GLXGetProcAddressProc get_proc_func; -+ -+ dlerror(); -+ get_proc_func = (GLXGetProcAddressProc) -+ dlsym(RTLD_DEFAULT, "glXGetProcAddress"); -+ if (dlerror() == NULL) -+ return get_proc_func; -+ -+ get_proc_func = (GLXGetProcAddressProc) -+ dlsym(RTLD_DEFAULT, "glXGetProcAddressARB"); -+ if (dlerror() == NULL) -+ return get_proc_func; -+ -+ return get_proc_address_default; -+} -+ -+static inline GLFuncPtr get_proc_address(const char *name) -+{ -+ static GLXGetProcAddressProc get_proc_func = NULL; -+ if (get_proc_func == NULL) -+ get_proc_func = get_proc_address_func(); -+ return get_proc_func(name); -+} -+ -+// Check for GLX extensions (TFP, FBO) -+static int check_extension(const char *name, const char *ext) -+{ -+ const char *end; -+ int name_len, n; -+ -+ if (name == NULL || ext == NULL) -+ return 0; -+ -+ end = ext + strlen(ext); -+ name_len = strlen(name); -+ while (ext < end) { -+ n = strcspn(ext, " "); -+ if (n == name_len && strncmp(name, ext, n) == 0) -+ return 1; -+ ext += (n + 1); -+ } -+ return 0; -+} -+ -+static int check_tfp_extensions(VADriverContextP ctx) -+{ -+ const char *gl_extensions; -+ const char *glx_extensions; -+ -+ gl_extensions = (const char *)glGetString(GL_EXTENSIONS); -+ if (!check_extension("GL_ARB_texture_non_power_of_two", gl_extensions)) -+ return 0; -+ -+ glx_extensions = glXQueryExtensionsString(ctx->x11_dpy, ctx->x11_screen); -+ if (!check_extension("GLX_EXT_texture_from_pixmap", glx_extensions)) -+ return 0; -+ return 1; -+} -+ -+static int check_fbo_extensions(VADriverContextP ctx) -+{ -+ const char *gl_extensions; -+ -+ gl_extensions = (const char *)glGetString(GL_EXTENSIONS); -+ if (!check_extension("GL_ARB_framebuffer_object", gl_extensions)) -+ return 0; -+ if (!check_extension("GL_EXT_framebuffer_object", gl_extensions)) -+ return 0; -+ return 1; -+} -+ -+// Load GLX extensions -+static int load_tfp_extensions(VADriverContextP ctx) -+{ -+ VAOpenGLVTableP pOpenGLVTable = gl_get_vtable(ctx); -+ -+ pOpenGLVTable->glx_bind_tex_image = (PFNGLXBINDTEXIMAGEEXTPROC) -+ get_proc_address("glXBindTexImageEXT"); -+ if (pOpenGLVTable->glx_bind_tex_image == NULL) -+ return 0; -+ pOpenGLVTable->glx_release_tex_image = (PFNGLXRELEASETEXIMAGEEXTPROC) -+ get_proc_address("glXReleaseTexImageEXT"); -+ if (pOpenGLVTable->glx_release_tex_image == NULL) -+ return 0; -+ return 1; -+} -+ -+static int load_fbo_extensions(VADriverContextP ctx) -+{ -+ VAOpenGLVTableP pOpenGLVTable = gl_get_vtable(ctx); -+ -+ pOpenGLVTable->gl_gen_framebuffers = (PFNGLGENFRAMEBUFFERSEXTPROC) -+ get_proc_address("glGenFramebuffersEXT"); -+ if (pOpenGLVTable->gl_gen_framebuffers == NULL) -+ return 0; -+ pOpenGLVTable->gl_delete_framebuffers = (PFNGLDELETEFRAMEBUFFERSEXTPROC) -+ get_proc_address("glDeleteFramebuffersEXT"); -+ if (pOpenGLVTable->gl_delete_framebuffers == NULL) -+ return 0; -+ pOpenGLVTable->gl_bind_framebuffer = (PFNGLBINDFRAMEBUFFEREXTPROC) -+ get_proc_address("glBindFramebufferEXT"); -+ if (pOpenGLVTable->gl_bind_framebuffer == NULL) -+ return 0; -+ pOpenGLVTable->gl_gen_renderbuffers = (PFNGLGENRENDERBUFFERSEXTPROC) -+ get_proc_address("glGenRenderbuffersEXT"); -+ if (pOpenGLVTable->gl_gen_renderbuffers == NULL) -+ return 0; -+ pOpenGLVTable->gl_delete_renderbuffers = (PFNGLDELETERENDERBUFFERSEXTPROC) -+ get_proc_address("glDeleteRenderbuffersEXT"); -+ if (pOpenGLVTable->gl_delete_renderbuffers == NULL) -+ return 0; -+ pOpenGLVTable->gl_bind_renderbuffer = (PFNGLBINDRENDERBUFFEREXTPROC) -+ get_proc_address("glBindRenderbufferEXT"); -+ if (pOpenGLVTable->gl_bind_renderbuffer == NULL) -+ return 0; -+ pOpenGLVTable->gl_renderbuffer_storage = (PFNGLRENDERBUFFERSTORAGEEXTPROC) -+ get_proc_address("glRenderbufferStorageEXT"); -+ if (pOpenGLVTable->gl_renderbuffer_storage == NULL) -+ return 0; -+ pOpenGLVTable->gl_framebuffer_renderbuffer = (PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC) -+ get_proc_address("glFramebufferRenderbufferEXT"); -+ if (pOpenGLVTable->gl_framebuffer_renderbuffer == NULL) -+ return 0; -+ pOpenGLVTable->gl_framebuffer_texture_2d = (PFNGLFRAMEBUFFERTEXTURE2DEXTPROC) -+ get_proc_address("glFramebufferTexture2DEXT"); -+ if (pOpenGLVTable->gl_framebuffer_texture_2d == NULL) -+ return 0; -+ pOpenGLVTable->gl_check_framebuffer_status = (PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC) -+ get_proc_address("glCheckFramebufferStatusEXT"); -+ if (pOpenGLVTable->gl_check_framebuffer_status == NULL) -+ return 0; -+ return 1; -+} -+ -+ -+/* ========================================================================= */ -+/* === VA/GLX helpers === */ -+/* ========================================================================= */ -+ -+// OpenGL texture state -+typedef struct OpenGLTextureState *OpenGLTextureStateP; -+ -+struct OpenGLTextureState { -+ int was_enabled; -+ int was_bound; -+ GLenum target; -+ GLuint old_texture; -+}; -+ -+// Bind texture, preserve previous texture state -+static int bind_texture(OpenGLTextureStateP ts, GLenum target, GLuint texture) -+{ -+ ts->target = target; -+ ts->old_texture = 0; -+ ts->was_bound = 0; -+ ts->was_enabled = glIsEnabled(target); -+ if (!ts->was_enabled) -+ glEnable(target); -+ -+ GLenum texture_binding; -+ switch (target) { -+ case GL_TEXTURE_1D: -+ texture_binding = GL_TEXTURE_BINDING_1D; -+ break; -+ case GL_TEXTURE_2D: -+ texture_binding = GL_TEXTURE_BINDING_2D; -+ break; -+ case GL_TEXTURE_3D: -+ texture_binding = GL_TEXTURE_BINDING_3D; -+ break; -+ case GL_TEXTURE_RECTANGLE_ARB: -+ texture_binding = GL_TEXTURE_BINDING_RECTANGLE_ARB; -+ break; -+ default: -+ assert(!target); -+ return -1; -+ } -+ -+ if (ts->was_enabled && gl_get_param(texture_binding, &ts->old_texture) < 0) -+ return -1; -+ -+ ts->was_bound = texture == ts->old_texture; -+ if (!ts->was_bound) { -+ gl_purge_errors(); -+ glBindTexture(target, texture); -+ if (gl_check_error()) -+ return -1; -+ } -+ return 0; -+} -+ -+// Unbind texture, restore previous texture state -+static void unbind_texture(OpenGLTextureStateP ts) -+{ -+ if (!ts->was_bound && ts->old_texture) -+ glBindTexture(ts->target, ts->old_texture); -+ if (!ts->was_enabled) -+ glDisable(ts->target); -+} -+ -+// Create Pixmaps for GLX texture-from-pixmap extension -+static int create_tfp_surface(VADriverContextP ctx, VASurfaceGLXP pSurfaceGLX) -+{ -+ const unsigned int width = pSurfaceGLX->width; -+ const unsigned int height = pSurfaceGLX->height; -+ Pixmap pixmap = None; -+ GLXFBConfig *fbconfig = NULL; -+ GLXPixmap glx_pixmap = None; -+ Window root_window; -+ XWindowAttributes wattr; -+ int *attrib; -+ int n_fbconfig_attribs, x, y, status; -+ unsigned int border_width, depth, dummy; -+ -+ root_window = RootWindow(ctx->x11_dpy, ctx->x11_screen); -+ XGetWindowAttributes(ctx->x11_dpy, root_window, &wattr); -+ pixmap = XCreatePixmap(ctx->x11_dpy, root_window, -+ width, height, wattr.depth); -+ if (!pixmap) -+ return -1; -+ pSurfaceGLX->pixmap = pixmap; -+ -+ x11_trap_errors(); -+ status = XGetGeometry(ctx->x11_dpy, -+ (Drawable)pixmap, -+ &root_window, -+ &x, -+ &y, -+ &dummy, -+ &dummy, -+ &border_width, -+ &depth); -+ if (x11_untrap_errors() != 0 || status == 0) -+ return -1; -+ if (depth != 24 && depth != 32) -+ return -1; -+ -+ int fbconfig_attribs[32] = { -+ GLX_DRAWABLE_TYPE, GLX_PIXMAP_BIT, -+ GLX_DOUBLEBUFFER, GL_TRUE, -+ GLX_RENDER_TYPE, GLX_RGBA_BIT, -+ GLX_X_RENDERABLE, GL_TRUE, -+ GLX_Y_INVERTED_EXT, GL_TRUE, -+ GLX_RED_SIZE, 8, -+ GLX_GREEN_SIZE, 8, -+ GLX_BLUE_SIZE, 8, -+ GL_NONE, -+ }; -+ for (attrib = fbconfig_attribs; *attrib != GL_NONE; attrib += 2) -+ ; -+ *attrib++ = GLX_DEPTH_SIZE; *attrib++ = depth; -+ if (depth == 32) { -+ *attrib++ = GLX_ALPHA_SIZE; *attrib++ = 8; -+ *attrib++ = GLX_BIND_TO_TEXTURE_RGBA_EXT; *attrib++ = GL_TRUE; -+ } -+ else { -+ *attrib++ = GLX_BIND_TO_TEXTURE_RGB_EXT; *attrib++ = GL_TRUE; -+ } -+ *attrib++ = GL_NONE; -+ -+ fbconfig = glXChooseFBConfig(ctx->x11_dpy, ctx->x11_screen, fbconfig_attribs, &n_fbconfig_attribs); -+ if (fbconfig == NULL) -+ return -1; -+ -+ int pixmap_attribs[10] = { -+ GLX_TEXTURE_TARGET_EXT, GLX_TEXTURE_2D_EXT, -+ GLX_MIPMAP_TEXTURE_EXT, GL_FALSE, -+ GL_NONE, -+ }; -+ for (attrib = pixmap_attribs; *attrib != GL_NONE; attrib += 2) -+ ; -+ *attrib++ = GLX_TEXTURE_FORMAT_EXT; -+ if (depth == 32) -+ *attrib++ = GLX_TEXTURE_FORMAT_RGBA_EXT; -+ else -+ *attrib++ = GLX_TEXTURE_FORMAT_RGB_EXT; -+ *attrib++ = GL_NONE; -+ -+ x11_trap_errors(); -+ glx_pixmap = glXCreatePixmap(ctx->x11_dpy, -+ fbconfig[0], -+ pixmap, -+ pixmap_attribs); -+ free(fbconfig); -+ if (x11_untrap_errors() != 0) -+ return -1; -+ pSurfaceGLX->glx_pixmap = glx_pixmap; -+ return 0; -+} -+ -+// Destroy Pixmaps used for TFP -+static void destroy_tfp_surface(VADriverContextP ctx, VASurfaceGLXP pSurfaceGLX) -+{ -+ if (pSurfaceGLX->glx_pixmap) { -+ glXDestroyPixmap(ctx->x11_dpy, pSurfaceGLX->glx_pixmap); -+ pSurfaceGLX->glx_pixmap = None; -+ } -+ -+ if (pSurfaceGLX->pixmap) { -+ XFreePixmap(ctx->x11_dpy, pSurfaceGLX->pixmap); -+ pSurfaceGLX->pixmap = None; -+ } -+} -+ -+// Bind GLX Pixmap to texture -+static int bind_pixmap(VADriverContextP ctx, VASurfaceGLXP pSurfaceGLX) -+{ -+ VAOpenGLVTableP pOpenGLVTable = gl_get_vtable(ctx); -+ -+ if (pSurfaceGLX->is_bound) -+ return 0; -+ -+ x11_trap_errors(); -+ pOpenGLVTable->glx_bind_tex_image(ctx->x11_dpy, pSurfaceGLX->glx_pixmap, -+ GLX_FRONT_LEFT_EXT, NULL); -+ XSync(ctx->x11_dpy, False); -+ if (x11_untrap_errors() != 0) { -+ va_glx_error_message("failed to bind pixmap\n"); -+ return -1; -+ } -+ -+ pSurfaceGLX->is_bound = 1; -+ return 0; -+} -+ -+// Release GLX Pixmap from texture -+static int unbind_pixmap(VADriverContextP ctx, VASurfaceGLXP pSurfaceGLX) -+{ -+ VAOpenGLVTableP pOpenGLVTable = gl_get_vtable(ctx); -+ -+ if (!pSurfaceGLX->is_bound) -+ return 0; -+ -+ x11_trap_errors(); -+ pOpenGLVTable->glx_release_tex_image(ctx->x11_dpy, pSurfaceGLX->glx_pixmap, -+ GLX_FRONT_LEFT_EXT); -+ XSync(ctx->x11_dpy, False); -+ if (x11_untrap_errors() != 0) { -+ va_glx_error_message("failed to release pixmap\n"); -+ return -1; -+ } -+ -+ pSurfaceGLX->is_bound = 0; -+ return 0; -+} -+ -+// Render GLX Pixmap to texture -+static void render_pixmap(VADriverContextP ctx, VASurfaceGLXP pSurfaceGLX) -+{ -+ const unsigned int w = pSurfaceGLX->width; -+ const unsigned int h = pSurfaceGLX->height; -+ float old_color[4]; -+ -+ gl_get_current_color(old_color); -+ glColor4f(1.0f, 1.0f, 1.0f, 1.0f); -+ glBegin(GL_QUADS); -+ { -+ glTexCoord2f(0.0f, 0.0f); glVertex2i(0, 0); -+ glTexCoord2f(0.0f, 1.0f); glVertex2i(0, h); -+ glTexCoord2f(1.0f, 1.0f); glVertex2i(w, h); -+ glTexCoord2f(1.0f, 0.0f); glVertex2i(w, 0); -+ } -+ glEnd(); -+ glColor4fv(old_color); -+} -+ -+// Create offscreen surface -+static int create_fbo_surface(VADriverContextP ctx, VASurfaceGLXP pSurfaceGLX) -+{ -+ VAOpenGLVTableP pOpenGLVTable = gl_get_vtable(ctx); -+ const GLenum texture = pSurfaceGLX->texture; -+ const unsigned int texture_width = pSurfaceGLX->width; -+ const unsigned int texture_height = pSurfaceGLX->height; -+ GLuint fbo, fbo_buffer, fbo_texture; -+ GLenum status; -+ -+ glGenTextures(1, &fbo_texture); -+ glBindTexture(GL_TEXTURE_2D, fbo_texture); -+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); -+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); -+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); -+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); -+ glPixelStorei(GL_UNPACK_ALIGNMENT, 4); -+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, texture_width, texture_height, 0, -+ GL_BGRA, GL_UNSIGNED_BYTE, NULL); -+ -+ pOpenGLVTable->gl_gen_framebuffers(1, &fbo); -+ pOpenGLVTable->gl_bind_framebuffer(GL_FRAMEBUFFER_EXT, fbo); -+ pOpenGLVTable->gl_gen_renderbuffers(1, &fbo_buffer); -+ pOpenGLVTable->gl_bind_renderbuffer(GL_RENDERBUFFER_EXT, fbo_buffer); -+ -+ glBindTexture(GL_TEXTURE_2D, texture); -+ pOpenGLVTable->gl_framebuffer_texture_2d(GL_FRAMEBUFFER_EXT, -+ GL_COLOR_ATTACHMENT0_EXT, -+ GL_TEXTURE_2D, texture, 0); -+ -+ status = pOpenGLVTable->gl_check_framebuffer_status(GL_DRAW_FRAMEBUFFER_EXT); -+ pOpenGLVTable->gl_bind_framebuffer(GL_FRAMEBUFFER_EXT, 0); -+ if (status != GL_FRAMEBUFFER_COMPLETE_EXT) -+ return -1; -+ -+ pSurfaceGLX->fbo = fbo; -+ pSurfaceGLX->fbo_buffer = fbo_buffer; -+ pSurfaceGLX->fbo_texture = fbo_texture; -+ return 0; -+} -+ -+// Destroy offscreen surface -+static void destroy_fbo_surface(VADriverContextP ctx, VASurfaceGLXP pSurfaceGLX) -+{ -+ VAOpenGLVTableP pOpenGLVTable = gl_get_vtable(ctx); -+ -+ if (pSurfaceGLX->fbo_texture) { -+ glDeleteTextures(1, &pSurfaceGLX->fbo_texture); -+ pSurfaceGLX->fbo_texture = 0; -+ } -+ -+ if (pSurfaceGLX->fbo_buffer) { -+ pOpenGLVTable->gl_delete_renderbuffers(1, &pSurfaceGLX->fbo_buffer); -+ pSurfaceGLX->fbo_buffer = 0; -+ } -+ -+ if (pSurfaceGLX->fbo) { -+ pOpenGLVTable->gl_delete_framebuffers(1, &pSurfaceGLX->fbo); -+ pSurfaceGLX->fbo = 0; -+ } -+} -+ -+// Setup matrices to match the FBO texture dimensions -+static void fbo_enter(VADriverContextP ctx, VASurfaceGLXP pSurfaceGLX) -+{ -+ VAOpenGLVTableP pOpenGLVTable = gl_get_vtable(ctx); -+ const unsigned int width = pSurfaceGLX->width; -+ const unsigned int height = pSurfaceGLX->height; -+ -+ pOpenGLVTable->gl_bind_framebuffer(GL_FRAMEBUFFER_EXT, pSurfaceGLX->fbo); -+ glPushAttrib(GL_VIEWPORT_BIT); -+ glMatrixMode(GL_PROJECTION); -+ glPushMatrix(); -+ glLoadIdentity(); -+ glMatrixMode(GL_MODELVIEW); -+ glPushMatrix(); -+ glLoadIdentity(); -+ glViewport(0, 0, width, height); -+ glTranslatef(-1.0f, -1.0f, 0.0f); -+ glScalef(2.0f / width, 2.0f / height, 1.0f); -+ -+ glBindTexture(GL_TEXTURE_2D, pSurfaceGLX->fbo_texture); -+} -+ -+// Restore original OpenGL matrices -+static void fbo_leave(VADriverContextP ctx) -+{ -+ VAOpenGLVTableP pOpenGLVTable = gl_get_vtable(ctx); -+ -+ glPopAttrib(); -+ glMatrixMode(GL_PROJECTION); -+ glPopMatrix(); -+ glMatrixMode(GL_MODELVIEW); -+ glPopMatrix(); -+ pOpenGLVTable->gl_bind_framebuffer(GL_FRAMEBUFFER_EXT, 0); -+} -+ -+// Create VA/GLX surface -+VASurfaceGLXP -+va_glx_create_surface(VADriverContextP ctx, GLenum target, GLuint texture) -+{ -+ VADriverContextGLXP pDriverContextGLX = VA_DRIVER_CONTEXT_GLX(ctx); -+ VASurfaceGLXP pSurfaceGLX; -+ unsigned int internal_format, border_width, width, height; -+ int is_error = 1; -+ -+ /* Make sure binding succeeds, if texture was not already bound */ -+ struct OpenGLTextureState ts; -+ if (bind_texture(&ts, target, texture) < 0) -+ goto end; -+ -+ pSurfaceGLX = malloc(sizeof(*pSurfaceGLX)); -+ if (!pSurfaceGLX) -+ goto end; -+ -+ pSurfaceGLX->magic = VA_SURFACE_GLX_MAGIC; -+ pSurfaceGLX->target = target; -+ pSurfaceGLX->texture = texture; -+ pSurfaceGLX->surface = VA_INVALID_SURFACE; -+ pSurfaceGLX->is_bound = 0; -+ pSurfaceGLX->pixmap = None; -+ pSurfaceGLX->glx_pixmap = None; -+ pSurfaceGLX->fbo = 0; -+ pSurfaceGLX->fbo_buffer = 0; -+ pSurfaceGLX->fbo_texture = 0; -+ pSurfaceGLX->priv = NULL; -+ -+ /* XXX: we don't support other textures than RGBA */ -+ if (gl_get_texture_param(GL_TEXTURE_INTERNAL_FORMAT, &internal_format) < 0) -+ goto end; -+ if (internal_format != GL_RGBA) -+ goto end; -+ -+ /* Check texture dimensions */ -+ if (gl_get_texture_param(GL_TEXTURE_BORDER, &border_width) < 0) -+ goto end; -+ if (gl_get_texture_param(GL_TEXTURE_WIDTH, &width) < 0) -+ goto end; -+ if (gl_get_texture_param(GL_TEXTURE_HEIGHT, &height) < 0) -+ goto end; -+ -+ width -= 2 * border_width; -+ height -= 2 * border_width; -+ if (width == 0 || height == 0) -+ goto end; -+ -+ pSurfaceGLX->width = width; -+ pSurfaceGLX->height = height; -+ -+ /* Create Pixmaps for TFP */ -+ if (pDriverContextGLX->use_tfp) { -+ if (create_tfp_surface(ctx, pSurfaceGLX) < 0) -+ goto end; -+ } -+ -+ /* Create Pixmaps for FBO */ -+ if (pDriverContextGLX->use_fbo) { -+ if (create_fbo_surface(ctx, pSurfaceGLX) < 0) -+ goto end; -+ } -+ -+ is_error = 0; -+end: -+ if (is_error && pSurfaceGLX) -+ va_glx_destroy_surface(ctx, &pSurfaceGLX); -+ -+ unbind_texture(&ts); -+ return pSurfaceGLX; -+} -+ -+// Destroy VA/GLX surface -+void va_glx_destroy_surface(VADriverContextP ctx, VASurfaceGLXP *ppSurfaceGLX) -+{ -+ VASurfaceGLXP pSurfaceGLX = *ppSurfaceGLX; -+ -+ unbind_pixmap(ctx, pSurfaceGLX); -+ destroy_fbo_surface(ctx, pSurfaceGLX); -+ destroy_tfp_surface(ctx, pSurfaceGLX); -+ -+ free(pSurfaceGLX); -+ *ppSurfaceGLX = NULL; -+} -+ -+ -+/* ========================================================================= */ -+/* === VA/GLX implementation from the driver (fordward calls) === */ -+/* ========================================================================= */ -+ -+#define INVOKE(ctx, func, args) do { \ -+ VADriverVTableGLXP vtable = &(ctx)->vtable.glx; \ -+ if (!vtable->va##func##GLX) \ -+ return VA_STATUS_ERROR_UNIMPLEMENTED; \ -+ \ -+ VAStatus status = vtable->va##func##GLX args; \ -+ if (status != VA_STATUS_SUCCESS) \ -+ return status; \ -+ } while (0) -+ -+static VAStatus -+vaCreateSurfaceGLX_impl_driver( -+ VADriverContextP ctx, -+ GLenum target, -+ GLuint texture, -+ void **gl_surface -+) -+{ -+ INVOKE(ctx, CreateSurface, (ctx, target, texture, gl_surface)); -+ return VA_STATUS_SUCCESS; -+} -+ -+static VAStatus -+vaDestroySurfaceGLX_impl_driver(VADriverContextP ctx, void *gl_surface) -+{ -+ VASurfaceGLXP pSurfaceGLX = gl_surface; -+ -+ INVOKE(ctx, DestroySurface, (ctx, pSurfaceGLX->priv)); -+ return VA_STATUS_SUCCESS; -+} -+ -+static VAStatus -+vaAssociateSurfaceGLX_impl_driver( -+ VADriverContextP ctx, -+ void *gl_surface, -+ VASurfaceID surface, -+ unsigned int flags -+) -+{ -+ VASurfaceGLXP pSurfaceGLX = gl_surface; -+ -+ INVOKE(ctx, AssociateSurface, (ctx, pSurfaceGLX->priv, surface, flags)); -+ return VA_STATUS_SUCCESS; -+} -+ -+static VAStatus -+vaDeassociateSurfaceGLX_impl_driver(VADriverContextP ctx, void *gl_surface) -+{ -+ VASurfaceGLXP pSurfaceGLX = gl_surface; -+ -+ INVOKE(ctx, DeassociateSurface, (ctx, pSurfaceGLX->priv)); -+ return VA_STATUS_SUCCESS; -+} -+ -+static VAStatus -+vaSyncSurfaceGLX_impl_driver(VADriverContextP ctx, void *gl_surface) -+{ -+ VASurfaceGLXP pSurfaceGLX = gl_surface; -+ -+ INVOKE(ctx, SyncSurface, (ctx, pSurfaceGLX->priv)); -+ return VA_STATUS_SUCCESS; -+} -+ -+static VAStatus -+vaBeginRenderSurfaceGLX_impl_driver(VADriverContextP ctx, void *gl_surface) -+{ -+ VASurfaceGLXP pSurfaceGLX = gl_surface; -+ -+ INVOKE(ctx, BeginRenderSurface, (ctx, pSurfaceGLX->priv)); -+ return VA_STATUS_SUCCESS; -+} -+ -+static VAStatus -+vaEndRenderSurfaceGLX_impl_driver(VADriverContextP ctx, void *gl_surface) -+{ -+ VASurfaceGLXP pSurfaceGLX = gl_surface; -+ -+ INVOKE(ctx, EndRenderSurface, (ctx, pSurfaceGLX->priv)); -+ return VA_STATUS_SUCCESS; -+} -+ -+static VAStatus -+vaCopySurfaceGLX_impl_driver( -+ VADriverContextP ctx, -+ void *gl_surface, -+ VASurfaceID surface, -+ unsigned int flags -+) -+{ -+ VASurfaceGLXP pSurfaceGLX = gl_surface; -+ -+ INVOKE(ctx, CopySurface, (ctx, pSurfaceGLX->priv, surface, flags)); -+ return VA_STATUS_SUCCESS; -+} -+ -+#undef INVOKE -+ -+ -+/* ========================================================================= */ -+/* === VA/GLX implementation from libVA (generic and suboptimal path) === */ -+/* ========================================================================= */ -+ -+static VAStatus -+vaCreateSurfaceGLX_impl_libva( -+ VADriverContextP ctx, -+ GLenum target, -+ GLuint texture, -+ void **gl_surface -+) -+{ -+ VADriverContextGLXP pDriverContextGLX = VA_DRIVER_CONTEXT_GLX(ctx); -+ -+ if (!pDriverContextGLX->use_tfp) -+ return VA_STATUS_ERROR_UNIMPLEMENTED; -+ -+ *gl_surface = NULL; -+ return VA_STATUS_SUCCESS; -+} -+ -+static VAStatus -+vaDestroySurfaceGLX_impl_libva(VADriverContextP ctx, void *gl_surface) -+{ -+ VADriverContextGLXP pDriverContextGLX = VA_DRIVER_CONTEXT_GLX(ctx); -+ -+ if (!pDriverContextGLX->use_tfp) -+ return VA_STATUS_ERROR_UNIMPLEMENTED; -+ -+ return VA_STATUS_SUCCESS; -+} -+ -+static VAStatus -+vaAssociateSurfaceGLX_impl_libva( -+ VADriverContextP ctx, -+ void *gl_surface, -+ VASurfaceID surface, -+ unsigned int flags -+) -+{ -+ VADriverContextGLXP pDriverContextGLX = VA_DRIVER_CONTEXT_GLX(ctx); -+ VADriverVTableGLXP vtable = &pDriverContextGLX->vtable; -+ VASurfaceGLXP pSurfaceGLX = gl_surface; -+ VAStatus status; -+ -+ if (!pDriverContextGLX->use_tfp) -+ return VA_STATUS_ERROR_UNIMPLEMENTED; -+ -+ /* XXX: only support VA_FRAME_PICTURE */ -+ if (flags != VA_FRAME_PICTURE) -+ return VA_STATUS_ERROR_FLAG_NOT_SUPPORTED; -+ -+ /* XXX: optimise case where we are associating the same VA surface -+ as before an no changed occurred to it */ -+ status = vtable->vaDeassociateSurfaceGLX(ctx, gl_surface); -+ if (status != VA_STATUS_SUCCESS) -+ return status; -+ -+ x11_trap_errors(); -+ status = ctx->vtable.vaPutSurface(ctx, -+ surface, -+ pSurfaceGLX->pixmap, -+ 0, 0, -+ pSurfaceGLX->width, -+ pSurfaceGLX->height, -+ 0, 0, -+ pSurfaceGLX->width, -+ pSurfaceGLX->height, -+ NULL, 0, -+ flags); -+ XSync(ctx->x11_dpy, False); -+ if (x11_untrap_errors() != 0) -+ return VA_STATUS_ERROR_OPERATION_FAILED; -+ if (status != VA_STATUS_SUCCESS) -+ return status; -+ -+ pSurfaceGLX->surface = surface; -+ return VA_STATUS_SUCCESS; -+} -+ -+static VAStatus -+vaDeassociateSurfaceGLX_impl_libva(VADriverContextP ctx, void *gl_surface) -+{ -+ VADriverContextGLXP pDriverContextGLX = VA_DRIVER_CONTEXT_GLX(ctx); -+ VASurfaceGLXP pSurfaceGLX = gl_surface; -+ -+ if (!pDriverContextGLX->use_tfp) -+ return VA_STATUS_ERROR_UNIMPLEMENTED; -+ -+ if (unbind_pixmap(ctx, pSurfaceGLX) < 0) -+ return VA_STATUS_ERROR_OPERATION_FAILED; -+ -+ pSurfaceGLX->surface = VA_INVALID_SURFACE; -+ return VA_STATUS_SUCCESS; -+} -+ -+static VAStatus -+vaSyncSurfaceGLX_impl_libva(VADriverContextP ctx, void *gl_surface) -+{ -+ VADriverContextGLXP pDriverContextGLX = VA_DRIVER_CONTEXT_GLX(ctx); -+ VASurfaceGLXP pSurfaceGLX = gl_surface; -+ -+ if (!pDriverContextGLX->use_tfp) -+ return VA_STATUS_ERROR_UNIMPLEMENTED; -+ -+ if (pSurfaceGLX->surface == VA_INVALID_SURFACE) -+ return VA_STATUS_ERROR_INVALID_SURFACE; -+ -+ return ctx->vtable.vaSyncSurface(ctx, pSurfaceGLX->surface); -+} -+ -+static VAStatus -+vaBeginRenderSurfaceGLX_impl_libva(VADriverContextP ctx, void *gl_surface) -+{ -+ VADriverContextGLXP pDriverContextGLX = VA_DRIVER_CONTEXT_GLX(ctx); -+ VASurfaceGLXP pSurfaceGLX = gl_surface; -+ VAStatus status; -+ -+ if (!pDriverContextGLX->use_tfp) -+ return VA_STATUS_ERROR_UNIMPLEMENTED; -+ -+ status = vaSyncSurfaceGLX_impl_libva(ctx, gl_surface); -+ if (status != VA_STATUS_SUCCESS) -+ return status; -+ -+ if (bind_pixmap(ctx, pSurfaceGLX) < 0) -+ return VA_STATUS_ERROR_OPERATION_FAILED; -+ -+ return VA_STATUS_SUCCESS; -+} -+ -+static VAStatus -+vaEndRenderSurfaceGLX_impl_libva(VADriverContextP ctx, void *gl_surface) -+{ -+ VADriverContextGLXP pDriverContextGLX = VA_DRIVER_CONTEXT_GLX(ctx); -+ VASurfaceGLXP pSurfaceGLX = gl_surface; -+ VAStatus status; -+ -+ if (!pDriverContextGLX->use_tfp) -+ return VA_STATUS_ERROR_UNIMPLEMENTED; -+ -+ if (unbind_pixmap(ctx, pSurfaceGLX) < 0) -+ return VA_STATUS_ERROR_OPERATION_FAILED; -+ -+ return VA_STATUS_SUCCESS; -+} -+ -+static VAStatus -+vaCopySurfaceGLX_impl_libva( -+ VADriverContextP ctx, -+ void *gl_surface, -+ VASurfaceID surface, -+ unsigned int flags -+) -+{ -+ VADriverContextGLXP pDriverContextGLX = VA_DRIVER_CONTEXT_GLX(ctx); -+ VADriverVTableGLXP vtable = &pDriverContextGLX->vtable; -+ VASurfaceGLXP pSurfaceGLX = gl_surface; -+ VAStatus status; -+ -+ if (!pDriverContextGLX->use_fbo) -+ return VA_STATUS_ERROR_UNIMPLEMENTED; -+ -+ /* XXX: only support VA_FRAME_PICTURE */ -+ if (flags != VA_FRAME_PICTURE) -+ return VA_STATUS_ERROR_FLAG_NOT_SUPPORTED; -+ -+ /* Associate VA surface */ -+ status = vtable->vaAssociateSurfaceGLX(ctx, gl_surface, surface, flags); -+ if (status != VA_STATUS_SUCCESS) -+ return status; -+ -+ /* Make sure binding succeeds, if texture was not already bound */ -+ struct OpenGLTextureState ts; -+ if (bind_texture(&ts, pSurfaceGLX->target, pSurfaceGLX->texture) < 0) -+ return VA_STATUS_ERROR_OPERATION_FAILED; -+ -+ /* Render to FBO */ -+ fbo_enter(ctx, pSurfaceGLX); -+ status = vtable->vaBeginRenderSurfaceGLX(ctx, gl_surface); -+ if (status == VA_STATUS_SUCCESS) { -+ render_pixmap(ctx, pSurfaceGLX); -+ status = vtable->vaEndRenderSurfaceGLX(ctx, gl_surface); -+ } -+ fbo_leave(ctx); -+ unbind_texture(&ts); -+ if (status != VA_STATUS_SUCCESS) -+ return status; -+ -+ return vtable->vaDeassociateSurfaceGLX(ctx, gl_surface); -+} -+ -+ -+/* ========================================================================= */ -+/* === VA/GLX bind functions implementation with vaCopySurfaceGLX() === */ -+/* ========================================================================= */ -+ -+static VAStatus -+vaAssociateSurfaceGLX_impl_bind( -+ VADriverContextP ctx, -+ void *gl_surface, -+ VASurfaceID surface, -+ unsigned int flags -+) -+{ -+ VADriverContextGLXP pDriverContextGLX = VA_DRIVER_CONTEXT_GLX(ctx); -+ VADriverVTableGLXP vtable = &pDriverContextGLX->vtable; -+ VASurfaceGLXP pSurfaceGLX = gl_surface; -+ VAStatus status; -+ -+ if (!pDriverContextGLX->has_copy) -+ return VA_STATUS_ERROR_UNIMPLEMENTED; -+ -+ status = vtable->vaCopySurfaceGLX(ctx, gl_surface, surface, flags); -+ if (status != VA_STATUS_SUCCESS) -+ return status; -+ -+ pSurfaceGLX->surface = surface; -+ return VA_STATUS_SUCCESS; -+} -+ -+static VAStatus -+vaDeassociateSurfaceGLX_impl_bind(VADriverContextP ctx, void *gl_surface) -+{ -+ VADriverContextGLXP pDriverContextGLX = VA_DRIVER_CONTEXT_GLX(ctx); -+ VASurfaceGLXP pSurfaceGLX = gl_surface; -+ -+ if (!pDriverContextGLX->has_copy) -+ return VA_STATUS_ERROR_UNIMPLEMENTED; -+ -+ pSurfaceGLX->surface = VA_INVALID_SURFACE; -+ return VA_STATUS_SUCCESS; -+} -+ -+static VAStatus -+vaBeginRenderSurfaceGLX_impl_bind(VADriverContextP ctx, void *gl_surface) -+{ -+ /* Surface is already copied into the texture, in vaAssociateSurfaceGLX() */ -+ return VA_STATUS_SUCCESS; -+} -+ -+static VAStatus -+vaEndRenderSurfaceGLX_impl_bind(VADriverContextP ctx, void *gl_surface) -+{ -+ return VA_STATUS_SUCCESS; -+} -+ -+ -+/* ========================================================================= */ -+/* === Private VA/GLX vtable initialization === */ -+/* ========================================================================= */ -+ -+// Initialize GLX driver context +diff --git a/va/glx/va_glx_impl.h b/va/glx/va_glx_impl.h +index fbdcac2..ca1095e 100644 +--- a/va/glx/va_glx_impl.h ++++ b/va/glx/va_glx_impl.h +@@ -31,7 +31,7 @@ + * @param[in] ctx the VA driver context + * @return VA_STATUS_SUCCESS if successful + */ +-VAStatus va_glx_init_context(VADriverContextP ctx); +- /* ATTRIBUTE_HIDDEN; */ +VAStatus va_glx_init_context(VADriverContextP ctx) -+{ -+ VADriverContextGLXP glx_ctx = VA_DRIVER_CONTEXT_GLX(ctx); -+ VADriverVTableGLXP vtable = &glx_ctx->vtable; -+ int needs_tfp = 0, needs_fbo = 0; -+ -+ if (glx_ctx->is_initialized) -+ return VA_STATUS_SUCCESS; -+ -+ glx_ctx->has_copy = ctx->vtable.glx.vaCopySurfaceGLX != NULL; -+ glx_ctx->has_bind = (ctx->vtable.glx.vaAssociateSurfaceGLX != NULL && -+ ctx->vtable.glx.vaBeginRenderSurfaceGLX != NULL && -+ ctx->vtable.glx.vaEndRenderSurfaceGLX != NULL && -+ ctx->vtable.glx.vaDeassociateSurfaceGLX != NULL); -+ -+ switch ((((unsigned int)glx_ctx->has_bind) << 1) | glx_ctx->has_copy) { -+ case 0: -+ /* Full implementation in libVA */ -+ needs_tfp = 1; -+ needs_fbo = 1; -+ vtable->vaCreateSurfaceGLX = vaCreateSurfaceGLX_impl_libva; -+ vtable->vaDestroySurfaceGLX = vaDestroySurfaceGLX_impl_libva; -+ vtable->vaAssociateSurfaceGLX = vaAssociateSurfaceGLX_impl_libva; -+ vtable->vaDeassociateSurfaceGLX = vaDeassociateSurfaceGLX_impl_libva; -+ vtable->vaBeginRenderSurfaceGLX = vaBeginRenderSurfaceGLX_impl_libva; -+ vtable->vaEndRenderSurfaceGLX = vaEndRenderSurfaceGLX_impl_libva; -+ vtable->vaSyncSurfaceGLX = vaSyncSurfaceGLX_impl_libva; -+ vtable->vaCopySurfaceGLX = vaCopySurfaceGLX_impl_libva; -+ break; -+ case 1: -+ /* Add bind functions based on vaCopySurfaceGLX() */ -+ /* XXX: override vaSyncSurfaceGLX()? */ -+ vtable->vaCreateSurfaceGLX = vaCreateSurfaceGLX_impl_driver; -+ vtable->vaDestroySurfaceGLX = vaDestroySurfaceGLX_impl_driver; -+ vtable->vaAssociateSurfaceGLX = vaAssociateSurfaceGLX_impl_bind; -+ vtable->vaDeassociateSurfaceGLX = vaDeassociateSurfaceGLX_impl_bind; -+ vtable->vaBeginRenderSurfaceGLX = vaBeginRenderSurfaceGLX_impl_bind; -+ vtable->vaEndRenderSurfaceGLX = vaEndRenderSurfaceGLX_impl_bind; -+ vtable->vaSyncSurfaceGLX = vaSyncSurfaceGLX_impl_driver; -+ vtable->vaCopySurfaceGLX = vaCopySurfaceGLX_impl_driver; -+ break; -+ case 2: -+ /* Add copy function based on vaBeginRenderSurfaceGLX() et al. */ -+ needs_fbo = 1; -+ vtable->vaCreateSurfaceGLX = vaCreateSurfaceGLX_impl_driver; -+ vtable->vaDestroySurfaceGLX = vaDestroySurfaceGLX_impl_driver; -+ vtable->vaAssociateSurfaceGLX = vaAssociateSurfaceGLX_impl_driver; -+ vtable->vaDeassociateSurfaceGLX = vaDeassociateSurfaceGLX_impl_driver; -+ vtable->vaBeginRenderSurfaceGLX = vaBeginRenderSurfaceGLX_impl_driver; -+ vtable->vaEndRenderSurfaceGLX = vaEndRenderSurfaceGLX_impl_driver; -+ vtable->vaSyncSurfaceGLX = vaSyncSurfaceGLX_impl_driver; -+ vtable->vaCopySurfaceGLX = vaCopySurfaceGLX_impl_libva; -+ break; -+ case 3: -+ /* Keep driver bind & copy functions */ -+ vtable->vaCreateSurfaceGLX = vaCreateSurfaceGLX_impl_driver; -+ vtable->vaDestroySurfaceGLX = vaDestroySurfaceGLX_impl_driver; -+ vtable->vaAssociateSurfaceGLX = vaAssociateSurfaceGLX_impl_driver; -+ vtable->vaDeassociateSurfaceGLX = vaDeassociateSurfaceGLX_impl_driver; -+ vtable->vaBeginRenderSurfaceGLX = vaBeginRenderSurfaceGLX_impl_driver; -+ vtable->vaEndRenderSurfaceGLX = vaEndRenderSurfaceGLX_impl_driver; -+ vtable->vaSyncSurfaceGLX = vaSyncSurfaceGLX_impl_driver; -+ vtable->vaCopySurfaceGLX = vaCopySurfaceGLX_impl_driver; -+ break; -+ default: -+ /* Fatal error: this cannot happen */ -+ assert(0); -+ return VA_STATUS_ERROR_UNKNOWN; -+ } -+ -+ glx_ctx->has_tfp = 0; -+ glx_ctx->use_tfp = 0; -+ glx_ctx->has_fbo = 0; -+ glx_ctx->use_fbo = 0; -+ -+ if (needs_tfp) { -+ glx_ctx->has_tfp = check_tfp_extensions(ctx); -+ if (!glx_ctx->has_tfp || !load_tfp_extensions(ctx)) -+ return VA_STATUS_ERROR_UNIMPLEMENTED; -+ glx_ctx->use_tfp = 1; -+ } -+ -+ if (needs_fbo) { -+ glx_ctx->has_fbo = check_fbo_extensions(ctx); -+ if (!glx_ctx->has_fbo || !load_fbo_extensions(ctx)) -+ return VA_STATUS_ERROR_UNIMPLEMENTED; -+ glx_ctx->use_fbo = 1; -+ } -+ -+ glx_ctx->is_initialized = 1; -+ return VA_STATUS_SUCCESS; -+} -diff --git a/src/glx/va_glx_impl.h b/src/glx/va_glx_impl.h -new file mode 100644 -index 0000000..977bfcc ---- /dev/null -+++ b/src/glx/va_glx_impl.h -@@ -0,0 +1,46 @@ -+/* -+ * Copyright (C) 2009 Splitted-Desktop Systems. All Rights Reserved. -+ * -+ * 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, sub license, 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 (including the -+ * next paragraph) 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 NON-INFRINGEMENT. -+ * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR -+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -+ */ -+ -+#ifndef VA_GLX_IMPL_H -+#define VA_GLX_IMPL_H -+ -+/** -+ * Initialize GLX driver context -+ * -+ * @param[in] ctx the VA driver context -+ * @return VA_STATUS_SUCCESS if successful -+ */ -+VAStatus va_glx_init_context(VADriverContextP ctx) -+ ATTRIBUTE_HIDDEN; -+ -+/** Create VA/GLX surface */ -+VASurfaceGLXP -+va_glx_create_surface(VADriverContextP ctx, GLenum target, GLuint texture) -+ ATTRIBUTE_HIDDEN; -+ -+/** Destroy VA/GLX surface */ -+void va_glx_destroy_surface(VADriverContextP ctx, VASurfaceGLXP *pSurfaceGLX) + ATTRIBUTE_HIDDEN; -+ -+#endif /* VA_GLX_IMPL_H */ -diff --git a/src/glx/va_glx_private.h b/src/glx/va_glx_private.h -new file mode 100644 -index 0000000..8658ad3 ---- /dev/null -+++ b/src/glx/va_glx_private.h -@@ -0,0 +1,98 @@ -+/* -+ * Copyright (C) 2009 Splitted-Desktop Systems. All Rights Reserved. -+ * -+ * 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, sub license, 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 (including the -+ * next paragraph) 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 NON-INFRINGEMENT. -+ * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR -+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -+ */ -+ -+#ifndef VA_GLX_PRIVATE_H -+#define VA_GLX_PRIVATE_H -+ -+#include "config.h" -+#include "va.h" -+#include "va_backend.h" -+#include "va_x11.h" -+#include "va_glx.h" -+ -+#if GLX_GLXEXT_VERSION < 18 -+typedef void (*PFNGLXBINDTEXIMAGEEXTPROC)(Display *, GLXDrawable, int, const int *); -+typedef void (*PFNGLXRELEASETEXIMAGEEXTPROC)(Display *, GLXDrawable, int); -+#endif -+ -+typedef struct VAOpenGLVTable *VAOpenGLVTableP; -+ -+struct VAOpenGLVTable { -+ PFNGLXBINDTEXIMAGEEXTPROC glx_bind_tex_image; -+ PFNGLXRELEASETEXIMAGEEXTPROC glx_release_tex_image; -+ PFNGLGENFRAMEBUFFERSEXTPROC gl_gen_framebuffers; -+ PFNGLDELETEFRAMEBUFFERSEXTPROC gl_delete_framebuffers; -+ PFNGLBINDFRAMEBUFFEREXTPROC gl_bind_framebuffer; -+ PFNGLGENRENDERBUFFERSEXTPROC gl_gen_renderbuffers; -+ PFNGLDELETERENDERBUFFERSEXTPROC gl_delete_renderbuffers; -+ PFNGLBINDRENDERBUFFEREXTPROC gl_bind_renderbuffer; -+ PFNGLRENDERBUFFERSTORAGEEXTPROC gl_renderbuffer_storage; -+ PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC gl_framebuffer_renderbuffer; -+ PFNGLFRAMEBUFFERTEXTURE2DEXTPROC gl_framebuffer_texture_2d; -+ PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC gl_check_framebuffer_status; -+}; -+ -+typedef struct VADisplayContextGLX *VADisplayContextGLXP; -+typedef struct VADriverContextGLX *VADriverContextGLXP; -+typedef struct VASurfaceGLX *VASurfaceGLXP; -+typedef struct VADriverVTableGLX *VADriverVTableGLXP; -+ -+struct VADisplayContextGLX { -+ void (*vaDestroy)(VADisplayContextP ctx); -+}; -+ -+#define VA_DRIVER_CONTEXT_GLX(ctx) ((VADriverContextGLXP)((ctx)->glx)) -+ -+struct VADriverContextGLX { -+ struct VADriverVTableGLX vtable; -+ struct VAOpenGLVTable gl_vtable; -+ unsigned int is_initialized : 1; -+ unsigned int has_copy : 1; -+ unsigned int has_bind : 1; -+ unsigned int has_tfp : 1; -+ unsigned int has_fbo : 1; -+ unsigned int use_tfp : 1; -+ unsigned int use_fbo : 1; -+}; -+ -+/** Unique VASurfaceGLX identifier */ -+#define VA_SURFACE_GLX_MAGIC VA_FOURCC('V','A','G','L') -+ -+struct VASurfaceGLX { -+ uint32_t magic; ///< Magic number identifying a VASurfaceGLX -+ GLenum target; ///< GL target to which the texture is bound -+ GLuint texture; ///< GL texture -+ VASurfaceID surface; ///< Associated VA surface -+ unsigned int width; -+ unsigned int height; -+ int is_bound; -+ Pixmap pixmap; -+ GLXPixmap glx_pixmap; -+ GLuint fbo; -+ GLuint fbo_buffer; -+ GLuint fbo_texture; -+ void *priv; ///< Private VA/GLX surface data from driver -+}; -+ -+#endif /* VA_GLX_PRIVATE_H */ + + #endif /* VA_GLX_IMPL_H */ diff -Nru libva-1.0.1/debian/patches/390_compat.base.patch libva-1.0.1-3+0.31.1/debian/patches/390_compat.base.patch --- libva-1.0.1/debian/patches/390_compat.base.patch 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/debian/patches/390_compat.base.patch 2010-06-02 06:58:43.000000000 +0000 @@ -1,69 +1,66 @@ -commit 483bc9e67afa9bcd8f99f08a74a78e7dfad4651f -Author: Gwenole Beauchesne -Date: Thu Jul 2 09:24:04 2009 +0000 - - Fix make dist (va_compat_template.h). - -commit 0e0da9ea861f14e8129767dbf6f11be5c051d85f +commit 38fdffc0a6d22adb6c3d5dd456f28459ed2e9132 Author: Gwenole Beauchesne Date: Wed Jun 24 11:40:56 2009 +0000 - Add compatibility layer with original libva 0.29. + Add compatibility layer with original VA-API 0.29 to 0.31. ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -44,7 +44,7 @@ libva_x11_la_DEPENDENCIES = $(libvacorelib) - libva_x11_la_DEPENDENCIES = $(libvacorelib) - - --libva_la_SOURCES = va.c -+libva_la_SOURCES = va.c va_compat.c - - libvaincludedir = ${includedir}/va - libvainclude_HEADERS = va.h va_backend.h va_version.h -@@ -53,4 +53,8 @@ DISTCLEANFILES = \ - va_version.h +diff --git a/va/Makefile.am b/va/Makefile.am +index 3ec4d82..d590966 100644 +--- a/va/Makefile.am ++++ b/va/Makefile.am +@@ -27,7 +27,7 @@ INCLUDES = \ + LDADD = \ + $(LIBVA_LT_LDFLAGS) + +-libva_la_SOURCES = va.c va_trace.c va_crystalhd.c ++libva_la_SOURCES = va.c va_trace.c va_crystalhd.c va_compat.c + libva_ladir = $(libdir) + libva_la_LDFLAGS = $(LDADD) -no-undefined + libva_la_LIBADD = $(LIBVA_LIBS) -ldl +@@ -88,4 +88,8 @@ DISTCLEANFILES = \ EXTRA_DIST = \ -- va_version.h.in -+ va_version.h.in \ + va_version.h.in \ +- va_crystalhd.h ++ va_crystalhd.h \ + va_compat.h \ + va_compat_template.h + +va_compat.c: va_compat_template.h ---- a/src/va.c -+++ b/src/va.c -@@ -25,6 +25,7 @@ - #define _GNU_SOURCE 1 +diff --git a/va/va.c b/va/va.c +index 410abaf..9b68500 100644 +--- a/va/va.c ++++ b/va/va.c +@@ -28,6 +28,7 @@ #include "va.h" #include "va_backend.h" + #include "va_crystalhd.h" +#include "va_compat.h" #include #include -@@ -41,6 +42,8 @@ +@@ -44,6 +45,8 @@ + #endif #define DRIVER_INIT_FUNC "__vaDriverInit_0_31" - #define DRIVER_INIT_FUNC_SDS "__vaDriverInit_0_31_sds" +#define DRIVER_INIT_FUNC_0_29 "__vaDriverInit_0_29" +#define DRIVER_INIT_FUNC_0_30 "__vaDriverInit_0_30" #define DRIVER_EXTENSION "_drv_video.so" -@@ -168,11 +171,22 @@ static VAStatus va_openDriver(VADisplay dpy, char *driver_name) - else +@@ -174,13 +177,24 @@ static VAStatus va_openDriver(VADisplay dpy, char *driver_name) { VADriverInit init_func; -- init_func = (VADriverInit) dlsym(handle, DRIVER_INIT_FUNC); + char driver_init_func_sds[32]; + int compat_version = 0; -+ /* First, try SDS extensions (VDPAU and XvBA backends) */ -+ init_func = (VADriverInit) dlsym(handle, DRIVER_INIT_FUNC_SDS); + /* First, try SDS extensions (VDPAU and XvBA backends) */ + sprintf(driver_init_func_sds, "%s_%d_sds%d", + DRIVER_INIT_FUNC, VA_MICRO_VERSION, VA_SDS_VERSION); + init_func = (VADriverInit) dlsym(handle, driver_init_func_sds); if (!init_func) { -- /* Then try SDS extensions (VDPAU and XvBA backends) */ -- init_func = (VADriverInit) dlsym(handle, DRIVER_INIT_FUNC_SDS); + /* Otherwise, we need the compatibility layer for some buffers */ -+ init_func = (VADriverInit) dlsym(handle, DRIVER_INIT_FUNC); + init_func = (VADriverInit) dlsym(handle, DRIVER_INIT_FUNC); + compat_version = VA_MINOR_VERSION; + if (!init_func) { + init_func = (VADriverInit) dlsym(handle, DRIVER_INIT_FUNC_0_29); @@ -76,7 +73,7 @@ } if (!init_func) { -@@ -181,7 +195,36 @@ static VAStatus va_openDriver(VADisplay dpy, char *driver_name) +@@ -189,7 +203,36 @@ static VAStatus va_openDriver(VADisplay dpy, char *driver_name) } else { @@ -89,13 +86,13 @@ + case 29: + compat_ctx = &ctx_0_29; + ctx_0_29.pDriverData = NULL; -+ ctx_0_29.x11_dpy = ctx->x11_dpy; ++ ctx_0_29.x11_dpy = ctx->native_dpy; + ctx_0_29.x11_screen = ctx->x11_screen; + break; + case 30: + compat_ctx = &ctx_0_30; + ctx_0_30.pDriverData = NULL; -+ ctx_0_30.x11_dpy = ctx->x11_dpy; ++ ctx_0_30.x11_dpy = ctx->native_dpy; + ctx_0_30.x11_screen = ctx->x11_screen; + break; + case VA_MINOR_VERSION: @@ -114,7 +111,7 @@ if (VA_STATUS_SUCCESS == vaStatus) { -@@ -377,6 +422,8 @@ VAStatus vaTerminate ( +@@ -410,6 +453,8 @@ VAStatus vaTerminate ( old_ctx->handle = NULL; } @@ -122,14 +119,25 @@ + if (VA_STATUS_SUCCESS == vaStatus) pDisplayContext->vaDestroy(pDisplayContext); - return vaStatus; ---- a/src/va_backend.h -+++ b/src/va_backend.h -@@ -426,6 +426,7 @@ struct VADriverContext + +diff --git a/va/va_backend.h b/va/va_backend.h +index 62ac970..dc06873 100644 +--- a/va/va_backend.h ++++ b/va/va_backend.h +@@ -398,6 +398,7 @@ struct VADriverContext void *dri_state; - void *glx; /* opaque for GLX code */ + void *glx; /* opaque for GLX code */ + void *compat; /* opaque for compat code */ }; - struct VADisplayContext + #define VA_DISPLAY_MAGIC 0x56414430 /* VAD0 */ +diff --git a/va/va_compat.c b/va/va_compat.c +new file mode 100644 +index 0000000..6895cf2 +diff --git a/va/va_compat.h b/va/va_compat.h +new file mode 100644 +index 0000000..2c9d801 +diff --git a/va/va_compat_template.h b/va/va_compat_template.h +new file mode 100644 +index 0000000..ee41aee diff -Nru libva-1.0.1/debian/patches/391_compat.patch libva-1.0.1-3+0.31.1/debian/patches/391_compat.patch --- libva-1.0.1/debian/patches/391_compat.patch 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/debian/patches/391_compat.patch 2010-07-01 08:57:43.000000000 +0000 @@ -1,87 +1,21 @@ -commit 2e7aa803a8547dfcde6e97ae2bb4a8bbdbb2634e -Author: Gwenole Beauchesne -Date: Mon Nov 23 12:22:09 2009 +0000 - - Update compat code for VDPAU/MPEG-4 additions. - -commit 30808b39d82cbf0c185052a2d2d5ed8a5fc065d1 -Author: Gwenole Beauchesne -Date: Thu Sep 10 14:01:57 2009 +0000 - - Update compatibility glue for VASliceParameterBufferMPEG2.slice_horizontal_position addition. - -commit 27faf49366602637da223f3dc5f30ce4d6d72070 -Author: Gwenole Beauchesne -Date: Wed Sep 2 15:06:20 2009 +0000 - - Fix vaSyncSurface() compat code for VA API < 0.31 drivers. - -commit dc33a3e28b38b7d579ab768899963cf9b0d38677 -Author: Gwenole Beauchesne -Date: Wed Sep 2 12:28:43 2009 +0000 - - Fix check for 0.30 modules. - -commit bd913971bd9e7460b454513b006e16c18136625e -Author: Gwenole Beauchesne -Date: Wed Sep 2 11:58:08 2009 +0000 - - Update for VA API 0.31. - -commit 9cc7f89d3cc0238ab5b3a47c316e261e06a16634 -Author: Gwenole Beauchesne -Date: Thu Jul 2 15:55:48 2009 +0000 - - Fix VAEncSliceParameterBuffer thunk. - -commit 483bc9e67afa9bcd8f99f08a74a78e7dfad4651f -Author: Gwenole Beauchesne -Date: Thu Jul 2 09:24:04 2009 +0000 - - Fix make dist (va_compat_template.h). - -commit 7f41b22366142c4e476fbae929ad343dc33af3a4 -Author: Gwenole Beauchesne -Date: Thu Jun 25 14:05:57 2009 +0000 - - Drop superfluous semi-colon. - -commit dcc75aae23fc8f653179b6a331f4021acd6775fd -Author: Gwenole Beauchesne -Date: Thu Jun 25 13:53:26 2009 +0000 - - Fix check for 0.30 modules. - -commit b34512e74ac4150a3f8ee4abe4fa5b17907f8869 -Author: Gwenole Beauchesne -Date: Thu Jun 25 13:17:48 2009 +0000 - - Fix vaTerminate() thunk. - -commit 3b006d1ac66429f6b8ffff00ce60e1e47a32c02c -Author: Gwenole Beauchesne -Date: Thu Jun 25 12:48:22 2009 +0000 - - Cosmetics. - -commit 452295d5ac34643f8a316491888c3900f12c5bff -Author: Gwenole Beauchesne -Date: Thu Jun 25 12:18:48 2009 +0000 - - Fix compatibility with 0.29 modules. - -commit 0e0da9ea861f14e8129767dbf6f11be5c051d85f +commit fe05bcd5dab7a3847b203575493a025d07f985ac Author: Gwenole Beauchesne Date: Wed Jun 24 11:40:56 2009 +0000 - Add compatibility layer with original libva 0.29. + Add compatibility layer with original VA-API 0.29 to 0.31. -diff --git a/src/va_compat.c b/src/va_compat.c +diff --git a/va/Makefile.am b/va/Makefile.am +index 3ec4d82..d590966 100644 +diff --git a/va/va.c b/va/va.c +index 2f9a586..6918910 100644 +diff --git a/va/va_backend.h b/va/va_backend.h +index 62ac970..dc06873 100644 +diff --git a/va/va_compat.c b/va/va_compat.c new file mode 100644 -index 0000000..0bd7385 +index 0000000..eedb8d6 --- /dev/null -+++ b/src/va_compat.c -@@ -0,0 +1,1171 @@ ++++ b/va/va_compat.c +@@ -0,0 +1,1292 @@ +/* + * Copyright (C) 2009 Splitted-Desktop Systems. All Rights Reserved. + * @@ -110,6 +44,7 @@ +#include "va.h" +#include "va_compat.h" +#include "va_backend.h" ++#include +#include +#include +#include @@ -216,6 +151,13 @@ + VAStatus (*vaPutImage)(void *, VASurfaceID, VAImageID, int, int, unsigned int, unsigned int, int, int, unsigned int, unsigned int); + VAStatus (*vaAssociateSubpicture)(void *, VASubpictureID, VASurfaceID *, int, short, short, unsigned short, unsigned short, short, short, unsigned short, unsigned short, unsigned int); + VAStatus (*vaSyncSurface)(void *, VASurfaceID); ++ ++#if 0 ++ /* 0.31.1 hooks */ ++ VAStatus (*vaBufferInfo)(void *, VAContextID, VABufferID, VABufferType *, unsigned int *, unsigned int *); ++ VAStatus (*vaLockSurface)(void *, VASurfaceID, unsigned int *, unsigned int *, unsigned int *, unsigned int *, unsigned int *, unsigned int *, unsigned int *, unsigned int *, void **); ++ VAStatus (*vaUnlockSurface)(void *, VASurfaceID); ++#endif +} VACompatDriverVTable; + +typedef struct VACompatContext { @@ -431,12 +373,18 @@ + /* XXX: this allocation strategy is not really space efficient... */ + if (index >= compat->buffers_count_max) + { -+ compat->buffers_count_max = index + 1; -+ compat->buffers = realloc(compat->buffers, -+ (compat->buffers_count_max * -+ sizeof(VABufferCompat))); ++ compat->buffers = realloc( ++ compat->buffers, ++ ((index + 1) * sizeof(VABufferCompat)) ++ ); + if (compat->buffers == NULL) + return VA_STATUS_ERROR_ALLOCATION_FAILED; ++ memset( ++ &compat->buffers[compat->buffers_count_max], ++ 0, ++ (index + 1 - compat->buffers_count_max) * sizeof(compat->buffers[0]) ++ ); ++ compat->buffers_count_max = index + 1; + } + + compat_buffer = &compat->buffers[index]; @@ -863,14 +811,20 @@ + (VADriverContextP ctx, VASurfaceID render_target, VASurfaceStatus *status), + (ctx, render_target, status)) + -+DEFINE_VTABLE_ENTRY( ++DEFINE_VTABLE_ENTRY_( + VAStatus, PutSurface, + (VADriverContextP ctx, VASurfaceID surface, Drawable draw, + short srcx, short srcy, unsigned short srcw, unsigned short srch, + short destx, short desty, unsigned short destw, unsigned short desth, + VARectangle *cliprects, unsigned int number_cliprects, unsigned int flags), ++ PutSurface, + (ctx, surface, draw, srcx, srcy, srcw, srch, destx, desty, destw, desth, -+ cliprects, number_cliprects, flags)) ++ cliprects, number_cliprects, flags), ++ { ++ if (COMPAT_CTX(ctx)->compat_version < 30) /* 0.30 */ ++ flags &= (VA_TOP_FIELD|VA_BOTTOM_FIELD|VA_CLEAR_DRAWABLE); ++ }, ++ {}) + +DEFINE_VTABLE_ENTRY( + VAStatus, QueryImageFormats, @@ -976,6 +930,7 @@ + (VADriverContextP ctx, VADisplayAttribute *attr_list, int num_attributes), + (ctx, attr_list, num_attributes)) + ++#if 0 +DEFINE_VTABLE_ENTRY( + VAStatus, CreateSurfaceFromCIFrame, + (VADriverContextP ctx, unsigned long frame_id, VASurfaceID *surface), @@ -1000,6 +955,7 @@ + luma_stride, chroma_u_stride, chroma_v_stride, + luma_offset, chroma_u_offset, chroma_v_offset, + buffer)) ++#endif + +DEFINE_VTABLE_ENTRY_( + VAStatus, SyncSurface_pre31, @@ -1051,9 +1007,94 @@ + (ctx, context), + {}, { va_context_map_remove(COMPAT_CTX(ctx), context); }) + ++#if 0 ++DEFINE_VTABLE_ENTRY( ++ VAStatus, BufferInfo, ++ (VADriverContextP ctx, VAContextID context, VABufferID buf_id, ++ VABufferType *type, unsigned int *size, unsigned int *num_elements), ++ (ctx, context, buf_id, type, size, num_elements)) ++ ++DEFINE_VTABLE_ENTRY( ++ VAStatus, LockSurface, ++ (VADriverContextP ctx, VASurfaceID surface, unsigned int *fourcc, ++ unsigned int *luma_stride, unsigned int *chroma_u_stride, ++ unsigned int *chroma_v_stride, ++ unsigned int *luma_offset, unsigned int *chroma_u_offset, ++ unsigned int *chroma_v_offset, ++ unsigned int *buffer_name, void **buffer), ++ (ctx, surface, fourcc, ++ luma_stride, chroma_u_stride, chroma_v_stride, ++ luma_offset, chroma_u_offset, chroma_v_offset, ++ buffer_name, buffer)) ++ ++DEFINE_VTABLE_ENTRY( ++ VAStatus, UnlockSurface, ++ (VADriverContextP ctx, VASurfaceID surface), ++ (ctx, surface)) ++#endif ++ +#undef DEFINE_VTABLE_ENTRY +#undef DEFINE_VTABLE_ENTRY_ + ++static VAStatus ++va_compat_BufferInfo_default( ++ VADriverContextP ctx, ++ VAContextID context, ++ VABufferID buf_id, ++ VABufferType *type, ++ unsigned int *size, ++ unsigned int *num_elements ++) ++{ ++ VABufferCompat *compat_buffer; ++ VAStatus status; ++ ++ compat_buffer = va_GetBufferCompat(ctx, buf_id); ++ if (!compat_buffer) ++ return VA_STATUS_ERROR_INVALID_BUFFER; ++ ++ if (type) *type = compat_buffer->type; ++ if (size) *size = compat_buffer->size; ++ if (num_elements) *num_elements = compat_buffer->num_elements; ++ return VA_STATUS_SUCCESS; ++} ++ ++static VAStatus ++va_compat_LockSurface_default( ++ VADriverContextP ctx, ++ VASurfaceID surface, ++ unsigned int *fourcc, ++ unsigned int *luma_stride, ++ unsigned int *chroma_u_stride, ++ unsigned int *chroma_v_stride, ++ unsigned int *luma_offset, ++ unsigned int *chroma_u_offset, ++ unsigned int *chroma_v_offset, ++ unsigned int *buffer_name, ++ void **buffer ++) ++{ ++ if (fourcc) *fourcc = VA_FOURCC('N','V','1','2'); ++ if (luma_stride) *luma_stride = 0; ++ if (chroma_u_stride) *chroma_u_stride = 0; ++ if (chroma_v_stride) *chroma_v_stride = 0; ++ if (luma_offset) *luma_offset = 0; ++ if (chroma_u_offset) *chroma_u_offset = 0; ++ if (chroma_v_offset) *chroma_v_offset = 0; ++ if (buffer_name) *buffer_name = 0; ++ if (buffer) *buffer = NULL; ++ return VA_STATUS_SUCCESS; ++} ++ ++static VAStatus ++va_compat_UnlockSurface_default( ++ VADriverContextP ctx, ++ VASurfaceID surface ++) ++{ ++ return VA_STATUS_SUCCESS; ++} ++ +static void va_compat_init_VADriverVTable(VADriverContextP ctx, int compat_version) +{ +#define INIT_VTABLE_(CTX, DST_PROC, SRC_PROC) \ @@ -1101,9 +1142,13 @@ + INIT_VTABLE(ctx, QueryDisplayAttributes); + INIT_VTABLE(ctx, GetDisplayAttributes); + INIT_VTABLE(ctx, SetDisplayAttributes); ++ ++#if 0 ++ /* XXX: vtable_tpi */ + INIT_VTABLE(ctx, CreateSurfaceFromCIFrame); + INIT_VTABLE(ctx, CreateSurfaceFromV4L2Buf); + INIT_VTABLE(ctx, CopySurfaceToBuffer); ++#endif + + if (compat_version && compat_version < 31) { + INIT_VTABLE_(ctx, CreateContext, CreateContext_pre31); @@ -1115,6 +1160,16 @@ + +#undef INIT_VTABLE +#undef INIT_VTABLE__ ++ ++#define INIT_VTABLE_DEFAULT(CTX, PROC) \ ++ (CTX)->vtable.va##PROC = va_compat_##PROC##_default ++ ++ /* XXX: this should be 0.32 */ ++ INIT_VTABLE_DEFAULT(ctx, BufferInfo); ++ INIT_VTABLE_DEFAULT(ctx, LockSurface); ++ INIT_VTABLE_DEFAULT(ctx, UnlockSurface); ++ ++#undef INIT_VTABLE_DEFAULT +} + +VAStatus va_compat_init(VADisplay dpy, int compat_version, void *compat_ctx) @@ -1225,7 +1280,7 @@ + { + for (i = 0; i < compat->buffers_count_max; i++) + { -+ if (compat->buffers[i].id) ++ if (compat->buffers[i].id && compat->buffers[i].size > 0) + va_DestroyBufferCompat(ctx, compat->buffers[i].id); + } + free(compat->buffers); @@ -1253,11 +1308,11 @@ + ctx->compat = NULL; + return VA_STATUS_SUCCESS; +} -diff --git a/src/va_compat.h b/src/va_compat.h +diff --git a/va/va_compat.h b/va/va_compat.h new file mode 100644 index 0000000..2c9d801 --- /dev/null -+++ b/src/va_compat.h ++++ b/va/va_compat.h @@ -0,0 +1,1467 @@ +/* + * Copyright (C) 2009 Splitted-Desktop Systems. All Rights Reserved. @@ -2726,11 +2781,11 @@ +#define VADriverContext_0_31 VADriverContext + +#endif /* VA_COMPAT_H */ -diff --git a/src/va_compat_template.h b/src/va_compat_template.h +diff --git a/va/va_compat_template.h b/va/va_compat_template.h new file mode 100644 -index 0000000..18349de +index 0000000..ee41aee --- /dev/null -+++ b/src/va_compat_template.h ++++ b/va/va_compat_template.h @@ -0,0 +1,539 @@ +/* + * Copyright (C) 2009 Splitted-Desktop Systems. All Rights Reserved. @@ -3251,7 +3306,7 @@ + COPY_VTABLE(dest, src, vaSetSubpicturePalette); + COPY_VTABLE(dest, src, vaDbgCopySurfaceToBuffer); +#endif -+#if COMPAT_MAJOR == 0 && COMPAT_MINOR >= 30 ++#if COMPAT_MAJOR == 0 && COMPAT_MINOR >= 30 && 0 + COPY_VTABLE(dest, src, vaCreateSurfaceFromCIFrame); + COPY_VTABLE(dest, src, vaCreateSurfaceFromV4L2Buf); + COPY_VTABLE(dest, src, vaCopySurfaceToBuffer); diff -Nru libva-1.0.1/debian/patches/392_compat.dso.patch libva-1.0.1-3+0.31.1/debian/patches/392_compat.dso.patch --- libva-1.0.1/debian/patches/392_compat.dso.patch 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/debian/patches/392_compat.dso.patch 2010-03-08 12:03:25.000000000 +0000 @@ -1,13 +1,13 @@ -commit 389323f728fb2d6392d266d967eddde40465fd93 +commit 23dc87f7a37ea245e9797b947df6fbd3c911dd76 Author: Gwenole Beauchesne -Date: Fri Oct 16 12:35:27 2009 +0000 +Date: Fri Oct 16 12:39:06 2009 +0000 Fix compatibility with older programs linked against libva.so.0. -diff --git a/src/Makefile.am b/src/Makefile.am -index 232d8e8..2d696f1 100644 ---- a/src/Makefile.am -+++ b/src/Makefile.am +diff --git a/va/Makefile.am b/va/Makefile.am +index 1752526..f92ba8a 100644 +--- a/va/Makefile.am ++++ b/va/Makefile.am @@ -72,3 +72,8 @@ EXTRA_DIST = \ va_compat_template.h @@ -17,11 +17,11 @@ +libva_compat_la_SOURCES = va_compat_lib.c +libva_compat_la_LIBADD = libva-x11.la -ldl +libva_compat_la_DEPENDENCIES = libva-x11.la -diff --git a/src/va_compat_lib.c b/src/va_compat_lib.c +diff --git a/va/va_compat_lib.c b/va/va_compat_lib.c new file mode 100644 index 0000000..b7e9ea5 --- /dev/null -+++ b/src/va_compat_lib.c ++++ b/va/va_compat_lib.c @@ -0,0 +1,158 @@ +/* + * Copyright (C) 2009 Splitted-Desktop Systems. All Rights Reserved. diff -Nru libva-1.0.1/debian/rules libva-1.0.1-3+0.31.1/debian/rules --- libva-1.0.1/debian/rules 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/debian/rules 2010-07-01 11:00:09.000000000 +0000 @@ -29,9 +29,18 @@ endif MAKE += $(EXTRA_MAKE_FLAGS) +# Detect libdrm2 version +LIBDRM_VERSION := $(shell dpkg-query -W -f='$${Version}\n' libdrm2 2>/dev/null) +has-libdrm-2.4 := $(shell dpkg --compare-versions $(LIBDRM_VERSION) ge 2.4 && echo yes || echo no) + # Extra configure flags DEB_CONFIGURE_SCRIPT_ENV += LDFLAGS="-Wl,-z,defs" + +ifeq ($(has-libdrm-2.4),yes) +DEB_CONFIGURE_USER_FLAGS += --enable-i965-driver +else DEB_CONFIGURE_USER_FLAGS += --disable-i965-driver +endif update-config:: run-autoreconf common-binary-predeb-arch:: list-missing @@ -46,3 +55,13 @@ echo ".text"|gcc -xassembler - -o debian/tmp/usr/lib/libva.so.0.29 -shared -Wl,-soname,libva.so.0 -Ldebian/tmp/usr/lib -lva-compat echo ".text"|gcc -xassembler - -o debian/tmp/usr/lib/libva.so.1.0.0 -shared -Wl,-soname,libva.so.1 -Ldebian/tmp/usr/lib -lva-x11 /sbin/ldconfig -n debian/tmp/usr/lib + +# Regenerate debian/control +regen-control: debian/control.in debian/control.driver.i965 + sed -e 's/@LIBDRM_VERSION@/$(LIBDRM_VERSION)/' \ + < debian/control.in \ + > debian/control + if test "$(has-libdrm-2.4)" = "yes"; then \ + echo >> debian/control ; \ + cat debian/control.driver.i965 >> debian/control ; \ + fi diff -Nru libva-1.0.1/dummy_drv_video/dummy_drv_video.c libva-1.0.1-3+0.31.1/dummy_drv_video/dummy_drv_video.c --- libva-1.0.1/dummy_drv_video/dummy_drv_video.c 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/dummy_drv_video/dummy_drv_video.c 2010-06-01 10:57:37.000000000 +0000 @@ -22,12 +22,13 @@ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include "va_backend.h" +#include #include "dummy_drv_video.h" #include "assert.h" #include +#include #include #include @@ -1106,7 +1107,22 @@ } -VAStatus dummy_CopySurfaceToBuffer( +VAStatus dummy_BufferInfo( + VADriverContextP ctx, + VAContextID context, /* in */ + VABufferID buf_id, /* in */ + VABufferType *type, /* out */ + unsigned int *size, /* out */ + unsigned int *num_elements /* out */ + ) +{ + /* TODO */ + return VA_STATUS_ERROR_UNIMPLEMENTED; +} + + + +VAStatus dummy_LockSurface( VADriverContextP ctx, VASurfaceID surface, unsigned int *fourcc, /* following are output argument */ @@ -1116,11 +1132,21 @@ unsigned int *luma_offset, unsigned int *chroma_u_offset, unsigned int *chroma_v_offset, + unsigned int *buffer_name, void **buffer ) { /* TODO */ - return VA_STATUS_ERROR_UNKNOWN; + return VA_STATUS_ERROR_UNIMPLEMENTED; +} + +VAStatus dummy_UnlockSurface( + VADriverContextP ctx, + VASurfaceID surface + ) +{ + /* TODO */ + return VA_STATUS_ERROR_UNIMPLEMENTED; } VAStatus dummy_Terminate( VADriverContextP ctx ) @@ -1221,8 +1247,9 @@ ctx->vtable.vaQueryDisplayAttributes = dummy_QueryDisplayAttributes; ctx->vtable.vaGetDisplayAttributes = dummy_GetDisplayAttributes; ctx->vtable.vaSetDisplayAttributes = dummy_SetDisplayAttributes; - - ctx->vtable.vaCopySurfaceToBuffer = dummy_CopySurfaceToBuffer; + ctx->vtable.vaLockSurface = dummy_LockSurface; + ctx->vtable.vaUnlockSurface = dummy_UnlockSurface; + ctx->vtable.vaBufferInfo = dummy_BufferInfo; driver_data = (struct dummy_driver_data *) malloc( sizeof(*driver_data) ); ctx->pDriverData = (void *) driver_data; diff -Nru libva-1.0.1/dummy_drv_video/dummy_drv_video.h libva-1.0.1-3+0.31.1/dummy_drv_video/dummy_drv_video.h --- libva-1.0.1/dummy_drv_video/dummy_drv_video.h 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/dummy_drv_video/dummy_drv_video.h 2010-03-08 11:52:31.000000000 +0000 @@ -25,7 +25,7 @@ #ifndef _DUMMY_DRV_VIDEO_H_ #define _DUMMY_DRV_VIDEO_H_ -#include "va.h" +#include #include "object_heap.h" #define DUMMY_MAX_PROFILES 11 diff -Nru libva-1.0.1/dummy_drv_video/Makefile.am libva-1.0.1-3+0.31.1/dummy_drv_video/Makefile.am --- libva-1.0.1/dummy_drv_video/Makefile.am 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/dummy_drv_video/Makefile.am 2010-06-02 06:46:21.000000000 +0000 @@ -23,10 +23,10 @@ dummy_drv_video_la_LTLIBRARIES = dummy_drv_video.la dummy_drv_video_ladir = @LIBVA_DRIVERS_PATH@ dummy_drv_video_la_LDFLAGS = -module -avoid-version -no-undefined -Wl,--no-undefined -dummy_drv_video_la_LIBADD = $(top_srcdir)/src/$(libvabackendlib) -dummy_drv_video_la_DEPENDENCIES = $(top_srcdir)/src/$(libvabackendlib) +dummy_drv_video_la_LIBADD = $(top_builddir)/va/$(libvabackendlib) +dummy_drv_video_la_DEPENDENCIES = $(top_builddir)/va/$(libvabackendlib) -AM_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/../../include/external/ -I$(top_srcdir)/../../include/kmd -DIN_LIBVA +AM_CFLAGS = -I$(top_srcdir)/va -I$(top_srcdir)/../../include/external/ -I$(top_srcdir)/../../include/kmd dummy_drv_video_la_SOURCES = dummy_drv_video.c object_heap.c noinst_HEADERS = dummy_drv_video.h object_heap.h diff -Nru libva-1.0.1/dummy_drv_video/Makefile.in libva-1.0.1-3+0.31.1/dummy_drv_video/Makefile.in --- libva-1.0.1/dummy_drv_video/Makefile.in 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/dummy_drv_video/Makefile.in 2010-04-06 06:06:26.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.10.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008 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. @@ -40,9 +39,8 @@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c @@ -67,29 +65,14 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = -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__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(dummy_drv_video_ladir)" +dummy_drv_video_laLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(dummy_drv_video_la_LTLIBRARIES) am_dummy_drv_video_la_OBJECTS = dummy_drv_video.lo object_heap.lo dummy_drv_video_la_OBJECTS = $(am_dummy_drv_video_la_OBJECTS) @@ -99,7 +82,6 @@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) 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) \ @@ -127,30 +109,32 @@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DRM_CFLAGS = @DRM_CFLAGS@ DRM_LIBS = @DRM_LIBS@ DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ +ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -FGREP = @FGREP@ +F77 = @F77@ +FFLAGS = @FFLAGS@ GEN4ASM_CFLAGS = @GEN4ASM_CFLAGS@ GEN4ASM_LIBS = @GEN4ASM_LIBS@ -GL_DEPS_CFLAGS = @GL_DEPS_CFLAGS@ -GL_DEPS_LIBS = @GL_DEPS_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ @@ -163,25 +147,18 @@ LIBVA_MAJOR_VERSION = @LIBVA_MAJOR_VERSION@ LIBVA_MICRO_VERSION = @LIBVA_MICRO_VERSION@ LIBVA_MINOR_VERSION = @LIBVA_MINOR_VERSION@ -LIBVA_SDS_VERSION = @LIBVA_SDS_VERSION@ LIBVA_VERSION = @LIBVA_VERSION@ -LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ -NM = @NM@ NMEDIT = @NMEDIT@ -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@ @@ -202,7 +179,8 @@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -235,7 +213,6 @@ libvacorelib = @libvacorelib@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -249,7 +226,6 @@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ dummy_drv_video_la_LTLIBRARIES = dummy_drv_video.la @@ -268,14 +244,14 @@ @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign dummy_drv_video/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign dummy_drv_video/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu dummy_drv_video/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu dummy_drv_video/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -293,28 +269,23 @@ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): install-dummy_drv_video_laLTLIBRARIES: $(dummy_drv_video_la_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(dummy_drv_video_ladir)" || $(MKDIR_P) "$(DESTDIR)$(dummy_drv_video_ladir)" - @list='$(dummy_drv_video_la_LTLIBRARIES)'; test -n "$(dummy_drv_video_ladir)" || list=; \ - list2=; for p in $$list; do \ + @list='$(dummy_drv_video_la_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ - list2="$$list2 $$p"; \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(dummy_drv_video_laLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(dummy_drv_video_ladir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(dummy_drv_video_laLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(dummy_drv_video_ladir)/$$f"; \ else :; fi; \ - done; \ - test -z "$$list2" || { \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(dummy_drv_video_ladir)'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(dummy_drv_video_ladir)"; \ - } + done uninstall-dummy_drv_video_laLTLIBRARIES: @$(NORMAL_UNINSTALL) - @list='$(dummy_drv_video_la_LTLIBRARIES)'; test -n "$(dummy_drv_video_ladir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(dummy_drv_video_ladir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(dummy_drv_video_ladir)/$$f"; \ + @list='$(dummy_drv_video_la_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(dummy_drv_video_ladir)/$$p'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(dummy_drv_video_ladir)/$$p"; \ done clean-dummy_drv_video_laLTLIBRARIES: @@ -339,21 +310,21 @@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_TRUE@ mv -f $(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 +@am__fastdepCC_TRUE@ mv -f $(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 +@am__fastdepCC_TRUE@ mv -f $(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 $@ $< @@ -369,14 +340,14 @@ 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; } \ + $(AWK) '{ files[$$0] = 1; nonemtpy = 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; \ + tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ @@ -384,34 +355,29 @@ 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 \ + if test -z "$(ETAGS_ARGS)$$tags$$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; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) + tags=; \ 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" \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique + $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -432,17 +398,13 @@ 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 {} \;; \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done @@ -473,7 +435,6 @@ 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) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -495,8 +456,6 @@ html: html-am -html-am: - info: info-am info-am: @@ -505,28 +464,18 @@ install-dvi: install-dvi-am -install-dvi-am: - install-exec-am: 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 @@ -567,7 +516,6 @@ pdf pdf-am ps ps-am tags uninstall uninstall-am \ uninstall-dummy_drv_video_laLTLIBRARIES - # 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: diff -Nru libva-1.0.1/i965_drv_video/i965_avc_bsd.c libva-1.0.1-3+0.31.1/i965_drv_video/i965_avc_bsd.c --- libva-1.0.1/i965_drv_video/i965_avc_bsd.c 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/i965_avc_bsd.c 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,1133 @@ +/* + * Copyright © 2010 Intel Corporation + * + * 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, sub license, 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 (including the + * next paragraph) 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 NON-INFRINGEMENT. + * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * Authors: + * Xiang Haihao + * + */ +#include +#include +#include +#include + +#include "va_backend.h" + +#include "intel_batchbuffer.h" +#include "intel_driver.h" + +#include "i965_defines.h" +#include "i965_drv_video.h" +#include "i965_avc_bsd.h" +#include "i965_media_h264.h" +#include "i965_media.h" + +static void +i965_avc_bsd_free_avc_bsd_surface(void **data) +{ + struct i965_avc_bsd_surface *avc_bsd_surface = *data; + + if (!avc_bsd_surface) + return; + + dri_bo_unreference(avc_bsd_surface->dmv_top); + avc_bsd_surface->dmv_top = NULL; + dri_bo_unreference(avc_bsd_surface->dmv_bottom); + avc_bsd_surface->dmv_bottom = NULL; + + free(avc_bsd_surface); + *data = NULL; +} + +static void +i965_avc_bsd_init_avc_bsd_surface(VADriverContextP ctx, + struct object_surface *obj_surface, + VAPictureParameterBufferH264 *pic_param) +{ + struct i965_driver_data *i965 = i965_driver_data(ctx); + struct i965_media_state *media_state = &i965->media_state; + struct i965_h264_context *i965_h264_context = (struct i965_h264_context *)media_state->private_context; + struct i965_avc_bsd_context *i965_avc_bsd_context = &i965_h264_context->i965_avc_bsd_context; + struct i965_avc_bsd_surface *avc_bsd_surface = obj_surface->private_data; + + obj_surface->free_private_data = i965_avc_bsd_free_avc_bsd_surface; + + if (!avc_bsd_surface) { + avc_bsd_surface = calloc(sizeof(struct i965_avc_bsd_surface), 1); + assert((obj_surface->size & 0x3f) == 0); + obj_surface->private_data = avc_bsd_surface; + } + + avc_bsd_surface->ctx = i965_avc_bsd_context; + avc_bsd_surface->dmv_bottom_flag = (pic_param->pic_fields.bits.field_pic_flag && + !pic_param->seq_fields.bits.direct_8x8_inference_flag); + + if (avc_bsd_surface->dmv_top == NULL) { + avc_bsd_surface->dmv_top = dri_bo_alloc(i965->intel.bufmgr, + "direct mv w/r buffer", + DMV_SIZE, + 0x1000); + } + + if (avc_bsd_surface->dmv_bottom_flag && + avc_bsd_surface->dmv_bottom == NULL) { + avc_bsd_surface->dmv_bottom = dri_bo_alloc(i965->intel.bufmgr, + "direct mv w/r buffer", + DMV_SIZE, + 0x1000); + } +} + +static void +i965_bsd_ind_obj_base_address(VADriverContextP ctx, struct decode_state *decode_state, int slice) +{ + dri_bo *ind_bo = decode_state->slice_datas[slice]->bo; + + BEGIN_BCS_BATCH(ctx, 3); + OUT_BCS_BATCH(ctx, CMD_BSD_IND_OBJ_BASE_ADDR | (3 - 2)); + OUT_BCS_RELOC(ctx, ind_bo, + I915_GEM_DOMAIN_INSTRUCTION, 0, + 0); + OUT_BCS_BATCH(ctx, 0); + ADVANCE_BCS_BATCH(ctx); +} + +static void +i965_avc_bsd_img_state(VADriverContextP ctx, struct decode_state *decode_state) +{ + struct i965_driver_data *i965 = i965_driver_data(ctx); + struct i965_media_state *media_state = &i965->media_state; + struct i965_h264_context *i965_h264_context = (struct i965_h264_context *)media_state->private_context; + int qm_present_flag; + int img_struct; + int mbaff_frame_flag; + unsigned int avc_it_command_header; + unsigned int width_in_mbs, height_in_mbs; + VAPictureParameterBufferH264 *pic_param; + + if (decode_state->iq_matrix && decode_state->iq_matrix->buffer) + qm_present_flag = 1; + else + qm_present_flag = 0; /* built-in QM matrices */ + + assert(decode_state->pic_param && decode_state->pic_param->buffer); + pic_param = (VAPictureParameterBufferH264 *)decode_state->pic_param->buffer; + + assert(!(pic_param->CurrPic.flags & VA_PICTURE_H264_INVALID)); + + if (pic_param->CurrPic.flags & VA_PICTURE_H264_TOP_FIELD) + img_struct = 1; + else if (pic_param->CurrPic.flags & VA_PICTURE_H264_BOTTOM_FIELD) + img_struct = 3; + else + img_struct = 0; + + if ((img_struct & 0x1) == 0x1) { + assert(pic_param->pic_fields.bits.field_pic_flag == 0x1); + } else { + assert(pic_param->pic_fields.bits.field_pic_flag == 0x0); + } + + if (pic_param->seq_fields.bits.frame_mbs_only_flag) { /* a frame containing only frame macroblocks */ + assert(pic_param->seq_fields.bits.mb_adaptive_frame_field_flag == 0); + assert(pic_param->pic_fields.bits.field_pic_flag == 0); + } else { + assert(pic_param->seq_fields.bits.direct_8x8_inference_flag == 1); /* see H.264 spec */ + } + + mbaff_frame_flag = (pic_param->seq_fields.bits.mb_adaptive_frame_field_flag && + !pic_param->pic_fields.bits.field_pic_flag); + + width_in_mbs = ((pic_param->picture_width_in_mbs_minus1 + 1) & 0xff); + height_in_mbs = ((pic_param->picture_height_in_mbs_minus1 + 1) & 0xff); /* frame height */ + + assert(!((width_in_mbs * height_in_mbs) & 0x8000)); /* hardware requirement */ + + /* BSD unit doesn't support 4:2:2 and 4:4:4 picture */ + assert(pic_param->seq_fields.bits.chroma_format_idc == 0 || /* monochrome picture */ + pic_param->seq_fields.bits.chroma_format_idc == 1); /* 4:2:0 */ + assert(pic_param->seq_fields.bits.residual_colour_transform_flag == 0); /* only available for 4:4:4 */ + + avc_it_command_header = (CMD_MEDIA_OBJECT_EX | (12 - 2)); + + BEGIN_BCS_BATCH(ctx, 6); + OUT_BCS_BATCH(ctx, CMD_AVC_BSD_IMG_STATE | (6 - 2)); + OUT_BCS_BATCH(ctx, + ((width_in_mbs * height_in_mbs) & 0x7fff)); + OUT_BCS_BATCH(ctx, + (height_in_mbs << 16) | + (width_in_mbs << 0)); + OUT_BCS_BATCH(ctx, + ((pic_param->second_chroma_qp_index_offset & 0x1f) << 24) | + ((pic_param->chroma_qp_index_offset & 0x1f) << 16) | + (SCAN_RASTER_ORDER << 15) | /* AVC ILDB Data */ + (SCAN_SPECIAL_ORDER << 14) | /* AVC IT Command */ + (SCAN_RASTER_ORDER << 13) | /* AVC IT Data */ + (1 << 12) | /* always 1, hardware requirement */ + (qm_present_flag << 10) | + (img_struct << 8) | + (16 << 0)); /* FIXME: always support 16 reference frames ??? */ + OUT_BCS_BATCH(ctx, + (RESIDUAL_DATA_OFFSET << 24) | /* residual data offset */ + (0 << 17) | /* don't overwrite SRT */ + (0 << 16) | /* Un-SRT (Unsynchronized Root Thread) */ + (0 << 12) | /* FIXME: no 16MV ??? */ + (pic_param->seq_fields.bits.chroma_format_idc << 10) | + (i965_h264_context->enable_avc_ildb << 8) | /* Enable ILDB writing output */ + (pic_param->pic_fields.bits.entropy_coding_mode_flag << 7) | + ((!pic_param->pic_fields.bits.reference_pic_flag) << 6) | + (pic_param->pic_fields.bits.constrained_intra_pred_flag << 5) | + (pic_param->seq_fields.bits.direct_8x8_inference_flag << 4) | + (pic_param->pic_fields.bits.transform_8x8_mode_flag << 3) | + (pic_param->seq_fields.bits.frame_mbs_only_flag << 2) | + (mbaff_frame_flag << 1) | + (pic_param->pic_fields.bits.field_pic_flag << 0)); + OUT_BCS_BATCH(ctx, avc_it_command_header); + ADVANCE_BCS_BATCH(ctx); +} + +static void +i965_avc_bsd_qm_state(VADriverContextP ctx, struct decode_state *decode_state) +{ + int cmd_len; + VAIQMatrixBufferH264 *iq_matrix; + VAPictureParameterBufferH264 *pic_param; + + if (!decode_state->iq_matrix || !decode_state->iq_matrix->buffer) + return; + + iq_matrix = (VAIQMatrixBufferH264 *)decode_state->iq_matrix->buffer; + + assert(decode_state->pic_param && decode_state->pic_param->buffer); + pic_param = (VAPictureParameterBufferH264 *)decode_state->pic_param->buffer; + + cmd_len = 2 + 6 * 4; /* always load six 4x4 scaling matrices */ + + if (pic_param->pic_fields.bits.transform_8x8_mode_flag) + cmd_len += 2 * 16; /* load two 8x8 scaling matrices */ + + BEGIN_BCS_BATCH(ctx, cmd_len); + OUT_BCS_BATCH(ctx, CMD_AVC_BSD_QM_STATE | (cmd_len - 2)); + + if (pic_param->pic_fields.bits.transform_8x8_mode_flag) + OUT_BCS_BATCH(ctx, + (0x0 << 8) | /* don't use default built-in matrices */ + (0xff << 0)); /* six 4x4 and two 8x8 scaling matrices */ + else + OUT_BCS_BATCH(ctx, + (0x0 << 8) | /* don't use default built-in matrices */ + (0x3f << 0)); /* six 4x4 scaling matrices */ + + intel_batchbuffer_data_bcs(ctx, &iq_matrix->ScalingList4x4[0][0], 6 * 4 * 4); + + if (pic_param->pic_fields.bits.transform_8x8_mode_flag) + intel_batchbuffer_data_bcs(ctx, &iq_matrix->ScalingList8x8[0][0], 2 * 16 * 4); + + ADVANCE_BCS_BATCH(ctx); +} + +static void +i965_avc_bsd_slice_state(VADriverContextP ctx, + VAPictureParameterBufferH264 *pic_param, + VASliceParameterBufferH264 *slice_param) +{ + struct i965_driver_data *i965 = i965_driver_data(ctx); + struct i965_media_state *media_state = &i965->media_state; + struct i965_h264_context *i965_h264_context = (struct i965_h264_context *)media_state->private_context; + int present_flag, cmd_len, list, j; + struct { + unsigned char bottom_idc:1; + unsigned char frame_store_index:4; + unsigned char field_picture:1; + unsigned char long_term:1; + unsigned char non_exist:1; + } refs[32]; + char weightoffsets[32 * 6]; + + /* don't issue SLICE_STATE for intra-prediction decoding */ + if (slice_param->slice_type == SLICE_TYPE_I || + slice_param->slice_type == SLICE_TYPE_SI) + return; + + cmd_len = 2; + + if (slice_param->slice_type == SLICE_TYPE_P || + slice_param->slice_type == SLICE_TYPE_SP) { + present_flag = PRESENT_REF_LIST0; + cmd_len += 8; + } else { + present_flag = PRESENT_REF_LIST0 | PRESENT_REF_LIST1; + cmd_len += 16; + } + + if ((slice_param->slice_type == SLICE_TYPE_P || + slice_param->slice_type == SLICE_TYPE_SP) && + (pic_param->pic_fields.bits.weighted_pred_flag == 1)) { + present_flag |= PRESENT_WEIGHT_OFFSET_L0; + cmd_len += 48; + } + + if ((slice_param->slice_type == SLICE_TYPE_B) && + (pic_param->pic_fields.bits.weighted_bipred_idc == 1)) { + present_flag |= PRESENT_WEIGHT_OFFSET_L0 | PRESENT_WEIGHT_OFFSET_L1; + cmd_len += 96; + } + + BEGIN_BCS_BATCH(ctx, cmd_len); + OUT_BCS_BATCH(ctx, CMD_AVC_BSD_SLICE_STATE | (cmd_len - 2)); + OUT_BCS_BATCH(ctx, present_flag); + + for (list = 0; list < 2; list++) { + int flag; + VAPictureH264 *va_pic; + + if (list == 0) { + flag = PRESENT_REF_LIST0; + va_pic = slice_param->RefPicList0; + } else { + flag = PRESENT_REF_LIST1; + va_pic = slice_param->RefPicList1; + } + + if (!(present_flag & flag)) + continue; + + for (j = 0; j < 32; j++) { + if (va_pic->flags & VA_PICTURE_H264_INVALID) { + refs[j].non_exist = 1; + refs[j].long_term = 1; + refs[j].field_picture = 1; + refs[j].frame_store_index = 0xf; + refs[j].bottom_idc = 1; + } else { + int frame_idx; + + for (frame_idx = 0; frame_idx < ARRAY_ELEMS(i965_h264_context->fsid_list); frame_idx++) { + if (i965_h264_context->fsid_list[frame_idx].surface_id != VA_INVALID_ID && + va_pic->picture_id == i965_h264_context->fsid_list[frame_idx].surface_id) { + assert(frame_idx == i965_h264_context->fsid_list[frame_idx].frame_store_id); + break; + } + } + + assert(frame_idx < ARRAY_ELEMS(i965_h264_context->fsid_list)); + + refs[j].non_exist = 0; + refs[j].long_term = !!(va_pic->flags & VA_PICTURE_H264_LONG_TERM_REFERENCE); + refs[j].field_picture = !!(va_pic->flags & + (VA_PICTURE_H264_TOP_FIELD | + VA_PICTURE_H264_BOTTOM_FIELD)); + refs[j].frame_store_index = frame_idx; + refs[j].bottom_idc = !!(va_pic->flags & VA_PICTURE_H264_BOTTOM_FIELD); + } + + va_pic++; + } + + intel_batchbuffer_data_bcs(ctx, refs, sizeof(refs)); + } + + i965_h264_context->weight128_luma_l0 = 0; + i965_h264_context->weight128_luma_l1 = 0; + i965_h264_context->weight128_chroma_l0 = 0; + i965_h264_context->weight128_chroma_l1 = 0; + + i965_h264_context->weight128_offset0_flag = 0; + i965_h264_context->weight128_offset0 = 0; + + if (present_flag & PRESENT_WEIGHT_OFFSET_L0) { + for (j = 0; j < 32; j++) { + weightoffsets[j * 6 + 0] = slice_param->luma_offset_l0[j]; + weightoffsets[j * 6 + 1] = slice_param->luma_weight_l0[j]; + weightoffsets[j * 6 + 2] = slice_param->chroma_offset_l0[j][0]; + weightoffsets[j * 6 + 3] = slice_param->chroma_weight_l0[j][0]; + weightoffsets[j * 6 + 4] = slice_param->chroma_offset_l0[j][1]; + weightoffsets[j * 6 + 5] = slice_param->chroma_weight_l0[j][1]; + + if (pic_param->pic_fields.bits.weighted_pred_flag == 1 || + pic_param->pic_fields.bits.weighted_bipred_idc == 1) { + if (i965_h264_context->use_hw_w128) { + if (slice_param->luma_weight_l0[j] == 128) + i965_h264_context->weight128_luma_l0 |= (1 << j); + + if (slice_param->chroma_weight_l0[j][0] == 128 || + slice_param->chroma_weight_l0[j][1] == 128) + i965_h264_context->weight128_chroma_l0 |= (1 << j); + } else { + /* FIXME: workaround for weight 128 */ + if (slice_param->luma_weight_l0[j] == 128 || + slice_param->chroma_weight_l0[j][0] == 128 || + slice_param->chroma_weight_l0[j][1] == 128) + i965_h264_context->weight128_offset0_flag = 1; + } + } + } + + intel_batchbuffer_data_bcs(ctx, weightoffsets, sizeof(weightoffsets)); + } + + if (present_flag & PRESENT_WEIGHT_OFFSET_L1) { + for (j = 0; j < 32; j++) { + weightoffsets[j * 6 + 0] = slice_param->luma_offset_l1[j]; + weightoffsets[j * 6 + 1] = slice_param->luma_weight_l1[j]; + weightoffsets[j * 6 + 2] = slice_param->chroma_offset_l1[j][0]; + weightoffsets[j * 6 + 3] = slice_param->chroma_weight_l1[j][0]; + weightoffsets[j * 6 + 4] = slice_param->chroma_offset_l1[j][1]; + weightoffsets[j * 6 + 5] = slice_param->chroma_weight_l1[j][1]; + + if (pic_param->pic_fields.bits.weighted_bipred_idc == 1) { + if (i965_h264_context->use_hw_w128) { + if (slice_param->luma_weight_l1[j] == 128) + i965_h264_context->weight128_luma_l1 |= (1 << j); + + if (slice_param->chroma_weight_l1[j][0] == 128 || + slice_param->chroma_weight_l1[j][1] == 128) + i965_h264_context->weight128_chroma_l1 |= (1 << j); + } else { + if (slice_param->luma_weight_l0[j] == 128 || + slice_param->chroma_weight_l0[j][0] == 128 || + slice_param->chroma_weight_l0[j][1] == 128) + i965_h264_context->weight128_offset0_flag = 1; + } + } + } + + intel_batchbuffer_data_bcs(ctx, weightoffsets, sizeof(weightoffsets)); + } + + ADVANCE_BCS_BATCH(ctx); +} + +static void +i965_avc_bsd_buf_base_state(VADriverContextP ctx, + VAPictureParameterBufferH264 *pic_param, + VASliceParameterBufferH264 *slice_param) +{ + struct i965_driver_data *i965 = i965_driver_data(ctx); + struct i965_media_state *media_state = &i965->media_state; + struct i965_h264_context *i965_h264_context; + struct i965_avc_bsd_context *i965_avc_bsd_context; + int i, j; + VAPictureH264 *va_pic; + struct object_surface *obj_surface; + struct i965_avc_bsd_surface *avc_bsd_surface; + + assert(media_state->private_context); + i965_h264_context = (struct i965_h264_context *)media_state->private_context; + i965_avc_bsd_context = &i965_h264_context->i965_avc_bsd_context; + + BEGIN_BCS_BATCH(ctx, 74); + OUT_BCS_BATCH(ctx, CMD_AVC_BSD_BUF_BASE_STATE | (74 - 2)); + OUT_BCS_RELOC(ctx, i965_avc_bsd_context->bsd_raw_store.bo, + I915_GEM_DOMAIN_INSTRUCTION, I915_GEM_DOMAIN_INSTRUCTION, + 0); + OUT_BCS_RELOC(ctx, i965_avc_bsd_context->mpr_row_store.bo, + I915_GEM_DOMAIN_INSTRUCTION, I915_GEM_DOMAIN_INSTRUCTION, + 0); + OUT_BCS_RELOC(ctx, i965_h264_context->avc_it_command_mb_info.bo, + I915_GEM_DOMAIN_INSTRUCTION, I915_GEM_DOMAIN_INSTRUCTION, + i965_h264_context->avc_it_command_mb_info.mbs * i965_h264_context->use_avc_hw_scoreboard * MB_CMD_IN_BYTES); + OUT_BCS_RELOC(ctx, i965_h264_context->avc_it_data.bo, + I915_GEM_DOMAIN_INSTRUCTION, I915_GEM_DOMAIN_INSTRUCTION, + (i965_h264_context->avc_it_data.write_offset << 6)); + + if (i965_h264_context->enable_avc_ildb) + OUT_BCS_RELOC(ctx, i965_h264_context->avc_ildb_data.bo, + I915_GEM_DOMAIN_INSTRUCTION, I915_GEM_DOMAIN_INSTRUCTION, + 0); + else + OUT_BCS_BATCH(ctx, 0); + + for (i = 0; i < ARRAY_ELEMS(i965_h264_context->fsid_list); i++) { + if (i965_h264_context->fsid_list[i].surface_id != VA_INVALID_ID) { + int found = 0; + for (j = 0; j < ARRAY_ELEMS(pic_param->ReferenceFrames); j++) { + va_pic = &pic_param->ReferenceFrames[j]; + + if (va_pic->flags & VA_PICTURE_H264_INVALID) + continue; + + if (va_pic->picture_id == i965_h264_context->fsid_list[i].surface_id) { + found = 1; + break; + } + } + + assert(found == 1); + + if (!(va_pic->flags & VA_PICTURE_H264_INVALID)) { + obj_surface = SURFACE(va_pic->picture_id); + assert(obj_surface); + avc_bsd_surface = obj_surface->private_data; + + if (avc_bsd_surface == NULL) { + OUT_BCS_BATCH(ctx, 0); + OUT_BCS_BATCH(ctx, 0); + } else { + OUT_BCS_RELOC(ctx, avc_bsd_surface->dmv_top, + I915_GEM_DOMAIN_INSTRUCTION, 0, + 0); + + if (avc_bsd_surface->dmv_bottom_flag == 1) + OUT_BCS_RELOC(ctx, avc_bsd_surface->dmv_bottom, + I915_GEM_DOMAIN_INSTRUCTION, 0, + 0); + else + OUT_BCS_RELOC(ctx, avc_bsd_surface->dmv_top, + I915_GEM_DOMAIN_INSTRUCTION, 0, + 0); + } + } + } else { + OUT_BCS_BATCH(ctx, 0); + OUT_BCS_BATCH(ctx, 0); + } + } + + va_pic = &pic_param->CurrPic; + assert(!(va_pic->flags & VA_PICTURE_H264_INVALID)); + obj_surface = SURFACE(va_pic->picture_id); + assert(obj_surface); + obj_surface->flags = (pic_param->pic_fields.bits.reference_pic_flag ? SURFACE_REFERENCED : 0); + i965_avc_bsd_init_avc_bsd_surface(ctx, obj_surface, pic_param); + avc_bsd_surface = obj_surface->private_data; + + if (obj_surface->bo == NULL) { + obj_surface->bo = dri_bo_alloc(i965->intel.bufmgr, + "vaapi surface", + obj_surface->size, + 0x1000); + } + + OUT_BCS_RELOC(ctx, avc_bsd_surface->dmv_top, + I915_GEM_DOMAIN_INSTRUCTION, I915_GEM_DOMAIN_INSTRUCTION, + 0); + + if (avc_bsd_surface->dmv_bottom_flag == 1) + OUT_BCS_RELOC(ctx, avc_bsd_surface->dmv_bottom, + I915_GEM_DOMAIN_INSTRUCTION, I915_GEM_DOMAIN_INSTRUCTION, + 0); + else + OUT_BCS_RELOC(ctx, avc_bsd_surface->dmv_top, + I915_GEM_DOMAIN_INSTRUCTION, I915_GEM_DOMAIN_INSTRUCTION, + 0); + + /* POC List */ + for (i = 0; i < ARRAY_ELEMS(i965_h264_context->fsid_list); i++) { + if (i965_h264_context->fsid_list[i].surface_id != VA_INVALID_ID) { + int found = 0; + for (j = 0; j < ARRAY_ELEMS(pic_param->ReferenceFrames); j++) { + va_pic = &pic_param->ReferenceFrames[j]; + + if (va_pic->flags & VA_PICTURE_H264_INVALID) + continue; + + if (va_pic->picture_id == i965_h264_context->fsid_list[i].surface_id) { + found = 1; + break; + } + } + + assert(found == 1); + + if (!(va_pic->flags & VA_PICTURE_H264_INVALID)) { + OUT_BCS_BATCH(ctx, va_pic->TopFieldOrderCnt); + OUT_BCS_BATCH(ctx, va_pic->BottomFieldOrderCnt); + } + } else { + OUT_BCS_BATCH(ctx, 0); + OUT_BCS_BATCH(ctx, 0); + } + } + + va_pic = &pic_param->CurrPic; + OUT_BCS_BATCH(ctx, va_pic->TopFieldOrderCnt); + OUT_BCS_BATCH(ctx, va_pic->BottomFieldOrderCnt); + + ADVANCE_BCS_BATCH(ctx); +} + +/* + * Return the bit offset to the first bit of the slice data + * + * VASliceParameterBufferH264.slice_data_bit_offset will point into the part + * of slice header if there are some escaped bytes in the slice header. The offset + * to slice data is needed for BSD unit so that BSD unit can fetch right slice data + * for processing. This fixes conformance case BASQP1_Sony_C.jsv + */ +static int +i965_avc_bsd_get_slice_bit_offset(uint8_t *buf, int mode_flag, int in_slice_data_bit_offset) +{ + int out_slice_data_bit_offset; + int slice_header_size = in_slice_data_bit_offset / 8; + int i, j; + + for (i = 0, j = 0; i < slice_header_size; i++, j++) { + if (!buf[j] && !buf[j + 1] && buf[j + 2] == 3) { + i++, j += 2; + } + } + + out_slice_data_bit_offset = 8 * j + in_slice_data_bit_offset % 8; + + if (mode_flag == ENTROPY_CABAC) + out_slice_data_bit_offset = ALIGN(out_slice_data_bit_offset, 0x8); + + return out_slice_data_bit_offset; +} + +static void +g4x_avc_bsd_object(VADriverContextP ctx, + struct decode_state *decode_state, + VAPictureParameterBufferH264 *pic_param, + VASliceParameterBufferH264 *slice_param, + int slice_index) +{ + int width_in_mbs = pic_param->picture_width_in_mbs_minus1 + 1; + int height_in_mbs = pic_param->picture_height_in_mbs_minus1 + 1; /* frame height */ + + if (slice_param) { + int encrypted, counter_value, cmd_len; + int slice_hor_pos, slice_ver_pos; + int num_ref_idx_l0, num_ref_idx_l1; + int mbaff_picture = (!pic_param->pic_fields.bits.field_pic_flag && + pic_param->seq_fields.bits.mb_adaptive_frame_field_flag); + int slice_data_bit_offset; + int weighted_pred_idc = 0; + int first_mb_in_slice = 0; + int slice_type; + uint8_t *slice_data = NULL; + + encrypted = 0; /* FIXME: which flag in VAAPI is used for encryption? */ + + if (encrypted) { + cmd_len = 9; + counter_value = 0; /* FIXME: ??? */ + } else + cmd_len = 8; + + dri_bo_map(decode_state->slice_datas[slice_index]->bo, 0); + slice_data = (uint8_t *)(decode_state->slice_datas[slice_index]->bo->virtual + slice_param->slice_data_offset); + slice_data_bit_offset = i965_avc_bsd_get_slice_bit_offset(slice_data, + pic_param->pic_fields.bits.entropy_coding_mode_flag, + slice_param->slice_data_bit_offset); + dri_bo_unmap(decode_state->slice_datas[slice_index]->bo); + + if (slice_param->slice_type == SLICE_TYPE_I || + slice_param->slice_type == SLICE_TYPE_SI) + slice_type = SLICE_TYPE_I; + else if (slice_param->slice_type == SLICE_TYPE_P || + slice_param->slice_type == SLICE_TYPE_SP) + slice_type = SLICE_TYPE_P; + else { + assert(slice_param->slice_type == SLICE_TYPE_B); + slice_type = SLICE_TYPE_B; + } + + if (slice_type == SLICE_TYPE_I) { + assert(slice_param->num_ref_idx_l0_active_minus1 == 0); + assert(slice_param->num_ref_idx_l1_active_minus1 == 0); + num_ref_idx_l0 = 0; + num_ref_idx_l1 = 0; + } else if (slice_type == SLICE_TYPE_P) { + assert(slice_param->num_ref_idx_l1_active_minus1 == 0); + num_ref_idx_l0 = slice_param->num_ref_idx_l0_active_minus1 + 1; + num_ref_idx_l1 = 0; + } else { + num_ref_idx_l0 = slice_param->num_ref_idx_l0_active_minus1 + 1; + num_ref_idx_l1 = slice_param->num_ref_idx_l1_active_minus1 + 1; + } + + if (slice_type == SLICE_TYPE_P) + weighted_pred_idc = pic_param->pic_fields.bits.weighted_pred_flag; + else if (slice_type == SLICE_TYPE_B) + weighted_pred_idc = pic_param->pic_fields.bits.weighted_bipred_idc; + + first_mb_in_slice = slice_param->first_mb_in_slice << mbaff_picture; + slice_hor_pos = first_mb_in_slice % width_in_mbs; + slice_ver_pos = first_mb_in_slice / width_in_mbs; + + BEGIN_BCS_BATCH(ctx, cmd_len); + OUT_BCS_BATCH(ctx, CMD_AVC_BSD_OBJECT | (cmd_len - 2)); + OUT_BCS_BATCH(ctx, + (encrypted << 31) | + ((slice_param->slice_data_size - (slice_data_bit_offset >> 3)) << 0)); + OUT_BCS_BATCH(ctx, + (slice_param->slice_data_offset + + (slice_data_bit_offset >> 3))); + OUT_BCS_BATCH(ctx, + (0 << 31) | /* concealment mode: 0->intra 16x16 prediction, 1->inter P Copy */ + (0 << 14) | /* ignore BSDPrematureComplete Error handling */ + (0 << 13) | /* FIXME: ??? */ + (0 << 12) | /* ignore MPR Error handling */ + (0 << 10) | /* ignore Entropy Error handling */ + (0 << 8) | /* ignore MB Header Error handling */ + (slice_type << 0)); + OUT_BCS_BATCH(ctx, + (num_ref_idx_l1 << 24) | + (num_ref_idx_l0 << 16) | + (slice_param->chroma_log2_weight_denom << 8) | + (slice_param->luma_log2_weight_denom << 0)); + OUT_BCS_BATCH(ctx, + (weighted_pred_idc << 30) | + (slice_param->direct_spatial_mv_pred_flag << 29) | + (slice_param->disable_deblocking_filter_idc << 27) | + (slice_param->cabac_init_idc << 24) | + ((pic_param->pic_init_qp_minus26 + 26 + slice_param->slice_qp_delta) << 16) | + ((slice_param->slice_beta_offset_div2 & 0xf) << 8) | + ((slice_param->slice_alpha_c0_offset_div2 & 0xf) << 0)); + OUT_BCS_BATCH(ctx, + (slice_ver_pos << 24) | + (slice_hor_pos << 16) | + (first_mb_in_slice << 0)); + OUT_BCS_BATCH(ctx, + (0 << 7) | /* FIXME: ??? */ + ((0x7 - (slice_data_bit_offset & 0x7)) << 0)); + + if (encrypted) { + OUT_BCS_BATCH(ctx, counter_value); + } + + ADVANCE_BCS_BATCH(ctx); + } else { + BEGIN_BCS_BATCH(ctx, 8); + OUT_BCS_BATCH(ctx, CMD_AVC_BSD_OBJECT | (8 - 2)); + OUT_BCS_BATCH(ctx, 0); /* indirect data length for phantom slice is 0 */ + OUT_BCS_BATCH(ctx, 0); /* indirect data start address for phantom slice is 0 */ + OUT_BCS_BATCH(ctx, 0); + OUT_BCS_BATCH(ctx, 0); + OUT_BCS_BATCH(ctx, 0); + OUT_BCS_BATCH(ctx, width_in_mbs * height_in_mbs / (1 + !!pic_param->pic_fields.bits.field_pic_flag)); + OUT_BCS_BATCH(ctx, 0); + ADVANCE_BCS_BATCH(ctx); + } +} + +static void +ironlake_avc_bsd_object(VADriverContextP ctx, + struct decode_state *decode_state, + VAPictureParameterBufferH264 *pic_param, + VASliceParameterBufferH264 *slice_param, + int slice_index) +{ + int width_in_mbs = pic_param->picture_width_in_mbs_minus1 + 1; + int height_in_mbs = pic_param->picture_height_in_mbs_minus1 + 1; /* frame height */ + + if (slice_param) { + struct i965_driver_data *i965 = i965_driver_data(ctx); + struct i965_media_state *media_state = &i965->media_state; + struct i965_h264_context *i965_h264_context = (struct i965_h264_context *)media_state->private_context; + int encrypted, counter_value; + int slice_hor_pos, slice_ver_pos; + int num_ref_idx_l0, num_ref_idx_l1; + int mbaff_picture = (!pic_param->pic_fields.bits.field_pic_flag && + pic_param->seq_fields.bits.mb_adaptive_frame_field_flag); + int slice_data_bit_offset; + int weighted_pred_idc = 0; + int first_mb_in_slice; + int slice_type; + uint8_t *slice_data = NULL; + + encrypted = 0; /* FIXME: which flag in VAAPI is used for encryption? */ + + if (encrypted) { + counter_value = 0; /* FIXME: ??? */ + } else + counter_value = 0; + + dri_bo_map(decode_state->slice_datas[slice_index]->bo, 0); + slice_data = (uint8_t *)(decode_state->slice_datas[slice_index]->bo->virtual + slice_param->slice_data_offset); + slice_data_bit_offset = i965_avc_bsd_get_slice_bit_offset(slice_data, + pic_param->pic_fields.bits.entropy_coding_mode_flag, + slice_param->slice_data_bit_offset); + dri_bo_unmap(decode_state->slice_datas[slice_index]->bo); + + if (slice_param->slice_type == SLICE_TYPE_I || + slice_param->slice_type == SLICE_TYPE_SI) + slice_type = SLICE_TYPE_I; + else if (slice_param->slice_type == SLICE_TYPE_P || + slice_param->slice_type == SLICE_TYPE_SP) + slice_type = SLICE_TYPE_P; + else { + assert(slice_param->slice_type == SLICE_TYPE_B); + slice_type = SLICE_TYPE_B; + } + + if (slice_type == SLICE_TYPE_I) { + assert(slice_param->num_ref_idx_l0_active_minus1 == 0); + assert(slice_param->num_ref_idx_l1_active_minus1 == 0); + num_ref_idx_l0 = 0; + num_ref_idx_l1 = 0; + } else if (slice_type == SLICE_TYPE_P) { + assert(slice_param->num_ref_idx_l1_active_minus1 == 0); + num_ref_idx_l0 = slice_param->num_ref_idx_l0_active_minus1 + 1; + num_ref_idx_l1 = 0; + } else { + num_ref_idx_l0 = slice_param->num_ref_idx_l0_active_minus1 + 1; + num_ref_idx_l1 = slice_param->num_ref_idx_l1_active_minus1 + 1; + } + + if (slice_type == SLICE_TYPE_P) + weighted_pred_idc = pic_param->pic_fields.bits.weighted_pred_flag; + else if (slice_type == SLICE_TYPE_B) + weighted_pred_idc = pic_param->pic_fields.bits.weighted_bipred_idc; + + first_mb_in_slice = slice_param->first_mb_in_slice << mbaff_picture; + slice_hor_pos = first_mb_in_slice % width_in_mbs; + slice_ver_pos = first_mb_in_slice / width_in_mbs; + + BEGIN_BCS_BATCH(ctx, 16); + OUT_BCS_BATCH(ctx, CMD_AVC_BSD_OBJECT | (16 - 2)); + OUT_BCS_BATCH(ctx, + (encrypted << 31) | + (0 << 30) | /* FIXME: packet based bit stream */ + (0 << 29) | /* FIXME: packet format */ + ((slice_param->slice_data_size - (slice_data_bit_offset >> 3)) << 0)); + OUT_BCS_BATCH(ctx, + (slice_param->slice_data_offset + + (slice_data_bit_offset >> 3))); + OUT_BCS_BATCH(ctx, + (0 << 31) | /* concealment mode: 0->intra 16x16 prediction, 1->inter P Copy */ + (0 << 14) | /* ignore BSDPrematureComplete Error handling */ + (0 << 13) | /* FIXME: ??? */ + (0 << 12) | /* ignore MPR Error handling */ + (0 << 10) | /* ignore Entropy Error handling */ + (0 << 8) | /* ignore MB Header Error handling */ + (slice_type << 0)); + OUT_BCS_BATCH(ctx, + (num_ref_idx_l1 << 24) | + (num_ref_idx_l0 << 16) | + (slice_param->chroma_log2_weight_denom << 8) | + (slice_param->luma_log2_weight_denom << 0)); + OUT_BCS_BATCH(ctx, + (weighted_pred_idc << 30) | + (slice_param->direct_spatial_mv_pred_flag << 29) | + (slice_param->disable_deblocking_filter_idc << 27) | + (slice_param->cabac_init_idc << 24) | + ((pic_param->pic_init_qp_minus26 + 26 + slice_param->slice_qp_delta) << 16) | + ((slice_param->slice_beta_offset_div2 & 0xf) << 8) | + ((slice_param->slice_alpha_c0_offset_div2 & 0xf) << 0)); + OUT_BCS_BATCH(ctx, + (slice_ver_pos << 24) | + (slice_hor_pos << 16) | + (first_mb_in_slice << 0)); + OUT_BCS_BATCH(ctx, + (0 << 7) | /* FIXME: ??? */ + ((0x7 - (slice_data_bit_offset & 0x7)) << 0)); + OUT_BCS_BATCH(ctx, counter_value); + + /* FIXME: dw9-dw11 */ + OUT_BCS_BATCH(ctx, 0); + OUT_BCS_BATCH(ctx, 0); + OUT_BCS_BATCH(ctx, 0); + OUT_BCS_BATCH(ctx, i965_h264_context->weight128_luma_l0); + OUT_BCS_BATCH(ctx, i965_h264_context->weight128_luma_l1); + OUT_BCS_BATCH(ctx, i965_h264_context->weight128_chroma_l0); + OUT_BCS_BATCH(ctx, i965_h264_context->weight128_chroma_l1); + + ADVANCE_BCS_BATCH(ctx); + } else { + BEGIN_BCS_BATCH(ctx, 16); + OUT_BCS_BATCH(ctx, CMD_AVC_BSD_OBJECT | (16 - 2)); + OUT_BCS_BATCH(ctx, 0); /* indirect data length for phantom slice is 0 */ + OUT_BCS_BATCH(ctx, 0); /* indirect data start address for phantom slice is 0 */ + OUT_BCS_BATCH(ctx, 0); + OUT_BCS_BATCH(ctx, 0); + OUT_BCS_BATCH(ctx, 0); + OUT_BCS_BATCH(ctx, width_in_mbs * height_in_mbs / (1 + !!pic_param->pic_fields.bits.field_pic_flag)); + OUT_BCS_BATCH(ctx, 0); + OUT_BCS_BATCH(ctx, 0); + OUT_BCS_BATCH(ctx, 0); + OUT_BCS_BATCH(ctx, 0); + OUT_BCS_BATCH(ctx, 0); + OUT_BCS_BATCH(ctx, 0); + OUT_BCS_BATCH(ctx, 0); + OUT_BCS_BATCH(ctx, 0); + OUT_BCS_BATCH(ctx, 0); + ADVANCE_BCS_BATCH(ctx); + } +} + +static void +i965_avc_bsd_object(VADriverContextP ctx, + struct decode_state *decode_state, + VAPictureParameterBufferH264 *pic_param, + VASliceParameterBufferH264 *slice_param, + int slice_index) +{ + struct i965_driver_data *i965 = i965_driver_data(ctx); + + if (IS_IRONLAKE(i965->intel.device_id)) + ironlake_avc_bsd_object(ctx, decode_state, pic_param, slice_param, slice_index); + else + g4x_avc_bsd_object(ctx, decode_state, pic_param, slice_param, slice_index); +} + +static void +i965_avc_bsd_phantom_slice(VADriverContextP ctx, + struct decode_state *decode_state, + VAPictureParameterBufferH264 *pic_param) +{ + i965_avc_bsd_object(ctx, decode_state, pic_param, NULL, 0); +} + +static void +i965_avc_bsd_frame_store_index(VADriverContextP ctx, + VAPictureParameterBufferH264 *pic_param) +{ + struct i965_driver_data *i965 = i965_driver_data(ctx); + struct i965_media_state *media_state = &i965->media_state; + struct i965_h264_context *i965_h264_context = (struct i965_h264_context *)media_state->private_context; + int i, j; + + assert(ARRAY_ELEMS(i965_h264_context->fsid_list) == ARRAY_ELEMS(pic_param->ReferenceFrames)); + + for (i = 0; i < ARRAY_ELEMS(i965_h264_context->fsid_list); i++) { + int found = 0; + + if (i965_h264_context->fsid_list[i].surface_id == VA_INVALID_ID) + continue; + + for (j = 0; j < ARRAY_ELEMS(pic_param->ReferenceFrames); j++) { + VAPictureH264 *ref_pic = &pic_param->ReferenceFrames[j]; + if (ref_pic->flags & VA_PICTURE_H264_INVALID) + continue; + + if (i965_h264_context->fsid_list[i].surface_id == ref_pic->picture_id) { + found = 1; + break; + } + } + + if (!found) { + struct object_surface *obj_surface = SURFACE(i965_h264_context->fsid_list[i].surface_id); + obj_surface->flags &= ~SURFACE_REFERENCED; + + if (obj_surface->flags & SURFACE_DISPLAYED) { + dri_bo_unreference(obj_surface->bo); + obj_surface->bo = NULL; + obj_surface->flags = 0; + } + + if (obj_surface->free_private_data) + obj_surface->free_private_data(&obj_surface->private_data); + + i965_h264_context->fsid_list[i].surface_id = VA_INVALID_ID; + i965_h264_context->fsid_list[i].frame_store_id = -1; + } + } + + for (i = 0; i < ARRAY_ELEMS(pic_param->ReferenceFrames); i++) { + VAPictureH264 *ref_pic = &pic_param->ReferenceFrames[i]; + int found = 0; + + if (ref_pic->flags & VA_PICTURE_H264_INVALID) + continue; + + for (j = 0; j < ARRAY_ELEMS(i965_h264_context->fsid_list); j++) { + if (i965_h264_context->fsid_list[j].surface_id == VA_INVALID_ID) + continue; + + if (i965_h264_context->fsid_list[j].surface_id == ref_pic->picture_id) { + found = 1; + break; + } + } + + if (!found) { + int frame_idx; + struct object_surface *obj_surface = SURFACE(ref_pic->picture_id); + + if (obj_surface->bo == NULL) { + /* Some broken sources such as conformance case FM2_SVA_C + * will get here !!!. Allocating a BO for it to avoid SEGMENT FAULT + */ + obj_surface->bo = dri_bo_alloc(i965->intel.bufmgr, + "vaapi surface", + obj_surface->size, + 0x1000); + } + + for (frame_idx = 0; frame_idx < ARRAY_ELEMS(i965_h264_context->fsid_list); frame_idx++) { + for (j = 0; j < ARRAY_ELEMS(i965_h264_context->fsid_list); j++) { + if (i965_h264_context->fsid_list[j].surface_id == VA_INVALID_ID) + continue; + + if (i965_h264_context->fsid_list[j].frame_store_id == frame_idx) + break; + } + + if (j == ARRAY_ELEMS(i965_h264_context->fsid_list)) + break; + } + + assert(frame_idx < ARRAY_ELEMS(i965_h264_context->fsid_list)); + + for (j = 0; j < ARRAY_ELEMS(i965_h264_context->fsid_list); j++) { + if (i965_h264_context->fsid_list[j].surface_id == VA_INVALID_ID) { + i965_h264_context->fsid_list[j].surface_id = ref_pic->picture_id; + i965_h264_context->fsid_list[j].frame_store_id = frame_idx; + break; + } + } + } + } + + for (i = 0; i < ARRAY_ELEMS(i965_h264_context->fsid_list) - 1; i++) { + if (i965_h264_context->fsid_list[i].surface_id != VA_INVALID_ID && + i965_h264_context->fsid_list[i].frame_store_id == i) + continue; + + for (j = i + 1; j < ARRAY_ELEMS(i965_h264_context->fsid_list); j++) { + if (i965_h264_context->fsid_list[j].surface_id != VA_INVALID_ID && + i965_h264_context->fsid_list[j].frame_store_id == i) { + VASurfaceID id = i965_h264_context->fsid_list[i].surface_id; + int frame_idx = i965_h264_context->fsid_list[i].frame_store_id; + + i965_h264_context->fsid_list[i].surface_id = i965_h264_context->fsid_list[j].surface_id; + i965_h264_context->fsid_list[i].frame_store_id = i965_h264_context->fsid_list[j].frame_store_id; + i965_h264_context->fsid_list[j].surface_id = id; + i965_h264_context->fsid_list[j].frame_store_id = frame_idx; + break; + } + } + } +} + +void +i965_avc_bsd_pipeline(VADriverContextP ctx, struct decode_state *decode_state) +{ + struct i965_driver_data *i965 = i965_driver_data(ctx); + struct i965_media_state *media_state = &i965->media_state; + struct i965_h264_context *i965_h264_context = (struct i965_h264_context *)media_state->private_context; + VAPictureParameterBufferH264 *pic_param; + VASliceParameterBufferH264 *slice_param; + int i, j; + + assert(decode_state->pic_param && decode_state->pic_param->buffer); + pic_param = (VAPictureParameterBufferH264 *)decode_state->pic_param->buffer; + i965_avc_bsd_frame_store_index(ctx, pic_param); + + i965_h264_context->enable_avc_ildb = 0; + i965_h264_context->picture.i_flag = 1; + + for (j = 0; j < decode_state->num_slice_params && i965_h264_context->enable_avc_ildb == 0; j++) { + assert(decode_state->slice_params && decode_state->slice_params[j]->buffer); + slice_param = (VASliceParameterBufferH264 *)decode_state->slice_params[j]->buffer; + + assert(decode_state->slice_params[j]->num_elements == 1); /* FIXME */ + for (i = 0; i < decode_state->slice_params[j]->num_elements; i++) { + assert(slice_param->slice_data_flag == VA_SLICE_DATA_FLAG_ALL); + assert((slice_param->slice_type == SLICE_TYPE_I) || + (slice_param->slice_type == SLICE_TYPE_SI) || + (slice_param->slice_type == SLICE_TYPE_P) || + (slice_param->slice_type == SLICE_TYPE_SP) || + (slice_param->slice_type == SLICE_TYPE_B)); + + if (slice_param->disable_deblocking_filter_idc != 1) { + i965_h264_context->enable_avc_ildb = 1; + break; + } + + slice_param++; + } + } + + intel_batchbuffer_start_atomic_bcs(ctx, 0x1000); + + i965_avc_bsd_img_state(ctx, decode_state); + i965_avc_bsd_qm_state(ctx, decode_state); + + for (j = 0; j < decode_state->num_slice_params; j++) { + assert(decode_state->slice_params && decode_state->slice_params[j]->buffer); + slice_param = (VASliceParameterBufferH264 *)decode_state->slice_params[j]->buffer; + + i965_bsd_ind_obj_base_address(ctx, decode_state, j); + + assert(decode_state->slice_params[j]->num_elements == 1); /* FIXME */ + for (i = 0; i < decode_state->slice_params[j]->num_elements; i++) { + assert(slice_param->slice_data_flag == VA_SLICE_DATA_FLAG_ALL); + assert((slice_param->slice_type == SLICE_TYPE_I) || + (slice_param->slice_type == SLICE_TYPE_SI) || + (slice_param->slice_type == SLICE_TYPE_P) || + (slice_param->slice_type == SLICE_TYPE_SP) || + (slice_param->slice_type == SLICE_TYPE_B)); + + if (i965_h264_context->picture.i_flag && + (slice_param->slice_type != SLICE_TYPE_I || + slice_param->slice_type != SLICE_TYPE_SI)) + i965_h264_context->picture.i_flag = 0; + + i965_avc_bsd_slice_state(ctx, pic_param, slice_param); + i965_avc_bsd_buf_base_state(ctx, pic_param, slice_param); + i965_avc_bsd_object(ctx, decode_state, pic_param, slice_param, j); + slice_param++; + } + } + + i965_avc_bsd_phantom_slice(ctx, decode_state, pic_param); + intel_batchbuffer_emit_mi_flush_bcs(ctx); + intel_batchbuffer_end_atomic_bcs(ctx); + intel_batchbuffer_flush_bcs(ctx); +} + +void +i965_avc_bsd_decode_init(VADriverContextP ctx) +{ + struct i965_driver_data *i965 = i965_driver_data(ctx); + struct i965_media_state *media_state = &i965->media_state; + struct i965_h264_context *i965_h264_context = (struct i965_h264_context *)media_state->private_context; + struct i965_avc_bsd_context *i965_avc_bsd_context; + dri_bo *bo; + + assert(i965_h264_context); + i965_avc_bsd_context = &i965_h264_context->i965_avc_bsd_context; + + dri_bo_unreference(i965_avc_bsd_context->bsd_raw_store.bo); + bo = dri_bo_alloc(i965->intel.bufmgr, + "bsd raw store", + 0x3000, /* at least 11520 bytes to support 120 MBs per row */ + 64); + assert(bo); + i965_avc_bsd_context->bsd_raw_store.bo = bo; + + dri_bo_unreference(i965_avc_bsd_context->mpr_row_store.bo); + bo = dri_bo_alloc(i965->intel.bufmgr, + "mpr row store", + 0x2000, /* at least 7680 bytes to support 120 MBs per row */ + 64); + assert(bo); + i965_avc_bsd_context->mpr_row_store.bo = bo; + + if (!i965_avc_bsd_context->init) { + i965_avc_bsd_context->init = 1; + } +} + +Bool +i965_avc_bsd_ternimate(struct i965_avc_bsd_context *i965_avc_bsd_context) +{ + dri_bo_unreference(i965_avc_bsd_context->bsd_raw_store.bo); + dri_bo_unreference(i965_avc_bsd_context->mpr_row_store.bo); + + return True; +} diff -Nru libva-1.0.1/i965_drv_video/i965_avc_bsd.h libva-1.0.1-3+0.31.1/i965_drv_video/i965_avc_bsd.h --- libva-1.0.1/i965_drv_video/i965_avc_bsd.h 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/i965_avc_bsd.h 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,60 @@ +/* + * Copyright © 2010 Intel Corporation + * + * 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, sub license, 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 (including the + * next paragraph) 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 NON-INFRINGEMENT. + * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * Authors: + * Xiang Haihao + * + */ + +#ifndef __I965_AVC_BSD_H__ +#define __I965_AVC_BSD_H__ + +#define DMV_SIZE 0x88000 /* 557056 bytes for a frame */ + +struct i965_avc_bsd_context +{ + struct { + dri_bo *bo; + } bsd_raw_store; + + struct { + dri_bo *bo; + } mpr_row_store; + + int init; +}; + +struct i965_avc_bsd_surface +{ + struct i965_avc_bsd_context *ctx; + dri_bo *dmv_top; + dri_bo *dmv_bottom; + int dmv_bottom_flag; +}; + +void i965_avc_bsd_pipeline(VADriverContextP, struct decode_state *); +void i965_avc_bsd_decode_init(VADriverContextP); +Bool i965_avc_bsd_ternimate(struct i965_avc_bsd_context *); + +#endif /* __I965_AVC_BSD_H__ */ + diff -Nru libva-1.0.1/i965_drv_video/i965_avc_hw_scoreboard.c libva-1.0.1-3+0.31.1/i965_drv_video/i965_avc_hw_scoreboard.c --- libva-1.0.1/i965_drv_video/i965_avc_hw_scoreboard.c 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/i965_avc_hw_scoreboard.c 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,444 @@ +/* + * Copyright © 2010 Intel Corporation + * + * 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, sub license, 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 (including the + * next paragraph) 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 NON-INFRINGEMENT. + * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * Authors: + * Xiang Haihao + * + */ + +#include +#include +#include + +#include "va_backend.h" + +#include "intel_batchbuffer.h" +#include "intel_driver.h" + +#include "i965_defines.h" +#include "i965_drv_video.h" +#include "i965_avc_hw_scoreboard.h" +#include "i965_media_h264.h" +#include "i965_media.h" + +extern struct media_kernel *h264_avc_kernels; + +/* On Ironlake */ +#include "shaders/h264/mc/export.inc.gen5" + +enum { + AVC_HW_SCOREBOARD = 0, + AVC_HW_SCOREBOARD_MBAFF +}; + +static unsigned long avc_hw_scoreboard_kernel_offset[] = { + SETHWSCOREBOARD_IP_GEN5 * INST_UNIT_GEN5, + SETHWSCOREBOARD_MBAFF_IP_GEN5 * INST_UNIT_GEN5 +}; + +static unsigned int avc_hw_scoreboard_constants[] = { + 0x08040201, + 0x00000010, + 0x08000210, + 0x00000000, + 0x08040201, + 0x08040210, + 0x01000010, + 0x08040200 +}; + +static void +i965_avc_hw_scoreboard_surface_state(struct i965_avc_hw_scoreboard_context *avc_hw_scoreboard_context) +{ + struct i965_surface_state *ss; + dri_bo *bo; + + bo = avc_hw_scoreboard_context->surface.ss_bo; + dri_bo_map(bo, 1); + assert(bo->virtual); + ss = bo->virtual; + memset(ss, 0, sizeof(*ss)); + ss->ss0.surface_type = I965_SURFACE_BUFFER; + ss->ss1.base_addr = avc_hw_scoreboard_context->surface.s_bo->offset; + ss->ss2.width = ((avc_hw_scoreboard_context->surface.total_mbs * MB_CMD_IN_OWS - 1) & 0x7f); + ss->ss2.height = (((avc_hw_scoreboard_context->surface.total_mbs * MB_CMD_IN_OWS - 1) >> 7) & 0x1fff); + ss->ss3.depth = (((avc_hw_scoreboard_context->surface.total_mbs * MB_CMD_IN_OWS - 1) >> 20) & 0x7f); + dri_bo_emit_reloc(bo, + I915_GEM_DOMAIN_RENDER, I915_GEM_DOMAIN_RENDER, + 0, + offsetof(struct i965_surface_state, ss1), + avc_hw_scoreboard_context->surface.s_bo); + dri_bo_unmap(bo); +} + +static void +i965_avc_hw_scoreboard_interface_descriptor_table(struct i965_avc_hw_scoreboard_context *avc_hw_scoreboard_context) +{ + struct i965_interface_descriptor *desc; + dri_bo *bo; + + bo = avc_hw_scoreboard_context->idrt.bo; + dri_bo_map(bo, 1); + assert(bo->virtual); + desc = bo->virtual; + memset(desc, 0, sizeof(*desc)); + desc->desc0.grf_reg_blocks = 7; + desc->desc0.kernel_start_pointer = (avc_hw_scoreboard_context->hw_kernel.bo->offset + + avc_hw_scoreboard_context->hw_kernel.offset) >> 6; /* reloc */ + desc->desc1.const_urb_entry_read_offset = 0; + desc->desc1.const_urb_entry_read_len = 1; + desc->desc3.binding_table_entry_count = 0; + desc->desc3.binding_table_pointer = + avc_hw_scoreboard_context->binding_table.bo->offset >> 5; /*reloc */ + + dri_bo_emit_reloc(bo, + I915_GEM_DOMAIN_INSTRUCTION, 0, + desc->desc0.grf_reg_blocks + avc_hw_scoreboard_context->hw_kernel.offset, + offsetof(struct i965_interface_descriptor, desc0), + avc_hw_scoreboard_context->hw_kernel.bo); + + dri_bo_emit_reloc(bo, + I915_GEM_DOMAIN_INSTRUCTION, 0, + desc->desc3.binding_table_entry_count, + offsetof(struct i965_interface_descriptor, desc3), + avc_hw_scoreboard_context->binding_table.bo); + + dri_bo_unmap(bo); +} + +static void +i965_avc_hw_scoreboard_binding_table(struct i965_avc_hw_scoreboard_context *avc_hw_scoreboard_context) +{ + unsigned int *binding_table; + dri_bo *bo = avc_hw_scoreboard_context->binding_table.bo; + + dri_bo_map(bo, 1); + assert(bo->virtual); + binding_table = bo->virtual; + memset(binding_table, 0, bo->size); + binding_table[0] = avc_hw_scoreboard_context->surface.ss_bo->offset; + dri_bo_emit_reloc(bo, + I915_GEM_DOMAIN_INSTRUCTION, 0, + 0, + 0, + avc_hw_scoreboard_context->surface.ss_bo); + dri_bo_unmap(bo); +} + +static void +i965_avc_hw_scoreboard_vfe_state(struct i965_avc_hw_scoreboard_context *avc_hw_scoreboard_context) +{ + struct i965_vfe_state *vfe_state; + dri_bo *bo; + + bo = avc_hw_scoreboard_context->vfe_state.bo; + dri_bo_map(bo, 1); + assert(bo->virtual); + vfe_state = bo->virtual; + memset(vfe_state, 0, sizeof(*vfe_state)); + vfe_state->vfe1.max_threads = avc_hw_scoreboard_context->urb.num_vfe_entries - 1; + vfe_state->vfe1.urb_entry_alloc_size = avc_hw_scoreboard_context->urb.size_vfe_entry - 1; + vfe_state->vfe1.num_urb_entries = avc_hw_scoreboard_context->urb.num_vfe_entries; + vfe_state->vfe1.vfe_mode = VFE_GENERIC_MODE; + vfe_state->vfe1.children_present = 0; + vfe_state->vfe2.interface_descriptor_base = + avc_hw_scoreboard_context->idrt.bo->offset >> 4; /* reloc */ + dri_bo_emit_reloc(bo, + I915_GEM_DOMAIN_INSTRUCTION, 0, + 0, + offsetof(struct i965_vfe_state, vfe2), + avc_hw_scoreboard_context->idrt.bo); + dri_bo_unmap(bo); +} + +static void +i965_avc_hw_scoreboard_upload_constants(struct i965_avc_hw_scoreboard_context *avc_hw_scoreboard_context) +{ + unsigned char *constant_buffer; + + if (avc_hw_scoreboard_context->curbe.upload) + return; + + dri_bo_map(avc_hw_scoreboard_context->curbe.bo, 1); + assert(avc_hw_scoreboard_context->curbe.bo->virtual); + constant_buffer = avc_hw_scoreboard_context->curbe.bo->virtual; + memcpy(constant_buffer, avc_hw_scoreboard_constants, sizeof(avc_hw_scoreboard_constants)); + dri_bo_unmap(avc_hw_scoreboard_context->curbe.bo); + avc_hw_scoreboard_context->curbe.upload = 1; +} + +static void +i965_avc_hw_scoreboard_states_setup(struct i965_avc_hw_scoreboard_context *avc_hw_scoreboard_context) +{ + i965_avc_hw_scoreboard_surface_state(avc_hw_scoreboard_context); + i965_avc_hw_scoreboard_binding_table(avc_hw_scoreboard_context); + i965_avc_hw_scoreboard_interface_descriptor_table(avc_hw_scoreboard_context); + i965_avc_hw_scoreboard_vfe_state(avc_hw_scoreboard_context); + i965_avc_hw_scoreboard_upload_constants(avc_hw_scoreboard_context); +} + +static void +i965_avc_hw_scoreboard_pipeline_select(VADriverContextP ctx) +{ + BEGIN_BATCH(ctx, 1); + OUT_BATCH(ctx, CMD_PIPELINE_SELECT | PIPELINE_SELECT_MEDIA); + ADVANCE_BATCH(ctx); +} + +static void +i965_avc_hw_scoreboard_urb_layout(VADriverContextP ctx, struct i965_avc_hw_scoreboard_context *avc_hw_scoreboard_context) +{ + struct i965_driver_data *i965 = i965_driver_data(ctx); + unsigned int vfe_fence, cs_fence; + + vfe_fence = avc_hw_scoreboard_context->urb.cs_start; + cs_fence = URB_SIZE((&i965->intel)); + + BEGIN_BATCH(ctx, 3); + OUT_BATCH(ctx, CMD_URB_FENCE | UF0_VFE_REALLOC | UF0_CS_REALLOC | 1); + OUT_BATCH(ctx, 0); + OUT_BATCH(ctx, + (vfe_fence << UF2_VFE_FENCE_SHIFT) | /* VFE_SIZE */ + (cs_fence << UF2_CS_FENCE_SHIFT)); /* CS_SIZE */ + ADVANCE_BATCH(ctx); +} + +static void +i965_avc_hw_scoreboard_state_base_address(VADriverContextP ctx) +{ + BEGIN_BATCH(ctx, 8); + OUT_BATCH(ctx, CMD_STATE_BASE_ADDRESS | 6); + OUT_BATCH(ctx, 0 | BASE_ADDRESS_MODIFY); + OUT_BATCH(ctx, 0 | BASE_ADDRESS_MODIFY); + OUT_BATCH(ctx, 0 | BASE_ADDRESS_MODIFY); + OUT_BATCH(ctx, 0 | BASE_ADDRESS_MODIFY); + OUT_BATCH(ctx, 0 | BASE_ADDRESS_MODIFY); + OUT_BATCH(ctx, 0 | BASE_ADDRESS_MODIFY); + OUT_BATCH(ctx, 0 | BASE_ADDRESS_MODIFY); + ADVANCE_BATCH(ctx); +} + +static void +i965_avc_hw_scoreboard_state_pointers(VADriverContextP ctx, struct i965_avc_hw_scoreboard_context *avc_hw_scoreboard_context) +{ + BEGIN_BATCH(ctx, 3); + OUT_BATCH(ctx, CMD_MEDIA_STATE_POINTERS | 1); + OUT_BATCH(ctx, 0); + OUT_RELOC(ctx, avc_hw_scoreboard_context->vfe_state.bo, I915_GEM_DOMAIN_INSTRUCTION, 0, 0); + ADVANCE_BATCH(ctx); +} + +static void +i965_avc_hw_scoreboard_cs_urb_layout(VADriverContextP ctx, struct i965_avc_hw_scoreboard_context *avc_hw_scoreboard_context) +{ + BEGIN_BATCH(ctx, 2); + OUT_BATCH(ctx, CMD_CS_URB_STATE | 0); + OUT_BATCH(ctx, + ((avc_hw_scoreboard_context->urb.size_cs_entry - 1) << 4) | /* URB Entry Allocation Size */ + (avc_hw_scoreboard_context->urb.num_cs_entries << 0)); /* Number of URB Entries */ + ADVANCE_BATCH(ctx); +} + +static void +i965_avc_hw_scoreboard_constant_buffer(VADriverContextP ctx, struct i965_avc_hw_scoreboard_context *avc_hw_scoreboard_context) +{ + BEGIN_BATCH(ctx, 2); + OUT_BATCH(ctx, CMD_CONSTANT_BUFFER | (1 << 8) | (2 - 2)); + OUT_RELOC(ctx, avc_hw_scoreboard_context->curbe.bo, + I915_GEM_DOMAIN_INSTRUCTION, 0, + avc_hw_scoreboard_context->urb.size_cs_entry - 1); + ADVANCE_BATCH(ctx); +} + +static void +i965_avc_hw_scoreboard_objects(VADriverContextP ctx, struct i965_avc_hw_scoreboard_context *avc_hw_scoreboard_context) +{ + int number_mb_cmds = 512; + int starting_mb_number = avc_hw_scoreboard_context->inline_data.starting_mb_number; + int i; + + for (i = 0; i < avc_hw_scoreboard_context->inline_data.num_mb_cmds / 512; i++) { + BEGIN_BATCH(ctx, 6); + OUT_BATCH(ctx, CMD_MEDIA_OBJECT | 4); + OUT_BATCH(ctx, 0); /* interface descriptor offset: 0 */ + OUT_BATCH(ctx, 0); /* no indirect data */ + OUT_BATCH(ctx, 0); + OUT_BATCH(ctx, ((number_mb_cmds << 16) | + (starting_mb_number << 0))); + OUT_BATCH(ctx, avc_hw_scoreboard_context->inline_data.pic_width_in_mbs); + ADVANCE_BATCH(ctx); + + starting_mb_number += 512; + } + + number_mb_cmds = avc_hw_scoreboard_context->inline_data.num_mb_cmds % 512; + + if (number_mb_cmds) { + BEGIN_BATCH(ctx, 6); + OUT_BATCH(ctx, CMD_MEDIA_OBJECT | 4); + OUT_BATCH(ctx, 0); /* interface descriptor offset: 0 */ + OUT_BATCH(ctx, 0); /* no indirect data */ + OUT_BATCH(ctx, 0); + OUT_BATCH(ctx, ((number_mb_cmds << 16) | + (starting_mb_number << 0))); + OUT_BATCH(ctx, avc_hw_scoreboard_context->inline_data.pic_width_in_mbs); + ADVANCE_BATCH(ctx); + } +} + +static void +i965_avc_hw_scoreboard_pipeline_setup(VADriverContextP ctx, struct i965_avc_hw_scoreboard_context *avc_hw_scoreboard_context) +{ + intel_batchbuffer_start_atomic(ctx, 0x1000); + intel_batchbuffer_emit_mi_flush(ctx); + i965_avc_hw_scoreboard_pipeline_select(ctx); + i965_avc_hw_scoreboard_state_base_address(ctx); + i965_avc_hw_scoreboard_state_pointers(ctx, avc_hw_scoreboard_context); + i965_avc_hw_scoreboard_urb_layout(ctx, avc_hw_scoreboard_context); + i965_avc_hw_scoreboard_cs_urb_layout(ctx, avc_hw_scoreboard_context); + i965_avc_hw_scoreboard_constant_buffer(ctx, avc_hw_scoreboard_context); + i965_avc_hw_scoreboard_objects(ctx, avc_hw_scoreboard_context); + intel_batchbuffer_end_atomic(ctx); +} + +void +i965_avc_hw_scoreboard(VADriverContextP ctx, struct decode_state *decode_state) +{ + struct i965_driver_data *i965 = i965_driver_data(ctx); + struct i965_media_state *media_state = &i965->media_state; + struct i965_h264_context *i965_h264_context = (struct i965_h264_context *)media_state->private_context; + + if (i965_h264_context->use_avc_hw_scoreboard) { + struct i965_avc_hw_scoreboard_context *avc_hw_scoreboard_context = &i965_h264_context->avc_hw_scoreboard_context; + + avc_hw_scoreboard_context->inline_data.num_mb_cmds = i965_h264_context->avc_it_command_mb_info.mbs; + avc_hw_scoreboard_context->inline_data.starting_mb_number = i965_h264_context->avc_it_command_mb_info.mbs; + avc_hw_scoreboard_context->inline_data.pic_width_in_mbs = i965_h264_context->picture.width_in_mbs; + avc_hw_scoreboard_context->surface.total_mbs = i965_h264_context->avc_it_command_mb_info.mbs * 2; + + dri_bo_unreference(avc_hw_scoreboard_context->hw_kernel.bo); + avc_hw_scoreboard_context->hw_kernel.bo = h264_avc_kernels[H264_AVC_COMBINED].bo; + assert(avc_hw_scoreboard_context->hw_kernel.bo != NULL); + dri_bo_reference(avc_hw_scoreboard_context->hw_kernel.bo); + + if (i965_h264_context->picture.mbaff_frame_flag) + avc_hw_scoreboard_context->hw_kernel.offset = avc_hw_scoreboard_kernel_offset[AVC_HW_SCOREBOARD_MBAFF]; + else + avc_hw_scoreboard_context->hw_kernel.offset = avc_hw_scoreboard_kernel_offset[AVC_HW_SCOREBOARD]; + + i965_avc_hw_scoreboard_states_setup(avc_hw_scoreboard_context); + i965_avc_hw_scoreboard_pipeline_setup(ctx, avc_hw_scoreboard_context); + } +} + +void +i965_avc_hw_scoreboard_decode_init(VADriverContextP ctx) +{ + struct i965_driver_data *i965 = i965_driver_data(ctx); + struct i965_media_state *media_state = &i965->media_state; + struct i965_h264_context *i965_h264_context = (struct i965_h264_context *)media_state->private_context; + + if (i965_h264_context->use_avc_hw_scoreboard) { + struct i965_avc_hw_scoreboard_context *avc_hw_scoreboard_context = &i965_h264_context->avc_hw_scoreboard_context; + dri_bo *bo; + + if (avc_hw_scoreboard_context->curbe.bo == NULL) { + bo = dri_bo_alloc(i965->intel.bufmgr, + "constant buffer", + 4096, 64); + assert(bo); + avc_hw_scoreboard_context->curbe.bo = bo; + avc_hw_scoreboard_context->curbe.upload = 0; + } + + dri_bo_unreference(avc_hw_scoreboard_context->surface.s_bo); + avc_hw_scoreboard_context->surface.s_bo = i965_h264_context->avc_it_command_mb_info.bo; + assert(avc_hw_scoreboard_context->surface.s_bo != NULL); + dri_bo_reference(avc_hw_scoreboard_context->surface.s_bo); + + dri_bo_unreference(avc_hw_scoreboard_context->surface.ss_bo); + bo = dri_bo_alloc(i965->intel.bufmgr, + "surface state", + sizeof(struct i965_surface_state), 32); + assert(bo); + avc_hw_scoreboard_context->surface.ss_bo = bo; + + dri_bo_unreference(avc_hw_scoreboard_context->binding_table.bo); + bo = dri_bo_alloc(i965->intel.bufmgr, + "binding table", + MAX_MEDIA_SURFACES * sizeof(unsigned int), 32); + assert(bo); + avc_hw_scoreboard_context->binding_table.bo = bo; + + dri_bo_unreference(avc_hw_scoreboard_context->idrt.bo); + bo = dri_bo_alloc(i965->intel.bufmgr, + "interface discriptor", + MAX_INTERFACE_DESC * sizeof(struct i965_interface_descriptor), 16); + assert(bo); + avc_hw_scoreboard_context->idrt.bo = bo; + + dri_bo_unreference(avc_hw_scoreboard_context->vfe_state.bo); + bo = dri_bo_alloc(i965->intel.bufmgr, + "vfe state", + sizeof(struct i965_vfe_state), 32); + assert(bo); + avc_hw_scoreboard_context->vfe_state.bo = bo; + + avc_hw_scoreboard_context->urb.num_vfe_entries = 32; + avc_hw_scoreboard_context->urb.size_vfe_entry = 2; + avc_hw_scoreboard_context->urb.num_cs_entries = 1; + avc_hw_scoreboard_context->urb.size_cs_entry = 1; + avc_hw_scoreboard_context->urb.vfe_start = 0; + avc_hw_scoreboard_context->urb.cs_start = avc_hw_scoreboard_context->urb.vfe_start + + avc_hw_scoreboard_context->urb.num_vfe_entries * avc_hw_scoreboard_context->urb.size_vfe_entry; + assert(avc_hw_scoreboard_context->urb.cs_start + + avc_hw_scoreboard_context->urb.num_cs_entries * avc_hw_scoreboard_context->urb.size_cs_entry <= URB_SIZE((&i965->intel))); + } +} + +Bool +i965_avc_hw_scoreboard_ternimate(struct i965_avc_hw_scoreboard_context *avc_hw_scoreboard_context) +{ + dri_bo_unreference(avc_hw_scoreboard_context->curbe.bo); + avc_hw_scoreboard_context->curbe.bo = NULL; + + dri_bo_unreference(avc_hw_scoreboard_context->surface.ss_bo); + avc_hw_scoreboard_context->surface.ss_bo = NULL; + + dri_bo_unreference(avc_hw_scoreboard_context->surface.s_bo); + avc_hw_scoreboard_context->surface.s_bo = NULL; + + dri_bo_unreference(avc_hw_scoreboard_context->binding_table.bo); + avc_hw_scoreboard_context->binding_table.bo = NULL; + + dri_bo_unreference(avc_hw_scoreboard_context->idrt.bo); + avc_hw_scoreboard_context->idrt.bo = NULL; + + dri_bo_unreference(avc_hw_scoreboard_context->vfe_state.bo); + avc_hw_scoreboard_context->vfe_state.bo = NULL; + + dri_bo_unreference(avc_hw_scoreboard_context->hw_kernel.bo); + avc_hw_scoreboard_context->hw_kernel.bo = NULL; + + return True; +} diff -Nru libva-1.0.1/i965_drv_video/i965_avc_hw_scoreboard.h libva-1.0.1-3+0.31.1/i965_drv_video/i965_avc_hw_scoreboard.h --- libva-1.0.1/i965_drv_video/i965_avc_hw_scoreboard.h 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/i965_avc_hw_scoreboard.h 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,85 @@ +/* + * Copyright © 2010 Intel Corporation + * + * 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, sub license, 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 (including the + * next paragraph) 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 NON-INFRINGEMENT. + * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * Authors: + * Xiang Haihao + * + */ + +#ifndef __I965_AVC_HW_SCOREBOARD_H__ +#define __I965_AVC_HW_SCOREBOARD_H__ + +struct i965_avc_hw_scoreboard_context +{ + struct { + unsigned int num_mb_cmds; + unsigned int starting_mb_number; + unsigned int pic_width_in_mbs; + } inline_data; + + struct { + dri_bo *ss_bo; + dri_bo *s_bo; + unsigned int total_mbs; + } surface; + + struct { + dri_bo *bo; + } binding_table; + + struct { + dri_bo *bo; + } idrt; + + struct { + dri_bo *bo; + } vfe_state; + + struct { + dri_bo *bo; + int upload; + } curbe; + + struct { + dri_bo *bo; + unsigned long offset; + } hw_kernel; + + struct { + unsigned int vfe_start; + unsigned int cs_start; + + unsigned int num_vfe_entries; + unsigned int num_cs_entries; + + unsigned int size_vfe_entry; + unsigned int size_cs_entry; + } urb; +}; + +void i965_avc_hw_scoreboard(VADriverContextP, struct decode_state *); +void i965_avc_hw_scoreboard_decode_init(VADriverContextP); +Bool i965_avc_hw_scoreboard_ternimate(struct i965_avc_hw_scoreboard_context *); + +#endif /* __I965_AVC_HW_SCOREBOARD_H__ */ + diff -Nru libva-1.0.1/i965_drv_video/i965_avc_ildb.c libva-1.0.1-3+0.31.1/i965_drv_video/i965_avc_ildb.c --- libva-1.0.1/i965_drv_video/i965_avc_ildb.c 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/i965_avc_ildb.c 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,671 @@ +/* + * Copyright © 2010 Intel Corporation + * + * 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, sub license, 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 (including the + * next paragraph) 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 NON-INFRINGEMENT. + * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * Authors: + * Xiang Haihao + * + */ + +#include +#include +#include + +#include "va_backend.h" + +#include "intel_batchbuffer.h" +#include "intel_driver.h" + +#include "i965_defines.h" +#include "i965_drv_video.h" +#include "i965_avc_ildb.h" +#include "i965_media_h264.h" +#include "i965_media.h" + +/* On Cantiga */ +#include "shaders/h264/mc/export.inc" + +/* On Ironlake */ +#include "shaders/h264/mc/export.inc.gen5" + +#define PICTURE_FRAME 0 +#define PICTURE_FIELD 1 +#define PICTURE_MBAFF 2 + +enum { + AVC_ILDB_ROOT_Y_ILDB_FRAME, + AVC_ILDB_CHILD_Y_ILDB_FRAME, + AVC_ILDB_ROOT_UV_ILDB_FRAME, + AVC_ILDB_CHILD_UV_ILDB_FRAME, + AVC_ILDB_ROOT_Y_ILDB_FIELD, + AVC_ILDB_CHILD_Y_ILDB_FIELD, + AVC_ILDB_ROOT_UV_ILDB_FIELD, + AVC_ILDB_CHILD_UV_ILDB_FIELD, + AVC_ILDB_ROOT_Y_ILDB_MBAFF, + AVC_ILDB_CHILD_Y_ILDB_MBAFF, + AVC_ILDB_ROOT_UV_ILDB_MBAFF, + AVC_ILDB_CHILD_UV_ILDB_MBAFF +}; + +static unsigned long avc_ildb_kernel_offset_gen4[] = { + AVC_ILDB_ROOT_Y_ILDB_FRAME_IP * INST_UNIT_GEN4, + AVC_ILDB_CHILD_Y_ILDB_FRAME_IP * INST_UNIT_GEN4, + AVC_ILDB_ROOT_UV_ILDB_FRAME_IP * INST_UNIT_GEN4, + AVC_ILDB_CHILD_UV_ILDB_FRAME_IP * INST_UNIT_GEN4, + AVC_ILDB_ROOT_Y_ILDB_FIELD_IP * INST_UNIT_GEN4, + AVC_ILDB_CHILD_Y_ILDB_FIELD_IP * INST_UNIT_GEN4, + AVC_ILDB_ROOT_UV_ILDB_FIELD_IP * INST_UNIT_GEN4, + AVC_ILDB_CHILD_UV_ILDB_FIELD_IP * INST_UNIT_GEN4, + AVC_ILDB_ROOT_Y_ILDB_MBAFF_IP * INST_UNIT_GEN4, + AVC_ILDB_CHILD_Y_ILDB_MBAFF_IP * INST_UNIT_GEN4, + AVC_ILDB_ROOT_UV_ILDB_MBAFF_IP * INST_UNIT_GEN4, + AVC_ILDB_CHILD_UV_ILDB_MBAFF_IP * INST_UNIT_GEN4 +}; + +static unsigned long avc_ildb_kernel_offset_gen5[] = { + AVC_ILDB_ROOT_Y_ILDB_FRAME_IP_GEN5 * INST_UNIT_GEN5, + AVC_ILDB_CHILD_Y_ILDB_FRAME_IP_GEN5 * INST_UNIT_GEN5, + AVC_ILDB_ROOT_UV_ILDB_FRAME_IP_GEN5 * INST_UNIT_GEN5, + AVC_ILDB_CHILD_UV_ILDB_FRAME_IP_GEN5 * INST_UNIT_GEN5, + AVC_ILDB_ROOT_Y_ILDB_FIELD_IP_GEN5 * INST_UNIT_GEN5, + AVC_ILDB_CHILD_Y_ILDB_FIELD_IP_GEN5 * INST_UNIT_GEN5, + AVC_ILDB_ROOT_UV_ILDB_FIELD_IP_GEN5 * INST_UNIT_GEN5, + AVC_ILDB_CHILD_UV_ILDB_FIELD_IP_GEN5 * INST_UNIT_GEN5, + AVC_ILDB_ROOT_Y_ILDB_MBAFF_IP_GEN5 * INST_UNIT_GEN5, + AVC_ILDB_CHILD_Y_ILDB_MBAFF_IP_GEN5 * INST_UNIT_GEN5, + AVC_ILDB_ROOT_UV_ILDB_MBAFF_IP_GEN5 * INST_UNIT_GEN5, + AVC_ILDB_CHILD_UV_ILDB_MBAFF_IP_GEN5 * INST_UNIT_GEN5 +}; + +struct avc_ildb_root_input +{ + unsigned int blocks_per_row : 16; + unsigned int blocks_per_column : 16; + + unsigned int picture_type : 16; + unsigned int max_concurrent_threads : 16; + + unsigned int debug_field : 16; + unsigned int mbaff_frame_flag : 1; + unsigned int bottom_field_flag : 1; + unsigned int control_data_expansion_flag : 1; + unsigned int chroma_format : 1; + unsigned int pad0 : 12; + + unsigned int ramp_constant_0; + + unsigned int ramp_constant_1; + + int constant_0 : 8; + int constant_1 : 8; + int pad1 : 16; + + unsigned int pad2; + unsigned int pad3; +}; + +extern struct media_kernel *h264_avc_kernels; + +#define NUM_AVC_ILDB_INTERFACES ARRAY_ELEMS(avc_ildb_kernel_offset_gen4) +static unsigned long *avc_ildb_kernel_offset = NULL; + +static void +i965_avc_ildb_surface_state(VADriverContextP ctx, struct decode_state *decode_state) +{ + struct i965_driver_data *i965 = i965_driver_data(ctx); + struct i965_media_state *media_state = &i965->media_state; + struct i965_h264_context *i965_h264_context = (struct i965_h264_context *)media_state->private_context; + struct i965_avc_ildb_context *avc_ildb_context = &i965_h264_context->avc_ildb_context; + struct i965_surface_state *ss; + struct object_surface *obj_surface; + VAPictureParameterBufferH264 *pic_param; + VAPictureH264 *va_pic; + dri_bo *bo; + int i; + + assert(decode_state->pic_param && decode_state->pic_param->buffer); + pic_param = (VAPictureParameterBufferH264 *)decode_state->pic_param->buffer; + va_pic = &pic_param->CurrPic; + assert(!(va_pic->flags & VA_PICTURE_H264_INVALID)); + obj_surface = SURFACE(va_pic->picture_id); + assert(obj_surface); + + avc_ildb_context->surface[SURFACE_EDGE_CONTROL_DATA].s_bo = i965_h264_context->avc_ildb_data.bo; + dri_bo_reference(avc_ildb_context->surface[SURFACE_EDGE_CONTROL_DATA].s_bo); + avc_ildb_context->surface[SURFACE_EDGE_CONTROL_DATA].offset = 0; + avc_ildb_context->surface[SURFACE_EDGE_CONTROL_DATA].surface_type = I965_SURFACE_BUFFER; + avc_ildb_context->surface[SURFACE_EDGE_CONTROL_DATA].width = ((avc_ildb_context->mbs_per_picture * EDGE_CONTROL_DATA_IN_DWS - 1) & 0x7f); + avc_ildb_context->surface[SURFACE_EDGE_CONTROL_DATA].height = (((avc_ildb_context->mbs_per_picture * EDGE_CONTROL_DATA_IN_DWS - 1) >> 7) & 0x1fff); + avc_ildb_context->surface[SURFACE_EDGE_CONTROL_DATA].depth = (((avc_ildb_context->mbs_per_picture * EDGE_CONTROL_DATA_IN_DWS - 1) >> 20) & 0x7f); + avc_ildb_context->surface[SURFACE_EDGE_CONTROL_DATA].pitch = EDGE_CONTROL_DATA_IN_BTYES - 1; + avc_ildb_context->surface[SURFACE_EDGE_CONTROL_DATA].is_target = 0; + + avc_ildb_context->surface[SURFACE_SRC_Y].s_bo = obj_surface->bo; + dri_bo_reference(avc_ildb_context->surface[SURFACE_SRC_Y].s_bo); + avc_ildb_context->surface[SURFACE_SRC_Y].offset = 0; + avc_ildb_context->surface[SURFACE_SRC_Y].surface_type = I965_SURFACE_2D; + avc_ildb_context->surface[SURFACE_SRC_Y].format = I965_SURFACEFORMAT_R8_SINT; + avc_ildb_context->surface[SURFACE_SRC_Y].width = obj_surface->width / 4 - 1; + avc_ildb_context->surface[SURFACE_SRC_Y].height = obj_surface->height - 1; + avc_ildb_context->surface[SURFACE_SRC_Y].depth = 0; + avc_ildb_context->surface[SURFACE_SRC_Y].pitch = obj_surface->width - 1; + avc_ildb_context->surface[SURFACE_SRC_Y].vert_line_stride = !!(va_pic->flags & (VA_PICTURE_H264_TOP_FIELD | VA_PICTURE_H264_BOTTOM_FIELD)); + avc_ildb_context->surface[SURFACE_SRC_Y].vert_line_stride_ofs = !!(va_pic->flags & VA_PICTURE_H264_BOTTOM_FIELD); + avc_ildb_context->surface[SURFACE_SRC_Y].is_target = 0; + + avc_ildb_context->surface[SURFACE_SRC_UV].s_bo = obj_surface->bo; + dri_bo_reference(avc_ildb_context->surface[SURFACE_SRC_UV].s_bo); + avc_ildb_context->surface[SURFACE_SRC_UV].offset = obj_surface->width * obj_surface->height; + avc_ildb_context->surface[SURFACE_SRC_UV].surface_type = I965_SURFACE_2D; + avc_ildb_context->surface[SURFACE_SRC_UV].format = I965_SURFACEFORMAT_R8G8_SINT; + avc_ildb_context->surface[SURFACE_SRC_UV].width = obj_surface->width / 4 - 1; + avc_ildb_context->surface[SURFACE_SRC_UV].height = obj_surface->height / 2 - 1; + avc_ildb_context->surface[SURFACE_SRC_UV].depth = 0; + avc_ildb_context->surface[SURFACE_SRC_UV].pitch = obj_surface->width - 1; + avc_ildb_context->surface[SURFACE_SRC_UV].vert_line_stride = !!(va_pic->flags & (VA_PICTURE_H264_TOP_FIELD | VA_PICTURE_H264_BOTTOM_FIELD)); + avc_ildb_context->surface[SURFACE_SRC_UV].vert_line_stride_ofs = !!(va_pic->flags & VA_PICTURE_H264_BOTTOM_FIELD); + avc_ildb_context->surface[SURFACE_SRC_UV].is_target = 0; + + avc_ildb_context->surface[SURFACE_DEST_Y].s_bo = obj_surface->bo; + dri_bo_reference(avc_ildb_context->surface[SURFACE_DEST_Y].s_bo); + avc_ildb_context->surface[SURFACE_DEST_Y].offset = 0; + avc_ildb_context->surface[SURFACE_DEST_Y].surface_type = I965_SURFACE_2D; + avc_ildb_context->surface[SURFACE_DEST_Y].format = I965_SURFACEFORMAT_R8_SINT; + avc_ildb_context->surface[SURFACE_DEST_Y].width = obj_surface->width / 4 - 1; + avc_ildb_context->surface[SURFACE_DEST_Y].height = obj_surface->height - 1; + avc_ildb_context->surface[SURFACE_DEST_Y].depth = 0; + avc_ildb_context->surface[SURFACE_DEST_Y].pitch = obj_surface->width - 1; + avc_ildb_context->surface[SURFACE_DEST_Y].vert_line_stride = !!(va_pic->flags & (VA_PICTURE_H264_TOP_FIELD | VA_PICTURE_H264_BOTTOM_FIELD)); + avc_ildb_context->surface[SURFACE_DEST_Y].vert_line_stride_ofs = !!(va_pic->flags & VA_PICTURE_H264_BOTTOM_FIELD); + avc_ildb_context->surface[SURFACE_DEST_Y].is_target = 1; + + avc_ildb_context->surface[SURFACE_DEST_UV].s_bo = obj_surface->bo; + dri_bo_reference(avc_ildb_context->surface[SURFACE_DEST_UV].s_bo); + avc_ildb_context->surface[SURFACE_DEST_UV].offset = obj_surface->width * obj_surface->height; + avc_ildb_context->surface[SURFACE_DEST_UV].surface_type = I965_SURFACE_2D; + avc_ildb_context->surface[SURFACE_DEST_UV].format = I965_SURFACEFORMAT_R8G8_SINT; + avc_ildb_context->surface[SURFACE_DEST_UV].width = obj_surface->width / 4 - 1; + avc_ildb_context->surface[SURFACE_DEST_UV].height = obj_surface->height / 2 - 1; + avc_ildb_context->surface[SURFACE_DEST_UV].depth = 0; + avc_ildb_context->surface[SURFACE_DEST_UV].pitch = obj_surface->width - 1; + avc_ildb_context->surface[SURFACE_DEST_UV].vert_line_stride = !!(va_pic->flags & (VA_PICTURE_H264_TOP_FIELD | VA_PICTURE_H264_BOTTOM_FIELD)); + avc_ildb_context->surface[SURFACE_DEST_UV].vert_line_stride_ofs = !!(va_pic->flags & VA_PICTURE_H264_BOTTOM_FIELD); + avc_ildb_context->surface[SURFACE_DEST_UV].is_target = 1; + + for (i = 0; i < NUM_AVC_ILDB_SURFACES; i++) { + bo = avc_ildb_context->surface[i].ss_bo; + dri_bo_map(bo, 1); + assert(bo->virtual); + ss = bo->virtual; + memset(ss, 0, sizeof(*ss)); + ss->ss0.surface_type = avc_ildb_context->surface[i].surface_type; + ss->ss0.surface_format = avc_ildb_context->surface[i].format; + ss->ss0.vert_line_stride = avc_ildb_context->surface[i].vert_line_stride; + ss->ss0.vert_line_stride_ofs = avc_ildb_context->surface[i].vert_line_stride_ofs; + ss->ss1.base_addr = avc_ildb_context->surface[i].s_bo->offset + avc_ildb_context->surface[i].offset; + ss->ss2.width = avc_ildb_context->surface[i].width; + ss->ss2.height = avc_ildb_context->surface[i].height; + ss->ss3.depth = avc_ildb_context->surface[i].depth; + ss->ss3.pitch = avc_ildb_context->surface[i].pitch; + dri_bo_emit_reloc(bo, + I915_GEM_DOMAIN_RENDER, + avc_ildb_context->surface[i].is_target ? I915_GEM_DOMAIN_RENDER : 0, + avc_ildb_context->surface[i].offset, + offsetof(struct i965_surface_state, ss1), + avc_ildb_context->surface[i].s_bo); + dri_bo_unmap(bo); + } +} + +static void +i965_avc_ildb_binding_table(VADriverContextP ctx) +{ + struct i965_driver_data *i965 = i965_driver_data(ctx); + struct i965_media_state *media_state = &i965->media_state; + struct i965_h264_context *i965_h264_context = (struct i965_h264_context *)media_state->private_context; + struct i965_avc_ildb_context *avc_ildb_context = &i965_h264_context->avc_ildb_context; + unsigned int *binding_table; + dri_bo *bo = avc_ildb_context->binding_table.bo; + int i; + + dri_bo_map(bo, 1); + assert(bo->virtual); + binding_table = bo->virtual; + memset(binding_table, 0, bo->size); + + for (i = 0; i < NUM_AVC_ILDB_SURFACES; i++) { + binding_table[i] = avc_ildb_context->surface[i].ss_bo->offset; + dri_bo_emit_reloc(bo, + I915_GEM_DOMAIN_INSTRUCTION, 0, + 0, + i * sizeof(*binding_table), + avc_ildb_context->surface[i].ss_bo); + } + + dri_bo_unmap(bo); +} + +static void +i965_avc_ildb_interface_descriptor_table(VADriverContextP ctx) +{ + struct i965_driver_data *i965 = i965_driver_data(ctx); + struct i965_media_state *media_state = &i965->media_state; + struct i965_h264_context *i965_h264_context = (struct i965_h264_context *)media_state->private_context; + struct i965_avc_ildb_context *avc_ildb_context = &i965_h264_context->avc_ildb_context; + struct i965_interface_descriptor *desc; + dri_bo *bo; + int i; + + bo = avc_ildb_context->idrt.bo; + dri_bo_map(bo, 1); + assert(bo->virtual); + desc = bo->virtual; + + for (i = 0; i < NUM_AVC_ILDB_INTERFACES; i++) { + int kernel_offset = avc_ildb_kernel_offset[i]; + memset(desc, 0, sizeof(*desc)); + desc->desc0.grf_reg_blocks = 7; + desc->desc0.kernel_start_pointer = (h264_avc_kernels[H264_AVC_COMBINED].bo->offset + kernel_offset) >> 6; /* reloc */ + desc->desc1.const_urb_entry_read_offset = 0; + desc->desc1.const_urb_entry_read_len = ((i == AVC_ILDB_ROOT_Y_ILDB_FRAME || + i == AVC_ILDB_ROOT_Y_ILDB_FIELD || + i == AVC_ILDB_ROOT_Y_ILDB_MBAFF) ? 1 : 0); + desc->desc3.binding_table_entry_count = 0; + desc->desc3.binding_table_pointer = + avc_ildb_context->binding_table.bo->offset >> 5; /*reloc */ + + dri_bo_emit_reloc(bo, + I915_GEM_DOMAIN_INSTRUCTION, 0, + desc->desc0.grf_reg_blocks + kernel_offset, + i * sizeof(*desc) + offsetof(struct i965_interface_descriptor, desc0), + h264_avc_kernels[H264_AVC_COMBINED].bo); + + dri_bo_emit_reloc(bo, + I915_GEM_DOMAIN_INSTRUCTION, 0, + desc->desc3.binding_table_entry_count, + i * sizeof(*desc) + offsetof(struct i965_interface_descriptor, desc3), + avc_ildb_context->binding_table.bo); + desc++; + } + + dri_bo_unmap(bo); +} + +static void +i965_avc_ildb_vfe_state(VADriverContextP ctx) +{ + struct i965_driver_data *i965 = i965_driver_data(ctx); + struct i965_media_state *media_state = &i965->media_state; + struct i965_h264_context *i965_h264_context = (struct i965_h264_context *)media_state->private_context; + struct i965_avc_ildb_context *avc_ildb_context = &i965_h264_context->avc_ildb_context; + struct i965_vfe_state *vfe_state; + dri_bo *bo; + + bo = avc_ildb_context->vfe_state.bo; + dri_bo_map(bo, 1); + assert(bo->virtual); + vfe_state = bo->virtual; + memset(vfe_state, 0, sizeof(*vfe_state)); + vfe_state->vfe1.max_threads = 0; + vfe_state->vfe1.urb_entry_alloc_size = avc_ildb_context->urb.size_vfe_entry - 1; + vfe_state->vfe1.num_urb_entries = avc_ildb_context->urb.num_vfe_entries; + vfe_state->vfe1.vfe_mode = VFE_GENERIC_MODE; + vfe_state->vfe1.children_present = 1; + vfe_state->vfe2.interface_descriptor_base = + avc_ildb_context->idrt.bo->offset >> 4; /* reloc */ + dri_bo_emit_reloc(bo, + I915_GEM_DOMAIN_INSTRUCTION, 0, + 0, + offsetof(struct i965_vfe_state, vfe2), + avc_ildb_context->idrt.bo); + dri_bo_unmap(bo); +} + +static void +i965_avc_ildb_upload_constants(VADriverContextP ctx, struct decode_state *decode_state) +{ + struct i965_driver_data *i965 = i965_driver_data(ctx); + struct i965_media_state *media_state = &i965->media_state; + struct i965_h264_context *i965_h264_context = (struct i965_h264_context *)media_state->private_context; + struct i965_avc_ildb_context *avc_ildb_context = &i965_h264_context->avc_ildb_context; + VAPictureParameterBufferH264 *pic_param; + struct avc_ildb_root_input *root_input; + + assert(decode_state->pic_param && decode_state->pic_param->buffer); + pic_param = (VAPictureParameterBufferH264 *)decode_state->pic_param->buffer; + + dri_bo_map(avc_ildb_context->curbe.bo, 1); + assert(avc_ildb_context->curbe.bo->virtual); + root_input = avc_ildb_context->curbe.bo->virtual; + + if (IS_IRONLAKE(i965->intel.device_id)) { + root_input->max_concurrent_threads = 76; /* 72 - 2 + 8 - 2 */ + } else { + root_input->max_concurrent_threads = 54; /* 50 - 2 + 8 = 2 */ + } + + if (pic_param->pic_fields.bits.field_pic_flag) + root_input->picture_type = PICTURE_FIELD; + else { + if (pic_param->seq_fields.bits.mb_adaptive_frame_field_flag) + root_input->picture_type = PICTURE_MBAFF; + else + root_input->picture_type = PICTURE_FRAME; + } + + avc_ildb_context->picture_type = root_input->picture_type; + root_input->blocks_per_row = pic_param->picture_width_in_mbs_minus1 + 1; + root_input->blocks_per_column = (pic_param->picture_height_in_mbs_minus1 + 1) / + (1 + (root_input->picture_type != PICTURE_FRAME)); + avc_ildb_context->mbs_per_picture = (pic_param->picture_width_in_mbs_minus1 + 1) * + (pic_param->picture_height_in_mbs_minus1 + 1); + + root_input->mbaff_frame_flag = (root_input->picture_type == PICTURE_MBAFF); + root_input->bottom_field_flag = !!(pic_param->CurrPic.flags & VA_PICTURE_H264_BOTTOM_FIELD); + root_input->control_data_expansion_flag = 1; /* Always 1 on G4x+ */ + root_input->chroma_format = (pic_param->seq_fields.bits.chroma_format_idc != 1); /* 0=4:0:0, 1=4:2:0 */ + + root_input->ramp_constant_0 = 0x03020100; + + root_input->ramp_constant_1 = 0x07060504; + + root_input->constant_0 = -2; + root_input->constant_1 = 1; + + dri_bo_unmap(avc_ildb_context->curbe.bo); +} + +static void +i965_avc_ildb_states_setup(VADriverContextP ctx, struct decode_state *decode_state) +{ + i965_avc_ildb_surface_state(ctx, decode_state); + i965_avc_ildb_binding_table(ctx); + i965_avc_ildb_interface_descriptor_table(ctx); + i965_avc_ildb_vfe_state(ctx); + i965_avc_ildb_upload_constants(ctx, decode_state); +} + +static void +i965_avc_ildb_pipeline_select(VADriverContextP ctx) +{ + BEGIN_BATCH(ctx, 1); + OUT_BATCH(ctx, CMD_PIPELINE_SELECT | PIPELINE_SELECT_MEDIA); + ADVANCE_BATCH(ctx); +} + +static void +i965_avc_ildb_urb_layout(VADriverContextP ctx) +{ + struct i965_driver_data *i965 = i965_driver_data(ctx); + struct i965_media_state *media_state = &i965->media_state; + struct i965_h264_context *i965_h264_context = (struct i965_h264_context *)media_state->private_context; + struct i965_avc_ildb_context *avc_ildb_context = &i965_h264_context->avc_ildb_context; + + unsigned int vfe_fence, cs_fence; + + vfe_fence = avc_ildb_context->urb.cs_start; + cs_fence = URB_SIZE((&i965->intel)); + + BEGIN_BATCH(ctx, 3); + OUT_BATCH(ctx, CMD_URB_FENCE | UF0_VFE_REALLOC | UF0_CS_REALLOC | 1); + OUT_BATCH(ctx, 0); + OUT_BATCH(ctx, + (vfe_fence << UF2_VFE_FENCE_SHIFT) | /* VFE_SIZE */ + (cs_fence << UF2_CS_FENCE_SHIFT)); /* CS_SIZE */ + ADVANCE_BATCH(ctx); +} + +static void +i965_avc_ildb_state_base_address(VADriverContextP ctx) +{ + struct i965_driver_data *i965 = i965_driver_data(ctx); + + if (IS_IRONLAKE(i965->intel.device_id)) { + BEGIN_BATCH(ctx, 8); + OUT_BATCH(ctx, CMD_STATE_BASE_ADDRESS | 6); + OUT_BATCH(ctx, 0 | BASE_ADDRESS_MODIFY); + OUT_BATCH(ctx, 0 | BASE_ADDRESS_MODIFY); + OUT_BATCH(ctx, 0 | BASE_ADDRESS_MODIFY); + OUT_BATCH(ctx, 0 | BASE_ADDRESS_MODIFY); + OUT_BATCH(ctx, 0 | BASE_ADDRESS_MODIFY); + OUT_BATCH(ctx, 0 | BASE_ADDRESS_MODIFY); + OUT_BATCH(ctx, 0 | BASE_ADDRESS_MODIFY); + ADVANCE_BATCH(ctx); + } else { + BEGIN_BATCH(ctx, 6); + OUT_BATCH(ctx, CMD_STATE_BASE_ADDRESS | 4); + OUT_BATCH(ctx, 0 | BASE_ADDRESS_MODIFY); + OUT_BATCH(ctx, 0 | BASE_ADDRESS_MODIFY); + OUT_BATCH(ctx, 0 | BASE_ADDRESS_MODIFY); + OUT_BATCH(ctx, 0 | BASE_ADDRESS_MODIFY); + OUT_BATCH(ctx, 0 | BASE_ADDRESS_MODIFY); + ADVANCE_BATCH(ctx); + } +} + +static void +i965_avc_ildb_state_pointers(VADriverContextP ctx) +{ + struct i965_driver_data *i965 = i965_driver_data(ctx); + struct i965_media_state *media_state = &i965->media_state; + struct i965_h264_context *i965_h264_context = (struct i965_h264_context *)media_state->private_context; + struct i965_avc_ildb_context *avc_ildb_context = &i965_h264_context->avc_ildb_context; + + BEGIN_BATCH(ctx, 3); + OUT_BATCH(ctx, CMD_MEDIA_STATE_POINTERS | 1); + OUT_BATCH(ctx, 0); + OUT_RELOC(ctx, avc_ildb_context->vfe_state.bo, I915_GEM_DOMAIN_INSTRUCTION, 0, 0); + ADVANCE_BATCH(ctx); +} + +static void +i965_avc_ildb_cs_urb_layout(VADriverContextP ctx) +{ + struct i965_driver_data *i965 = i965_driver_data(ctx); + struct i965_media_state *media_state = &i965->media_state; + struct i965_h264_context *i965_h264_context = (struct i965_h264_context *)media_state->private_context; + struct i965_avc_ildb_context *avc_ildb_context = &i965_h264_context->avc_ildb_context; + + BEGIN_BATCH(ctx, 2); + OUT_BATCH(ctx, CMD_CS_URB_STATE | 0); + OUT_BATCH(ctx, + ((avc_ildb_context->urb.size_cs_entry - 1) << 4) | /* URB Entry Allocation Size */ + (avc_ildb_context->urb.num_cs_entries << 0)); /* Number of URB Entries */ + ADVANCE_BATCH(ctx); +} + +static void +i965_avc_ildb_constant_buffer(VADriverContextP ctx) +{ + struct i965_driver_data *i965 = i965_driver_data(ctx); + struct i965_media_state *media_state = &i965->media_state; + struct i965_h264_context *i965_h264_context = (struct i965_h264_context *)media_state->private_context; + struct i965_avc_ildb_context *avc_ildb_context = &i965_h264_context->avc_ildb_context; + + BEGIN_BATCH(ctx, 2); + OUT_BATCH(ctx, CMD_CONSTANT_BUFFER | (1 << 8) | (2 - 2)); + OUT_RELOC(ctx, avc_ildb_context->curbe.bo, + I915_GEM_DOMAIN_INSTRUCTION, 0, + avc_ildb_context->urb.size_cs_entry - 1); + ADVANCE_BATCH(ctx); +} + +static void +i965_avc_ildb_objects(VADriverContextP ctx) +{ + struct i965_driver_data *i965 = i965_driver_data(ctx); + struct i965_media_state *media_state = &i965->media_state; + struct i965_h264_context *i965_h264_context = (struct i965_h264_context *)media_state->private_context; + struct i965_avc_ildb_context *avc_ildb_context = &i965_h264_context->avc_ildb_context; + + BEGIN_BATCH(ctx, 6); + OUT_BATCH(ctx, CMD_MEDIA_OBJECT | 4); + + switch (avc_ildb_context->picture_type) { + case PICTURE_FRAME: + OUT_BATCH(ctx, AVC_ILDB_ROOT_Y_ILDB_FRAME); + break; + + case PICTURE_FIELD: + OUT_BATCH(ctx, AVC_ILDB_ROOT_Y_ILDB_FIELD); + break; + + case PICTURE_MBAFF: + OUT_BATCH(ctx, AVC_ILDB_ROOT_Y_ILDB_MBAFF); + break; + + default: + assert(0); + OUT_BATCH(ctx, 0); + break; + } + + OUT_BATCH(ctx, 0); /* no indirect data */ + OUT_BATCH(ctx, 0); + OUT_BATCH(ctx, 0); + OUT_BATCH(ctx, 0); + ADVANCE_BATCH(ctx); +} + +static void +i965_avc_ildb_pipeline_setup(VADriverContextP ctx) +{ + intel_batchbuffer_emit_mi_flush(ctx); + i965_avc_ildb_pipeline_select(ctx); + i965_avc_ildb_state_base_address(ctx); + i965_avc_ildb_state_pointers(ctx); + i965_avc_ildb_urb_layout(ctx); + i965_avc_ildb_cs_urb_layout(ctx); + i965_avc_ildb_constant_buffer(ctx); + i965_avc_ildb_objects(ctx); +} + +void +i965_avc_ildb(VADriverContextP ctx, struct decode_state *decode_state) +{ + struct i965_driver_data *i965 = i965_driver_data(ctx); + struct i965_media_state *media_state = &i965->media_state; + struct i965_h264_context *i965_h264_context = (struct i965_h264_context *)media_state->private_context; + + if (i965_h264_context->enable_avc_ildb) { + i965_avc_ildb_states_setup(ctx, decode_state); + i965_avc_ildb_pipeline_setup(ctx); + } +} + +void +i965_avc_ildb_decode_init(VADriverContextP ctx) +{ + struct i965_driver_data *i965 = i965_driver_data(ctx); + struct i965_media_state *media_state = &i965->media_state; + struct i965_h264_context *i965_h264_context = (struct i965_h264_context *)media_state->private_context; + struct i965_avc_ildb_context *avc_ildb_context = &i965_h264_context->avc_ildb_context;; + dri_bo *bo; + int i; + + dri_bo_unreference(avc_ildb_context->curbe.bo); + bo = dri_bo_alloc(i965->intel.bufmgr, + "constant buffer", + 4096, 64); + assert(bo); + avc_ildb_context->curbe.bo = bo; + + dri_bo_unreference(avc_ildb_context->binding_table.bo); + bo = dri_bo_alloc(i965->intel.bufmgr, + "binding table", + NUM_AVC_ILDB_SURFACES * sizeof(unsigned int), 32); + assert(bo); + avc_ildb_context->binding_table.bo = bo; + + dri_bo_unreference(avc_ildb_context->idrt.bo); + bo = dri_bo_alloc(i965->intel.bufmgr, + "interface discriptor", + NUM_AVC_ILDB_INTERFACES * sizeof(struct i965_interface_descriptor), 16); + assert(bo); + avc_ildb_context->idrt.bo = bo; + + dri_bo_unreference(avc_ildb_context->vfe_state.bo); + bo = dri_bo_alloc(i965->intel.bufmgr, + "vfe state", + sizeof(struct i965_vfe_state), 32); + assert(bo); + avc_ildb_context->vfe_state.bo = bo; + + avc_ildb_context->urb.num_vfe_entries = 1; + avc_ildb_context->urb.size_vfe_entry = 640; + avc_ildb_context->urb.num_cs_entries = 1; + avc_ildb_context->urb.size_cs_entry = 1; + avc_ildb_context->urb.vfe_start = 0; + avc_ildb_context->urb.cs_start = avc_ildb_context->urb.vfe_start + + avc_ildb_context->urb.num_vfe_entries * avc_ildb_context->urb.size_vfe_entry; + assert(avc_ildb_context->urb.cs_start + + avc_ildb_context->urb.num_cs_entries * avc_ildb_context->urb.size_cs_entry <= URB_SIZE((&i965->intel))); + + for (i = 0; i < NUM_AVC_ILDB_SURFACES; i++) { + dri_bo_unreference(avc_ildb_context->surface[i].s_bo); + avc_ildb_context->surface[i].s_bo = NULL; + + dri_bo_unreference(avc_ildb_context->surface[i].ss_bo); + bo = dri_bo_alloc(i965->intel.bufmgr, + "surface state", + sizeof(struct i965_surface_state), 32); + assert(bo); + avc_ildb_context->surface[i].ss_bo = bo; + } + + /* kernel offset */ + assert(NUM_AVC_ILDB_INTERFACES == ARRAY_ELEMS(avc_ildb_kernel_offset_gen5)); + + if (IS_IRONLAKE(i965->intel.device_id)) { + avc_ildb_kernel_offset = avc_ildb_kernel_offset_gen5; + } else { + avc_ildb_kernel_offset = avc_ildb_kernel_offset_gen4; + } +} + +Bool +i965_avc_ildb_ternimate(struct i965_avc_ildb_context *avc_ildb_context) +{ + int i; + + dri_bo_unreference(avc_ildb_context->curbe.bo); + avc_ildb_context->curbe.bo = NULL; + + dri_bo_unreference(avc_ildb_context->binding_table.bo); + avc_ildb_context->binding_table.bo = NULL; + + dri_bo_unreference(avc_ildb_context->idrt.bo); + avc_ildb_context->idrt.bo = NULL; + + dri_bo_unreference(avc_ildb_context->vfe_state.bo); + avc_ildb_context->vfe_state.bo = NULL; + + for (i = 0; i < NUM_AVC_ILDB_SURFACES; i++) { + dri_bo_unreference(avc_ildb_context->surface[i].ss_bo); + avc_ildb_context->surface[i].ss_bo = NULL; + + dri_bo_unreference(avc_ildb_context->surface[i].s_bo); + avc_ildb_context->surface[i].s_bo = NULL; + } + + return True; +} diff -Nru libva-1.0.1/i965_drv_video/i965_avc_ildb.h libva-1.0.1-3+0.31.1/i965_drv_video/i965_avc_ildb.h --- libva-1.0.1/i965_drv_video/i965_avc_ildb.h 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/i965_avc_ildb.h 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,96 @@ +/* + * Copyright © 2010 Intel Corporation + * + * 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, sub license, 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 (including the + * next paragraph) 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 NON-INFRINGEMENT. + * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * Authors: + * Xiang Haihao + * + */ + +#ifndef __I965_AVC_ILDB_H__ +#define __I965_AVC_ILDB_H__ + +#define SURFACE_EDGE_CONTROL_DATA 0 +#define SURFACE_SRC_Y 1 +#define SURFACE_SRC_UV 2 +#define SURFACE_DEST_Y 3 +#define SURFACE_DEST_UV 4 + +#define NUM_AVC_ILDB_SURFACES 5 + +#define EDGE_CONTROL_DATA_IN_DWS 16 +#define EDGE_CONTROL_DATA_IN_BTYES 64 + +struct i965_avc_ildb_context +{ + struct { + dri_bo *bo; + } curbe; + + struct { + dri_bo *ss_bo; + dri_bo *s_bo; + unsigned long offset; + int surface_type; + int width; + int height; + int depth; + int pitch; + int format; + int vert_line_stride; + int vert_line_stride_ofs; + int is_target; + } surface[NUM_AVC_ILDB_SURFACES]; + + struct { + dri_bo *bo; + } binding_table; + + struct { + dri_bo *bo; + } idrt; + + struct { + dri_bo *bo; + } vfe_state; + + struct { + unsigned int vfe_start; + unsigned int cs_start; + + unsigned int num_vfe_entries; + unsigned int num_cs_entries; + + unsigned int size_vfe_entry; + unsigned int size_cs_entry; + } urb; + + int picture_type; + int mbs_per_picture; +}; + +void i965_avc_ildb(VADriverContextP, struct decode_state *); +void i965_avc_ildb_decode_init(VADriverContextP); +Bool i965_avc_ildb_ternimate(struct i965_avc_ildb_context *); + +#endif /* __I965_AVC_ILDB_H__ */ + diff -Nru libva-1.0.1/i965_drv_video/i965_defines.h libva-1.0.1-3+0.31.1/i965_drv_video/i965_defines.h --- libva-1.0.1/i965_drv_video/i965_defines.h 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/i965_defines.h 2010-07-07 12:20:29.000000000 +0000 @@ -20,6 +20,13 @@ #define CMD_MEDIA_OBJECT CMD(2, 1, 0) #define CMD_MEDIA_OBJECT_EX CMD(2, 1, 1) +#define CMD_AVC_BSD_IMG_STATE CMD(2, 4, 0) +#define CMD_AVC_BSD_QM_STATE CMD(2, 4, 1) +#define CMD_AVC_BSD_SLICE_STATE CMD(2, 4, 2) +#define CMD_AVC_BSD_BUF_BASE_STATE CMD(2, 4, 3) +#define CMD_BSD_IND_OBJ_BASE_ADDR CMD(2, 4, 4) +#define CMD_AVC_BSD_OBJECT CMD(2, 4, 8) + #define CMD_PIPELINED_POINTERS CMD(3, 0, 0) #define CMD_BINDING_TABLE_POINTERS CMD(3, 0, 1) #define CMD_VERTEX_BUFFERS CMD(3, 0, 8) @@ -28,6 +35,9 @@ #define CMD_CONSTANT_COLOR CMD(3, 1, 1) #define CMD_3DPRIMITIVE CMD(3, 3, 0) +#define CMD_DEPTH_BUFFER CMD(3, 1, 5) +#define I965_DEPTHFORMAT_D32_FLOAT 1 + #define BASE_ADDRESS_MODIFY (1 << 0) #define PIPELINE_SELECT_3D 0 @@ -321,6 +331,32 @@ #define I965_TILEWALK_XMAJOR 0 #define I965_TILEWALK_YMAJOR 1 -#define URB_SIZE(intel) (IS_IGDNG(intel->device_id) ? 1024 : \ +#define SCAN_RASTER_ORDER 0 +#define SCAN_SPECIAL_ORDER 1 + +#define ENTROPY_CAVLD 0 +#define ENTROPY_CABAC 1 + +#define SLICE_TYPE_P 0 +#define SLICE_TYPE_B 1 +#define SLICE_TYPE_I 2 +#define SLICE_TYPE_SP 3 +#define SLICE_TYPE_SI 4 + +#define PRESENT_REF_LIST0 (1 << 0) +#define PRESENT_REF_LIST1 (1 << 1) +#define PRESENT_WEIGHT_OFFSET_L0 (1 << 2) +#define PRESENT_WEIGHT_OFFSET_L1 (1 << 3) + +#define RESIDUAL_DATA_OFFSET 48 + +#define PRESENT_NOMV 0 +#define PRESENT_NOWO 1 +#define PRESENT_MV_WO 3 + +#define SCOREBOARD_STALLING 0 +#define SCOREBOARD_NON_STALLING 1 + +#define URB_SIZE(intel) (IS_IRONLAKE(intel->device_id) ? 1024 : \ IS_G4X(intel->device_id) ? 384 : 256) #endif /* _I965_DEFINES_H_ */ diff -Nru libva-1.0.1/i965_drv_video/i965_drv_video.c libva-1.0.1-3+0.31.1/i965_drv_video/i965_drv_video.c --- libva-1.0.1/i965_drv_video/i965_drv_video.c 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/i965_drv_video.c 2010-07-13 11:53:35.000000000 +0000 @@ -27,11 +27,11 @@ * */ +#include #include #include -#include "va_backend.h" -#include "va_dricommon.h" +#include "va/x11/va_dricommon.h" #include "intel_driver.h" #include "intel_memman.h" @@ -54,6 +54,22 @@ I965_SURFACETYPE_INDEXED }; +/* List of supported image formats */ +typedef struct { + unsigned int type; + VAImageFormat va_format; +} i965_image_format_map_t; + +static const i965_image_format_map_t +i965_image_formats_map[I965_MAX_IMAGE_FORMATS + 1] = { + { I965_SURFACETYPE_YUV, + { VA_FOURCC('Y','V','1','2'), VA_LSB_FIRST, 12, } }, + { I965_SURFACETYPE_YUV, + { VA_FOURCC('I','4','2','0'), VA_LSB_FIRST, 12, } }, + { I965_SURFACETYPE_YUV, + { VA_FOURCC('N','V','1','2'), VA_LSB_FIRST, 12, } }, +}; + /* List of supported subpicture formats */ typedef struct { unsigned int type; @@ -70,13 +86,21 @@ { I965_SURFACETYPE_INDEXED, I965_SURFACEFORMAT_A4P4_UNORM, { VA_FOURCC('A','I','4','4'), VA_MSB_FIRST, 8, }, 0 }, + { I965_SURFACETYPE_RGBA, I965_SURFACEFORMAT_B8G8R8A8_UNORM, + { VA_FOURCC('B','G','R','A'), VA_LSB_FIRST, 32, + 32, 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000 }, + 0 }, + { I965_SURFACETYPE_RGBA, I965_SURFACEFORMAT_R8G8B8A8_UNORM, + { VA_FOURCC('R','G','B','A'), VA_LSB_FIRST, 32, + 32, 0x000000ff, 0x0000ff00, 0x00ff0000, 0xff000000 }, + 0 }, }; static const i965_subpic_format_map_t * get_subpic_format(const VAImageFormat *va_format) { unsigned int i; - for (i = 0; i < sizeof(i965_subpic_formats_map)/sizeof(i965_subpic_formats_map[0]); i++) { + for (i = 0; i965_subpic_formats_map[i].type != 0; i++) { const i965_subpic_format_map_t * const m = &i965_subpic_formats_map[i]; if (m->va_format.fourcc == va_format->fourcc && (m->type == I965_SURFACETYPE_RGBA ? @@ -99,6 +123,9 @@ profile_list[i++] = VAProfileMPEG2Simple; profile_list[i++] = VAProfileMPEG2Main; + profile_list[i++] = VAProfileH264Baseline; + profile_list[i++] = VAProfileH264Main; + profile_list[i++] = VAProfileH264High; /* If the assert fails then I965_MAX_PROFILES needs to be bigger */ assert(i <= I965_MAX_PROFILES); @@ -122,6 +149,13 @@ entrypoint_list[0] = VAEntrypointVLD; break; + case VAProfileH264Baseline: + case VAProfileH264Main: + case VAProfileH264High: + *num_entrypoints = 1; + entrypoint_list[0] = VAEntrypointVLD; + break; + default: vaStatus = VA_STATUS_ERROR_UNSUPPORTED_PROFILE; *num_entrypoints = 0; @@ -217,6 +251,17 @@ } break; + case VAProfileH264Baseline: + case VAProfileH264Main: + case VAProfileH264High: + if (VAEntrypointVLD == entrypoint) { + vaStatus = VA_STATUS_SUCCESS; + } else { + vaStatus = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT; + } + + break; + default: vaStatus = VA_STATUS_ERROR_UNSUPPORTED_PROFILE; break; @@ -305,6 +350,12 @@ dri_bo_unreference(obj_surface->bo); obj_surface->bo = NULL; + + if (obj_surface->free_private_data != NULL) { + obj_surface->free_private_data(&obj_surface->private_data); + obj_surface->private_data = NULL; + } + object_heap_free(heap, obj); } @@ -337,19 +388,15 @@ surfaces[i] = surfaceID; obj_surface->status = VASurfaceReady; obj_surface->subpic = VA_INVALID_ID; - obj_surface->width = width; - obj_surface->height = height; - obj_surface->size = SIZE_YUV420(width, height); - obj_surface->bo = dri_bo_alloc(i965->intel.bufmgr, - "vaapi surface", - obj_surface->size, - 64); - - assert(obj_surface->bo); - if (NULL == obj_surface->bo) { - vaStatus = VA_STATUS_ERROR_UNKNOWN; - break; - } + obj_surface->orig_width = width; + obj_surface->orig_height = height; + obj_surface->width = ALIGN(obj_surface->orig_width, 16); + obj_surface->height = ALIGN(obj_surface->orig_height, 16); + obj_surface->size = SIZE_YUV420(obj_surface->width, obj_surface->height); + obj_surface->flags = SURFACE_REFERENCED; + obj_surface->bo = NULL; + obj_surface->private_data = NULL; + obj_surface->free_private_data = NULL; } /* Error recovery */ @@ -390,24 +437,32 @@ VAImageFormat *format_list, /* out */ int *num_formats) /* out */ { + int n; + + for (n = 0; i965_image_formats_map[n].va_format.fourcc != 0; n++) { + const i965_image_format_map_t * const m = &i965_image_formats_map[n]; + if (format_list) + format_list[n] = m->va_format; + } + if (num_formats) - *num_formats = 0; + *num_formats = n; return VA_STATUS_SUCCESS; } VAStatus i965_PutImage(VADriverContextP ctx, - VASurfaceID surface, - VAImageID image, - int src_x, - int src_y, - unsigned int src_width, - unsigned int src_height, - int dest_x, - int dest_y, - unsigned int dest_width, - unsigned int dest_height) + VASurfaceID surface, + VAImageID image, + int src_x, + int src_y, + unsigned int src_width, + unsigned int src_height, + int dest_x, + int dest_y, + unsigned int dest_width, + unsigned int dest_height) { return VA_STATUS_SUCCESS; } @@ -450,7 +505,7 @@ struct i965_driver_data *i965 = i965_driver_data(ctx); VASubpictureID subpicID = NEW_SUBPIC_ID() - struct object_subpic *obj_subpic = SUBPIC(subpicID); + struct object_subpic *obj_subpic = SUBPIC(subpicID); if (!obj_subpic) return VA_STATUS_ERROR_ALLOCATION_FAILED; @@ -467,6 +522,7 @@ obj_subpic->format = m->format; obj_subpic->width = obj_image->image.width; obj_subpic->height = obj_image->image.height; + obj_subpic->pitch = obj_image->image.pitches[0]; obj_subpic->bo = obj_image->bo; return VA_STATUS_SUCCESS; } @@ -487,7 +543,8 @@ VASubpictureID subpicture, VAImageID image) { - return VA_STATUS_SUCCESS; + /* TODO */ + return VA_STATUS_ERROR_UNIMPLEMENTED; } VAStatus @@ -497,7 +554,8 @@ unsigned int chromakey_max, unsigned int chromakey_mask) { - return VA_STATUS_SUCCESS; + /* TODO */ + return VA_STATUS_ERROR_UNIMPLEMENTED; } VAStatus @@ -505,7 +563,8 @@ VASubpictureID subpicture, float global_alpha) { - return VA_STATUS_SUCCESS; + /* TODO */ + return VA_STATUS_ERROR_UNIMPLEMENTED; } VAStatus @@ -608,12 +667,23 @@ i965_destroy_context(struct object_heap *heap, struct object_base *obj) { struct object_context *obj_context = (struct object_context *)obj; + int i; + + assert(obj_context->decode_state.num_slice_params <= obj_context->decode_state.max_slice_params); + assert(obj_context->decode_state.num_slice_datas <= obj_context->decode_state.max_slice_datas); i965_release_buffer_store(&obj_context->decode_state.pic_param); - i965_release_buffer_store(&obj_context->decode_state.slice_param); i965_release_buffer_store(&obj_context->decode_state.iq_matrix); i965_release_buffer_store(&obj_context->decode_state.bit_plane); - i965_release_buffer_store(&obj_context->decode_state.slice_data); + + for (i = 0; i < obj_context->decode_state.num_slice_params; i++) + i965_release_buffer_store(&obj_context->decode_state.slice_params[i]); + + for (i = 0; i < obj_context->decode_state.num_slice_datas; i++) + i965_release_buffer_store(&obj_context->decode_state.slice_datas[i]); + + free(obj_context->decode_state.slice_params); + free(obj_context->decode_state.slice_datas); free(obj_context->render_targets); object_heap_free(heap, obj); } @@ -629,6 +699,7 @@ VAContextID *context) /* out */ { struct i965_driver_data *i965 = i965_driver_data(ctx); + struct i965_render_state *render_state = &i965->render_state; struct object_config *obj_config = CONFIG(config_id); struct object_context *obj_context = NULL; VAStatus vaStatus = VA_STATUS_SUCCESS; @@ -650,10 +721,26 @@ return vaStatus; } + switch (obj_config->profile) { + case VAProfileH264Baseline: + case VAProfileH264Main: + case VAProfileH264High: + render_state->interleaved_uv = 1; + break; + default: + render_state->interleaved_uv = 0; + } + obj_context->context_id = contextID; *context = contextID; memset(&obj_context->decode_state, 0, sizeof(obj_context->decode_state)); obj_context->decode_state.current_render_target = -1; + obj_context->decode_state.max_slice_params = NUM_SLICES; + obj_context->decode_state.max_slice_datas = NUM_SLICES; + obj_context->decode_state.slice_params = calloc(obj_context->decode_state.max_slice_params, + sizeof(*obj_context->decode_state.slice_params)); + obj_context->decode_state.slice_datas = calloc(obj_context->decode_state.max_slice_datas, + sizeof(*obj_context->decode_state.slice_datas)); obj_context->config_id = config_id; obj_context->picture_width = picture_width; obj_context->picture_height = picture_height; @@ -753,8 +840,8 @@ if (type == VASliceDataBufferType || type == VAImageBufferType) { buffer_store->bo = dri_bo_alloc(i965->intel.bufmgr, - "Buffer", - size * num_elements, 64); + "Buffer", + size * num_elements, 64); assert(buffer_store->bo); if (data) @@ -767,6 +854,7 @@ memcpy(buffer_store->buffer, data, size * num_elements); } + buffer_store->num_elements = obj_buffer->num_elements; i965_reference_buffer_store(&obj_buffer->buffer_store, buffer_store); i965_release_buffer_store(&buffer_store); *buf_id = bufferID; @@ -881,6 +969,12 @@ vaStatus = VA_STATUS_SUCCESS; break; + case VAProfileH264Baseline: + case VAProfileH264Main: + case VAProfileH264High: + vaStatus = VA_STATUS_SUCCESS; + break; + default: assert(0); vaStatus = VA_STATUS_ERROR_UNSUPPORTED_PROFILE; @@ -929,7 +1023,7 @@ assert(obj_buffer->buffer_store->buffer); i965_release_buffer_store(&obj_context->decode_state.bit_plane); i965_reference_buffer_store(&obj_context->decode_state.bit_plane, - obj_buffer->buffer_store); + obj_buffer->buffer_store); return VA_STATUS_SUCCESS; } @@ -941,10 +1035,18 @@ { assert(obj_buffer->buffer_store->bo == NULL); assert(obj_buffer->buffer_store->buffer); - i965_release_buffer_store(&obj_context->decode_state.slice_param); - i965_reference_buffer_store(&obj_context->decode_state.slice_param, + + if (obj_context->decode_state.num_slice_params == obj_context->decode_state.max_slice_params) { + obj_context->decode_state.slice_params = realloc(obj_context->decode_state.slice_params, + (obj_context->decode_state.max_slice_params + NUM_SLICES) * sizeof(*obj_context->decode_state.slice_params)); + memset(obj_context->decode_state.slice_params + obj_context->decode_state.max_slice_params, 0, NUM_SLICES * sizeof(*obj_context->decode_state.slice_params)); + obj_context->decode_state.max_slice_params += NUM_SLICES; + } + + i965_release_buffer_store(&obj_context->decode_state.slice_params[obj_context->decode_state.num_slice_params]); + i965_reference_buffer_store(&obj_context->decode_state.slice_params[obj_context->decode_state.num_slice_params], obj_buffer->buffer_store); - obj_context->decode_state.num_slices = obj_buffer->num_elements; + obj_context->decode_state.num_slice_params++; return VA_STATUS_SUCCESS; } @@ -956,9 +1058,18 @@ { assert(obj_buffer->buffer_store->buffer == NULL); assert(obj_buffer->buffer_store->bo); - i965_release_buffer_store(&obj_context->decode_state.slice_data); - i965_reference_buffer_store(&obj_context->decode_state.slice_data, + + if (obj_context->decode_state.num_slice_datas == obj_context->decode_state.max_slice_datas) { + obj_context->decode_state.slice_datas = realloc(obj_context->decode_state.slice_datas, + (obj_context->decode_state.max_slice_datas + NUM_SLICES) * sizeof(*obj_context->decode_state.slice_datas)); + memset(obj_context->decode_state.slice_datas + obj_context->decode_state.max_slice_datas, 0, NUM_SLICES * sizeof(*obj_context->decode_state.slice_datas)); + obj_context->decode_state.max_slice_datas += NUM_SLICES; + } + + i965_release_buffer_store(&obj_context->decode_state.slice_datas[obj_context->decode_state.num_slice_datas]); + i965_reference_buffer_store(&obj_context->decode_state.slice_datas[obj_context->decode_state.num_slice_datas], obj_buffer->buffer_store); + obj_context->decode_state.num_slice_datas++; return VA_STATUS_SUCCESS; } @@ -1017,23 +1128,30 @@ struct object_context *obj_context = CONTEXT(context); struct object_config *obj_config; VAContextID config; + int i; assert(obj_context); assert(obj_context->decode_state.pic_param); - assert(obj_context->decode_state.slice_param); - assert(obj_context->decode_state.slice_data); + assert(obj_context->decode_state.num_slice_params >= 1); + assert(obj_context->decode_state.num_slice_datas >= 1); + assert(obj_context->decode_state.num_slice_params == obj_context->decode_state.num_slice_datas); config = obj_context->config_id; obj_config = CONFIG(config); assert(obj_config); + i965_media_decode_picture(ctx, obj_config->profile, &obj_context->decode_state); obj_context->decode_state.current_render_target = -1; - obj_context->decode_state.num_slices = 0; + obj_context->decode_state.num_slice_params = 0; + obj_context->decode_state.num_slice_datas = 0; i965_release_buffer_store(&obj_context->decode_state.pic_param); - i965_release_buffer_store(&obj_context->decode_state.slice_param); i965_release_buffer_store(&obj_context->decode_state.iq_matrix); i965_release_buffer_store(&obj_context->decode_state.bit_plane); - i965_release_buffer_store(&obj_context->decode_state.slice_data); + + for (i = 0; i < obj_context->decode_state.num_slice_params; i++) { + i965_release_buffer_store(&obj_context->decode_state.slice_params[i]); + i965_release_buffer_store(&obj_context->decode_state.slice_datas[i]); + } return VA_STATUS_SUCCESS; } @@ -1094,7 +1212,7 @@ int num_attributes) { /* TODO */ - return VA_STATUS_ERROR_UNKNOWN; + return VA_STATUS_ERROR_UNIMPLEMENTED; } /* @@ -1109,7 +1227,7 @@ int num_attributes) { /* TODO */ - return VA_STATUS_ERROR_UNKNOWN; + return VA_STATUS_ERROR_UNIMPLEMENTED; } VAStatus @@ -1119,7 +1237,7 @@ unsigned int *stride) /* out */ { /* TODO */ - return VA_STATUS_ERROR_UNKNOWN; + return VA_STATUS_ERROR_UNIMPLEMENTED; } static VAStatus @@ -1131,7 +1249,7 @@ return VA_STATUS_ERROR_UNKNOWN; if (!IS_G4X(i965->intel.device_id) && - !IS_IGDNG(i965->intel.device_id)) + !IS_IRONLAKE(i965->intel.device_id)) return VA_STATUS_ERROR_UNKNOWN; if (i965_media_init(ctx) == False) @@ -1218,6 +1336,43 @@ image->component_order[1] = 'G'; image->component_order[2] = 'B'; break; + case VA_FOURCC('A','R','G','B'): + case VA_FOURCC('A','B','G','R'): + case VA_FOURCC('B','G','R','A'): + case VA_FOURCC('R','G','B','A'): + image->num_planes = 1; + image->pitches[0] = width * 4; + image->offsets[0] = 0; + image->data_size = image->offsets[0] + image->pitches[0] * height; + break; + case VA_FOURCC('Y','V','1','2'): + image->num_planes = 3; + image->pitches[0] = width; + image->offsets[0] = 0; + image->pitches[1] = width2; + image->offsets[1] = size + size2; + image->pitches[2] = width2; + image->offsets[2] = size; + image->data_size = size + 2 * size2; + break; + case VA_FOURCC('I','4','2','0'): + image->num_planes = 3; + image->pitches[0] = width; + image->offsets[0] = 0; + image->pitches[1] = width2; + image->offsets[1] = size; + image->pitches[2] = width2; + image->offsets[2] = size + size2; + image->data_size = size + 2 * size2; + break; + case VA_FOURCC('N','V','1','2'): + image->num_planes = 2; + image->pitches[0] = width; + image->offsets[0] = 0; + image->pitches[1] = width; + image->offsets[1] = size; + image->data_size = size + 2 * size2; + break; default: goto error; } @@ -1243,7 +1398,7 @@ *out_image = *image; return VA_STATUS_SUCCESS; - error: +error: i965_DestroyImage(ctx, image_id); return va_status; } @@ -1252,7 +1407,8 @@ VASurfaceID surface, VAImage *image) /* out */ { - return VA_STATUS_SUCCESS; + /* TODO */ + return VA_STATUS_ERROR_OPERATION_FAILED; } static void @@ -1309,10 +1465,113 @@ for (i = 0; i < obj_image->image.num_palette_entries; i++) obj_image->palette[i] = (((unsigned int)palette[3*i + 0] << 16) | ((unsigned int)palette[3*i + 1] << 8) | - (unsigned int)palette[3*i + 2]); + (unsigned int)palette[3*i + 2]); return VA_STATUS_SUCCESS; } +static inline void +memcpy_pic(uint8_t *dst, unsigned int dst_stride, + const uint8_t *src, unsigned int src_stride, + unsigned int len, unsigned int height) +{ + unsigned int i; + + for (i = 0; i < height; i++) { + memcpy(dst, src, len); + dst += dst_stride; + src += src_stride; + } +} + +static void +get_image_i420(struct object_image *obj_image, uint8_t *image_data, + struct object_surface *obj_surface, + const VARectangle *rect) +{ + uint8_t *dst[3], *src[3]; + const int Y = 0; + const int U = obj_image->image.format.fourcc == VA_FOURCC_YV12 ? 2 : 1; + const int V = obj_image->image.format.fourcc == VA_FOURCC_YV12 ? 1 : 2; + + if (!obj_surface->bo) + return; + + dri_bo_map(obj_surface->bo, 0); + + if (!obj_surface->bo->virtual) + return; + + /* Dest VA image has either I420 or YV12 format. + Source VA surface alway has I420 format */ + dst[Y] = image_data + obj_image->image.offsets[Y]; + src[0] = (uint8_t *)obj_surface->bo->virtual; + dst[U] = image_data + obj_image->image.offsets[U]; + src[1] = src[0] + obj_surface->width * obj_surface->height; + dst[V] = image_data + obj_image->image.offsets[V]; + src[2] = src[1] + (obj_surface->width / 2) * (obj_surface->height / 2); + + /* Y plane */ + dst[Y] += rect->y * obj_image->image.pitches[Y] + rect->x; + src[0] += rect->y * obj_surface->width + rect->x; + memcpy_pic(dst[Y], obj_image->image.pitches[Y], + src[0], obj_surface->width, + rect->width, rect->height); + + /* U plane */ + dst[U] += (rect->y / 2) * obj_image->image.pitches[U] + rect->x / 2; + src[1] += (rect->y / 2) * obj_surface->width / 2 + rect->x / 2; + memcpy_pic(dst[U], obj_image->image.pitches[U], + src[1], obj_surface->width / 2, + rect->width / 2, rect->height / 2); + + /* V plane */ + dst[V] += (rect->y / 2) * obj_image->image.pitches[V] + rect->x / 2; + src[2] += (rect->y / 2) * obj_surface->width / 2 + rect->x / 2; + memcpy_pic(dst[V], obj_image->image.pitches[V], + src[2], obj_surface->width / 2, + rect->width / 2, rect->height / 2); + + dri_bo_unmap(obj_surface->bo); +} + +static void +get_image_nv12(struct object_image *obj_image, uint8_t *image_data, + struct object_surface *obj_surface, + const VARectangle *rect) +{ + uint8_t *dst[2], *src[2]; + + if (!obj_surface->bo) + return; + + dri_bo_map(obj_surface->bo, 0); + + if (!obj_surface->bo->virtual) + return; + + /* Both dest VA image and source surface have NV12 format */ + dst[0] = image_data + obj_image->image.offsets[0]; + src[0] = (uint8_t *)obj_surface->bo->virtual; + dst[1] = image_data + obj_image->image.offsets[1]; + src[1] = src[0] + obj_surface->width * obj_surface->height; + + /* Y plane */ + dst[0] += rect->y * obj_image->image.pitches[0] + rect->x; + src[0] += rect->y * obj_surface->width + rect->x; + memcpy_pic(dst[0], obj_image->image.pitches[0], + src[0], obj_surface->width, + rect->width, rect->height); + + /* UV plane */ + dst[1] += (rect->y / 2) * obj_image->image.pitches[1] + (rect->x & -2); + src[1] += (rect->y / 2) * obj_surface->width + (rect->x & -2); + memcpy_pic(dst[1], obj_image->image.pitches[1], + src[1], obj_surface->width, + rect->width, rect->height / 2); + + dri_bo_unmap(obj_surface->bo); +} + VAStatus i965_GetImage(VADriverContextP ctx, VASurfaceID surface, @@ -1322,7 +1581,64 @@ unsigned int height, VAImageID image) { - return VA_STATUS_SUCCESS; + struct i965_driver_data *i965 = i965_driver_data(ctx); + struct i965_render_state *render_state = &i965->render_state; + + struct object_surface *obj_surface = SURFACE(surface); + if (!obj_surface) + return VA_STATUS_ERROR_INVALID_SURFACE; + + struct object_image *obj_image = IMAGE(image); + if (!obj_image) + return VA_STATUS_ERROR_INVALID_IMAGE; + + if (x < 0 || y < 0) + return VA_STATUS_ERROR_INVALID_PARAMETER; + if (x + width > obj_surface->orig_width || + y + height > obj_surface->orig_height) + return VA_STATUS_ERROR_INVALID_PARAMETER; + if (x + width > obj_image->image.width || + y + height > obj_image->image.height) + return VA_STATUS_ERROR_INVALID_PARAMETER; + + /* Commit pending operations to the HW */ + intel_batchbuffer_flush(ctx); + + VAStatus va_status; + void *image_data = NULL; + + va_status = i965_MapBuffer(ctx, obj_image->image.buf, &image_data); + if (va_status != VA_STATUS_SUCCESS) + return va_status; + + VARectangle rect; + rect.x = x; + rect.y = y; + rect.width = width; + rect.height = height; + + switch (obj_image->image.format.fourcc) { + case VA_FOURCC('Y','V','1','2'): + case VA_FOURCC('I','4','2','0'): + /* I420 is native format for MPEG-2 decoded surfaces */ + if (render_state->interleaved_uv) + goto operation_failed; + get_image_i420(obj_image, image_data, obj_surface, &rect); + break; + case VA_FOURCC('N','V','1','2'): + /* NV12 is native format for H.264 decoded surfaces */ + if (!render_state->interleaved_uv) + goto operation_failed; + get_image_nv12(obj_image, image_data, obj_surface, &rect); + break; + default: + operation_failed: + va_status = VA_STATUS_ERROR_OPERATION_FAILED; + break; + } + + i965_UnmapBuffer(ctx, obj_image->image.buf); + return va_status; } VAStatus @@ -1348,13 +1664,20 @@ union dri_buffer *buffer; struct intel_region *dest_region; struct object_surface *obj_surface; - int ret; + int ret; uint32_t name; Bool new_region = False; /* Currently don't support DRI1 */ if (dri_state->driConnectedFlag != VA_DRI2) return VA_STATUS_ERROR_UNKNOWN; + /* Some broken sources such as H.264 conformance case FM2_SVA_C + * will get here + */ + obj_surface = SURFACE(surface); + if (obj_surface->bo == NULL) + return VA_STATUS_SUCCESS; + dri_drawable = dri_get_drawable(ctx, draw); assert(dri_drawable); @@ -1396,13 +1719,24 @@ i965_render_put_surface(ctx, surface, srcx, srcy, srcw, srch, destx, desty, destw, desth); - obj_surface = SURFACE(surface); + if(obj_surface->subpic != VA_INVALID_ID) { i965_render_put_subpic(ctx, surface, - srcx, srcy, srcw, srch, - destx, desty, destw, desth); + srcx, srcy, srcw, srch, + destx, desty, destw, desth); } + dri_swap_buffer(ctx, dri_drawable); + obj_surface->flags |= SURFACE_DISPLAYED; + + if (!(obj_surface->flags & SURFACE_REFERENCED)) { + dri_bo_unreference(obj_surface->bo); + obj_surface->bo = NULL; + obj_surface->flags = 0; + + if (obj_surface->free_private_data) + obj_surface->free_private_data(&obj_surface->private_data); + } return VA_STATUS_SUCCESS; } @@ -1526,6 +1860,6 @@ sizeof(struct object_subpic), SUBPIC_ID_OFFSET); assert(result == 0); - + return i965_Init(ctx); } diff -Nru libva-1.0.1/i965_drv_video/i965_drv_video.h libva-1.0.1-3+0.31.1/i965_drv_video/i965_drv_video.h --- libva-1.0.1/i965_drv_video/i965_drv_video.h 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/i965_drv_video.h 2010-07-13 11:53:35.000000000 +0000 @@ -30,7 +30,9 @@ #ifndef _I965_DRV_VIDEO_H_ #define _I965_DRV_VIDEO_H_ -#include "va.h" +#include +#include + #include "object_heap.h" #include "intel_driver.h" @@ -41,8 +43,8 @@ #define I965_MAX_PROFILES 11 #define I965_MAX_ENTRYPOINTS 5 #define I965_MAX_CONFIG_ATTRIBUTES 10 -#define I965_MAX_IMAGE_FORMATS 10 -#define I965_MAX_SUBPIC_FORMATS 2 +#define I965_MAX_IMAGE_FORMATS 3 +#define I965_MAX_SUBPIC_FORMATS 4 #define I965_MAX_DISPLAY_ATTRIBUTES 4 #define I965_STR_VENDOR "i965 Driver 0.1" @@ -51,6 +53,7 @@ unsigned char *buffer; dri_bo *bo; int ref_count; + int num_elements; }; struct object_config @@ -62,15 +65,20 @@ int num_attribs; }; +#define NUM_SLICES 10 + struct decode_state { struct buffer_store *pic_param; - struct buffer_store *slice_param; + struct buffer_store **slice_params; struct buffer_store *iq_matrix; struct buffer_store *bit_plane; - struct buffer_store *slice_data; + struct buffer_store **slice_datas; VASurfaceID current_render_target; - int num_slices; + int max_slice_params; + int max_slice_datas; + int num_slice_params; + int num_slice_datas; }; struct object_context @@ -86,6 +94,9 @@ struct decode_state decode_state; }; +#define SURFACE_REFERENCED (1 << 0) +#define SURFACE_DISPLAYED (1 << 1) + struct object_surface { struct object_base base; @@ -94,7 +105,12 @@ int width; int height; int size; + int orig_width; + int orig_height; + int flags; dri_bo *bo; + void (*free_private_data)(void **data); + void *private_data; }; struct object_buffer @@ -124,11 +140,10 @@ unsigned int format; int width; int height; + int pitch; dri_bo *bo; }; - - struct i965_driver_data { struct intel_driver_data intel; diff -Nru libva-1.0.1/i965_drv_video/i965_media.c libva-1.0.1-3+0.31.1/i965_drv_video/i965_media.c --- libva-1.0.1/i965_drv_video/i965_media.c 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/i965_media.c 2010-07-12 09:09:38.000000000 +0000 @@ -31,13 +31,14 @@ #include #include -#include "va_backend.h" +#include #include "intel_batchbuffer.h" #include "intel_driver.h" #include "i965_defines.h" #include "i965_media_mpeg2.h" +#include "i965_media_h264.h" #include "i965_media.h" #include "i965_drv_video.h" @@ -72,13 +73,21 @@ i965_media_state_base_address(VADriverContextP ctx) { struct i965_driver_data *i965 = i965_driver_data(ctx); + struct i965_media_state *media_state = &i965->media_state; - if (IS_IGDNG(i965->intel.device_id)) { + if (IS_IRONLAKE(i965->intel.device_id)) { BEGIN_BATCH(ctx, 8); OUT_BATCH(ctx, CMD_STATE_BASE_ADDRESS | 6); OUT_BATCH(ctx, 0 | BASE_ADDRESS_MODIFY); OUT_BATCH(ctx, 0 | BASE_ADDRESS_MODIFY); - OUT_BATCH(ctx, 0 | BASE_ADDRESS_MODIFY); + + if (media_state->indirect_object.bo) { + OUT_RELOC(ctx, media_state->indirect_object.bo, I915_GEM_DOMAIN_INSTRUCTION, 0, + media_state->indirect_object.offset | BASE_ADDRESS_MODIFY); + } else { + OUT_BATCH(ctx, 0 | BASE_ADDRESS_MODIFY); + } + OUT_BATCH(ctx, 0 | BASE_ADDRESS_MODIFY); OUT_BATCH(ctx, 0 | BASE_ADDRESS_MODIFY); OUT_BATCH(ctx, 0 | BASE_ADDRESS_MODIFY); @@ -89,7 +98,14 @@ OUT_BATCH(ctx, CMD_STATE_BASE_ADDRESS | 4); OUT_BATCH(ctx, 0 | BASE_ADDRESS_MODIFY); OUT_BATCH(ctx, 0 | BASE_ADDRESS_MODIFY); - OUT_BATCH(ctx, 0 | BASE_ADDRESS_MODIFY); + + if (media_state->indirect_object.bo) { + OUT_RELOC(ctx, media_state->indirect_object.bo, I915_GEM_DOMAIN_INSTRUCTION, 0, + media_state->indirect_object.offset | BASE_ADDRESS_MODIFY); + } else { + OUT_BATCH(ctx, 0 | BASE_ADDRESS_MODIFY); + } + OUT_BATCH(ctx, 0 | BASE_ADDRESS_MODIFY); OUT_BATCH(ctx, 0 | BASE_ADDRESS_MODIFY); ADVANCE_BATCH(ctx); @@ -150,6 +166,20 @@ ADVANCE_BATCH(ctx); } +static void +i965_media_depth_buffer(VADriverContextP ctx) +{ + BEGIN_BATCH(ctx, 6); + OUT_BATCH(ctx, CMD_DEPTH_BUFFER | 4); + OUT_BATCH(ctx, (I965_DEPTHFORMAT_D32_FLOAT << 18) | + (I965_SURFACE_NULL << 29)); + OUT_BATCH(ctx, 0); + OUT_BATCH(ctx, 0); + OUT_BATCH(ctx, 0); + OUT_BATCH(ctx, 0); + ADVANCE_BATCH(); +} + static void i965_media_pipeline_setup(VADriverContextP ctx, struct decode_state *decode_state) { @@ -158,6 +188,7 @@ intel_batchbuffer_start_atomic(ctx, 0x1000); intel_batchbuffer_emit_mi_flush(ctx); /* step 1 */ + i965_media_depth_buffer(ctx); i965_media_pipeline_select(ctx); /* step 2 */ i965_media_urb_layout(ctx); /* step 3 */ i965_media_pipeline_state(ctx); /* step 4 */ @@ -168,7 +199,7 @@ } static void -i965_media_decode_init(VADriverContextP ctx, VAProfile profile) +i965_media_decode_init(VADriverContextP ctx, VAProfile profile, struct decode_state *decode_state) { int i; struct i965_driver_data *i965 = i965_driver_data(ctx); @@ -219,7 +250,13 @@ switch (profile) { case VAProfileMPEG2Simple: case VAProfileMPEG2Main: - i965_media_mpeg2_decode_init(ctx); + i965_media_mpeg2_decode_init(ctx, decode_state); + break; + + case VAProfileH264Baseline: + case VAProfileH264Main: + case VAProfileH264High: + i965_media_h264_decode_init(ctx, decode_state); break; default: @@ -236,17 +273,15 @@ struct i965_driver_data *i965 = i965_driver_data(ctx); struct i965_media_state *media_state = &i965->media_state; - i965_media_decode_init(ctx, profile); - assert(media_state->states_setup); - media_state->states_setup(ctx, decode_state); + i965_media_decode_init(ctx, profile, decode_state); + assert(media_state->media_states_setup); + media_state->media_states_setup(ctx, decode_state); i965_media_pipeline_setup(ctx, decode_state); - intel_batchbuffer_flush(ctx); } Bool i965_media_init(VADriverContextP ctx) { - i965_media_mpeg2_init(ctx); return True; } @@ -257,6 +292,9 @@ struct i965_media_state *media_state = &i965->media_state; int i; + if (media_state->free_private_context) + media_state->free_private_context(&media_state->private_context); + for (i = 0; i < MAX_MEDIA_SURFACES; i++) { dri_bo_unreference(media_state->surface_state[i].bo); media_state->surface_state[i].bo = NULL; @@ -277,7 +315,9 @@ dri_bo_unreference(media_state->curbe.bo); media_state->curbe.bo = NULL; - i965_media_mpeg2_ternimate(ctx); + dri_bo_unreference(media_state->indirect_object.bo); + media_state->indirect_object.bo = NULL; + return True; } diff -Nru libva-1.0.1/i965_drv_video/i965_media.h libva-1.0.1-3+0.31.1/i965_drv_video/i965_media.h --- libva-1.0.1/i965_drv_video/i965_media.h 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/i965_media.h 2010-07-07 12:20:29.000000000 +0000 @@ -38,7 +38,7 @@ #include "i965_structs.h" #define MAX_INTERFACE_DESC 16 -#define MAX_MEDIA_SURFACES 32 +#define MAX_MEDIA_SURFACES 34 #define MPEG_TOP_FIELD 1 #define MPEG_BOTTOM_FIELD 2 @@ -83,6 +83,11 @@ } curbe; struct { + dri_bo *bo; + unsigned long offset; + } indirect_object; + + struct { unsigned int vfe_start; unsigned int cs_start; @@ -93,8 +98,10 @@ unsigned int size_cs_entry; } urb; - void (*states_setup)(VADriverContextP ctx, struct decode_state *decode_state); + void *private_context; + void (*media_states_setup)(VADriverContextP ctx, struct decode_state *decode_state); void (*media_objects)(VADriverContextP ctx, struct decode_state *decode_state); + void (*free_private_context)(void **data); }; Bool i965_media_init(VADriverContextP ctx); diff -Nru libva-1.0.1/i965_drv_video/i965_media_h264.c libva-1.0.1-3+0.31.1/i965_drv_video/i965_media_h264.c --- libva-1.0.1/i965_drv_video/i965_media_h264.c 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/i965_media_h264.c 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,907 @@ +#include +#include +#include +#include + +#include "va_backend.h" + +#include "intel_batchbuffer.h" +#include "intel_driver.h" + +#include "i965_defines.h" +#include "i965_drv_video.h" +#include "i965_media.h" +#include "i965_media_h264.h" + +enum { + INTRA_16X16 = 0, + INTRA_8X8, + INTRA_4X4, + INTRA_PCM, + FRAMEMB_MOTION, + FIELDMB_MOTION, + MBAFF_MOTION, +}; + +struct intra_kernel_header +{ + /* R1.0 */ + unsigned char intra_4x4_luma_mode_0_offset; + unsigned char intra_4x4_luma_mode_1_offset; + unsigned char intra_4x4_luma_mode_2_offset; + unsigned char intra_4x4_luma_mode_3_offset; + /* R1.1 */ + unsigned char intra_4x4_luma_mode_4_offset; + unsigned char intra_4x4_luma_mode_5_offset; + unsigned char intra_4x4_luma_mode_6_offset; + unsigned char intra_4x4_luma_mode_7_offset; + /* R1.2 */ + unsigned char intra_4x4_luma_mode_8_offset; + unsigned char pad0; + unsigned short top_reference_offset; + /* R1.3 */ + unsigned char intra_8x8_luma_mode_0_offset; + unsigned char intra_8x8_luma_mode_1_offset; + unsigned char intra_8x8_luma_mode_2_offset; + unsigned char intra_8x8_luma_mode_3_offset; + /* R1.4 */ + unsigned char intra_8x8_luma_mode_4_offset; + unsigned char intra_8x8_luma_mode_5_offset; + unsigned char intra_8x8_luma_mode_6_offset; + unsigned char intra_8x8_luma_mode_7_offset; + /* R1.5 */ + unsigned char intra_8x8_luma_mode_8_offset; + unsigned char pad1; + unsigned short const_reverse_data_transfer_intra_8x8; + /* R1.6 */ + unsigned char intra_16x16_luma_mode_0_offset; + unsigned char intra_16x16_luma_mode_1_offset; + unsigned char intra_16x16_luma_mode_2_offset; + unsigned char intra_16x16_luma_mode_3_offset; + /* R1.7 */ + unsigned char intra_chroma_mode_0_offset; + unsigned char intra_chroma_mode_1_offset; + unsigned char intra_chroma_mode_2_offset; + unsigned char intra_chroma_mode_3_offset; + /* R2.0 */ + unsigned int const_intra_16x16_plane_0; + /* R2.1 */ + unsigned int const_intra_16x16_chroma_plane_0; + /* R2.2 */ + unsigned int const_intra_16x16_chroma_plane_1; + /* R2.3 */ + unsigned int const_intra_16x16_plane_1; + /* R2.4 */ + unsigned int left_shift_count_reverse_dw_ordering; + /* R2.5 */ + unsigned int const_reverse_data_transfer_intra_4x4; + /* R2.6 */ + unsigned int intra_4x4_pred_mode_offset; +}; + +struct inter_kernel_header +{ + unsigned short weight_offset; + unsigned char weight_offset_flag; + unsigned char pad0; +}; + +#include "shaders/h264/mc/export.inc" +static unsigned long avc_mc_kernel_offset_gen4[] = { + INTRA_16x16_IP * INST_UNIT_GEN4, + INTRA_8x8_IP * INST_UNIT_GEN4, + INTRA_4x4_IP * INST_UNIT_GEN4, + INTRA_PCM_IP * INST_UNIT_GEN4, + FRAME_MB_IP * INST_UNIT_GEN4, + FIELD_MB_IP * INST_UNIT_GEN4, + MBAFF_MB_IP * INST_UNIT_GEN4 +}; + +struct intra_kernel_header intra_kernel_header_gen4 = { + 0, + (INTRA_4X4_HORIZONTAL_IP - INTRA_4X4_VERTICAL_IP), + (INTRA_4X4_DC_IP - INTRA_4X4_VERTICAL_IP), + (INTRA_4X4_DIAG_DOWN_LEFT_IP - INTRA_4X4_VERTICAL_IP), + + (INTRA_4X4_DIAG_DOWN_RIGHT_IP - INTRA_4X4_VERTICAL_IP), + (INTRA_4X4_VERT_RIGHT_IP - INTRA_4X4_VERTICAL_IP), + (INTRA_4X4_HOR_DOWN_IP - INTRA_4X4_VERTICAL_IP), + (INTRA_4X4_VERT_LEFT_IP - INTRA_4X4_VERTICAL_IP), + + (INTRA_4X4_HOR_UP_IP - INTRA_4X4_VERTICAL_IP), + 0, + 0xFFFC, + + 0, + (INTRA_8X8_HORIZONTAL_IP - INTRA_8X8_VERTICAL_IP), + (INTRA_8X8_DC_IP - INTRA_8X8_VERTICAL_IP), + (INTRA_8X8_DIAG_DOWN_LEFT_IP - INTRA_8X8_VERTICAL_IP), + + (INTRA_8X8_DIAG_DOWN_RIGHT_IP - INTRA_8X8_VERTICAL_IP), + (INTRA_8X8_VERT_RIGHT_IP - INTRA_8X8_VERTICAL_IP), + (INTRA_8X8_HOR_DOWN_IP - INTRA_8X8_VERTICAL_IP), + (INTRA_8X8_VERT_LEFT_IP - INTRA_8X8_VERTICAL_IP), + + (INTRA_8X8_HOR_UP_IP - INTRA_8X8_VERTICAL_IP), + 0, + 0x0001, + + 0, + (INTRA_16x16_HORIZONTAL_IP - INTRA_16x16_VERTICAL_IP), + (INTRA_16x16_DC_IP - INTRA_16x16_VERTICAL_IP), + (INTRA_16x16_PLANE_IP - INTRA_16x16_VERTICAL_IP), + + 0, + (INTRA_CHROMA_HORIZONTAL_IP - INTRA_CHROMA_DC_IP), + (INTRA_CHROMA_VERTICAL_IP - INTRA_CHROMA_DC_IP), + (INTRA_Chroma_PLANE_IP - INTRA_CHROMA_DC_IP), + + 0xFCFBFAF9, + + 0x00FFFEFD, + + 0x04030201, + + 0x08070605, + + 0x18100800, + + 0x00020406, + + (intra_Pred_4x4_Y_IP - ADD_ERROR_SB3_IP) * 0x1000000 + + (intra_Pred_4x4_Y_IP - ADD_ERROR_SB2_IP) * 0x10000 + + (intra_Pred_4x4_Y_IP - ADD_ERROR_SB1_IP) * 0x100 + + (intra_Pred_4x4_Y_IP - ADD_ERROR_SB0_IP) +}; + +static uint32_t h264_avc_combined_gen4[][4] = { +#include "shaders/h264/mc/avc_mc.g4b" +}; + +static uint32_t h264_avc_null_gen4[][4] = { +#include "shaders/h264/mc/null.g4b" +}; + +static struct media_kernel h264_avc_kernels_gen4[] = { + { + "AVC combined kernel", + H264_AVC_COMBINED, + h264_avc_combined_gen4, + sizeof(h264_avc_combined_gen4), + NULL + }, + + { + "NULL kernel", + H264_AVC_NULL, + h264_avc_null_gen4, + sizeof(h264_avc_null_gen4), + NULL + } +}; + +/* On Ironlake */ +#include "shaders/h264/mc/export.inc.gen5" +static unsigned long avc_mc_kernel_offset_gen5[] = { + INTRA_16x16_IP_GEN5 * INST_UNIT_GEN5, + INTRA_8x8_IP_GEN5 * INST_UNIT_GEN5, + INTRA_4x4_IP_GEN5 * INST_UNIT_GEN5, + INTRA_PCM_IP_GEN5 * INST_UNIT_GEN5, + FRAME_MB_IP_GEN5 * INST_UNIT_GEN5, + FIELD_MB_IP_GEN5 * INST_UNIT_GEN5, + MBAFF_MB_IP_GEN5 * INST_UNIT_GEN5 +}; + +struct intra_kernel_header intra_kernel_header_gen5 = { + 0, + (INTRA_4X4_HORIZONTAL_IP_GEN5 - INTRA_4X4_VERTICAL_IP_GEN5), + (INTRA_4X4_DC_IP_GEN5 - INTRA_4X4_VERTICAL_IP_GEN5), + (INTRA_4X4_DIAG_DOWN_LEFT_IP_GEN5 - INTRA_4X4_VERTICAL_IP_GEN5), + + (INTRA_4X4_DIAG_DOWN_RIGHT_IP_GEN5 - INTRA_4X4_VERTICAL_IP_GEN5), + (INTRA_4X4_VERT_RIGHT_IP_GEN5 - INTRA_4X4_VERTICAL_IP_GEN5), + (INTRA_4X4_HOR_DOWN_IP_GEN5 - INTRA_4X4_VERTICAL_IP_GEN5), + (INTRA_4X4_VERT_LEFT_IP_GEN5 - INTRA_4X4_VERTICAL_IP_GEN5), + + (INTRA_4X4_HOR_UP_IP_GEN5 - INTRA_4X4_VERTICAL_IP_GEN5), + 0, + 0xFFFC, + + 0, + (INTRA_8X8_HORIZONTAL_IP_GEN5 - INTRA_8X8_VERTICAL_IP_GEN5), + (INTRA_8X8_DC_IP_GEN5 - INTRA_8X8_VERTICAL_IP_GEN5), + (INTRA_8X8_DIAG_DOWN_LEFT_IP_GEN5 - INTRA_8X8_VERTICAL_IP_GEN5), + + (INTRA_8X8_DIAG_DOWN_RIGHT_IP_GEN5 - INTRA_8X8_VERTICAL_IP_GEN5), + (INTRA_8X8_VERT_RIGHT_IP_GEN5 - INTRA_8X8_VERTICAL_IP_GEN5), + (INTRA_8X8_HOR_DOWN_IP_GEN5 - INTRA_8X8_VERTICAL_IP_GEN5), + (INTRA_8X8_VERT_LEFT_IP_GEN5 - INTRA_8X8_VERTICAL_IP_GEN5), + + (INTRA_8X8_HOR_UP_IP_GEN5 - INTRA_8X8_VERTICAL_IP_GEN5), + 0, + 0x0001, + + 0, + (INTRA_16x16_HORIZONTAL_IP_GEN5 - INTRA_16x16_VERTICAL_IP_GEN5), + (INTRA_16x16_DC_IP_GEN5 - INTRA_16x16_VERTICAL_IP_GEN5), + (INTRA_16x16_PLANE_IP_GEN5 - INTRA_16x16_VERTICAL_IP_GEN5), + + 0, + (INTRA_CHROMA_HORIZONTAL_IP_GEN5 - INTRA_CHROMA_DC_IP_GEN5), + (INTRA_CHROMA_VERTICAL_IP_GEN5 - INTRA_CHROMA_DC_IP_GEN5), + (INTRA_Chroma_PLANE_IP_GEN5 - INTRA_CHROMA_DC_IP_GEN5), + + 0xFCFBFAF9, + + 0x00FFFEFD, + + 0x04030201, + + 0x08070605, + + 0x18100800, + + 0x00020406, + + (intra_Pred_4x4_Y_IP_GEN5 - ADD_ERROR_SB3_IP_GEN5) * 0x1000000 + + (intra_Pred_4x4_Y_IP_GEN5 - ADD_ERROR_SB2_IP_GEN5) * 0x10000 + + (intra_Pred_4x4_Y_IP_GEN5 - ADD_ERROR_SB1_IP_GEN5) * 0x100 + + (intra_Pred_4x4_Y_IP_GEN5 - ADD_ERROR_SB0_IP_GEN5) +}; + +static uint32_t h264_avc_combined_gen5[][4] = { +#include "shaders/h264/mc/avc_mc.g4b.gen5" +}; + +static uint32_t h264_avc_null_gen5[][4] = { +#include "shaders/h264/mc/null.g4b.gen5" +}; + +static struct media_kernel h264_avc_kernels_gen5[] = { + { + "AVC combined kernel", + H264_AVC_COMBINED, + h264_avc_combined_gen5, + sizeof(h264_avc_combined_gen5), + NULL + }, + + { + "NULL kernel", + H264_AVC_NULL, + h264_avc_null_gen5, + sizeof(h264_avc_null_gen5), + NULL + } +}; + +#define NUM_H264_AVC_KERNELS (sizeof(h264_avc_kernels_gen4) / sizeof(h264_avc_kernels_gen4[0])) +struct media_kernel *h264_avc_kernels = NULL; + +#define NUM_AVC_MC_INTERFACES (sizeof(avc_mc_kernel_offset_gen4) / sizeof(avc_mc_kernel_offset_gen4[0])) +static unsigned long *avc_mc_kernel_offset = NULL; + +static struct intra_kernel_header *intra_kernel_header = NULL; + +static void +i965_media_h264_surface_state(VADriverContextP ctx, + int index, + struct object_surface *obj_surface, + unsigned long offset, + int w, int h, int pitch, + Bool is_dst, + int vert_line_stride, + int vert_line_stride_ofs, + int format) +{ + struct i965_driver_data *i965 = i965_driver_data(ctx); + struct i965_media_state *media_state = &i965->media_state; + struct i965_surface_state *ss; + dri_bo *bo; + uint32_t write_domain, read_domain; + + bo = dri_bo_alloc(i965->intel.bufmgr, + "surface state", + sizeof(struct i965_surface_state), 32); + assert(bo); + dri_bo_map(bo, 1); + assert(bo->virtual); + ss = bo->virtual; + memset(ss, 0, sizeof(*ss)); + ss->ss0.surface_type = I965_SURFACE_2D; + ss->ss0.surface_format = format; + ss->ss0.vert_line_stride = vert_line_stride; + ss->ss0.vert_line_stride_ofs = vert_line_stride_ofs; + ss->ss1.base_addr = obj_surface->bo->offset + offset; + ss->ss2.width = w - 1; + ss->ss2.height = h - 1; + ss->ss3.pitch = pitch - 1; + + if (is_dst) { + write_domain = I915_GEM_DOMAIN_RENDER; + read_domain = I915_GEM_DOMAIN_RENDER; + } else { + write_domain = 0; + read_domain = I915_GEM_DOMAIN_SAMPLER; + } + + dri_bo_emit_reloc(bo, + read_domain, write_domain, + offset, + offsetof(struct i965_surface_state, ss1), + obj_surface->bo); + dri_bo_unmap(bo); + + assert(index < MAX_MEDIA_SURFACES); + media_state->surface_state[index].bo = bo; +} + +static void +i965_media_h264_surfaces_setup(VADriverContextP ctx, + struct decode_state *decode_state) +{ + struct i965_driver_data *i965 = i965_driver_data(ctx); + struct i965_media_state *media_state = &i965->media_state; + struct i965_h264_context *i965_h264_context; + struct object_surface *obj_surface; + VAPictureParameterBufferH264 *pic_param; + VAPictureH264 *va_pic; + int i, j, w, h; + int field_picture; + + assert(media_state->private_context); + i965_h264_context = (struct i965_h264_context *)media_state->private_context; + + assert(decode_state->pic_param && decode_state->pic_param->buffer); + pic_param = (VAPictureParameterBufferH264 *)decode_state->pic_param->buffer; + + /* Target Picture */ + va_pic = &pic_param->CurrPic; + assert(!(va_pic->flags & VA_PICTURE_H264_INVALID)); + obj_surface = SURFACE(va_pic->picture_id); + assert(obj_surface); + w = obj_surface->width; + h = obj_surface->height; + field_picture = !!(va_pic->flags & (VA_PICTURE_H264_TOP_FIELD | VA_PICTURE_H264_BOTTOM_FIELD)); + i965_media_h264_surface_state(ctx, 0, obj_surface, + 0, w / 4, h / (1 + field_picture), w, + 1, + field_picture, + !!(va_pic->flags & VA_PICTURE_H264_BOTTOM_FIELD), + I965_SURFACEFORMAT_R8_SINT); /* Y */ + i965_media_h264_surface_state(ctx, 1, obj_surface, + w * h, w / 4, h / 2 / (1 + field_picture), w, + 1, + field_picture, + !!(va_pic->flags & VA_PICTURE_H264_BOTTOM_FIELD), + I965_SURFACEFORMAT_R8G8_SINT); /* INTERLEAVED U/V */ + + /* Reference Pictures */ + for (i = 0; i < ARRAY_ELEMS(i965_h264_context->fsid_list); i++) { + if (i965_h264_context->fsid_list[i].surface_id != VA_INVALID_ID) { + int found = 0; + for (j = 0; j < ARRAY_ELEMS(pic_param->ReferenceFrames); j++) { + va_pic = &pic_param->ReferenceFrames[j]; + + if (va_pic->flags & VA_PICTURE_H264_INVALID) + continue; + + if (va_pic->picture_id == i965_h264_context->fsid_list[i].surface_id) { + found = 1; + break; + } + } + + assert(found == 1); + + obj_surface = SURFACE(va_pic->picture_id); + assert(obj_surface); + w = obj_surface->width; + h = obj_surface->height; + field_picture = !!(va_pic->flags & (VA_PICTURE_H264_TOP_FIELD | VA_PICTURE_H264_BOTTOM_FIELD)); + i965_media_h264_surface_state(ctx, 2 + i, obj_surface, + 0, w / 4, h / (1 + field_picture), w, + 0, + field_picture, + !!(va_pic->flags & VA_PICTURE_H264_BOTTOM_FIELD), + I965_SURFACEFORMAT_R8_SINT); /* Y */ + i965_media_h264_surface_state(ctx, 18 + i, obj_surface, + w * h, w / 4, h / 2 / (1 + field_picture), w, + 0, + field_picture, + !!(va_pic->flags & VA_PICTURE_H264_BOTTOM_FIELD), + I965_SURFACEFORMAT_R8G8_SINT); /* INTERLEAVED U/V */ + } + } +} + +static void +i965_media_h264_binding_table(VADriverContextP ctx) +{ + struct i965_driver_data *i965 = i965_driver_data(ctx); + struct i965_media_state *media_state = &i965->media_state; + int i; + unsigned int *binding_table; + dri_bo *bo = media_state->binding_table.bo; + + dri_bo_map(bo, 1); + assert(bo->virtual); + binding_table = bo->virtual; + memset(binding_table, 0, bo->size); + + for (i = 0; i < MAX_MEDIA_SURFACES; i++) { + if (media_state->surface_state[i].bo) { + binding_table[i] = media_state->surface_state[i].bo->offset; + dri_bo_emit_reloc(bo, + I915_GEM_DOMAIN_INSTRUCTION, 0, + 0, + i * sizeof(*binding_table), + media_state->surface_state[i].bo); + } + } + + dri_bo_unmap(media_state->binding_table.bo); +} + +static void +i965_media_h264_interface_descriptor_remap_table(VADriverContextP ctx) +{ + struct i965_driver_data *i965 = i965_driver_data(ctx); + struct i965_media_state *media_state = &i965->media_state; + struct i965_interface_descriptor *desc; + int i; + dri_bo *bo; + + bo = media_state->idrt.bo; + dri_bo_map(bo, 1); + assert(bo->virtual); + desc = bo->virtual; + + for (i = 0; i < NUM_AVC_MC_INTERFACES; i++) { + int kernel_offset = avc_mc_kernel_offset[i]; + memset(desc, 0, sizeof(*desc)); + desc->desc0.grf_reg_blocks = 7; + desc->desc0.kernel_start_pointer = (h264_avc_kernels[H264_AVC_COMBINED].bo->offset + kernel_offset) >> 6; /* reloc */ + desc->desc1.const_urb_entry_read_offset = 0; + desc->desc1.const_urb_entry_read_len = 2; + desc->desc3.binding_table_entry_count = 0; + desc->desc3.binding_table_pointer = + media_state->binding_table.bo->offset >> 5; /*reloc */ + + dri_bo_emit_reloc(bo, + I915_GEM_DOMAIN_INSTRUCTION, 0, + desc->desc0.grf_reg_blocks + kernel_offset, + i * sizeof(*desc) + offsetof(struct i965_interface_descriptor, desc0), + h264_avc_kernels[H264_AVC_COMBINED].bo); + + dri_bo_emit_reloc(bo, + I915_GEM_DOMAIN_INSTRUCTION, 0, + desc->desc3.binding_table_entry_count, + i * sizeof(*desc) + offsetof(struct i965_interface_descriptor, desc3), + media_state->binding_table.bo); + desc++; + } + + dri_bo_unmap(bo); +} + +static void +i965_media_h264_vfe_state(VADriverContextP ctx) +{ + struct i965_driver_data *i965 = i965_driver_data(ctx); + struct i965_media_state *media_state = &i965->media_state; + struct i965_vfe_state *vfe_state; + dri_bo *bo; + + bo = media_state->vfe_state.bo; + dri_bo_map(bo, 1); + assert(bo->virtual); + vfe_state = bo->virtual; + memset(vfe_state, 0, sizeof(*vfe_state)); + vfe_state->vfe0.extend_vfe_state_present = 1; + vfe_state->vfe1.max_threads = media_state->urb.num_vfe_entries - 1; + vfe_state->vfe1.urb_entry_alloc_size = media_state->urb.size_vfe_entry - 1; + vfe_state->vfe1.num_urb_entries = media_state->urb.num_vfe_entries; + vfe_state->vfe1.vfe_mode = VFE_AVC_IT_MODE; + vfe_state->vfe1.children_present = 0; + vfe_state->vfe2.interface_descriptor_base = + media_state->idrt.bo->offset >> 4; /* reloc */ + dri_bo_emit_reloc(bo, + I915_GEM_DOMAIN_INSTRUCTION, 0, + 0, + offsetof(struct i965_vfe_state, vfe2), + media_state->idrt.bo); + dri_bo_unmap(bo); +} + +static void +i965_media_h264_vfe_state_extension(VADriverContextP ctx, + struct decode_state *decode_state) +{ + struct i965_driver_data *i965 = i965_driver_data(ctx); + struct i965_media_state *media_state = &i965->media_state; + struct i965_h264_context *i965_h264_context; + struct i965_vfe_state_ex *vfe_state_ex; + VAPictureParameterBufferH264 *pic_param; + int mbaff_frame_flag; + + assert(media_state->private_context); + i965_h264_context = (struct i965_h264_context *)media_state->private_context; + + assert(decode_state->pic_param && decode_state->pic_param->buffer); + pic_param = (VAPictureParameterBufferH264 *)decode_state->pic_param->buffer; + mbaff_frame_flag = (pic_param->seq_fields.bits.mb_adaptive_frame_field_flag && + !pic_param->pic_fields.bits.field_pic_flag); + + assert(media_state->extended_state.bo); + dri_bo_map(media_state->extended_state.bo, 1); + assert(media_state->extended_state.bo->virtual); + vfe_state_ex = media_state->extended_state.bo->virtual; + memset(vfe_state_ex, 0, sizeof(*vfe_state_ex)); + + /* + * Indirect data buffer: + * -------------------------------------------------------- + * | Motion Vectors | Weight/Offset data | Residual data | + * -------------------------------------------------------- + * R4-R7: Motion Vectors + * R8-R9: Weight/Offset + * R10-R33: Residual data + */ + vfe_state_ex->vfex1.avc.residual_data_fix_offset_flag = !!RESIDUAL_DATA_OFFSET; + vfe_state_ex->vfex1.avc.residual_data_offset = RESIDUAL_DATA_OFFSET; + + if (i965_h264_context->picture.i_flag) { + vfe_state_ex->vfex1.avc.sub_field_present_flag = PRESENT_NOMV; /* NoMV */ + vfe_state_ex->vfex1.avc.weight_grf_offset = 0; + vfe_state_ex->vfex1.avc.residual_grf_offset = 0; + } else { + vfe_state_ex->vfex1.avc.sub_field_present_flag = PRESENT_MV_WO; /* Both MV and W/O */ + vfe_state_ex->vfex1.avc.weight_grf_offset = 4; + vfe_state_ex->vfex1.avc.residual_grf_offset = 6; + } + + if (!pic_param->pic_fields.bits.field_pic_flag) { + if (mbaff_frame_flag) { + vfe_state_ex->remap_table0.remap_index_0 = INTRA_16X16; + vfe_state_ex->remap_table0.remap_index_1 = INTRA_8X8; + vfe_state_ex->remap_table0.remap_index_2 = INTRA_4X4; + vfe_state_ex->remap_table0.remap_index_3 = INTRA_PCM; + vfe_state_ex->remap_table0.remap_index_4 = MBAFF_MOTION; + vfe_state_ex->remap_table0.remap_index_5 = MBAFF_MOTION; + vfe_state_ex->remap_table0.remap_index_6 = MBAFF_MOTION; + vfe_state_ex->remap_table0.remap_index_7 = MBAFF_MOTION; + + vfe_state_ex->remap_table1.remap_index_8 = MBAFF_MOTION; + vfe_state_ex->remap_table1.remap_index_9 = MBAFF_MOTION; + vfe_state_ex->remap_table1.remap_index_10 = MBAFF_MOTION; + vfe_state_ex->remap_table1.remap_index_11 = MBAFF_MOTION; + vfe_state_ex->remap_table1.remap_index_12 = MBAFF_MOTION; + vfe_state_ex->remap_table1.remap_index_13 = MBAFF_MOTION; + vfe_state_ex->remap_table1.remap_index_14 = MBAFF_MOTION; + vfe_state_ex->remap_table1.remap_index_15 = MBAFF_MOTION; + } else { + vfe_state_ex->remap_table0.remap_index_0 = INTRA_16X16; + vfe_state_ex->remap_table0.remap_index_1 = INTRA_8X8; + vfe_state_ex->remap_table0.remap_index_2 = INTRA_4X4; + vfe_state_ex->remap_table0.remap_index_3 = INTRA_PCM; + vfe_state_ex->remap_table0.remap_index_4 = FRAMEMB_MOTION; + vfe_state_ex->remap_table0.remap_index_5 = FRAMEMB_MOTION; + vfe_state_ex->remap_table0.remap_index_6 = FRAMEMB_MOTION; + vfe_state_ex->remap_table0.remap_index_7 = FRAMEMB_MOTION; + + vfe_state_ex->remap_table1.remap_index_8 = FRAMEMB_MOTION; + vfe_state_ex->remap_table1.remap_index_9 = FRAMEMB_MOTION; + vfe_state_ex->remap_table1.remap_index_10 = FRAMEMB_MOTION; + vfe_state_ex->remap_table1.remap_index_11 = FRAMEMB_MOTION; + vfe_state_ex->remap_table1.remap_index_12 = FRAMEMB_MOTION; + vfe_state_ex->remap_table1.remap_index_13 = FRAMEMB_MOTION; + vfe_state_ex->remap_table1.remap_index_14 = FRAMEMB_MOTION; + vfe_state_ex->remap_table1.remap_index_15 = FRAMEMB_MOTION; + } + } else { + vfe_state_ex->remap_table0.remap_index_0 = INTRA_16X16; + vfe_state_ex->remap_table0.remap_index_1 = INTRA_8X8; + vfe_state_ex->remap_table0.remap_index_2 = INTRA_4X4; + vfe_state_ex->remap_table0.remap_index_3 = INTRA_PCM; + vfe_state_ex->remap_table0.remap_index_4 = FIELDMB_MOTION; + vfe_state_ex->remap_table0.remap_index_5 = FIELDMB_MOTION; + vfe_state_ex->remap_table0.remap_index_6 = FIELDMB_MOTION; + vfe_state_ex->remap_table0.remap_index_7 = FIELDMB_MOTION; + + vfe_state_ex->remap_table1.remap_index_8 = FIELDMB_MOTION; + vfe_state_ex->remap_table1.remap_index_9 = FIELDMB_MOTION; + vfe_state_ex->remap_table1.remap_index_10 = FIELDMB_MOTION; + vfe_state_ex->remap_table1.remap_index_11 = FIELDMB_MOTION; + vfe_state_ex->remap_table1.remap_index_12 = FIELDMB_MOTION; + vfe_state_ex->remap_table1.remap_index_13 = FIELDMB_MOTION; + vfe_state_ex->remap_table1.remap_index_14 = FIELDMB_MOTION; + vfe_state_ex->remap_table1.remap_index_15 = FIELDMB_MOTION; + } + + if (i965_h264_context->use_avc_hw_scoreboard) { + vfe_state_ex->scoreboard0.enable = 1; + vfe_state_ex->scoreboard0.type = SCOREBOARD_STALLING; + vfe_state_ex->scoreboard0.mask = 0xff; + + vfe_state_ex->scoreboard1.delta_x0 = -1; + vfe_state_ex->scoreboard1.delta_y0 = 0; + vfe_state_ex->scoreboard1.delta_x1 = 0; + vfe_state_ex->scoreboard1.delta_y1 = -1; + vfe_state_ex->scoreboard1.delta_x2 = 1; + vfe_state_ex->scoreboard1.delta_y2 = -1; + vfe_state_ex->scoreboard1.delta_x3 = -1; + vfe_state_ex->scoreboard1.delta_y3 = -1; + + vfe_state_ex->scoreboard2.delta_x4 = -1; + vfe_state_ex->scoreboard2.delta_y4 = 1; + vfe_state_ex->scoreboard2.delta_x5 = 0; + vfe_state_ex->scoreboard2.delta_y5 = -2; + vfe_state_ex->scoreboard2.delta_x6 = 1; + vfe_state_ex->scoreboard2.delta_y6 = -2; + vfe_state_ex->scoreboard2.delta_x7 = -1; + vfe_state_ex->scoreboard2.delta_y7 = -2; + } + + dri_bo_unmap(media_state->extended_state.bo); +} + +static void +i965_media_h264_upload_constants(VADriverContextP ctx, struct decode_state *decode_state) +{ + struct i965_driver_data *i965 = i965_driver_data(ctx); + struct i965_media_state *media_state = &i965->media_state; + struct i965_h264_context *i965_h264_context; + unsigned char *constant_buffer; + VASliceParameterBufferH264 *slice_param; + + assert(media_state->private_context); + i965_h264_context = (struct i965_h264_context *)media_state->private_context; + + assert(decode_state->slice_params[0] && decode_state->slice_params[0]->buffer); + slice_param = (VASliceParameterBufferH264 *)decode_state->slice_params[0]->buffer; + + dri_bo_map(media_state->curbe.bo, 1); + assert(media_state->curbe.bo->virtual); + constant_buffer = media_state->curbe.bo->virtual; + + /* HW solution for W=128 */ + if (i965_h264_context->use_hw_w128) { + memcpy(constant_buffer, intra_kernel_header, sizeof(*intra_kernel_header)); + } else { + if (slice_param->slice_type == SLICE_TYPE_I || + slice_param->slice_type == SLICE_TYPE_SI) { + memcpy(constant_buffer, intra_kernel_header, sizeof(*intra_kernel_header)); + } else { + /* FIXME: Need to upload CURBE data to inter kernel interface + * to support weighted prediction work-around + */ + *(short *)constant_buffer = i965_h264_context->weight128_offset0; + constant_buffer += 2; + *(char *)constant_buffer = i965_h264_context->weight128_offset0_flag; + constant_buffer++; + *constant_buffer = 0; + } + } + + dri_bo_unmap(media_state->curbe.bo); +} + +static void +i965_media_h264_states_setup(VADriverContextP ctx, struct decode_state *decode_state) +{ + struct i965_driver_data *i965 = i965_driver_data(ctx); + struct i965_media_state *media_state = &i965->media_state; + struct i965_h264_context *i965_h264_context; + + assert(media_state->private_context); + i965_h264_context = (struct i965_h264_context *)media_state->private_context; + + i965_avc_bsd_pipeline(ctx, decode_state); + + i965_avc_hw_scoreboard(ctx, decode_state); + + i965_media_h264_surfaces_setup(ctx, decode_state); + i965_media_h264_binding_table(ctx); + i965_media_h264_interface_descriptor_remap_table(ctx); + i965_media_h264_vfe_state_extension(ctx, decode_state); + i965_media_h264_vfe_state(ctx); + i965_media_h264_upload_constants(ctx, decode_state); +} + +static void +i965_media_h264_objects(VADriverContextP ctx, struct decode_state *decode_state) +{ + struct i965_driver_data *i965 = i965_driver_data(ctx); + struct i965_media_state *media_state = &i965->media_state; + struct i965_h264_context *i965_h264_context; + unsigned int *object_command; + + assert(media_state->private_context); + i965_h264_context = (struct i965_h264_context *)media_state->private_context; + + dri_bo_map(i965_h264_context->avc_it_command_mb_info.bo, True); + assert(i965_h264_context->avc_it_command_mb_info.bo->virtual); + object_command = i965_h264_context->avc_it_command_mb_info.bo->virtual; + memset(object_command, 0, i965_h264_context->avc_it_command_mb_info.mbs * i965_h264_context->use_avc_hw_scoreboard * MB_CMD_IN_BYTES); + object_command += i965_h264_context->avc_it_command_mb_info.mbs * (1 + i965_h264_context->use_avc_hw_scoreboard) * MB_CMD_IN_DWS; + *object_command++ = 0; + *object_command = MI_BATCH_BUFFER_END; + dri_bo_unmap(i965_h264_context->avc_it_command_mb_info.bo); + + BEGIN_BATCH(ctx, 2); + OUT_BATCH(ctx, MI_BATCH_BUFFER_START | (2 << 6)); + OUT_RELOC(ctx, i965_h264_context->avc_it_command_mb_info.bo, + I915_GEM_DOMAIN_COMMAND, 0, + 0); + ADVANCE_BATCH(ctx); + + /* Have to execute the batch buffer here becuase MI_BATCH_BUFFER_END + * will cause control to pass back to ring buffer + */ + intel_batchbuffer_end_atomic(ctx); + intel_batchbuffer_flush(ctx); + intel_batchbuffer_start_atomic(ctx, 0x1000); + i965_avc_ildb(ctx, decode_state); +} + +static void +i965_media_h264_free_private_context(void **data) +{ + struct i965_h264_context *i965_h264_context = *data; + int i; + + if (i965_h264_context == NULL) + return; + + i965_avc_ildb_ternimate(&i965_h264_context->avc_ildb_context); + i965_avc_hw_scoreboard_ternimate(&i965_h264_context->avc_hw_scoreboard_context); + i965_avc_bsd_ternimate(&i965_h264_context->i965_avc_bsd_context); + dri_bo_unreference(i965_h264_context->avc_it_command_mb_info.bo); + dri_bo_unreference(i965_h264_context->avc_it_data.bo); + dri_bo_unreference(i965_h264_context->avc_ildb_data.bo); + free(i965_h264_context); + *data = NULL; + + for (i = 0; i < NUM_H264_AVC_KERNELS; i++) { + struct media_kernel *kernel = &h264_avc_kernels[i]; + + dri_bo_unreference(kernel->bo); + kernel->bo = NULL; + } +} + +void +i965_media_h264_decode_init(VADriverContextP ctx, struct decode_state *decode_state) +{ + struct i965_driver_data *i965 = i965_driver_data(ctx); + struct i965_media_state *media_state = &i965->media_state; + struct i965_h264_context *i965_h264_context; + dri_bo *bo; + int i; + VAPictureParameterBufferH264 *pic_param; + + i965_h264_context = media_state->private_context; + + if (i965_h264_context == NULL) { + /* kernel */ + assert(NUM_H264_AVC_KERNELS == (sizeof(h264_avc_kernels_gen5) / + sizeof(h264_avc_kernels_gen5[0]))); + assert(NUM_AVC_MC_INTERFACES == (sizeof(avc_mc_kernel_offset_gen5) / + sizeof(avc_mc_kernel_offset_gen5[0]))); + + i965_h264_context = calloc(1, sizeof(struct i965_h264_context)); + + if (IS_IRONLAKE(i965->intel.device_id)) { + h264_avc_kernels = h264_avc_kernels_gen5; + avc_mc_kernel_offset = avc_mc_kernel_offset_gen5; + intra_kernel_header = &intra_kernel_header_gen5; + i965_h264_context->use_avc_hw_scoreboard = 1; + i965_h264_context->use_hw_w128 = 1; + } else { + h264_avc_kernels = h264_avc_kernels_gen4; + avc_mc_kernel_offset = avc_mc_kernel_offset_gen4; + intra_kernel_header = &intra_kernel_header_gen4; + i965_h264_context->use_avc_hw_scoreboard = 0; + i965_h264_context->use_hw_w128 = 0; + } + + for (i = 0; i < NUM_H264_AVC_KERNELS; i++) { + struct media_kernel *kernel = &h264_avc_kernels[i]; + kernel->bo = dri_bo_alloc(i965->intel.bufmgr, + kernel->name, + kernel->size, 0x1000); + assert(kernel->bo); + dri_bo_subdata(kernel->bo, 0, kernel->size, kernel->bin); + } + + for (i = 0; i < 16; i++) { + i965_h264_context->fsid_list[i].surface_id = VA_INVALID_ID; + i965_h264_context->fsid_list[i].frame_store_id = -1; + } + + media_state->private_context = i965_h264_context; + media_state->free_private_context = i965_media_h264_free_private_context; + + /* URB */ + if (IS_IRONLAKE(i965->intel.device_id)) { + media_state->urb.num_vfe_entries = 63; + } else { + media_state->urb.num_vfe_entries = 23; + } + + media_state->urb.size_vfe_entry = 16; + + media_state->urb.num_cs_entries = 1; + media_state->urb.size_cs_entry = 1; + + media_state->urb.vfe_start = 0; + media_state->urb.cs_start = media_state->urb.vfe_start + + media_state->urb.num_vfe_entries * media_state->urb.size_vfe_entry; + assert(media_state->urb.cs_start + + media_state->urb.num_cs_entries * media_state->urb.size_cs_entry <= URB_SIZE((&i965->intel))); + + /* hook functions */ + media_state->media_states_setup = i965_media_h264_states_setup; + media_state->media_objects = i965_media_h264_objects; + } + + assert(decode_state->pic_param && decode_state->pic_param->buffer); + pic_param = (VAPictureParameterBufferH264 *)decode_state->pic_param->buffer; + i965_h264_context->picture.width_in_mbs = ((pic_param->picture_width_in_mbs_minus1 + 1) & 0xff); + i965_h264_context->picture.height_in_mbs = ((pic_param->picture_height_in_mbs_minus1 + 1) & 0xff) / + (1 + !!pic_param->pic_fields.bits.field_pic_flag); /* picture height */ + i965_h264_context->picture.mbaff_frame_flag = (pic_param->seq_fields.bits.mb_adaptive_frame_field_flag && + !pic_param->pic_fields.bits.field_pic_flag); + i965_h264_context->avc_it_command_mb_info.mbs = (i965_h264_context->picture.width_in_mbs * + i965_h264_context->picture.height_in_mbs); + + dri_bo_unreference(i965_h264_context->avc_it_command_mb_info.bo); + bo = dri_bo_alloc(i965->intel.bufmgr, + "avc it command mb info", + i965_h264_context->avc_it_command_mb_info.mbs * MB_CMD_IN_BYTES * (1 + i965_h264_context->use_avc_hw_scoreboard) + 8, + 0x1000); + assert(bo); + i965_h264_context->avc_it_command_mb_info.bo = bo; + + dri_bo_unreference(i965_h264_context->avc_it_data.bo); + bo = dri_bo_alloc(i965->intel.bufmgr, + "avc it data", + i965_h264_context->avc_it_command_mb_info.mbs * + 0x800 * + (1 + !!pic_param->pic_fields.bits.field_pic_flag), + 0x1000); + assert(bo); + i965_h264_context->avc_it_data.bo = bo; + i965_h264_context->avc_it_data.write_offset = 0; + dri_bo_unreference(media_state->indirect_object.bo); + media_state->indirect_object.bo = bo; + dri_bo_reference(media_state->indirect_object.bo); + media_state->indirect_object.offset = i965_h264_context->avc_it_data.write_offset; + + dri_bo_unreference(i965_h264_context->avc_ildb_data.bo); + bo = dri_bo_alloc(i965->intel.bufmgr, + "AVC-ILDB Data Buffer", + i965_h264_context->avc_it_command_mb_info.mbs * 64 * 2, + 0x1000); + assert(bo); + i965_h264_context->avc_ildb_data.bo = bo; + + /* bsd pipeline */ + i965_avc_bsd_decode_init(ctx); + + /* HW scoreboard */ + i965_avc_hw_scoreboard_decode_init(ctx); + + /* ILDB */ + i965_avc_ildb_decode_init(ctx); + + /* for Media pipeline */ + media_state->extended_state.enabled = 1; + dri_bo_unreference(media_state->extended_state.bo); + bo = dri_bo_alloc(i965->intel.bufmgr, + "extened vfe state", + sizeof(struct i965_vfe_state_ex), 32); + assert(bo); + media_state->extended_state.bo = bo; +} diff -Nru libva-1.0.1/i965_drv_video/i965_media_h264.h libva-1.0.1-3+0.31.1/i965_drv_video/i965_media_h264.h --- libva-1.0.1/i965_drv_video/i965_media_h264.h 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/i965_media_h264.h 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,66 @@ +#ifndef _I965_MEDIA_H264_H_ +#define _I965_MEDIA_H264_H_ + +#include "i965_avc_bsd.h" +#include "i965_avc_hw_scoreboard.h" +#include "i965_avc_ildb.h" + +#define INST_UNIT_GEN4 16 +#define INST_UNIT_GEN5 8 + +#define MB_CMD_IN_BYTES 64 +#define MB_CMD_IN_DWS 16 +#define MB_CMD_IN_OWS 4 + +enum { + H264_AVC_COMBINED = 0, + H264_AVC_NULL +}; + +struct i965_h264_context +{ + struct { + dri_bo *bo; + unsigned int mbs; + } avc_it_command_mb_info; + + struct { + dri_bo *bo; + long write_offset; + } avc_it_data; + + struct { + dri_bo *bo; + } avc_ildb_data; + + struct { + unsigned int width_in_mbs; + unsigned int height_in_mbs; + int mbaff_frame_flag; + int i_flag; + } picture; + + int enable_avc_ildb; + int use_avc_hw_scoreboard; + + int use_hw_w128; + unsigned int weight128_luma_l0; + unsigned int weight128_luma_l1; + unsigned int weight128_chroma_l0; + unsigned int weight128_chroma_l1; + char weight128_offset0_flag; + short weight128_offset0; + + struct i965_avc_bsd_context i965_avc_bsd_context; + struct i965_avc_hw_scoreboard_context avc_hw_scoreboard_context; + struct i965_avc_ildb_context avc_ildb_context; + + struct { + VASurfaceID surface_id; + int frame_store_id; + } fsid_list[16]; +}; + +void i965_media_h264_decode_init(VADriverContextP ctx, struct decode_state *decode_state); + +#endif /* _I965_MEDIA_H264_H_ */ diff -Nru libva-1.0.1/i965_drv_video/i965_media_mpeg2.c libva-1.0.1-3+0.31.1/i965_drv_video/i965_media_mpeg2.c --- libva-1.0.1/i965_drv_video/i965_media_mpeg2.c 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/i965_media_mpeg2.c 2010-07-07 12:20:29.000000000 +0000 @@ -31,7 +31,7 @@ #include #include -#include "va_backend.h" +#include #include "intel_batchbuffer.h" #include "intel_driver.h" @@ -280,7 +280,7 @@ } }; -/* On IGDNG */ +/* On IRONLAKE */ static uint32_t frame_intra_kernel_gen5[][4] = { #include "shaders/mpeg2/vld/frame_intra.g4b.gen5" }; @@ -518,6 +518,15 @@ int w = obj_surface->width; int h = obj_surface->height; + if (obj_surface->bo == NULL) { + struct i965_driver_data *i965 = i965_driver_data(ctx); + + obj_surface->bo = dri_bo_alloc(i965->intel.bufmgr, + "vaapi surface", + obj_surface->size, + 0x1000); + } + if (picture_structure == MPEG_FRAME) { i965_media_mpeg2_surface_state(ctx, base_index + 0, obj_surface, 0, w, h, @@ -851,107 +860,104 @@ static void i965_media_mpeg2_objects(VADriverContextP ctx, struct decode_state *decode_state) { - int i; + int i, j; VASliceParameterBufferMPEG2 *slice_param; - assert(decode_state->slice_param && decode_state->slice_param->buffer); - slice_param = (VASliceParameterBufferMPEG2 *)decode_state->slice_param->buffer; + for (j = 0; j < decode_state->num_slice_params; j++) { + assert(decode_state->slice_params[j] && decode_state->slice_params[j]->buffer); + assert(decode_state->slice_datas[j] && decode_state->slice_datas[j]->bo); + slice_param = (VASliceParameterBufferMPEG2 *)decode_state->slice_params[j]->buffer; + + for (i = 0; i < decode_state->slice_params[j]->num_elements; i++) { + assert(slice_param->slice_data_flag == VA_SLICE_DATA_FLAG_ALL); + + BEGIN_BATCH(ctx, 6); + OUT_BATCH(ctx, CMD_MEDIA_OBJECT | 4); + OUT_BATCH(ctx, 0); + OUT_BATCH(ctx, slice_param->slice_data_size - (slice_param->macroblock_offset >> 3)); + OUT_RELOC(ctx, decode_state->slice_datas[j]->bo, + I915_GEM_DOMAIN_SAMPLER, 0, + slice_param->slice_data_offset + (slice_param->macroblock_offset >> 3)); + OUT_BATCH(ctx, + ((slice_param->slice_horizontal_position << 24) | + (slice_param->slice_vertical_position << 16) | + (127 << 8) | + (slice_param->macroblock_offset & 0x7))); + OUT_BATCH(ctx, slice_param->quantiser_scale_code << 24); + ADVANCE_BATCH(ctx); + slice_param++; + } + } +} + +static void +i965_media_mpeg2_free_private_context(void **data) +{ + int i; - for (i = 0; i < decode_state->num_slices; i++) { - assert(slice_param->slice_data_flag == VA_SLICE_DATA_FLAG_ALL); + for (i = 0; i < NUM_MPEG2_VLD_KERNELS; i++) { + struct media_kernel *kernel = &mpeg2_vld_kernels[i]; - BEGIN_BATCH(ctx, 6); - OUT_BATCH(ctx, CMD_MEDIA_OBJECT | 4); - OUT_BATCH(ctx, 0); - OUT_BATCH(ctx, slice_param->slice_data_size - (slice_param->macroblock_offset >> 3)); - OUT_RELOC(ctx, decode_state->slice_data->bo, - I915_GEM_DOMAIN_SAMPLER, 0, - slice_param->slice_data_offset + (slice_param->macroblock_offset >> 3)); - OUT_BATCH(ctx, - ((slice_param->slice_horizontal_position << 24) | - (slice_param->slice_vertical_position << 16) | - (127 << 8) | - (slice_param->macroblock_offset & 0x7))); - OUT_BATCH(ctx, slice_param->quantiser_scale_code << 24); - ADVANCE_BATCH(ctx); - slice_param++; + dri_bo_unreference(kernel->bo); + kernel->bo = NULL; } + + mpeg2_vld_kernels = NULL; } void -i965_media_mpeg2_decode_init(VADriverContextP ctx) +i965_media_mpeg2_decode_init(VADriverContextP ctx, struct decode_state *decode_state) { struct i965_driver_data *i965 = i965_driver_data(ctx); struct i965_media_state *media_state = &i965->media_state; dri_bo *bo; + int i; + if (mpeg2_vld_kernels == NULL) { + /* kernel */ + assert(NUM_MPEG2_VLD_KERNELS == (sizeof(mpeg2_vld_kernels_gen5) / + sizeof(mpeg2_vld_kernels_gen5[0]))); + assert(NUM_MPEG2_VLD_KERNELS <= MAX_INTERFACE_DESC); + + if (IS_IRONLAKE(i965->intel.device_id)) + mpeg2_vld_kernels = mpeg2_vld_kernels_gen5; + else + mpeg2_vld_kernels = mpeg2_vld_kernels_gen4; + + for (i = 0; i < NUM_MPEG2_VLD_KERNELS; i++) { + struct media_kernel *kernel = &mpeg2_vld_kernels[i]; + kernel->bo = dri_bo_alloc(i965->intel.bufmgr, + kernel->name, + kernel->size, 64); + assert(kernel->bo); + dri_bo_subdata(kernel->bo, 0, kernel->size, kernel->bin); + } + + /* URB */ + media_state->urb.num_vfe_entries = 28; + media_state->urb.size_vfe_entry = 13; + + media_state->urb.num_cs_entries = 1; + media_state->urb.size_cs_entry = 16; + + media_state->urb.vfe_start = 0; + media_state->urb.cs_start = media_state->urb.vfe_start + + media_state->urb.num_vfe_entries * media_state->urb.size_vfe_entry; + assert(media_state->urb.cs_start + + media_state->urb.num_cs_entries * media_state->urb.size_cs_entry <= URB_SIZE((&i965->intel))); + + /* hook functions */ + media_state->media_states_setup = i965_media_mpeg2_states_setup; + media_state->media_objects = i965_media_mpeg2_objects; + media_state->free_private_context = i965_media_mpeg2_free_private_context; + } media_state->extended_state.enabled = 1; + media_state->indirect_object.bo = NULL; dri_bo_unreference(media_state->extended_state.bo); bo = dri_bo_alloc(i965->intel.bufmgr, "vld state", sizeof(struct i965_vld_state), 32); assert(bo); media_state->extended_state.bo = bo; - - /* URB */ - media_state->urb.num_vfe_entries = 28; - media_state->urb.size_vfe_entry = 13; - - media_state->urb.num_cs_entries = 1; - media_state->urb.size_cs_entry = 16; - - media_state->urb.vfe_start = 0; - media_state->urb.cs_start = media_state->urb.vfe_start + - media_state->urb.num_vfe_entries * media_state->urb.size_vfe_entry; - assert(media_state->urb.cs_start + - media_state->urb.num_cs_entries * media_state->urb.size_cs_entry <= URB_SIZE((&i965->intel))); - - /* hook functions */ - media_state->states_setup = i965_media_mpeg2_states_setup; - media_state->media_objects = i965_media_mpeg2_objects; - -} - -Bool -i965_media_mpeg2_init(VADriverContextP ctx) -{ - struct i965_driver_data *i965 = i965_driver_data(ctx); - int i; - - /* kernel */ - assert(NUM_MPEG2_VLD_KERNELS == (sizeof(mpeg2_vld_kernels_gen5) / - sizeof(mpeg2_vld_kernels_gen5[0]))); - assert(NUM_MPEG2_VLD_KERNELS <= MAX_INTERFACE_DESC); - - if (IS_IGDNG(i965->intel.device_id)) - mpeg2_vld_kernels = mpeg2_vld_kernels_gen5; - else - mpeg2_vld_kernels = mpeg2_vld_kernels_gen4; - - for (i = 0; i < NUM_MPEG2_VLD_KERNELS; i++) { - struct media_kernel *kernel = &mpeg2_vld_kernels[i]; - kernel->bo = dri_bo_alloc(i965->intel.bufmgr, - kernel->name, - kernel->size, 64); - assert(kernel->bo); - dri_bo_subdata(kernel->bo, 0, kernel->size, kernel->bin); - } - - return True; -} - -Bool -i965_media_mpeg2_ternimate(VADriverContextP ctx) -{ - int i; - - for (i = 0; i < NUM_MPEG2_VLD_KERNELS; i++) { - struct media_kernel *kernel = &mpeg2_vld_kernels[i]; - - dri_bo_unreference(kernel->bo); - kernel->bo = NULL; - } - - return True; } diff -Nru libva-1.0.1/i965_drv_video/i965_media_mpeg2.h libva-1.0.1-3+0.31.1/i965_drv_video/i965_media_mpeg2.h --- libva-1.0.1/i965_drv_video/i965_media_mpeg2.h 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/i965_media_mpeg2.h 2010-07-07 12:20:29.000000000 +0000 @@ -39,8 +39,6 @@ struct decode_state; -Bool i965_media_mpeg2_init(VADriverContextP ctx); -Bool i965_media_mpeg2_ternimate(VADriverContextP ctx); -void i965_media_mpeg2_decode_init(VADriverContextP ctx); +void i965_media_mpeg2_decode_init(VADriverContextP ctx, struct decode_state * decode_state); #endif /* _I965_MEDIA_MPEG2_H_ */ diff -Nru libva-1.0.1/i965_drv_video/i965_render.c libva-1.0.1-3+0.31.1/i965_drv_video/i965_render.c --- libva-1.0.1/i965_drv_video/i965_render.c 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/i965_render.c 2010-07-12 09:09:38.000000000 +0000 @@ -32,11 +32,12 @@ */ #include +#include #include #include -#include "va_backend.h" -#include "va_dricommon.h" +#include +#include "va/x11/va_dricommon.h" #include "intel_batchbuffer.h" #include "intel_driver.h" @@ -74,7 +75,7 @@ #include "shaders/render/exa_wm_write.g4b" }; -/* On IGDNG */ +/* On IRONLAKE */ static const unsigned int sf_kernel_static_gen5[][4] = { #include "shaders/render/exa_sf.g4b.gen5" @@ -182,8 +183,8 @@ #define URB_SF_ENTRIES 1 #define URB_SF_ENTRY_SIZE 2 -#define URB_CS_ENTRIES 0 -#define URB_CS_ENTRY_SIZE 0 +#define URB_CS_ENTRIES 1 +#define URB_CS_ENTRY_SIZE 1 static void i965_render_vs_unit(VADriverContextP ctx) @@ -197,7 +198,7 @@ vs_state = render_state->vs.state->virtual; memset(vs_state, 0, sizeof(*vs_state)); - if (IS_IGDNG(i965->intel.device_id)) + if (IS_IRONLAKE(i965->intel.device_id)) vs_state->thread4.nr_urb_entries = URB_VS_ENTRIES >> 2; else vs_state->thread4.nr_urb_entries = URB_VS_ENTRIES; @@ -311,7 +312,7 @@ wm_state->thread1.single_program_flow = 1; /* XXX */ - if (IS_IGDNG(i965->intel.device_id)) + if (IS_IRONLAKE(i965->intel.device_id)) wm_state->thread1.binding_table_entry_count = 0; /* hardware requirement */ else wm_state->thread1.binding_table_entry_count = 7; @@ -328,12 +329,14 @@ wm_state->wm4.stats_enable = 0; wm_state->wm4.sampler_state_pointer = render_state->wm.sampler->offset >> 5; - if (IS_IGDNG(i965->intel.device_id)) + if (IS_IRONLAKE(i965->intel.device_id)) { wm_state->wm4.sampler_count = 0; /* hardware requirement */ - else + wm_state->wm5.max_threads = 12 * 6 - 1; + } else { wm_state->wm4.sampler_count = (render_state->wm.sampler_count + 3) / 4; + wm_state->wm5.max_threads = 10 * 5 - 1; + } - wm_state->wm5.max_threads = PS_MAX_THREADS - 1; wm_state->wm5.thread_dispatch_enable = 1; wm_state->wm5.enable_16_pix = 1; wm_state->wm5.enable_8_pix = 0; @@ -374,7 +377,7 @@ wm_state->thread1.single_program_flow = 1; /* XXX */ - if (IS_IGDNG(i965->intel.device_id)) + if (IS_IRONLAKE(i965->intel.device_id)) wm_state->thread1.binding_table_entry_count = 0; /* hardware requirement */ else wm_state->thread1.binding_table_entry_count = 7; @@ -382,8 +385,8 @@ wm_state->thread2.scratch_space_base_pointer = 0; wm_state->thread2.per_thread_scratch_space = 0; /* 1024 bytes */ - wm_state->thread3.dispatch_grf_start_reg = 3; /* XXX */ - wm_state->thread3.const_urb_entry_read_length = 0; + wm_state->thread3.dispatch_grf_start_reg = 2; /* XXX */ + wm_state->thread3.const_urb_entry_read_length = 1; wm_state->thread3.const_urb_entry_read_offset = 0; wm_state->thread3.urb_entry_read_length = 1; /* XXX */ wm_state->thread3.urb_entry_read_offset = 0; /* XXX */ @@ -391,12 +394,14 @@ wm_state->wm4.stats_enable = 0; wm_state->wm4.sampler_state_pointer = render_state->wm.sampler->offset >> 5; - if (IS_IGDNG(i965->intel.device_id)) + if (IS_IRONLAKE(i965->intel.device_id)) { wm_state->wm4.sampler_count = 0; /* hardware requirement */ - else + wm_state->wm5.max_threads = 12 * 6 - 1; + } else { wm_state->wm4.sampler_count = (render_state->wm.sampler_count + 3) / 4; + wm_state->wm5.max_threads = 10 * 5 - 1; + } - wm_state->wm5.max_threads = PS_MAX_THREADS - 1; wm_state->wm5.thread_dispatch_enable = 1; wm_state->wm5.enable_16_pix = 1; wm_state->wm5.enable_8_pix = 0; @@ -531,7 +536,8 @@ int index, dri_bo *region, unsigned long offset, - int w, int h) + int w, int h, + int pitch, int format) { struct i965_driver_data *i965 = i965_driver_data(ctx); struct i965_render_state *render_state = &i965->render_state; @@ -547,7 +553,7 @@ ss = ss_bo->virtual; memset(ss, 0, sizeof(*ss)); ss->ss0.surface_type = I965_SURFACE_2D; - ss->ss0.surface_format = I965_SURFACEFORMAT_R8_UNORM; + ss->ss0.surface_format = format; ss->ss0.writedisable_alpha = 0; ss->ss0.writedisable_red = 0; ss->ss0.writedisable_green = 0; @@ -565,7 +571,7 @@ ss->ss2.mip_count = 0; ss->ss2.render_target_rotation = 0; - ss->ss3.pitch = w - 1; + ss->ss3.pitch = pitch - 1; dri_bo_emit_reloc(ss_bo, I915_GEM_DOMAIN_SAMPLER, 0, @@ -586,7 +592,7 @@ int index, dri_bo *region, unsigned long offset, - int w, int h, int format) + int w, int h, int p, int format) { struct i965_driver_data *i965 = i965_driver_data(ctx); struct i965_render_state *render_state = &i965->render_state; @@ -620,7 +626,7 @@ ss->ss2.mip_count = 0; ss->ss2.render_target_rotation = 0; - ss->ss3.pitch = w - 1; + ss->ss3.pitch = p - 1; dri_bo_emit_reloc(ss_bo, I915_GEM_DOMAIN_SAMPLER, 0, @@ -641,8 +647,10 @@ VASurfaceID surface) { struct i965_driver_data *i965 = i965_driver_data(ctx); + struct i965_render_state *render_state = &i965->render_state; struct object_surface *obj_surface; int w, h; + int rw, rh; dri_bo *region; obj_surface = SURFACE(surface); @@ -650,14 +658,22 @@ assert(obj_surface->bo); w = obj_surface->width; h = obj_surface->height; + rw = obj_surface->orig_width; + rh = obj_surface->orig_height; region = obj_surface->bo; - i965_render_src_surface_state(ctx, 1, region, 0, w, h); /* Y */ - i965_render_src_surface_state(ctx, 2, region, 0, w, h); - i965_render_src_surface_state(ctx, 3, region, w * h + w * h / 4, w / 2, h / 2); /* V */ - i965_render_src_surface_state(ctx, 4, region, w * h + w * h / 4, w / 2, h / 2); - i965_render_src_surface_state(ctx, 5, region, w * h, w / 2, h / 2); /* U */ - i965_render_src_surface_state(ctx, 6, region, w * h, w / 2, h / 2); + i965_render_src_surface_state(ctx, 1, region, 0, rw, rh, w, I965_SURFACEFORMAT_R8_UNORM); /* Y */ + i965_render_src_surface_state(ctx, 2, region, 0, rw, rh, w, I965_SURFACEFORMAT_R8_UNORM); + + if (render_state->interleaved_uv) { + i965_render_src_surface_state(ctx, 3, region, w * h, rw / 2, rh / 2, w, I965_SURFACEFORMAT_R8G8_UNORM); /* UV */ + i965_render_src_surface_state(ctx, 4, region, w * h, rw / 2, rh / 2, w, I965_SURFACEFORMAT_R8G8_UNORM); + } else { + i965_render_src_surface_state(ctx, 3, region, w * h, rw / 2, rh / 2, w / 2, I965_SURFACEFORMAT_R8_UNORM); /* U */ + i965_render_src_surface_state(ctx, 4, region, w * h, rw / 2, rh / 2, w / 2, I965_SURFACEFORMAT_R8_UNORM); + i965_render_src_surface_state(ctx, 5, region, w * h + w * h / 4, rw / 2, rh / 2, w / 2, I965_SURFACEFORMAT_R8_UNORM); /* V */ + i965_render_src_surface_state(ctx, 6, region, w * h + w * h / 4, rw / 2, rh / 2, w / 2, I965_SURFACEFORMAT_R8_UNORM); + } } static void @@ -678,8 +694,8 @@ region = obj_surface->bo; subpic_region = obj_image->bo; /*subpicture surface*/ - i965_subpic_render_src_surface_state(ctx, 1, subpic_region, 0, obj_subpic->width, obj_subpic->height, obj_subpic->format); - i965_subpic_render_src_surface_state(ctx, 2, subpic_region, 0, obj_subpic->width, obj_subpic->height, obj_subpic->format); + i965_subpic_render_src_surface_state(ctx, 1, subpic_region, 0, obj_subpic->width, obj_subpic->height, obj_subpic->pitch, obj_subpic->format); + i965_subpic_render_src_surface_state(ctx, 2, subpic_region, 0, obj_subpic->width, obj_subpic->height, obj_subpic->pitch, obj_subpic->format); } static void @@ -870,8 +886,8 @@ obj_surface = SURFACE(surface); assert(surface); - width = obj_surface->width; - height = obj_surface->height; + width = obj_surface->orig_width; + height = obj_surface->orig_height; u1 = (float)srcx / width; v1 = (float)srcy / height; @@ -902,6 +918,29 @@ } static void +i965_render_upload_constants(VADriverContextP ctx) +{ + struct i965_driver_data *i965 = i965_driver_data(ctx); + struct i965_render_state *render_state = &i965->render_state; + unsigned short *constant_buffer; + + if (render_state->curbe.upload) + return; + + dri_bo_map(render_state->curbe.bo, 1); + assert(render_state->curbe.bo->virtual); + constant_buffer = render_state->curbe.bo->virtual; + + if (render_state->interleaved_uv) + *constant_buffer = 1; + else + *constant_buffer = 0; + + dri_bo_unmap(render_state->curbe.bo); + render_state->curbe.upload = 1; +} + +static void i965_surface_render_state_setup(VADriverContextP ctx, VASurfaceID surface, short srcx, @@ -925,6 +964,7 @@ i965_render_upload_vertex(ctx, surface, srcx, srcy, srcw, srch, destx, desty, destw, desth); + i965_render_upload_constants(ctx); } static void i965_subpic_render_state_setup(VADriverContextP ctx, @@ -979,7 +1019,7 @@ { struct i965_driver_data *i965 = i965_driver_data(ctx); - if (IS_IGDNG(i965->intel.device_id)) { + if (IS_IRONLAKE(i965->intel.device_id)) { BEGIN_BATCH(ctx, 8); OUT_BATCH(ctx, CMD_STATE_BASE_ADDRESS | 6); OUT_BATCH(ctx, 0 | BASE_ADDRESS_MODIFY); @@ -1098,6 +1138,20 @@ } static void +i965_render_constant_buffer(VADriverContextP ctx) +{ + struct i965_driver_data *i965 = i965_driver_data(ctx); + struct i965_render_state *render_state = &i965->render_state; + + BEGIN_BATCH(ctx, 2); + OUT_BATCH(ctx, CMD_CONSTANT_BUFFER | (1 << 8) | (2 - 2)); + OUT_RELOC(ctx, render_state->curbe.bo, + I915_GEM_DOMAIN_INSTRUCTION, 0, + URB_CS_ENTRY_SIZE - 1); + ADVANCE_BATCH(ctx); +} + +static void i965_render_drawing_rectangle(VADriverContextP ctx) { struct i965_driver_data *i965 = i965_driver_data(ctx); @@ -1117,7 +1171,7 @@ { struct i965_driver_data *i965 = i965_driver_data(ctx); - if (IS_IGDNG(i965->intel.device_id)) { + if (IS_IRONLAKE(i965->intel.device_id)) { BEGIN_BATCH(ctx, 5); OUT_BATCH(ctx, CMD_VERTEX_ELEMENTS | 3); /* offset 0: X,Y -> {X, Y, 1.0, 1.0} */ @@ -1205,7 +1259,7 @@ ((4 * 4) << VB0_BUFFER_PITCH_SHIFT)); OUT_RELOC(ctx, render_state->vb.vertex_buffer, I915_GEM_DOMAIN_VERTEX, 0, 0); - if (IS_IGDNG(i965->intel.device_id)) + if (IS_IRONLAKE(i965->intel.device_id)) OUT_RELOC(ctx, render_state->vb.vertex_buffer, I915_GEM_DOMAIN_VERTEX, 0, 12 * 4); else OUT_BATCH(ctx, 3); @@ -1281,6 +1335,7 @@ i965_render_pipelined_pointers(ctx); i965_render_urb_layout(ctx); i965_render_cs_urb_layout(ctx); + i965_render_constant_buffer(ctx); i965_render_drawing_rectangle(ctx); i965_render_vertex_elements(ctx); i965_render_startup(ctx); @@ -1444,13 +1499,14 @@ i965_render_init(VADriverContextP ctx) { struct i965_driver_data *i965 = i965_driver_data(ctx); + struct i965_render_state *render_state = &i965->render_state; int i; /* kernel */ assert(NUM_RENDER_KERNEL == (sizeof(render_kernels_gen5) / sizeof(render_kernels_gen5[0]))); - if (IS_IGDNG(i965->intel.device_id)) + if (IS_IRONLAKE(i965->intel.device_id)) render_kernels = render_kernels_gen5; else render_kernels = render_kernels_gen4; @@ -1459,11 +1515,18 @@ struct render_kernel *kernel = &render_kernels[i]; kernel->bo = dri_bo_alloc(i965->intel.bufmgr, kernel->name, - kernel->size, 64); + kernel->size, 0x1000); assert(kernel->bo); dri_bo_subdata(kernel->bo, 0, kernel->size, kernel->bin); } + /* constant buffer */ + render_state->curbe.bo = dri_bo_alloc(i965->intel.bufmgr, + "constant buffer", + 4096, 64); + assert(render_state->curbe.bo); + render_state->curbe.upload = 0; + return True; } @@ -1474,6 +1537,9 @@ struct i965_driver_data *i965 = i965_driver_data(ctx); struct i965_render_state *render_state = &i965->render_state; + dri_bo_unreference(render_state->curbe.bo); + render_state->curbe.bo = NULL; + for (i = 0; i < NUM_RENDER_KERNEL; i++) { struct render_kernel *kernel = &render_kernels[i]; diff -Nru libva-1.0.1/i965_drv_video/i965_render.h libva-1.0.1-3+0.31.1/i965_drv_video/i965_render.h --- libva-1.0.1/i965_drv_video/i965_render.h 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/i965_render.h 2010-07-07 12:20:29.000000000 +0000 @@ -43,7 +43,6 @@ struct { dri_bo *state; - dri_bo *prog; } sf; struct { @@ -52,7 +51,6 @@ dri_bo *surface[MAX_RENDER_SURFACES]; dri_bo *binding_table; dri_bo *state; - dri_bo *prog; } wm; struct { @@ -60,6 +58,12 @@ dri_bo *viewport; } cc; + struct { + dri_bo *bo; + int upload; + } curbe; + + int interleaved_uv; struct intel_region *draw_region; }; diff -Nru libva-1.0.1/i965_drv_video/i965_structs.h libva-1.0.1-3+0.31.1/i965_drv_video/i965_structs.h --- libva-1.0.1/i965_drv_video/i965_structs.h 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/i965_structs.h 2010-07-07 12:20:29.000000000 +0000 @@ -34,16 +34,20 @@ unsigned int obj_id:24; } vfex0; - struct { - unsigned int residual_grf_offset:5; - unsigned int pad0:3; - unsigned int weight_grf_offset:5; - unsigned int pad1:3; - unsigned int residual_data_offset:8; - unsigned int sub_field_present_flag:2; - unsigned int residual_data_fix_offset:1; - unsigned int pad2:5; - }vfex1; + union { + struct { + unsigned int residual_grf_offset:5; + unsigned int pad0:3; + unsigned int weight_grf_offset:5; + unsigned int pad1:3; + unsigned int residual_data_offset:8; + unsigned int sub_field_present_flag:2; + unsigned int residual_data_fix_offset_flag:1; + unsigned int pad2:5; + } avc; + + unsigned int vc1; + } vfex1; struct { unsigned int remap_index_0:4; @@ -68,18 +72,32 @@ } remap_table1; struct { - unsigned int scoreboard_mask:8; + unsigned int mask:8; unsigned int pad:22; unsigned int type:1; unsigned int enable:1; } scoreboard0; struct { - unsigned int ignore; + int delta_x0:4; + int delta_y0:4; + int delta_x1:4; + int delta_y1:4; + int delta_x2:4; + int delta_y2:4; + int delta_x3:4; + int delta_y3:4; } scoreboard1; struct { - unsigned int ignore; + int delta_x4:4; + int delta_y4:4; + int delta_x5:4; + int delta_y5:4; + int delta_x6:4; + int delta_y6:4; + int delta_x7:4; + int delta_y7:4; } scoreboard2; unsigned int pad; @@ -177,8 +195,9 @@ unsigned int cube_neg_y:1; unsigned int cube_pos_x:1; unsigned int cube_neg_x:1; - unsigned int pad:3; + unsigned int pad:2; unsigned int render_cache_read_mode:1; + unsigned int cube_map_corner_mode:1; unsigned int mipmap_layout_mode:1; unsigned int vert_line_stride_ofs:1; unsigned int vert_line_stride:1; diff -Nru libva-1.0.1/i965_drv_video/intel_batchbuffer.c libva-1.0.1-3+0.31.1/i965_drv_video/intel_batchbuffer.c --- libva-1.0.1/i965_drv_video/intel_batchbuffer.c 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/intel_batchbuffer.c 2010-07-07 12:20:29.000000000 +0000 @@ -25,10 +25,11 @@ * **************************************************************************/ +#include #include #include -#include "va_backend.h" +#include #include "intel_batchbuffer.h" @@ -36,19 +37,21 @@ intel_batchbuffer_reset(struct intel_batchbuffer *batch) { struct intel_driver_data *intel = batch->intel; + int batch_size = batch->flag == I915_EXEC_RENDER ? BATCH_SIZE : (BATCH_SIZE * 8); - if (batch->buffer != NULL) { - dri_bo_unreference(batch->buffer); - batch->buffer = NULL; - } - - batch->buffer = dri_bo_alloc(intel->bufmgr, "batch buffer", - BATCH_SIZE, 0x1000); + assert(batch->flag == I915_EXEC_RENDER || + batch->flag == I915_EXEC_BSD); + dri_bo_unreference(batch->buffer); + batch->buffer = dri_bo_alloc(intel->bufmgr, + batch->flag == I915_EXEC_RENDER ? "render batch buffer" : "bsd batch buffer", + batch_size, + 0x1000); assert(batch->buffer); dri_bo_map(batch->buffer, 1); + assert(batch->buffer->virtual); batch->map = batch->buffer->virtual; - batch->size = BATCH_SIZE; + batch->size = batch_size; batch->ptr = batch->map; batch->atomic = 0; } @@ -57,11 +60,19 @@ intel_batchbuffer_init(struct intel_driver_data *intel) { intel->batch = calloc(1, sizeof(*(intel->batch))); - assert(intel->batch); intel->batch->intel = intel; + intel->batch->flag = I915_EXEC_RENDER; + intel->batch->run = drm_intel_bo_mrb_exec; intel_batchbuffer_reset(intel->batch); + intel->batch_bcs = calloc(1, sizeof(*(intel->batch_bcs))); + assert(intel->batch_bcs); + intel->batch_bcs->intel = intel; + intel->batch_bcs->flag = I915_EXEC_BSD; + intel->batch_bcs->run = drm_intel_bo_mrb_exec; + intel_batchbuffer_reset(intel->batch_bcs); + return True; } @@ -79,14 +90,25 @@ intel->batch = NULL; } + if (intel->batch_bcs) { + if (intel->batch_bcs->map) { + dri_bo_unmap(intel->batch_bcs->buffer); + intel->batch_bcs->map = NULL; + } + + dri_bo_unreference(intel->batch_bcs->buffer); + free(intel->batch_bcs); + intel->batch_bcs = NULL; + } + return True; } -Bool -intel_batchbuffer_flush(VADriverContextP ctx) +static Bool +intel_batchbuffer_flush_helper(VADriverContextP ctx, + struct intel_batchbuffer *batch) { - struct intel_driver_data *intel = intel_driver_data(ctx); - struct intel_batchbuffer *batch = intel->batch; + struct intel_driver_data *intel = batch->intel; unsigned int used = batch->ptr - batch->map; int is_locked = intel->locked; @@ -107,98 +129,228 @@ if (!is_locked) intel_lock_hardware(ctx); - dri_bo_exec(batch->buffer, used, 0, 0, 0); + batch->run(batch->buffer, used, 0, 0, 0, batch->flag); if (!is_locked) intel_unlock_hardware(ctx); - intel_batchbuffer_reset(intel->batch); + intel_batchbuffer_reset(batch); return True; } +Bool +intel_batchbuffer_flush(VADriverContextP ctx) +{ + struct intel_driver_data *intel = intel_driver_data(ctx); + + return intel_batchbuffer_flush_helper(ctx, intel->batch); +} + +Bool +intel_batchbuffer_flush_bcs(VADriverContextP ctx) +{ + struct intel_driver_data *intel = intel_driver_data(ctx); + + return intel_batchbuffer_flush_helper(ctx, intel->batch_bcs); +} + static unsigned int -intel_batchbuffer_space(struct intel_batchbuffer *batch) +intel_batchbuffer_space_helper(struct intel_batchbuffer *batch) { return (batch->size - BATCH_RESERVED) - (batch->ptr - batch->map); } +static void +intel_batchbuffer_emit_dword_helper(struct intel_batchbuffer *batch, + unsigned int x) +{ + assert(intel_batchbuffer_space_helper(batch) >= 4); + *(unsigned int *)batch->ptr = x; + batch->ptr += 4; +} + void intel_batchbuffer_emit_dword(VADriverContextP ctx, unsigned int x) { struct intel_driver_data *intel = intel_driver_data(ctx); - struct intel_batchbuffer *batch = intel->batch; - assert(intel_batchbuffer_space(batch) >= 4); - *(unsigned int*)batch->ptr = x; - batch->ptr += 4; + intel_batchbuffer_emit_dword_helper(intel->batch, x); } void -intel_batchbuffer_emit_reloc(VADriverContextP ctx, dri_bo *bo, - uint32_t read_domains, uint32_t write_domains, - uint32_t delta) +intel_batchbuffer_emit_dword_bcs(VADriverContextP ctx, unsigned int x) { struct intel_driver_data *intel = intel_driver_data(ctx); - struct intel_batchbuffer *batch = intel->batch; + intel_batchbuffer_emit_dword_helper(intel->batch_bcs, x); +} + +static void +intel_batchbuffer_emit_reloc_helper(VADriverContextP ctx, + struct intel_batchbuffer *batch, + dri_bo *bo, + uint32_t read_domains, uint32_t write_domains, + uint32_t delta) +{ assert(batch->ptr - batch->map < batch->size); dri_bo_emit_reloc(batch->buffer, read_domains, write_domains, delta, batch->ptr - batch->map, bo); - intel_batchbuffer_emit_dword(ctx, bo->offset + delta); + intel_batchbuffer_emit_dword_helper(batch, bo->offset + delta); } void -intel_batchbuffer_require_space(VADriverContextP ctx, unsigned int size) +intel_batchbuffer_emit_reloc(VADriverContextP ctx, dri_bo *bo, + uint32_t read_domains, uint32_t write_domains, + uint32_t delta) { struct intel_driver_data *intel = intel_driver_data(ctx); - struct intel_batchbuffer *batch = intel->batch; + intel_batchbuffer_emit_reloc_helper(ctx, intel->batch, + bo, read_domains, write_domains, + delta); +} + +void +intel_batchbuffer_emit_reloc_bcs(VADriverContextP ctx, dri_bo *bo, + uint32_t read_domains, uint32_t write_domains, + uint32_t delta) +{ + struct intel_driver_data *intel = intel_driver_data(ctx); + + intel_batchbuffer_emit_reloc_helper(ctx, intel->batch_bcs, + bo, read_domains, write_domains, + delta); +} + +static void +intel_batchbuffer_require_space_helper(VADriverContextP ctx, + struct intel_batchbuffer *batch, + unsigned int size) +{ assert(size < batch->size - 8); - if (intel_batchbuffer_space(batch) < size) { - intel_batchbuffer_flush(ctx); + if (intel_batchbuffer_space_helper(batch) < size) { + intel_batchbuffer_flush_helper(ctx, batch); } } void -intel_batchbuffer_data(VADriverContextP ctx, void *data, unsigned int size) +intel_batchbuffer_require_space(VADriverContextP ctx, unsigned int size) { struct intel_driver_data *intel = intel_driver_data(ctx); - struct intel_batchbuffer *batch = intel->batch; + intel_batchbuffer_require_space_helper(ctx, intel->batch, size); +} + +void +intel_batchbuffer_require_space_bcs(VADriverContextP ctx, unsigned int size) +{ + struct intel_driver_data *intel = intel_driver_data(ctx); + + intel_batchbuffer_require_space_helper(ctx, intel->batch_bcs, size); +} + +static void +intel_batchbuffer_data_helper(VADriverContextP ctx, + struct intel_batchbuffer *batch, + void *data, + unsigned int size) +{ assert((size & 3) == 0); - intel_batchbuffer_require_space(ctx, size); + intel_batchbuffer_require_space_helper(ctx, batch, size); assert(batch->ptr); memcpy(batch->ptr, data, size); batch->ptr += size; } +void +intel_batchbuffer_data(VADriverContextP ctx, void *data, unsigned int size) +{ + struct intel_driver_data *intel = intel_driver_data(ctx); + + intel_batchbuffer_data_helper(ctx, intel->batch, data, size); +} + +void +intel_batchbuffer_data_bcs(VADriverContextP ctx, void *data, unsigned int size) +{ + struct intel_driver_data *intel = intel_driver_data(ctx); + + intel_batchbuffer_data_helper(ctx, intel->batch_bcs, data, size); +} + +static void +intel_batchbuffer_emit_mi_flush_helper(VADriverContextP ctx, + struct intel_batchbuffer *batch) +{ + intel_batchbuffer_require_space_helper(ctx, batch, 4); + intel_batchbuffer_emit_dword_helper(batch, + MI_FLUSH | STATE_INSTRUCTION_CACHE_INVALIDATE); +} + void intel_batchbuffer_emit_mi_flush(VADriverContextP ctx) { - intel_batchbuffer_require_space(ctx, 4); - intel_batchbuffer_emit_dword(ctx, MI_FLUSH | STATE_INSTRUCTION_CACHE_INVALIDATE); + struct intel_driver_data *intel = intel_driver_data(ctx); + + intel_batchbuffer_emit_mi_flush_helper(ctx, intel->batch); } void -intel_batchbuffer_start_atomic(VADriverContextP ctx, unsigned int size) +intel_batchbuffer_emit_mi_flush_bcs(VADriverContextP ctx) { struct intel_driver_data *intel = intel_driver_data(ctx); - struct intel_batchbuffer *batch = intel->batch; + intel_batchbuffer_emit_mi_flush_helper(ctx, intel->batch_bcs); +} + +void +intel_batchbuffer_start_atomic_helper(VADriverContextP ctx, + struct intel_batchbuffer *batch, + unsigned int size) +{ assert(!batch->atomic); - intel_batchbuffer_require_space(ctx, size); + intel_batchbuffer_require_space_helper(ctx, batch, size); batch->atomic = 1; } void -intel_batchbuffer_end_atomic(VADriverContextP ctx) +intel_batchbuffer_start_atomic(VADriverContextP ctx, unsigned int size) +{ + struct intel_driver_data *intel = intel_driver_data(ctx); + + intel_batchbuffer_start_atomic_helper(ctx, intel->batch, size); +} + +void +intel_batchbuffer_start_atomic_bcs(VADriverContextP ctx, unsigned int size) { struct intel_driver_data *intel = intel_driver_data(ctx); - struct intel_batchbuffer *batch = intel->batch; + intel_batchbuffer_start_atomic_helper(ctx, intel->batch_bcs, size); +} +void +intel_batchbuffer_end_atomic_helper(struct intel_batchbuffer *batch) +{ assert(batch->atomic); batch->atomic = 0; } + +void +intel_batchbuffer_end_atomic(VADriverContextP ctx) +{ + struct intel_driver_data *intel = intel_driver_data(ctx); + + intel_batchbuffer_end_atomic_helper(intel->batch); +} + +void +intel_batchbuffer_end_atomic_bcs(VADriverContextP ctx) +{ + struct intel_driver_data *intel = intel_driver_data(ctx); + + intel_batchbuffer_end_atomic_helper(intel->batch_bcs); +} + diff -Nru libva-1.0.1/i965_drv_video/intel_batchbuffer_dump.c libva-1.0.1-3+0.31.1/i965_drv_video/intel_batchbuffer_dump.c --- libva-1.0.1/i965_drv_video/intel_batchbuffer_dump.c 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/intel_batchbuffer_dump.c 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,409 @@ +#include +#include +#include +#include + +#include "intel_driver.h" +#include "intel_batchbuffer_dump.h" + +#define BUFFER_FAIL(_count, _len, _name) do { \ + fprintf(gout, "Buffer size too small in %s (%d < %d)\n", \ + (_name), (_count), (_len)); \ + (*failures)++; \ + return count; \ +} while (0) + +static FILE *gout; + +static void +instr_out(unsigned int *data, unsigned int offset, unsigned int index, char *fmt, ...) +{ + va_list va; + + fprintf(gout, "0x%08x: 0x%08x:%s ", offset + index * 4, data[index], + index == 0 ? "" : " "); + va_start(va, fmt); + vfprintf(gout, fmt, va); + va_end(va); +} + + +static int +dump_mi(unsigned int *data, unsigned int offset, int count, unsigned int device, int *failures) +{ + unsigned int opcode; + int length, i; + + struct { + unsigned int opcode; + int mask_length; + int min_len; + int max_len; + char *name; + } mi_commands[] = { + { 0x00, 0, 1, 1, "MI_NOOP" }, + { 0x04, 0, 1, 1, "MI_FLUSH" }, + { 0x0a, 0, 1, 1, "MI_BATCH_BUFFER_END" }, + }; + + opcode = ((data[0] & MASK_MI_OPCODE) >> SHIFT_MI_OPCODE); + + for (i = 0; i < sizeof(mi_commands) / sizeof(mi_commands[0]); i++) { + if (opcode == mi_commands[i].opcode) { + int index; + + length = 1; + instr_out(data, offset, 0, "%s\n", mi_commands[i].name); + + if (mi_commands[i].max_len > 1) { + length = (data[0] & mi_commands[i].mask_length) + 2; + + if (length < mi_commands[i].min_len || + length > mi_commands[i].max_len) { + fprintf(gout, "Bad length (%d) in %s, [%d, %d]\n", + length, mi_commands[i].name, + mi_commands[i].min_len, + mi_commands[i].max_len); + } + } + + for (index = 1; index < length; index++) { + if (index >= count) + BUFFER_FAIL(count, length, mi_commands[i].name); + + instr_out(data, offset, index, "dword %d\n", index); + } + + return length; + } + } + + instr_out(data, offset, 0, "UNKNOWN MI COMMAND\n"); + (*failures)++; + return 1; +} + +static int +dump_gfxpipe_3d(unsigned int *data, unsigned int offset, int count, unsigned int device, int *failures) +{ + instr_out(data, offset, 0, "UNKNOWN 3D COMMAND\n"); + (*failures)++; + + return 1; +} + +static void +dump_avc_bsd_img_state(unsigned int *data, unsigned int offset, unsigned int device, int *failures) +{ + int img_struct = ((data[3] >> 8) & 0x3); + + instr_out(data, offset, 1, "frame size: %d\n", (data[1] & 0xffff)); + instr_out(data, offset, 2, "width: %d, height: %d\n", (data[2] & 0xff), (data[2] >> 16) & 0xff); + instr_out(data, offset, 3, + "second_chroma_qp_offset: %d," + "chroma_qp_offset: %d," + "QM present flag: %d," + "image struct: %s," + "img_dec_fs_idc: %d," + "\n", + (data[3] >> 24) & 0x1f, + (data[3] >> 16) & 0x1f, + (data[3] >> 10) & 0x1, + (img_struct == 0) ? "frame" : (img_struct == 2) ? "invalid" : (img_struct == 1) ? "top field" : "bottom field", + data[3] & 0xff); + instr_out(data, offset, 4, + "residual off: 0x%x," + "16MV: %d," + "chroma fmt: %d," + "CABAC: %d," + "non-ref: %d," + "constrained intra: %d," + "direct8x8: %d," + "trans8x8: %d," + "MB only: %d," + "MBAFF: %d," + "\n", + (data[4] >> 24) & 0xff, + (data[4] >> 12) & 0x1, + (data[4] >> 10) & 0x3, + (data[4] >> 7) & 0x1, + (data[4] >> 6) & 0x1, + (data[4] >> 5) & 0x1, + (data[4] >> 4) & 0x1, + (data[4] >> 3) & 0x1, + (data[4] >> 2) & 0x1, + (data[4] >> 1) & 0x1); + instr_out(data, offset, 5, "AVC-IT Command Header\n"); +} + +static void +dump_avc_bsd_qm_state(unsigned int *data, unsigned int offset, unsigned int device, int *failures) +{ + unsigned int length = ((data[0] & MASK_GFXPIPE_LENGTH) >> SHIFT_GFXPIPE_LENGTH) + 2; + int i; + + instr_out(data, offset, 1, "user default: %02x, QM list present: %02x\n", + (data[1] >> 8) & 0xff, data[1] & 0xff); + + for (i = 2; i < length; i++) { + instr_out(data, offset, i, "dword %d\n", i); + } +} + +static void +dump_avc_bsd_slice_state(unsigned int *data, unsigned int offset, unsigned int device, int *failures) +{ + +} + +static void +dump_avc_bsd_buf_base_state(unsigned int *data, unsigned int offset, unsigned int device, int *failures) +{ + int i; + + instr_out(data, offset, 1, "BSD row store base address\n"); + instr_out(data, offset, 2, "MPR row store base address\n"); + instr_out(data, offset, 3, "AVC-IT command buffer base address\n"); + instr_out(data, offset, 4, "AVC-IT data buffer: 0x%08x, write offset: 0x%x\n", + data[4] & 0xFFFFF000, data[4] & 0xFC0); + instr_out(data, offset, 5, "ILDB data buffer\n"); + + for (i = 6; i < 38; i++) { + instr_out(data, offset, i, "Direct MV read base address for reference frame %d\n", i - 6); + } + + instr_out(data, offset, 38, "direct mv wr0 top\n"); + instr_out(data, offset, 39, "direct mv wr0 bottom\n"); + + for (i = 40; i < 74; i++) { + instr_out(data, offset, i, "POC List %d\n", i - 40); + } +} + +static void +dump_bsd_ind_obj_base_addr(unsigned int *data, unsigned int offset, unsigned int device, int *failures) +{ + instr_out(data, offset, 1, "AVC indirect object base address\n"); + instr_out(data, offset, 2, "AVC Indirect Object Access Upper Bound\n"); +} + +static void +dump_ironlake_avc_bsd_object(unsigned int *data, unsigned int offset, int *failures) +{ + int slice_type = data[3] & 0xf; + int i, is_phantom = ((data[1] & 0x3fffff) == 0); + + if (!is_phantom) { + instr_out(data, offset, 1, "Encrypted: %d, bitsteam length: %d\n", data[1] >> 31, data[1] & 0x3fffff); + instr_out(data, offset, 2, "Indirect Data Start Address: %d\n", data[2] & 0x1fffffff); + instr_out(data, offset, 3, "%s Slice\n", slice_type == 0 ? "P" : slice_type == 1 ? "B" : "I"); + instr_out(data, offset, 4, + "Num_Ref_Idx_L1: %d," + "Num_Ref_Idx_L0: %d," + "Log2WeightDenomChroma: %d," + "Log2WeightDenomLuma: %d" + "\n", + (data[4] >> 24) & 0x3f, + (data[4] >> 16) & 0x3f, + (data[4] >> 8) & 0x3, + (data[4] >> 0) & 0x3); + instr_out(data, offset, 5, + "WeightedPredIdc: %d," + "DirectPredType: %d," + "DisableDeblockingFilter: %d," + "CabacInitIdc: %d," + "SliceQp: %d," + "SliceBetaOffsetDiv2: %d," + "SliceAlphaC0OffsetDiv2: %d" + "\n", + (data[5] >> 30) & 0x3, + (data[5] >> 29) & 0x1, + (data[5] >> 27) & 0x3, + (data[5] >> 24) & 0x3, + (data[5] >> 16) & 0x3f, + (data[5] >> 8) & 0xf, + (data[5] >> 0) & 0xf); + instr_out(data, offset, 6, + "Slice_MB_Start_Vert_Pos: %d," + "Slice_MB_Start_Hor_Pos: %d," + "Slice_Start_Mb_Num: %d" + "\n", + (data[6] >> 24) & 0xff, + (data[6] >> 16) & 0xff, + (data[6] >> 0) & 0x7fff); + instr_out(data, offset, 7, + "Fix_Prev_Mb_Skipped: %d," + "First_MB_Bit_Offset: %d" + "\n", + (data[7] >> 7) & 0x1, + (data[7] >> 0) & 0x7); + + for (i = 8; i < 16; i++) + instr_out(data, offset, i, "dword %d\n", i); + } else { + instr_out(data, offset, 1, "phantom slice\n"); + + for (i = 2; i < 6; i++) + instr_out(data, offset, i, "dword %d\n", i); + + instr_out(data, offset, 6, + "Slice_Start_Mb_Num: %d" + "\n", + (data[6] >> 0) & 0x7fff); + + for (i = 7; i < 16; i++) + instr_out(data, offset, i, "dword %d\n", i); + + } +} + +static void +dump_g4x_avc_bsd_object(unsigned int *data, unsigned int offset, int *failures) +{ + +} + +static void +dump_avc_bsd_object(unsigned int *data, unsigned int offset, unsigned int device, int *failures) +{ + if (IS_IRONLAKE(device)) + dump_ironlake_avc_bsd_object(data, offset, failures); + else + dump_g4x_avc_bsd_object(data, offset, failures); +} + +static int +dump_bsd_avc(unsigned int *data, unsigned int offset, int count, unsigned int device, int *failures) +{ + unsigned int subopcode; + int length, i; + + struct { + unsigned int subopcode; + int min_len; + int max_len; + char *name; + void (*detail)(unsigned int *data, unsigned int offset, unsigned int device, int *failures); + } avc_commands[] = { + { 0x00, 0x06, 0x06, "AVC_BSD_IMG_STATE", dump_avc_bsd_img_state }, + { 0x01, 0x02, 0x3a, "AVC_BSD_QM_STATE", dump_avc_bsd_qm_state }, + { 0x02, 0x02, 0xd2, "AVC_BSD_SLICE_STATE", NULL }, + { 0x03, 0x4a, 0x4a, "AVC_BSD_BUF_BASE_STATE", dump_avc_bsd_buf_base_state }, + { 0x04, 0x03, 0x03, "BSD_IND_OBJ_BASE_ADDR", dump_bsd_ind_obj_base_addr }, + { 0x08, 0x08, 0x10, "AVC_BSD_OBJECT", dump_avc_bsd_object }, + }; + + subopcode = ((data[0] & MASK_GFXPIPE_SUBOPCODE) >> SHIFT_GFXPIPE_SUBOPCODE); + + for (i = 0; i < sizeof(avc_commands) / sizeof(avc_commands[0]); i++) { + if (subopcode == avc_commands[i].subopcode) { + unsigned int index; + + length = (data[0] & MASK_GFXPIPE_LENGTH) >> SHIFT_GFXPIPE_LENGTH; + length += 2; + instr_out(data, offset, 0, "%s\n", avc_commands[i].name); + + if (length < avc_commands[i].min_len || + length > avc_commands[i].max_len) { + fprintf(gout, "Bad length(%d) in %s [%d, %d]\n", + length, avc_commands[i].name, + avc_commands[i].min_len, + avc_commands[i].max_len); + } + + if (length - 1 >= count) + BUFFER_FAIL(count, length, avc_commands[i].name); + + if (avc_commands[i].detail) + avc_commands[i].detail(data, offset, device, failures); + else { + for (index = 1; index < length; index++) + instr_out(data, offset, index, "dword %d\n", index); + } + + return length; + } + } + + instr_out(data, offset, 0, "UNKNOWN AVC COMMAND\n"); + (*failures)++; + return 1; +} + +static int +dump_gfxpipe_bsd(unsigned int *data, unsigned int offset, int count, unsigned int device, int *failures) +{ + int length; + + switch ((data[0] & MASK_GFXPIPE_OPCODE) >> SHIFT_GFXPIPE_OPCODE) { + case OPCODE_BSD_AVC: + length = dump_bsd_avc(data, offset, count, device, failures); + break; + + default: + length = 1; + (*failures)++; + instr_out(data, offset, 0, "UNKNOWN BSD OPCODE\n"); + break; + } + + return length; +} + +static int +dump_gfxpipe(unsigned int *data, unsigned int offset, int count, unsigned int device, int *failures) +{ + int length; + + switch ((data[0] & MASK_GFXPIPE_SUBTYPE) >> SHIFT_GFXPIPE_SUBTYPE) { + case GFXPIPE_3D: + length = dump_gfxpipe_3d(data, offset, count, device, failures); + break; + + case GFXPIPE_BSD: + length = dump_gfxpipe_bsd(data, offset, count, device, failures); + break; + + default: + length = 1; + (*failures)++; + instr_out(data, offset, 0, "UNKNOWN GFXPIPE COMMAND\n"); + break; + } + + return length; +} + +int intel_batchbuffer_dump(unsigned int *data, unsigned int offset, int count, unsigned int device) +{ + int index = 0; + int failures = 0; + + gout = fopen("/tmp/bsd_command_dump.txt", "w+"); + + while (index < count) { + switch ((data[index] & MASK_CMD_TYPE) >> SHIFT_CMD_TYPE) { + case CMD_TYPE_MI: + index += dump_mi(data + index, offset + index * 4, + count - index, device, &failures); + break; + + case CMD_TYPE_GFXPIPE: + index += dump_gfxpipe(data + index, offset + index * 4, + count - index, device, &failures); + break; + + default: + instr_out(data, offset, index, "UNKNOWN COMMAND\n"); + failures++; + index++; + break; + } + + fflush(gout); + } + + fclose(gout); + + return failures; +} diff -Nru libva-1.0.1/i965_drv_video/intel_batchbuffer_dump.h libva-1.0.1-3+0.31.1/i965_drv_video/intel_batchbuffer_dump.h --- libva-1.0.1/i965_drv_video/intel_batchbuffer_dump.h 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/intel_batchbuffer_dump.h 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,49 @@ +#ifndef _INTEL_BATCHBUFFER_DUMP_H_ +#define _INTEL_BATCHBUFFER_DUMP_H_ + +#define MASK_CMD_TYPE 0xE0000000 + +#define SHIFT_CMD_TYPE 29 + +#define CMD_TYPE_GFXPIPE 3 +#define CMD_TYPE_BLT 2 +#define CMD_TYPE_MI 0 + + +/* GFXPIPE */ +#define MASK_GFXPIPE_SUBTYPE 0x18000000 +#define MASK_GFXPIPE_OPCODE 0x07000000 +#define MASK_GFXPIPE_SUBOPCODE 0x00FF0000 +#define MASK_GFXPIPE_LENGTH 0x0000FFFF + +#define SHIFT_GFXPIPE_SUBTYPE 27 +#define SHIFT_GFXPIPE_OPCODE 24 +#define SHIFT_GFXPIPE_SUBOPCODE 16 +#define SHIFT_GFXPIPE_LENGTH 0 + +/* 3D */ +#define GFXPIPE_3D 3 + +/* BSD */ +#define GFXPIPE_BSD 2 + +#define OPCODE_BSD_AVC 4 + +#define SUBOPCODE_BSD_IMG 0 +#define SUBOPCODE_BSD_QM 1 +#define SUBOPCODE_BSD_SLICE 2 +#define SUBOPCODE_BSD_BUF_BASE 3 +#define SUBOPCODE_BSD_IND_OBJ 4 +#define SUBOPCODE_BSD_OBJECT 8 + +/* MI */ +#define MASK_MI_OPCODE 0x1F800000 + +#define SHIFT_MI_OPCODE 23 + +#define OPCODE_MI_FLUSH 0x04 +#define OPCODE_MI_BATCH_BUFFER_END 0x0A + +int intel_batchbuffer_dump(unsigned int *data, unsigned int offset, int count, unsigned int device); + +#endif /* _INTEL_BATCHBUFFER_DUMP_H_ */ diff -Nru libva-1.0.1/i965_drv_video/intel_batchbuffer.h libva-1.0.1-3+0.31.1/i965_drv_video/intel_batchbuffer.h --- libva-1.0.1/i965_drv_video/intel_batchbuffer.h 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/intel_batchbuffer.h 2010-07-07 12:20:29.000000000 +0000 @@ -16,10 +16,16 @@ unsigned char *map; unsigned char *ptr; int atomic; + int flag; + + int (*run)(drm_intel_bo *bo, int used, + drm_clip_rect_t *cliprects, int num_cliprects, + int DR4, int ring_flag); }; Bool intel_batchbuffer_init(struct intel_driver_data *intel); Bool intel_batchbuffer_terminate(struct intel_driver_data *intel); + void intel_batchbuffer_emit_dword(VADriverContextP ctx, unsigned int x); void intel_batchbuffer_emit_reloc(VADriverContextP ctx, dri_bo *bo, uint32_t read_domains, uint32_t write_domains, @@ -31,6 +37,17 @@ void intel_batchbuffer_end_atomic(VADriverContextP ctx); Bool intel_batchbuffer_flush(VADriverContextP ctx); +void intel_batchbuffer_emit_dword_bcs(VADriverContextP ctx, unsigned int x); +void intel_batchbuffer_emit_reloc_bcs(VADriverContextP ctx, dri_bo *bo, + uint32_t read_domains, uint32_t write_domains, + uint32_t delta); +void intel_batchbuffer_require_space_bcs(VADriverContextP ctx, unsigned int size); +void intel_batchbuffer_data_bcs(VADriverContextP ctx, void *data, unsigned int size); +void intel_batchbuffer_emit_mi_flush_bcs(VADriverContextP ctx); +void intel_batchbuffer_start_atomic_bcs(VADriverContextP ctx, unsigned int size); +void intel_batchbuffer_end_atomic_bcs(VADriverContextP ctx); +Bool intel_batchbuffer_flush_bcs(VADriverContextP ctx); + #define BEGIN_BATCH(ctx, n) do { \ intel_batchbuffer_require_space(ctx, (n) * 4); \ } while (0) @@ -48,4 +65,21 @@ #define ADVANCE_BATCH(ctx) do { \ } while (0) +#define BEGIN_BCS_BATCH(ctx, n) do { \ + intel_batchbuffer_require_space_bcs(ctx, (n) * 4); \ +} while (0) + +#define OUT_BCS_BATCH(ctx, d) do { \ + intel_batchbuffer_emit_dword_bcs(ctx, d); \ +} while (0) + +#define OUT_BCS_RELOC(ctx, bo, read_domains, write_domain, delta) do { \ + assert((delta) >= 0); \ + intel_batchbuffer_emit_reloc_bcs(ctx, bo, \ + read_domains, write_domain, delta); \ +} while (0) + +#define ADVANCE_BCS_BATCH(ctx) do { \ +} while (0) + #endif /* _INTEL_BATCHBUFFER_H_ */ diff -Nru libva-1.0.1/i965_drv_video/intel_driver.h libva-1.0.1-3+0.31.1/i965_drv_video/intel_driver.h --- libva-1.0.1/i965_drv_video/intel_driver.h 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/intel_driver.h 2010-07-07 12:20:29.000000000 +0000 @@ -9,7 +9,7 @@ #include #include -#include "va_backend.h" +#include #if defined(__GNUC__) #define INLINE __inline__ @@ -26,6 +26,7 @@ #define MI_NOOP (CMD_MI | 0) #define MI_BATCH_BUFFER_END (CMD_MI | (0xA << 23)) +#define MI_BATCH_BUFFER_START (CMD_MI | (0x31 << 23)) #define MI_FLUSH (CMD_MI | (0x4 << 23)) #define STATE_INSTRUCTION_CACHE_INVALIDATE (0x1 << 0) @@ -44,6 +45,7 @@ #define ALIGN(i, n) (((i) + (n) - 1) & ~((n) - 1)) #define MIN(a, b) ((a) < (b) ? (a) : (b)) #define MAX(a, b) ((a) > (b) ? (a) : (b)) +#define ARRAY_ELEMS(a) (sizeof(a) / sizeof((a)[0])) #define SET_BLOCKED_SIGSET() do { \ sigset_t bl_mask; \ @@ -85,6 +87,7 @@ int locked; struct intel_batchbuffer *batch; + struct intel_batchbuffer *batch_bcs; dri_bufmgr *bufmgr; }; @@ -118,8 +121,8 @@ #define PCI_CHIP_G45_G 0x2E22 #define PCI_CHIP_G41_G 0x2E32 -#define PCI_CHIP_IGDNG_D_G 0x0042 -#define PCI_CHIP_IGDNG_M_G 0x0046 +#define PCI_CHIP_IRONLAKE_D_G 0x0042 +#define PCI_CHIP_IRONLAKE_M_G 0x0046 #define IS_G45(devid) (devid == PCI_CHIP_IGD_E_G || \ devid == PCI_CHIP_Q45_G || \ @@ -128,8 +131,8 @@ #define IS_GM45(devid) (devid == PCI_CHIP_GM45_GM) #define IS_G4X(devid) (IS_G45(devid) || IS_GM45(devid)) -#define IS_IGDNG_D(devid) (devid == PCI_CHIP_IGDNG_D_G) -#define IS_IGDNG_M(devid) (devid == PCI_CHIP_IGDNG_M_G) -#define IS_IGDNG(devid) (IS_IGDNG_D(devid) || IS_IGDNG_M(devid)) +#define IS_IRONLAKE_D(devid) (devid == PCI_CHIP_IRONLAKE_D_G) +#define IS_IRONLAKE_M(devid) (devid == PCI_CHIP_IRONLAKE_M_G) +#define IS_IRONLAKE(devid) (IS_IRONLAKE_D(devid) || IS_IRONLAKE_M(devid)) #endif /* _INTEL_DRIVER_H_ */ diff -Nru libva-1.0.1/i965_drv_video/Makefile.am libva-1.0.1-3+0.31.1/i965_drv_video/Makefile.am --- libva-1.0.1/i965_drv_video/Makefile.am 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/Makefile.am 2010-07-12 09:09:38.000000000 +0000 @@ -22,31 +22,41 @@ SUBDIRS = shaders -AM_CFLAGS = -Wall -I$(top_srcdir)/src -I$(top_srcdir)/src/x11 @DRM_CFLAGS@ -DIN_LIBVA +AM_CFLAGS = -Wall -I$(top_srcdir) -I$(top_srcdir)/va -I$(top_srcdir)/va/x11 @DRM_CFLAGS@ i965_drv_video_la_LTLIBRARIES = i965_drv_video.la i965_drv_video_ladir = @LIBVA_DRIVERS_PATH@ i965_drv_video_la_LDFLAGS = -module -avoid-version -no-undefined -Wl,--no-undefined @DRM_LIBS@ -ldrm_intel -i965_drv_video_la_LIBADD = ../src/libva-x11.la -lpthread +i965_drv_video_la_LIBADD = ../va/libva-x11.la -lpthread i965_drv_video_la_SOURCES = \ object_heap.c \ intel_batchbuffer.c \ + intel_batchbuffer_dump.c\ intel_memman.c \ intel_driver.c \ i965_media.c \ i965_media_mpeg2.c \ + i965_media_h264.c \ i965_render.c \ - i965_drv_video.c + i965_drv_video.c \ + i965_avc_bsd.c \ + i965_avc_hw_scoreboard.c\ + i965_avc_ildb.c noinst_HEADERS = \ object_heap.h \ intel_batchbuffer.h \ + intel_batchbuffer_dump.h\ intel_memman.h \ intel_driver.h \ i965_media.h \ i965_media_mpeg2.h \ + i965_media_h264.h \ i965_render.h \ i965_drv_video.h \ i965_defines.h \ - i965_structs.h + i965_structs.h \ + i965_avc_bsd.h \ + i965_avc_hw_scoreboard.h\ + i965_avc_ildb.h diff -Nru libva-1.0.1/i965_drv_video/Makefile.in libva-1.0.1-3+0.31.1/i965_drv_video/Makefile.in --- libva-1.0.1/i965_drv_video/Makefile.in 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/Makefile.in 2010-04-06 06:06:26.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.10.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008 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. @@ -40,9 +39,8 @@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c @@ -67,29 +65,14 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = -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__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(i965_drv_video_ladir)" +i965_drv_video_laLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(i965_drv_video_la_LTLIBRARIES) i965_drv_video_la_DEPENDENCIES = ../src/libva-x11.la am_i965_drv_video_la_OBJECTS = object_heap.lo intel_batchbuffer.lo \ @@ -102,7 +85,6 @@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) 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) \ @@ -124,38 +106,10 @@ HEADERS = $(noinst_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ - distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -am__relativize = \ - dir0=`pwd`; \ - sed_first='s,^\([^/]*\)/.*$$,\1,'; \ - sed_rest='s,^[^/]*/*,,'; \ - sed_last='s,^.*/\([^/]*\)$$,\1,'; \ - sed_butlast='s,/*[^/]*$$,,'; \ - while test -n "$$dir1"; do \ - first=`echo "$$dir1" | sed -e "$$sed_first"`; \ - if test "$$first" != "."; then \ - if test "$$first" = ".."; then \ - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ - else \ - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ - if test "$$first2" = "$$first"; then \ - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ - else \ - dir2="../$$dir2"; \ - fi; \ - dir0="$$dir0"/"$$first"; \ - fi; \ - fi; \ - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ - done; \ - reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ @@ -168,30 +122,32 @@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DRM_CFLAGS = @DRM_CFLAGS@ DRM_LIBS = @DRM_LIBS@ DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ +ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -FGREP = @FGREP@ +F77 = @F77@ +FFLAGS = @FFLAGS@ GEN4ASM_CFLAGS = @GEN4ASM_CFLAGS@ GEN4ASM_LIBS = @GEN4ASM_LIBS@ -GL_DEPS_CFLAGS = @GL_DEPS_CFLAGS@ -GL_DEPS_LIBS = @GL_DEPS_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ @@ -204,25 +160,18 @@ LIBVA_MAJOR_VERSION = @LIBVA_MAJOR_VERSION@ LIBVA_MICRO_VERSION = @LIBVA_MICRO_VERSION@ LIBVA_MINOR_VERSION = @LIBVA_MINOR_VERSION@ -LIBVA_SDS_VERSION = @LIBVA_SDS_VERSION@ LIBVA_VERSION = @LIBVA_VERSION@ -LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ -NM = @NM@ NMEDIT = @NMEDIT@ -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@ @@ -243,7 +192,8 @@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -276,7 +226,6 @@ libvacorelib = @libvacorelib@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -290,7 +239,6 @@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = shaders @@ -329,14 +277,14 @@ @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign i965_drv_video/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign i965_drv_video/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu i965_drv_video/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu i965_drv_video/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -354,28 +302,23 @@ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): install-i965_drv_video_laLTLIBRARIES: $(i965_drv_video_la_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(i965_drv_video_ladir)" || $(MKDIR_P) "$(DESTDIR)$(i965_drv_video_ladir)" - @list='$(i965_drv_video_la_LTLIBRARIES)'; test -n "$(i965_drv_video_ladir)" || list=; \ - list2=; for p in $$list; do \ + @list='$(i965_drv_video_la_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ - list2="$$list2 $$p"; \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(i965_drv_video_laLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(i965_drv_video_ladir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(i965_drv_video_laLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(i965_drv_video_ladir)/$$f"; \ else :; fi; \ - done; \ - test -z "$$list2" || { \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(i965_drv_video_ladir)'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(i965_drv_video_ladir)"; \ - } + done uninstall-i965_drv_video_laLTLIBRARIES: @$(NORMAL_UNINSTALL) - @list='$(i965_drv_video_la_LTLIBRARIES)'; test -n "$(i965_drv_video_ladir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(i965_drv_video_ladir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(i965_drv_video_ladir)/$$f"; \ + @list='$(i965_drv_video_la_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(i965_drv_video_ladir)/$$p'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(i965_drv_video_ladir)/$$p"; \ done clean-i965_drv_video_laLTLIBRARIES: @@ -406,21 +349,21 @@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_TRUE@ mv -f $(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 +@am__fastdepCC_TRUE@ mv -f $(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 +@am__fastdepCC_TRUE@ mv -f $(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 $@ $< @@ -438,7 +381,7 @@ # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): - @fail= failcom='exit 1'; \ + @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ @@ -455,7 +398,7 @@ else \ local_target="$$target"; \ fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ @@ -463,7 +406,7 @@ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ + @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ @@ -489,16 +432,16 @@ else \ local_target="$$target"; \ fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) @@ -506,14 +449,14 @@ 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; } \ + $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - set x; \ + tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ @@ -525,7 +468,7 @@ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ - set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ @@ -534,34 +477,29 @@ 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 \ + if test -z "$(ETAGS_ARGS)$$tags$$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; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) + tags=; \ 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" \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique + $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -582,44 +520,29 @@ 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 {} \;; \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ - $(am__relativize); \ - new_distdir=$$reldir; \ - dir1=$$subdir; dir2="$(top_distdir)"; \ - $(am__relativize); \ - new_top_distdir=$$reldir; \ - echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ - echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ - ($(am__cd) $$subdir && \ + distdir=`$(am__cd) $(distdir) && pwd`; \ + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ + (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$new_top_distdir" \ - distdir="$$new_distdir" \ + top_distdir="$$top_distdir" \ + distdir="$$distdir/$$subdir" \ am__remove_distdir=: \ am__skip_length_check=: \ - am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ @@ -652,7 +575,6 @@ 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) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -674,8 +596,6 @@ html: html-recursive -html-am: - info: info-recursive info-am: @@ -684,28 +604,18 @@ install-dvi: install-dvi-recursive -install-dvi-am: - install-exec-am: install-html: install-html-recursive -install-html-am: - install-info: install-info-recursive -install-info-am: - install-man: install-pdf: install-pdf-recursive -install-pdf-am: - install-ps: install-ps-recursive -install-ps-am: - installcheck-am: maintainer-clean: maintainer-clean-recursive @@ -728,8 +638,8 @@ uninstall-am: uninstall-i965_drv_video_laLTLIBRARIES -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ - install-am install-strip tags-recursive +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ + install-strip .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic \ @@ -748,7 +658,6 @@ tags tags-recursive uninstall uninstall-am \ uninstall-i965_drv_video_laLTLIBRARIES - # 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: diff -Nru libva-1.0.1/i965_drv_video/object_heap.c libva-1.0.1-3+0.31.1/i965_drv_video/object_heap.c --- libva-1.0.1/i965_drv_video/object_heap.c 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/object_heap.c 2010-07-07 12:20:29.000000000 +0000 @@ -50,7 +50,6 @@ { return -1; /* Out of memory */ } - memset(new_heap_index + heap->heap_size*heap->object_size, 0, heap->heap_increment * new_heap_size); heap->heap_index = new_heap_index; next_free = heap->next_free; for(i = new_heap_size; i-- > heap->heap_size; ) diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Child_Field_UV.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Child_Field_UV.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Child_Field_UV.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Child_Field_UV.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,9 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +#include "AVC_ILDB_Child_UV.asm" diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Child_Field_Y.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Child_Field_Y.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Child_Field_Y.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Child_Field_Y.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,9 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +#include "AVC_ILDB_Child_Y.asm" diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Child_Mbaff_UV.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Child_Mbaff_UV.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Child_Mbaff_UV.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Child_Mbaff_UV.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,173 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// AVC Child Kernel (Vertical and horizontal de-block a 4:2:0 MB UV comp) +// +// First de-block vertical edges from left to right. +// Second de-block horizontal edge from top to bottom. +// +// For 4:2:0, chroma is always de-blocked at 8x8. +// NV12 format allows to filter U and V together. +// +////////////////////////////////////////////////////////////////////////////////////////////////////////////// +#define AVC_ILDB + +.kernel AVC_ILDB_CHILD_MBAFF_UV +#if defined(COMBINED_KERNEL) +ILDB_LABEL(AVC_ILDB_CHILD_UV): +#endif + +#include "SetupVPKernel.asm" +#include "AVC_ILDB.inc" + +#if defined(_DEBUG) + mov (1) EntrySignatureC:w 0xE997:w +#endif + + // Setup temp buf used by load and save code + #define BUF_B RTempB + #define BUF_W RTempW + #define BUF_D RTempD + + // Init local variables + mul (4) ORIX_CUR<2>:w ORIX<0;1,0>:w 16:w { NoDDClr } // Expand X addr to bytes, repeat 4 times + mul (4) ORIY_CUR<2>:w ORIY<0;1,0>:w 32:w { NoDDChk } // Expand Y addr to bytes, repeat 4 times + + mov (2) f0.0<1>:w 0:w + + mov (1) GateWayOffsetC:uw ORIY:uw // Use row # as Gateway offset + + //=== Null Kernel =============================================================== +// jmpi ILDB_LABEL(POST_ILDB_UV) + //=============================================================================== + + //==================================================================================== + // Assuming the MB control data is laid out in scan line order in a rectangle with width = 16 bytes. + // Control data has dimension of X x Y = 16 x N bytes, where N = W x H / 16 + // Each MB has 256 bytes of control data + + // For CRESTLINE, 256 bytes are stored in memory and fetched into GRF. + // MB_offset = MBsCntX * CurRow + CurCol + // Byte_offset = MB_offset * (256 << Mbaff_flag), Mbaff_flag = 0 or 1. + // Base address of a control data block = (x, y) = (0, y'=y/x), region width is 16 bytes + // where y' = Byte_offset / 16 = MB_offset * (16 << Mbaff_flag) + // MBCntrlDataOffsetY holds y'. + + // For BearLake-C, 64 bytes are stored in memory and dataport expands to 256 bytes. Need to use a special read command on BL-C. + // MB_offset = MBsCntX * CurRow + CurCol + // Byte_offset = MB_offset * (64 << Mbaff_flag), Mbaff_flag = 0 or 1. + // MBCntrlDataOffsetY holds globel byte offset. + +#if !defined(DEV_CL) + mul (1) CntrlDataOffsetY:ud MBsCntX:w ORIY:w + add (1) CntrlDataOffsetY:ud CntrlDataOffsetY:ud ORIX:w + mul (1) CntrlDataOffsetY:ud CntrlDataOffsetY:ud 128:uw +#endif + //==================================================================================== + + add (1) ORIX_LEFT:w ORIX_LEFT:w -4:w + add (1) ORIY_TOP:w ORIY_TOP:w -4:w + + //=========== Process Top MB ============ + and (1) BitFields:w BitFields:w TopFieldFlag:w // Reset BotFieldFlag + + // Build a ramp from 0 to 15 + mov (16) RRampW(0)<1> RampConstC<0;8,1>:ub + add (8) RRampW(0,8)<1> RRampW(0,8) 8:w // RRampW = ramp 15-0 + +ILDB_LABEL(RE_ENTRY_UV): // for bootom field + + // Load current MB control data +#if defined(DEV_CL) + #include "Load_ILDB_Cntrl_Data_64DW.asm" // Crestline +#else + #include "Load_ILDB_Cntrl_Data_16DW.asm" // Cantiga and beyond +#endif + + // Init addr register for vertical control data + mov (1) ECM_AddrReg<1>:w CNTRL_DATA_BASE:w // Init ECM_AddrReg + + // Use free cycles here + // Check loaded control data + and.z.f0.1 (16) null<1>:uw r[ECM_AddrReg, wEdgeCntlMap_IntLeftVert]<16;16,1>:uw 0xFFFF:uw // Skip ILDB? + and.nz.f0.0 (1) null:w r[ECM_AddrReg, ExtBitFlags]:ub DISABLE_ILDB_FLAG:w // Skip ILDB? + + // Set DualFieldMode for all data read, write and deblocking + and (1) CTemp1_W:uw r[ECM_AddrReg, BitFlags]:ub FieldModeAboveMbFlag+FieldModeCurrentMbFlag:uw + + // Get Vert Edge Pattern (frame vs. field MBs) + and (1) VertEdgePattern:uw r[ECM_AddrReg, BitFlags]:ub FieldModeLeftMbFlag+FieldModeCurrentMbFlag:uw + + (f0.1.all16h) jmpi ILDB_LABEL(SKIP_ILDB_UV) // Skip ILDB + (f0.0) jmpi ILDB_LABEL(SKIP_ILDB_UV) // Skip ILDB + + // Set DualFieldMode for all data read, write and deblocking +// and (1) CTemp1_W:uw r[ECM_AddrReg, BitFlags]:ub FieldModeAboveMbFlag+FieldModeCurrentMbFlag:uw + cmp.z.f0.0 (1) null:w CTemp1_W:uw ABOVE_FIELD_CUR_FRAME:w + and (1) DualFieldMode:w f0.0:w 0x0001:w + + #include "load_Cur_UV_8x8T_Mbaff.asm" // Load transposed data 8x8 + #include "load_Left_UV_2x8T_Mbaff.asm" // Load left MB (2x8) UV data from memory if exists + + #include "Transpose_Cur_UV_8x8.asm" + #include "Transpose_Left_UV_2x8.asm" + + + //---------- Perform vertical ILDB filting on UV ---------- + #include "AVC_ILDB_Filter_Mbaff_UV_v.asm" + //--------------------------------------------------------- + + #include "save_Left_UV_8x2T_Mbaff.asm" // Write left MB (2x8) Y data to memory if exists + #include "load_Top_UV_8x2_Mbaff.asm" // Load top MB (8x2) Y data from memory if exists + + #include "Transpose_Cur_UV_8x8.asm" // Transpose a MB for horizontal edge de-blocking + + //---------- Perform horizontal ILDB filting on UV ---------- + #include "AVC_ILDB_Filter_Mbaff_UV_h.asm" + //----------------------------------------------------------- + + #include "save_Cur_UV_8x8_Mbaff.asm" // Write 8x8 + #include "save_Top_UV_8x2_Mbaff.asm" // Write top MB (8x2) if not the top row + + //----------------------------------------------------------- +ILDB_LABEL(SKIP_ILDB_UV): + + and.z.f0.0 (1) null:w BitFields:w BotFieldFlag:w + + //=========== Process Bottom MB ============ + or (1) BitFields:w BitFields:w BotFieldFlag:w // Set BotFieldFlag to 1 + (f0.0) jmpi ILDB_LABEL(RE_ENTRY_UV) // Loop back for bottom deblocking + + // Fall through to finish + + //=========== Check write commit of the last write ============ + mov (8) WritebackResponse(0)<1> WritebackResponse(0) + +ILDB_LABEL(POST_ILDB_UV): + + // Send notification thru Gateway to root thread, update chroma Status[CurRow] + #include "AVC_ILDB_ForwardMsg.asm" + +#if !defined(GW_DCN) // For non-ILK chipsets + //child send EOT : Request type = 1 + END_CHILD_THREAD +#endif // !defined(DEV_ILK) + + // The thread finishs here + //------------------------------------------------------------------------------ + + //////////////////////////////////////////////////////////////////////////////// + // Include other subrutines being called + #include "AVC_ILDB_Chroma_Core_Mbaff.asm" + +#if !defined(COMBINED_KERNEL) // For standalone kernel only +.end_code + +.end_kernel +#endif diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Child_Mbaff_Y.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Child_Mbaff_Y.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Child_Mbaff_Y.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Child_Mbaff_Y.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,188 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// AVC Child Kernel (Vertical and horizontal de-block a 4:2:0 MB Y comp) +// +// First, de-block vertical edges from left to right. +// Second, de-block horizontal edge from top to bottom. +// +// ***** MBAFF Mode ***** +// This version deblocks top MB first, followed by bottom MB. +// +// Need variable CurMB to indicate top MB or bottom MB (CurMB = 0 or 1). +// We can use BotFieldFlag in BitFields to represent it. +// +// Usage: +// 1) Access control data for top +// CntrlDataOffsetY + CurMB * Control data block size (64 DWs for CL, 16 DWs for BLC) +// +// 2) Load frame/field video data based on flags: FieldModeCurrentMbFlag, FieldModeLeftMbFlag, FieldModeaboveMbFlag, +// +// E.g. +// if (pCntlData->BitField & FieldModeCurrentMbFlag) +// cur_y = ORIX_CUR.y + CurMB * 1; // Add field vertical offset for bot field MB . +// else +// cur_y = ORIX_CUR.y + CurMB * MB_Rows_Y; // Add bottom MB vertical offset for bot MB +// +// +////////////////////////////////////////////////////////////////////////////////////////////////////////////// +#define AVC_ILDB + +.kernel AVC_ILDB_CHILD_MBAFF_Y +#if defined(COMBINED_KERNEL) +ILDB_LABEL(AVC_ILDB_CHILD_Y): +#endif + +#include "SetupVPKernel.asm" +#include "AVC_ILDB.inc" + +#if defined(_DEBUG) + mov (1) EntrySignatureC:w 0xE998:w +#endif + + // Setup temp buf used by load and save code + #define BUF_B RTempB + #define BUF_D RTempD + + // Init local variables + // These coordinates are in progressive fashion + mul (4) ORIX_CUR<2>:w ORIX<0;1,0>:w 16:w { NoDDClr } // Expand X addr to bytes, repeat 4 times + mul (4) ORIY_CUR<2>:w ORIY<0;1,0>:w 32:w { NoDDChk } // Expand Y addr to bytes, repeat 4 times + + mov (2) f0.0<1>:w 0:w + + mov (1) GateWayOffsetC:uw ORIY:uw // Use row # as Gateway offset + + //=== Null Kernel =============================================================== +// jmpi POST_ILDB + //=============================================================================== + + //==================================================================================== + // Assuming the MB control data is laid out in scan line order in a rectangle with width = 16 bytes. + // Control data has dimension of X x Y = 16 x N bytes, where N = W x H / 16 + // Each MB has 256 bytes of control data + + // For CRESTLINE, 256 bytes are stored in memory and fetched into GRF. + // MB_offset = MBsCntX * CurRow + CurCol + // Byte_offset = MB_offset * (256 << Mbaff_flag), Mbaff_flag = 0 or 1. + // Base address of a control data block = (x, y) = (0, y'=y/x), region width is 16 bytes + // where y' = Byte_offset / 16 = MB_offset * (16 << Mbaff_flag) + // MBCntrlDataOffsetY holds y'. + + // For BearLake-C, 64 bytes are stored in memory and dataport expands to 256 bytes. Need to use a special read command on BL-C. + // MB_offset = MBsCntX * CurRow + CurCol + // Byte_offset = MB_offset * (64 << Mbaff_flag), Mbaff_flag = 0 or 1. + // MBCntrlDataOffsetY holds globel byte offset. + +#if !defined(DEV_CL) + mul (1) CntrlDataOffsetY:ud MBsCntX:w ORIY:w + add (1) CntrlDataOffsetY:ud CntrlDataOffsetY:ud ORIX:w + mul (1) CntrlDataOffsetY:ud CntrlDataOffsetY:ud 128:uw +#endif + + //==================================================================================== + + add (1) ORIX_LEFT:w ORIX_LEFT:w -4:w + add (1) ORIY_TOP:w ORIY_TOP:w -4:w + + + //=========== Process Top MB ============ + and (1) BitFields:w BitFields:w TopFieldFlag:w // Reset BotFieldFlag + +RE_ENTRY: // for bootom field + + // Load current MB control data +#if defined(DEV_CL) + #include "Load_ILDB_Cntrl_Data_64DW.asm" // Crestline +#else + #include "Load_ILDB_Cntrl_Data_16DW.asm" // Cantiga and beyond +#endif + + // Init addr register for vertical control data + mov (1) ECM_AddrReg<1>:w CNTRL_DATA_BASE:w // Init edge control map AddrReg + + // Check loaded control data + and.z.f0.1 (16) null<1>:uw r[ECM_AddrReg, wEdgeCntlMap_IntLeftVert]<16;16,1>:uw 0xFFFF:uw // Skip ILDB? + and.nz.f0.0 (1) null:w r[ECM_AddrReg, ExtBitFlags]:ub DISABLE_ILDB_FLAG:w // Skip ILDB? + + // Use free cycles here + // Set DualFieldMode for all data read, write and deblocking + and (1) CTemp1_W:uw r[ECM_AddrReg, BitFlags]:ub FieldModeAboveMbFlag+FieldModeCurrentMbFlag:uw + + // Get Vert Edge Pattern (frame vs. field MBs) + and (1) VertEdgePattern:uw r[ECM_AddrReg, BitFlags]:ub FieldModeLeftMbFlag+FieldModeCurrentMbFlag:uw + + (f0.1.all16h) jmpi SKIP_ILDB // Skip ILDB + (f0.0) jmpi SKIP_ILDB // Skip ILDB + + // Set DualFieldMode for all data read, write and deblocking +// and (1) CTemp1_W:uw r[ECM_AddrReg, BitFlags]:ub FieldModeAboveMbFlag+FieldModeCurrentMbFlag:uw + cmp.z.f0.0 (1) null:w CTemp1_W:uw ABOVE_FIELD_CUR_FRAME:w + and (1) DualFieldMode:w f0.0:w 0x0001:w + + // Load current MB // DDD1 + #include "load_Cur_Y_16x16T_Mbaff.asm" // Load cur Y, 16x16, transpose + #include "load_Left_Y_4x16T_Mbaff.asm" // Load left MB (4x16) Y data from memory if exists + + #include "Transpose_Cur_Y_16x16.asm" + #include "Transpose_Left_Y_4x16.asm" + + //---------- Perform vertical ILDB filting on Y---------- + #include "AVC_ILDB_Filter_Mbaff_Y_v.asm" + //------------------------------------------------------- + + #include "save_Left_Y_16x4T_Mbaff.asm" // Write left MB (4x16) Y data to memory if exists + #include "load_Top_Y_16x4_Mbaff.asm" // Load top MB (16x4) Y data from memory if exists + #include "Transpose_Cur_Y_16x16.asm" // Transpose a MB for horizontal edge de-blocking + + //---------- Perform horizontal ILDB filting on Y ---------- + #include "AVC_ILDB_Filter_Mbaff_Y_h.asm" + //---------------------------------------------------------- + + #include "save_Cur_Y_16x16_Mbaff.asm" // Write cur MB (16x16) + #include "save_Top_Y_16x4_Mbaff.asm" // Write top MB (16x4) if not the top row + +SKIP_ILDB: + //---------------------------------------------------------- + and.z.f0.0 (1) null:w BitFields:w BotFieldFlag:w + + //=========== Process Bottom MB ============ + or (1) BitFields:w BitFields:w BotFieldFlag:w // Set BotFieldFlag to 1 + (f0.0) jmpi RE_ENTRY // Loop back for bottom deblocking + + // Fall through to finish + + //=========== Check write commit of the last write ============ + mov (8) WritebackResponse(0)<1> WritebackResponse(0) + +POST_ILDB: + + //--------------------------------------------------------------------------- + // Send notification thru Gateway to root thread, update luma Status[CurRow] + + #include "AVC_ILDB_ForwardMsg.asm" + +#if !defined(GW_DCN) // For non-ILK chipsets + //child send EOT : Request type = 1 + END_CHILD_THREAD +#endif // !defined(DEV_ILK) + + // The thread finishs here + //------------------------------------------------------------------------------ + + + //////////////////////////////////////////////////////////////////////////////// + // Include other subrutines being called + #include "AVC_ILDB_Luma_Core_Mbaff.asm" + +#if !defined(COMBINED_KERNEL) // For standalone kernel only +.end_code + +.end_kernel +#endif diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Child_UV.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Child_UV.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Child_UV.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Child_UV.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,186 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// AVC Child Kernel (Vertical and horizontal de-block a 4:2:0 MB UV comp) +// +// First de-block vertical edges from left to right. +// Second de-block horizontal edge from top to bottom. +// +// For 4:2:0, chroma is always de-blocked at 8x8. +// NV12 format allows to filter U and V together. +// +////////////////////////////////////////////////////////////////////////////////////////////////////////////// +#define AVC_ILDB + +.kernel AVC_ILDB_CHILD_UV +#if defined(COMBINED_KERNEL) +ILDB_LABEL(AVC_ILDB_CHILD_UV): +#endif + +#include "SetupVPKernel.asm" +#include "AVC_ILDB.inc" + +#if defined(_DEBUG) + mov (1) EntrySignatureC:w 0x9997:w +#endif + + // Init local variables + shl (8) ORIX_CUR<1>:w ORIX<0;2,1>:w 4:w // Expand addr to bytes, repeat (x,y) 4 times + + // Init addr register for vertical control data + mov (1) ECM_AddrReg<1>:w CNTRL_DATA_BASE:w // Init ECM_AddrReg + + //=== Null Kernel =============================================================== +// jmpi ILDB_LABEL(POST_ILDB_UV_UV) + //=============================================================================== + +#if defined(DEV_CL) + mov (1) acc0.0:w 240:w +#else + //==================================================================================== + // For BearLake-C, 64 bytes are stored in memory and dataport expands to 256 bytes. Need to use a special read command on BL-C. + // MB_offset = MBsCntX * CurRow + CurCol + // MBCntrlDataOffsetY = globel_byte_offset = MB_offset * 64 + mul (1) CntrlDataOffsetY:ud MBsCntX:w ORIY:w + add (1) CntrlDataOffsetY:ud CntrlDataOffsetY:ud ORIX:w + + // Assign to MSGSRC.2:ud for memory access + // mul (1) CntrlDataOffsetY:ud CntrlDataOffsetY:ud 64:uw + mul (1) MSGSRC.2:ud CntrlDataOffsetY:ud 64:uw + + mov (1) acc0.0:w 320:w +#endif + mac (1) URBOffsetC:w ORIY:w 4:w // UV URB entries are right after Y entries + + + // Init local variables +// shl (8) ORIX_CUR<1>:w ORIX<0;2,1>:w 4:w // Expand addr to bytes, repeat (x,y) 4 times + add (1) ORIX_LEFT:w ORIX_LEFT:w -4:w + add (1) ORIY_TOP:w ORIY_TOP:w -4:w + + // Build a ramp from 0 to 15 + mov (16) RRampW(0)<1> RampConstC<0;8,1>:ub + add (8) RRampW(0,8)<1> RRampW(0,8) 8:w // RRampW = ramp 15-0 + + // Load current MB control data +#if defined(DEV_CL) + #if defined(_APPLE) + #include "Load_ILDB_Cntrl_Data_22DW.asm" // Crestline for Apple, progressive only + #else + #include "Load_ILDB_Cntrl_Data_64DW.asm" // Crestline + #endif +#else + #include "Load_ILDB_Cntrl_Data_16DW.asm" // Cantiga and beyond +#endif + + // Check loaded control data + #if defined(_APPLE) + and.z.f0.1 (8) null<1>:uw r[ECM_AddrReg, wEdgeCntlMap_IntLeftVert]<8;8,1>:uw 0xFFFF:uw // Skip ILDB? + (f0.1) and.z.f0.1 (2) null<1>:uw r[ECM_AddrReg, wEdgeCntlMapA_ExtTopHorz0]<2;2,1>:uw 0xFFFF:uw // Skip ILDB? + #else + and.z.f0.1 (16) null<1>:uw r[ECM_AddrReg, wEdgeCntlMap_IntLeftVert]<16;16,1>:uw 0xFFFF:uw // Skip ILDB? + #endif + + and.nz.f0.0 (1) null:w r[ECM_AddrReg, ExtBitFlags]:ub DISABLE_ILDB_FLAG:w // Skip ILDB? + + mov (1) GateWayOffsetC:uw ORIY:uw // Use row # as Gateway offset + + #if defined(_APPLE) + (f0.1.all8h) jmpi ILDB_LABEL(READ_FOR_URB_UV) // Skip ILDB + #else + (f0.1.all16h) jmpi ILDB_LABEL(READ_FOR_URB_UV) // Skip ILDB + #endif + + (f0.0) jmpi ILDB_LABEL(READ_FOR_URB_UV) // Skip ILDB + + + + #include "load_Cur_UV_8x8T.asm" // Load transposed data 8x8 +// #include "load_Left_UV_2x8T.asm" + #include "load_Top_UV_8x2.asm" // Load top MB (8x2) Y data from memory if exists + + #include "Transpose_Cur_UV_8x8.asm" +// #include "Transpose_Left_UV_2x8.asm" + + + //---------- Perform vertical ILDB filting on UV ---------- + #include "AVC_ILDB_Filter_UV_v.asm" + //--------------------------------------------------------- + + #include "save_Left_UV_8x2T.asm" // Write left MB (2x8) Y data to memory if exists + #include "Transpose_Cur_UV_8x8.asm" // Transpose a MB for horizontal edge de-blocking + + //---------- Perform horizontal ILDB filting on UV ---------- + #include "AVC_ILDB_Filter_UV_h.asm" + //----------------------------------------------------------- + + #include "save_Cur_UV_8x8.asm" // Write 8x8 + #include "save_Top_UV_8x2.asm" // Write top MB (8x2) if not the top row + + //---------- Write right most 4 columns of cur MB to URB ---------- + // Transpose the right most 2 cols 2x8 (word) in GRF to 8x2 in BUF_D. It is 2 left most cols in cur MB. + #include "Transpose_Cur_UV_2x8.asm" + +ILDB_LABEL(WRITE_URB_UV): + mov (8) m1<1>:ud LEFT_TEMP_D(1)<8;8,1> // Copy 1 GRF to 1 URB entry (U+V) + + #include "writeURB_UV_Child.asm" + //----------------------------------------------------------------- + + //=========== Check write commit of the last write ============ + mov (8) WritebackResponse(0)<1> WritebackResponse(0) + +ILDB_LABEL(POST_ILDB_UV): + //--------------------------------- + + // Send notification thru Gateway to root thread, update chroma Status[CurRow] + #include "AVC_ILDB_ForwardMsg.asm" + +#if !defined(GW_DCN) // For non-ILK chipsets + //child send EOT : Request type = 1 + END_CHILD_THREAD +#endif // !defined(DEV_ILK) + + // The thread finishs here + //------------------------------------------------------------------------------ + +ILDB_LABEL(READ_FOR_URB_UV): + // Still need to prepare URB data for the right neighbor MB + #include "load_Cur_UV_Right_Most_2x8.asm" // Load cur MB ( right most 4x16) Y data from memory + #include "Transpose_Cur_UV_Right_Most_2x8.asm" +// jmpi ILDB_LABEL(WRITE_URB_UV) + + mov (8) m1<1>:ud LEFT_TEMP_D(1)<8;8,1> // Copy 1 GRF to 1 URB entry (U+V) + + #include "writeURB_UV_Child.asm" + //----------------------------------------------------------------- + + // Send notification thru Gateway to root thread, update chroma Status[CurRow] + #include "AVC_ILDB_ForwardMsg.asm" + +#if !defined(GW_DCN) // For non-ILK chipsets + //child send EOT : Request type = 1 + END_CHILD_THREAD +#endif // !defined(DEV_ILK) + + // The thread finishs here + //------------------------------------------------------------------------------ + + + //////////////////////////////////////////////////////////////////////////////// + // Include other subrutines being called +// #include "AVC_ILDB_Luma_Core.asm" + #include "AVC_ILDB_Chroma_Core.asm" + + +#if !defined(COMBINED_KERNEL) // For standalone kernel only +.end_code + +.end_kernel +#endif diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Child_Y.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Child_Y.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Child_Y.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Child_Y.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,176 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// AVC Child Kernel (Vertical and horizontal de-block a 4:2:0 MB Y comp) +// +// First, de-block vertical edges from left to right. +// Second, de-block horizontal edge from top to bottom. +// +// If transform_size_8x8_flag = 1, luma is de-blocked at 8x8. Otherwise, luma is de-blocked at 4x4. +// +////////////////////////////////////////////////////////////////////////////////////////////////////////////// +#define AVC_ILDB + +.kernel AVC_ILDB_CHILD_Y +#if defined(COMBINED_KERNEL) +ILDB_LABEL(AVC_ILDB_CHILD_Y): +#endif + +#include "SetupVPKernel.asm" +#include "AVC_ILDB.inc" + +#if defined(_DEBUG) + mov (1) EntrySignatureC:w 0x9998:w +#endif + + // Init local variables + shl (8) ORIX_CUR<1>:w ORIX<0;2,1>:w 4:w // Expand addr to bytes, repeat (x,y) 4 times + + // Init addr register for vertical control data + mov (1) ECM_AddrReg<1>:w CNTRL_DATA_BASE:w // Init edge control map AddrReg + + //=== Null Kernel =============================================================== +// jmpi ILDB_LABEL(POST_ILDB_Y) + //=============================================================================== + + mul (1) URBOffsetC:uw ORIY:uw 4:w + +#if !defined(DEV_CL) + //==================================================================================== + // For BearLake-C, 64 bytes are stored in memory and dataport expands to 256 bytes. Need to use a special read command on BL-C. + // MB_offset = MBsCntX * CurRow + CurCol + // MBCntrlDataOffsetY = globel_byte_offset = MB_offset * 64 + mul (1) CntrlDataOffsetY:ud MBsCntX:w ORIY:w + add (1) CntrlDataOffsetY:ud CntrlDataOffsetY:ud ORIX:w + + // Assign to MSGSRC.2:ud for memory access + // mul (1) CntrlDataOffsetY:ud CntrlDataOffsetY:ud 64:uw + mul (1) MSGSRC.2:ud CntrlDataOffsetY:ud 64:uw + +#endif + + // Load current MB control data +#if defined(DEV_CL) + #if defined(_APPLE) + #include "Load_ILDB_Cntrl_Data_22DW.asm" // Crestline for Apple, progressive only + #else + #include "Load_ILDB_Cntrl_Data_64DW.asm" // Crestline + #endif +#else + #include "Load_ILDB_Cntrl_Data_16DW.asm" // Cantiga and beyond +#endif + + // Check loaded control data + #if defined(_APPLE) + and.z.f0.1 (8) null<1>:uw r[ECM_AddrReg, wEdgeCntlMap_IntLeftVert]<8;8,1>:uw 0xFFFF:uw // Skip ILDB? + (f0.1) and.z.f0.1 (2) null<1>:uw r[ECM_AddrReg, wEdgeCntlMapA_ExtTopHorz0]<2;2,1>:uw 0xFFFF:uw // Skip ILDB? + #else + and.z.f0.1 (16) null<1>:uw r[ECM_AddrReg, wEdgeCntlMap_IntLeftVert]<16;16,1>:uw 0xFFFF:uw // Skip ILDB? + #endif + + and.nz.f0.0 (1) null:w r[ECM_AddrReg, ExtBitFlags]:ub DISABLE_ILDB_FLAG:w // Skip ILDB? + + // Use free cycles here + add (1) ORIX_LEFT:w ORIX_LEFT:w -4:w +// add (1) ORIY_TOP:w ORIY_TOP:w -4:w + mov (1) GateWayOffsetC:uw ORIY:uw // Use row # as Gateway offset + + #if defined(_APPLE) + (f0.1.all8h) jmpi ILDB_LABEL(READ_FOR_URB_Y) // Skip ILDB + #else + (f0.1.all16h) jmpi ILDB_LABEL(READ_FOR_URB_Y) // Skip ILDB + #endif + + (f0.0) jmpi ILDB_LABEL(READ_FOR_URB_Y) // Skip ILDB + + add (1) ORIY_TOP:w ORIY_TOP:w -4:w + + // Bettr performance is observed if boundary MBs are not checked and skipped. + + #include "load_Cur_Y_16x16T.asm" // Load cur MB Y, 16x16, transpose +// #include "load_Left_Y_4x16T.asm" // Load left MB (4x16) Y data from memory + #include "load_Top_Y_16x4.asm" // Load top MB (16x4) Y data from memory + + #include "Transpose_Cur_Y_16x16.asm" +// #include "Transpose_Left_Y_4x16.asm" + + //---------- Perform vertical ILDB filting on Y --------- + #include "AVC_ILDB_Filter_Y_v.asm" + //------------------------------------------------------- + + #include "save_Left_Y_16x4T.asm" // Write left MB (4x16) Y data to memory + #include "Transpose_Cur_Y_16x16.asm" // Transpose a MB for horizontal edge de-blocking + + //---------- Perform horizontal ILDB filting on Y ------- + #include "AVC_ILDB_Filter_Y_h.asm" + //------------------------------------------------------- + + #include "save_Cur_Y_16x16.asm" // Write cur MB (16x16) + #include "save_Top_Y_16x4.asm" // Write top MB (16x4) + + //---------- Write right most 4 columns of cur MB to URB ---------- + // Transpose the right most 4 cols 4x16 in GRF to 16x4 in LEFT_TEMP_B. It is 4 left most cols in cur MB. + #include "Transpose_Cur_Y_4x16.asm" + +ILDB_LABEL(WRITE_URB_Y): + // Note: LEFT_TEMP_B(2) = TOP_TEMP_B(0), TOP_TEMP_B must be avail + mov (16) m1<1>:ud LEFT_TEMP_D(2)<8;8,1> // Copy 2 GRFs to 2 URB entries (Y) + + #include "writeURB_Y_Child.asm" + //----------------------------------------------------------------- + + //=========== Check write commit of the last write ============ + mov (8) WritebackResponse(0)<1> WritebackResponse(0) + +ILDB_LABEL(POST_ILDB_Y): + // Send notification thru Gateway to root thread, update luma Status[CurRow] + #include "AVC_ILDB_ForwardMsg.asm" + +#if !defined(GW_DCN) // For non-ILK chipsets + //child send EOT : Request type = 1 + END_CHILD_THREAD +#endif // !defined(DEV_ILK) + + // The thread finishs here + //------------------------------------------------------------------------------ + +ILDB_LABEL(READ_FOR_URB_Y): + // Still need to prepare URB data for the right neighbor MB + #include "load_Cur_Y_Right_Most_4x16.asm" // Load cur MB ( right most 4x16) Y data from memory + #include "Transpose_Cur_Y_Right_Most_4x16.asm" +// jmpi ILDB_LABEL(WRITE_URB_Y) + + // Note: LEFT_TEMP_B(2) = TOP_TEMP_B(0), TOP_TEMP_B must be avail + mov (16) m1<1>:ud LEFT_TEMP_D(2)<8;8,1> // Copy 2 GRFs to 2 URB entries (Y) + + #include "writeURB_Y_Child.asm" + //----------------------------------------------------------------- + + // Send notification thru Gateway to root thread, update luma Status[CurRow] + #include "AVC_ILDB_ForwardMsg.asm" + +#if !defined(GW_DCN) // For non-ILK chipsets + //child send EOT : Request type = 1 + END_CHILD_THREAD +#endif // !defined(DEV_ILK) + + // The thread finishs here + //------------------------------------------------------------------------------ + + //////////////////////////////////////////////////////////////////////////////// + // Include other subrutines being called + #include "AVC_ILDB_Luma_Core.asm" +// #include "AVC_ILDB_Chroma_Core.asm" + + +#if !defined(COMBINED_KERNEL) // For standalone kernel only +.end_code + +.end_kernel +#endif diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Chroma_Core.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Chroma_Core.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Chroma_Core.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Chroma_Core.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,165 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +#if !defined(__AVC_ILDB_CHROMA_CORE__) // Make sure this file is only included once +#define __AVC_ILDB_CHROMA_CORE__ + +////////// AVC ILDB Chroma Core ///////////////////////////////////////////////////////////////////////////////// +// +// This core performs AVC U or V ILDB filtering on one horizontal edge (8 pixels) of a MB. +// If data is transposed, it can also de-block a vertical edge. +// +// Bafore calling this subroutine, caller needs to set the following parameters. +// +// - EdgeCntlMap1 // Edge control map A +// - EdgeCntlMap2 // Edge control map B +// - P_AddrReg // Src and dest address register for P pixels +// - Q_AddrReg // Src and dest address register for Q pixels +// - alpha // alpha corresponding to the edge to be filtered +// - beta // beta corresponding to the edge to be filtered +// - tc0 // tc0 corresponding to the edge to be filtered +// +// U or V: +// +----+----+----+----+ +// | P1 | p0 | q0 | q1 | +// +----+----+----+----+ +// +// p1 = r[P_AddrReg, 0]<16;8,2> +// p0 = r[P_AddrReg, 16]<16;8,2> +// q0 = r[Q_AddrReg, 0]<16;8,2> +// q1 = r[Q_AddrReg, 16]<16;8,2> +// +///////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +// The region is both src and dest +// P0-P3 and Q0-Q3 should be only used if they have not been modified to new values +#undef P1 +#undef P0 +#undef Q0 +#undef Q1 + +#define P1 r[P_AddrReg, 0]<16;8,2>:ub +#define P0 r[P_AddrReg, 16]<16;8,2>:ub +#define Q0 r[Q_AddrReg, 0]<16;8,2>:ub +#define Q1 r[Q_AddrReg, 16]<16;8,2>:ub + +// New region as dest +#undef NewP0 +#undef NewQ0 + +#define NewP0 r[P_AddrReg, 16]<2>:ub +#define NewQ0 r[Q_AddrReg, 0]<2>:ub + +// Filter one chroma edge +FILTER_UV: + +#if defined(_DEBUG) + mov (1) EntrySignatureC:w 0x1112:w +#endif + //---------- Derive filterSampleflag in AVC spec, equition (8-469) ---------- + // bS is in MaskA + + // Src copy of the p1, p0, q0, q1 +// mov (8) p1(0)<1> r[P_AddrReg, 0]<16;8,2>:ub +// mov (8) p0(0)<1> r[P_AddrReg, 16]<16;8,2>:ub +// mov (8) q0(0)<1> r[Q_AddrReg, 0]<16;8,2>:ub +// mov (8) q1(0)<1> r[Q_AddrReg, 16]<16;8,2>:ub + +// mov (1) f0.0:uw MaskA:uw + + add (8) q0_p0(0)<1> Q0 -P0 // q0-p0 + add (8) TempRow0(0)<1> P1 -P0 // p1-p0 + add (8) TempRow1(0)<1> Q1 -Q0 // q1-q0 + + // Build FilterSampleFlag + // abs(q0-p0) < alpha + (f0.0) cmp.l.f0.0 (16) null:w (abs)q0_p0(0) alpha:w + // abs(p1-p0) < Beta + (f0.0) cmp.l.f0.0 (16) null:w (abs)TempRow0(0) beta:w + // abs(q1-q0) < Beta + (f0.0) cmp.l.f0.0 (16) null:w (abs)TempRow1(0) beta:w + + //----------------------------------------------------------------------------------------- + + // if + (f0.0) if (8) UV_ENDIF1 + // For channels whose edge control map1 = 1 ---> perform de-blocking + +// mov (1) f0.1:w MaskB:w {NoMask} // Now check for which algorithm to apply + + (f0.1) if (8) UV_ELSE2 + + // For channels whose edge control map2 = 1 ---> bS = 4 algorithm + // p0' = (2*p1 + p0 + q1 + 2) >> 2 + // q0' = (2*q1 + q0 + p1 + 2) >> 2 + + // Optimized version: + // A = (p1 + q1 + 2) + // p0' = (p0 + p1 + A) >> 2 + // q0' = (q0 + q1 + A) >> 2 + //------------------------------------------------------------------------------------ + + // p0' = (2*p1 + p0 + q1 + 2) >> 2 + add (8) acc0<1>:w Q1 2:w + mac (8) acc0<1>:w P1 2:w + add (8) acc0<1>:w acc0<8;8,1>:w P0 + shr.sat (8) TempRow0B(0)<2> acc0<8;8,1>:w 2:w + + // q0' = (2*q1 + q0 + p1 + 2) >> 2 + add (8) acc0<1>:w P1 2:w + mac (8) acc0<1>:w Q1 2:w + add (8) acc0<1>:w acc0<8;8,1>:w Q0 + shr.sat (8) TempRow1B(0)<2> acc0<8;8,1>:w 2:w + + mov (8) NewP0 TempRow0B(0) // p0' + mov (8) NewQ0 TempRow1B(0) // q0' + + +UV_ELSE2: + else (8) UV_ENDIF2 + // For channels whose edge control map2 = 0 ---> bS < 4 algorithm + + // Expand tc0 (tc0 has 4 bytes) +// mov (8) tc0_exp(0)<1> tc0<1;2,0>:ub {NoMask} // tc0_exp = tc0, each tc0 is duplicated 2 times for 2 adjcent pixels + mov (8) acc0<1>:w tc0<1;2,0>:ub {NoMask} // tc0_exp = tc0, each tc0 is duplicated 2 times for 2 adjcent pixels + + // tc_exp = tc0_exp + 1 +// add (8) tc_exp(0)<1> tc0_exp(0) 1:w + add (8) tc_exp(0)<1> acc0<8;8,1>:w 1:w + + // delta = Clip3(-tc, tc, ((((q0 - p0)<<2) + (p1-q1) + 4) >> 3)) + // 4 * (q0-p0) + p1 - q1 + 4 + add (8) acc0<1>:w P1 4:w + mac (8) acc0<1>:w q0_p0(0) 4:w + add (8) acc0<1>:w acc0<8;8,1>:w -Q1 + shr (8) TempRow0(0)<1> acc0<8;8,1>:w 3:w + + // tc clip + cmp.g.f0.0 (8) null:w TempRow0(0) tc_exp(0) // Clip if > tc0 + cmp.l.f0.1 (8) null:w TempRow0(0) -tc_exp(0) // Clip if < -tc0 + + (f0.0) mov (8) TempRow0(0)<1> tc_exp(0) + (f0.1) mov (8) TempRow0(0)<1> -tc_exp(0) + + // p0' = Clip1(p0 + delta) = Clip3(0, 0xFF, p0 + delta) + add.sat (8) TempRow1B(0)<2> P0 TempRow0(0) // p0+delta + + // q0' = Clip1(q0 - delta) = Clip3(0, 0xFF, q0 - delta) + add.sat (8) TempRow0B(0)<2> Q0 -TempRow0(0) // q0-delta + + mov (8) NewP0 TempRow1B(0) // p0' + mov (8) NewQ0 TempRow0B(0) // q0' + + endif +UV_ENDIF2: +UV_ENDIF1: + endif + +RETURN + +#endif // !defined(__AVC_ILDB_CHROMA_CORE__) diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Chroma_Core_Mbaff.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Chroma_Core_Mbaff.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Chroma_Core_Mbaff.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Chroma_Core_Mbaff.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,146 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +////////// AVC ILDB Chroma Core Mbaff ///////////////////////////////////////////////////////////////////////////////// +// +// This core performs AVC U or V ILDB filtering on one horizontal edge (8 pixels) of a MB. +// If data is transposed, it can also de-block a vertical edge. +// +// Bafore calling this subroutine, caller needs to set the following parameters. +// +// - EdgeCntlMap1 // Edge control map A +// - EdgeCntlMap2 // Edge control map B +// - P_AddrReg // Src and dest address register for P pixels +// - Q_AddrReg // Src and dest address register for Q pixels +// - alpha // alpha corresponding to the edge to be filtered +// - beta // beta corresponding to the edge to be filtered +// - tc0 // tc0 corresponding to the edge to be filtered +// +// U or V: +// +----+----+----+----+ +// | P1 | p0 | q0 | q1 | +// +----+----+----+----+ +// +// p1 = r[P_AddrReg, 0]<16;8,2> +// p0 = r[P_AddrReg, 16]<16;8,2> +// q0 = r[Q_AddrReg, 0]<16;8,2> +// q1 = r[Q_AddrReg, 16]<16;8,2> +// +///////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +// The region is both src and dest +// P0-P3 and Q0-Q3 should be only used if they have not been modified to new values +#undef P1 +#undef P0 +#undef Q0 +#undef Q1 + +#define P1 r[P_AddrReg, 0]<16;8,2>:ub +#define P0 r[P_AddrReg, 16]<16;8,2>:ub +#define Q0 r[Q_AddrReg, 0]<16;8,2>:ub +#define Q1 r[Q_AddrReg, 16]<16;8,2>:ub + +// New region as dest +#undef NewP0 +#undef NewQ0 + +#define NewP0 r[P_AddrReg, 16]<2>:ub +#define NewQ0 r[Q_AddrReg, 0]<2>:ub + +// Filter one chroma edge - mbaff +FILTER_UV_MBAFF: + +#if defined(_DEBUG) + mov (1) EntrySignatureC:w 0x1112:w +#endif + //---------- Derive filterSampleflag in AVC spec, equition (8-469) ---------- + + //===== Assume f0.0 contains MaskA when entering this routine +// mov (1) f0.0:uw MaskA:uw + + add (8) q0_p0(0)<1> Q0 -P0 // q0-p0 + add (8) TempRow0(0)<1> P1 -P0 // p1-p0 + add (8) TempRow1(0)<1> Q1 -Q0 // q1-q0 + + // Build FilterSampleFlag + // abs(q0-p0) < alpha + (f0.0) cmp.l.f0.0 (16) null:w (abs)q0_p0(0) Mbaff_ALPHA(0) + // abs(p1-p0) < Beta + (f0.0) cmp.l.f0.0 (16) null:w (abs)TempRow0(0) Mbaff_BETA(0) + // abs(q1-q0) < Beta + (f0.0) cmp.l.f0.0 (16) null:w (abs)TempRow1(0) Mbaff_BETA(0) + + //----------------------------------------------------------------------------------------- + + // if + (f0.0) if (8) MBAFF_UV_ENDIF1 + // For channels whose edge control map1 = 1 ---> perform de-blocking + +// mov (1) f0.1:w MaskB:w {NoMask} // Now check for which algorithm to apply + + (f0.1) if (8) MBAFF_UV_ELSE2 + + // For channels whose edge control map2 = 1 ---> bS = 4 algorithm + // p0' = (2*p1 + P0 + q1 + 2) >> 2 + // q0' = (2*q1 + q0 + p1 + 2) >> 2 + //------------------------------------------------------------------------------------ + + // p0' = (2*p1 + p0 + q1 + 2) >> 2 + add (8) acc0<1>:w Q1 2:w + mac (8) acc0<1>:w P1 2:w + add (8) acc0<1>:w acc0<8;8,1>:w P0 + shr.sat (8) TempRow0B(0)<2> acc0<8;8,1>:w 2:w + + // q0' = (2*q1 + q0 + p1 + 2) >> 2 + add (8) acc0<1>:w P1 2:w + mac (8) acc0<1>:w Q1 2:w + add (8) acc0<1>:w acc0<8;8,1>:w Q0 + shr.sat (8) TempRow1B(0)<2> acc0<8;8,1>:w 2:w + + mov (8) NewP0 TempRow0B(0) // p0' + mov (8) NewQ0 TempRow1B(0) // q0' + +MBAFF_UV_ELSE2: + else (8) MBAFF_UV_ENDIF2 + // For channels whose edge control map2 = 0 ---> bS < 4 algorithm + + // tc_exp = tc0_exp + 1 + add (8) tc_exp(0)<1> Mbaff_TC0(0) 1:w + + // delta = Clip3(-tc, tc, ((((q0 - p0)<<2) + (p1-q1) + 4) >> 3)) + // 4 * (q0-p0) + p1 - q1 + 4 + add (8) acc0<1>:w P1 4:w + mac (8) acc0<1>:w q0_p0(0) 4:w + add (8) acc0<1>:w acc0<8;8,1>:w -Q1 + shr (8) TempRow0(0)<1> acc0<8;8,1>:w 3:w + + // tc clip + cmp.g.f0.0 (8) null:w TempRow0(0) tc_exp(0) // Clip if > tc0 + cmp.l.f0.1 (8) null:w TempRow0(0) -tc_exp(0) // Clip if < -tc0 + + (f0.0) mov (8) TempRow0(0)<1> tc_exp(0) + (f0.1) mov (8) TempRow0(0)<1> -tc_exp(0) + + // p0' = Clip1(p0 + delta) = Clip3(0, 0xFF, p0 + delta) + add.sat (8) TempRow1B(0)<2> P0 TempRow0(0) // p0+delta + + // q0' = Clip1(q0 - delta) = Clip3(0, 0xFF, q0 - delta) + add.sat (8) TempRow0B(0)<2> Q0 -TempRow0(0) // q0-delta + + mov (8) NewP0 TempRow1B(0) // p0' + mov (8) NewQ0 TempRow0B(0) // q0' + + endif +MBAFF_UV_ENDIF2: +MBAFF_UV_ENDIF1: + endif + +RETURN + + + diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_CloseGateway.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_CloseGateway.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_CloseGateway.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_CloseGateway.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,22 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +//----- Close a Message Gateway ----- + +#if defined(_DEBUG) + mov (1) EntrySignature:b 0x4444:w +#endif + +// Message descriptor +// bit 31 EOD +// 27:24 FFID = 0x0011 for msg gateway +// 23:20 msg length = 1 MRF +// 19:16 Response length = 0 +// 1:0 SubFuncID = 01 for CloseGateway +// Message descriptor: 0 000 0011 0001 0000 + 0 0 000000000000 01 ==> 0000 0011 0001 0000 0000 0000 0000 0001 +send (8) null:ud m7 r0.0<0;1,0>:ud MSG_GW CGWMSGDSC diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Dep_Check.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Dep_Check.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Dep_Check.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Dep_Check.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,186 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +//---------- Check dependency and spawn all MBs ---------- + +// Launch the 1st round of child threads for Vertical ILDB +#if defined(_DEBUG) + mov (1) EntrySignature:w 0x3333:w +#endif + +//===================================================================== +// Jump Table 1 + // 0 0 ---> Goto ALL_SPAWNED + // 0 1 ---> Goto ALL_SPAWNED + // 1 0 ---> Goto SLEEP_ENTRY + // 1 1 ---> Goto POST_SLEEP + mov (2) JumpTable.0<1>:d 0:d { NoDDClr } +#if defined(CHROMA_ROOT) + mov (1) JumpTable.2:d SLEEP_ENTRY_UV_ILDB_FRAME_IP-ALL_SPAWNED_UV_ILDB_FRAME_IP:d { NoDDClr, NoDDChk } + mov (1) JumpTable.3:d POST_SLEEP_UV_ILDB_FRAME_IP-ALL_SPAWNED_UV_ILDB_FRAME_IP:d { NoDDChk } +#else + mov (1) JumpTable.2:d SLEEP_ENTRY_Y_ILDB_FRAME_IP-ALL_SPAWNED_Y_ILDB_FRAME_IP:d { NoDDClr, NoDDChk } + mov (1) JumpTable.3:d POST_SLEEP_Y_ILDB_FRAME_IP-ALL_SPAWNED_Y_ILDB_FRAME_IP:d { NoDDChk } +#endif +//===================================================================== + + mov (2) f0.0<1>:w 0:w + + // Get m0 most of fields ready for URB write + mov (8) MRF0<1>:ud MSGSRC.0<8;8,1>:ud + + // Add child kernel offset + add (1) CT_R0Hdr.2:ud r0.2:ud CHILD_OFFSET:w + + // Init + mov (1) Col_Boundary:w 2:w + mov (1) Row_Boundary:w LastRow:w + mov (1) TopRowForScan:w 0:w + mov (2) OutstandingThreads<1>:w 0:w + + // Init Scoreboard (idle = 0x00FF, busy = 0x0000) + // Low word is saved col. High word is busy/idle status + mov (16) GatewayAperture(0)<1> 0x00FF00FF:ud // Init r6-r7 + mov (16) GatewayAperture(2)<1> 0x00FF00FF:ud // Init r8-r9 + mov (16) GatewayAperture(4)<1> 0x00FF00FF:ud // Init r10-r11 + mov (16) GatewayAperture(6)<1> 0x00FF00FF:ud // Init r12-r13 + mov (16) GatewayAperture(8)<1> 0x00FF00FF:ud // Init r14-r15 + + mul (1) StatusAddr:w CurRow:w 4:w // dword to bytes offset conversion + + //===================================================================== + +//SPAWN_LOOP: + //===== OutstandingThreads < ThreadLimit ? ============================ + cmp.l.f0.1 (1) null:w OutstandingThreads:w ThreadLimit:w // Check the thread limit +#if defined(CHROMA_ROOT) + (f0.1) jmpi ILDB_LABEL(POST_SLEEP_UV) +#else // LUMA_ROOT + (f0.1) jmpi ILDB_LABEL(POST_SLEEP_Y) +#endif + +#if defined(CHROMA_ROOT) +ILDB_LABEL(SLEEP_ENTRY_UV): +#else // LUMA_ROOT +ILDB_LABEL(SLEEP_ENTRY_Y): +#endif + //===== Goto Sleep ==================================================== + // Either reached max thread limit or no child thread can be spawned due to dependency. + add (1) OutstandingThreads:w OutstandingThreads:w -1:w // Do this before wait is faster + wait n0.0:d + +#if defined(CHROMA_ROOT) +ILDB_LABEL(POST_SLEEP_UV): +#else // LUMA_ROOT +ILDB_LABEL(POST_SLEEP_Y): +#endif + //===== Luma Status[CurRow] == busy ? ===== + cmp.z.f0.0 (1) null:uw r[StatusAddr, GatewayApertureB+ScoreBd_Idx]:uw 0:uw // Check west neighbor + cmp.g.f0.1 (1) null:w CurCol:w LastCol:w // Check if the curCol > LastCol + +#if defined(CHROMA_ROOT) + mov (16) acc0.0<1>:w URBOffsetUVBase<0;1,0>:w // Add offset to UV base (MBsCntY * URB_EBTRIES_PER_MB) + mac (1) URBOffset:w CurRow:w 4:w // 4 entries per row +#else + mul (1) URBOffset:w CurRow:w 4:w // 4 entries per row +#endif + +#if defined(CHROMA_ROOT) + (f0.0) jmpi ILDB_LABEL(SLEEP_ENTRY_UV) // Current row has a child thread running, can not spawn a new child thread, go back to sleep + (f0.1) jmpi ILDB_LABEL(NEXT_MB_UV) // skip MB if the curCol > LastCol +#else // LUMA_ROOT + (f0.0) jmpi ILDB_LABEL(SLEEP_ENTRY_Y) // Current row has a child thread running, can not spawn a new child thread, go back to sleep + (f0.1) jmpi ILDB_LABEL(NEXT_MB_Y) // skip MB if the curCol > LastCol +#endif + + //========== Spwan a child thread ======================================== + // Save cur col and set Status[CurRow] to busy + mov (2) r[StatusAddr, GatewayApertureB]<1>:uw CurColB<2;2,1>:ub // Store the new col + + // Increase OutstandingThreads and ProcessedMBs by 1 + add (2) OutstandingThreads<1>:w OutstandingThreads<2;2,1>:w 1:w + + #include "AVC_ILDB_SpawnChild.asm" + + //===== Find next MB =================================================== +#if defined(CHROMA_ROOT) +ILDB_LABEL(NEXT_MB_UV): +#else // LUMA_ROOT +ILDB_LABEL(NEXT_MB_Y): +#endif + // Check pic boundary, results are in f0.0 bit0 and bit1 + cmp.ge.f0.0 (2) null<1>:w CurCol<2;2,1>:w Col_Boundary<2;2,1>:w + + // Update TopRowForScan if the curCol = LastCol + (f0.1) add (1) TopRowForScan:w CurRow:w 1:w + +// cmp.l.f0.1 (1) null<1>:w ProcessedMBs:w TotalBlocks:w // Processed all blocks ? + // 2 sets compare + // ProcessedMBs:w < TotalBlocks:w OutstandingThreads:w < ThreadLimit:wProcessedMBs:w + // 0 0 ---> Goto ALL_SPAWNED + // 0 1 ---> Goto ALL_SPAWNED + // 1 0 ---> Goto SLEEP_ENTRY + // 1 1 ---> Goto POST_SLEEP + cmp.l.f0.1 (2) null<1>:w OutstandingThreads<2;2,1>:w ThreadLimit<2;2,1>:w + + // Just do it in stalled cycles + mov (1) acc0.0:w 4:w + mac (1) StatusAddr:w CurRow:w 4:w // dword to bytes offset conversion + add (2) CurCol<1>:w CurCol<2;2,1>:w StepToNextMB<2;2,1>:b // CurCol -= 2 and CurRow += 1 + + // Set f0.0 if turning around is needed, assuming bit 15 - 2 are zeros for correct comparison. + cmp.nz.f0.0 (1) null<1>:w f0.0:w 0x01:w + + mul (1) JumpAddr:w f0.1:w 4:w // byte offet in dword count + + // The next MB is at the row TopRowForScan + (f0.0) mul (1) StatusAddr:w TopRowForScan:w 4:w // dword to bytes offset conversion + (f0.0) mov (1) CurRow:w TopRowForScan:w { NoDDClr } // Restart from the top row that has MBs not deblocked yet. + (f0.0) add (1) CurCol:w r[StatusAddr, GatewayApertureB]:uw 1:w { NoDDChk } + + //===== Processed all blocks ? ========================================= + // (f0.1) jmpi SPAWN_LOOP + + jmpi r[JumpAddr, JUMPTABLE_BASE]:d +//JUMP_BASE: + + //====================================================================== + + // All MB are spawned at this point, check for outstanding thread count +#if defined(CHROMA_ROOT) +ILDB_LABEL(ALL_SPAWNED_UV): +#else // LUMA_ROOT +ILDB_LABEL(ALL_SPAWNED_Y): +#endif + cmp.e.f0.1 (1) null:w OutstandingThreads:w 0:w // Check before goto sleep +#if defined(CHROMA_ROOT) + (f0.1) jmpi ILDB_LABEL(ALL_DONE_UV) +#else // LUMA_ROOT + (f0.1) jmpi ILDB_LABEL(ALL_DONE_Y) +#endif + + wait n0.0:d // Wake up by a finished child thread + add (1) OutstandingThreads:w OutstandingThreads:w -1:w + +#if defined(CHROMA_ROOT) + // One thread is free and give it to luma thread limit --- Increase luma thread limit by one. + #include "AVC_ILDB_LumaThrdLimit.asm" +#endif + +#if defined(CHROMA_ROOT) + jmpi ILDB_LABEL(ALL_SPAWNED_UV) // Waked up and goto dependency check +#else // LUMA_ROOT + jmpi ILDB_LABEL(ALL_SPAWNED_Y) // Waked up and goto dependency check +#endif + + // All child threads are finsihed at this point +#if defined(CHROMA_ROOT) +ILDB_LABEL(ALL_DONE_UV): +#else // LUMA_ROOT +ILDB_LABEL(ALL_DONE_Y): +#endif diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Filter_Mbaff_UV_h.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Filter_Mbaff_UV_h.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Filter_Mbaff_UV_h.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Filter_Mbaff_UV_h.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,223 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +////////// AVC ILDB filter horizontal Mbaff UV /////////////////////////////////////////////////////// +// +// This filter code prepares the src data and control data for ILDB filtering on all horizontal edges of UV. +// +// It sssumes the data for horizontal de-blocking is already transposed. +// +// Chroma: +// +// +-------+-------+ H0 Edge +// | | | +// | | | +// | | | +// +-------+-------+ H1 Edge +// | | | +// | | | +// | | | +// +-------+-------+ +// +///////////////////////////////////////////////////////////////////////////// + +#if defined(_DEBUG) + mov (1) EntrySignatureC:w 0xBBBC:w +#endif + +//=============== Chroma deblocking ================ + +//---------- Deblock UV external top edge ---------- + + and.z.f0.0 (1) null:w r[ECM_AddrReg, BitFlags]:ub FilterTopMbEdgeFlag:w // Check for FilterTopMbEdgeFlag + + mov (1) f0.1:w DualFieldMode:w // Check for dual field mode + + // Get Luma maskA and maskB + shr (16) TempRow0(0)<1> r[ECM_AddrReg, wEdgeCntlMapA_ExtTopHorz0]<0;1,0>:uw RRampW(0) + shr (16) TempRow1(0)<1> r[ECM_AddrReg, wEdgeCntlMapB_ExtTopHorz0]<0;1,0>:uw RRampW(0) + + (f0.0) jmpi H0_UV_DONE // Skip H0 UV edge + + (f0.1) jmpi DUAL_FIELD_UV + + // Non dual field mode + + // Extract UV MaskA and MaskB from every other bit of Y masks + and.nz.f0.0 (8) null:w TempRow0(0)<16;8,2> 1:w + and.nz.f0.1 (8) null:w TempRow1(0)<16;8,2> 1:w + + // Ext U + // p1 = Prev MB U row 0 + // p0 = Prev MB U row 1 + // q0 = Cur MB U row 0 + // q1 = Cur MB U row 1 + mov (1) P_AddrReg:w PREV_MB_U_BASE:w { NoDDClr } + mov (1) Q_AddrReg:w SRC_MB_U_BASE:w { NoDDChk } + + mov (8) Mbaff_ALPHA(0,0)<1> r[ECM_AddrReg, bAlphaTop0_Cb]<0;1,0>:ub + mov (8) Mbaff_BETA(0,0)<1> r[ECM_AddrReg, bBetaTop0_Cb]<0;1,0>:ub + mov (8) Mbaff_TC0(0,0)<1> r[ECM_AddrReg, bTc0_h00_0_Cb]<1;2,0>:ub + + // Store UV MaskA and MaskB + mov (2) MaskA<1>:uw f0.0<2;2,1>:uw + + CALL(FILTER_UV_MBAFF, 1) + + // Ext V + mov (1) P_AddrReg:w PREV_MB_V_BASE:w { NoDDClr } + mov (1) Q_AddrReg:w SRC_MB_V_BASE:w { NoDDChk } + + mov (8) Mbaff_ALPHA(0,0)<1> r[ECM_AddrReg, bAlphaTop0_Cr]<0;1,0>:ub + mov (8) Mbaff_BETA(0,0)<1> r[ECM_AddrReg, bBetaTop0_Cr]<0;1,0>:ub + mov (8) Mbaff_TC0(0,0)<1> r[ECM_AddrReg, bTc0_h00_0_Cr]<1;2,0>:ub + + // Set UV MaskA and MaskB + mov (2) f0.0<1>:uw MaskA<2;2,1>:uw + + CALL(FILTER_UV_MBAFF, 1) + + jmpi H0_UV_DONE + +DUAL_FIELD_UV: + // Dual field mode, FieldModeCurrentMbFlag=0 && FieldModeAboveMbFlag=1 + + //===== Ext U, Top field + + // Extract UV MaskA and MaskB from every other bit of Y masks + and.nz.f0.0 (8) null:w TempRow0(0)<16;8,2> 1:w + and.nz.f0.1 (8) null:w TempRow1(0)<16;8,2> 1:w + + mov (1) P_AddrReg:w ABOVE_CUR_MB_BASE:w { NoDDClr } + mov (1) Q_AddrReg:w ABOVE_CUR_MB_BASE+32:w { NoDDChk } + + mov (16) ABOVE_CUR_MB_UW(0)<1> PREV_MB_UW(0, 0)<16;8,1> // Copy p1, p0 + mov (16) ABOVE_CUR_MB_UW(1)<1> SRC_UW(0, 0)<16;8,1> // Copy q1, q0 + + //===== Ext U, top field + mov (8) Mbaff_ALPHA(0,0)<1> r[ECM_AddrReg, bAlphaTop0_Cb]<0;1,0>:ub + mov (8) Mbaff_BETA(0,0)<1> r[ECM_AddrReg, bBetaTop0_Cb]<0;1,0>:ub + mov (8) Mbaff_TC0(0,0)<1> r[ECM_AddrReg, bTc0_h00_0_Cb]<1;2,0>:ub + + // Store UV MaskA and MaskB + mov (2) MaskA<1>:uw f0.0<2;2,1>:uw + + CALL(FILTER_UV_MBAFF, 1) // Ext U, top field + + //===== Ext V, top field + mov (1) P_AddrReg:w ABOVE_CUR_MB_BASE+1:w { NoDDClr } + mov (1) Q_AddrReg:w ABOVE_CUR_MB_BASE+33:w { NoDDChk } + + mov (8) Mbaff_ALPHA(0,0)<1> r[ECM_AddrReg, bAlphaTop0_Cr]<0;1,0>:ub + mov (8) Mbaff_BETA(0,0)<1> r[ECM_AddrReg, bBetaTop0_Cr]<0;1,0>:ub + mov (8) Mbaff_TC0(0,0)<1> r[ECM_AddrReg, bTc0_h00_0_Cr]<1;2,0>:ub + + // Set UV MaskA and MaskB + mov (2) f0.0<1>:uw MaskA<2;2,1>:uw + + CALL(FILTER_UV_MBAFF, 1) // Ext U, top field + + // Prefetch for bottom field + // Get bot field Luma maskA and maskB + shr (16) TempRow0(0)<1> r[ECM_AddrReg, wEdgeCntlMapA_ExtTopHorz1]<0;1,0>:uw RRampW(0) + shr (16) TempRow1(0)<1> r[ECM_AddrReg, wEdgeCntlMapB_ExtTopHorz1]<0;1,0>:uw RRampW(0) + + // Save deblocked top field rows + mov (8) PREV_MB_UW(1, 0)<1> ABOVE_CUR_MB_UW(0, 8) // Copy p0 + mov (8) SRC_UW(0, 0)<1> ABOVE_CUR_MB_UW(1, 0) // Copy q0 + //========================================================================== + + //===== Ext U, Bot field + + // Extract UV MaskA and MaskB from every other bit of Y masks + and.nz.f0.0 (8) null:w TempRow0(0)<16;8,2> 1:w + and.nz.f0.1 (8) null:w TempRow1(0)<16;8,2> 1:w + + mov (1) P_AddrReg:w ABOVE_CUR_MB_BASE:w { NoDDClr } + mov (1) Q_AddrReg:w ABOVE_CUR_MB_BASE+32:w { NoDDChk } + + mov (16) ABOVE_CUR_MB_UW(0)<1> PREV_MB_UW(0, 8)<16;8,1> // Copy p1, p0 + mov (16) ABOVE_CUR_MB_UW(1)<1> SRC_UW(0, 8)<16;8,1> // Copy q1, q0 + + //===== Ext U, bottom field + mov (8) Mbaff_ALPHA(0,0)<1> r[ECM_AddrReg, bAlphaTop1_Cb]<0;1,0>:ub + mov (8) Mbaff_BETA(0,0)<1> r[ECM_AddrReg, bBetaTop1_Cb]<0;1,0>:ub + mov (8) Mbaff_TC0(0,0)<1> r[ECM_AddrReg, bTc0_h00_1_Cb]<1;2,0>:ub + + // Store UV MaskA and MaskB + mov (2) MaskA<1>:uw f0.0<2;2,1>:uw + + CALL(FILTER_UV_MBAFF, 1) // Ext U, bottom field + + //===== Ext V, bot field + mov (1) P_AddrReg:w ABOVE_CUR_MB_BASE+1:w { NoDDClr } + mov (1) Q_AddrReg:w ABOVE_CUR_MB_BASE+33:w { NoDDChk } + + mov (8) Mbaff_ALPHA(0,0)<1> r[ECM_AddrReg, bAlphaTop1_Cr]<0;1,0>:ub + mov (8) Mbaff_BETA(0,0)<1> r[ECM_AddrReg, bBetaTop1_Cr]<0;1,0>:ub + mov (8) Mbaff_TC0(0,0)<1> r[ECM_AddrReg, bTc0_h00_1_Cr]<1;2,0>:ub + + // Set UV MaskA and MaskB + mov (2) f0.0<1>:uw MaskA<2;2,1>:uw + + CALL(FILTER_UV_MBAFF, 1) // Ext V, bottom field + + // Save deblocked bot field rows + mov (8) PREV_MB_UW(1, 8)<1> ABOVE_CUR_MB_UW(0, 8) // Copy p0 + mov (8) SRC_UW(0, 8)<1> ABOVE_CUR_MB_UW(1, 0) // Copy q0 + //======================================== + +H0_UV_DONE: + +//---------- Deblock U internal horz middle edge ---------- + + //***** Need to take every other bit to form U maskA in core + shr (16) TempRow0(0)<1> r[ECM_AddrReg, wEdgeCntlMap_IntMidHorz]<0;1,0>:uw RRampW(0) + + // p1 = Cur MB U row 2 + // p0 = Cur MB U row 3 + // q0 = Cur MB U row 4 + // q1 = Cur MB U row 5 + mov (1) P_AddrReg:w 4*UV_ROW_WIDTH+SRC_MB_U_BASE:w { NoDDClr } + mov (1) Q_AddrReg:w 8*UV_ROW_WIDTH+SRC_MB_U_BASE:w { NoDDChk } + + mov (8) Mbaff_ALPHA(0,0)<1> r[ECM_AddrReg, bAlphaInternal_Cb]<0;1,0>:ub + mov (8) Mbaff_BETA(0,0)<1> r[ECM_AddrReg, bBetaInternal_Cb]<0;1,0>:ub + mov (8) Mbaff_TC0(0,0)<1> r[ECM_AddrReg, bTc0_h20_Cb]<1;2,0>:ub + + and.nz.f0.0 (8) null:w TempRow0(0)<16;8,2> 1:w + + // Store UV MaskA and MaskB + mov (1) f0.1:uw 0:w + mov (1) MaskB:uw 0:w { NoDDClr } + mov (1) MaskA:uw f0.0:uw { NoDDChk } + + CALL(FILTER_UV_MBAFF, 1) +//----------------------------------------------- + + +//---------- Deblock V internal horz middle edge ---------- + + // p1 = Cur MB V row 2 + // p0 = Cur MB V row 3 + // q0 = Cur MB V row 4 + // q1 = Cur MB V row 5 + mov (1) P_AddrReg:w 4*UV_ROW_WIDTH+SRC_MB_V_BASE:w { NoDDClr } + mov (1) Q_AddrReg:w 8*UV_ROW_WIDTH+SRC_MB_V_BASE:w { NoDDChk } + + mov (8) Mbaff_ALPHA(0,0)<1> r[ECM_AddrReg, bAlphaInternal_Cr]<0;1,0>:ub + mov (8) Mbaff_BETA(0,0)<1> r[ECM_AddrReg, bBetaInternal_Cr]<0;1,0>:ub + mov (8) Mbaff_TC0(0,0)<1> r[ECM_AddrReg, bTc0_h20_Cr]<1;2,0>:ub + + // Set UV MaskA and MaskB + mov (2) f0.0<1>:uw MaskA<2;2,1>:uw + + CALL(FILTER_UV_MBAFF, 1) +//----------------------------------------------- + + diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Filter_Mbaff_UV_v.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Filter_Mbaff_UV_v.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Filter_Mbaff_UV_v.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Filter_Mbaff_UV_v.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,209 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +////////// AVC LDB filter vertical Mbaff UV /////////////////////////////////////////////////////// +// +// This filter code prepares the src data and control data for ILDB filtering on all vertical edges of UV. +// +// It sssumes the data for vertical de-blocking is already transposed. +// +// Chroma: +// +// +-------+-------+ +// | | | +// | | | +// | | | +// +-------+-------+ +// | | | +// | | | +// | | | +// +-------+-------+ +// +// V0 V1 +// Edge Edge +// +///////////////////////////////////////////////////////////////////////////// + +#if defined(_DEBUG) + mov (1) EntrySignatureC:w 0xBBBC:w +#endif + +//=============== Chroma deblocking ================ + +//---------- Deblock U external left edge ---------- + + and.z.f0.0 (1) null:w r[ECM_AddrReg, BitFlags]:ub FilterLeftMbEdgeFlag:w // Check for FilterLeftMbEdgeFlag + + cmp.z.f0.1 (1) null:w VertEdgePattern:uw LEFT_FIELD_CUR_FRAME:w + + // Get Luma maskA and maskB + shr (16) TempRow0(0)<1> r[ECM_AddrReg, wEdgeCntlMapA_ExtLeftVert0]<0;1,0>:uw RRampW(0) + shr (16) TempRow1(0)<1> r[ECM_AddrReg, wEdgeCntlMapB_ExtLeftVert0]<0;1,0>:uw RRampW(0) + + (f0.0) jmpi BYPASS_V0_UV // Do not deblock Left ext edge + + cmp.z.f0.0 (1) null:w VertEdgePattern:uw LEFT_FRAME_CUR_FIELD:w + + (-f0.1) jmpi V0_U_NEXT1 // Jump if not LEFT_FIELD_CUR_FRAME + + //----- For LEFT_FIELD_CUR_FRAME + + // Extract UV MaskA and MaskB from every other 2 bits of Y masks + and.nz.f0.0 (8) null:w TempRow0(0)<4;2,1> 1:w + and.nz.f0.1 (8) null:w TempRow1(0)<4;2,1> 1:w + + // For FieldModeLeftMbFlag=1 && FieldModeCurrentMbFlag=0 + mov (4) Mbaff_ALPHA(0,0)<2> r[ECM_AddrReg, bAlphaLeft0_Cb]<0;1,0>:ub { NoDDClr } + mov (4) Mbaff_ALPHA(0,1)<2> r[ECM_AddrReg, bAlphaLeft1_Cb]<0;1,0>:ub { NoDDChk } + mov (4) Mbaff_BETA(0,0)<2> r[ECM_AddrReg, bBetaLeft0_Cb]<0;1,0>:ub { NoDDClr } + mov (4) Mbaff_BETA(0,1)<2> r[ECM_AddrReg, bBetaLeft1_Cb]<0;1,0>:ub { NoDDChk } + mov (4) Mbaff_TC0(0,0)<2> r[ECM_AddrReg, bTc0_v00_0_Cb]<4;4,1>:ub { NoDDClr } + mov (4) Mbaff_TC0(0,1)<2> r[ECM_AddrReg, bTc0_v00_1_Cb]<4;4,1>:ub { NoDDChk } + + jmpi V0_U_NEXT3 + +V0_U_NEXT1: + + (-f0.0) jmpi V0_U_NEXT2 // Jump if not LEFT_FRAME_CUR_FIELD + + //----- For LEFT_FRAME_CUR_FIELD + + // Extract UV MaskA and MaskB from every other bit of Y masks + and.nz.f0.0 (8) null:w TempRow0(0)<16;8,2> 1:w + and.nz.f0.1 (8) null:w TempRow1(0)<16;8,2> 1:w + + // For FieldModeLeftMbFlag=0 && FieldModeCurrentMbFlag=1 + mov (4) Mbaff_ALPHA(0,0)<1> r[ECM_AddrReg, bAlphaLeft0_Cb]<0;1,0>:ub { NoDDClr } + mov (4) Mbaff_ALPHA(0,4)<1> r[ECM_AddrReg, bAlphaLeft1_Cb]<0;1,0>:ub { NoDDChk } + mov (4) Mbaff_BETA(0,0)<1> r[ECM_AddrReg, bBetaLeft0_Cb]<0;1,0>:ub { NoDDClr } + mov (4) Mbaff_BETA(0,4)<1> r[ECM_AddrReg, bBetaLeft1_Cb]<0;1,0>:ub { NoDDChk } + mov (4) Mbaff_TC0(0,0)<1> r[ECM_AddrReg, bTc0_v00_0_Cb]<4;4,1>:ub { NoDDClr } + mov (4) Mbaff_TC0(0,4)<1> r[ECM_AddrReg, bTc0_v00_1_Cb]<4;4,1>:ub { NoDDChk } + + jmpi V0_U_NEXT3 + +V0_U_NEXT2: + + // Extract UV MaskA and MaskB from every other bit of Y masks + and.nz.f0.0 (8) null:w TempRow0(0)<16;8,2> 1:w + and.nz.f0.1 (8) null:w TempRow1(0)<16;8,2> 1:w + + // Both are frames or fields + mov (8) Mbaff_ALPHA(0,0)<1> r[ECM_AddrReg, bAlphaLeft0_Cb]<0;1,0>:ub + mov (8) Mbaff_BETA(0,0)<1> r[ECM_AddrReg, bBetaLeft0_Cb]<0;1,0>:ub + mov (8) Mbaff_TC0(0,0)<1> r[ECM_AddrReg, bTc0_v00_0_Cb]<1;2,0>:ub + +V0_U_NEXT3: + + // p1 = Prev MB U row 0 + // p0 = Prev MB U row 1 + // q0 = Cur MB U row 0 + // q1 = Cur MB U row 1 + mov (1) P_AddrReg:w PREV_MB_U_BASE:w { NoDDClr } + mov (1) Q_AddrReg:w SRC_MB_U_BASE:w { NoDDChk } + + // Store UV MaskA and MaskB + mov (2) MaskA<1>:uw f0.0<2;2,1>:uw + + CALL(FILTER_UV_MBAFF, 1) +//----------------------------------------------- + +//---------- Deblock V external left edge ---------- + + // No change to MaskA and MaskB + + cmp.z.f0.0 (4) null:w VertEdgePattern:uw LEFT_FIELD_CUR_FRAME:w + cmp.z.f0.1 (4) null:w VertEdgePattern:uw LEFT_FRAME_CUR_FIELD:w + + // both are frame or field + mov (8) Mbaff_ALPHA(0,0)<1> r[ECM_AddrReg, bAlphaLeft0_Cr]<0;1,0>:ub + mov (8) Mbaff_BETA(0,0)<1> r[ECM_AddrReg, bBetaLeft0_Cr]<0;1,0>:ub + mov (8) Mbaff_TC0(0,0)<1> r[ECM_AddrReg, bTc0_v00_0_Cr]<1;2,0>:ub + + // p1 = Prev MB V row 0 + // p0 = Prev MB V row 1 + // q0 = Cur MB V row 0 + // q1 = Cur MB V row 1 + mov (1) P_AddrReg:w PREV_MB_V_BASE:w { NoDDClr } + mov (1) Q_AddrReg:w SRC_MB_V_BASE:w { NoDDChk } + + // For FieldModeLeftMbFlag=1 && FieldModeCurrentMbFlag=0 + (f0.0) mov (4) Mbaff_ALPHA(0,0)<2> r[ECM_AddrReg, bAlphaLeft0_Cr]<0;1,0>:ub { NoDDClr } + (f0.0) mov (4) Mbaff_ALPHA(0,1)<2> r[ECM_AddrReg, bAlphaLeft1_Cr]<0;1,0>:ub { NoDDChk } + (f0.0) mov (4) Mbaff_BETA(0,0)<2> r[ECM_AddrReg, bBetaLeft0_Cr]<0;1,0>:ub { NoDDClr } + (f0.0) mov (4) Mbaff_BETA(0,1)<2> r[ECM_AddrReg, bBetaLeft1_Cr]<0;1,0>:ub { NoDDChk } + (f0.0) mov (4) Mbaff_TC0(0,0)<2> r[ECM_AddrReg, bTc0_v00_0_Cr]<4;4,1>:ub { NoDDClr } + (f0.0) mov (4) Mbaff_TC0(0,1)<2> r[ECM_AddrReg, bTc0_v00_1_Cr]<4;4,1>:ub { NoDDChk } + + // For FieldModeLeftMbFlag=0 && FieldModeCurrentMbFlag=1 + (f0.1) mov (4) Mbaff_ALPHA(0,0)<1> r[ECM_AddrReg, bAlphaLeft0_Cr]<0;1,0>:ub { NoDDClr } + (f0.1) mov (4) Mbaff_ALPHA(0,4)<1> r[ECM_AddrReg, bAlphaLeft1_Cr]<0;1,0>:ub { NoDDChk } + (f0.1) mov (4) Mbaff_BETA(0,0)<1> r[ECM_AddrReg, bBetaLeft0_Cr]<0;1,0>:ub { NoDDClr } + (f0.1) mov (4) Mbaff_BETA(0,4)<1> r[ECM_AddrReg, bBetaLeft1_Cr]<0;1,0>:ub { NoDDChk } + (f0.1) mov (4) Mbaff_TC0(0,0)<1> r[ECM_AddrReg, bTc0_v00_0_Cr]<4;4,1>:ub { NoDDClr } + (f0.1) mov (4) Mbaff_TC0(0,4)<1> r[ECM_AddrReg, bTc0_v00_1_Cr]<4;4,1>:ub { NoDDChk } + + // Set UV MaskA and MaskB + mov (2) f0.0<1>:uw MaskA<2;2,1>:uw + + CALL(FILTER_UV_MBAFF, 1) +//----------------------------------------------- + +BYPASS_V0_UV: + // Set EdgeCntlMap2 = 0, so it always uses bS < 4 algorithm. + // Same alpha and beta for all internal vert and horiz edges + +//---------- Deblock U internal vert middle edge ---------- + + //***** Need to take every other bit to form U or V maskA + shr (16) TempRow0(0)<1> r[ECM_AddrReg, wEdgeCntlMap_IntMidVert]<0;1,0>:uw RRampW(0) + + // p1 = Cur MB U row 2 + // p0 = Cur MB U row 3 + // q0 = Cur MB U row 4 + // q1 = Cur MB U row 5 + mov (1) P_AddrReg:w 4*UV_ROW_WIDTH+SRC_MB_U_BASE:w { NoDDClr } // Skip 2 U rows and 2 V rows + mov (1) Q_AddrReg:w 8*UV_ROW_WIDTH+SRC_MB_U_BASE:w { NoDDChk } + + mov (8) Mbaff_ALPHA(0,0)<1> r[ECM_AddrReg, bAlphaInternal_Cb]<0;1,0>:ub + mov (8) Mbaff_BETA(0,0)<1> r[ECM_AddrReg, bBetaInternal_Cb]<0;1,0>:ub + mov (8) Mbaff_TC0(0,0)<1> r[ECM_AddrReg, bTc0_v02_Cb]<1;2,0>:ub + + and.nz.f0.0 (8) null:w TempRow0(0)<16;8,2> 1:w + + // Store MaskA and MaskB + mov (1) f0.1:uw 0:w + mov (1) MaskB:uw 0:w { NoDDClr } + mov (1) MaskA:uw f0.0:uw { NoDDChk } + + CALL(FILTER_UV_MBAFF, 1) + +//----------------------------------------------- + + +//---------- Deblock V internal vert middle edge ---------- + + // P1 = Cur MB V row 2 + // P0 = Cur MB V row 3 + // Q0 = Cur MB V row 4 + // Q1 = Cur MB V row 5 + mov (1) P_AddrReg:w 4*UV_ROW_WIDTH+SRC_MB_V_BASE:w { NoDDClr } // Skip 2 U rows and 2 V rows + mov (1) Q_AddrReg:w 8*UV_ROW_WIDTH+SRC_MB_V_BASE:w { NoDDChk } + + // Put MaskA into f0.0 + // Put MaskB into f0.1 + mov (2) f0.0<1>:uw MaskA<2;2,1>:uw + + mov (8) Mbaff_ALPHA(0,0)<1> r[ECM_AddrReg, bAlphaInternal_Cr]<0;1,0>:ub + mov (8) Mbaff_BETA(0,0)<1> r[ECM_AddrReg, bBetaInternal_Cr]<0;1,0>:ub + mov (8) Mbaff_TC0(0,0)<1> r[ECM_AddrReg, bTc0_v02_Cr]<1;2,0>:ub + + CALL(FILTER_UV_MBAFF, 1) + +//----------------------------------------------- + diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Filter_Mbaff_Y_h.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Filter_Mbaff_Y_h.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Filter_Mbaff_Y_h.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Filter_Mbaff_Y_h.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,234 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +////////// AVC ILDB filter horizontal Mbaff Y /////////////////////////////////////////////////////// +// +// This filter code prepares the src data and control data for ILDB filtering on all horizontal edges of Y. +// +// It sssumes the data for horizontal de-blocking is already transposed. +// +// Luma: +// +// +-------+-------+-------+-------+ H0 Edge +// | | | | | +// | | | | | +// | | | | | +// +-------+-------+-------+-------+ H1 Edge +// | | | | | +// | | | | | +// | | | | | +// +-------+-------+-------+-------+ H2 Edge +// | | | | | +// | | | | | +// | | | | | +// +-------+-------+-------+-------+ H3 Edge +// | | | | | +// | | | | | +// | | | | | +// +-------+-------+-------+-------+ +// +///////////////////////////////////////////////////////////////////////////// + +#if defined(_DEBUG) + mov (1) EntrySignatureC:w 0xBBBB:w +#endif + + +//========== Luma deblocking ========== + + +//---------- Deblock Y external top edge (H0) ---------- + + // Bypass deblocking if it is the top edge of the picture. + and.z.f0.0 (1) null:w r[ECM_AddrReg, BitFlags]:ub FilterTopMbEdgeFlag:w // Check for FilterTopMbEdgeFlag + mov (1) f0.1:w DualFieldMode:w // Check for dual field mode + + // Non dual field mode + + // Get (alpha >> 2) + 2 + shr (16) Mbaff_ALPHA2(0,0)<1> r[ECM_AddrReg, bAlphaTop0_Y]<0;1,0>:ub 2:w // alpha >> 2 + + mov (2) MaskA<1>:uw r[ECM_AddrReg, wEdgeCntlMapA_ExtTopHorz0]<2;2,1>:uw + + // Ext Y + mov (16) Mbaff_ALPHA(0,0)<1> r[ECM_AddrReg, bAlphaTop0_Y]<0;1,0>:ub + mov (16) Mbaff_BETA(0,0)<1> r[ECM_AddrReg, bBetaTop0_Y]<0;1,0>:ub + mov (16) Mbaff_TC0(0,0)<1> r[ECM_AddrReg, bTc0_h00_0_Y]<1;4,0>:ub + + add (16) Mbaff_ALPHA2(0,0)<1> Mbaff_ALPHA2(0,0)<16;16,1> 2:w // alpha2 = (alpha >> 2) + 2 + + (f0.0) jmpi H0_Y_DONE // Skip Ext Y deblocking + (f0.1) jmpi DUAL_FIELD_Y + + mov (1) P_AddrReg:w PREV_MB_Y_BASE:w { NoDDClr } + mov (1) Q_AddrReg:w SRC_MB_Y_BASE:w { NoDDChk } + + CALL(FILTER_Y_MBAFF, 1) // Non dual field deblocking + + jmpi H0_Y_DONE + +DUAL_FIELD_Y: + // Dual field mode, FieldModeCurrentMbFlag=0 && FieldModeAboveMbFlag=1 + + mov (1) P_AddrReg:w ABOVE_CUR_MB_BASE:w { NoDDClr } + mov (1) Q_AddrReg:w ABOVE_CUR_MB_BASE+64:w { NoDDChk } + + // Must use PREV_MB_YW. TOP_MB_YW is not big enough. + // Get top field rows + mov (16) ABOVE_CUR_MB_YW(0)<1> PREV_MB_YW(0, 0)<16;8,1> // Copy p3, p2 + mov (16) ABOVE_CUR_MB_YW(1)<1> PREV_MB_YW(2, 0)<16;8,1> // Copy p1, p0 + mov (16) ABOVE_CUR_MB_YW(2)<1> SRC_YW(0, 0)<16;8,1> // Copy q0, q1 + mov (16) ABOVE_CUR_MB_YW(3)<1> SRC_YW(2, 0)<16;8,1> // Copy q2, q3 + + CALL(FILTER_Y_MBAFF, 1) // Ext Y, top field + + // Save deblocked top field rows + mov (8) PREV_MB_YW(1, 0)<1> ABOVE_CUR_MB_YW(0, 8) // Copy p2 + mov (8) PREV_MB_YW(2, 0)<1> ABOVE_CUR_MB_YW(1, 0) // Copy p1 + mov (8) PREV_MB_YW(3, 0)<1> ABOVE_CUR_MB_YW(1, 8) // Copy p0 + mov (8) SRC_YW(0, 0)<1> ABOVE_CUR_MB_YW(2, 0) // Copy q0 + mov (8) SRC_YW(1, 0)<1> ABOVE_CUR_MB_YW(2, 8) // Copy q1 + mov (8) SRC_YW(2, 0)<1> ABOVE_CUR_MB_YW(3, 0) // Copy q2 + + //================================================================================== + // Bottom field + + // Get (alpha >> 2) + 2 + shr (16) Mbaff_ALPHA2(0,0)<1> r[ECM_AddrReg, bAlphaTop1_Y]<0;1,0>:ub 2:w // alpha >> 2 + + mov (1) P_AddrReg:w ABOVE_CUR_MB_BASE:w { NoDDClr } + mov (1) Q_AddrReg:w ABOVE_CUR_MB_BASE+64:w { NoDDChk } + + // Get bot field rows + mov (16) ABOVE_CUR_MB_YW(0)<1> PREV_MB_YW(0, 8)<16;8,1> // Copy p3, p2 + mov (16) ABOVE_CUR_MB_YW(1)<1> PREV_MB_YW(2, 8)<16;8,1> // Copy p1, p0 + mov (16) ABOVE_CUR_MB_YW(2)<1> SRC_YW(0, 8)<16;8,1> // Copy q0, q1 + mov (16) ABOVE_CUR_MB_YW(3)<1> SRC_YW(2, 8)<16;8,1> // Copy q2, q3 + + mov (2) MaskA<1>:uw r[ECM_AddrReg, wEdgeCntlMapA_ExtTopHorz1]<2;2,1>:uw + + mov (16) Mbaff_ALPHA(0,0)<1> r[ECM_AddrReg, bAlphaTop1_Y]<0;1,0>:ub + mov (16) Mbaff_BETA(0,0)<1> r[ECM_AddrReg, bBetaTop1_Y]<0;1,0>:ub + mov (16) Mbaff_TC0(0,0)<1> r[ECM_AddrReg, bTc0_h00_1_Y]<1;4,0>:ub + + add (16) Mbaff_ALPHA2(0,0)<1> Mbaff_ALPHA2(0,0)<16;16,1> 2:w // alpha2 = (alpha >> 2) + 2 + + CALL(FILTER_Y_MBAFF, 1) // Ext Y, bot field + + // Save deblocked top field rows + mov (8) PREV_MB_YW(1, 8)<1> ABOVE_CUR_MB_YW(0, 8) // Copy p2 + mov (8) PREV_MB_YW(2, 8)<1> ABOVE_CUR_MB_YW(1, 0) // Copy p1 + mov (8) PREV_MB_YW(3, 8)<1> ABOVE_CUR_MB_YW(1, 8) // Copy p0 + mov (8) SRC_YW(0, 8)<1> ABOVE_CUR_MB_YW(2, 0) // Copy q0 + mov (8) SRC_YW(1, 8)<1> ABOVE_CUR_MB_YW(2, 8) // Copy q1 + mov (8) SRC_YW(2, 8)<1> ABOVE_CUR_MB_YW(3, 0) // Copy q2 + //================================================================================== + +H0_Y_DONE: + +//BYPASS_H0_Y: +//------------------------------------------------------------------ + // Same alpha, alpha2, beta and MaskB for all internal edges + + // Get (alpha >> 2) + 2 + shr (16) Mbaff_ALPHA2(0,0)<1> r[ECM_AddrReg, bAlphaInternal_Y]<0;1,0>:ub 2:w // alpha >> 2 + + // alpha = bAlphaInternal_Y + // beta = bBetaInternal_Y + mov (16) Mbaff_ALPHA(0,0)<1> r[ECM_AddrReg, bAlphaInternal_Y]<0;1,0>:ub + mov (16) Mbaff_BETA(0,0)<1> r[ECM_AddrReg, bBetaInternal_Y]<0;1,0>:ub + + mov (1) MaskB:uw 0:w // Set MaskB = 0 for all 3 edges, so it always uses bS < 4 algorithm. + + add (16) Mbaff_ALPHA2(0,0)<1> Mbaff_ALPHA2(0,0)<16;16,1> 2:w // alpha2 = (alpha >> 2) + 2 + +//---------- Deblock Y internal top edge (H1) ---------- + + // Bypass deblocking if FilterInternal4x4EdgesFlag = 0 + and.z.f0.0 (1) null:w r[ECM_AddrReg, BitFlags]:ub FilterInternal4x4EdgesFlag:w // Check for FilterInternal4x4EdgesFlag +// (f0.0) jmpi BYPASS_H1_Y + + // p3 = Cur MB Y row 0 = r[P_AddrReg, 0]<16;16,1> + // p2 = Cur MB Y row 1 = r[P_AddrReg, 16]<16;16,1> + // p1 = Cur MB Y row 2 = r[P_AddrReg, 32]<16;16,1> + // p0 = Cur MB Y row 3 = r[P_AddrReg, 48]<16;16,1> + // q0 = Cur MB Y row 4 = r[Q_AddrReg, 0]<16;16,1> + // q1 = Cur MB Y row 5 = r[Q_AddrReg, 16]<16;16,1> + // q2 = Cur MB Y row 6 = r[Q_AddrReg, 32]<16;16,1> + // q3 = Cur MB Y row 7 = r[Q_AddrReg, 48]<16;16,1> + mov (1) P_AddrReg:w SRC_MB_Y_BASE:w { NoDDClr } + mov (1) Q_AddrReg:w 4*Y_ROW_WIDTH+SRC_MB_Y_BASE:w { NoDDChk } + + mov (1) MaskA:uw r[ECM_AddrReg, wEdgeCntlMap_IntTopHorz]:uw + + // tc0 has bTc0_h13_Y + bTc0_h12_Y + bTc0_h11_Y + bTc0_h10_Y + mov (16) Mbaff_TC0(0,0)<1> r[ECM_AddrReg, bTc0_h10_Y]<1;4,0>:ub + +// CALL(FILTER_Y_MBAFF, 1) + PRED_CALL(-f0.0, FILTER_Y_MBAFF, 1) + +//BYPASS_H1_Y: +//------------------------------------------------------------------ + + +//---------- Deblock Y internal mid horizontal edge (H2) ---------- + + // Bypass deblocking if FilterInternal8x8EdgesFlag = 0 + and.z.f0.0 (1) null:w r[ECM_AddrReg, BitFlags]:ub FilterInternal8x8EdgesFlag:w // Check for FilterInternal4x4EdgesFlag +// (f0.0) jmpi BYPASS_H2_Y + + // p3 = Cur MB Y row 4 = r[P_AddrReg, 0]<16;16,1> + // p2 = Cur MB Y row 5 = r[P_AddrReg, 16]<16;16,1> + // p1 = Cur MB Y row 6 = r[P_AddrReg, 32]<16;16,1> + // p0 = Cur MB Y row 7 = r[P_AddrReg, 48]<16;16,1> + // q0 = Cur MB Y row 8 = r[Q_AddrReg, 0]<16;16,1> + // q1 = Cur MB Y row 9 = r[Q_AddrReg, 16]<16;16,1> + // q2 = Cur MB Y row 10 = r[Q_AddrReg, 32]<16;16,1> + // q3 = Cur MB Y row 11 = r[Q_AddrReg, 48]<16;16,1> + mov (1) P_AddrReg:w 4*Y_ROW_WIDTH+SRC_MB_Y_BASE:w { NoDDClr } + mov (1) Q_AddrReg:w 8*Y_ROW_WIDTH+SRC_MB_Y_BASE:w { NoDDChk } + + mov (1) MaskA:uw r[ECM_AddrReg, wEdgeCntlMap_IntMidHorz]:uw + + // tc0 has bTc0_h23_Y + bTc0_h22_Y + bTc0_h21_Y + bTc0_h20_Y + mov (16) Mbaff_TC0(0,0)<1> r[ECM_AddrReg, bTc0_h20_Y]<1;4,0>:ub + +// CALL(FILTER_Y_MBAFF, 1) + PRED_CALL(-f0.0, FILTER_Y_MBAFF, 1) + +//BYPASS_H2_Y: +//----------------------------------------------- + + +//---------- Deblock Y internal bottom edge (H3) ---------- + + // Bypass deblocking if FilterInternal4x4EdgesFlag = 0 + and.z.f0.0 (1) null:w r[ECM_AddrReg, BitFlags]:ub FilterInternal4x4EdgesFlag:w // Check for FilterInternal4x4EdgesFlag +// (f0.0) jmpi BYPASS_H3_Y + + // p3 = Cur MB Y row 8 = r[P_AddrReg, 0]<16;16,1> + // p2 = Cur MB Y row 9 = r[P_AddrReg, 16]<16;16,1> + // p1 = Cur MB Y row 10 = r[P_AddrReg, 32]<16;16,1> + // p0 = Cur MB Y row 11 = r[P_AddrReg, 48]<16;16,1> + // q0 = Cur MB Y row 12 = r[Q_AddrReg, 0]<16;16,1> + // q1 = Cur MB Y row 13 = r[Q_AddrReg, 16]<16;16,1> + // q2 = Cur MB Y row 14 = r[Q_AddrReg, 32]<16;16,1> + // q3 = Cur MB Y row 15 = r[Q_AddrReg, 48]<16;16,1> + mov (1) P_AddrReg:w 8*Y_ROW_WIDTH+SRC_MB_Y_BASE:w { NoDDClr } + mov (1) Q_AddrReg:w 12*Y_ROW_WIDTH+SRC_MB_Y_BASE:w { NoDDChk } + + mov (1) MaskA:uw r[ECM_AddrReg, wEdgeCntlMap_IntBotHorz]:uw + + // tc0 has bTc0_h33_Y + bTc0_h32_Y + bTc0_h31_Y + bTc0_h30_Y + mov (16) Mbaff_TC0(0,0)<1> r[ECM_AddrReg, bTc0_h30_Y]<1;4,0>:ub + +// CALL(FILTER_Y_MBAFF, 1) + PRED_CALL(-f0.0, FILTER_Y_MBAFF, 1) + +//BYPASS_H3_Y: +//----------------------------------------------- diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Filter_Mbaff_Y_v.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Filter_Mbaff_Y_v.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Filter_Mbaff_Y_v.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Filter_Mbaff_Y_v.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,269 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +////////// AVC ILDB filter vertical Mbaff Y /////////////////////////////////////////////////////// +// +// This filter code prepares the src data and control data for ILDB filtering on all vertical edges of Y. +// +// It sssumes the data for vertical de-blocking is already transposed. +// +// Luma: +// +// +-------+-------+-------+-------+ +// | | | | | +// | | | | | +// | | | | | +// +-------+-------+-------+-------+ +// | | | | | +// | | | | | +// | | | | | +// +-------+-------+-------+-------+ +// | | | | | +// | | | | | +// | | | | | +// +-------+-------+-------+-------+ +// | | | | | +// | | | | | +// | | | | | +// +-------+-------+-------+-------+ +// +// V0 V1 V2 V3 +// Edge Edge Edge Edge +// +///////////////////////////////////////////////////////////////////////////// + +#if defined(_DEBUG) + mov (1) EntrySignatureC:w 0xBBBB:w +#endif + + +//========== Luma deblocking ========== + + +//---------- Deblock Y external left edge (V0) ---------- + + cmp.z.f0.0 (8) null:w VertEdgePattern:uw LEFT_FIELD_CUR_FRAME:w + cmp.z.f0.1 (8) null:w VertEdgePattern:uw LEFT_FRAME_CUR_FIELD:w + + // Intial set for both are frame or field + mov (16) Mbaff_ALPHA(0,0)<1> r[ECM_AddrReg, bAlphaLeft0_Y]<0;1,0>:ub + mov (16) Mbaff_BETA(0,0)<1> r[ECM_AddrReg, bBetaLeft0_Y]<0;1,0>:ub + mov (16) Mbaff_TC0(0,0)<1> r[ECM_AddrReg, bTc0_v00_0_Y]<1;4,0>:ub + + // For FieldModeCurrentMbFlag=1 && FieldModeLeftMbFlag=0 + (f0.0) mov (8) Mbaff_ALPHA(0,0)<2> r[ECM_AddrReg, bAlphaLeft0_Y]<0;1,0>:ub { NoDDClr } + (f0.0) mov (8) Mbaff_ALPHA(0,1)<2> r[ECM_AddrReg, bAlphaLeft1_Y]<0;1,0>:ub { NoDDChk } + (f0.0) mov (8) Mbaff_BETA(0,0)<2> r[ECM_AddrReg, bBetaLeft0_Y]<0;1,0>:ub { NoDDClr } + (f0.0) mov (8) Mbaff_BETA(0,1)<2> r[ECM_AddrReg, bBetaLeft1_Y]<0;1,0>:ub { NoDDChk } + (f0.0) mov (8) Mbaff_TC0(0,0)<2> r[ECM_AddrReg, bTc0_v00_0_Y]<1;2,0>:ub { NoDDClr } + (f0.0) mov (8) Mbaff_TC0(0,1)<2> r[ECM_AddrReg, bTc0_v00_1_Y]<1;2,0>:ub { NoDDChk } + + and.z.f0.0 (1) null:w r[ECM_AddrReg, BitFlags]:ub FilterLeftMbEdgeFlag:w // Check for FilterLeftMbEdgeFlag + + // For FieldModeCurrentMbFlag=0 && FieldModeLeftMbFlag=1 + (f0.1) mov (8) Mbaff_ALPHA(0,0)<1> r[ECM_AddrReg, bAlphaLeft0_Y]<0;1,0>:ub { NoDDClr } + (f0.1) mov (8) Mbaff_ALPHA(0,8)<1> r[ECM_AddrReg, bAlphaLeft1_Y]<0;1,0>:ub { NoDDChk } + (f0.1) mov (8) Mbaff_BETA(0,0)<1> r[ECM_AddrReg, bBetaLeft0_Y]<0;1,0>:ub { NoDDClr } + (f0.1) mov (8) Mbaff_BETA(0,8)<1> r[ECM_AddrReg, bBetaLeft1_Y]<0;1,0>:ub { NoDDChk } + (f0.1) mov (8) Mbaff_TC0(0,0)<1> r[ECM_AddrReg, bTc0_v00_0_Y]<1;2,0>:ub { NoDDClr } + (f0.1) mov (8) Mbaff_TC0(0,8)<1> r[ECM_AddrReg, bTc0_v00_1_Y]<1;2,0>:ub { NoDDChk } + + // Get (alpha >> 2) + 2 + shr (16) Mbaff_ALPHA2(0,0)<1> Mbaff_ALPHA(0) 2:w // alpha >> 2 + + // p3 = Prev MB Y row 0 = r[P_AddrReg, 0]<16;16,1> + // p2 = Prev MB Y row 1 = r[P_AddrReg, 16]<16;16,1> + // p1 = Prev MB Y row 2 = r[P_AddrReg, 32]<16;16,1> + // p0 = Prev MB Y row 3 = r[P_AddrReg, 48]<16;16,1> + // q0 = Cur MB Y row 0 = r[Q_AddrReg, 0]<16;16,1> + // q1 = Cur MB Y row 1 = r[Q_AddrReg, 16]<16;16,1> + // q2 = Cur MB Y row 2 = r[Q_AddrReg, 32]<16;16,1> + // q3 = Cur MB Y row 3 = r[Q_AddrReg, 48]<16;16,1> + mov (1) P_AddrReg:w PREV_MB_Y_BASE:w { NoDDClr } + mov (1) Q_AddrReg:w SRC_MB_Y_BASE:w { NoDDChk } + + // Set MaskA and MaskB + mov (2) MaskA<1>:uw r[ECM_AddrReg, wEdgeCntlMapA_ExtLeftVert0]<2;2,1>:uw + + add (16) Mbaff_ALPHA2(0,0)<1> Mbaff_ALPHA2(0,0)<16;16,1> 2:w // alpha2 = (alpha >> 2) + 2 + +// CALL(FILTER_Y_MBAFF, 1) + PRED_CALL(-f0.0, FILTER_Y_MBAFF, 1) + +//BYPASS_V0_Y: +//------------------------------------------------------------------ + + +/* +//---------- Deblock Y external left edge (V0) ---------- + + and.z.f0.0 (1) null:w r[ECM_AddrReg, BitFlags]:ub FilterLeftMbEdgeFlag:w // Check for FilterLeftMbEdgeFlag + (f0.0) jmpi ILDB_LABEL(BYPASS_EXT_LEFT_EDGE_Y) + + // Get vertical border edge control data + +// mov (1) f0.0 0:w + and (1) CTemp1_W:uw r[ECM_AddrReg, BitFlags]:ub FieldModeLeftMbFlag+FieldModeCurrentMbFlag:uw + cmp.z.f0.0 (1) null:w CTemp1_W:uw LEFT_FIELD_CUR_FRAME:w + (-f0.0) jmpi LEFT_EDGE_Y_NEXT1 + + // For FieldModeCurrentMbFlag=1 && FieldModeLeftMbFlag=0 + mov (8) Mbaff_ALPHA(0,0)<2> r[ECM_AddrReg, bAlphaLeft0_Y]<0;1,0>:ub { NoDDClr } + mov (8) Mbaff_ALPHA(0,1)<2> r[ECM_AddrReg, bAlphaLeft1_Y]<0;1,0>:ub { NoDDChk } + mov (8) Mbaff_BETA(0,0)<2> r[ECM_AddrReg, bBetaLeft0_Y]<0;1,0>:ub { NoDDClr } + mov (8) Mbaff_BETA(0,1)<2> r[ECM_AddrReg, bBetaLeft1_Y]<0;1,0>:ub { NoDDChk } + mov (8) Mbaff_TC0(0,0)<2> r[ECM_AddrReg, bTc0_v00_0_Y]<1;2,0>:ub { NoDDClr } + mov (8) Mbaff_TC0(0,1)<2> r[ECM_AddrReg, bTc0_v00_1_Y]<1;2,0>:ub { NoDDChk } + + jmpi LEFT_EDGE_Y_ALPHA_BETA_TC0_SELECTED + +LEFT_EDGE_Y_NEXT1: + cmp.z.f0.0 (1) null:w CTemp1_W:uw LEFT_FRAME_CUR_FIELD:w + (-f0.0) jmpi LEFT_EDGE_Y_NEXT2 + + + // For FieldModeCurrentMbFlag=0 && FieldModeLeftMbFlag=1 + mov (8) Mbaff_ALPHA(0,0)<1> r[ECM_AddrReg, bAlphaLeft0_Y]<0;1,0>:ub { NoDDClr } + mov (8) Mbaff_ALPHA(0,8)<1> r[ECM_AddrReg, bAlphaLeft1_Y]<0;1,0>:ub { NoDDChk } + mov (8) Mbaff_BETA(0,0)<1> r[ECM_AddrReg, bBetaLeft0_Y]<0;1,0>:ub { NoDDClr } + mov (8) Mbaff_BETA(0,8)<1> r[ECM_AddrReg, bBetaLeft1_Y]<0;1,0>:ub { NoDDChk } + mov (8) Mbaff_TC0(0,0)<1> r[ECM_AddrReg, bTc0_v00_0_Y]<1;2,0>:ub { NoDDClr } + mov (8) Mbaff_TC0(0,8)<1> r[ECM_AddrReg, bTc0_v00_1_Y]<1;2,0>:ub { NoDDChk } + + jmpi LEFT_EDGE_Y_ALPHA_BETA_TC0_SELECTED + +LEFT_EDGE_Y_NEXT2: + // both are frame or field + mov (16) Mbaff_ALPHA(0,0)<1> r[ECM_AddrReg, bAlphaLeft0_Y]<0;1,0>:ub + mov (16) Mbaff_BETA(0,0)<1> r[ECM_AddrReg, bBetaLeft0_Y]<0;1,0>:ub + mov (16) Mbaff_TC0(0,0)<1> r[ECM_AddrReg, bTc0_v00_0_Y]<1;4,0>:ub + +LEFT_EDGE_Y_ALPHA_BETA_TC0_SELECTED: + + mov (2) MaskA<1>:uw r[ECM_AddrReg, wEdgeCntlMapA_ExtLeftVert0]<2;2,1>:uw + + // p3 = Prev MB Y row 0 = r[P_AddrReg, 0]<16;16,1> + // p2 = Prev MB Y row 1 = r[P_AddrReg, 16]<16;16,1> + // p1 = Prev MB Y row 2 = r[P_AddrReg, 32]<16;16,1> + // p0 = Prev MB Y row 3 = r[P_AddrReg, 48]<16;16,1> + // q0 = Cur MB Y row 0 = r[Q_AddrReg, 0]<16;16,1> + // q1 = Cur MB Y row 1 = r[Q_AddrReg, 16]<16;16,1> + // q2 = Cur MB Y row 2 = r[Q_AddrReg, 32]<16;16,1> + // q3 = Cur MB Y row 3 = r[Q_AddrReg, 48]<16;16,1> + mov (1) P_AddrReg:w PREV_MB_Y_BASE:w { NoDDClr } + mov (1) Q_AddrReg:w SRC_MB_Y_BASE:w { NoDDChk } + + // Get (alpha >> 2) + 2 + shr (16) Mbaff_ALPHA2(0,0)<1> r[ECM_AddrReg, bAlphaLeft0_Y]<0;1,0>:ub 2:w // alpha >> 2 + add (16) Mbaff_ALPHA2(0,0)<1> Mbaff_ALPHA2(0,0)<16;16,1> 2:w // alpha2 = (alpha >> 2) + 2 + + CALL(FILTER_Y_MBAFF, 1) + +ILDB_LABEL(BYPASS_EXT_LEFT_EDGE_Y): +//------------------------------------------------------------------ +*/ + + // Same alpha, alpha2, beta and MaskB for all internal edges + + // Get (alpha >> 2) + 2 + shr (16) Mbaff_ALPHA2(0,0)<1> r[ECM_AddrReg, bAlphaInternal_Y]<0;1,0>:ub 2:w // alpha >> 2 + + // alpha = bAlphaInternal_Y + // beta = bBetaInternal_Y + mov (16) Mbaff_ALPHA(0,0)<1> r[ECM_AddrReg, bAlphaInternal_Y]<0;1,0>:ub + mov (16) Mbaff_BETA(0,0)<1> r[ECM_AddrReg, bBetaInternal_Y]<0;1,0>:ub + + mov (1) MaskB:uw 0:w // Set MaskB = 0 for all 3 edges, so it always uses bS < 4 algorithm. + + add (16) Mbaff_ALPHA2(0,0)<1> Mbaff_ALPHA2(0,0)<16;16,1> 2:w // alpha2 = (alpha >> 2) + 2 + +//---------- Deblock Y internal left edge (V1) ---------- + + // Bypass deblocking if FilterInternal4x4EdgesFlag = 0 + and.z.f0.0 (1) null:w r[ECM_AddrReg, BitFlags]:ub FilterInternal4x4EdgesFlag:w // Check for FilterInternal4x4EdgesFlag +// (f0.0) jmpi BYPASS_V1_Y + + // p3 = Cur MB Y row 0 = r[P_AddrReg, 0]<16;16,1> + // p2 = Cur MB Y row 1 = r[P_AddrReg, 16]<16;16,1> + // p1 = Cur MB Y row 2 = r[P_AddrReg, 32]<16;16,1> + // p0 = Cur MB Y row 3 = r[P_AddrReg, 48]<16;16,1> + // q0 = Cur MB Y row 4 = r[Q_AddrReg, 0]<16;16,1> + // q1 = Cur MB Y row 5 = r[Q_AddrReg, 16]<16;16,1> + // q2 = Cur MB Y row 6 = r[Q_AddrReg, 32]<16;16,1> + // q3 = Cur MB Y row 7 = r[Q_AddrReg, 48]<16;16,1> + mov (1) P_AddrReg:w SRC_MB_Y_BASE:w { NoDDClr } + mov (1) Q_AddrReg:w 4*Y_ROW_WIDTH+SRC_MB_Y_BASE:w { NoDDChk } + + mov (1) MaskA:uw r[ECM_AddrReg, wEdgeCntlMap_IntLeftVert]:uw + + // tc0 has bTc0_v31_Y + bTc0_v21_Y + bTc0_v11_Y + bTc0_v01_Y + mov (16) Mbaff_TC0(0,0)<1> r[ECM_AddrReg, bTc0_v01_Y]<1;4,0>:ub + +// CALL(FILTER_Y_MBAFF, 1) + PRED_CALL(-f0.0, FILTER_Y_MBAFF, 1) + +BYPASS_V1_Y: +//------------------------------------------------------------------ + + +//---------- Deblock Y internal mid vert edge (V2) ---------- + + // Bypass deblocking if FilterInternal8x8EdgesFlag = 0 + and.z.f0.0 (1) null:w r[ECM_AddrReg, BitFlags]:ub FilterInternal8x8EdgesFlag:w // Check for FilterInternal4x4EdgesFlag +// (f0.0) jmpi BYPASS_V2_Y + + // p3 = Cur MB Y row 4 = r[P_AddrReg, 0]<16;16,1> + // p2 = Cur MB Y row 5 = r[P_AddrReg, 16]<16;16,1> + // p1 = Cur MB Y row 6 = r[P_AddrReg, 32]<16;16,1> + // p0 = Cur MB Y row 7 = r[P_AddrReg, 48]<16;16,1> + // q0 = Cur MB Y row 8 = r[Q_AddrReg, 0]<16;16,1> + // q1 = Cur MB Y row 9 = r[Q_AddrReg, 16]<16;16,1> + // q2 = Cur MB Y row 10 = r[Q_AddrReg, 32]<16;16,1> + // q3 = Cur MB Y row 11 = r[Q_AddrReg, 48]<16;16,1> + mov (1) P_AddrReg:w 4*Y_ROW_WIDTH+SRC_MB_Y_BASE:w { NoDDClr } + mov (1) Q_AddrReg:w 8*Y_ROW_WIDTH+SRC_MB_Y_BASE:w { NoDDChk } + + mov (1) MaskA:uw r[ECM_AddrReg, wEdgeCntlMap_IntMidVert]:uw + + // tc0 has bTc0_v32_Y + bTc0_v22_Y + bTc0_v12_Y + bTc0_v02_Y + mov (16) Mbaff_TC0(0,0)<1> r[ECM_AddrReg, bTc0_v02_Y]<1;4,0>:ub + +// CALL(FILTER_Y_MBAFF, 1) + PRED_CALL(-f0.0, FILTER_Y_MBAFF, 1) + +BYPASS_V2_Y: +//----------------------------------------------- + + +//---------- Deblock Y interal right edge (V3) ---------- + + // Bypass deblocking if FilterInternal4x4EdgesFlag = 0 + and.z.f0.0 (1) null:w r[ECM_AddrReg, BitFlags]:ub FilterInternal4x4EdgesFlag:w // Check for FilterInternal4x4EdgesFlag +// (f0.0) jmpi BYPASS_V3_Y + + // p3 = Cur MB Y row 8 = r[P_AddrReg, 0]<16;16,1> + // p2 = Cur MB Y row 9 = r[P_AddrReg, 16]<16;16,1> + // p1 = Cur MB Y row 10 = r[P_AddrReg, 32]<16;16,1> + // p0 = Cur MB Y row 11 = r[P_AddrReg, 48]<16;16,1> + // q0 = Cur MB Y row 12 = r[Q_AddrReg, 0]<16;16,1> + // q1 = Cur MB Y row 13 = r[Q_AddrReg, 16]<16;16,1> + // q2 = Cur MB Y row 14 = r[Q_AddrReg, 32]<16;16,1> + // q3 = Cur MB Y row 15 = r[Q_AddrReg, 48]<16;16,1> + mov (1) P_AddrReg:w 8*Y_ROW_WIDTH+SRC_MB_Y_BASE:w { NoDDClr } + mov (1) Q_AddrReg:w 12*Y_ROW_WIDTH+SRC_MB_Y_BASE:w { NoDDChk } + + mov (1) MaskA:uw r[ECM_AddrReg, wEdgeCntlMap_IntRightVert]:uw + + // tc0 has bTc0_v33_Y + bTc0_v23_Y + bTc0_v13_Y + bTc0_v03_Y + mov (16) Mbaff_TC0(0,0)<1> r[ECM_AddrReg, bTc0_v03_Y]<1;4,0>:ub + +// CALL(FILTER_Y_MBAFF, 1) + PRED_CALL(-f0.0, FILTER_Y_MBAFF, 1) + +BYPASS_V3_Y: +//----------------------------------------------- diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Filter_UV_h.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Filter_UV_h.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Filter_UV_h.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Filter_UV_h.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,145 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +////////// AVC ILDB filter horizontal UV /////////////////////////////////////////////////////// +// +// This filter code prepares the src data and control data for ILDB filtering on all horizontal edges of UV. +// +// It sssumes the data for horizontal de-blocking is already transposed. +// +// Chroma: +// +// +-------+-------+ H0 Edge +// | | | +// | | | +// | | | +// +-------+-------+ H1 Edge +// | | | +// | | | +// | | | +// +-------+-------+ +// +///////////////////////////////////////////////////////////////////////////// + +#if defined(_DEBUG) + mov (1) EntrySignatureC:w 0xBBBC:w +#endif + +//=============== Chroma deblocking ================ + +//---------- Deblock U external top edge ---------- + and.z.f0.0 (1) null:w r[ECM_AddrReg, BitFlags]:ub FilterTopMbEdgeFlag:w // Check for FilterTopMbEdgeFlag +// (f0.0) jmpi BYPASS_EXT_TOP_EDGE_UV + + // Get horizontal border edge control data. + + //***** Need to take every other bit to form U maskA and mask B + // Get Luma maskA and maskB + shr (16) TempRow0(0)<1> r[ECM_AddrReg, wEdgeCntlMapA_ExtTopHorz0]<0;1,0>:uw RRampW(0) + shr (16) TempRow1(0)<1> r[ECM_AddrReg, wEdgeCntlMapB_ExtTopHorz0]<0;1,0>:uw RRampW(0) + + (f0.0) jmpi ILDB_LABEL(BYPASS_EXT_TOP_EDGE_UV) + + // Extract UV MaskA and MaskB from every other bit of Y masks + and.nz.f0.0 (8) null:w TempRow0(0)<16;8,2> 1:w + and.nz.f0.1 (8) null:w TempRow1(0)<16;8,2> 1:w + +//---------- Deblock U external edge ---------- + // p1 = Prev MB U row 0 + // p0 = Prev MB U row 1 + // q0 = Cur MB U row 0 + // q1 = Cur MB U row 1 +// mov (1) P_AddrReg:w PREV_MB_U_BASE:w { NoDDClr } + mov (1) P_AddrReg:w TOP_MB_U_BASE:w { NoDDClr } + mov (1) Q_AddrReg:w SRC_MB_U_BASE:w { NoDDChk } + + // alpha = bAlphaTop0_Cb, beta = bBetaTop0_Cb + mov (2) alpha<1>:w r[ECM_AddrReg, bAlphaTop0_Cb]<2;2,1>:ub { NoDDClr } + // tc0 has bTc0_h03_0_Cb + bTc0_h02_0_Cb + bTc0_h01_0_Cb + bTc0_h00_0_Cb + mov (4) tc0<1>:ub r[ECM_AddrReg, bTc0_h00_0_Cb]<4;4,1>:ub { NoDDChk } + + // UV MaskA and MaskB + mov (2) MaskA<1>:uw f0.0<2;2,1>:uw + + CALL(FILTER_UV, 1) + +//---------- Deblock V external top edge ---------- + // p1 = Prev MB V row 0 + // p0 = Prev MB V row 1 + // q0 = Cur MB V row 0 + // q1 = Cur MB V row 1 +// mov (1) P_AddrReg:w PREV_MB_V_BASE:w { NoDDClr } + mov (1) P_AddrReg:w TOP_MB_V_BASE:w { NoDDClr } + mov (1) Q_AddrReg:w SRC_MB_V_BASE:w { NoDDChk } + + // alpha = bAlphaTop0_Cr, beta = bBetaTop0_Cr + mov (2) alpha<1>:w r[ECM_AddrReg, bAlphaTop0_Cr]<2;2,1>:ub { NoDDClr } + + // tc0 has bTc0_h03_0_Cr + bTc0_h02_0_Cr + bTc0_h01_0_Cr + bTc0_h00_0_Cr + mov (4) tc0<1>:ub r[ECM_AddrReg, bTc0_h00_0_Cr]<4;4,1>:ub { NoDDChk } + + // UV MaskA and MaskB + mov (2) f0.0<1>:uw MaskA<2;2,1>:uw + + CALL(FILTER_UV, 1) + +ILDB_LABEL(BYPASS_EXT_TOP_EDGE_UV): + + // Set EdgeCntlMap2 = 0, so it always uses bS < 4 algorithm. + + // Bypass deblocking if FilterInternal4x4EdgesFlag = 0 +// and.z.f0.0 (1) null:w r[ECM_AddrReg, BitFlags]:ub FilterInternal4x4EdgesFlag:w // Check for FilterInternal4x4EdgesFlag +// (f0.0) jmpi BYPASS_4x4_DEBLOCK_H + +//---------- Deblock U internal horz middle edge ---------- + + //***** Need to take every other bit to form U maskA + // Get Luma maskA and maskB + shr (16) TempRow0(0)<1> r[ECM_AddrReg, wEdgeCntlMap_IntMidHorz]<0;1,0>:uw RRampW(0) + + // p1 = Cur MB U row 2 + // p0 = Cur MB U row 3 + // q0 = Cur MB U row 4 + // q1 = Cur MB U row 5 + mov (1) P_AddrReg:w 4*UV_ROW_WIDTH+SRC_MB_U_BASE:w { NoDDClr } // Skip 2 U rows and 2 V rows + mov (1) Q_AddrReg:w 8*UV_ROW_WIDTH+SRC_MB_U_BASE:w { NoDDChk } + + // alpha = bAlphaInternal_Cb, beta = bBetaInternal_Cb + mov (2) alpha<1>:w r[ECM_AddrReg, bAlphaInternal_Cb]<2;2,1>:ub { NoDDClr } + // tc0 has bTc0_h23_Cb + bTc0_h22_Cb + bTc0_h21_Cb + bTc0_h20_Cb + mov (4) tc0<1>:ub r[ECM_AddrReg, bTc0_h20_Cb]<4;4,1>:ub { NoDDChk } + + // Extract UV MaskA and MaskB from every other bit of Y masks + and.nz.f0.0 (8) null:w TempRow0(0)<16;8,2> 1:w + + // UV MaskA and MaskB + mov (1) f0.1:uw 0:w + mov (1) MaskB:uw 0:w { NoDDClr } + mov (1) MaskA:uw f0.0:uw { NoDDChk } + + CALL(FILTER_UV, 1) + +//---------- Deblock V internal horz middle edge ---------- + // p1 = Cur MB V row 2 + // p0 = Cur MB V row 3 + // q0 = Cur MB V row 4 + // q1 = Cur MB V row 5 + mov (1) P_AddrReg:w 4*UV_ROW_WIDTH+SRC_MB_V_BASE:w { NoDDClr } // Skip 2 U rows and 2 V rows + mov (1) Q_AddrReg:w 8*UV_ROW_WIDTH+SRC_MB_V_BASE:w { NoDDChk } + + // alpha = bAlphaInternal_Cr, beta = bBetaInternal_Cr + mov (2) alpha<1>:w r[ECM_AddrReg, bAlphaInternal_Cr]<2;2,1>:ub { NoDDClr } + // tc0 has bTc0_h23_Cr + bTc0_h22_Cr + bTc0_h21_Cr + bTc0_h20_Cr + mov (4) tc0<1>:ub r[ECM_AddrReg, bTc0_h20_Cr]<4;4,1>:ub { NoDDChk } + + // UV MaskA and MaskB + mov (2) f0.0<1>:uw MaskA<2;2,1>:uw + + CALL(FILTER_UV, 1) + +//BYPASS_4x4_DEBLOCK_H: diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Filter_UV_v.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Filter_UV_v.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Filter_UV_v.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Filter_UV_v.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,145 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +////////// AVC LDB filter vertical UV /////////////////////////////////////////////////////// +// +// This filter code prepares the src data and control data for ILDB filtering on all vertical edges of UV. +// +// It sssumes the data for vertical de-blocking is already transposed. +// +// Chroma: +// +// +-------+-------+ +// | | | +// | | | +// | | | +// +-------+-------+ +// | | | +// | | | +// | | | +// +-------+-------+ +// +// V0 V1 +// Edge Edge +// +///////////////////////////////////////////////////////////////////////////// + +#if defined(_DEBUG) + mov (1) EntrySignatureC:w 0xBBBC:w +#endif + +//=============== Chroma deblocking ================ + + and.z.f0.0 (1) null:w r[ECM_AddrReg, BitFlags]:ub FilterLeftMbEdgeFlag:w // Check for FilterLeftMbEdgeFlag +// (f0.0) jmpi BYPASS_EXT_LEFT_EDGE_UV + + // Get vertical border edge control data. + + // Get Luma maskA and maskB + shr (16) TempRow0(0)<1> r[ECM_AddrReg, wEdgeCntlMapA_ExtLeftVert0]<0;1,0>:uw RRampW(0) + shr (16) TempRow1(0)<1> r[ECM_AddrReg, wEdgeCntlMapB_ExtLeftVert0]<0;1,0>:uw RRampW(0) + + (f0.0) jmpi ILDB_LABEL(BYPASS_EXT_LEFT_EDGE_UV) + + // Extract UV MaskA and MaskB from every other bit of Y masks + and.nz.f0.0 (8) null:w TempRow0(0)<16;8,2> 1:w + and.nz.f0.1 (8) null:w TempRow1(0)<16;8,2> 1:w + +//---------- Deblock U external edge ---------- + // p1 = Prev MB U row 0 + // p0 = Prev MB U row 1 + // q0 = Cur MB U row 0 + // q1 = Cur MB U row 1 + mov (1) P_AddrReg:w PREV_MB_U_BASE:w { NoDDClr } + mov (1) Q_AddrReg:w SRC_MB_U_BASE:w { NoDDChk } + + // alpha = bAlphaLeft0_Cb, beta = bBetaLeft0_Cb + mov (2) alpha<1>:w r[ECM_AddrReg, bAlphaLeft0_Cb]<2;2,1>:ub { NoDDClr } + // tc0 has bTc0_v30_0_Cb + bTc0_v20_0_Cb + bTc0_v10_0_Cb + bTc0_v00_0_Cb + mov (4) tc0<1>:ub r[ECM_AddrReg, bTc0_v00_0_Cb]<4;4,1>:ub { NoDDChk } + + // UV MaskA and MaskB + mov (2) MaskA<1>:uw f0.0<2;2,1>:uw + + CALL(FILTER_UV, 1) + +//---------- Deblock V external edge ---------- + // p1 = Prev MB V row 0 + // p0 = Prev MB V row 1 + // q0 = Cur MB V row 0 + // q1 = Cur MB V row 1 + mov (1) P_AddrReg:w PREV_MB_V_BASE:w { NoDDClr } + mov (1) Q_AddrReg:w SRC_MB_V_BASE:w { NoDDChk } + + // for vert edge: alpha = bAlphaLeft0_Cr, beta = bBetaLeft0_Cr + mov (2) alpha<1>:w r[ECM_AddrReg, bAlphaLeft0_Cr]<2;2,1>:ub { NoDDClr } + + // tc0 has bTc0_v30_0_Cr + bTc0_v20_0_Cr + bTc0_v10_0_Cr + bTc0_v00_0_Cr + mov (4) tc0<1>:ub r[ECM_AddrReg, bTc0_v00_0_Cr]<4;4,1>:ub { NoDDChk } + + // UV MaskA and MaskB + mov (2) f0.0<1>:uw MaskA<2;2,1>:uw + + CALL(FILTER_UV, 1) + + +ILDB_LABEL(BYPASS_EXT_LEFT_EDGE_UV): + // Set EdgeCntlMap2 = 0, so it always uses bS < 4 algorithm. + // Same alpha and beta for all internal vert and horiz edges + + + //***** Need to take every other bit to form U or V maskA + // Get Luma maskA and maskB + shr (16) TempRow0(0)<1> r[ECM_AddrReg, wEdgeCntlMap_IntMidVert]<0;1,0>:uw RRampW(0) + +//---------- Deblock U internal edge ---------- + // p1 = Cur MB U row 2 + // p0 = Cur MB U row 3 + // q0 = Cur MB U row 4 + // q1 = Cur MB U row 5 + mov (1) P_AddrReg:w 4*UV_ROW_WIDTH+SRC_MB_U_BASE:w { NoDDClr } + mov (1) Q_AddrReg:w 8*UV_ROW_WIDTH+SRC_MB_U_BASE:w { NoDDChk } + + // alpha = bAlphaInternal_Cb, beta = bBetaInternal_Cb + mov (2) alpha<1>:w r[ECM_AddrReg, bAlphaInternal_Cb]<2;2,1>:ub { NoDDClr } + + // tc0 has bTc0_v32_Cb + bTc0_v22_Cb + bTc0_v12_Cb + bTc0_v02_Cb + mov (4) tc0<1>:ub r[ECM_AddrReg, bTc0_v02_Cb]<4;4,1>:ub { NoDDChk } + + // Extract UV MaskA and MaskB from every other bit of Y masks + and.nz.f0.0 (8) null:w TempRow0(0)<16;8,2> 1:w + + // UV MaskA and MaskB + mov (1) f0.1:uw 0:w + mov (1) MaskB:uw 0:w { NoDDClr } + mov (1) MaskA:uw f0.0:uw { NoDDChk } + + CALL(FILTER_UV, 1) + + +//---------- Deblock V internal edge ---------- + // P1 = Cur MB V row 2 + // P0 = Cur MB V row 3 + // Q0 = Cur MB V row 4 + // Q1 = Cur MB V row 5 + mov (1) P_AddrReg:w 4*UV_ROW_WIDTH+SRC_MB_V_BASE:w { NoDDClr } + mov (1) Q_AddrReg:w 8*UV_ROW_WIDTH+SRC_MB_V_BASE:w { NoDDChk } + + // alpha = bAlphaInternal_Cr, beta = bBetaInternal_Cr + mov (2) alpha<1>:w r[ECM_AddrReg, bAlphaInternal_Cr]<2;2,1>:ub { NoDDClr } + + // tc0 has bTc0_v32_Cr + bTc0_v22_Cr + bTc0_v12_Cr + bTc0_v02_Cr + mov (4) tc0<1>:ub r[ECM_AddrReg, bTc0_v02_Cr]<4;4,1>:ub { NoDDChk } + + // UV MaskA and MaskB + mov (2) f0.0<1>:uw MaskA<2;2,1>:uw + + CALL(FILTER_UV, 1) + + +//BYPASS_4x4_DEBLOCK_V: diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Filter_Y_h.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Filter_Y_h.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Filter_Y_h.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Filter_Y_h.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,199 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +////////// AVC ILDB filter horizontal Y /////////////////////////////////////////////////////// +// +// This filter code prepares the src data and control data for ILDB filtering on all horizontal edges of Y. +// +// It sssumes the data for horizontal de-blocking is already transposed. +// +// Luma: +// +// +-------+-------+-------+-------+ H0 Edge +// | | | | | +// | | | | | +// | | | | | +// +-------+-------+-------+-------+ H1 Edge +// | | | | | +// | | | | | +// | | | | | +// +-------+-------+-------+-------+ H2 Edge +// | | | | | +// | | | | | +// | | | | | +// +-------+-------+-------+-------+ H3 Edge +// | | | | | +// | | | | | +// | | | | | +// +-------+-------+-------+-------+ +// +///////////////////////////////////////////////////////////////////////////// + +#if defined(_DEBUG) + mov (1) EntrySignatureC:w 0xBBBB:w +#endif + + +//========== Luma deblocking ========== + + +//---------- Deblock Y external top edge (H0) ---------- + + // Bypass deblocking if it is the top edge of the picture. + and.z.f0.0 (1) null:w r[ECM_AddrReg, BitFlags]:ub FilterTopMbEdgeFlag:w // Check for FilterTopMbEdgeFlag + +// and.z.f0.1 (1) null:uw r[ECM_AddrReg, wEdgeCntlMapA_ExtTopHorz0]:uw 0xFFFF:uw // MaskA = 0? + + // Get (alpha >> 2) + 2 + shr (1) alpha2:w r[ECM_AddrReg, bAlphaTop0_Y]:ub 2:w // alpha >> 2 + + // p3 = Prev MB Y row 0 = r[P_AddrReg, 0]<16;16,1> + // p2 = Prev MB Y row 1 = r[P_AddrReg, 16]<16;16,1> + // p1 = Prev MB Y row 2 = r[P_AddrReg, 32]<16;16,1> + // p0 = Prev MB Y row 3 = r[P_AddrReg, 48]<16;16,1> + // q0 = Cur MB Y row 0 = r[Q_AddrReg, 0]<16;16,1> + // q1 = Cur MB Y row 1 = r[Q_AddrReg, 16]<16;16,1> + // q2 = Cur MB Y row 2 = r[Q_AddrReg, 32]<16;16,1> + // q3 = Cur MB Y row 3 = r[Q_AddrReg, 48]<16;16,1> +// mov (1) P_AddrReg:w PREV_MB_Y_BASE:w { NoDDClr } + mov (1) P_AddrReg:w TOP_MB_Y_BASE:w { NoDDClr } + mov (1) Q_AddrReg:w SRC_MB_Y_BASE:w { NoDDChk } + + // Get horizontal border edge control data + // alpha = bAlphaTop0_Y + // beta = bBetaTop0_Y + mov (2) alpha<1>:w r[ECM_AddrReg, bAlphaTop0_Y]<2;2,1>:ub { NoDDClr } // 2 channels for alpha and beta + + mov (2) MaskA<1>:uw r[ECM_AddrReg, wEdgeCntlMapA_ExtTopHorz0]<2;2,1>:uw { NoDDClr, NoDDChk } + + // tc0 has bTc0_h03_0_Y | bTc0_h02_0_Y | bTc0_h01_0_Y | bTc0_h00_0_Y + mov (4) tc0<1>:ub r[ECM_AddrReg, bTc0_h00_0_Y]<4;4,1>:ub { NoDDChk } + +// (f0.0) jmpi BYPASS_EXT_TOP_EDGE_Y +// (f0.0.anyv) jmpi BYPASS_EXT_TOP_EDGE_Y + + add (1) alpha2:w alpha2:w 2:w // alpha2 = (alpha >> 2) + 2 + +// CALL(FILTER_Y, 1) + PRED_CALL(-f0.0, FILTER_Y, 1) + +//BYPASS_EXT_TOP_EDGE_Y: +//------------------------------------------------------------------ + // Same alpha, alpha2, beta and MaskB for all internal edges + + // Get (alpha >> 2) + 2 + shr (1) alpha2:w r[ECM_AddrReg, bAlphaInternal_Y]:ub 2:w // alpha >> 2 + + // alpha = bAlphaInternal_Y + // beta = bBetaInternal_Y + mov (2) alpha<1>:w r[ECM_AddrReg, bAlphaInternal_Y]<2;2,1>:ub { NoDDClr } + + // Set MaskB = 0 for all 3 int edges, so it always uses bS < 4 algorithm. + mov (1) MaskB:uw 0:w { NoDDChk } + + add (1) alpha2:w alpha2:w 2:w // alpha2 = (alpha >> 2) + 2 + + +//---------- Deblock Y internal top edge (H1) ---------- + + // Bypass deblocking if FilterInternal4x4EdgesFlag = 0 + and.z.f0.0 (1) null:w r[ECM_AddrReg, BitFlags]:ub FilterInternal4x4EdgesFlag:w // Check for FilterInternal4x4EdgesFlag + + // p3 = Cur MB Y row 0 = r[P_AddrReg, 0]<16;16,1> + // p2 = Cur MB Y row 1 = r[P_AddrReg, 16]<16;16,1> + // p1 = Cur MB Y row 2 = r[P_AddrReg, 32]<16;16,1> + // p0 = Cur MB Y row 3 = r[P_AddrReg, 48]<16;16,1> + // q0 = Cur MB Y row 4 = r[Q_AddrReg, 0]<16;16,1> + // q1 = Cur MB Y row 5 = r[Q_AddrReg, 16]<16;16,1> + // q2 = Cur MB Y row 6 = r[Q_AddrReg, 32]<16;16,1> + // q3 = Cur MB Y row 7 = r[Q_AddrReg, 48]<16;16,1> + mov (1) P_AddrReg:w SRC_MB_Y_BASE:w { NoDDClr } + mov (1) Q_AddrReg:w 4*Y_ROW_WIDTH+SRC_MB_Y_BASE:w { NoDDChk } + + mov (1) MaskA:uw r[ECM_AddrReg, wEdgeCntlMap_IntTopHorz]:uw { NoDDClr } + + // tc0 has bTc0_h13_Y + bTc0_h12_Y + bTc0_h11_Y + bTc0_h10_Y + mov (4) tc0<1>:ub r[ECM_AddrReg, bTc0_h10_Y]<4;4,1>:ub { NoDDChk } + +// (f0.0) jmpi BYPASS_4x4_DEBLOCK_H +// (f0.0.anyv) jmpi BYPASS_4x4_DEBLOCK_H + +// CALL(FILTER_Y, 1) + PRED_CALL(-f0.0, FILTER_Y, 1) + +//BYPASS_4x4_DEBLOCK_H: +//------------------------------------------------------------------ + + +//---------- Deblock Y internal mid horizontal edge (H2) ---------- + + // Bypass deblocking if FilterInternal8x8EdgesFlag = 0 + and.z.f0.0 (1) null:w r[ECM_AddrReg, BitFlags]:ub FilterInternal8x8EdgesFlag:w // Check for FilterInternal4x4EdgesFlag + +// and.z.f0.1 (1) null:uw r[ECM_AddrReg, wEdgeCntlMap_IntMidHorz]:uw 0xFFFF:uw // MaskA = 0? + + // p3 = Cur MB Y row 4 = r[P_AddrReg, 0]<16;16,1> + // p2 = Cur MB Y row 5 = r[P_AddrReg, 16]<16;16,1> + // p1 = Cur MB Y row 6 = r[P_AddrReg, 32]<16;16,1> + // p0 = Cur MB Y row 7 = r[P_AddrReg, 48]<16;16,1> + // q0 = Cur MB Y row 8 = r[Q_AddrReg, 0]<16;16,1> + // q1 = Cur MB Y row 9 = r[Q_AddrReg, 16]<16;16,1> + // q2 = Cur MB Y row 10 = r[Q_AddrReg, 32]<16;16,1> + // q3 = Cur MB Y row 11 = r[Q_AddrReg, 48]<16;16,1> + mov (1) P_AddrReg:w 4*Y_ROW_WIDTH+SRC_MB_Y_BASE:w { NoDDClr } + mov (1) Q_AddrReg:w 8*Y_ROW_WIDTH+SRC_MB_Y_BASE:w { NoDDChk } + + mov (1) MaskA:uw r[ECM_AddrReg, wEdgeCntlMap_IntMidHorz]:uw { NoDDClr } +// mov (1) MaskB:uw 0:w // Set MaskB = 0, so it always uses bS < 4 algorithm. + + // tc0 has bTc0_h23_Y + bTc0_h22_Y + bTc0_h21_Y + bTc0_h20_Y + mov (4) tc0<1>:ub r[ECM_AddrReg, bTc0_h20_Y]<4;4,1>:ub { NoDDChk } + +// (f0.0) jmpi BYPASS_8x8_DEBLOCK_H +// (f0.0.anyv) jmpi BYPASS_8x8_DEBLOCK_H + +// CALL(FILTER_Y, 1) + PRED_CALL(-f0.0, FILTER_Y, 1) + +//BYPASS_8x8_DEBLOCK_H: +//----------------------------------------------- + + +//---------- Deblock Y internal bottom edge (H3) ---------- + + // Bypass deblocking if FilterInternal4x4EdgesFlag = 0 + and.z.f0.0 (1) null:w r[ECM_AddrReg, BitFlags]:ub FilterInternal4x4EdgesFlag:w // Check for FilterInternal4x4EdgesFlag + +// and.z.f0.1 (1) null:uw r[ECM_AddrReg, wEdgeCntlMap_IntBotHorz]:uw 0xFFFF:uw // MaskA = 0? + + // p3 = Cur MB Y row 8 = r[P_AddrReg, 0]<16;16,1> + // p2 = Cur MB Y row 9 = r[P_AddrReg, 16]<16;16,1> + // p1 = Cur MB Y row 10 = r[P_AddrReg, 32]<16;16,1> + // p0 = Cur MB Y row 11 = r[P_AddrReg, 48]<16;16,1> + // q0 = Cur MB Y row 12 = r[Q_AddrReg, 0]<16;16,1> + // q1 = Cur MB Y row 13 = r[Q_AddrReg, 16]<16;16,1> + // q2 = Cur MB Y row 14 = r[Q_AddrReg, 32]<16;16,1> + // q3 = Cur MB Y row 15 = r[Q_AddrReg, 48]<16;16,1> + mov (1) P_AddrReg:w 8*Y_ROW_WIDTH+SRC_MB_Y_BASE:w { NoDDClr } + mov (1) Q_AddrReg:w 12*Y_ROW_WIDTH+SRC_MB_Y_BASE:w { NoDDChk } + + + mov (1) MaskA:uw r[ECM_AddrReg, wEdgeCntlMap_IntBotHorz]:uw { NoDDClr } +// mov (1) MaskB:uw 0:w // Set MaskB = 0, so it always uses bS < 4 algorithm. + + // tc0 has bTc0_h33_Y + bTc0_h32_Y + bTc0_h31_Y + bTc0_h30_Y + mov (4) tc0<1>:ub r[ECM_AddrReg, bTc0_h30_Y]<4;4,1>:ub { NoDDChk } + +// (f0.0) jmpi BYPASS_4x4_DEBLOCK_H2 +// (f0.0.anyv) jmpi BYPASS_4x4_DEBLOCK_H2 + +// CALL(FILTER_Y, 1) + PRED_CALL(-f0.0, FILTER_Y, 1) + +//BYPASS_4x4_DEBLOCK_H2: +//----------------------------------------------- diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Filter_Y_v.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Filter_Y_v.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Filter_Y_v.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Filter_Y_v.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,203 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +////////// AVC ILDB filter vertical Y /////////////////////////////////////////////////////// +// +// This filter code prepares the src data and control data for ILDB filtering on all vertical edges of Y. +// +// It sssumes the data for vertical de-blocking is already transposed. +// +// Luma: +// +// +-------+-------+-------+-------+ +// | | | | | +// | | | | | +// | | | | | +// +-------+-------+-------+-------+ +// | | | | | +// | | | | | +// | | | | | +// +-------+-------+-------+-------+ +// | | | | | +// | | | | | +// | | | | | +// +-------+-------+-------+-------+ +// | | | | | +// | | | | | +// | | | | | +// +-------+-------+-------+-------+ +// +// V0 V1 V2 V3 +// Edge Edge Edge Edge +// +///////////////////////////////////////////////////////////////////////////// + +#if defined(_DEBUG) + mov (1) EntrySignatureC:w 0xBBBB:w +#endif + + +//========== Luma deblocking ========== + + +//---------- Deblock Y external left edge (V0) ---------- + + // Bypass deblocking if it is left edge of the picture. + and.z.f0.0 (1) null:w r[ECM_AddrReg, BitFlags]:ub FilterLeftMbEdgeFlag:w // Check for FilterLeftMbEdgeFlag + +// and.z.f0.1 (1) null:uw r[ECM_AddrReg, wEdgeCntlMapA_ExtLeftVert0]:uw 0xFFFF:uw // MaskA = 0? + + // Get (alpha >> 2) + 2 + shr (1) alpha2:w r[ECM_AddrReg, bAlphaLeft0_Y]:ub 2:w // alpha >> 2 + + // p3 = Prev MB Y row 0 = r[P_AddrReg, 0]<16;16,1> + // p2 = Prev MB Y row 1 = r[P_AddrReg, 16]<16;16,1> + // p1 = Prev MB Y row 2 = r[P_AddrReg, 32]<16;16,1> + // p0 = Prev MB Y row 3 = r[P_AddrReg, 48]<16;16,1> + // q0 = Cur MB Y row 0 = r[Q_AddrReg, 0]<16;16,1> + // q1 = Cur MB Y row 1 = r[Q_AddrReg, 16]<16;16,1> + // q2 = Cur MB Y row 2 = r[Q_AddrReg, 32]<16;16,1> + // q3 = Cur MB Y row 3 = r[Q_AddrReg, 48]<16;16,1> + mov (1) P_AddrReg:w PREV_MB_Y_BASE:w { NoDDClr } + mov (1) Q_AddrReg:w SRC_MB_Y_BASE:w { NoDDChk } + + // Get vertical border edge control data + // alpha = bAlphaLeft0_Y + // beta = bBetaLeft0_Y + mov (2) alpha<1>:w r[ECM_AddrReg, bAlphaLeft0_Y]<2;2,1>:ub { NoDDClr } // 2 channels for alpha and beta + + mov (2) MaskA<1>:uw r[ECM_AddrReg, wEdgeCntlMapA_ExtLeftVert0]<2;2,1>:uw { NoDDClr, NoDDChk } + + // tc0 has bTc0_v30_0_Y | bTc0_v20_0_Y | bTc0_v10_0_Y | bTc0_v00_0_Y + mov (4) tc0<1>:ub r[ECM_AddrReg, bTc0_v00_0_Y]<4;4,1>:ub { NoDDChk } + +// (f0.0) jmpi BYPASS_EXT_LEFT_EDGE_Y +// (f0.0.anyv) jmpi BYPASS_EXT_LEFT_EDGE_Y + + add (1) alpha2:w alpha2:w 2:w // alpha2 = (alpha >> 2) + 2 + +// CALL(FILTER_Y, 1) + PRED_CALL(-f0.0, FILTER_Y, 1) + + +//BYPASS_EXT_LEFT_EDGE_Y: +//------------------------------------------------------------------ + // Same alpha, alpha2, beta and MaskB for all internal edges + + // Get (alpha >> 2) + 2 + shr (1) alpha2:w r[ECM_AddrReg, bAlphaInternal_Y]:ub 2:w // alpha >> 2 + + // alpha = bAlphaInternal_Y + // beta = bBetaInternal_Y + mov (2) alpha<1>:w r[ECM_AddrReg, bAlphaInternal_Y]<2;2,1>:ub { NoDDClr } + + // Set MaskB = 0 for all 3 int edges, so it always uses bS < 4 algorithm. + mov (1) MaskB:uw 0:w { NoDDChk } + + add (1) alpha2:w alpha2:w 2:w // alpha2 = (alpha >> 2) + 2 + + +//---------- Deblock Y internal left edge (V1) ---------- + + // Bypass deblocking if FilterInternal4x4EdgesFlag = 0 + and.z.f0.0 (1) null:w r[ECM_AddrReg, BitFlags]:ub FilterInternal4x4EdgesFlag:w // Check for FilterInternal4x4EdgesFlag + +// and.z.f0.1 (1) null:uw r[ECM_AddrReg, wEdgeCntlMap_IntLeftVert]:uw 0xFFFF:uw // MaskA = 0? + + // p3 = Cur MB Y row 0 = r[P_AddrReg, 0]<16;16,1> + // p2 = Cur MB Y row 1 = r[P_AddrReg, 16]<16;16,1> + // p1 = Cur MB Y row 2 = r[P_AddrReg, 32]<16;16,1> + // p0 = Cur MB Y row 3 = r[P_AddrReg, 48]<16;16,1> + // q0 = Cur MB Y row 4 = r[Q_AddrReg, 0]<16;16,1> + // q1 = Cur MB Y row 5 = r[Q_AddrReg, 16]<16;16,1> + // q2 = Cur MB Y row 6 = r[Q_AddrReg, 32]<16;16,1> + // q3 = Cur MB Y row 7 = r[Q_AddrReg, 48]<16;16,1> + mov (1) P_AddrReg:w SRC_MB_Y_BASE:w { NoDDClr } + mov (1) Q_AddrReg:w 4*Y_ROW_WIDTH+SRC_MB_Y_BASE:w { NoDDChk } + + mov (1) MaskA:uw r[ECM_AddrReg, wEdgeCntlMap_IntLeftVert]:uw { NoDDClr } + + // tc0 has bTc0_v31_Y + bTc0_v21_Y + bTc0_v11_Y + bTc0_v01_Y + mov (4) tc0<1>:ub r[ECM_AddrReg, bTc0_v01_Y]<4;4,1>:ub { NoDDChk } + +// (f0.0) jmpi BYPASS_4x4_DEBLOCK_V +// (f0.0.anyv) jmpi BYPASS_4x4_DEBLOCK_V + +// CALL(FILTER_Y, 1) + PRED_CALL(-f0.0, FILTER_Y, 1) + +//BYPASS_4x4_DEBLOCK_V: +//------------------------------------------------------------------ + + +//---------- Deblock Y internal mid vert edge (V2) ---------- + + // Bypass deblocking if FilterInternal8x8EdgesFlag = 0 + and.z.f0.0 (1) null:w r[ECM_AddrReg, BitFlags]:ub FilterInternal8x8EdgesFlag:w // Check for FilterInternal4x4EdgesFlag + +// and.z.f0.1 (1) null:uw r[ECM_AddrReg, wEdgeCntlMap_IntMidVert]:uw 0xFFFF:uw // MaskA = 0? + + // p3 = Cur MB Y row 4 = r[P_AddrReg, 0]<16;16,1> + // p2 = Cur MB Y row 5 = r[P_AddrReg, 16]<16;16,1> + // p1 = Cur MB Y row 6 = r[P_AddrReg, 32]<16;16,1> + // p0 = Cur MB Y row 7 = r[P_AddrReg, 48]<16;16,1> + // q0 = Cur MB Y row 8 = r[Q_AddrReg, 0]<16;16,1> + // q1 = Cur MB Y row 9 = r[Q_AddrReg, 16]<16;16,1> + // q2 = Cur MB Y row 10 = r[Q_AddrReg, 32]<16;16,1> + // q3 = Cur MB Y row 11 = r[Q_AddrReg, 48]<16;16,1> + mov (1) P_AddrReg:w 4*Y_ROW_WIDTH+SRC_MB_Y_BASE:w { NoDDClr } + mov (1) Q_AddrReg:w 8*Y_ROW_WIDTH+SRC_MB_Y_BASE:w { NoDDChk } + + mov (1) MaskA:uw r[ECM_AddrReg, wEdgeCntlMap_IntMidVert]:uw { NoDDClr } +// mov (1) MaskB:uw 0:w // Set MaskB = 0, so it always uses bS < 4 algorithm. + + // tc0 has bTc0_v32_Y + bTc0_v22_Y + bTc0_v12_Y + bTc0_v02_Y + mov (4) tc0<1>:ub r[ECM_AddrReg, bTc0_v02_Y]<4;4,1>:ub { NoDDChk } + +// (f0.0) jmpi BYPASS_8x8_DEBLOCK_V +// (f0.0.anyv) jmpi BYPASS_8x8_DEBLOCK_V + +// CALL(FILTER_Y, 1) + PRED_CALL(-f0.0, FILTER_Y, 1) + +//BYPASS_8x8_DEBLOCK_V: +//----------------------------------------------- + + +//---------- Deblock Y interal right edge (V3) ---------- + + // Bypass deblocking if FilterInternal4x4EdgesFlag = 0 + and.z.f0.0 (1) null:w r[ECM_AddrReg, BitFlags]:ub FilterInternal4x4EdgesFlag:w // Check for FilterInternal4x4EdgesFlag + +// and.z.f0.1 (1) null:uw r[ECM_AddrReg, wEdgeCntlMap_IntRightVert]:uw 0xFFFF:uw // MaskA = 0? + + // p3 = Cur MB Y row 8 = r[P_AddrReg, 0]<16;16,1> + // p2 = Cur MB Y row 9 = r[P_AddrReg, 16]<16;16,1> + // p1 = Cur MB Y row 10 = r[P_AddrReg, 32]<16;16,1> + // p0 = Cur MB Y row 11 = r[P_AddrReg, 48]<16;16,1> + // q0 = Cur MB Y row 12 = r[Q_AddrReg, 0]<16;16,1> + // q1 = Cur MB Y row 13 = r[Q_AddrReg, 16]<16;16,1> + // q2 = Cur MB Y row 14 = r[Q_AddrReg, 32]<16;16,1> + // q3 = Cur MB Y row 15 = r[Q_AddrReg, 48]<16;16,1> + mov (1) P_AddrReg:w 8*Y_ROW_WIDTH+SRC_MB_Y_BASE:w { NoDDClr } + mov (1) Q_AddrReg:w 12*Y_ROW_WIDTH+SRC_MB_Y_BASE:w { NoDDChk } + + mov (1) MaskA:uw r[ECM_AddrReg, wEdgeCntlMap_IntRightVert]:uw { NoDDClr } +// mov (1) MaskB:uw 0:w // Set MaskB = 0, so it always uses bS < 4 algorithm. + + // tc0 has bTc0_v33_Y + bTc0_v23_Y + bTc0_v13_Y + bTc0_v03_Y + mov (4) tc0<1>:ub r[ECM_AddrReg, bTc0_v03_Y]<4;4,1>:ub { NoDDChk } + +// (f0.0) jmpi BYPASS_4x4_DEBLOCK_V2 +// (f0.0.anyv) jmpi BYPASS_4x4_DEBLOCK_V2 + +// CALL(FILTER_Y, 1) + PRED_CALL(-f0.0, FILTER_Y, 1) + +//BYPASS_4x4_DEBLOCK_V2: +//----------------------------------------------- diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_ForwardMsg.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_ForwardMsg.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_ForwardMsg.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_ForwardMsg.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,57 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +//========== Forward message to root thread through gateway ========== +// Each child thread write a byte into the root GRF r50 defiend in open Gataway. + +#if defined(_DEBUG) +mov (1) EntrySignatureC:w 0x7777:w +#endif + +// Init payload to r0 +mov (8) GatewayPayload<1>:ud 0:w //{ NoDDClr } + +// Forward a message: +// Offset = x relative to r50 (defiend in open gataway), x = ORIX >> 4 [bit 28:16] +// Need to shift left 16 + +// shift 2 more bits for byte to word offset + +//shl (1) Offset_Length:ud GateWayOffsetC:w 16:w { NoDDClr, NoDDChk } +shl (1) Offset_Length:ud GateWayOffsetC:w 18:w + +// 2 bytes offset +add (1) Offset_Length:ud Offset_Length:ud 0x00020000:d { NoDDClr } + +// Length = 1 byte, [bit 10:8 = 000] +//000 xxxxxxxxxxxxx 00000 000 00000000 ==> 000x xxxx xxxx xxxx 0000 0000 0000 0000 + +//mov (1) DispatchID:ub r0.20:ub // Dispatch ID + +//Move in EUid and Thread ID that we received from the PARENT thread +mov (1) EUID_TID:uw r0.6:uw { NoDDClr, NoDDChk } + +mov (1) GatewayPayloadKey:uw 0x1212:uw { NoDDClr, NoDDChk } // Key + +//mov (4) GatewayPayload<1>:ud 0:ud { NoDDClr, NoDDChk } // Init payload low 4 dword + +// Write back one byte (value = 0xFF) to root thread GRF to indicate this child thread is finished +// All lower 4 bytes must be assigned to the same byte value. +mov (4) GatewayPayload<1>:ub 0xFFFF:uw { NoDDChk } + +// msg descriptor bit 15 set to '1' for notification +#ifdef GW_DCN +// For ILK, EOT bit should also be set to terminate the thread. This is to fix a timing related HW issue. +// +send (8) null:ud m0 GatewayPayload<8;8,1>:ud MSG_GW_EOT FWDMSGDSC+NOTIFYMSG +#else +send (8) null:ud m0 GatewayPayload<8;8,1>:ud MSG_GW FWDMSGDSC+NOTIFYMSG +#endif // GW_DCN + +//========== Forward Msg Done ======================================== + diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB.inc libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB.inc --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB.inc 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB.inc 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,718 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +#if !defined(__AVC_ILDB_HEADER__) // Make sure this file is only included once +#define __AVC_ILDB_HEADER__ + +// Module name: AVC_ILDB.inc + +#undef ORIX +#undef ORIY + +//========== Root thread input parameters ================================================== +#define RootParam r1 // :w +#define MBsCntX r1.0 // :w, MB count per row +#define MBsCntY r1.1 // :w, MB count per col +//#define PicType r1.2 // :w, Picture type +#define MaxThreads r1.3 // :w, Max Thread limit +#define EntrySignature r1.4 // :w, Debug flag +#define BitFields r1.5 // :uw +#define MbaffFlag BIT0 // :w, mbaff flag, bit 0 in BitFields +#define BotFieldFlag BIT1 // :w, bottom field flag, bit 1 in BitFields +#define CntlDataExpFlag BIT2 // :w, Control Data Expansion Flag, bit 2 in BitFields +#define RampConst r1.12 // 8 :ub, Ramp constant, r1.12 - r1.19:ub +#define StepToNextMB r1.20 // :b, 2 bytes +#define Minus2Minus1 r1.22 // :b, 2 bytes +// next one starts at r1.11:w + +#define TopFieldFlag 0xFFFD // :w, top field flag, used to set bit1 to 0. + + +//========== Root Locals ============================================================= + +// Variables in root kernel for launching child therad +#define ChildParam r2.0 // :w +//Not used #define URBOffset r2.3 // :w, Each row occupies 4 URB entries. All children in the same row use the same set of URB entries +#define CurCol r2.10 // :w, current col +#define CurColB r2.20 // :b, current col +#define CurRow r2.11 // :w, current row +#define CurRowB r2.22 // :b, current row +#define LastCol r2.12 // :w, last col +#define LastRow r2.13 // :w, last row + +// Root local constants during spawning process +#define Col_Boundary r3.0 // :w, +#define Row_Boundary r3.1 // :w, +//#define TotalBlocks r3.2 // :w, Total blocks in the frame +#define URB_EntriesPerMB_2 r3.3 // :w, = URB entries per MB, but in differnt form +#define URBOffsetUVBase r3.4 // :w, UV Base offset in URB + +#define Temp1_D r3.6 // :d: +#define Temp1_W r3.12 // :w, Temp1 +#define Temp1_B r3.24 // :b, = Temp1_W +#define Temp2_W r3.13 // :w, Temp2 +#define Temp2_B r3.26 // :b, = Temp2_W + +// Root local variables +#define JumpTable r4 // :d, jump table +#define JUMPTABLE_BASE 4*32 +#define JumpAddr a0.7 + +#define TopRowForScan r5.0 // :w, track the top row for scan. All rows above this row is deblocked already. + + +// Child Thread R0 Header Field +#define MRF0 m0 +#define CT_R0Hdr m1 + +/* +.declare GatewayAperture Base=r50.0 ElementSize=4 SrcRegion=REGION(8,1) Type=ud +#define GatewayApertureB 1600 // r50 byte offset from r0.0 + +// Chroma root thread updates luma root's ThreadLimit at r10.0:w via gateway +#define ThreadLimit r62.0 // :w, thread limit //r56.0 +#define THREAD_LIMIT_OFFSET 0x01800000 // Offset from r50 to r56 = 12*32 = 384 = 0x0180. 0x180 << 16 = 0x01800000 + //#define THREAD_LIMIT_OFFSET 0x00C00000 // Offset from r50 to r56 = 6*32 = 192 = 0x00C0. 0xC0 << 16 = 0x00C00000 +*/ + +// Gateway size is 16 GRF. 68 rows of MBs takes 9 GRFs (r6 - r14) +// For CTG: Expended to support 1280 rows of pixel (80 rows of MBs). It requires 10 GRFs (r6 - r15) +.declare GatewayAperture Base=r6.0 ElementSize=4 SrcRegion=REGION(8,1) Type=ud +#define GatewayApertureB 192 // r0.0 byte offset from r0.0 + +// Chroma root thread updates luma root's ThreadLimit at r10.0:w via gateway +#define ThreadLimit r18.0 // :w, thread limit +#define THREAD_LIMIT_OFFSET 0x01800000 // Offset from r50 to r56 = 12*32 = 384 = 0x0180. 0x180 << 16 = 0x01800000 +#define TotalBlocks r18.1 // :w, Total blocks in the frame + +// Root local variables +#define ChildThreadsID r19.0 // :w, Child thread ID, unique to each child +#define OutstandingThreads r20.0 // :w, Outstanding threads +#define ProcessedMBs r20.1 // :w, # of MBs processed + +#define URBOffset r21.0 // :w, Each row occupies 4 URB entries. All children in the same row use the same set of URB entries + +//================================================================================= + +#define ScoreBd_Size 128 //96 // size of Status[] or ProcCol[] + +#define ScoreBd_Idx 2 +//#define Saved_Col 0 + +#define StatusAddr a0.4 // :w, point to r50 +//================================================================================= + + +// Gateway payload +#define GatewayPayload r48.0 // :ud +#define GatewayPayloadKey r48.8 // :uw +#define DispatchID r48.20 // :ub +#define RegBase_GatewaySize r48.5 // :ud, used in open a gateway +#define Offset_Length r48.5 // :ud, used in forwardmsg back to root +#define EUID_TID r48.9 // :uw, used in forwardmsg back to root + +// Gateway response +#define GatewayResponse r49.0 // :ud, one GRF + +#define URBWriteMsgDesc a0.0 // Used in URB write, :ud +#define URBWriteMsgDescLow a0.0 // Used in URB write, :uw +#define URBWriteMsgDescHigh a0.1 // Used in URB write, :uw + +.declare WritebackResponse Base=r50 ElementSize=4 SrcRegion=REGION(8,1) Type=ud // 1 GRF for write backs + + +///////////////////////////////////////////////////////////////////////////////////////////// +// IDesc Order Offset +// +// 0) luma root 0 from luma root +// 1) luma child 16 from luma root +// 2) chroma root 32 from luma root +// 3) chroma child 16 from chroma root + +// 4) luma field root 0 from luma field root +// 5) luma field child 16 from luma field root +// 6) chroma field root 32 from luma field root +// 7) chroma field child 16 from chroma field root + +// 8) luma Mbaff root 0 from luma Mbaff root +// 9) luma Mbaff child 16 from luma Mbaff root +// 10) chroma Mbaff root 32 from luma Mbaff root +// 11) chroma Mbaff child 16 from chroma Mbaff root + +// IDesc offset within non-mbaff or mbaff mode +#define CHROMA_ROOT_OFFSET 32 // Offset from luma root to chroma root +#define CHILD_OFFSET 16 // Offset from luma root to luma child, + // and from chroma root to chroma child +///////////////////////////////////////////////////////////////////////////////////////////// + + +//========== End of Root Variables ====================================================== + + +//========== Child thread input parameters ============================================== +//#define MBsCntX r1.0 // :w, MB count per row (same as root) +//#define MBsCntY r1.1 // :w, MB count per col (same as root) +//#define PicTypeC r1.2 // :w, Picture type same as root thread (same as root) +#define URBOffsetC r1.3 // :w, +#define EntrySignatureC r1.4 // :w, Debug field (same as root) +//#define BitFields r1.5 // :w (same as root) +//#define MbaffFlag BIT0 // :w, mbaff flag, bit 0 in BitFields +//#define BotFieldFlag BIT1 // :w, bottom field flag, bit 1 in BitFields +//#define CntlDataExpFlag BIT2 // :w, Control Data Expansion Flag, bit 2 in BitFields +#define RampConstC r1.12 // 8 :ub, Ramp constant, r1.12 - r1.19:ub. +#define ORIX r1.10 // :w, carry over from root r1 in MB count +#define ORIY r1.11 // :w, carry over from root r1 in MB count +#define LastColC r1.12 // :w, last col +#define LastRowC r1.13 // :w, last row + +.declare GatewayApertureC Base=r1.0 ElementSize=4 SrcRegion=REGION(8,1) Type=ud +#define GatewayApertureCBase 32 // r1 byte offset from r0.0 + + +//========== Child Variables ============================================================ + +// Mbaff Alpha, Beta, Tc0 vectors for an edge +.declare Mbaff_ALPHA Base=r14.0 ElementSize=2 SrcRegion=REGION(8,1) Type=uw // r14 +.declare Mbaff_BETA Base=r15.0 ElementSize=2 SrcRegion=REGION(8,1) Type=uw // r15 +.declare Mbaff_TC0 Base=r16.0 ElementSize=2 SrcRegion=REGION(8,1) Type=uw // r16 +.declare RRampW Base=r17.0 ElementSize=2 SrcRegion=REGION(8,1) Type=w // r17 + +.declare Mbaff_ALPHA2 Base=r45.0 ElementSize=2 SrcRegion=REGION(8,1) Type=uw // alpha2 = (alpha >> 2) + 2 + + +#define ORIX_CUR r46.0 // :w, current block origin X in bytes +#define ORIY_CUR r46.1 // :w, current block origin Y in bytes +#define ORIX_LEFT r46.2 // :w, left block origin X in bytes +#define ORIY_LEFT r46.3 // :w, left block origin Y in bytes +#define ORIX_TOP r46.4 // :w, top block origin X in bytes +#define ORIY_TOP r46.5 // :w, top block origin Y in bytes +//#define FilterSampleFlag r46.6 // :uw, +#define CTemp0_W r46.7 // :w, child Temp0 + +#define alpha r46.8 // :w, Scaler version for non Mbaff +#define beta r46.9 // :w, Scaler version for non Mbaff +#define tc0 r46.20 // 4 :ub, r46.20 ~ r46.23, Scaler version for non Mbaff +#define MaskA r46.12 // :uw +#define MaskB r46.13 // :uw + +// Child control flags +#define DualFieldMode r47.0 // Cur MB is frame based, above MB is field based in mbaff mode + // :uw, 0 = not in dual field mode, 1 = in dual field mode, filter both top and bot fields +#define GateWayOffsetC r47.1 // :w, Gateway offset for child writing into root space +#define CntrlDataOffsetY r47.1 // :ud, MB control data data offset +#define alpha2 r47.4 // :uw, alpha2 = (alpha >> 2) + 2 + +#define VertEdgePattern r47.5 // :uw, + +#define CTemp1_W r47.6 // :w, child Temp1 +#define CTemp1_B r47.12 // :b, = child Temp1_W +#define CTemp2_W r47.7 // :w, child Temp2 +#define CTemp2_B r47.14 // :b, = child Temp2_W + +// Used in child +#define ECM_AddrReg a0.4 // Edge Control Map register +#define P_AddrReg a0.6 // point to P samples in left or top MB +#define Q_AddrReg a0.7 // point to Q samples in cur MB + + +.declare RTempD Base=r26.0 ElementSize=4 SrcRegion=REGION(8,1) Type=d // r26-27 +.declare RTempB Base=r26.0 ElementSize=1 SrcRegion=REGION(8,4) Type=ub // r26-27 +.declare RTempW Base=r26.0 ElementSize=2 SrcRegion=REGION(8,1) Type=w // r26-27 +#define LEFT_TEMP_D RTempD +#define LEFT_TEMP_B RTempB +#define LEFT_TEMP_W RTempW + +.declare TempRow0 Base=r26.0 ElementSize=2 SrcRegion=REGION(8,1) Type=w +.declare TempRow0B Base=r26.0 ElementSize=1 SrcRegion=REGION(8,2) Type=ub +.declare TempRow1 Base=r27.0 ElementSize=2 SrcRegion=REGION(8,1) Type=w +.declare TempRow1B Base=r27.0 ElementSize=1 SrcRegion=REGION(8,2) Type=ub + +.declare CUR_TEMP_D Base=r28.0 ElementSize=4 SrcRegion=REGION(8,1) Type=d // 8 GRFs +.declare CUR_TEMP_B Base=r28.0 ElementSize=1 SrcRegion=REGION(8,4) Type=ub +.declare CUR_TEMP_W Base=r28.0 ElementSize=2 SrcRegion=REGION(8,1) Type=w + +#define FilterSampleFlag r28.0 // :uw, + +.declare A Base=r28.0 ElementSize=2 SrcRegion=REGION(16,1) Type=w +.declare BB Base=r29.0 ElementSize=2 SrcRegion=REGION(16,1) Type=w + +.declare TempRow3 Base=r30.0 ElementSize=2 SrcRegion=REGION(8,1) Type=w +.declare TempRow3B Base=r30.0 ElementSize=1 SrcRegion=REGION(8,2) Type=ub + +.declare tc0_exp Base=r30.0 ElementSize=2 SrcRegion=REGION(8,1) Type=w +.declare tc8 Base=r30.0 ElementSize=2 SrcRegion=REGION(8,1) Type=w + +.declare tc_exp Base=r31.0 ElementSize=2 SrcRegion=REGION(8,1) Type=w +.declare tx_exp_8 Base=r31.0 ElementSize=2 SrcRegion=REGION(8,1) Type=w + +.declare q0_p0 Base=r32.0 ElementSize=2 SrcRegion=REGION(8,1) Type=w +.declare ABS_q0_p0 Base=r33.0 ElementSize=2 SrcRegion=REGION(8,1) Type=w + +.declare ap Base=r34.0 ElementSize=2 SrcRegion=REGION(8,1) Type=w +.declare aq Base=r35.0 ElementSize=2 SrcRegion=REGION(8,1) Type=w + +// These buffers have the src data for each edge to be beblocked. +// They have modified pixels from previous edges. +// +// Y: +// +----+----+----+----+----+----+----+----+ +// | p3 | p2 | P1 | p0 | q0 | q1 | q2 | q3 | +// +----+----+----+----+----+----+----+----+ +// +// p3 = r[P_AddrReg, 0]<16;16,1> +// p2 = r[P_AddrReg, 16]<16;16,1> +// p1 = r[P_AddrReg, 32]<16;16,1> +// p0 = r[P_AddrReg, 48]<16;16,1> +// q0 = r[Q_AddrReg, 0]<16;16,1> +// q1 = r[Q_AddrReg, 16]<16;16,1> +// q2 = r[Q_AddrReg, 32]<16;16,1> +// q3 = r[Q_AddrReg, 48]<16;16,1> + +.declare p0123_W Base=r36.0 ElementSize=2 SrcRegion=REGION(16,1) Type=uw // r36, r37 +.declare q0123_W Base=r38.0 ElementSize=2 SrcRegion=REGION(16,1) Type=uw // r38, r39 +.declare p3 Base=r36.0 ElementSize=1 SrcRegion=REGION(8,1) Type=ub +.declare p2 Base=r36.16 ElementSize=1 SrcRegion=REGION(8,1) Type=ub +.declare p1 Base=r37.0 ElementSize=1 SrcRegion=REGION(8,1) Type=ub +.declare p0 Base=r37.16 ElementSize=1 SrcRegion=REGION(8,1) Type=ub +.declare q0 Base=r38.0 ElementSize=1 SrcRegion=REGION(8,1) Type=ub +.declare q1 Base=r38.16 ElementSize=1 SrcRegion=REGION(8,1) Type=ub +.declare q2 Base=r39.0 ElementSize=1 SrcRegion=REGION(8,1) Type=ub +.declare q3 Base=r39.16 ElementSize=1 SrcRegion=REGION(8,1) Type=ub + +.declare TempRow2 Base=r38.0 ElementSize=2 SrcRegion=REGION(8,1) Type=w + +// Temp space for mbaff dual field mode +#define ABOVE_CUR_MB_BASE 40*GRFWIB // Byte offset to r40 +.declare ABOVE_CUR_MB_YW Base=r40 ElementSize=2 SrcRegion=REGION(8,1) Type=uw +.declare ABOVE_CUR_MB_UW Base=r40 ElementSize=2 SrcRegion=REGION(8,1) Type=uw + +.declare P0_plus_P1 Base=r41.0 ElementSize=2 SrcRegion=REGION(8,1) Type=w +.declare Q0_plus_Q1 Base=r42.0 ElementSize=2 SrcRegion=REGION(8,1) Type=w + +.declare P2_plus_P3 Base=r43.0 ElementSize=2 SrcRegion=REGION(8,1) Type=w +.declare Q2_plus_Q3 Base=r44.0 ElementSize=2 SrcRegion=REGION(8,1) Type=w + + +////////////////////////////////////////////////////////////////////////////////////////// +// MB control data reference + +// Expanded control data is in r18 - r25 +.declare CNTRL_DATA_D Base=r18 ElementSize=4 SrcRegion=REGION(8,1) Type=ud // For read, 8 GRFs +#define CNTRL_DATA_BASE 18*GRFWIB // Base offset to r18 + +// Bit mask for extracting bits +#define MbaffFrameFlag 0x01 +#define FieldModeCurrentMbFlag 0x02 +#define FieldModeLeftMbFlag 0x04 +#define FieldModeAboveMbFlag 0x08 +#define FilterInternal8x8EdgesFlag 0x10 +#define FilterInternal4x4EdgesFlag 0x20 +#define FilterLeftMbEdgeFlag 0x40 +#define FilterTopMbEdgeFlag 0x80 + +#define DISABLE_ILDB_FLAG 0x01 + +// Exact bit pattern for left and cur MB coding mode (frame vs. field) +#define LEFT_FRAME_CUR_FRAME 0x00 +#define LEFT_FRAME_CUR_FIELD 0x02 +#define LEFT_FIELD_CUR_FRAME 0x04 +#define LEFT_FIELD_CUR_FIELD 0x06 + +// Exact bit pattern for above and cur MB coding mode (frame vs. field) +#define ABOVE_FRAME_CUR_FRAME 0x00 +#define ABOVE_FRAME_CUR_FIELD 0x02 +#define ABOVE_FIELD_CUR_FRAME 0x08 +#define ABOVE_FIELD_CUR_FIELD 0x0A + + + +//========== MB control data field offset in byte ========== + +#if !defined(_APPLE) + +// GRF0 - GRF1 holds original control data + +// GRF0 +#define HorizOrigin 0 +#define VertOrigin 1 +#define BitFlags 2 // Bit flags + +#define bbSinternalLeftVert 4 // Internal left vertical bS, 2 bits per bS for 4 Y pixels and 2 U/V pixels +#define bbSinternalMidVert 5 // Internal mid vertical bS +#define bbSinternalRightVert 6 // Internal right vertical bS +#define bbSinternalTopHorz 7 // Internal top horizontal bS + +#define bbSinternalMidHorz 8 // Internal mid horizontal bS +#define bbSinternalBotHorz 9 // Internal bottom horizontal bS +#define wbSLeft0 10 // External left vertical bS (0), 4 bits per bS for 4 Y pixels and 2 U/V pixels, and byte 11 + +#define wbSLeft1 12 // External left vertical bS (1), and byte 13 +#define wbSTop0 14 // External top horizontal bS (0), and byte 15 + +#define wbSTop1 16 // Externaltop horizontal bS (1), and byte 17 +#define bIndexAinternal_Y 18 // Internal index A for Y +#define bIndexBinternal_Y 19 // Internal index B for Y + +#define bIndexAleft0_Y 20 // Left index A for Y (0) +#define bIndexBleft0_Y 21 // Left index B for Y (0) +#define bIndexAleft1_Y 22 // Left index A for Y (1) +#define bIndexBleft1_Y 23 // Left index B for Y (1) + +#define bIndexAtop0_Y 24 // Top index A for Y (0) +#define bIndexBtop0_Y 25 // Top index B for Y (0) +#define bIndexAtop1_Y 26 // Top index A for Y (1) +#define bIndexBtop1_Y 27 // Top index B for Y (1) + +#define bIndexAinternal_Cb 28 // Internal index A for Cb +#define bIndexBinternal_Cb 29 // Internal index B for Cb +#define bIndexAleft0_Cb 30 // Left index A for Cb (0) +#define bIndexBleft0_Cb 31 // Left index B for Cb (0) + +// GRF1 +#define bIndexAleft1_Cb 32 // Left index A for Cb (1) +#define bIndexBleft1_Cb 33 // Left index B for Cb (1) +#define bIndexAtop0_Cb 34 // Top index A for Cb (0) +#define bIndexBtop0_Cb 35 // Top index B for Cb (0) + +#define bIndexAtop1_Cb 36 // Top index A for Cb (1) +#define bIndexBtop1_Cb 37 // Top index B for Cb (1) +#define bIndexAinternal_Cr 38 // Internal index A for Cr +#define bIndexBinternal_Cr 39 // Internal index B for Cr + +#define bIndexAleft0_Cr 40 // Left index A for Cr (0) +#define bIndexBleft0_Cr 41 // Left index B for Cr (0) +#define bIndexAleft1_Cr 42 // Left index A for Cr (1) +#define bIndexBleft1_Cr 43 // Left index B for Cr (1) + +#define bIndexAtop0_Cr 44 // Top index A for Cr (0) +#define bIndexBtop0_Cr 45 // Top index B for Cr (0) +#define bIndexAtop1_Cr 46 // Top index A for Cr (1) +#define bIndexBtop1_Cr 47 // Top index B for Cr (1) + +#define ExtBitFlags 48 // Extended bit flags, such as disable ILDB bits + +// Offset 49 - 63 not used + + +//===== GRF2 - GRF7 hold expanded control data ===== + +// GRF2 +#define wEdgeCntlMap_IntLeftVert 64 // Derived from bbSinternalLeftVert, 1 bit per pixel +#define wEdgeCntlMap_IntMidVert 66 // Derived from bbSinternalLeftVert + +#define wEdgeCntlMap_IntRightVert 68 // Derived from bbSinternalRightVert +#define wEdgeCntlMap_IntTopHorz 70 // Derived from bbSinternalTopHorz, 1bit per pixel + +#define wEdgeCntlMap_IntMidHorz 72 // Derived from bbSinternalMidHorz +#define wEdgeCntlMap_IntBotHorz 74 // Derived from bbSinternalBotHorz + +// Offset 76 - 79 not used + +#define wEdgeCntlMapA_ExtLeftVert0 80 // Derived from wbSLeft0, 1bit per pixel +#define wEdgeCntlMapB_ExtLeftVert0 82 // Derived from wbSLeft0 + +#define wEdgeCntlMapA_ExtTopHorz0 84 // Derived from wbSTop0, 1bit per pixel +#define wEdgeCntlMapB_ExtTopHorz0 86 // Derived from wbSTop0 + +#define wEdgeCntlMapA_ExtLeftVert1 88 // Derived from wbSLeft1, 1bit per pixel +#define wEdgeCntlMapB_ExtLeftVert1 90 // Derived from wbSLeft1 + +#define wEdgeCntlMapA_ExtTopHorz1 92 // Derived from wbSTop1, 1bit per pixel +#define wEdgeCntlMapB_ExtTopHorz1 94 // Derived from wbSTop1 + + +// GRF3 +#define bTc0_v00_0_Y 96 // Derived from bSv00_0 and bIndexAleft0_Y, 4 pixels per tc0 +#define bTc0_v10_0_Y 97 // Derived from bSv10_0 and bIndexAleft0_Y +#define bTc0_v20_0_Y 98 // Derived from bSv20_0 and bIndexAleft0_Y +#define bTc0_v30_0_Y 99 // Derived from bSv30_0 and bIndexAleft0_Y + +#define bTc0_v01_Y 100 // Derived from bSv01 and bIndexAinternal_Y +#define bTc0_v11_Y 101 // Derived from bSv11 and bIndexAinternal_Y +#define bTc0_v21_Y 102 // Derived from bSv21 and bIndexAinternal_Y +#define bTc0_v31_Y 103 // Derived from bSv31 and bIndexAinternal_Y + +#define bTc0_v02_Y 104 // Derived from bSv02 and bIndexAinternal_Y +#define bTc0_v12_Y 105 // Derived from bSv12 and bIndexAinternal_Y +#define bTc0_v22_Y 106 // Derived from bSv22 and bIndexAinternal_Y +#define bTc0_v32_Y 107 // Derived from bSv32 and bIndexAinternal_Y + +#define bTc0_v03_Y 108 // Derived from bSv03 and bIndexAinternal_Y +#define bTc0_v13_Y 109 // Derived from bSv13 and bIndexAinternal_Y +#define bTc0_v23_Y 110 // Derived from bSv23 and bIndexAinternal_Y +#define bTc0_v33_Y 111 // Derived from bSv33 and bIndexAinternal_Y + +#define bTc0_h00_0_Y 112 // Derived from bSh00_0 and bIndexAleft0_Y +#define bTc0_h01_0_Y 113 // Derived from bSh01_0 and bIndexAleft0_Y +#define bTc0_h02_0_Y 114 // Derived from bSh02_0 and bIndexAleft0_Y +#define bTc0_h03_0_Y 115 // Derived from bSh03_0 and bIndexAleft0_Y + +#define bTc0_h10_Y 116 // Derived from bSh10 and bIndexAinternal_Y +#define bTc0_h11_Y 117 // Derived from bSh11 and bIndexAinternal_Y +#define bTc0_h12_Y 118 // Derived from bSh12 and bIndexAinternal_Y +#define bTc0_h13_Y 119 // Derived from bSh13 and bIndexAinternal_Y + +#define bTc0_h20_Y 120 // Derived from bSh20 and bIndexAinternal_Y +#define bTc0_h21_Y 121 // Derived from bSh21 and bIndexAinternal_Y +#define bTc0_h22_Y 122 // Derived from bSh22 and bIndexAinternal_Y +#define bTc0_h23_Y 123 // Derived from bSh23 and bIndexAinternal_Y + +#define bTc0_h30_Y 124 // Derived from bSh30 and bIndexAinternal_Y +#define bTc0_h31_Y 125 // Derived from bSh31 and bIndexAinternal_Y +#define bTc0_h32_Y 126 // Derived from bSh32 and bIndexAinternal_Y +#define bTc0_h33_Y 127 // Derived from bSh33 and bIndexAinternal_Y + +// GRF4 +#define bAlphaLeft0_Y 128 // Derived from bIndexAleft0_Y +#define bBetaLeft0_Y 129 // Derived from bIndexBleft0_Y +#define bAlphaTop0_Y 130 // Derived from bIndexAtop0_Y +#define bBetaTop0_Y 131 // Derived from bIndexBtop0_Y + +#define bAlphaInternal_Y 132 // Derived from bIndexAinternal_Y +#define bBetaInternal_Y 133 // Derived from bIndexBinternal_Y +// Offset 134 - 135 not used + +// Offset 136 - 143 not used +#define bAlphaLeft1_Y 144 // Derived from bIndexAleft1_Y Used in Mbaff mode only +#define bBetaLeft1_Y 145 // Derived from bIndexBleft1_Y Used in Mbaff mode only +#define bAlphaTop1_Y 146 // Derived from bIndexAtop1_Y Used in Mbaff mode only +#define bBetaTop1_Y 147 // Derived from bIndexBtop1_Y Used in Mbaff mode only + +// Offset 148 - 151 not used +#define bTc0_v00_1_Y 152 // Derived from bSv00_1 and bIndexAleft1_Y Used in Mbaff mode only +#define bTc0_v10_1_Y 153 // Derived from bSv10_1 and bIndexAleft1_Y Used in Mbaff mode only +#define bTc0_v20_1_Y 154 // Derived from bSv20_1 and bIndexAleft1_Y Used in Mbaff mode only +#define bTc0_v30_1_Y 155 // Derived from bSv30_1 and bIndexAleft1_Y Used in Mbaff mode only + +#define bTc0_h00_1_Y 156 // Derived from bSh00_1 and bIndexAleft1_Y Used in Mbaff mode only +#define bTc0_h01_1_Y 157 // Derived from bSh01_1 and bIndexAleft1_Y Used in Mbaff mode only +#define bTc0_h02_1_Y 158 // Derived from bSh02_1 and bIndexAleft1_Y Used in Mbaff mode only +#define bTc0_h03_1_Y 159 // Derived from bSh03_1 and bIndexAleft1_Y Used in Mbaff mode only + + +// GRF5 +#define bTc0_v00_0_Cb 160 // Derived from bSv00_0 and bIndexAleft0_Cb, 2 pixels per tc0 Left0 +#define bTc0_v10_0_Cb 161 // Derived from bSv10_0 and bIndexAleft0_Cb +#define bTc0_v20_0_Cb 162 // Derived from bSv20_0 and bIndexAleft0_Cb +#define bTc0_v30_0_Cb 163 // Derived from bSv30_0 and bIndexAleft0_Cb + +#define bTc0_v02_Cb 164 // Derived from bSv02 and bIndexAinternal_Cb MidVert +#define bTc0_v12_Cb 165 // Derived from bSv12 and bIndexAinternal_Cb +#define bTc0_v22_Cb 166 // Derived from bSv22 and bIndexAinternal_Cb +#define bTc0_v32_Cb 167 // Derived from bSv32 and bIndexAinternal_Cb + +#define bTc0_h00_0_Cb 168 // Derived from bSh00_0 and bIndexAleft0_Cb Top0 +#define bTc0_h01_0_Cb 169 // Derived from bSh01_0 and bIndexAleft0_Cb +#define bTc0_h02_0_Cb 170 // Derived from bSh02_0 and bIndexAleft0_Cb +#define bTc0_h03_0_Cb 171 // Derived from bSh03_0 and bIndexAleft0_Cb + +#define bTc0_h20_Cb 172 // Derived from bSh20 and bIndexAinternal_Cb MidHorz +#define bTc0_h21_Cb 173 // Derived from bSh21 and bIndexAinternal_Cb +#define bTc0_h22_Cb 174 // Derived from bSh22 and bIndexAinternal_Cb +#define bTc0_h23_Cb 175 // Derived from bSh23 and bIndexAinternal_Cb + +#define bTc0_v00_0_Cr 176 // Derived from bSv00_0 and bIndexAleft0_Cr, 2 pixels per tc0 Left0 +#define bTc0_v10_0_Cr 177 // Derived from bSv10_0 and bIndexAleft0_Cr +#define bTc0_v20_0_Cr 178 // Derived from bSv20_0 and bIndexAleft0_Cr +#define bTc0_v30_0_Cr 179 // Derived from bSv30_0 and bIndexAleft0_Cr + +#define bTc0_v02_Cr 180 // Derived from bSv02 and bIndexAinternal_Cr Mid Vert +#define bTc0_v12_Cr 181 // Derived from bSv12 and bIndexAinternal_Cr +#define bTc0_v22_Cr 182 // Derived from bSv22 and bIndexAinternal_Cr +#define bTc0_v32_Cr 183 // Derived from bSv32 and bIndexAinternal_Cr + +#define bTc0_h00_0_Cr 184 // Derived from bSh00_0 and bIndexAleft0_Cr, 2 pixels per tc0 Top0 +#define bTc0_h01_0_Cr 185 // Derived from bSh01_0 and bIndexAleft0_Cr +#define bTc0_h02_0_Cr 186 // Derived from bSh02_0 and bIndexAleft0_Cr +#define bTc0_h03_0_Cr 187 // Derived from bSh03_0 and bIndexAleft0_Cr + +#define bTc0_h20_Cr 188 // Derived from bSh20 and bIndexAinternal_Cr Mid Horz +#define bTc0_h21_Cr 189 // Derived from bSh21 and bIndexAinternal_Cr +#define bTc0_h22_Cr 190 // Derived from bSh22 and bIndexAinternal_Cr +#define bTc0_h23_Cr 191 // Derived from bSh23 and bIndexAinternal_Cr + +// GRF6 +#define bAlphaLeft0_Cb 192 // Derived from bIndexAleft0_Cb +#define bBetaLeft0_Cb 193 // Derived from bIndexBleft0_Cb +#define bAlphaTop0_Cb 194 // Derived from bIndexAtop0_Cb +#define bBetaTop0_Cb 195 // Derived from bIndexBtop0_Cb + +#define bAlphaInternal_Cb 196 // Derived from bIndexAinternal_Cb +#define bBetaInternal_Cb 197 // Derived from bIndexBinternal_Cb +// Offset 198 - 199 not used + +#define bAlphaLeft0_Cr 200 // Derived from bIndexAleft0_Cr +#define bBetaLeft0_Cr 201 // Derived from bIndexBleft0_Cr +#define bAlphaTop0_Cr 202 // Derived from bIndexAtop0_Cr +#define bBetaTop0_Cr 203 // Derived from bIndexBtop0_Cr + +#define bAlphaInternal_Cr 204 // Derived from bIndexAinternal_Cr +#define bBetaInternal_Cr 205 // Derived from bIndexBinternal_Cr +// Offset 206 - 223 not used + +// GRF7 +#define bAlphaLeft1_Cb 224 // Derived from bIndexAleft1_Cb Used in Mbaff mode only +#define bBetaLeft1_Cb 225 // Derived from bIndexBleft1_Cb Used in Mbaff mode only +#define bAlphaTop1_Cb 226 // Derived from bIndexAtop1_Cb Used in Mbaff mode only +#define bBetaTop1_Cb 227 // Derived from bIndexBtop1_Cb Used in Mbaff mode only + +// Offset 228 - 231 not used + +#define bTc0_v00_1_Cb 232 // Derived from bSv00_1 and bIndexAleft1_Cb Used in Mbaff mode only +#define bTc0_v10_1_Cb 233 // Derived from bSv10_1 and bIndexAleft1_Cb Used in Mbaff mode only +#define bTc0_v20_1_Cb 234 // Derived from bSv20_1 and bIndexAleft1_Cb Used in Mbaff mode only +#define bTc0_v30_1_Cb 235 // Derived from bSv30_1 and bIndexAleft1_Cb Used in Mbaff mode only + +#define bTc0_h00_1_Cb 236 // Derived from bSh00_1 and bIndexAleft1_Cb Used in Mbaff mode only +#define bTc0_h01_1_Cb 237 // Derived from bSh01_1 and bIndexAleft1_Cb Used in Mbaff mode only +#define bTc0_h02_1_Cb 238 // Derived from bSh02_1 and bIndexAleft1_Cb Used in Mbaff mode only +#define bTc0_h03_1_Cb 239 // Derived from bSh03_1 and bIndexAleft1_Cb Used in Mbaff mode only + +#define bAlphaLeft1_Cr 240 // Derived from bIndexAleft1_Cr Used in Mbaff mode only +#define bBetaLeft1_Cr 241 // Derived from bIndexBleft1_Cr Used in Mbaff mode only +#define bAlphaTop1_Cr 242 // Derived from bIndexAtop1_Cr Used in Mbaff mode only +#define bBetaTop1_Cr 243 // Derived from bIndexBtop1_Cr Used in Mbaff mode only + +// Offset 244 - 247 not used + +#define bTc0_v00_1_Cr 248 // Derived from bSv00_1 and bIndexAleft1_Cr Used in Mbaff mode only +#define bTc0_v10_1_Cr 249 // Derived from bSv10_1 and bIndexAleft1_Cr Used in Mbaff mode only +#define bTc0_v20_1_Cr 250 // Derived from bSv20_1 and bIndexAleft1_Cr Used in Mbaff mode only +#define bTc0_v30_1_Cr 251 // Derived from bSv30_1 and bIndexAleft1_Cr Used in Mbaff mode only + +#define bTc0_h00_1_Cr 252 // Derived from bSh00_1 and bIndexAleft1_Cr Used in Mbaff mode only +#define bTc0_h01_1_Cr 253 // Derived from bSh01_1 and bIndexAleft1_Cr Used in Mbaff mode only +#define bTc0_h02_1_Cr 254 // Derived from bSh02_1 and bIndexAleft1_Cr Used in Mbaff mode only +#define bTc0_h03_1_Cr 255 // Derived from bSh03_1 and bIndexAleft1_Cr Used in Mbaff mode only + + +#else // _APPLE is defined + +//******** Crestline for Apple, progressive only, 88 bytes ********** + +// GRF0 +#define HorizOrigin 0 +#define VertOrigin 1 +#define BitFlags 2 // Bit flags + +#define wEdgeCntlMap_IntLeftVert 4 // Derived from bbSinternalLeftVert, 1 bit per pixel +#define wEdgeCntlMap_IntMidVert 6 // Derived from bbSinternalLeftVert +#define wEdgeCntlMap_IntRightVert 8 // Derived from bbSinternalRightVert +#define wEdgeCntlMap_IntTopHorz 10 // Derived from bbSinternalTopHorz, 1bit per pixel +#define wEdgeCntlMap_IntMidHorz 12 // Derived from bbSinternalMidHorz +#define wEdgeCntlMap_IntBotHorz 14 // Derived from bbSinternalBotHorz +#define wEdgeCntlMapA_ExtLeftVert0 16 // Derived from wbSLeft0, 1bit per pixel +#define wEdgeCntlMapB_ExtLeftVert0 18 // Derived from wbSLeft0 +#define wEdgeCntlMapA_ExtTopHorz0 20 // Derived from wbSTop0, 1bit per pixel +#define wEdgeCntlMapB_ExtTopHorz0 22 // Derived from wbSTop0 + +#define bAlphaLeft0_Y 24 // Derived from bIndexAleft0_Y +#define bBetaLeft0_Y 25 // Derived from bIndexBleft0_Y +#define bAlphaTop0_Y 26 // Derived from bIndexAtop0_Y +#define bBetaTop0_Y 27 // Derived from bIndexBtop0_Y +#define bAlphaInternal_Y 28 // Derived from bIndexAinternal_Y +#define bBetaInternal_Y 29 // Derived from bIndexBinternal_Y + +// GRF1 +#define bTc0_v00_0_Y 32 // Derived from bSv00_0 and bIndexAleft0_Y, 4 pixels per tc0 +#define bTc0_v10_0_Y 33 // Derived from bSv10_0 and bIndexAleft0_Y +#define bTc0_v20_0_Y 34 // Derived from bSv20_0 and bIndexAleft0_Y +#define bTc0_v30_0_Y 35 // Derived from bSv30_0 and bIndexAleft0_Y +#define bTc0_v01_Y 36 // Derived from bSv01 and bIndexAinternal_Y +#define bTc0_v11_Y 37 // Derived from bSv11 and bIndexAinternal_Y +#define bTc0_v21_Y 38 // Derived from bSv21 and bIndexAinternal_Y +#define bTc0_v31_Y 39 // Derived from bSv31 and bIndexAinternal_Y +#define bTc0_v02_Y 40 // Derived from bSv02 and bIndexAinternal_Y +#define bTc0_v12_Y 41 // Derived from bSv12 and bIndexAinternal_Y +#define bTc0_v22_Y 42 // Derived from bSv22 and bIndexAinternal_Y +#define bTc0_v32_Y 43 // Derived from bSv32 and bIndexAinternal_Y +#define bTc0_v03_Y 44 // Derived from bSv03 and bIndexAinternal_Y +#define bTc0_v13_Y 45 // Derived from bSv13 and bIndexAinternal_Y +#define bTc0_v23_Y 46 // Derived from bSv23 and bIndexAinternal_Y +#define bTc0_v33_Y 47 // Derived from bSv33 and bIndexAinternal_Y + +#define bTc0_h00_0_Y 48 // Derived from bSh00_0 and bIndexAleft0_Y +#define bTc0_h01_0_Y 49 // Derived from bSh01_0 and bIndexAleft0_Y +#define bTc0_h02_0_Y 50 // Derived from bSh02_0 and bIndexAleft0_Y +#define bTc0_h03_0_Y 51 // Derived from bSh03_0 and bIndexAleft0_Y +#define bTc0_h10_Y 52 // Derived from bSh10 and bIndexAinternal_Y +#define bTc0_h11_Y 53 // Derived from bSh11 and bIndexAinternal_Y +#define bTc0_h12_Y 54 // Derived from bSh12 and bIndexAinternal_Y +#define bTc0_h13_Y 55 // Derived from bSh13 and bIndexAinternal_Y +#define bTc0_h20_Y 56 // Derived from bSh20 and bIndexAinternal_Y +#define bTc0_h21_Y 57 // Derived from bSh21 and bIndexAinternal_Y +#define bTc0_h22_Y 58 // Derived from bSh22 and bIndexAinternal_Y +#define bTc0_h23_Y 59 // Derived from bSh23 and bIndexAinternal_Y +#define bTc0_h30_Y 60 // Derived from bSh30 and bIndexAinternal_Y +#define bTc0_h31_Y 61 // Derived from bSh31 and bIndexAinternal_Y +#define bTc0_h32_Y 62 // Derived from bSh32 and bIndexAinternal_Y +#define bTc0_h33_Y 63 // Derived from bSh33 and bIndexAinternal_Y + +// GRF2, +#define bTc0_v00_0_Cb 64 // Derived from bSv00_0 and bIndexAleft0_Cb, 2 pixels per tc0 Left0 +#define bTc0_v10_0_Cb 65 // Derived from bSv10_0 and bIndexAleft0_Cb +#define bTc0_v20_0_Cb 66 // Derived from bSv20_0 and bIndexAleft0_Cb +#define bTc0_v30_0_Cb 67 // Derived from bSv30_0 and bIndexAleft0_Cb +#define bTc0_v02_Cb 68 // Derived from bSv02 and bIndexAinternal_Cb MidVert +#define bTc0_v12_Cb 69 // Derived from bSv12 and bIndexAinternal_Cb +#define bTc0_v22_Cb 70 // Derived from bSv22 and bIndexAinternal_Cb +#define bTc0_v32_Cb 71 // Derived from bSv32 and bIndexAinternal_Cb +#define bTc0_h00_0_Cb 72 // Derived from bSh00_0 and bIndexAleft0_Cb Top0 +#define bTc0_h01_0_Cb 73 // Derived from bSh01_0 and bIndexAleft0_Cb +#define bTc0_h02_0_Cb 74 // Derived from bSh02_0 and bIndexAleft0_Cb +#define bTc0_h03_0_Cb 75 // Derived from bSh03_0 and bIndexAleft0_Cb +#define bTc0_h20_Cb 76 // Derived from bSh20 and bIndexAinternal_Cb MidHorz +#define bTc0_h21_Cb 77 // Derived from bSh21 and bIndexAinternal_Cb +#define bTc0_h22_Cb 78 // Derived from bSh22 and bIndexAinternal_Cb +#define bTc0_h23_Cb 79 // Derived from bSh23 and bIndexAinternal_Cb + +#define bAlphaLeft0_Cb 80 // Derived from bIndexAleft0_Cb +#define bBetaLeft0_Cb 81 // Derived from bIndexBleft0_Cb +#define bAlphaTop0_Cb 82 // Derived from bIndexAtop0_Cb +#define bBetaTop0_Cb 83 // Derived from bIndexBtop0_Cb +#define bAlphaInternal_Cb 84 // Derived from bIndexAinternal_Cb +#define bBetaInternal_Cb 85 // Derived from bIndexBinternal_Cb + +#define ExtBitFlags 86 // Extended bit flags, such as disable ILDB bits + +// Shared between Cb and Cr +#define bTc0_v00_0_Cr bTc0_v00_0_Cb +#define bTc0_v10_0_Cr bTc0_v10_0_Cb +#define bTc0_v20_0_Cr bTc0_v20_0_Cb +#define bTc0_v30_0_Cr bTc0_v30_0_Cb +#define bTc0_v02_Cr bTc0_v02_Cb +#define bTc0_v12_Cr bTc0_v12_Cb +#define bTc0_v22_Cr bTc0_v22_Cb +#define bTc0_v32_Cr bTc0_v32_Cb +#define bTc0_h00_0_Cr bTc0_h00_0_Cb +#define bTc0_h01_0_Cr bTc0_h01_0_Cb +#define bTc0_h02_0_Cr bTc0_h02_0_Cb +#define bTc0_h03_0_Cr bTc0_h03_0_Cb +#define bTc0_h20_Cr bTc0_h20_Cb +#define bTc0_h21_Cr bTc0_h21_Cb +#define bTc0_h22_Cr bTc0_h22_Cb +#define bTc0_h23_Cr bTc0_h23_Cb + +#define bAlphaLeft0_Cr bAlphaLeft0_Cb +#define bBetaLeft0_Cr bBetaLeft0_Cb +#define bAlphaTop0_Cr bAlphaTop0_Cb +#define bBetaTop0_Cr bBetaTop0_Cb +#define bAlphaInternal_Cr bAlphaInternal_Cb +#define bBetaInternal_Cr bBetaInternal_Cb + + +#endif + + +//========== End of Child Variables =============================================================== + +#if !defined(COMBINED_KERNEL) +#define ILDB_LABEL(x) x // No symbol extension for standalone kernels +#endif + +#endif // !defined(__AVC_ILDB_HEADER__) diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Luma_Core.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Luma_Core.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Luma_Core.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Luma_Core.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,419 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +#if !defined(__AVC_ILDB_LUMA_CORE__) // Make sure this file is only included once +#define __AVC_ILDB_LUMA_CORE__ + +////////// AVC ILDB Luma Core ///////////////////////////////////////////////////////////////////////////////// +// +// This core performs AVC LUMA ILDB filtering on one horizontal edge (16 pixels) of a MB. +// If data is transposed, it can also de-block a vertical edge. +// +// Bafore calling this subroutine, caller needs to set the following parameters. +// +// - EdgeCntlMap1 // Edge control map A +// - EdgeCntlMap2 // Edge control map B +// - P_AddrReg // Src and dest address register for P pixels +// - Q_AddrReg // Src and dest address register for Q pixels +// - alpha // alpha corresponding to the edge to be filtered +// - beta // beta corresponding to the edge to be filtered +// - tc0 // tc0 corresponding to the edge to be filtered +// +// +// +----+----+----+----+----+----+----+----+ +// | p3 | p2 | P1 | p0 | q0 | q1 | q2 | q3 | +// +----+----+----+----+----+----+----+----+ +// +// p3 = r[P_AddrReg, 0]<16;16,1> +// p2 = r[P_AddrReg, 16]<16;16,1> +// p1 = r[P_AddrReg, 32]<16;16,1> +// p0 = r[P_AddrReg, 48]<16;16,1> +// q0 = r[Q_AddrReg, 0]<16;16,1> +// q1 = r[Q_AddrReg, 16]<16;16,1> +// q2 = r[Q_AddrReg, 32]<16;16,1> +// q3 = r[Q_AddrReg, 48]<16;16,1> +// +///////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +// The region is both src and dest +// P0-P3 and Q0-Q3 should be only used if they have not been modified to new values +#undef P3 +#undef P2 +#undef P1 +#undef P0 +#undef Q0 +#undef Q1 +#undef Q2 +#undef Q3 + +#define P3 r[P_AddrReg, 0]<16;16,1>:ub +#define P2 r[P_AddrReg, 16]<16;16,1>:ub +#define P1 r[P_AddrReg, 32]<16;16,1>:ub +#define P0 r[P_AddrReg, 48]<16;16,1>:ub +#define Q0 r[Q_AddrReg, 0]<16;16,1>:ub +#define Q1 r[Q_AddrReg, 16]<16;16,1>:ub +#define Q2 r[Q_AddrReg, 32]<16;16,1>:ub +#define Q3 r[Q_AddrReg, 48]<16;16,1>:ub + +// New region as dest +#undef NewP2 +#undef NewP1 +#undef NewP0 +#undef NewQ0 +#undef NewQ1 +#undef NewQ2 + +#define NewP2 r[P_AddrReg, 16]<1>:ub +#define NewP1 r[P_AddrReg, 32]<1>:ub +#define NewP0 r[P_AddrReg, 48]<1>:ub +#define NewQ0 r[Q_AddrReg, 0]<1>:ub +#define NewQ1 r[Q_AddrReg, 16]<1>:ub +#define NewQ2 r[Q_AddrReg, 32]<1>:ub + +// Filter one luma edge +FILTER_Y: + +#if defined(_DEBUG) + mov (1) EntrySignatureC:w 0x1111:w +#endif + //---------- Derive filterSampleflag in AVC spec, equition (8-469) ---------- + // bS is in MaskA + + // Src copy of the p3, p2, p1, p0, q0, q1, q2, q3 +// mov (16) p0123_W(0)<1> r[P_AddrReg]<16;16,1>:uw +// mov (16) p0123_W(1)<1> r[P_AddrReg, 32]<16;16,1>:uw +// mov (16) q0123_W(0)<1> r[Q_AddrReg]<16;16,1>:uw +// mov (16) q0123_W(1)<1> r[Q_AddrReg, 32]<16;16,1>:uw + + mov (2) f0.0<1>:uw MaskA<2;2,1>:uw + + add (16) q0_p0(0)<1> Q0 -P0 // q0-p0 + add (16) TempRow0(0)<1> P1 -P0 // p1-p0 + add (16) TempRow1(0)<1> Q1 -Q0 // q1-q0 + + // Build FilterSampleFlag + // abs(q0-p0) < alpha + (f0.0) cmp.l.f0.0 (16) null:w (abs)q0_p0(0) alpha:w + // abs(p1-p0) < Beta + (f0.0) cmp.l.f0.0 (16) null:w (abs)TempRow0(0) beta:w + // abs(q1-q0) < Beta + (f0.0) cmp.l.f0.0 (16) null:w (abs)TempRow1(0) beta:w + + //----------------------------------------------------------------------------------------- + + (f0.0) if (16) Y_ENDIF1 + // For channels whose edge control map1 = 1 ---> perform de-blocking + +// mov (1) f0.1:uw MaskB:uw {NoMask} // Now check for which algorithm to apply + + // (abs)ap = |p2-p0| + add (16) ap(0)<1> P2 -P0 // ap = p2-p0 + // (abs)aq = |q2-q0| + add (16) aq(0)<1> Q2 -Q0 // aq = q2-q0 + + // Make a copy of unmodified p0 and p1 for use in q0'and q1' calculation + mov (16) p0123_W(1)<1> r[P_AddrReg, 32]<16;16,1>:uw {NoMask} + + (f0.1) if (16) Y_ELSE2 + + // For channels whose edge control map2 = 1 ---> bS = 4 algorithm + + // Compute q0', q1' and q2' + //----------------------------------------------------------------------------- + // bS = 4 Algorithm : + // + // gama = |p0-q0| < ((alpha >> 2) + 2) + // deltap = (ap> 3; + // p1' = ( p2 + p1 + p0 + q0 + 2) >> 2; + // p2' = (2*p3 +3*p2 + p1 + p0 + q0 + 4) >> 3; + // } else { + // p0' = ( 2*p1 + p0 + q1 + 2) >> 2; + // } + //----------------------------------------------------------------------------- + + // gama = |p0-q0| < ((alpha >> 2) + 2) = |p0-q0| < alpha2 + cmp.l.f0.1 (16) null:w (abs)q0_p0(0) alpha2:w + + // Common P01 = p0 + p1 + add (16) P0_plus_P1(0)<1> P0 P1 + + // Common Q01 = q0 + q1 + add (16) Q0_plus_Q1(0)<1> Q0 Q1 + +// mov (1) CTemp1_W:w f0.1:uw {NoMask} + mov (1) f0.0:uw f0.1:uw {NoMask} + + // deltap = ((abs)ap < beta) && gama + (f0.1) cmp.l.f0.1 (16) null:w (abs)ap(0) beta<0;1,0>:w // (abs)ap < beta ? + + // deltaq = ((abs)aq < beta) && gama + (f0.0) cmp.l.f0.0 (16) null:w (abs)aq(0) beta<0;1,0>:w // (abs)aq < beta ? + + +// mov (1) CTemp1_W:w f0.0:uw {NoMask} // gama = |p0-q0| < ((alpha >> 2) + 2) for each channel +// and (1) f0.1:w f0.1:uw CTemp1_W:w {NoMask} // deltap = (ap P2 P3 + + // A = (p1 + p0) + q0 = P01 + q0 + add (16) A(0)<1> P0_plus_P1(0) Q0 // A = P01 + q0 + + // Now acc0 = A + + // B = p2 + (p1 + p0 + q0) + 4 = p2 + A + 4 +// add (16) acc0.0<1>:w P2 4:w // p2 + 4 +// add (16) BB(0)<1> acc0.0<16;16,1>:w A(0) // B = p2 + A + 4 + add (16) acc0.0<1>:w acc0.0<16;16,1>:w 4:w // p2 + 4 + add (16) BB(0)<1> acc0.0<16;16,1>:w P2 // B = p2 + A + 4 + + // Now acc0 = B + + // p2' = (2*p3 +3*p2 + A + 4) >> 3 = (2*(p3+p2) + B) >> 3 +// mov (16) acc0.0<1>:w BB(0) + mac (16) acc0.0<1>:w P2_plus_P3(0) 2:w + shr.sat (16) TempRow3B(0)<2> acc0.0<16;16,1>:w 3:w + + // p1' = (p2 + A + 2) >> 2 = (B - 2) >> 2 + add (16) acc0.0<1>:w BB(0) -2:w + shr.sat (16) TempRow1B(0)<2> acc0.0<16;16,1>:w 2:w + + // p0' = (p2 +2*A + q1 + 4) >> 3 = (B + A + q1) >> 3 + add (16) acc0.0<1>:w Q1 A(0) // B + A + add (16) acc0.0<1>:w acc0.0<16;16,1>:w BB(0) // B + A + q1 + shr.sat (16) TempRow0B(0)<2> acc0.0<16;16,1>:w 3:w // (B + A + q1) >> 3 + + // p2' = (2*p3 +3*p2 + A + 4) >> 3 = (2*(p3+p2) + B) >> 3 +// mov (16) acc0.0<1>:w BB(0) +// mac (16) acc0.0<1>:w P2_plus_P3(0) 2:w +// shr.sat (16) TempRow3B(0)<2> acc0.0<16;16,1>:w 3:w + + mov (16) NewP2 TempRow3B(0) // p2' + mov (16) NewP1 TempRow1B(0) // p1' + mov (16) NewP0 TempRow0B(0) // p0' + +Y_ELSE3: + else (16) Y_ENDIF3 // for channels its deltap = false + + // p0' = (2*p1 + p0 + q1 + 2) >> 2 = (p1 + P01 + q1 + 2) >> 2 + add (16) acc0.0<1>:w P1 P0_plus_P1(0) // p1 + P01 (TempRow1(0) = P01) + add (16) acc0.0<1>:w acc0.0<16;16,1>:w Q1 + add (16) acc0.0<1>:w acc0.0<16;16,1>:w 2:w // p1 + P01 + q1 + 2 + + shr.sat (16) TempRow0B(0)<2> acc0.0<16;16,1>:w 2:w // >> 2 + mov (16) NewP0 TempRow0B(0) // p0' + + endif +Y_ENDIF3: + // Compute q0', q1' and q2' + //----------------------------------------------------------------------------- + // bS = 4 Algorithm (cont): + // + // deltaq = (aq> 3; + // q1' = ( q2 + q1 + q0 + p0 + 2) >> 2; + // q2' = (2*q3 +3*q2 + q1 + q0 + p0 + 4) >> 3; + // } else { + // q0' = ( 2*q1 + q0 + p1 + 2) >> 2; + // } + + // deltaq = ((abs)aq < beta) && gama +// cmp.l.f0.1 (16) null:w (abs)aq(0) beta<0;1,0>:w // (abs)aq < beta ? + + // Common Q01 = q0 + q1 +// add (16) Q0_plus_Q1(0)<1> Q0 Q1 + +// and (1) f0.1:w f0.1:uw CTemp1_W:w {NoMask} // deltaq = ((abs)ap < beta) && gama + + (f0.0) if (16) Y_ELSE4 // for channels its deltaq = true + + add (16) Q2_plus_Q3(0)<1> Q2 Q3 + + // A = (q1 + q0) + p0 = Q01 + p0 + add (16) A(0)<1> Q0_plus_Q1(0) p0(0) // A = q1+q0 + p0 + + // Acc0 = A + + // B = q2 + q1 + q0 + p0 + 4 = q2 + A + 4 + add (16) acc0.0<1>:w acc0.0<16;16,1>:w 4:w // q2 + 4 + add (16) BB(0)<1> acc0.0<16;16,1>:w Q2 // B = q2 + A + 4 + + // Acc0 = B + + // q2' = (2*q3 +3*q2 + A + 4) >> 3 = (2*(q3+q2) + B) >> 3 +// mov (16) acc0.0<1>:w BB(0) + mac (16) acc0.0<1>:w Q2_plus_Q3(0) 2:w + shr.sat (16) TempRow3B(0)<2> acc0.0<16;16,1>:w 3:w + + // q1' = (q2 + A + 2) >> 2 = (B - 2) >> 2 + add (16) acc0.0<1>:w BB(0) -2:w + shr.sat (16) TempRow1B(0)<2> acc0.0<16;16,1>:w 2:w + + // q0' = (q2 +2*A + p1 + 4) >> 3 = (B + A + p1) >> 3 + add (16) acc0.0<1>:w p1(0) A(0) + add (16) acc0.0<1>:w acc0.0<16;16,1>:w BB(0) + shr.sat (16) TempRow0B(0)<2> acc0.0<16;16,1>:w 3:w + + mov (16) NewQ2 TempRow3B(0) // q2' + mov (16) NewQ1 TempRow1B(0) // q1' + mov (16) NewQ0 TempRow0B(0) // q0' + +Y_ELSE4: + else (16) Y_ENDIF4 // for channels its deltaq = false + + // q0' = (2*q1 + q0 + p1 + 2) >> 2 = (q1 + Q01 + p1 + 2) >> 2 + // Use original p1 values in p1(0) + add (16) acc0.0<1>:w p1(0) Q0_plus_Q1(0) // p1 + P01 (TempRow1(0) = P01) + add (16) acc0.0<1>:w acc0.0<16;16,1>:w Q1 + add (16) acc0.0<1>:w acc0.0<16;16,1>:w 2:w // p1 + P01 + q1 + 2 + + shr.sat (16) TempRow0B(0)<2> acc0.0<16;16,1>:w 2:w // >> 2 + mov (16) NewQ0 TempRow0B(0) // q0' + + endif +Y_ENDIF4: + + + // Done with bS = 4 algorithm + +Y_ELSE2: + else (16) Y_ENDIF2 + // For channels whose edge control map2 = 0 ---> bS < 4 algorithm + + //----------------------------------------------------------------------------- + // bS < 4 Algorithm : + // tc = tc0 + (|p2-p0|> 3)) + // p0' = Clip1(p0 + delta) = Clip3(0, 0xFF, p0 + delta) + // q0' = Clip1(q0 - delta) = Clip3(0, 0xFF, q0 - delta) + // if (|p2-p0|>1) - (p1<<1)) >> 1 ) + // if (|q2-q0|>1) - (q1<<1)) >> 1 ) + //----------------------------------------------------------------------------- + + // Expand tc0 + mov (16) tc_exp(0)<1> tc0<1;4,0>:ub {NoMask} + mov (16) tc0_exp(0)<1> tc0<1;4,0>:ub {NoMask} // tc0_exp = tc0, each tc0 is duplicated 4 times for 4 adjcent 4 pixels + + // tc_exp = tc0_exp + (|p2-p0| tc0_exp(0) // tc = tc0_exp first + + + cmp.l.f0.0 (16) null:w (abs)ap(0) beta:w // |p2-p0|< Beta ? ---> (abs)ap < Beta ? + cmp.l.f0.1 (16) null:w (abs)aq(0) beta:w // |q2-q0|< Beta ? ---> (abs)aq < Beta ? + + //--- Use free cycles here --- + // delta = Clip3(-tc, tc, ((((q0-p0)<<2) + (p1-q1) + 4) >> 3)) + // 4 * (q0-p0) + p1 - q1 + 4 + add (16) acc0<1>:w P1 4:w // p1 + 4 + mac (16) acc0<1>:w q0_p0(0) 4:w // 4 * (q0-p0) + p1 + 4 + add (16) acc0<1>:w acc0<16;16,1>:w -Q1 // 4 * (q0-p0) + p1 - q1 + 4 + shr (16) TempRow0(0)<1> acc0<16;16,1>:w 3:w + + // Continue on getting tc_exp + (f0.0) add (16) tc_exp(0)<1> tc_exp(0) 1:w // tc0_exp + (|p2-p0|:w f0.0<2;2,1>:w {NoMask} // Save |p2-p0| tc_exp(0) 1:w // tc_exp = tc0_exp + (|p2-p0| tc + cmp.l.f0.1 (16) null:w TempRow0(0) -tc_exp(0) // Clip if delta' < -tc + + //--- Use free cycles here --- + // common = (p0+q0+1) >> 1 ---> TempRow2(0) + // Same as avg of p0 and q0 + avg (16) TempRow2(0)<1> P0 Q0 + + // Continue on cliping tc to get delta + (f0.0) mov (16) TempRow0(0)<1> tc_exp(0) + (f0.1) mov (16) TempRow0(0)<1> -tc_exp(0) + + //--- Use free cycles here --- + mov (2) f0.0<1>:w CTemp1_W<2;2,1>:w {NoMask} // CTemp1_W = (|p2-p0| P0 TempRow0(0) // p0+delta + add.sat (16) TempRow0B(0)<2> Q0 -TempRow0(0) // q0-delta + mov (16) NewP0 TempRow1B(0) // p0' + mov (16) NewQ0 TempRow0B(0) // q0' + //----------------------------------------------------------------------- + + // Now compute p1' and q1' + + // if (|p2-p0|> 1 = (p2 + common - (p1*2)) >> 1 + add (16) acc0<1>:w P2 TempRow2(0) // TempRow2(0) = common = (p0+q0+1) >> 1 + mac (16) acc0<1>:w P1 -2:w + shr (16) TempRow1(0)<1> acc0<16;16,1>:w 1:w + + // tc clip to get tc_adj + cmp.g.f0.0 (16) null:w TempRow1(0) tc0_exp(0) // Clip if delta' > tc + cmp.l.f0.1 (16) null:w TempRow1(0) -tc0_exp(0) // Clip if delta' < -tc + + (f0.0) mov (16) TempRow1(0)<1> tc0_exp(0) + (f0.1) mov (16) TempRow1(0)<1> -tc0_exp(0) + + //--- Use free cycles here --- + mov (1) f0.1:w CTemp2_W:w {NoMask} // CTemp2_W = (|q2-q0| P1 TempRow1(0) // p1+tc_adj + mov (16) NewP1 TempRow1B(0) // p1' + + //------------------------------------------------------------------------ +Y_ENDIF6: + endif + + // if (|q2-q0|> 1 + // same as q2 + common - (q1 * 2) + add (16) acc0<1>:w Q2 TempRow2(0) + mac (16) acc0<1>:w Q1 -2:w + shr (16) TempRow1(0)<1> acc0<16;16,1>:w 1:w + + // tc clip to get tc_adj + cmp.g.f0.0 (16) null:w TempRow1(0) tc0_exp(0) // Clip if delta' > tc + cmp.l.f0.1 (16) null:w TempRow1(0) -tc0_exp(0) // Clip if delta' < -tc + + (f0.0) mov (16) TempRow1(0)<1> tc0_exp(0) + (f0.1) mov (16) TempRow1(0)<1> -tc0_exp(0) + + // q1' = q1 + tc_adj + add.sat (16) TempRow1B(0)<2> Q1 TempRow1(0) // q1+tc_adj + mov (16) NewQ1 TempRow1B(0) // q1' + + //------------------------------------------------------------------------ +Y_ENDIF7: + endif + + endif +Y_ENDIF2: +Y_ENDIF1: + endif + +RETURN + +#endif // !defined(__AVC_ILDB_LUMA_CORE__) diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Luma_Core_Mbaff.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Luma_Core_Mbaff.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Luma_Core_Mbaff.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Luma_Core_Mbaff.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,391 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +#if !defined(__AVC_ILDB_LUMA_CORE_MBAFF__) // Make sure this file is only included once +#define __AVC_ILDB_LUMA_CORE_MBAFF__ + +////////// AVC ILDB Luma Core Mbaff ///////////////////////////////////////////////////////////////////////////////// +// +// This core performs AVC LUMA ILDB filtering on one horizontal edge (16 pixels) of a MB. +// If data is transposed, it can also de-block a vertical edge. +// +// Bafore calling this subroutine, caller needs to set the following parameters. +// +// - EdgeCntlMap1 // Edge control map A +// - EdgeCntlMap2 // Edge control map B +// - P_AddrReg // Src and dest address register for P pixels +// - Q_AddrReg // Src and dest address register for Q pixels +// - alpha // alpha corresponding to the edge to be filtered +// - beta // beta corresponding to the edge to be filtered +// - tc0 // tc0 corresponding to the edge to be filtered +// +// +// +----+----+----+----+----+----+----+----+ +// | p3 | p2 | P1 | p0 | q0 | q1 | q2 | q3 | +// +----+----+----+----+----+----+----+----+ +// +// p3 = r[P_AddrReg, 0]<16;16,1> +// p2 = r[P_AddrReg, 16]<16;16,1> +// p1 = r[P_AddrReg, 32]<16;16,1> +// p0 = r[P_AddrReg, 48]<16;16,1> +// q0 = r[Q_AddrReg, 0]<16;16,1> +// q1 = r[Q_AddrReg, 16]<16;16,1> +// q2 = r[Q_AddrReg, 32]<16;16,1> +// q3 = r[Q_AddrReg, 48]<16;16,1> +// +///////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +// The region is both src and dest +// P0-P3 and Q0-Q3 should be only used if they have not been modified to new values +#undef P3 +#undef P2 +#undef P1 +#undef P0 +#undef Q0 +#undef Q1 +#undef Q2 +#undef Q3 + +#define P3 r[P_AddrReg, 0]<16;16,1>:ub +#define P2 r[P_AddrReg, 16]<16;16,1>:ub +#define P1 r[P_AddrReg, 32]<16;16,1>:ub +#define P0 r[P_AddrReg, 48]<16;16,1>:ub +#define Q0 r[Q_AddrReg, 0]<16;16,1>:ub +#define Q1 r[Q_AddrReg, 16]<16;16,1>:ub +#define Q2 r[Q_AddrReg, 32]<16;16,1>:ub +#define Q3 r[Q_AddrReg, 48]<16;16,1>:ub + +// New region as dest +#undef NewP2 +#undef NewP1 +#undef NewP0 +#undef NewQ0 +#undef NewQ1 +#undef NewQ2 + +#define NewP2 r[P_AddrReg, 16]<1>:ub +#define NewP1 r[P_AddrReg, 32]<1>:ub +#define NewP0 r[P_AddrReg, 48]<1>:ub +#define NewQ0 r[Q_AddrReg, 0]<1>:ub +#define NewQ1 r[Q_AddrReg, 16]<1>:ub +#define NewQ2 r[Q_AddrReg, 32]<1>:ub + + + +// Filter one luma edge - mbaff +FILTER_Y_MBAFF: + +#if defined(_DEBUG) + mov (1) EntrySignatureC:w 0x1111:w +#endif + //---------- Derive filterSampleflag in AVC spec, equition (8-469) ---------- + // bS is in MaskA + + // Src copy of the p3, p2, p1, p0, q0, q1, q2, q3 +// mov (16) p0123_W(0)<1> r[P_AddrReg]<16;16,1>:uw +// mov (16) p0123_W(1)<1> r[P_AddrReg, 32]<16;16,1>:uw +// mov (16) q0123_W(0)<1> r[Q_AddrReg]<16;16,1>:uw +// mov (16) q0123_W(1)<1> r[Q_AddrReg, 32]<16;16,1>:uw + + // Move MaskA and MaskB to flag regs + mov (2) f0.0<1>:uw MaskA<2;2,1>:uw + + add (16) q0_p0(0)<1> Q0 -P0 // q0-p0 + add (16) TempRow0(0)<1> P1 -P0 // p1-p0 + add (16) TempRow1(0)<1> Q1 -Q0 // q1-q0 + + // abs(q0-p0) < alpha + (f0.0) cmp.l.f0.0 (16) null:w (abs)q0_p0(0) Mbaff_ALPHA(0) + // abs(p1-p0) < Beta + (f0.0) cmp.l.f0.0 (16) null:w (abs)TempRow0(0) Mbaff_BETA(0) + // abs(q1-q0) < Beta + (f0.0) cmp.l.f0.0 (16) null:w (abs)TempRow1(0) Mbaff_BETA(0) + + //----------------------------------------------------------------------------------------- + + (f0.0) if (16) MBAFF_Y_ENDIF1 + // For channels whose edge control map1 = 1 ---> perform de-blocking + +// mov (1) f0.1:uw MaskB:uw {NoMask} // Now check for which algorithm to apply + + // (abs)ap = |p2-p0| + add (16) ap(0)<1> P2 -P0 + + // (abs)aq = |q2-q0| + add (16) aq(0)<1> Q2 -Q0 + + // Make a copy of unmodified p0 and p1 for use in q0'and q1' calculation + mov (16) p0123_W(1)<1> r[P_AddrReg, 32]<16;16,1>:uw {NoMask} + + (f0.1) if (16) MBAFF_Y_ELSE2 + + // For channels whose edge control map2 = 1 ---> bS = 4 algorithm + + // Compute q0', q1' and q2' + //----------------------------------------------------------------------------- + // bS = 4 Algorithm : + // + // gama = |p0-q0| < ((alpha >> 2) + 2) + // deltap = (ap> 3; + // p1' = ( p2 + p1 + p0 + q0 + 2) >> 2; + // p2' = (2*p3 +3*p2 + p1 + p0 + q0 + 4) >> 3; + // } else { + // p0' = ( 2*p1 + p0 + q1 + 2) >> 2; + // } + //----------------------------------------------------------------------------- + + // gama = |p0-q0| < ((alpha >> 2) + 2) = |p0-q0| < alpha2 + cmp.l.f0.1 (16) null:w (abs)q0_p0(0) Mbaff_ALPHA2(0) + + // Common P01 = p0 + p1 + add (16) P0_plus_P1(0)<1> P0 P1 + + // Common Q01 = q0 + q1 + add (16) Q0_plus_Q1(0)<1> Q0 Q1 + + mov (1) f0.0:uw f0.1:uw {NoMask} + + // deltap = ((abs)ap < beta) && gama + (f0.1) cmp.l.f0.1 (16) null:w (abs)ap(0) Mbaff_BETA(0) // (abs)ap < beta ? + + // deltaq = ((abs)aq < beta) && gama + (f0.0) cmp.l.f0.0 (16) null:w (abs)aq(0) Mbaff_BETA(0) // (abs)aq < beta ? + + + (f0.1) if (16) MBAFF_Y_ELSE3 // for channels its deltap = true + + add (16) P2_plus_P3(0)<1> P2 P3 + + // A = p1 + p0 + q0 = P01 + q0 + add (16) A(0)<1> P0_plus_P1(0) Q0 // A = P01 + q0 + + // Now acc0 = A + + // B = p2 + p1 + p0 + q0 + 4 = p2 + A + 4 + add (16) acc0.0<1>:w acc0.0<16;16,1>:w 4:w // p2 + 4 + add (16) BB(0)<1> acc0.0<16;16,1>:w P2 // B = p2 + A + 4 + + // Now acc0 = B + + // p2' = (2*p3 +3*p2 + A + 4) >> 3 = (2*(p3+p2) + B) >> 3 + mac (16) acc0.0<1>:w P2_plus_P3(0) 2:w + shr.sat (16) TempRow3B(0)<2> acc0.0<16;16,1>:w 3:w + + // p1' = (p2 + A + 2) >> 2 = (B - 2) >> 2 + add (16) acc0.0<1>:w BB(0) -2:w + shr.sat (16) TempRow1B(0)<2> acc0.0<16;16,1>:w 2:w + + // p0' = (p2 +2*A + q1 + 4) >> 3 = (B + A + q1) >> 3 + add (16) acc0.0<1>:w Q1 A(0) // B + A + add (16) acc0.0<1>:w acc0.0<16;16,1>:w BB(0) // B + A + q1 + shr.sat (16) TempRow0B(0)<2> acc0.0<16;16,1>:w 3:w // (B + A + q1) >> 3 + + mov (16) NewP2 TempRow3B(0) // p2' + mov (16) NewP1 TempRow1B(0) // p1' + mov (16) NewP0 TempRow0B(0) // p0' + +MBAFF_Y_ELSE3: + else (16) MBAFF_Y_ENDIF3 // for channels its deltap = false + + // p0' = (2*p1 + p0 + q1 + 2) >> 2 = (p1 + P01 + q1 + 2) >> 2 + add (16) acc0.0<1>:w P1 P0_plus_P1(0) // p1 + P01 (TempRow1(0) = P01) + add (16) acc0.0<1>:w acc0.0<16;16,1>:w Q1 + add (16) acc0.0<1>:w acc0.0<16;16,1>:w 2:w // p1 + P01 + q1 + 2 + + shr.sat (16) TempRow0B(0)<2> acc0.0<16;16,1>:w 2:w // >> 2 + mov (16) NewP0 TempRow0B(0) // p0' + + endif + +MBAFF_Y_ENDIF3: + // Compute q0', q1' and q2' + //----------------------------------------------------------------------------- + // bS = 4 Algorithm (cont): + // + // deltaq = (aq> 3; + // q1' = ( q2 + q1 + q0 + p0 + 2) >> 2; + // q2' = (2*q3 +3*q2 + q1 + q0 + p0 + 4) >> 3; + // } else { + // q0' = ( 2*q1 + q0 + p1 + 2) >> 2; + // } + + (f0.0) if (16) MBAFF_Y_ELSE4 // for channels its deltaq = true + + add (16) Q2_plus_Q3(0)<1> Q2 Q3 + + // A = q1 + q0 + p0 = Q01 + p0 + add (16) A(0)<1> Q0_plus_Q1(0) p0(0) // A = q1+q0 + p0 + + // B = q2 + q1 + q0 + p0 + 4 = q2 + A + 4 + add (16) acc0.0<1>:w acc0.0<16;16,1>:w 4:w // q2 + 4 + add (16) BB(0)<1> acc0.0<16;16,1>:w Q2 // B = q2 + A + 4 + + // Acc0 = B + + // q2' = (2*q3 +3*q2 + A + 4) >> 3 = (2*(q3+q2) + B) >> 3 + mac (16) acc0.0<1>:w Q2_plus_Q3(0) 2:w + shr.sat (16) TempRow3B(0)<2> acc0.0<16;16,1>:w 3:w + + // q1' = (q2 + A + 2) >> 2 = (B - 2) >> 2 + add (16) acc0.0<1>:w BB(0) -2:w + shr.sat (16) TempRow1B(0)<2> acc0.0<16;16,1>:w 2:w + + // q0' = (q2 +2*A + p1 + 4) >> 3 = (B + A + p1) >> 3 + add (16) acc0.0<1>:w p1(0) A(0) + add (16) acc0.0<1>:w acc0.0<16;16,1>:w BB(0) + shr.sat (16) TempRow0B(0)<2> acc0.0<16;16,1>:w 3:w + + mov (16) NewQ2 TempRow3B(0) // q2' + mov (16) NewQ1 TempRow1B(0) // q1' + mov (16) NewQ0 TempRow0B(0) // q0' + +MBAFF_Y_ELSE4: + else (16) MBAFF_Y_ENDIF4 // for channels its deltaq = false + + // q0' = (2*q1 + q0 + p1 + 2) >> 2 = (q1 + Q01 + p1 + 2) >> 2 + // Use original p1 values in p1(0) + add (16) acc0.0<1>:w p1(0) Q0_plus_Q1(0) // p1 + P01 (TempRow1(0) = P01) + add (16) acc0.0<1>:w acc0.0<16;16,1>:w Q1 + add (16) acc0.0<1>:w acc0.0<16;16,1>:w 2:w // p1 + P01 + q1 + 2 + + shr.sat (16) TempRow0B(0)<2> acc0.0<16;16,1>:w 2:w // >> 2 + mov (16) NewQ0 TempRow0B(0) // q0' + + endif +MBAFF_Y_ENDIF4: + + + // Done with bS = 4 algorithm + +MBAFF_Y_ELSE2: + else (16) MBAFF_Y_ENDIF2 + // For channels whose edge control map2 = 0 ---> bS < 4 algorithm + + //----------------------------------------------------------------------------- + // bS < 4 Algorithm : + // tc = tc0 + (|p2-p0|> 3)) + // p0' = Clip1(p0 + delta) = Clip3(0, 0xFF, p0 + delta) + // q0' = Clip1(q0 - delta) = Clip3(0, 0xFF, q0 - delta) + // if (|p2-p0|>1) - (p1<<1)) >> 1 ) + // if (|q2-q0|>1) - (q1<<1)) >> 1 ) + //----------------------------------------------------------------------------- + + mov (16) tc_exp(0)<1> Mbaff_TC0(0) // tc = tc0_exp first + + cmp.l.f0.0 (16) null:w (abs)ap(0) Mbaff_BETA(0) // |p2-p0|> 3)) + // 4 * (q0-p0) + p1 - q1 + 4 + add (16) acc0<1>:w P1 4:w // p1 + 4 + mac (16) acc0<1>:w q0_p0(0) 4:w // 4 * (q0-p0) + p1 + 4 + add (16) acc0<1>:w acc0<16;16,1>:w -Q1 // 4 * (q0-p0) + p1 - q1 + 4 + shr (16) TempRow0(0)<1> acc0<16;16,1>:w 3:w + + // Continue on getting tc_exp + (f0.0) add (16) tc_exp(0)<1> tc_exp(0) 1:w // tc0_exp + (|p2-p0|:w f0.0<2;2,1>:w {NoMask} // Save |p2-p0| tc_exp(0) 1:w // tc_exp = tc0_exp + (|p2-p0| tc + cmp.l.f0.1 (16) null:w TempRow0(0) -tc_exp(0) // Clip if delta' < -tc + + //--- Use free cycles here --- + // common = (p0+q0+1) >> 1 ---> TempRow2(0) + // Same as avg of p0 and q0 + avg (16) TempRow2(0)<1> P0 Q0 + + // Continue on cliping tc to get delta + (f0.0) mov (16) TempRow0(0)<1> tc_exp(0) + (f0.1) mov (16) TempRow0(0)<1> -tc_exp(0) + + //--- Use free cycles here --- + mov (2) f0.0<1>:w CTemp1_W<2;2,1>:w {NoMask} // CTemp1_W = (|p2-p0| P0 TempRow0(0) // p0+delta + add.sat (16) TempRow0B(0)<2> Q0 -TempRow0(0) // q0-delta + + mov (16) NewP0 TempRow1B(0) // p0' + mov (16) NewQ0 TempRow0B(0) // q0' + + //----------------------------------------------------------------------- + + // Now compute p1' and q1' + + // if (|p2-p0|> 1 = (p2 + common - (p1*2)) >> 1 + add (16) acc0<1>:w P2 TempRow2(0) // TempRow2(0) = common = (p0+q0+1) >> 1 + mac (16) acc0<1>:w P1 -2:w + shr (16) TempRow1(0)<1> acc0<16;16,1>:w 1:w + + // tc clip to get tc_adj + cmp.g.f0.0 (16) null:w TempRow1(0) Mbaff_TC0(0) // Clip if delta' > tc + cmp.l.f0.1 (16) null:w TempRow1(0) -Mbaff_TC0(0) // Clip if delta' < -tc + + (f0.0) mov (16) TempRow1(0)<1> Mbaff_TC0(0) + (f0.1) mov (16) TempRow1(0)<1> -Mbaff_TC0(0) + + //--- Use free cycles here --- + mov (1) f0.1:w CTemp2_W:w {NoMask} // CTemp2_W = (|q2-q0| P1 TempRow1(0) // p1+tc_adj + mov (16) NewP1 TempRow1B(0) // p1' + //------------------------------------------------------------------------ + +MBAFF_Y_ENDIF6: + endif + + // if (|q2-q0|> 1 + // same as q2 + common - (q1 * 2) + add (16) acc0<1>:w Q2 TempRow2(0) + mac (16) acc0<1>:w Q1 -2:w + shr (16) TempRow1(0)<1> acc0<16;16,1>:w 1:w + + // tc clip to get tc_adj + cmp.g.f0.0 (16) null:w TempRow1(0) Mbaff_TC0(0) // Clip if delta' > tc + cmp.l.f0.1 (16) null:w TempRow1(0) -Mbaff_TC0(0) // Clip if delta' < -tc + + (f0.0) mov (16) TempRow1(0)<1> Mbaff_TC0(0) + (f0.1) mov (16) TempRow1(0)<1> -Mbaff_TC0(0) + + // q1' = q1 + tc_adj + add.sat (16) TempRow1B(0)<2> Q1 TempRow1(0) // q1+tc_adj + mov (16) NewQ1 TempRow1B(0) // q1' + + //------------------------------------------------------------------------ +MBAFF_Y_ENDIF7: + endif + + endif +MBAFF_Y_ENDIF2: +MBAFF_Y_ENDIF1: + endif + +RETURN + +#endif // !defined(__AVC_ILDB_LUMA_CORE_MBAFF__) diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_LumaThrdLimit.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_LumaThrdLimit.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_LumaThrdLimit.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_LumaThrdLimit.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,46 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +//========== Forward message to root thread through gateway ========== + +// Chroma root kenrel updates luma thread limit. + +#if defined(_DEBUG) +mov (1) EntrySignatureC:w 0x7788:w +#endif + +// Init payload to r0 +mov (8) GatewayPayload<1>:ud 0:w { NoDDClr } + +// Forward a message: +// Offset = x relative to r50 (defiend in open gataway), x = ORIX >> 4 [bit 28:16] +// Need to shift left 16 + +mov (1) Offset_Length:ud THREAD_LIMIT_OFFSET:ud { NoDDClr, NoDDChk } + +// Length = 1 byte, [bit 10:8 = 000] +//000 xxxxxxxxxxxxx 00000 000 00000000 ==> 000x xxxx xxxx xxxx 0000 0000 0000 0000 + +//mov (1) DispatchID:ub r0.20:ub // Dispatch ID + +// Copy EUid and Thread ID that we received from the PARENT thread +mov (1) EUID_TID:uw r0.6:uw { NoDDClr, NoDDChk } + +mov (1) GatewayPayloadKey:uw 0x1212:uw { NoDDChk } // Key + +//mov (4) GatewayPayload<1>:ud 0:ud { NoDDClr, NoDDChk } // Init payload low 4 dword + +// Write back one byte (value = 0xFF) to root thread GRF to indicate this child thread is finished +// All lower 4 bytes must be assigned to the same byte value. +add (1) Temp1_W:w MaxThreads:uw -OutstandingThreads:uw +mov (4) GatewayPayload<1>:ub Temp1_B<0;1,0>:ub + +send (8) GatewayResponse:ud m0 GatewayPayload<8;8,1>:ud MSG_GW FWDMSGDSC + +//========== Forward Msg Done ======================================== + diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_OpenGateway.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_OpenGateway.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_OpenGateway.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_OpenGateway.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,43 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +//----- Open a Message Gateway ----- +// The parent thread is the recipient thread + +#if defined(_DEBUG) + mov (1) EntrySignature:w 0x1111:w +#endif + +mov (8) GatewayPayload<1>:ud r0.0<8;8,1>:ud // Init payload to r0 + +// r50- (16 GRFs) are the GRFs child thread can wtite to. + +// Reg base is at bit 28:21, Gateway size is at [bit 10:8] +// r6: 6 = 00000110 +//000 00000110 0000000000 100 00000000 ==> 0000 0000 1100 0000 0000 0100 0000 0000 +mov (1) RegBase_GatewaySize:ud 0x00C00400:ud // Reg base + Gateway size (16 GRFs) + + +//000 00110010 0000000000 100 00000000 ==> 0000 0110 0100 0000 0000 0100 0000 0000 +//mov (1) RegBase_GatewaySize:ud 0x06400400:ud // Reg base (r50 = 0x640 byte offset) + Gateway size (16 GRFs) + +//mov (1) DispatchID:ub r0.20:ub // Dispatch ID +mov (1) GatewayPayloadKey:uw 0x1212:uw // Key=0x1212 + +// Message descriptor +// bit 31 EOD +// 27:24 FFID = 0x0011 for msg gateway +// 23:20 msg length = 1 MRF +// 19:16 Response length = 0 +// 14 AckReg = 1 +// 1:0 SubFuncID = 00 for OpenGateway +// Message descriptor: 0 000 0011 0001 0000 + 0 1 000000000000 00 ==> 0000 0011 0001 0000 0100 0000 0000 0000 +// Send message to gateway: the ack message is put into response GRF r49 ==> Good for debugging +send (8) GatewayResponse:ud m7 GatewayPayload<8;8,1>:ud MSG_GW OGWMSGDSC + +//----- End of Open a Message Gateway ----- diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Root_Field_UV.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Root_Field_UV.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Root_Field_UV.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Root_Field_UV.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,9 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +#include "AVC_ILDB_Root_UV.asm" diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Root_Field_Y.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Root_Field_Y.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Root_Field_Y.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Root_Field_Y.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,9 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +#include "AVC_ILDB_Root_Y.asm" diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Root_Mbaff_UV.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Root_Mbaff_UV.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Root_Mbaff_UV.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Root_Mbaff_UV.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,140 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +///////////////////////////////////////////////////////////////////////////////////// +// Kernel name: AVC_ILDB_Root_Mbaff.asm +// +// Root kernel serves as a scheduler for child threads. +// +// +// ***** Note ***** +// Initial design bundle MB pair for each thread, and share AVC_ILDB_MB_Dep_Check.asm +// with non mbaff kernels. +// +// Optimization will be done later, putting top and bottom MBs on separate threads. +// +// +///////////////////////////////////////////////////////////////////////////////////// +// +// $Revision: 1 $ +// $Date: 10/19/06 5:06p $ +// + +// ---------------------------------------------------- +// AVC_ILDB_ROOT_MBAFF_UV +// ---------------------------------------------------- +#define AVC_ILDB + +.kernel AVC_ILDB_ROOT_MBAFF_UV +#if defined(COMBINED_KERNEL) +ILDB_LABEL(AVC_ILDB_ROOT_UV): +#endif + +#include "SetupVPKernel.asm" +#include "AVC_ILDB.inc" + + +#if defined(_DEBUG) + +///////////////////////////////////////////////////////////////////////////////////// +// Init URB space for running on RTL. It satisfies reading an unwritten URB entries. +// Will remove it for production release. + + +//mov (8) m1:ud 0x11111111:ud +//mov (8) m2:ud 0x22222222:ud +//mov (8) m3:ud 0x33333333:ud +//mov (8) m4:ud 0x44444444:ud + +//mov (1) Temp1_W:w 0:w + +//ILDB_INIT_URB: +//mul (1) URBOffset:w Temp1_W:w 4:w +//shl (1) URBWriteMsgDescLow:uw URBOffset:w 4:w // Msg descriptor: URB write dest offset (9:4) +//mov (1) URBWriteMsgDescHigh:uw 0x0650:uw // Msg descriptor: URB write 5 MRFs (m0 - m4) +//#include "writeURB.asm" + +//add (1) Temp1_W:w Temp1_W:w 1:w // Increase block count +//cmp.l.f0.0 (1) null Temp1_W:w MBsCntY:w // Check the block count limit +//(f0.0) jmpi ILDB_INIT_URB // Loop back + + +///////////////////////////////////////////////////////////////////////////////////// + + +mov (1) EntrySignature:w 0xEFF0:w + +#endif +//---------------------------------------------------------------------------------------------------------------- + +// Set global variable +mov (32) ChildParam:uw 0:uw // Reset local variables +//mul (1) TotalBlocks:w MBsCntX:w MBsCntY:w // Total # of MB pairs +//add (1) GatewayApertureE:w MBsCntY:w GatewayApertureB:w // Aperture End = aperture Head + BlockCntY + + +// 2 URB entries for Y: +// Entry 0 - Child thread R0Hdr +// Entry 1 - input parameter to child kernel (child r1) + +#define URB_ENTRIES_PER_MB 2 + +// URB_ENTRIES_PER_MB in differnt form, the final desired format is (URB_ENTRIES_PER_MB-1) << 10 +mov (1) URB_EntriesPerMB_2:w URB_ENTRIES_PER_MB-1:w +shl (1) URB_EntriesPerMB_2:w URB_EntriesPerMB_2:w 10:w + +#define CHROMA_ROOT // Compiling flag for chroma only +//mul (1) URBOffsetUVBase:w MBsCntY:w URB_ENTRIES_PER_MB:w // Right after Y entries + +// URB base for UV kernels +#if defined(DEV_CL) + mov (1) URBOffsetUVBase:w 240:w +#else + mov (1) URBOffsetUVBase:w 320:w +#endif + + +mov (1) ChildThreadsID:uw 3:uw + +shr (1) ThreadLimit:w MaxThreads:w 1:w // Initial luma thread limit to 50% +mul (1) TotalBlocks:w MBsCntX:w MBsCntY:w // MBs to be processed count down from TotalBlocks + +//***** Init CT_R0Hdr fields that are common to all threads ************************* +mov (8) CT_R0Hdr.0:ud r0.0<8;8,1>:ud // Init to root R0 header +mov (1) CT_R0Hdr.7:ud r0.6:ud // Copy Parent Thread Cnt; JJ did the change on 06/20/2006 +mov (1) CT_R0Hdr.31:ub 0:w // Reset the highest byte +mov (1) CT_R0Hdr.3:ud 0x00000000 +mov (1) CT_R0Hdr.6:uw sr0.0:uw // sr0.0: state reg contains general thread states, e.g. EUID/TID. + +//***** Init ChildParam fields that are common to all threads *********************** +mov (8) ChildParam<1>:ud RootParam<8;8,1>:ud // Copy all root parameters +mov (4) CurCol<1>:w 0:w // Reset CurCol, CurRow +add (2) LastCol<1>:w MBsCntX<2;2,1>:w -1:w // Get LastCol and LastRow + +mov (1) URBWriteMsgDesc:ud MSG_LEN(2)+URBWMSGDSC:ud + +//=================================================================================== + +#include "AVC_ILDB_OpenGateway.asm" // Open root thread gateway for receiving notification + +#include "AVC_ILDB_Dep_Check.asm" // Check dependency and spawn all MBs + +//#include "AVC_ILDB_UpdateThrdLimit.asm" // Update thread limit in luma root thread via gateway + +#include "AVC_ILDB_CloseGateway.asm" // Close root thread gateway + +// Chroma root EOT = child send EOT : Request type = 1 + END_CHILD_THREAD + +#undef CHROMA_ROOT + +#if !defined(COMBINED_KERNEL) // For standalone kernel only +.end_code + +.end_kernel +#endif diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Root_Mbaff_Y.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Root_Mbaff_Y.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Root_Mbaff_Y.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Root_Mbaff_Y.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,140 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +///////////////////////////////////////////////////////////////////////////////////// +// Kernel name: AVC_ILDB_Root_Mbaff.asm +// +// Root kernel serves as a scheduler for child threads. +// +// +// ***** Note ***** +// Initial design bundle MB pair for each thread, and share AVC_ILDB_MB_Dep_Check.asm +// with non mbaff kernels. +// +// Optimization will be done later, putting top and bottom MBs on separate threads. +// +// +///////////////////////////////////////////////////////////////////////////////////// +// +// $Revision: 1 $ +// $Date: 10/19/06 5:06p $ +// + +// ---------------------------------------------------- +// AVC_ILDB_ROOT_MBAFF_Y +// ---------------------------------------------------- +#define AVC_ILDB + +.kernel AVC_ILDB_ROOT_MBAFF_Y +#if defined(COMBINED_KERNEL) +ILDB_LABEL(AVC_ILDB_ROOT_Y): +#endif + +#include "SetupVPKernel.asm" +#include "AVC_ILDB.inc" + + +#if defined(_DEBUG) + +///////////////////////////////////////////////////////////////////////////////////// +// Init URB space for running on RTL. It satisfies reading an unwritten URB entries. +// Will remove it for production release. + + +//mov (8) m1:ud 0x11111111:ud +//mov (8) m2:ud 0x22222222:ud +//mov (8) m3:ud 0x33333333:ud +//mov (8) m4:ud 0x44444444:ud + +//mov (1) Temp1_W:w 0:w + +//ILDB_INIT_URB: +//mul (1) URBOffset:w Temp1_W:w 4:w +//shl (1) URBWriteMsgDescLow:uw URBOffset:w 4:w // Msg descriptor: URB write dest offset (9:4) +//mov (1) URBWriteMsgDescHigh:uw 0x0650:uw // Msg descriptor: URB write 5 MRFs (m0 - m4) +//#include "writeURB.asm" + +//add (1) Temp1_W:w Temp1_W:w 1:w // Increase block count +//cmp.l.f0.0 (1) null Temp1_W:w MBsCntY:w // Check the block count limit +//(f0.0) jmpi ILDB_INIT_URB // Loop back + +///////////////////////////////////////////////////////////////////////////////////// + + +mov (1) EntrySignature:w 0xEFF0:w + +#endif +//---------------------------------------------------------------------------------------------------------------- + +// Set global variable +mov (32) ChildParam:uw 0:uw // Reset local variables +//mul (1) TotalBlocks:w MBsCntX:w MBsCntY:w // Total # of MB pairs +//add (1) GatewayApertureE:w MBsCntY:w GatewayApertureB:w // Aperture End = aperture Head + BlockCntY + + +// 2 URB entries for Y: +// Entry 0 - Child thread R0Hdr +// Entry 1 - input parameter to child kernel (child r1) + +#undef URB_ENTRIES_PER_MB +#define URB_ENTRIES_PER_MB 2 + +// URB_ENTRIES_PER_MB in differnt form, the final desired format is (URB_ENTRIES_PER_MB-1) << 10 +mov (1) URB_EntriesPerMB_2:w URB_ENTRIES_PER_MB-1:w +shl (1) URB_EntriesPerMB_2:w URB_EntriesPerMB_2:w 10:w + +mov (1) ChildThreadsID:uw 1:uw // ChildThreadsID for chroma root + +shr (1) ThreadLimit:w MaxThreads:w 1:w // Initial luma thread limit to 50% +mul (1) TotalBlocks:w MBsCntX:w MBsCntY:w // MBs to be processed count down from TotalBlocks + +//***** Init CT_R0Hdr fields that are common to all threads ************************* +mov (8) CT_R0Hdr.0:ud r0.0<8;8,1>:ud // Init to root R0 header +mov (1) CT_R0Hdr.7:ud r0.6:ud // Copy Parent Thread Cnt; JJ did the change on 06/20/2006 +mov (1) CT_R0Hdr.31:ub 0:w // Reset the highest byte +mov (1) CT_R0Hdr.3:ud 0x00000000 +mov (1) CT_R0Hdr.6:uw sr0.0:uw // sr0.0: state reg contains general thread states, e.g. EUID/TID. + +//***** Init ChildParam fields that are common to all threads *********************** +mov (8) ChildParam<1>:ud RootParam<8;8,1>:ud // Copy all root parameters +mov (4) CurCol<1>:w 0:w // Reset CurCol, CurRow +add (2) LastCol<1>:w MBsCntX<2;2,1>:w -1:w // Get LastCol and LastRow + +mov (1) URBWriteMsgDesc:ud MSG_LEN(2)+URBWMSGDSC:ud + +//=================================================================================== + +#include "AVC_ILDB_OpenGateway.asm" // Open root thread gateway for receiving notification + +#if defined(DEV_CL) + mov (1) URBOffset:uw 240:uw // Use chroma URB offset to spawn chroma root +#else + mov (1) URBOffset:uw 320:uw // Use chroma URB offset to spawn chroma root +#endif + +#include "AVC_ILDB_SpawnChromaRoot.asm" // Spawn chroma root + +mov (1) URBOffset:uw 0:uw // Use luma URB offset to spawn luma child +mov (1) ChildThreadsID:uw 2:uw // Starting ChildThreadsID for luma child threads + +#include "AVC_ILDB_Dep_Check.asm" // Check dependency and spawn all MBs + +// Wait for UV root thread to finish +ILDB_LABEL(WAIT_FOR_UV): +cmp.l.f0.0 (1) null:w ThreadLimit:w MaxThreads:w +(f0.0) jmpi ILDB_LABEL(WAIT_FOR_UV) + +#include "AVC_ILDB_CloseGateway.asm" // Close root thread gateway + +END_THREAD // End of root thread + +#if !defined(COMBINED_KERNEL) // For standalone kernel only +.end_code + +.end_kernel +#endif diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Root_UV.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Root_UV.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Root_UV.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Root_UV.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,127 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Kernel name: AVC_ILDB_Root_UV.asm +// +// Root kernel serves as a scheduler for child threads +// +// $Revision: 1 $ +// $Date: 10/19/06 5:06p $ +// + +// ---------------------------------------------------- +// AVC_ILDB_ROOT_UV +// ---------------------------------------------------- +#define AVC_ILDB + +.kernel AVC_ILDB_ROOT_UV +#if defined(COMBINED_KERNEL) +ILDB_LABEL(AVC_ILDB_ROOT_UV): +#endif + +#include "SetupVPKernel.asm" +#include "AVC_ILDB.inc" + +#if defined(_DEBUG) +mov (1) EntrySignature:w 0xFF11:w +#endif + +///////////////////////////////////////////////////////////////////////////////////// +#if defined(_DEBUG) + +// Init URB space for running on RTL. It satisfies reading an unwritten URB entries. +// Will remove it for production release. + +mov (8) m1:ud 0x55555555:ud +mov (8) m2:ud 0x66666666:ud +mov (8) m3:ud 0x77777777:ud +mov (8) m4:ud 0x88888888:ud + +mov (1) Temp1_W:w MBsCntY:w +shl (1) Temp2_W:w MBsCntY:w 1:w + +ILDB_LABEL(ILDB_INIT_URB_UV): +mul (1) URBOffset:uw Temp1_W:uw 4:w // Each thread uses 4 URB entries (1 r0 + 1 inline + 2 data) +mov (1) URBWriteMsgDesc:ud MSG_LEN(4)+URBWMSGDSC:ud // Msg descriptor: URB write msg length = 5 +#include "writeURB.asm" + +add (1) Temp1_W:w Temp1_W:w 1:w // Increase block count +cmp.l.f0.0 (1) null Temp1_W:w Temp2_W:w // Check the block count limit +(f0.0) jmpi ILDB_LABEL(ILDB_INIT_URB_UV) // Loop back + +mov (1) EntrySignature:w 0xFFF0:w + +#endif +///////////////////////////////////////////////////////////////////////////////////// + +// Set global variable +mov (32) ChildParam:uw 0:uw // Reset local variables, 2 GRFs +//mul (1) TotalBlocks:w MBsCntX:w MBsCntY:w // Total # of blocks +//add (1) GatewayApertureE:w MBsCntY:w GatewayApertureB:w // Aperture End = aperture Head + BlockCntY + +// 4 URB entries for Y: +// Entry 0 - Child thread R0Hdr +// Entry 1 - input parameter to child kernel (child r1) +// Entry 2 - Prev MB data UV 2x8 +// Entry 3 - Unused + +#define URB_ENTRIES_PER_MB 4 + +// URB_ENTRIES_PER_MB in differnt form, the final desired format is (URB_ENTRIES_PER_MB-1) << 10 +mov (1) URB_EntriesPerMB_2:w URB_ENTRIES_PER_MB-1:w +shl (1) URB_EntriesPerMB_2:w URB_EntriesPerMB_2:w 10:w + +#define CHROMA_ROOT // Compiling flag for chroma only + +// URB base for UV kernels +#if defined(DEV_CL) + mov (1) URBOffsetUVBase:w 240:w +#else + mov (1) URBOffsetUVBase:w 320:w +#endif + + +mov (1) ChildThreadsID:uw 3:uw + +shr (1) ThreadLimit:w MaxThreads:w 1:w // Initial luma thread limit to 50% +mul (1) TotalBlocks:w MBsCntX:w MBsCntY:w // MBs to be processed count down from TotalBlocks + +//***** Init CT_R0Hdr fields that are common to all threads ************************* +mov (8) CT_R0Hdr.0:ud r0.0<8;8,1>:ud // Init to root R0 header +mov (1) CT_R0Hdr.7:ud r0.6:ud // Copy Parent Thread Cnt; JJ did the change on 06/20/2006 +mov (1) CT_R0Hdr.31:ub 0:w // Reset the highest byte +mov (1) CT_R0Hdr.3:ud 0x00000000 +mov (1) CT_R0Hdr.6:uw sr0.0:uw // sr0.0: state reg contains general thread states, e.g. EUID/TID. + +//***** Init ChildParam fields that are common to all threads *********************** +mov (8) ChildParam<1>:ud RootParam<8;8,1>:ud // Copy all root parameters +mov (4) CurCol<1>:w 0:w // Reset CurCol, CurRow, +add (2) LastCol<1>:w MBsCntX<2;2,1>:w -1:w // Get LastCol and LastRow + +mov (1) URBWriteMsgDesc:ud MSG_LEN(2)+URBWMSGDSC:ud + +//=================================================================================== + +#include "AVC_ILDB_OpenGateway.asm" // Open gateway for receiving notification + +#include "AVC_ILDB_Dep_Check.asm" // Check dependency and spawn all luma child threads in parallel with chroma root + +//#include "AVC_ILDB_LumaThrdLimit.asm" // Update thread limit in luma root thread via gateway + +#include "AVC_ILDB_CloseGateway.asm" // Close root thread gateway + +// Chroma root EOT = child send EOT : Request type = 1 + END_CHILD_THREAD + +#undef CHROMA_ROOT + +#if !defined(COMBINED_KERNEL) // For standalone kernel only +.end_code + +.end_kernel +#endif diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Root_Y.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Root_Y.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Root_Y.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Root_Y.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,130 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Kernel name: AVC_ILDB_Root_Y.asm +// +// Root kernel serves as a scheduler for child threads +// +// $Revision: 1 $ +// $Date: 10/19/06 5:06p $ +// + +// ---------------------------------------------------- +// AVC_ILDB_ROOT_Y +// ---------------------------------------------------- +#define AVC_ILDB + +.kernel AVC_ILDB_ROOT_Y +#if defined(COMBINED_KERNEL) +ILDB_LABEL(AVC_ILDB_ROOT_Y): +#endif + +#include "SetupVPKernel.asm" +#include "AVC_ILDB.inc" + +///////////////////////////////////////////////////////////////////////////////////// +#if defined(_DEBUG) + +// Init URB space for running on RTL. It satisfies reading an unwritten URB entries. +// Will remove it for production release. + +mov (8) m1:ud 0x11111111:ud +mov (8) m2:ud 0x22222222:ud +mov (8) m3:ud 0x33333333:ud +mov (8) m4:ud 0x44444444:ud + +mov (1) Temp1_W:w 0:w + +ILDB_LABEL(ILDB_INIT_URB_Y): +//mul (1) Temp2_W:w Temp1_W:w 4:w // URBOffset +//shl (1) URBWriteMsgDescLow:uw Temp2_W:w 4:w // Msg descriptor: URB write dest offset (9:4) +//mov (1) URBWriteMsgDescHigh:uw 0x0650:uw // Msg descriptor: URB write 5 MRFs (m0 - m4) + +//mul (1) URBOffset:uw Temp1_W:uw 4:w // Each thread uses 4 URB entries (1 r0 + 1 inline + 2 data) +mul (1) URBOffset:uw Temp1_W:uw 2:w // Each thread uses 2 URB entries (1 r0 + 1 inline) +mov (1) URBWriteMsgDesc:ud MSG_LEN(2)+URBWMSGDSC:ud // Msg descriptor: URB write msg length = 3 +#include "writeURB.asm" + +add (1) Temp1_W:w Temp1_W:w 1:w // Increase block count +cmp.l.f0.0 (1) null Temp1_W:w MBsCntY:w // Check the block count limit +(f0.0) jmpi ILDB_LABEL(ILDB_INIT_URB_Y) // Loop back + +mov (1) EntrySignature:w 0xFFF0:w + +#endif +///////////////////////////////////////////////////////////////////////////////////// + + +// Set global variable +mov (32) ChildParam:uw 0:uw // Reset local variables, 2 GRFs +//mul (1) TotalBlocks:w MBsCntX:w MBsCntY:w // Total # of blocks +//add (1) GatewayApertureE:w MBsCntY:w GatewayApertureB:w // Aperture End = aperture Head + BlockCntY + +// 4 URB entries for Y: +// Entry 0 - Child thread R0Hdr +// Entry 1 - input parameter to child kernel (child r1) +// Entry 2 - Prev MB data Y 4x16, col 1 and col 0 +// Entry 3 - Prev MB data Y 4x16, col 3 and col 2 + +#undef URB_ENTRIES_PER_MB +#define URB_ENTRIES_PER_MB 4 + +// URB_ENTRIES_PER_MB in differnt form, the final desired format is (URB_ENTRIES_PER_MB-1) << 10 +mov (1) URB_EntriesPerMB_2:w URB_ENTRIES_PER_MB-1:w +shl (1) URB_EntriesPerMB_2:w URB_EntriesPerMB_2:w 10:w + +shr (1) ThreadLimit:w MaxThreads:w 1:w // Initial luma thread limit to 50% +mul (1) TotalBlocks:w MBsCntX:w MBsCntY:w // MBs to be processed count down from TotalBlocks + +//***** Init CT_R0Hdr fields that are common to all threads ************************* +mov (8) CT_R0Hdr.0:ud r0.0<8;8,1>:ud // Init to root R0 header +mov (1) CT_R0Hdr.7:ud r0.6:ud // Copy Parent Thread Cnt; JJ did the change on 06/20/2006 +mov (1) CT_R0Hdr.31:ub 0:w // Reset the highest byte +mov (1) CT_R0Hdr.3:ud 0x00000000 +mov (1) CT_R0Hdr.6:uw sr0.0:uw // sr0.0: state reg contains general thread states, e.g. EUID/TID. + +//***** Init ChildParam fields that are common to all threads *********************** +mov (8) ChildParam<1>:ud RootParam<8;8,1>:ud // Copy all root parameters +mov (4) CurCol<1>:w 0:w // Reset CurCol, CurRow, +add (2) LastCol<1>:w MBsCntX<2;2,1>:w -1:w // Get LastCol and LastRow + +mov (1) URBWriteMsgDesc:ud MSG_LEN(2)+URBWMSGDSC:ud + +//=================================================================================== + +#include "AVC_ILDB_OpenGateway.asm" // Open gateway for receiving notification + +#if defined(DEV_CL) + mov (1) URBOffset:uw 240:uw // Use chroma URB offset to spawn chroma root +#else + mov (1) URBOffset:uw 320:uw // Use chroma URB offset to spawn chroma root +#endif + +#include "AVC_ILDB_SpawnChromaRoot.asm" // Spawn chroma root + +mov (1) URBOffset:uw 0:uw // Use luma URB offset to spawn luma child +mov (1) ChildThreadsID:uw 2:uw // Starting ChildThreadsID for luma child threads + +#include "AVC_ILDB_Dep_Check.asm" // Check dependency and spawn all luma child threads in parallel with chroma root + + +// Wait for UV root thread to finish +ILDB_LABEL(WAIT_FOR_UV): +cmp.l.f0.0 (1) null:w ThreadLimit:w MaxThreads:w +(f0.0) jmpi ILDB_LABEL(WAIT_FOR_UV) + + +#include "AVC_ILDB_CloseGateway.asm" // Close root thread gateway + +END_THREAD // End of root thread + +#if !defined(COMBINED_KERNEL) // For standalone kernel only +.end_code + +.end_kernel +#endif diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Spawn.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Spawn.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Spawn.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_Spawn.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,22 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +//=============== Spawn a child thread for a vertical child =============== + +#if defined(_DEBUG) + mov (1) EntrySignature:w 0x6666:w +#endif + + mul (1) URBOffset:uw CurRow:uw 2:w // 5:w // Each row uses 5 URB entries (R0, child R0, 3 GRFs of data from left MB) + + mov (8) CT_R0Hdr.0:ud r0.0<8;8,1>:ud // Init to root R0 header + + // R0.2: Interface Discriptor Ptr. Add offset 16 for next Interface Discriptor for child kernel + add (1) CT_R0Hdr.2:ud r0.2:ud IDesc_Child_Offset:w + + #include "AVC_ILDB_SpawnChild.asm" diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_SpawnChild.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_SpawnChild.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_SpawnChild.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_SpawnChild.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,55 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +//=============== Spawn a child thread for Luma or Chroma =============== + + //----- Create child thread R0 header ----- +#if defined(_DEBUG) + mov (1) EntrySignature:w 0xAAAA:w +#endif + + //***** Set CT_R0Hdr fields that change for every thread + + // Restore CT_R0Hdr.4:ud to r0.4:ud + mov (1) CT_R0Hdr.4:ud r0.4:ud + + // R0.2: Interface Discriptor Ptr. Add a child offset for child kernel +// add (1) CT_R0Hdr.2:ud r0.2:ud CHILD_OFFSET:w + + // Assign a new Thread Count for this child + mov (1) CT_R0Hdr.6:ud ChildThreadsID:uw + + //----- Prepare URB for launching a child thread ----- + mov (16) m2.0:w ChildParam<16;16,1>:w + + shr (1) MRF0.0:uw URBOffset:uw 1:w + + add (1) ChildThreadsID:uw ChildThreadsID:uw 2:uw // Luma child=even, chroma child=odd + + //-------------------------------------------------- +// #include "writeURB.asm" + send null:uw MRF0 null:ud URBWRITE URBWriteMsgDesc:ud // URB write + + //-------------------------------------------------- + // Set URB handle for child thread launching: + // URB handle Length (bit 15:10) - 0000 0000 0000 0000 yyyy yy00 0000 0000 + // URB handle offset (bit 9:0) - 0000 0000 0000 0000 0000 00xx xxxx xxxx + + or (1) CT_R0Hdr.4:ud URB_EntriesPerMB_2:w URBOffset:uw + + // 2 URB entries: + // Entry 0 - CT_R0Hdr + // Entry 1 - input parameter to child kernel + + //----- Spawn a child now ----- + send (8) null:ud CT_R0Hdr null:ud TS TSMSGDSC +// send (8) null:ud CT_Spawn_Reg null:ud 0x07100001 + + + // Restore CT_R0Hdr.4:ud to r0.4:ud for next use +// mov (1) CT_R0Hdr.4:ud r0.4:ud diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_SpawnChromaRoot.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_SpawnChromaRoot.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_SpawnChromaRoot.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/AVC_ILDB_SpawnChromaRoot.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,47 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +//=============== Spawn a chroma root thread =============== + + //----- Create chroma root thread R0 header ----- +#if defined(_DEBUG) + mov (1) EntrySignature:w 0xAABA:w +#endif + + + + // Restore CT_R0Hdr.4:ud to r0.4:ud +// mov (1) CT_R0Hdr.4:ud r0.4:ud + + // R0.2: Interface Discriptor Ptr. Add child offset for child kernel + add (1) CT_R0Hdr.2:ud r0.2:ud CHROMA_ROOT_OFFSET:w + + // Assign a new Thread Count for this child + mov (1) CT_R0Hdr.6:ud 1:w // ThreadID=1 for chroma root + + //----- Copy luma root r1 for launching chroma root thread ----- + mov (16) m2.0:w RootParam<16;16,1>:w + + #include "writeURB.asm" + + //-------------------------------------------------- + // Set URB handle for child thread launching: + // URB handle Length (bit 15:10) - 0000 0000 0000 0000 yyyy yy00 0000 0000 + // URB handle offset (bit 9:0) - 0000 0000 0000 0000 0000 00xx xxxx xxxx + + or (1) CT_R0Hdr.4:ud URB_EntriesPerMB_2:w URBOffset:uw + + // 2 URB entries: + // Entry 0 - CT_R0Hdr + // Entry 1 - input parameter to child kernel + + //----- Spawn a child now ----- + send (8) null:ud CT_R0Hdr null:ud TS TSMSGDSC + + // Restore CT_R0Hdr.4:ud to r0.4:ud for next use + mov (1) CT_R0Hdr.4:ud r0.4:ud diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/Child_Undefs.inc libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/Child_Undefs.inc --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/Child_Undefs.inc 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/Child_Undefs.inc 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,24 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Modual name: Child_Undefs.inc +// +// Undefine global symbols for new process in child thread +// + +#undef P1 +#undef P2 +#undef P3 +#undef P4 +#undef P5 +#undef P6 +#undef P7 +#undef P8 +#undef EDGECNTLMAP +#undef CLIP_NEGATIVE +#undef CLIP_DONE diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/ILDB_header.inc libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/ILDB_header.inc --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/ILDB_header.inc 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/ILDB_header.inc 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,306 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +#if !defined(__ILDB_HEADER__) // Make sure this file is only included once +#define __ILDB_HEADER__ + +// Module name: ILDB_header.inc +// + +.default_execution_size (16) +.default_register_type :ub + +#undef NULLREG +#undef RETURN_REG +#undef EOTMSGDSC +#undef MSGSRC +#undef END_THREAD +#undef TSMSGDSC + +// ----------- Common constant definitions ------------ +// +// Bit position constants +// +#define BIT0 0x01 +#define BIT1 0x02 +#define BIT2 0x04 +#define BIT3 0x08 +#define BIT4 0x10 +#define BIT5 0x20 +#define BIT6 0x40 +#define BIT7 0x80 +#define BIT8 0x0100 +#define BIT9 0x0200 +#define BIT10 0x0400 +#define BIT11 0x0800 +#define BIT12 0x1000 +#define BIT13 0x2000 +#define BIT14 0x4000 +#define BIT15 0x8000 +#define BIT16 0x00010000 +#define BIT17 0x00020000 +#define BIT18 0x00040000 +#define BIT19 0x00080000 +#define BIT20 0x00100000 +#define BIT21 0x00200000 +#define BIT22 0x00400000 +#define BIT23 0x00800000 +#define BIT24 0x01000000 +#define BIT25 0x02000000 +#define BIT26 0x04000000 +#define BIT27 0x08000000 +#define BIT28 0x10000000 +#define BIT29 0x20000000 +#define BIT30 0x40000000 +#define BIT31 0x80000000 + +// Common constants +// +#define INST_SIZE 16 // Instruction size in byte + +#define GRFWIB 32 // GRF register width in byte +#define GRFWIW 16 // GRF register width in word +#define GRFWID 8 // GRF register width in dword + +#define TOP_FIELD 0 +#define BOTTOM_FIELD 1 + +#define PREVIOUS_FRAME 0 // Previous frame +#define CURRENT_FRAME 1 // Current frame +#define NEXT_FRAME 2 // Next frame + +#define Y_ROW_WIDTH 16 // in bytes +#define UV_ROW_WIDTH 8 + +// Useful macros +// +#define REGION(Width,HStride) // Region definition when ExecSize = Width + +#define NULLREG null<1>:d +#define NULLREGW null<1>:w + +#define RETURN_REG r62 // Return pointer for all sub-routine calls (type DWORD) + +#define CALL(subFunc, skipInst) add (1) RETURN_REG<1>:ud ip:ud (1+skipInst)*INST_SIZE \n\ + jmpi (1) subFunc + +#define RETURN mov (1) ip:ud RETURN_REG<0;1,0>:ud // Return to calling module + +#define PRED_CALL(flag, subFunc, skipInst) add (1) RETURN_REG<1>:ud ip:ud (1+skipInst)*INST_SIZE \n\ + (flag) jmpi (1) subFunc + + +// Definitions for surface states, GRF regions, and common data fields +// +// Note: Each kernel needs to define a specific symbol before including this +// header file to ensure correct definitions. +// + + + +#if defined(AVC_ILDB) + +.reg_count_total 64 +.reg_count_payload 4 + + // Binding Table Index + #define BI_CNTRL_DATA 0 // Control data map + #define BI_SRC_Y 1 + #define BI_SRC_UV 2 + #define BI_DEST_Y 3 + #define BI_DEST_UV 4 + + + //========== Left MB, 4x16 in r2 and r3 ========== + #define PREV_MB_Y_BASE 64 //2*GRFWIB // Byte offset to r2 + .declare PREV_MB_YD Base=r2 ElementSize=4 SrcRegion=REGION(8,1) Type=ud + .declare PREV_MB_YW Base=r2 ElementSize=2 SrcRegion=REGION(8,1) Type=uw + .declare PREV_MB_YB Base=r2 ElementSize=1 SrcRegion=REGION(16,1) Type=ub + + #define PREV_MB_U_BASE 64 //2*GRFWIB // seperate thread from Y // Byte offset to r2 + .declare PREV_MB_UD Base=r2 ElementSize=4 SrcRegion=REGION(8,1) Type=ud + .declare PREV_MB_UW Base=r2 ElementSize=2 SrcRegion=REGION(16,1) Type=uw + .declare PREV_MB_UB Base=r2 ElementSize=1 SrcRegion=REGION(16,1) Type=ub + + #define PREV_MB_V_BASE 65 //2*GRFWIB+1 // NV12 // Byte offset to r2.1 + .declare PREV_MB_VB Base=r2.1 ElementSize=1 SrcRegion=REGION(16,1) Type=ub + + //========== Top MB, 16x4 in r4 and r5 ========== + #define TOP_MB_Y_BASE 128 //4*GRFWIB // Byte offset to r4 + .declare TOP_MB_YD Base=r4 ElementSize=4 SrcRegion=REGION(8,1) Type=ud + .declare TOP_MB_YW Base=r4 ElementSize=2 SrcRegion=REGION(8,1) Type=uw + .declare TOP_MB_YB Base=r4 ElementSize=1 SrcRegion=REGION(16,1) Type=ub + + #define TOP_MB_U_BASE 128 //4*GRFWIB // seperate thread from Y // Byte offset to r4 + .declare TOP_MB_UD Base=r4 ElementSize=4 SrcRegion=REGION(8,1) Type=ud + .declare TOP_MB_UW Base=r4 ElementSize=2 SrcRegion=REGION(16,1) Type=uw + .declare TOP_MB_UB Base=r4 ElementSize=1 SrcRegion=REGION(16,1) Type=ub + + #define TOP_MB_V_BASE 129 //4*GRFWIB+1 // NV12 // Byte offset to r4.1 + .declare TOP_MB_VB Base=r4.1 ElementSize=1 SrcRegion=REGION(16,1) Type=ub + + + //========== Current MB, 16x16 in r6-r13 ========== + #define SRC_MB_Y_BASE 192 //6*GRFWIB // Byte offset to r6 + .declare SRC_YD Base=r6 ElementSize=4 SrcRegion=REGION(8,1) Type=ud // For read and write, 8 GRFs + .declare SRC_YW Base=r6 ElementSize=2 SrcRegion=REGION(8,1) Type=uw + .declare SRC_YB Base=r6 ElementSize=1 SrcRegion=REGION(16,1) Type=ub // 8 GRFs + + #define SRC_MB_U_BASE 192 //6*GRFWIB // seperate thread from Y // Byte offset to r6 + .declare SRC_UD Base=r6 ElementSize=4 SrcRegion=REGION(8,1) Type=ud // For read and write, 2 GRFs + .declare SRC_UW Base=r6 ElementSize=2 SrcRegion=REGION(16,1) Type=uw // For read and write, 4 GRFs + .declare SRC_UB Base=r6 ElementSize=1 SrcRegion=REGION(16,1) Type=ub // 2 GRFs + + #define SRC_MB_V_BASE 193 // 6*GRFWIB+1 // NV12 // Byte offset to r6.1 + .declare SRC_VD Base=r6.1 ElementSize=4 SrcRegion=REGION(8,1) Type=ud // For read and write, 2 GRFs + .declare SRC_VW Base=r6.1 ElementSize=2 SrcRegion=REGION(16,1) Type=uw // For read and write, 4 GRFs + .declare SRC_VB Base=r6.1 ElementSize=1 SrcRegion=REGION(16,1) Type=ub // 2 GRFs + +#else // No kernel specified, define nothing. + +.reg_count_total 64 +.reg_count_payload 2 + + #define SRCAOFF r1.0:ud // Offset into alpha data + #define SRCOFF r1.1:ud // Offset into source YUV data + #define ORIX r1.4 // :w, H. origin of the destination block in pel + #define ORIY r1.5 // :w, V. origin of the destination block in pel + +#endif + +// ----------- Message Payload Header fields------------ +// +#define IDP r0.2:ud // Interface Descriptor Pointer +#define BTP r0.4:ud // Binding Table Pointer + +// ----------- Common Message Descriptor ------------ +// +#ifdef DEV_ILK +#define GW_DCN // Should be enabled only for ILK-B0 and beyond +#define MSG_GW 0x03 // Message Gateway +#define MSG_GW_EOT 0x23 // Message Gateway plus EOT bit set (For ILK only) +#define DAPREAD 0x04 // Data Port Read Extended Message Descriptor, +#define DAPWRITE 0x05 // Data Port Write Extended Message Descriptor, +#define URBWRITE 0x06 // URB +#define TS 0x07 // Thread Spawner Extended Message Descriptor +#define TS_EOT 0x27 // End of Thread Extended Message Descriptor + +#define EOTMSGDSC 0x02000000 // End of Thread Message Descriptor /w URB handle dereferenced (used by root kernel) +#define CHILD_EOTMSGDSC 0x02000012 // End of Child Thread Message Descriptor w/o URB handle dereferenced + +// Data Port Message Descriptor +#define DWBRMSGDSC_RC 0x02086000 // DWORD Block Read Message Descriptor, reading from render cache = 6. +#define DWBRMSGDSC_RC_TF 0x02086600 // DWORD Block Read Message Descriptor, reading from render cache = 6. +#define DWBRMSGDSC_RC_BF 0x02086700 // DWORD Block Read Message Descriptor, reading from render cache = 6. +#define DWBRMSGDSC_SC 0x0208A000 // DWORD Block Read Message Descriptor, reading from sampler cache = A. +#define DWBRMSGDSC_SC_TF 0x0208E600 // DWORD Block Read Message Descriptor, reading top field from field mode sampler cache. +#define DWBRMSGDSC_SC_BF 0x0208E700 // DWORD Block Read Message Descriptor, reading bottom field from field mode sampler cache. + +#define ILDBRMSGDSC 0x02085800 // AVC ILDB Control Data Read Msg Desc on Bearlake-C + +#define DWBWMSGDSC 0x02082000 // DWORD Block Write Message Descriptor +#define DWBWMSGDSC_WC 0x0218A000 // DWORD Block Write Message Descriptor + write commit + +// URB Message Descriptor +#define URBWMSGDSC 0x02080000 // URB Write Message Descriptor + +// Thread Spawner Message Descriptor +#define TSMSGDSC 0x02000001 + +// Message Gateway Message Descriptors +#define OGWMSGDSC 0x02000000 // OpenGateway Message Descriptor +#define CGWMSGDSC 0x02000001 // CloseGateway Message Descriptor +#define FWDMSGDSC 0x02000002 // ForwardMsg Message Descriptor +#define NOTIFYMSG 0x00008000 // Send notification with ForwardMsg message + +#define RESP_LEN(len) 0x100000*len +#define MSG_LEN(len) 0x2000000*len + +#else // Pre DEV_ILK + +#define MSG_GW +#define MSG_GW_EOT +#define DAPREAD +#define DAPWRITE +#define URBWRITE +#define TS +#define TS_EOT + +#define EOTMSGDSC 0x87100000 // End of Thread Message Descriptor /w URB handle dereferenced (used by root kernel) +#define CHILD_EOTMSGDSC 0x87100012 // End of Child Thread Message Descriptor w/o URB handle dereferenced + +// Data Port Message Descriptor +#define DWBRMSGDSC_RC 0x04106000 // DWORD Block Read Message Descriptor, reading from render cache = 6. +#define DWBRMSGDSC_RC_TF 0x04106600 // DWORD Block Read Message Descriptor, reading from render cache = 6. +#define DWBRMSGDSC_RC_BF 0x04106700 // DWORD Block Read Message Descriptor, reading from render cache = 6. +#define DWBRMSGDSC_SC 0x0410A000 // DWORD Block Read Message Descriptor, reading from sampler cache = A. +#define DWBRMSGDSC_SC_TF 0x0410A600 // DWORD Block Read Message Descriptor, reading top field from field mode sampler cache. +#define DWBRMSGDSC_SC_BF 0x0410A700 // DWORD Block Read Message Descriptor, reading bottom field from field mode sampler cache. + +#define ILDBRMSGDSC 0x04105800 // AVC ILDB Control Data Read Msg Desc on Bearlake-C + +#define DWBWMSGDSC 0x05102000 // DWORD Block Write Message Descriptor +#define DWBWMSGDSC_WC 0x0511A000 // DWORD Block Write Message Descriptor + write commit + +// URB Message Descriptor +#define URBWMSGDSC 0x06100000 // URB Write Message Descriptor + +// Thread Spawner Message Descriptor +#define TSMSGDSC 0x07100001 + +// Message Gateway Message Descriptors +#define OGWMSGDSC 0x03100000 // OpenGateway Message Descriptor +#define CGWMSGDSC 0x03100001 // CloseGateway Message Descriptor +#define FWDMSGDSC 0x03100002 // ForwardMsg Message Descriptor +#define NOTIFYMSG 0x00008000 // Send notification with ForwardMsg message + +#define RESP_LEN(len) 0x10000*len +#define MSG_LEN(len) 0x100000*len + +// bits 15 - 0 = 01 011 000 00000000 = 0101 1000 0000 0000 = 5800 +// Render cache, AVC loop rd, +#endif // DEV_ILK + +// Enable frame/field selection in message descriptor +#define ENMSGDSCFM 0x400 // Enable MSGDSC to select frame surface +#define ENMSGDSCTF 0x600 // Enable MSGDSC to select top field surface +#define ENMSGDSCBF 0x700 // Enable MSGDSC to select bottom field surface + +#define END_THREAD send (8) NULLREG MSGHDR r0:ud TS_EOT EOTMSGDSC +#define END_CHILD_THREAD send (8) NULLREG MSGHDR r0:ud TS_EOT CHILD_EOTMSGDSC + +// ----------- Message related register ------------ +// +#define MSGHDR m1 // Message Payload Header +#define MSGHDRY m1 // Message Payload Header register for Y data +#define MSGHDRU m2 // Message Payload Header register for U data +#define MSGHDRV m3 // Message Payload Header register for V data + +#define MSGHDRC m1 // Message Payload Header register for CUR MB +#define MSGHDRL m2 // Message Payload Header register for LEFT MB +#define MSGHDRT m3 // Message Payload Header register for TOP MB + +#define MSGHDRYA m4 // Second Message Payload Header register for Y data +#define MSGSRC r63 // Message source register +#define MSGDSC a0.0:ud // Message Descriptor register (type DWORD) + +#define MH_ORI MSGSRC.0 // DWORD block R/W message header block offset +#define MH_ORIX MSGSRC.0 // DWORD block R/W message header X offset +#define MH_ORIY MSGSRC.1 // DWORD block R/W message header Y offset +#define MH_SIZE MSGSRC.2 // DWORD block R/W message header block width & height + + +// M2 - M9 for message data payload +.declare MSGPAYLOADB Base=m2 ElementSize=1 SrcRegion=REGION(16,1) Type=ub +.declare MSGPAYLOADW Base=m2 ElementSize=2 SrcRegion=REGION(16,1) Type=uw +.declare MSGPAYLOADD Base=m2 ElementSize=4 SrcRegion=REGION(8,1) Type=ud +.declare MSGPAYLOADF Base=m2 ElementSize=4 SrcRegion=REGION(8,1) Type=f + +// End of ILDB_header.inc + +#endif // !defined(__ILDB_HEADER__) diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/load_Cur_UV_8x8T.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/load_Cur_UV_8x8T.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/load_Cur_UV_8x8T.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/load_Cur_UV_8x8T.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,65 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Module name: load_Cur_UV_8x8T.asm +// +// Load and transpose UV 8x8 block (NV12: 8x8U and 8x8V mixed) +// +//---------------------------------------------------------------- +// Symbols need to be defined before including this module +// +// Source region in :ud +// SRC_UD: SRC_UD Base=rxx ElementSize=4 SrcRegion=REGION(8,1) Type=ud (U+V for NV12) // 4 GRFs +// +// Binding table index: +// BI_SRC_UV: Binding table index of UV surface (NV12) +// +//---------------------------------------------------------------- + +#if defined(_DEBUG) + mov (1) EntrySignatureC:w 0xDDD1:w +#endif + + // Read U+V blk +#if defined(_PROGRESSIVE) + mov (1) MSGSRC.0:ud ORIX_CUR:w { NoDDClr } // Block origin + asr (1) MSGSRC.1:ud ORIY_CUR:w 1:w { NoDDClr, NoDDChk } // NV12 U+V block origin y = half of Y comp + mov (1) MSGSRC.2:ud 0x0007000F:ud { NoDDChk } // NV12 U+V block width and height (16x8 bytes) + + //send (8) SRC_UD(0)<1> MSGHDRU MSGSRC<8;8,1>:ud DWBRMSGDSC_SC+0x00040000+BI_SRC_UV + mov (1) MSGDSC RESP_LEN(4)+DWBRMSGDSC_SC+BI_SRC_UV:ud +#endif + +#if defined(_FIELD) +// cmp.z.f0.0 (1) NULLREGW PicTypeC:w 0:w // Get pic type flag + and.nz.f0.1 (1) NULLREGW BitFields:w BotFieldFlag:w // Get bottom field flag + // they are used later in this file + + mov (1) MSGSRC.0:ud ORIX_CUR:w { NoDDClr } // Block origin + asr (1) MSGSRC.1:ud ORIY_CUR:w 1:w { NoDDClr, NoDDChk } // NV12 U+V block origin y = half of Y comp + mov (1) MSGSRC.2:ud 0x0007000F:ud { NoDDChk } // NV12 U+V block width and height (16x8 bytes) + + // Set message descriptor + + // Frame picture +// (f0.0) mov (1) MSGDSC RESP_LEN(4)+DWBRMSGDSC_SC+BI_SRC_UV:ud // Read 4 GRFs from SRC_UV +// (f0.0) jmpi load_UV_8x8T + + // Field picture + (f0.1) mov (1) MSGDSC RESP_LEN(4)+DWBRMSGDSC_SC_BF+BI_SRC_UV:ud // Read 4 GRFs from SRC_UV bottom field + (-f0.1) mov (1) MSGDSC RESP_LEN(4)+DWBRMSGDSC_SC_TF+BI_SRC_UV:ud // Read 4 GRFs from SRC_UV top field + +//load_UV_8x8T: + +#endif + + send (8) SRC_UD(0)<1> MSGHDRU MSGSRC<8;8,1>:ud DAPREAD MSGDSC + +// #include "Transpose_Cur_UV_8x8.asm" + +// End of load_UV_8x8T diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/load_Cur_UV_8x8T_Mbaff.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/load_Cur_UV_8x8T_Mbaff.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/load_Cur_UV_8x8T_Mbaff.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/load_Cur_UV_8x8T_Mbaff.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,62 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Module name: load_Cur_UV_8x8T.asm +// +// Load and transpose UV 8x8 block (NV12: 8x8U and 8x8V mixed) +// +//---------------------------------------------------------------- +// Symbols need to be defined before including this module +// +// Source region in :ud +// SRC_UD: SRC_UD Base=rxx ElementSize=4 SrcRegion=REGION(8,1) Type=ud (U+V for NV12) // 4 GRFs +// +// Binding table index: +// BI_SRC_UV: Binding table index of UV surface (NV12) +// +//---------------------------------------------------------------- + +#if defined(_DEBUG) + mov (1) EntrySignatureC:w 0xDDD1:w +#endif + // FieldModeCurrentMbFlag determines how to access left MB + and.z.f0.0 (1) null:w r[ECM_AddrReg, BitFlags]:ub FieldModeCurrentMbFlag:w + + and.nz.f0.1 (1) NULLREGW BitFields:w BotFieldFlag:w // Get bottom field flag + + // Read U+V + mov (1) MSGSRC.0:ud ORIX_CUR:w { NoDDClr } // Block origin + asr (1) MSGSRC.1:ud ORIY_CUR:w 1:w { NoDDClr, NoDDChk } // NV12 U+V block origin y = half of Y comp + mov (1) MSGSRC.2:ud 0x0007000F:ud { NoDDChk } // NV12 U+V block width and height (16x8 bytes) + + // Set message descriptor + + (f0.0) if (1) ILDB_LABEL(ELSE_UV_8X8T) + + // Frame picture + mov (1) MSGDSC RESP_LEN(4)+DWBRMSGDSC_SC+BI_SRC_UV:ud // Read 4 GRFs from SRC_UV + + (f0.1) add (1) MSGSRC.1:d MSGSRC.1:d 8:w // Add vertical offset 8 for bot MB in MBAFF mode + +ILDB_LABEL(ELSE_UV_8X8T): + else (1) ILDB_LABEL(ENDIF_UV_8X8T) + + // Field picture + (f0.1) mov (1) MSGDSC RESP_LEN(4)+DWBRMSGDSC_SC_BF+BI_SRC_UV:ud // Read 4 GRFs from SRC_UV bottom field + (-f0.1) mov (1) MSGDSC RESP_LEN(4)+DWBRMSGDSC_SC_TF+BI_SRC_UV:ud // Read 4 GRFs from SRC_UV top field + + asr (1) MSGSRC.1:d MSGSRC.1:d 1:w // Reduce y by half in field access mode + + endif +ILDB_LABEL(ENDIF_UV_8X8T): + + send (8) SRC_UD(0)<1> MSGHDRU MSGSRC<8;8,1>:ud DAPREAD MSGDSC + +// #include "Transpose_Cur_UV_8x8.asm" + +// End of load_UV_8x8T diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/load_Cur_UV_Right_Most_2x8.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/load_Cur_UV_Right_Most_2x8.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/load_Cur_UV_Right_Most_2x8.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/load_Cur_UV_Right_Most_2x8.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,61 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Module Name: Load_Cur_UV_Right_Most_2X8.Asm + +#if defined(_DEBUG) + mov (1) EntrySignatureC:w 0xDDD0:w +#endif + +#if defined(_PROGRESSIVE) + // Read U+V, (UV MB size = 16x8) + add (1) MSGSRC.0:ud ORIX_CUR:w 12:w { NoDDClr } // Block origin + asr (1) MSGSRC.1:ud ORIY_CUR:w 1:w { NoDDClr, NoDDChk } // NV12 U+V block origin y = half of Y comp + mov (1) MSGSRC.2:ud 0x00070003:ud { NoDDChk } // NV12 U+V block width and height (4x8) + send (8) LEFT_TEMP_D(0)<1> MSGHDRU MSGSRC<8;8,1>:ud DAPREAD RESP_LEN(1)+DWBRMSGDSC_RC+BI_DEST_UV +#endif + +#if defined(_FIELD) || defined(_MBAFF) + + // FieldModeCurrentMbFlag determines how to access left MB + and.z.f0.0 (1) null:w r[ECM_AddrReg, BitFlags]:ub FieldModeCurrentMbFlag:w + + and.nz.f0.1 (1) NULLREGW BitFields:w BotFieldFlag:w // Get bottom field flag + + // Read U+V + add (1) MSGSRC.0:ud ORIX_CUR:w 12:w { NoDDClr } // Block origin + asr (1) MSGSRC.1:ud ORIY_CUR:w 1:w { NoDDClr, NoDDChk } // NV12 U+V block origin y = half of Y comp + mov (1) MSGSRC.2:ud 0x00070003:ud { NoDDChk } // NV12 U+V block width and height (4x8) + + // Load NV12 U+V + + // Set message descriptor + + (f0.0) if (1) ILDB_LABEL(ELSE_Y_2x8T) + + // Frame picture + mov (1) MSGDSC RESP_LEN(1)+DWBRMSGDSC_RC+BI_DEST_UV:ud // Read 1 GRF from SRC_UV + + (f0.1) add (1) MSGSRC.1:d MSGSRC.1:d 8:w // Add vertical offset 8 for bot MB in MBAFF mode + +ILDB_LABEL(ELSE_Y_2x8T): + else (1) ILDB_LABEL(ENDIF_Y_2x8T) + + // Field picture + (f0.1) mov (1) MSGDSC RESP_LEN(1)+DWBRMSGDSC_RC_BF+BI_DEST_UV:ud // Read 1 GRF from SRC_Y bottom field + (-f0.1) mov (1) MSGDSC RESP_LEN(1)+DWBRMSGDSC_RC_TF+BI_DEST_UV:ud // Read 1 GRF from SRC_Y top field + + endif +ILDB_LABEL(ENDIF_Y_2x8T): + + // Read 1 GRF from DEST surface as the above MB has been deblocked. +// send (8) BUF_D(0)<1> MSGHDRU MSGSRC<8;8,1>:ud MSGDSC + send (8) LEFT_TEMP_D(0)<1> MSGHDRU MSGSRC<8;8,1>:ud DAPREAD MSGDSC + +#endif + diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/load_Cur_Y_16x16T.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/load_Cur_Y_16x16T.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/load_Cur_Y_16x16T.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/load_Cur_Y_16x16T.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,63 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Module name: load_Y_16x16T.asm +// +// Load and transpose Y 16x16 block +// +//---------------------------------------------------------------- +// Symbols need to be defined before including this module +// +// Source region in :ud +// SRC_YD: SRC_YD Base=rxx ElementSize=4 SrcRegion=REGION(8,1) Type=ud // 8 GRFs +// +// Binding table index: +// BI_SRC_Y: Binding table index of Y surface +// +//---------------------------------------------------------------- + +#if defined(_DEBUG) + mov (1) EntrySignatureC:w 0xDDD1:w +#endif + // Read Y + +#if defined(_PROGRESSIVE) + mov (2) MSGSRC.0<1>:ud ORIX_CUR<2;2,1>:w { NoDDClr } // Block origin + mov (1) MSGSRC.2<1>:ud 0x000F000F:ud { NoDDChk } // Block width and height (16x16) + + //send (8) SRC_YD(0)<1> MSGHDRC MSGSRC<8;8,1>:ud DWBRMSGDSC_SMPLR+0x00080000+BI_SRC_Y + mov (1) MSGDSC RESP_LEN(8)+DWBRMSGDSC_SC+BI_SRC_Y:ud +#endif + + +#if defined(_FIELD) +// cmp.z.f0.0 (1) NULLREGW PicTypeC:w 0:w // Get pic type flag + and.nz.f0.1 (1) NULLREGW BitFields:w BotFieldFlag:w // Get bottom field flag + // they are used later in this file + + mov (2) MSGSRC.0<1>:ud ORIX_CUR<2;2,1>:w { NoDDClr } // Block origin + mov (1) MSGSRC.2<1>:ud 0x000F000F:ud { NoDDChk } // Block width and height (16x16) + + // Set message descriptor + // Frame picture +// (f0.0) mov (1) MSGDSC RESP_LEN(8)+DWBRMSGDSC_SC+BI_SRC_Y:ud // Read 8 GRFs from SRC_Y +// (f0.0) jmpi load_Y_16x16T + + // Non frame picture + (f0.1) mov (1) MSGDSC RESP_LEN(8)+DWBRMSGDSC_SC_BF+BI_SRC_Y:ud // Read 8 GRFs from SRC_Y bottom field + (-f0.1) mov (1) MSGDSC RESP_LEN(8)+DWBRMSGDSC_SC_TF+BI_SRC_Y:ud // Read 8 GRFs from SRC_Y top field + +//load_Y_16x16T: + +#endif + + send (8) SRC_YD(0)<1> MSGHDRC MSGSRC<8;8,1>:ud DAPREAD MSGDSC + +// #include "Transpose_Cur_Y_16x16.asm" + +// End of load_Y_16x16T diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/load_Cur_Y_16x16T_Mbaff.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/load_Cur_Y_16x16T_Mbaff.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/load_Cur_Y_16x16T_Mbaff.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/load_Cur_Y_16x16T_Mbaff.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,62 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Module name: load_Y_16x16T.asm +// +// Load and transpose Y 16x16 block +// +//---------------------------------------------------------------- +// Symbols need to be defined before including this module +// +// Source region in :ud +// SRC_YD: SRC_YD Base=rxx ElementSize=4 SrcRegion=REGION(8,1) Type=ud // 8 GRFs +// +// Binding table index: +// BI_SRC_Y: Binding table index of Y surface +// +//---------------------------------------------------------------- + +#if defined(_DEBUG) + mov (1) EntrySignatureC:w 0xDDD1:w +#endif + + // FieldModeCurrentMbFlag determines how to access left MB + and.z.f0.0 (1) null:w r[ECM_AddrReg, BitFlags]:ub FieldModeCurrentMbFlag:w + + and.nz.f0.1 (1) NULLREGW BitFields:w BotFieldFlag:w // Get bottom field flag + + // Read Y + mov (2) MSGSRC.0<1>:d ORIX_CUR<2;2,1>:w { NoDDClr } // Block origin + mov (1) MSGSRC.2<1>:ud 0x000F000F:ud { NoDDChk } // Block width and height (16x16) + + // Set message descriptor, etc. + + (f0.0) if (1) ILDB_LABEL(ELSE_Y_16x16T) + + // Frame picture + mov (1) MSGDSC RESP_LEN(8)+DWBRMSGDSC_SC+BI_SRC_Y:ud // Read 8 GRFs from SRC_Y + + (f0.1) add (1) MSGSRC.1:d MSGSRC.1:d 16:w // Add vertical offset 16 for bot MB in MBAFF mode + +ILDB_LABEL(ELSE_Y_16x16T): + else (1) ILDB_LABEL(ENDIF_Y_16x16T) + + // Field picture + (f0.1) mov (1) MSGDSC RESP_LEN(8)+DWBRMSGDSC_SC_BF+BI_SRC_Y:ud // Read 8 GRFs from SRC_Y bottom field + (-f0.1) mov (1) MSGDSC RESP_LEN(8)+DWBRMSGDSC_SC_TF+BI_SRC_Y:ud // Read 8 GRFs from SRC_Y top field + + asr (1) MSGSRC.1:d MSGSRC.1:d 1:w // Reduce y by half in field access mode + + endif +ILDB_LABEL(ENDIF_Y_16x16T): + + send (8) SRC_YD(0)<1> MSGHDRY MSGSRC<8;8,1>:ud DAPREAD MSGDSC + +// #include "Transpose_Cur_Y_16x16.asm" + +// End of load_Y_16x16T diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/load_Cur_Y_Right_Most_4x16.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/load_Cur_Y_Right_Most_4x16.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/load_Cur_Y_Right_Most_4x16.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/load_Cur_Y_Right_Most_4x16.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,85 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Module name: load_Cur_Y_Right_Most_4x16.asm +// +// Load luma cur MB right most 4x16 into LEFT_TEMP_B + +#if defined(_DEBUG) + mov (1) EntrySignatureC:w 0xDDD0:w +#endif + + +#if defined(_PROGRESSIVE) + // Read Y + add (1) MSGSRC.0<1>:ud ORIX_CUR:w 12:w { NoDDClr } // Block origin, move right 12 bytes + mov (1) MSGSRC.1<1>:ud ORIY_CUR:w { NoDDClr, NoDDChk } // Block origin + mov (1) MSGSRC.2<1>:ud 0x000F0003:ud { NoDDChk } // Block width and height (4x16) + send (8) LEFT_TEMP_D(0)<1> MSGHDRL MSGSRC<8;8,1>:ud DAPREAD RESP_LEN(2)+DWBRMSGDSC_RC+BI_DEST_Y +#endif + + +#if defined(_FIELD) || defined(_MBAFF) + + // FieldModeCurrentMbFlag determines how to access left MB + and.z.f0.0 (1) null:w r[ECM_AddrReg, BitFlags]:ub FieldModeCurrentMbFlag:w + + and.nz.f0.1 (1) NULLREGW BitFields:w BotFieldFlag:w // Get bottom field flag + + // Read Y + add (1) MSGSRC.0<1>:ud ORIX_CUR:w 12:w { NoDDClr } // Block origin, move right 12 bytes + mov (1) MSGSRC.1<1>:ud ORIY_CUR:w { NoDDClr, NoDDChk } // Block origin + mov (1) MSGSRC.2<1>:ud 0x000F0003:ud { NoDDChk } // Block width and height (4x16) + + // Set message descriptor, etc. + + (f0.0) if (1) ILDB_LABEL(ELSE_Y_4x16T) + + // Frame picture + mov (1) MSGDSC RESP_LEN(2)+DWBRMSGDSC_RC+BI_DEST_Y:ud // Read 2 GRFs from DEST_Y + + (f0.1) add (1) MSGSRC.1:d MSGSRC.1:d 16:w // Add vertical offset 16 for bot MB in MBAFF mode + +ILDB_LABEL(ELSE_Y_4x16T): + else (1) ILDB_LABEL(ENDIF_Y_4x16T) + + // Field picture + (f0.1) mov (1) MSGDSC RESP_LEN(2)+DWBRMSGDSC_RC_BF+BI_DEST_Y:ud // Read 2 GRFs from DEST_Y bottom field + (-f0.1) mov (1) MSGDSC RESP_LEN(2)+DWBRMSGDSC_RC_TF+BI_DEST_Y:ud // Read 2 GRFs from DEST_Y top field + + endif +ILDB_LABEL(ENDIF_Y_4x16T): + +// send (8) BUF_D(0)<1> MSGHDRY MSGSRC<8;8,1>:ud MSGDSC + send (8) LEFT_TEMP_D(0)<1> MSGHDRL MSGSRC<8;8,1>:ud DAPREAD MSGDSC +#endif + +// Transpose 4x16 to 16x4 + +// Input received from dport: +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |73 72 71 70 63 62 61 60 53 52 51 50 43 42 41 40 33 32 31 30 23 22 21 20 13 12 11 10 03 02 01 00| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |f3 f2 f1 f0 e3 e2 e1 e0 d3 d2 d1 d0 c3 c2 c1 c0 b3 b2 b1 b0 a3 a2 a1 a0 93 92 91 90 83 82 81 80| +// +-----------------------+-----------------------+-----------------------+-----------------------+ + +// Output of transpose: <1> <= <32;8,4> +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |f1 e1 d1 c1 b1 a1 91 81 71 61 51 41 31 21 11 01 f0 e0 d0 c0 b0 a0 90 80 70 60 50 40 30 20 10 00| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |f3 e3 d3 c3 b3 a3 93 83 73 63 53 43 33 23 13 03 f2 e2 d2 c2 b2 a2 92 82 72 62 52 42 32 22 12 02| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +/* + // Transpose the data, also occupy 2 GRFs + mov (16) PREV_MB_YB(0)<1> BUF_B(0, 0)<32;8,4> { NoDDClr } + mov (16) PREV_MB_YB(0, 16)<1> BUF_B(0, 1)<32;8,4> { NoDDChk } + mov (16) PREV_MB_YB(1)<1> BUF_B(0, 2)<32;8,4> { NoDDClr } + mov (16) PREV_MB_YB(1, 16)<1> BUF_B(0, 3)<32;8,4> { NoDDChk } +*/ +// End of load_Y_4x16T + diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/Load_ILDB_Cntrl_Data_16DW.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/Load_ILDB_Cntrl_Data_16DW.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/Load_ILDB_Cntrl_Data_16DW.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/Load_ILDB_Cntrl_Data_16DW.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,62 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Module name: load_ILDB_Cntrl_Data_16DW.asm +// +// This module loads AVC ILDB 64DW control data for one MB CTG. +// Dataport expands from 16DW to 64DW. +// +//---------------------------------------------------------------- +// Symbols need to be defined before including this module +// +// Source region in :ud +// CNTRL_DATA_D: CNTRL_DATA_D Base=rxx ElementSize=4 SrcRegion=REGION(8,1) Type=ud // 8 GRFs +// +// Binding table index: +// BI_CNTRL_DATA: Binding table index of control data surface +// +//---------------------------------------------------------------- + +// On CTG, MB control data in memory occupy 16 DWs. Data port returns 8 GRFs with expanded control data. + +#if defined(_MBAFF) + // We need to get control data offset for the bottom MB in mbaff mode. + // That is, get f0.1=1 if MbaffFlag==1 && BotFieldFlag==1 +// and (1) CTemp1_W:uw BitFields:uw MbaffFlag+BotFieldFlag:uw // Mute all other bits +// cmp.e.f0.1 (1) NULLREGW CTemp1_W:uw MbaffFlag+BotFieldFlag:uw // Check mbaff and bot flags + + and.ne.f0.1 (1) NULLREGW BitFields:uw BotFieldFlag:uw + + // Global offset + mov (1) MSGSRC.2:ud CntrlDataOffsetY:ud + + (f0.1) add (1) MSGSRC.2:ud MSGSRC.2:ud 64:w // +64 to the next MB control data (bot MB) +#endif + + send (8) CNTRL_DATA_D(0)<1> MSGHDRY MSGSRC<8;8,1>:ud DAPREAD RESP_LEN(8)+ILDBRMSGDSC+BI_CNTRL_DATA // Receive 8 GRFs + +// End of load_ILDB_Cntrl_Data_16DW.asm + + + +// AVC ILDB control data message header format + +//DWord Bit Description +//M0.7 31:0 Debug +//M0.6 31:0 Debug +//M0.5 31:8 Ignored +// 7:0 Dispatch ID. // This ID is assigned by the fixed function unit and is a unique identifier for the thread. It is used to free up resources used by the thread upon thread completion. +//M0.4 31:0 Ignored +//M0.3 31:0 Ignored +//M0.2 31:0 Global Offset. Specifies the global byte offset into the buffer. + // This offset must be OWord aligned (bits 3:0 MBZ) Format = U32 Range = [0,FFFFFFF0h] +//M0.1 31:0 Ignored +//M0.0 31:0 Ignored + + + diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/Load_ILDB_Cntrl_Data_22DW.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/Load_ILDB_Cntrl_Data_22DW.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/Load_ILDB_Cntrl_Data_22DW.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/Load_ILDB_Cntrl_Data_22DW.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,36 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Module name: load_ILDB_Cntrl_Data_22DW.asm +// +// ********** Apple only module ********** +// +// This module loads AVC ILDB 22DW control data for one MB for CLN. +// The reduced control data set is for progressive picture ONLY. +// +// Control data memory layout for each MB is 8x11 = 88 bytes. +// It ocuppies 3 GRFs after reading in. +// +//---------------------------------------------------------------- +// Symbols need to be defined before including this module +// +// Source region in :ud +// CNTRL_DATA_D: CNTRL_DATA_D Base=rxx ElementSize=4 SrcRegion=REGION(8,1) Type=ud // 3 GRFs +// +// Binding table index: +// BI_CNTRL_DATA: Binding table index of control data surface +// +//---------------------------------------------------------------- + + mul (1) MSGSRC.0<1>:ud ORIX:uw 8:uw { NoDDClr } // Block origin X + mul (1) MSGSRC.1<1>:ud ORIY:uw 11:uw { NoDDClr, NoDDChk } // Block origin Y + mov (1) MSGSRC.2<1>:ud 0x000A0007:ud { NoDDChk } // Block width and height (8x11=88 bytes) + + send (8) CNTRL_DATA_D(0)<1> MSGHDRY MSGSRC<8;8,1>:ud DAPREAD RESP_LEN(3)+DWBRMSGDSC_SC+BI_CNTRL_DATA // Receive 3 GRFs + +// End of load_ILDB_Cntrl_Data_22DW.asm diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/Load_ILDB_Cntrl_Data_64DW.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/Load_ILDB_Cntrl_Data_64DW.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/Load_ILDB_Cntrl_Data_64DW.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/Load_ILDB_Cntrl_Data_64DW.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,42 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Module name: load_ILDB_Cntrl_Data_64DW.asm +// +// This module loads AVC ILDB 64DW control data for one MB for CLN. +// +//---------------------------------------------------------------- +// Symbols need to be defined before including this module +// +// Source region in :ud +// CNTRL_DATA_D: CNTRL_DATA_D Base=rxx ElementSize=4 SrcRegion=REGION(8,1) Type=ud // 8 GRFs +// +// Binding table index: +// BI_CNTRL_DATA: Binding table index of control data surface +// +//---------------------------------------------------------------- + +// On CLN, MB control data in memory occupy 64 DWs. + +#if defined(_MBAFF) + // We need to get control data offset for the bottom MB in mbaff mode. + // That is, set f0.1=1 if MbaffFlag==1 && BotFieldFlag==1 + and (1) acc0.0:uw BitFields:uw MbaffFlag+BotFieldFlag:uw // Mute all other bits + cmp.e.f0.1 (1) NULLREGW acc0.0:uw MbaffFlag+BotFieldFlag:uw // Check mbaff and bot flags +#endif // CTemp1_W + + mov (2) MSGSRC.0<1>:ud ORIX_CUR<2;2,1>:uw { NoDDClr } // Block origin X,Y + mov (1) MSGSRC.2<1>:ud 0x000F000F:ud { NoDDChk } // Block width and height (16x16=256 bytes) + +#if defined(_MBAFF) + (f0.1) add (1) MSGSRC.1:ud MSGSRC.1:ud 16:w // +16 to the bottom MB control data (bot MB) +#endif + + send (8) CNTRL_DATA_D(0)<1> MSGHDRY MSGSRC<8;8,1>:ud DAPREAD RESP_LEN(8)+DWBRMSGDSC_SC+BI_CNTRL_DATA // Receive 8 GRFs + +// End of load_ILDB_Cntrl_Data_64DW.asm diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/Load_ILDB_Cntrl_Data.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/Load_ILDB_Cntrl_Data.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/Load_ILDB_Cntrl_Data.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/Load_ILDB_Cntrl_Data.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,80 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Module name: load_ILDB_Cntrl_Data.asm +// +// This module loads AVC ILDB control data for one MB. +// +//---------------------------------------------------------------- +// Symbols need to be defined before including this module +// +// Source region in :ud +// CNTRL_DATA_D: CNTRL_DATA_D Base=rxx ElementSize=4 SrcRegion=REGION(8,1) Type=ud // 8 GRFs +// +// Binding table index: +// BI_CNTRL_DATA: Binding table index of control data surface +// +//---------------------------------------------------------------- + + // We need to get control data offset for the bottom MB in mbaff mode. + // That is, get f0.1=1 if MbaffFlag==1 && BotFieldFlag==1 + and (1) CTemp1_W:uw BitFields:uw MbaffFlag+BotFieldFlag:uw // Mute all other bits + + and.nz.f0.0 (1) null:w BitFields:w CntlDataExpFlag:w // Get CntlDataExpFlag + + cmp.e.f0.1 (1) NULLREGW CTemp1_W:uw MbaffFlag+BotFieldFlag:uw // Check mbaff and bot flags + + (f0.0) jmpi ILDB_LABEL(READ_BLC_CNTL_DATA) + + // On Crestline, MB control data in memory occupy 64 DWs (expanded). +// mov (1) MSGSRC.0<1>:ud 0:w { NoDDClr } // Block origin X +// mov (1) MSGSRC.1<1>:ud CntrlDataOffsetY:ud { NoDDClr, NoDDChk } // Block origin Y +// mov (1) MSGSRC.2<1>:ud 0x000F000F:ud { NoDDChk } // Block width and height (16x16=256 bytes) + + mov (2) MSGSRC.0<1>:ud ORIX_CUR<2;2,1>:uw { NoDDClr } // Block origin X,Y + mov (1) MSGSRC.2<1>:ud 0x000F000F:ud { NoDDChk } // Block width and height (16x16=256 bytes) + + (f0.1) add (1) MSGSRC.1:ud MSGSRC.1:ud 16:w // +16 to for bottom MB in a pair + + send (8) CNTRL_DATA_D(0)<1> MSGHDRY MSGSRC<8;8,1>:ud DAPREAD DWBRMSGDSC_SC+0x00080000+BI_CNTRL_DATA // Receive 8 GRFs + jmpi ILDB_LABEL(READ_CNTL_DATA_DONE) + + +ILDB_LABEL(READ_BLC_CNTL_DATA): + // On Bearlake-C, MB control data in memory occupy 16 DWs. Data port returns 8 GRFs with expanded control data. + + // Global offset + mov (1) MSGSRC.2:ud CntrlDataOffsetY:ud // CntrlDataOffsetY is the global offset + + (f0.1) add (1) MSGSRC.2:ud MSGSRC.2:ud 64:w // +64 to the next MB control data (bot MB) + + send (8) CNTRL_DATA_D(0)<1> MSGHDRY MSGSRC<8;8,1>:ud DAPREAD RESP_LEN(8)+ILDBRMSGDSC+BI_CNTRL_DATA // Receive 8 GRFs + +ILDB_LABEL(READ_CNTL_DATA_DONE): + +// End of load_ILDB_Cntrl_Data.asm + + + + +// AVC ILDB control data message header format + +//DWord Bit Description +//M0.7 31:0 Debug +//M0.6 31:0 Debug +//M0.5 31:8 Ignored +// 7:0 Dispatch ID. // This ID is assigned by the fixed function unit and is a unique identifier for the thread. It is used to free up resources used by the thread upon thread completion. +//M0.4 31:0 Ignored +//M0.3 31:0 Ignored +//M0.2 31:0 Global Offset. Specifies the global byte offset into the buffer. + // This offset must be OWord aligned (bits 3:0 MBZ) Format = U32 Range = [0,FFFFFFF0h] +//M0.1 31:0 Ignored +//M0.0 31:0 Ignored + + + diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/load_Left_UV_2x8T.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/load_Left_UV_2x8T.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/load_Left_UV_2x8T.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/load_Left_UV_2x8T.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,76 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Module Name: Load_Left_UV_2X8T.Asm +// +// Load UV 8X2 Block +// +//---------------------------------------------------------------- +// Symbols ceed To be defined before including this module +// +// Source Region Is :UB +// BUF_D: BUF_D Base=Rxx Elementsize=4 Srcregion=Region(8,1) Type=UD + +// Binding Table Index: +// BI_SRC_UV: Binding Table Index Of UV Surface (NV12) +// +//---------------------------------------------------------------- + +#if defined(_DEBUG) + mov (1) EntrySignatureC:w 0xDDD0:w +#endif + +#if defined(_PROGRESSIVE) + // Read U+V + mov (1) MSGSRC.0:ud ORIX_LEFT:w { NoDDClr } // Block origin + asr (1) MSGSRC.1:ud ORIY_LEFT:w 1:w { NoDDClr, NoDDChk } // NV12 U+V block origin y = half of Y comp + mov (1) MSGSRC.2:ud 0x00070003:ud { NoDDChk } // NV12 U+V block width and height (4x8) + + send (8) LEFT_TEMP_D(0)<1> MSGHDRU MSGSRC<8;8,1>:ud DAPREAD RESP_LEN(1)+DWBRMSGDSC_RC+BI_DEST_UV +#endif + +#if defined(_FIELD) || defined(_MBAFF) + + // FieldModeCurrentMbFlag determines how to access left MB + and.z.f0.0 (1) null:w r[ECM_AddrReg, BitFlags]:ub FieldModeCurrentMbFlag:w + + and.nz.f0.1 (1) NULLREGW BitFields:w BotFieldFlag:w // Get bottom field flag + + // Read U+V + mov (1) MSGSRC.0:ud ORIX_LEFT:w { NoDDClr } // Block origin + asr (1) MSGSRC.1:ud ORIY_LEFT:w 1:w { NoDDClr, NoDDChk } // NV12 U+V block origin y = half of Y comp + mov (1) MSGSRC.2:ud 0x00070003:ud { NoDDChk } // NV12 U+V block width and height (4x8) + + // Load NV12 U+V + + // Set message descriptor + + (f0.0) if (1) ILDB_LABEL(ELSE_Y_2x8T) + + // Frame picture + mov (1) MSGDSC RESP_LEN(1)+DWBRMSGDSC_RC+BI_DEST_UV:ud // Read 1 GRF from SRC_UV + + (f0.1) add (1) MSGSRC.1:d MSGSRC.1:d 8:w // Add vertical offset 8 for bot MB in MBAFF mode + +ILDB_LABEL(ELSE_Y_2x8T): + else (1) ILDB_LABEL(ENDIF_Y_2x8T) + + // Field picture + (f0.1) mov (1) MSGDSC RESP_LEN(1)+DWBRMSGDSC_RC_BF+BI_DEST_UV:ud // Read 1 GRF from SRC_Y bottom field + (-f0.1) mov (1) MSGDSC RESP_LEN(1)+DWBRMSGDSC_RC_TF+BI_DEST_UV:ud // Read 1 GRF from SRC_Y top field + + endif +ILDB_LABEL(ENDIF_Y_2x8T): + + // Read 1 GRF from DEST surface as the above MB has been deblocked. +// send (8) BUF_D(0)<1> MSGHDRU MSGSRC<8;8,1>:ud MSGDSC + send (8) LEFT_TEMP_D(0)<1> MSGHDRU MSGSRC<8;8,1>:ud DAPREAD MSGDSC + +#endif + +// End of load_Left_UV_2x8T.asm diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/load_Left_UV_2x8T_Mbaff.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/load_Left_UV_2x8T_Mbaff.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/load_Left_UV_2x8T_Mbaff.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/load_Left_UV_2x8T_Mbaff.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,79 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Module Name: Load_Left_UV_2X8T.Asm +// +// Load UV 8X2 Block +// +//---------------------------------------------------------------- +// Symbols ceed To be defined before including this module +// +// Source Region Is :UB +// BUF_D: BUF_D Base=Rxx Elementsize=4 Srcregion=Region(8,1) Type=UD + +// Binding Table Index: +// BI_SRC_UV: Binding Table Index Of UV Surface (NV12) +// +//---------------------------------------------------------------- + +#if defined(_DEBUG) + mov (1) EntrySignatureC:w 0xDDD0:w +#endif + + // FieldModeCurrentMbFlag determines how to access left MB + and.z.f0.0 (1) null:w r[ECM_AddrReg, BitFlags]:ub FieldModeCurrentMbFlag:w + + and.nz.f0.1 (1) NULLREGW BitFields:w BotFieldFlag:w // Get bottom field flag + + // Read U+V + mov (1) MSGSRC.0:ud ORIX_LEFT:w { NoDDClr } // Block origin + asr (1) MSGSRC.1:ud ORIY_LEFT:w 1:w { NoDDClr, NoDDChk } // NV12 U+V block origin y = half of Y comp + mov (1) MSGSRC.2:ud 0x00070003:ud { NoDDChk } // NV12 U+V block width and height (4x8) + + // Load NV12 U+V + + // Set message descriptor + + (f0.0) if (1) ILDB_LABEL(ELSE_Y_2x8T) + + // Frame picture + mov (1) MSGDSC RESP_LEN(1)+DWBRMSGDSC_RC+BI_DEST_UV:ud // Read 1 GRF from SRC_UV + + (f0.1) add (1) MSGSRC.1:d MSGSRC.1:d 8:w // Add vertical offset 8 for bot MB in MBAFF mode + +ILDB_LABEL(ELSE_Y_2x8T): + else (1) ILDB_LABEL(ENDIF_Y_2x8T) + + // Field picture + (f0.1) mov (1) MSGDSC RESP_LEN(1)+DWBRMSGDSC_RC_BF+BI_DEST_UV:ud // Read 1 GRF from SRC_Y bottom field + (-f0.1) mov (1) MSGDSC RESP_LEN(1)+DWBRMSGDSC_RC_TF+BI_DEST_UV:ud // Read 1 GRF from SRC_Y top field + + asr (1) MSGSRC.1:d MSGSRC.1:d 1:w // Reduce y by half in field access mode + + endif +ILDB_LABEL(ENDIF_Y_2x8T): + + // Read 1 GRF from DEST surface as the above MB has been deblocked. +// send (8) BUF_D(0)<1> MSGHDRU MSGSRC<8;8,1>:ud MSGDSC + send (8) LEFT_TEMP_D(0)<1> MSGHDRU MSGSRC<8;8,1>:ud DAPREAD MSGDSC + + +// Input from dport for transpose: +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |71 71 70 70 61 61 60 60 51 51 50 50 41 41 40 40 31 31 30 30 21 21 20 20 11 11 10 10 01 01 00 00| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// +// Output of transpose: <1> <=== <16;8,2>:w +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |71 71 61 61 51 51 41 41 31 31 21 21 11 11 01 01 70 70 60 60 50 50 40 40 30 30 20 20 10 10 00 00| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +/* + mov (8) PREV_MB_UW(0,0)<1> BUF_W(0,0)<16;8,2> { NoDDClr } + mov (8) PREV_MB_UW(0,8)<1> BUF_W(0,1)<16;8,2> { NoDDChk } +*/ +// End of load_Left_UV_2x8T.asm diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/load_Left_Y_4x16T.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/load_Left_Y_4x16T.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/load_Left_Y_4x16T.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/load_Left_Y_4x16T.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,96 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Module name: load_Y_4x16T.asm +// +// Load luma left MB 4x16 and transpose 4x16 to 16x4. +// +//---------------------------------------------------------------- +// Symbols need to be defined before including this module +// +// Source region in :ud +// PREV_MB_YD: PREV_MB_YD Base=rxx ElementSize=4 SrcRegion=REGION(8,1) Type=ud // 2 GRFs +// +// Binding table index: +// BI_SRC_Y: Binding table index of Y surface +// +//---------------------------------------------------------------- + +#if defined(_DEBUG) + mov (1) EntrySignatureC:w 0xDDD0:w +#endif + + +#if defined(_PROGRESSIVE) + // Read Y + mov (2) MSGSRC.0<1>:ud ORIX_LEFT<2;2,1>:w { NoDDClr } // Block origin + mov (1) MSGSRC.2<1>:ud 0x000F0003:ud { NoDDChk } // Block width and height (4x16) + +// mov (1) MSGDSC DWBRMSGDSC_RC+0x00020000+BI_DEST_Y:ud // Read 2 GRFs from DEST_Y + send (8) LEFT_TEMP_D(0)<1> MSGHDRL MSGSRC<8;8,1>:ud DAPREAD RESP_LEN(2)+DWBRMSGDSC_RC+BI_DEST_Y +#endif + + +#if defined(_FIELD) || defined(_MBAFF) + + // FieldModeCurrentMbFlag determines how to access left MB + and.z.f0.0 (1) null:w r[ECM_AddrReg, BitFlags]:ub FieldModeCurrentMbFlag:w + + and.nz.f0.1 (1) NULLREGW BitFields:w BotFieldFlag:w // Get bottom field flag + + // Read Y + mov (2) MSGSRC.0<1>:ud ORIX_LEFT<2;2,1>:w { NoDDClr } // Block origin + mov (1) MSGSRC.2<1>:ud 0x000F0003:ud { NoDDChk } // Block width and height (4x16) + + // Set message descriptor, etc. + + (f0.0) if (1) ILDB_LABEL(ELSE_Y_4x16T) + + // Frame picture + mov (1) MSGDSC RESP_LEN(2)+DWBRMSGDSC_RC+BI_DEST_Y:ud // Read 2 GRFs from DEST_Y + + (f0.1) add (1) MSGSRC.1:d MSGSRC.1:d 16:w // Add vertical offset 16 for bot MB in MBAFF mode + +ILDB_LABEL(ELSE_Y_4x16T): + else (1) ILDB_LABEL(ENDIF_Y_4x16T) + + // Field picture + (f0.1) mov (1) MSGDSC RESP_LEN(2)+DWBRMSGDSC_RC_BF+BI_DEST_Y:ud // Read 2 GRFs from DEST_Y bottom field + (-f0.1) mov (1) MSGDSC RESP_LEN(2)+DWBRMSGDSC_RC_TF+BI_DEST_Y:ud // Read 2 GRFs from DEST_Y top field + + endif +ILDB_LABEL(ENDIF_Y_4x16T): + +// send (8) BUF_D(0)<1> MSGHDRY MSGSRC<8;8,1>:ud MSGDSC + send (8) LEFT_TEMP_D(0)<1> MSGHDRL MSGSRC<8;8,1>:ud DAPREAD MSGDSC +#endif + +// Transpose 4x16 to 16x4 + +// Input received from dport: +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |73 72 71 70 63 62 61 60 53 52 51 50 43 42 41 40 33 32 31 30 23 22 21 20 13 12 11 10 03 02 01 00| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |f3 f2 f1 f0 e3 e2 e1 e0 d3 d2 d1 d0 c3 c2 c1 c0 b3 b2 b1 b0 a3 a2 a1 a0 93 92 91 90 83 82 81 80| +// +-----------------------+-----------------------+-----------------------+-----------------------+ + +// Output of transpose: <1> <= <32;8,4> +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |f1 e1 d1 c1 b1 a1 91 81 71 61 51 41 31 21 11 01 f0 e0 d0 c0 b0 a0 90 80 70 60 50 40 30 20 10 00| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |f3 e3 d3 c3 b3 a3 93 83 73 63 53 43 33 23 13 03 f2 e2 d2 c2 b2 a2 92 82 72 62 52 42 32 22 12 02| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +/* + // Transpose the data, also occupy 2 GRFs + mov (16) PREV_MB_YB(0)<1> BUF_B(0, 0)<32;8,4> { NoDDClr } + mov (16) PREV_MB_YB(0, 16)<1> BUF_B(0, 1)<32;8,4> { NoDDChk } + mov (16) PREV_MB_YB(1)<1> BUF_B(0, 2)<32;8,4> { NoDDClr } + mov (16) PREV_MB_YB(1, 16)<1> BUF_B(0, 3)<32;8,4> { NoDDChk } +*/ +// End of load_Y_4x16T + diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/load_Left_Y_4x16T_Mbaff.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/load_Left_Y_4x16T_Mbaff.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/load_Left_Y_4x16T_Mbaff.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/load_Left_Y_4x16T_Mbaff.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,84 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Module name: load_Y_4x16T.asm +// +// Load luma left MB 4x16 and transpose 4x16 to 16x4. +// +//---------------------------------------------------------------- +// Symbols need to be defined before including this module +// +// Source region in :ud +// PREV_MB_YD: PREV_MB_YD Base=rxx ElementSize=4 SrcRegion=REGION(8,1) Type=ud // 2 GRFs +// +// Binding table index: +// BI_SRC_Y: Binding table index of Y surface +// +//---------------------------------------------------------------- + +#if defined(_DEBUG) + mov (1) EntrySignatureC:w 0xDDD0:w +#endif + + // FieldModeCurrentMbFlag determines how to access left MB + and.z.f0.0 (1) null:w r[ECM_AddrReg, BitFlags]:ub FieldModeCurrentMbFlag:w + + and.nz.f0.1 (1) NULLREGW BitFields:w BotFieldFlag:w // Get bottom field flag + + // Read Y + mov (2) MSGSRC.0<1>:ud ORIX_LEFT<2;2,1>:w { NoDDClr } // Block origin + mov (1) MSGSRC.2<1>:ud 0x000F0003:ud { NoDDChk } // Block width and height (4x16) + + // Set message descriptor, etc. + + (f0.0) if (1) ELSE_Y_4x16T + + // Frame picture + mov (1) MSGDSC RESP_LEN(2)+DWBRMSGDSC_RC+BI_DEST_Y:ud // Read 2 GRFs from DEST_Y + + (f0.1) add (1) MSGSRC.1:d MSGSRC.1:d 16:w // Add vertical offset 16 for bot MB in MBAFF mode + +ELSE_Y_4x16T: + else (1) ENDIF_Y_4x16T + + // Field picture + (f0.1) mov (1) MSGDSC RESP_LEN(2)+DWBRMSGDSC_RC_BF+BI_DEST_Y:ud // Read 2 GRFs from DEST_Y bottom field + (-f0.1) mov (1) MSGDSC RESP_LEN(2)+DWBRMSGDSC_RC_TF+BI_DEST_Y:ud // Read 2 GRFs from DEST_Y top field + + asr (1) MSGSRC.1:d MSGSRC.1:d 1:w // Reduce y by half in field access mode + + endif +ENDIF_Y_4x16T: + +// send (8) BUF_D(0)<1> MSGHDRY MSGSRC<8;8,1>:ud MSGDSC + send (8) LEFT_TEMP_D(0)<1> MSGHDRL MSGSRC<8;8,1>:ud DAPREAD MSGDSC + + +// Transpose 4x16 to 16x4 + +// Input received from dport: +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |73 72 71 70 63 62 61 60 53 52 51 50 43 42 41 40 33 32 31 30 23 22 21 20 13 12 11 10 03 02 01 00| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |f3 f2 f1 f0 e3 e2 e1 e0 d3 d2 d1 d0 c3 c2 c1 c0 b3 b2 b1 b0 a3 a2 a1 a0 93 92 91 90 83 82 81 80| +// +-----------------------+-----------------------+-----------------------+-----------------------+ + +// Output of transpose: <1> <= <32;8,4> +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |f1 e1 d1 c1 b1 a1 91 81 71 61 51 41 31 21 11 01 f0 e0 d0 c0 b0 a0 90 80 70 60 50 40 30 20 10 00| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |f3 e3 d3 c3 b3 a3 93 83 73 63 53 43 33 23 13 03 f2 e2 d2 c2 b2 a2 92 82 72 62 52 42 32 22 12 02| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +/* + // Transpose the data, also occupy 2 GRFs + mov (16) PREV_MB_YB(0)<1> BUF_B(0, 0)<32;8,4> { NoDDClr } + mov (16) PREV_MB_YB(0, 16)<1> BUF_B(0, 1)<32;8,4> { NoDDChk } + mov (16) PREV_MB_YB(1)<1> BUF_B(0, 2)<32;8,4> { NoDDClr } + mov (16) PREV_MB_YB(1, 16)<1> BUF_B(0, 3)<32;8,4> { NoDDChk } +*/ +// End of load_Y_4x16T diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/loadNV12_16x16T.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/loadNV12_16x16T.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/loadNV12_16x16T.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/loadNV12_16x16T.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,53 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Module name: loadNV12_16x16T.asm +// +// Load and transpose NV12 16x16 block +// +//---------------------------------------------------------------- +// Symbols need to be defined before including this module +// +// Source region in :ud +// SRC_YD: SRC_YD Base=rxx ElementSize=4 SrcRegion=REGION(8,1) Type=ud // 8 GRFs +// SRC_UD: SRC_UD Base=rxx ElementSize=4 SrcRegion=REGION(8,1) Type=ud (U+V for NV12) // 4 GRFs +// +// Source region is :ub. The same region as :ud region +// SRC_YB: SRC_YB Base=rxx ElementSize=1 SrcRegion=REGION(16,1) Type=ub // 8 GRFs +// SRC_UB: SRC_UB Base=rxx ElementSize=1 SrcRegion=REGION(16,1) Type=ub // 2 GRFs +// SRC_VB: SRC_VB Base=rxx ElementSize=1 SrcRegion=REGION(16,1) Type=ub // 2 GRFs +// +// Binding table index: +// BI_SRC_Y: Binding table index of Y surface +// BI_SRC_UV: Binding table index of UV surface (NV12) +// +// Temp buffer: +// BUF_B: BUF_B Base=rxx ElementSize=1 SrcRegion=REGION(16,1) Type=ub +// +//---------------------------------------------------------------- + +#if defined(_DEBUG) + mov (1) EntrySignatureC:w 0xDDD1:w +#endif + + // Read Y + mov (2) MSGSRC.0<1>:ud ORIX_CUR<2;2,1>:w // Block origin + mov (1) MSGSRC.2<1>:ud 0x000F000F:ud // Block width and height (16x16) + send (8) SRC_YD(0)<1> MSGHDRY MSGSRC<8;8,1>:ud DAPREAD RESP_LEN(8)+DWBRMSGDSC_RC+BI_SRC_Y // Read 8 GRFs + + // Read U+V + asr (1) MSGSRC.1:ud MSGSRC.1:ud 1:w // NV12 U+V block origin y = half of Y comp + mov (1) MSGSRC.2<1>:ud 0x0007000F:ud // NV12 U+V block width and height (16x8) + send (8) SRC_UD(0)<1> MSGHDRU MSGSRC<8;8,1>:ud DAPREAD RESP_LEN(4)+DWBRMSGDSC_RC+BI_SRC_UV // Read 4 GRFs + + #include "TransposeNV12_16x16.asm" + +// #include "Transpose_Y_16x16.asm" +// #include "Transpose_NV12_UV_16x8.asm" + +// End of loadNV12_16x16T diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/loadNV12_16x4.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/loadNV12_16x4.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/loadNV12_16x4.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/loadNV12_16x4.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,54 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Module Name: Loadnv12_16X4.Asm +// +// Load Nv12 16X4 Block +// +//---------------------------------------------------------------- +// Symbols Need To Be Defined Before Including This Module +// +// Source Region In :Ud +// Src_Yd: Src_Yd Base=Rxx Elementsize=4 Srcregion=Region(8,1) Type=Ud // 3 Grfs (2 For Y, 1 For U+V) +// +// Source Region Is :Ub. The Same Region As :Ud Region +// Src_Yb: Src_Yb Base=Rxx Elementsize=1 Srcregion=Region(16,1) Type=Ub // 2 Grfs +// Src_Ub: Src_Ub Base=Rxx Elementsize=1 Srcregion=Region(16,1) Type=Ub // 0.5 Grf +// Src_Vb: Src_Vb Base=Rxx Elementsize=1 Srcregion=Region(16,1) Type=Ub // 0.5 Grf +// +// Binding Table Index: +// Bi_Src_Y: Binding Table Index Of Y Surface +// Bi_Src_UV: Binding Table Index Of UV Surface (Nv12) +// +// Temp Buffer: +// Buf_D: Buf_D Base=Rxx Elementsize=4 Srcregion=Region(8,1) Type=Ud +// Buf_B: Buf_B Base=Rxx Elementsize=1 Srcregion=Region(16,1) Type=Ub +// +//---------------------------------------------------------------- + +#if defined(_DEBUG) + mov (1) EntrySignatureC:w 0xDDD2:w +#endif + + // Read Y + mov (2) MSGSRC.0<1>:ud ORIX<2;2,1>:w // Block origin + mov (1) MSGSRC.2<1>:ud 0x0003000F:ud // Block width and height (16x4) + send (8) PREV_MB_YD(0)<1> MSGHDRY MSGSRC<8;8,1>:ud DAPREAD RESP_LEN(2)+DWBRMSGDSC_RC+BI_SRC_Y // Read 2 GRFs + + // Read U+V + asr (1) MSGSRC.1:ud MSGSRC.1:ud 1:w // NV12 U+V block origin y = half of Y comp + mov (1) MSGSRC.2<1>:ud 0x0001000F:ud // NV12 U+V block width and height (16x2) + + // Load NV12 U+V tp a temp buf + send (8) BUF_D(0)<1> MSGHDRU MSGSRC<8;8,1>:ud DAPREAD RESP_LEN(1)+DWBRMSGDSC_RC+BI_SRC_UV // Read 1 GRF + + // Convert NV12 U+V to internal planar U and V and place them right after Y. +// mov (16) SRC_UB(0,0)<1> BUF_B(0,0)<32;16,2> +// mov (16) SRC_VB(0,0)<1> BUF_B(0,1)<32;16,2> + +// End of loadNV12_16x4.asm diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/load_Top_UV_8x2.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/load_Top_UV_8x2.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/load_Top_UV_8x2.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/load_Top_UV_8x2.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,70 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Module Name: Load_Top_UV_8X2.Asm +// +// Load UV 8X2 Block +// +//---------------------------------------------------------------- +// Symbols ceed To be defined before including this module +// +// Source Region Is :UB +// BUF_D: BUF_D Base=Rxx Elementsize=4 Srcregion=Region(8,1) Type=UD + +// Binding Table Index: +// BI_SRC_UV: Binding Table Index Of UV Surface (NV12) +// +//---------------------------------------------------------------- + +#if defined(_DEBUG) + mov (1) EntrySignatureC:w 0xDDD2:w +#endif + +#if defined(_PROGRESSIVE) + // Read U+V + mov (1) MSGSRC.0:ud ORIX_TOP:w { NoDDClr } // Block origin + asr (1) MSGSRC.1:ud ORIY_TOP:w 1:w { NoDDClr, NoDDChk } // NV12 U+V block origin y = half of Y comp + mov (1) MSGSRC.2:ud 0x0001000F:ud { NoDDChk } // NV12 U+V block width and height (16x2) + + // Read 1 GRF from DEST surface as the above MB has been deblocked. + //send (8) TOP_MB_UD(0)<1> MSGHDRU MSGSRC<8;8,1>:ud RESP_LEN(1)+DWBRMSGDSC_RC+BI_DEST_UV + mov (1) MSGDSC RESP_LEN(1)+DWBRMSGDSC_RC+BI_DEST_UV:ud +#endif + +#if defined(_FIELD) + +// cmp.z.f0.0 (1) NULLREGW PicTypeC:w 0:w // Get pic type flag + and.nz.f0.1 (1) NULLREGW BitFields:w BotFieldFlag:w // Get bottom field flag + // They are used later in this file + + // Read U+V + mov (1) MSGSRC.0:ud ORIX_TOP:w { NoDDClr } // Block origin + asr (1) MSGSRC.1:ud ORIY_TOP:w 1:w { NoDDClr, NoDDChk } // NV12 U+V block origin y = half of Y comp + mov (1) MSGSRC.2:ud 0x0001000F:ud { NoDDChk } // NV12 U+V block width and height (16x2) + + // Load NV12 U+V + + // Set message descriptor + // Frame picture +// (f0.0) mov (1) MSGDSC DWBRMSGDSC_RC+0x00010000+BI_DEST_UV:ud // Read 1 GRF from SRC_UV +// (f0.0) jmpi Load_Top_UV_8x2 + + // Field picture + (f0.1) mov (1) MSGDSC RESP_LEN(1)+DWBRMSGDSC_RC_BF+BI_DEST_UV:ud // Read 1 GRF from SRC_Y bottom field + (-f0.1) mov (1) MSGDSC RESP_LEN(1)+DWBRMSGDSC_RC_TF+BI_DEST_UV:ud // Read 1 GRF from SRC_Y top field + +//Load_Top_UV_8x2: + + // Read 1 GRF from DEST surface as the above MB has been deblocked. +// send (8) PREV_MB_UD(0)<1> MSGHDRU MSGSRC<8;8,1>:ud MSGDSC + +#endif + + send (8) TOP_MB_UD(0)<1> MSGHDRU MSGSRC<8;8,1>:ud DAPREAD MSGDSC + +// End of load_Top_UV_8x2.asm diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/load_Top_UV_8x2_Mbaff.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/load_Top_UV_8x2_Mbaff.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/load_Top_UV_8x2_Mbaff.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/load_Top_UV_8x2_Mbaff.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,79 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Module Name: Load_Top_UV_8X2.Asm +// +// Load UV 8X2 Block +// +//---------------------------------------------------------------- +// Symbols ceed To be defined before including this module +// +// Source Region Is :UB +// BUF_D: BUF_D Base=Rxx Elementsize=4 Srcregion=Region(8,1) Type=UD + +// Binding Table Index: +// BI_SRC_UV: Binding Table Index Of UV Surface (NV12) +// +//---------------------------------------------------------------- + +#if defined(_DEBUG) + mov (1) EntrySignatureC:w 0xDDD2:w +#endif + + // FieldModeCurrentMbFlag determines how to access above MB + and.z.f0.0 (1) null:w r[ECM_AddrReg, BitFlags]:ub FieldModeCurrentMbFlag:w + + and.nz.f0.1 (1) NULLREGW BitFields:w BotFieldFlag:w + + // Read U+V + mov (1) MSGSRC.0:ud ORIX_TOP:w { NoDDClr } // Block origin + asr (1) MSGSRC.1:d ORIY_TOP:w 1:w { NoDDClr, NoDDChk } // NV12 U+V block origin y = half of Y comp + mov (1) MSGSRC.2:ud 0x0001000F:ud { NoDDChk } // NV12 U+V block width and height (16x2) + + // Load NV12 U+V + + // Set message descriptor + + (f0.0) if (1) ELSE_UV_8X2 + + // Frame picture + mov (1) MSGDSC RESP_LEN(1)+DWBRMSGDSC_RC+BI_DEST_UV:ud // Read 1 GRF from SRC_UV + + // Add vertical offset 8 for bot MB in MBAFF mode + (f0.1) add (1) MSGSRC.1:d MSGSRC.1:d 8:w + + // Dual field mode setup + and.z.f0.1 (1) NULLREGW DualFieldMode:w 1:w + (f0.1) jmpi NOT_DUAL_FIELD_UV + + add (1) MSGSRC.1:d MSGSRC.1:d -2:w { NoDDClr } // Load 4 lines in stead of 2 + mov (1) MSGSRC.2:ud 0x0003000F:ud { NoDDChk } // New block width and height (16x8) + + add (1) MSGDSC MSGDSC RESP_LEN(1):ud // 1 more GRF to receive + +NOT_DUAL_FIELD_UV: + +ELSE_UV_8X2: + else (1) ENDIF_UV_8X2 + + // Field picture + asr (1) MSGSRC.1:d ORIY_CUR:w 2:w // asr 1: NV12 U+V block origin y = half of Y comp + // asr 1: Reduce y by half in field access mode + + (f0.1) mov (1) MSGDSC RESP_LEN(1)+DWBRMSGDSC_RC_BF+BI_DEST_UV:ud // Read 1 GRF from SRC_Y bottom field + (-f0.1) mov (1) MSGDSC RESP_LEN(1)+DWBRMSGDSC_RC_TF+BI_DEST_UV:ud // Read 1 GRF from SRC_Y top field + + add (1) MSGSRC.1:d MSGSRC.1:d -2:w // for last 2 rows of above MB + + endif +ENDIF_UV_8X2: + + // Read 1 GRF from DEST surface as the above MB has been deblocked. + send (8) PREV_MB_UD(0)<1> MSGHDRU MSGSRC<8;8,1>:ud DAPREAD MSGDSC + +// End of load_Top_UV_8x2.asm diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/load_Top_Y_16x4.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/load_Top_Y_16x4.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/load_Top_Y_16x4.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/load_Top_Y_16x4.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,70 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Module Name: Load_Y_16X4.asm +// +// Load Y 16X4 Block to PREV_MB_YD +// +//---------------------------------------------------------------- +// Symbols Need To Be Defined Before Including This Module +// +// Source Region In :Ud +// Src_YD: Src_Yd Base=Rxx Elementsize=4 Srcregion=Region(8,1) Type=Ud // 3 Grfs (2 For Y, 1 For U+V) +// +// Source Region Is :Ub. The Same Region As :Ud Region +// Src_YB: Src_Yb Base=Rxx Elementsize=1 Srcregion=Region(16,1) Type=Ub // 2 Grfs +// +// Binding Table Index: +// Bi_Src_Y: Binding Table Index Of Y Surface +// +// Temp Buffer: +// Buf_D: Buf_D Base=Rxx Elementsize=4 Srcregion=Region(8,1) Type=Ud +// Buf_B: Buf_B Base=Rxx Elementsize=1 Srcregion=Region(16,1) Type=Ub +// +//---------------------------------------------------------------- + +#if defined(_DEBUG) + mov (1) EntrySignatureC:w 0xDDD2:w +#endif + +#if defined(_PROGRESSIVE) + // Read Y + mov (2) MSGSRC.0<1>:ud ORIX_TOP<2;2,1>:w { NoDDClr } // Block origin + mov (1) MSGSRC.2<1>:ud 0x0003000F:ud { NoDDChk } // Block width and height (16x4) + + mov (1) MSGDSC RESP_LEN(2)+DWBRMSGDSC_RC+BI_DEST_Y:ud // Read 2 GRFs from SRC_Y +#endif + +#if defined(_FIELD) + +// cmp.z.f0.0 (1) NULLREGW PicTypeC:w 0:w // Get pic type flag + and.nz.f0.1 (1) NULLREGW BitFields:w BotFieldFlag:w // Get bottom field flag + // they are used later in this file + + mov (2) MSGSRC.0<1>:ud ORIX_TOP<2;2,1>:w { NoDDClr } // Block origin + mov (1) MSGSRC.2<1>:ud 0x0003000F:ud { NoDDChk } // Block width and height (16x4) + + // Set message descriptor + + // Frame picture +// (f0.0) mov (1) MSGDSC DWBRMSGDSC_RC+0x00020000+BI_DEST_Y:ud // Read 2 GRFs from SRC_Y +// (f0.0) jmpi load_Y_16x4 + + // Field picture + (f0.1) mov (1) MSGDSC RESP_LEN(2)+DWBRMSGDSC_RC_BF+BI_DEST_Y:ud // Read 2 GRFs from SRC_Y bottom field + (-f0.1) mov (1) MSGDSC RESP_LEN(2)+DWBRMSGDSC_RC_TF+BI_DEST_Y:ud // Read 2 GRFs from SRC_Y top field + +//load_Y_16x4: + // Read 2 GRFs from DEST surface, as the above MB has been deblocked +// send (8) PREV_MB_YD(0)<1> MSGHDRY MSGSRC<8;8,1>:ud MSGDSC + +#endif + + send (8) TOP_MB_YD(0)<1> MSGHDRT MSGSRC<8;8,1>:ud DAPREAD MSGDSC + +// End of load_Y_16x4.asm diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/load_Top_Y_16x4_Mbaff.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/load_Top_Y_16x4_Mbaff.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/load_Top_Y_16x4_Mbaff.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/load_Top_Y_16x4_Mbaff.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,81 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Module Name: Load_Y_16X4.asm +// +// Load Y 16X4 Block to PREV_MB_YD +// +//---------------------------------------------------------------- +// Symbols Need To Be Defined Before Including This Module +// +// Source Region In :Ud +// Src_YD: Src_Yd Base=Rxx Elementsize=4 Srcregion=Region(8,1) Type=Ud // 3 Grfs (2 For Y, 1 For U+V) +// +// Source Region Is :Ub. The Same Region As :Ud Region +// Src_YB: Src_Yb Base=Rxx Elementsize=1 Srcregion=Region(16,1) Type=Ub // 2 Grfs +// +// Binding Table Index: +// Bi_Src_Y: Binding Table Index Of Y Surface +// +// Temp Buffer: +// Buf_D: Buf_D Base=Rxx Elementsize=4 Srcregion=Region(8,1) Type=Ud +// Buf_B: Buf_B Base=Rxx Elementsize=1 Srcregion=Region(16,1) Type=Ub +// +//---------------------------------------------------------------- + +#if defined(_DEBUG) + mov (1) EntrySignatureC:w 0xDDD2:w +#endif + // FieldModeCurrentMbFlag determines how to access above MB + and.z.f0.0 (1) null:w r[ECM_AddrReg, BitFlags]:ub FieldModeCurrentMbFlag:w + + and.nz.f0.1 (1) NULLREGW BitFields:w BotFieldFlag:w + + // Read Y + mov (2) MSGSRC.0<1>:ud ORIX_TOP<2;2,1>:w { NoDDClr } // Block origin + mov (1) MSGSRC.2<1>:ud 0x0003000F:ud { NoDDChk } // Block width and height (16x4) + + // Set message descriptor + + (f0.0) if (1) ELSE_Y_16x4 + + // Frame picture + mov (1) MSGDSC RESP_LEN(2)+DWBRMSGDSC_RC+BI_DEST_Y:ud // Read 2 GRFs from SRC_Y + + // Add vertical offset 16 for bot MB in MBAFF mode + (f0.1) add (1) MSGSRC.1:d MSGSRC.1:d 16:w + + // Dual field mode setup + and.z.f0.1 (1) NULLREGW DualFieldMode:w 1:w + (f0.1) jmpi NOT_DUAL_FIELD + + add (1) MSGSRC.1:d MSGSRC.1:d -4:w { NoDDClr } // Load 8 lines in above MB + mov (1) MSGSRC.2:ud 0x0007000F:ud { NoDDChk } // New block width and height (16x8) + + add (1) MSGDSC MSGDSC RESP_LEN(2):ud // 2 more GRF to receive + +NOT_DUAL_FIELD: + +ELSE_Y_16x4: + else (1) ENDIF_Y_16x4 + + asr (1) MSGSRC.1:d ORIY_CUR:w 1:w // Reduce y by half in field access mode + + // Field picture + (f0.1) mov (1) MSGDSC RESP_LEN(2)+DWBRMSGDSC_RC_BF+BI_DEST_Y:ud // Read 2 GRFs from SRC_Y bottom field + (-f0.1) mov (1) MSGDSC RESP_LEN(2)+DWBRMSGDSC_RC_TF+BI_DEST_Y:ud // Read 2 GRFs from SRC_Y top field + + add (1) MSGSRC.1:d MSGSRC.1:d -4:w // for last 4 rows of above MB + + endif +ENDIF_Y_16x4: + + // Read 2 GRFs from DEST surface, as the above MB has been deblocked + send (8) PREV_MB_YD(0)<1> MSGHDRY MSGSRC<8;8,1>:ud DAPREAD MSGDSC + +// End of load_Y_16x4.asm diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/Root_Undefs.inc libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/Root_Undefs.inc --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/Root_Undefs.inc 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/Root_Undefs.inc 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,27 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Modual name: Root_Undefs.inc +// +// Undefine global symbols for new process in root thread +// + +#undef READ_BI +#undef WRITE_BI + +#undef ILDB_H_INDEPENDENT +#undef ILDB_H_INDEPENDENT_CONT +#undef ILDB_H_DEPENDENT +#undef ILDB_H_DEPENDENT_SCAN +#undef ILDB_H_NO_DEPENDENT + +#undef ILDB_V_INDEPENDENT +#undef ILDB_V_INDEPENDENT_CONT +#undef ILDB_V_DEPENDENT +#undef ILDB_V_DEPENDENT_SCAN +#undef ILDB_V_NO_DEPENDENT diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/save_Cur_UV_8x8.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/save_Cur_UV_8x8.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/save_Cur_UV_8x8.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/save_Cur_UV_8x8.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,53 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Module name: save_Cur_UV_8x8.asm +// +// Save UV 8x8 block (8x8U + 8x8V in NV12) +// +//---------------------------------------------------------------- +// Symbols need to be defined before including this module +// +// Source region in :ud +// SRC_UD: SRC_UD Base=rxx ElementSize=4 SrcRegion=REGION(8,1) Type=ud // 4 GRF +// +// Binding table index: +// BI_DEST_UV: Binding table index of UV surface (NV12) +// +//---------------------------------------------------------------- + +#if defined(_DEBUG) + mov (1) EntrySignatureC:w 0xDDD4:w +#endif + +#if defined(_FIELD) + and.nz.f0.1 (1) NULLREGW BitFields:w BotFieldFlag:w // Get bottom field flag +#endif + + mov (1) MSGSRC.0:ud ORIX_CUR:w { NoDDClr } // Block origin + asr (1) MSGSRC.1:ud ORIY_CUR:w 1:w { NoDDClr, NoDDChk } // NV12 U+V block origin y = half of Y comp + mov (1) MSGSRC.2:ud 0x0007000F:ud { NoDDChk } // NV12 U+V block width and height (16x8) + + mov (16) MSGPAYLOADD(0)<1> SRC_UD(0) // Compressed inst + mov (16) MSGPAYLOADD(2)<1> SRC_UD(2) + +#if defined(_PROGRESSIVE) + mov (1) MSGDSC MSG_LEN(4)+DWBWMSGDSC+BI_DEST_UV:ud +// send (8) NULLREG MSGHDR MSGSRC<8;8,1>:ud DWBWMSGDSC+0x00400000+BI_DEST_UV +#endif + +#if defined(_FIELD) + // Field picture + (f0.1) mov (1) MSGDSC MSG_LEN(4)+DWBWMSGDSC+ENMSGDSCBF+BI_DEST_UV:ud // Write 4 GRFs to DEST_UV bottom field + (-f0.1) mov (1) MSGDSC MSG_LEN(4)+DWBWMSGDSC+ENMSGDSCTF+BI_DEST_UV:ud // Write 4 GRFs to DEST_UV top field + +#endif + + send (8) null:ud MSGHDR MSGSRC<8;8,1>:ud DAPWRITE MSGDSC + +// End of save_Cur_UV_8x8.asm diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/save_Cur_UV_8x8_Mbaff.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/save_Cur_UV_8x8_Mbaff.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/save_Cur_UV_8x8_Mbaff.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/save_Cur_UV_8x8_Mbaff.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,62 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Module name: save_Cur_UV_8x8.asm +// +// Save UV 8x8 block (8x8U + 8x8V in NV12) +// +//---------------------------------------------------------------- +// Symbols need to be defined before including this module +// +// Source region in :ud +// SRC_UD: SRC_UD Base=rxx ElementSize=4 SrcRegion=REGION(8,1) Type=ud // 4 GRF +// +// Binding table index: +// BI_DEST_UV: Binding table index of UV surface (NV12) +// +//---------------------------------------------------------------- + +#if defined(_DEBUG) + mov (1) EntrySignatureC:w 0xDDD4:w +#endif + + and.z.f0.0 (1) null:w r[ECM_AddrReg, BitFlags]:ub FieldModeCurrentMbFlag:w + + and.nz.f0.1 (1) NULLREGW BitFields:w BotFieldFlag:w + + mov (1) MSGSRC.0:ud ORIX_CUR:w { NoDDClr } // Block origin + asr (1) MSGSRC.1:ud ORIY_CUR:w 1:w { NoDDClr, NoDDChk } // NV12 U+V block origin y = half of Y comp + mov (1) MSGSRC.2:ud 0x0007000F:ud { NoDDChk } // NV12 U+V block width and height (16x8) + + mov (16) MSGPAYLOADD(0)<1> SRC_UD(0) // Compressed inst + mov (16) MSGPAYLOADD(2)<1> SRC_UD(2) + + // Set message descriptor + + (f0.0) if (1) ELSE_UV_8X8 + + // Frame picture + mov (1) MSGDSC MSG_LEN(4)+DWBWMSGDSC+BI_DEST_UV:ud // Write 4 GRFs to DEST_UV + + (f0.1) add (1) MSGSRC.1:d MSGSRC.1:d 8:w // Add vertical offset 8 for bot MB in MBAFF mode + +ELSE_UV_8X8: + else (1) ENDIF_UV_8X8 + + // Field picture + (f0.1) mov (1) MSGDSC MSG_LEN(4)+DWBWMSGDSC+ENMSGDSCBF+BI_DEST_UV:ud // Write 4 GRFs to DEST_UV bottom field + (-f0.1) mov (1) MSGDSC MSG_LEN(4)+DWBWMSGDSC+ENMSGDSCTF+BI_DEST_UV:ud // Write 4 GRFs to DEST_UV top field + + asr (1) MSGSRC.1:d MSGSRC.1:d 1:w // Reduce y by half in field access mode + + endif +ENDIF_UV_8X8: + + send (8) null:ud MSGHDR MSGSRC<8;8,1>:ud DAPWRITE MSGDSC + +// End of save_Cur_UV_8x8.asm diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/save_Cur_Y_16x16.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/save_Cur_Y_16x16.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/save_Cur_Y_16x16.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/save_Cur_Y_16x16.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,56 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Module name: save_Cur_Y_16x16.asm +// +// Save a Y 16x16 block +// +//---------------------------------------------------------------- +// Symbols need to be defined before including this module +// +// Source region in :ud +// SRC_YD: SRC_YD Base=rxx ElementSize=4 SrcRegion=REGION(8,1) Type=ud // 8 GRFs +// +// Binding table index: +// BI_DEST_Y: Binding table index of Y surface +// +//---------------------------------------------------------------- + +#if defined(_DEBUG) + mov (1) EntrySignatureC:w 0xDDD4:w +#endif + +#if defined(_FIELD) + and.nz.f0.1 (1) NULLREGW BitFields:w BotFieldFlag:w // Get bottom field flag +#endif + + mov (2) MSGSRC.0<1>:ud ORIX_CUR<2;2,1>:w { NoDDClr } // Block origin + mov (1) MSGSRC.2<1>:ud 0x000F000F:ud { NoDDChk } // Block width and height (16x16) + + // Pack Y + mov (16) MSGPAYLOADD(0)<1> SRC_YD(0) // Compressed inst + mov (16) MSGPAYLOADD(2)<1> SRC_YD(2) + mov (16) MSGPAYLOADD(4)<1> SRC_YD(4) + mov (16) MSGPAYLOADD(6)<1> SRC_YD(6) + + +#if defined(_PROGRESSIVE) + mov (1) MSGDSC MSG_LEN(8)+DWBWMSGDSC+BI_DEST_Y:ud +// send (8) NULLREG MSGHDR MSGSRC<8;8,1>:ud DWBWMSGDSC+0x00800000+BI_DEST_Y +#endif + +#if defined(_FIELD) + // Field picture + (f0.1) mov (1) MSGDSC MSG_LEN(8)+DWBWMSGDSC+ENMSGDSCBF+BI_DEST_Y:ud // Write 8 GRFs to DEST_Y bottom field + (-f0.1) mov (1) MSGDSC MSG_LEN(8)+DWBWMSGDSC+ENMSGDSCTF+BI_DEST_Y:ud // Write 8 GRFs to DEST_Y top field + +#endif + + send (8) null:ud MSGHDR MSGSRC<8;8,1>:ud DAPWRITE MSGDSC + +// End of save_Cur_Y_16x16.asm diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/save_Cur_Y_16x16_Mbaff.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/save_Cur_Y_16x16_Mbaff.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/save_Cur_Y_16x16_Mbaff.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/save_Cur_Y_16x16_Mbaff.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,64 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Module name: save_Cur_Y_16x16.asm +// +// Save a Y 16x16 block +// +//---------------------------------------------------------------- +// Symbols need to be defined before including this module +// +// Source region in :ud +// SRC_YD: SRC_YD Base=rxx ElementSize=4 SrcRegion=REGION(8,1) Type=ud // 8 GRFs +// +// Binding table index: +// BI_DEST_Y: Binding table index of Y surface +// +//---------------------------------------------------------------- + +#if defined(_DEBUG) + mov (1) EntrySignatureC:w 0xDDD4:w +#endif + + and.z.f0.0 (1) null:w r[ECM_AddrReg, BitFlags]:ub FieldModeCurrentMbFlag:w + + and.nz.f0.1 (1) NULLREGW BitFields:w BotFieldFlag:w + + mov (2) MSGSRC.0<1>:ud ORIX_CUR<2;2,1>:w { NoDDClr } // Block origin + mov (1) MSGSRC.2<1>:ud 0x000F000F:ud { NoDDChk } // Block width and height (16x16 or 12x16) + + // Pack Y + mov (16) MSGPAYLOADD(0)<1> SRC_YD(0) // Compressed inst + mov (16) MSGPAYLOADD(2)<1> SRC_YD(2) + mov (16) MSGPAYLOADD(4)<1> SRC_YD(4) + mov (16) MSGPAYLOADD(6)<1> SRC_YD(6) + + // Set message descriptor + + (f0.0) if (1) ELSE_Y_16x16 + + // Frame picture + mov (1) MSGDSC MSG_LEN(8)+DWBWMSGDSC+BI_DEST_Y:ud // Write 8 GRFs to DEST_Y + + (f0.1) add (1) MSGSRC.1:d MSGSRC.1:d 16:w // Add vertical offset 16 for bot MB in MBAFF mode + +ELSE_Y_16x16: + else (1) ENDIF_Y_16x16 + + // Field picture + (f0.1) mov (1) MSGDSC MSG_LEN(8)+DWBWMSGDSC+ENMSGDSCBF+BI_DEST_Y:ud // Write 8 GRFs to DEST_Y bottom field + (-f0.1) mov (1) MSGDSC MSG_LEN(8)+DWBWMSGDSC+ENMSGDSCTF+BI_DEST_Y:ud // Write 8 GRFs to DEST_Y top field + + asr (1) MSGSRC.1:d MSGSRC.1:d 1:w // Reduce y by half in field access mode + + endif +ENDIF_Y_16x16: + + send (8) null:ud MSGHDR MSGSRC<8;8,1>:ud DAPWRITE MSGDSC + +// End of save_Cur_Y_16x16.asm diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/save_Left_UV_8x2T.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/save_Left_UV_8x2T.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/save_Left_UV_8x2T.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/save_Left_UV_8x2T.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,72 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Module name: save_Left_UV_8x2T.asm +// +// Transpose 8x2 to 2x8 UV data and write to memory +// +//---------------------------------------------------------------- +// Symbols need to be defined before including this module +// +// Left MB region: +// PREV_MB_UW: Base=ryy ElementSize=2 SrcRegion=REGION(8,1) Type=uw + +// Binding table index: +// BI_SRC_UV: Binding table index of UV surface (NV12) +// +// Temp buffer: +// BUF_W: BUF_W Base=rxx ElementSize=1 SrcRegion=REGION(8,1) Type=uw +// +// +#if defined(_DEBUG) + mov (1) EntrySignatureC:w 0xDDD6:w +#endif + +#if defined(_FIELD) + and.nz.f0.1 (1) NULLREGW BitFields:w BotFieldFlag:w // Get bottom field flag +#endif + + // Transpose U/V, save them to MRFs in NV12 format + mov (1) MSGSRC.0:ud ORIX_LEFT:w { NoDDClr } // Block origin + asr (1) MSGSRC.1:ud ORIY_LEFT:w 1:w { NoDDClr, NoDDChk } // NV12 U+V block origin y = half of Y comp + mov (1) MSGSRC.2:ud 0x00070003:ud { NoDDChk } // NV12 U+V block width and height (4x8) + + +// 16x2 UV src in GRF (each pix is specified as yx) +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |71 71 61 61 51 51 41 41 31 31 21 21 11 11 01 01 70 70 60 60 50 50 40 40 30 30 20 20 10 10 00 00| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// +// First step (8) <1> <=== <8;4,1>:w +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |71 71 61 61 51 51 41 41 70 70 60 60 50 50 40 40 31 31 21 21 11 11 01 01 30 30 20 20 10 10 00 00| +// +-----------------------+-----------------------+-----------------------+-----------------------+ + mov (8) LEFT_TEMP_W(0,0)<1> PREV_MB_UW(0,0)<8;4,1> { NoDDClr } + mov (8) LEFT_TEMP_W(0,8)<1> PREV_MB_UW(0,4)<8;4,1> { NoDDChk } + +// Second step (8) <1> <=== <1;2,4> +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |71 71 70 70 61 61 60 60 51 51 50 50 41 41 40 40 31 31 30 30 21 21 20 20 11 11 10 10 01 01 00 00| +// +-----------------------+-----------------------+-----------------------+-----------------------+ + mov (8) MSGPAYLOADW(0,0)<1> LEFT_TEMP_W(0,0)<1;2,4> + mov (8) MSGPAYLOADW(0,8)<1> LEFT_TEMP_W(0,8)<1;2,4> + +// Transposed U+V in NV12 in 4x8 is ready for writting to dataport. + +#if defined(_PROGRESSIVE) + mov (1) MSGDSC MSG_LEN(1)+DWBWMSGDSC+BI_DEST_UV:ud +// send (8) NULLREG MSGHDR MSGSRC<8;8,1>:ud DWBWMSGDSC+0x00100000+BI_DEST_UV +#endif + +#if defined(_FIELD) + // Field picture + (f0.1) mov (1) MSGDSC MSG_LEN(1)+DWBWMSGDSC+ENMSGDSCBF+BI_DEST_UV:ud // Write 1 GRF to DEST_UV bottom field + (-f0.1) mov (1) MSGDSC MSG_LEN(1)+DWBWMSGDSC+ENMSGDSCTF+BI_DEST_UV:ud // Write 1 GRF to DEST_UV top field + +#endif + send (8) null:ud MSGHDR MSGSRC<8;8,1>:ud DAPWRITE MSGDSC diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/save_Left_UV_8x2T_Mbaff.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/save_Left_UV_8x2T_Mbaff.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/save_Left_UV_8x2T_Mbaff.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/save_Left_UV_8x2T_Mbaff.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,82 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Module name: save_Left_UV_8x2T.asm +// +// Transpose 8x2 to 2x8 UV data and write to memory +// +//---------------------------------------------------------------- +// Symbols need to be defined before including this module +// +// Left MB region: +// PREV_MB_UW: Base=ryy ElementSize=2 SrcRegion=REGION(8,1) Type=uw + +// Binding table index: +// BI_SRC_UV: Binding table index of UV surface (NV12) +// +// Temp buffer: +// BUF_W: BUF_W Base=rxx ElementSize=1 SrcRegion=REGION(8,1) Type=uw +// +// +#if defined(_DEBUG) + mov (1) EntrySignatureC:w 0xDDD6:w +#endif + + and.z.f0.0 (1) null:w r[ECM_AddrReg, BitFlags]:ub FieldModeCurrentMbFlag:w + + and.nz.f0.1 (1) NULLREGW BitFields:w BotFieldFlag:w + + // Transpose U/V, save them to MRFs in NV12 format + mov (1) MSGSRC.0:ud ORIX_LEFT:w { NoDDClr } // Block origin + asr (1) MSGSRC.1:ud ORIY_LEFT:w 1:w { NoDDClr, NoDDChk } // NV12 U+V block origin y = half of Y comp + mov (1) MSGSRC.2:ud 0x00070003:ud { NoDDChk } // NV12 U+V block width and height (4x8) + + +// 16x2 UV src in GRF (each pix is specified as yx) +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |71 71 61 61 51 51 41 41 31 31 21 21 11 11 01 01 70 70 60 60 50 50 40 40 30 30 20 20 10 10 00 00| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// +// First step (8) <1> <=== <8;4,1>:w +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |71 71 61 61 51 51 41 41 70 70 60 60 50 50 40 40 31 31 21 21 11 11 01 01 30 30 20 20 10 10 00 00| +// +-----------------------+-----------------------+-----------------------+-----------------------+ + mov (8) BUF_W(0,0)<1> PREV_MB_UW(0,0)<8;4,1> { NoDDClr } + mov (8) BUF_W(0,8)<1> PREV_MB_UW(0,4)<8;4,1> { NoDDChk } + +// Second step (8) <1> <=== <1;2,4> +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |71 71 70 70 61 61 60 60 51 51 50 50 41 41 40 40 31 31 30 30 21 21 20 20 11 11 10 10 01 01 00 00| +// +-----------------------+-----------------------+-----------------------+-----------------------+ + mov (8) MSGPAYLOADW(0,0)<1> BUF_W(0,0)<1;2,4> + mov (8) MSGPAYLOADW(0,8)<1> BUF_W(0,8)<1;2,4> + +// Transposed U+V in NV12 in 4x8 is ready for writting to dataport. + + // Set message descriptor + + (f0.0) if (1) ELSE_UV_8X2T + + // Frame picture + mov (1) MSGDSC MSG_LEN(1)+DWBWMSGDSC+BI_DEST_UV:ud // Write 1 GRF to DEST_UV + + (f0.1) add (1) MSGSRC.1:d MSGSRC.1:d 8:w // Add vertical offset 8 for bot MB in MBAFF mode + +ELSE_UV_8X2T: + else (1) ENDIF_UV_8X2T + + // Field picture + (f0.1) mov (1) MSGDSC MSG_LEN(1)+DWBWMSGDSC+ENMSGDSCBF+BI_DEST_UV:ud // Write 1 GRF to DEST_UV bottom field + (-f0.1) mov (1) MSGDSC MSG_LEN(1)+DWBWMSGDSC+ENMSGDSCTF+BI_DEST_UV:ud // Write 1 GRF to DEST_UV top field + + asr (1) MSGSRC.1:d MSGSRC.1:d 1:w // Reduce y by half in field access mode + + endif +ENDIF_UV_8X2T: + + send (8) null:ud MSGHDR MSGSRC<8;8,1>:ud DAPWRITE MSGDSC diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/save_Left_Y_16x4T.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/save_Left_Y_16x4T.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/save_Left_Y_16x4T.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/save_Left_Y_16x4T.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,89 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Module name: save_Left_Y_16x4T.asm +// +// Transpose 16x4 to 4x16 Y data and write to memory +// +//---------------------------------------------------------------- +// Symbols need to be defined before including this module +// +// Left MB region: +// PREV_MB_YB: Base=rxx ElementSize=1 SrcRegion=REGION(16,1) Type=ub + +// Binding table index: +// BI_SRC_Y: Binding table index of Y surface +// +// Temp buffer: +// BUF_B: BUF_B Base=rxx ElementSize=1 SrcRegion=REGION(16,1) Type=ub +// +// +#if defined(_DEBUG) + mov (1) EntrySignatureC:w 0xDDD6:w +#endif + +#if defined(_FIELD) + and.nz.f0.1 (1) NULLREGW BitFields:w BotFieldFlag:w // Get bottom field flag +#endif + + mov (2) MSGSRC.0<1>:ud ORIX_LEFT<2;2,1>:w { NoDDClr } // Block origin + mov (1) MSGSRC.2<1>:ud 0x000F0003:ud { NoDDChk } // 4x16 + +// Transpose Y, save them to MRFs + +// 16x4 Y src in GRF (each pix is specified as yx) +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |f1 e1 d1 c1 b1 a1 91 81 71 61 51 41 31 21 11 01 f0 e0 d0 c0 b0 a0 90 80 70 60 50 40 30 20 10 00| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |f3 e3 d3 c3 b3 a3 93 83 73 63 53 43 33 23 13 03 f2 e2 d2 c2 b2 a2 92 82 72 62 52 42 32 22 12 02| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// +// First step (16) <1> <=== <16;4,1> +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |73 63 53 43 72 62 52 42 71 61 51 41 70 60 50 40 33 23 13 03 32 22 12 02 31 21 11 01 30 20 10 00| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |f3 e3 d3 c3 f2 e2 d2 c2 f1 e1 d1 c1 f0 e0 d0 c0 b3 a3 93 83 b2 a2 92 82 b1 a1 91 81 b0 a0 90 80| +// +-----------------------+-----------------------+-----------------------+-----------------------+ + + // The first step + mov (16) LEFT_TEMP_B(0,0)<1> PREV_MB_YB(0,0)<16;4,1> { NoDDClr } + mov (16) LEFT_TEMP_B(0,16)<1> PREV_MB_YB(0,4)<16;4,1> { NoDDChk } + mov (16) LEFT_TEMP_B(1,0)<1> PREV_MB_YB(0,8)<16;4,1> { NoDDClr } + mov (16) LEFT_TEMP_B(1,16)<1> PREV_MB_YB(0,12)<16;4,1> { NoDDChk } + +// +// Second step (16) <1> <=== <1;4,4> +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |73 72 71 70 63 62 61 60 53 52 51 50 43 42 41 40 33 32 31 30 23 22 21 20 13 12 11 10 03 02 01 00| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |f3 f2 f1 f0 e3 e2 e1 e0 d3 d2 d1 d0 c3 c2 c1 c0 b3 b2 b1 b0 a3 a2 a1 a0 93 92 91 90 83 82 81 80| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// + // The second step + mov (16) MSGPAYLOADB(0,0)<1> LEFT_TEMP_B(0,0)<1;4,4> + mov (16) MSGPAYLOADB(0,16)<1> LEFT_TEMP_B(0,16)<1;4,4> + mov (16) MSGPAYLOADB(1,0)<1> LEFT_TEMP_B(1,0)<1;4,4> + mov (16) MSGPAYLOADB(1,16)<1> LEFT_TEMP_B(1,16)<1;4,4> + +// Transposed Y in 4x16 is ready for writting to dataport. + + +#if defined(_PROGRESSIVE) + mov (1) MSGDSC MSG_LEN(2)+DWBWMSGDSC+BI_DEST_Y:ud +// send (8) NULLREG MSGHDR MSGSRC<8;8,1>:ud DWBWMSGDSC+0x00200000+BI_DEST_Y +#endif + +#if defined(_FIELD) + // Field picture + (f0.1) mov (1) MSGDSC MSG_LEN(2)+DWBWMSGDSC+ENMSGDSCBF+BI_DEST_Y:ud // Write 2 GRFs to DEST_Y bottom field + (-f0.1) mov (1) MSGDSC MSG_LEN(2)+DWBWMSGDSC+ENMSGDSCTF+BI_DEST_Y:ud // Write 2 GRFs to DEST_Y top field + +#endif + + send (8) null:ud MSGHDR MSGSRC<8;8,1>:ud DAPWRITE MSGDSC + diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/save_Left_Y_16x4T_Mbaff.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/save_Left_Y_16x4T_Mbaff.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/save_Left_Y_16x4T_Mbaff.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/save_Left_Y_16x4T_Mbaff.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,101 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Module name: save_Left_Y_16x4T.asm +// +// Transpose 16x4 to 4x16 Y data and write to memory +// +//---------------------------------------------------------------- +// Symbols need to be defined before including this module +// +// Left MB region: +// PREV_MB_YB: Base=rxx ElementSize=1 SrcRegion=REGION(16,1) Type=ub + +// Binding table index: +// BI_SRC_Y: Binding table index of Y surface +// +// Temp buffer: +// BUF_B: BUF_B Base=rxx ElementSize=1 SrcRegion=REGION(16,1) Type=ub +// +// +#if defined(_DEBUG) + mov (1) EntrySignatureC:w 0xDDD6:w +#endif + + and.z.f0.0 (1) null:w r[ECM_AddrReg, BitFlags]:ub FieldModeCurrentMbFlag:w + + and.nz.f0.1 (1) NULLREGW BitFields:w BotFieldFlag:w + + mov (2) MSGSRC.0<1>:ud ORIX_LEFT<2;2,1>:w { NoDDClr } // Block origin + mov (1) MSGSRC.2<1>:ud 0x000F0003:ud { NoDDChk } // 4x16 + +// Transpose Y, save them to MRFs + +// 16x4 Y src in GRF (each pix is specified as yx) +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |f1 e1 d1 c1 b1 a1 91 81 71 61 51 41 31 21 11 01 f0 e0 d0 c0 b0 a0 90 80 70 60 50 40 30 20 10 00| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |f3 e3 d3 c3 b3 a3 93 83 73 63 53 43 33 23 13 03 f2 e2 d2 c2 b2 a2 92 82 72 62 52 42 32 22 12 02| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// +// First step (16) <1> <=== <16;4,1> +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |73 63 53 43 72 62 52 42 71 61 51 41 70 60 50 40 33 23 13 03 32 22 12 02 31 21 11 01 30 20 10 00| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |f3 e3 d3 c3 f2 e2 d2 c2 f1 e1 d1 c1 f0 e0 d0 c0 b3 a3 93 83 b2 a2 92 82 b1 a1 91 81 b0 a0 90 80| +// +-----------------------+-----------------------+-----------------------+-----------------------+ + + // The first step + mov (16) BUF_B(0,0)<1> PREV_MB_YB(0,0)<16;4,1> { NoDDClr } + mov (16) BUF_B(0,16)<1> PREV_MB_YB(0,4)<16;4,1> { NoDDChk } + mov (16) BUF_B(1,0)<1> PREV_MB_YB(0,8)<16;4,1> { NoDDClr } + mov (16) BUF_B(1,16)<1> PREV_MB_YB(0,12)<16;4,1> { NoDDChk } + +// +// Second step (16) <1> <=== <1;4,4> +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |73 72 71 70 63 62 61 60 53 52 51 50 43 42 41 40 33 32 31 30 23 22 21 20 13 12 11 10 03 02 01 00| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |f3 f2 f1 f0 e3 e2 e1 e0 d3 d2 d1 d0 c3 c2 c1 c0 b3 b2 b1 b0 a3 a2 a1 a0 93 92 91 90 83 82 81 80| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// + // The second step + mov (16) MSGPAYLOADB(0,0)<1> BUF_B(0,0)<1;4,4> + mov (16) MSGPAYLOADB(0,16)<1> BUF_B(0,16)<1;4,4> + mov (16) MSGPAYLOADB(1,0)<1> BUF_B(1,0)<1;4,4> + mov (16) MSGPAYLOADB(1,16)<1> BUF_B(1,16)<1;4,4> + +// Transposed Y in 4x16 is ready for writting to dataport. + + //***** Left MB is loaded the same as indicated by FieldModeCurrentMbFlag. + + // Set message descriptor + + (f0.0) if (1) ELSE_Y_16x4T + + // Frame picture + mov (1) MSGDSC MSG_LEN(2)+DWBWMSGDSC+BI_DEST_Y:ud // Write 2 GRFs to DEST_Y + + (f0.1) add (1) MSGSRC.1:d MSGSRC.1:d 16:w // Add vertical offset 16 for bot MB in MBAFF mode + +ELSE_Y_16x4T: + else (1) ENDIF_Y_16x4T + + // Field picture + (f0.1) mov (1) MSGDSC MSG_LEN(2)+DWBWMSGDSC+ENMSGDSCBF+BI_DEST_Y:ud // Write 2 GRFs to DEST_Y bottom field + (-f0.1) mov (1) MSGDSC MSG_LEN(2)+DWBWMSGDSC+ENMSGDSCTF+BI_DEST_Y:ud // Write 2 GRFs to DEST_Y top field + + asr (1) MSGSRC.1:d MSGSRC.1:d 1:w // Reduce y by half in field access mode + + endif +ENDIF_Y_16x4T: + + send (8) null:ud MSGHDR MSGSRC<8;8,1>:ud DAPWRITE MSGDSC + + + diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/saveNV12_16x16.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/saveNV12_16x16.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/saveNV12_16x16.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/saveNV12_16x16.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,53 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Module name: saveNV12_16x16.asm +// +// Save a NV12 16x16 block +// +//---------------------------------------------------------------- +// Symbols need to be defined before including this module +// +// Source region in :ud +// SRC_YD: SRC_YD Base=rxx ElementSize=4 SrcRegion=REGION(8,1) Type=ud // 8 GRFs +// SRC_UD: SRC_UD Base=rxx ElementSize=4 SrcRegion=REGION(8,1) Type=ud // 4 GRF +// +// Binding table index: +// BI_DEST_Y: Binding table index of Y surface +// BI_DEST_UV: Binding table index of UV surface (NV12) +// +//---------------------------------------------------------------- + +#if defined(_DEBUG) + mov (1) EntrySignatureC:w 0xDDD4:w +#endif + + + mov (2) MSGSRC.0<1>:ud ORIX_CUR<2;2,1>:w // Block origin + mov (1) MSGSRC.2<1>:ud 0x000F000F:ud // Block width and height (16x16) + + // Pack Y + mov (16) MSGPAYLOADD(0)<1> SRC_YD(0) // Compressed inst + mov (16) MSGPAYLOADD(2)<1> SRC_YD(2) + mov (16) MSGPAYLOADD(4)<1> SRC_YD(4) + mov (16) MSGPAYLOADD(6)<1> SRC_YD(6) + + send (8) NULLREG MSGHDR MSGSRC<8;8,1>:ud DAPWRITE MSG_LEN(8)+DWBWMSGDSC+BI_DEST_Y // Write 8 GRFs + + + + asr (1) MSGSRC.1:ud MSGSRC.1:ud 1:w // NV12 U+V block origin y = half of Y comp + mov (1) MSGSRC.2<1>:ud 0x0007000F:ud // NV12 U+V block width and height (16x8) + + mov (16) MSGPAYLOADD(0)<1> SRC_UD(0) // Compressed inst + mov (16) MSGPAYLOADD(2)<1> SRC_UD(2) + + send (8) NULLREG MSGHDR MSGSRC<8;8,1>:ud DAPWRITE MSG_LEN(4)+DWBWMSGDSC+BI_DEST_UV // Write 4 GRFs + + +// End of saveNV12_16x16.asm diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/saveNV12_16x4.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/saveNV12_16x4.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/saveNV12_16x4.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/saveNV12_16x4.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,50 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Module name: saveNV12_16x4.asm +// +// Save a NV12 16x4 block +// +//---------------------------------------------------------------- +// Symbols need to be defined before including this module +// +// Source region in :ud +// SRC_YD: SRC_YD Base=rxx ElementSize=4 SrcRegion=REGION(8,1) Type=ud // 2 GRFs +// SRC_UD: SRC_UD Base=rxx ElementSize=4 SrcRegion=REGION(8,1) Type=ud // 1 GRF +// +// Binding table index: +// BI_DEST_Y: Binding table index of Y surface +// BI_DEST_UV: Binding table index of UV surface (NV12) +// +//---------------------------------------------------------------- + +#if defined(_DEBUG) + mov (1) EntrySignatureC:w 0xDDD5:w +#endif + + mov (2) MSGSRC.0<1>:ud ORIX_TOP<2;2,1>:w // Block origin + mov (1) MSGSRC.2<1>:ud 0x0003000F:ud // Block width and height (16x4) + + // Pack Y + mov (16) MSGPAYLOADD(0)<1> SRC_YD(0) // Compressed inst + + send (8) NULLREG MSGHDR MSGSRC<8;8,1>:ud DAPWRITE MSG_LEN(2)+DWBWMSGDSC+BI_DEST_Y // Write 2 GRFs + + + asr (1) MSGSRC.1:ud MSGSRC.1:ud 1:w // NV12 U+V block origin y = half of Y comp + mov (1) MSGSRC.2<1>:ud 0x0001000F:ud // NV12 U+V block width and height (16x2) + + // Pack U and V +// mov (16) MSGPAYLOADB(0,0)<2> SRC_UB(0,0) +// mov (16) MSGPAYLOADB(0,1)<2> SRC_VB(0,0) + + mov (8) MSGPAYLOADD(0,0)<1> SRC_UD(0) + + send (8) NULLREG MSGHDR MSGSRC<8;8,1>:ud DAPWRITE MSG_LEN(1)+DWBWMSGDSC+BI_DEST_UV // Write 1 GRF + +// End of saveNV12_16x4.asm diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/saveNV12_16x4T.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/saveNV12_16x4T.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/saveNV12_16x4T.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/saveNV12_16x4T.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,113 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Module name: saveNV12_16x4T.asm +// +// Transpose 16x4 to 4x16 YNV12 data and write to memory +// +//---------------------------------------------------------------- +// Symbols need to be defined before including this module +// +// Left MB region: +// PREV_MB_YB: Base=rxx ElementSize=1 SrcRegion=REGION(16,1) Type=ub +// PREV_MB_UW: Base=ryy ElementSize=2 SrcRegion=REGION(8,1) Type=uw + +// Binding table index: +// BI_SRC_Y: Binding table index of Y surface +// BI_SRC_UV: Binding table index of UV surface (NV12) +// +// Temp buffer: +// BUF_B: BUF_B Base=rxx ElementSize=1 SrcRegion=REGION(16,1) Type=ub +// BUF_W: BUF_W Base=rxx ElementSize=1 SrcRegion=REGION(8,1) Type=uw +// +// +#if defined(_DEBUG) + mov (1) EntrySignatureC:w 0xDDD6:w +#endif + + mov (2) MSGSRC.0<1>:ud ORIX_LEFT<2;2,1>:w // Block origin + mov (1) MSGSRC.2<1>:ud 0x000F0003:ud // 4x16 + +// Transpose Y, save them to MRFs + +// 16x4 Y src in GRF (each pix is specified as yx) +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |f1 e1 d1 c1 b1 a1 91 81 71 61 51 41 31 21 11 01 f0 e0 d0 c0 b0 a0 90 80 70 60 50 40 30 20 10 00| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |f3 e3 d3 c3 b3 a3 93 83 73 63 53 43 33 23 13 03 f2 e2 d2 c2 b2 a2 92 82 72 62 52 42 32 22 12 02| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// +// First step (16) <1> <=== <16;4,1> +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |73 63 53 43 72 62 52 42 71 61 51 41 70 60 50 40 33 23 13 03 32 22 12 02 31 21 11 01 30 20 10 00| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |f3 e3 d3 c3 f2 e2 d2 c2 f1 e1 d1 c1 f0 e0 d0 c0 b3 a3 93 83 b2 a2 92 82 b1 a1 91 81 b0 a0 90 80| +// +-----------------------+-----------------------+-----------------------+-----------------------+ + + // The first step + mov (16) BUF_B(0,0)<1> PREV_MB_YB(0,0)<16;4,1> + mov (16) BUF_B(0,16)<1> PREV_MB_YB(0,4)<16;4,1> + mov (16) BUF_B(1,0)<1> PREV_MB_YB(0,8)<16;4,1> + mov (16) BUF_B(1,16)<1> PREV_MB_YB(0,12)<16;4,1> + +// +// Second step (16) <1> <=== <1;4,4> +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |73 72 71 70 63 62 61 60 53 52 51 50 43 42 41 40 33 32 31 30 23 22 21 20 13 12 11 10 03 02 01 00| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |f3 f2 f1 f0 e3 e2 e1 e0 d3 d2 d1 d0 c3 c2 c1 c0 b3 b2 b1 b0 a3 a2 a1 a0 93 92 91 90 83 82 81 80| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// + // The second step +// mov (16) MSGPAYLOADB(0,0)<1> BUF_B(0,0)<32;8,4> // Read 2 rows, write 1 row +// mov (16) MSGPAYLOADB(0,16)<1> BUF_B(0,1)<32;8,4> +// mov (16) MSGPAYLOADB(1,0)<1> BUF_B(0,2)<32;8,4> +// mov (16) MSGPAYLOADB(1,16)<1> BUF_B(0,3)<32;8,4> + + mov (16) MSGPAYLOADB(0,0)<1> BUF_B(0,0)<1;4,4> + mov (16) MSGPAYLOADB(0,16)<1> BUF_B(0,16)<1;4,4> + mov (16) MSGPAYLOADB(1,0)<1> BUF_B(1,0)<1;4,4> + mov (16) MSGPAYLOADB(1,16)<1> BUF_B(1,16)<1;4,4> + +// Transposed Y in 4x16 is ready for writting to dataport. +// + send (8) NULLREG MSGHDR MSGSRC<8;8,1>:ud DAPWRITE MSG_LEN(2)+DWBWMSGDSC+BI_DEST_Y // Write 2 GRFs + + + +///////////////////////////////////////////////////////////////////////////////////////////////////// + + // Transpose U/V, save them to MRFs in NV12 format + asr (1) MSGSRC.1:ud MSGSRC.1:ud 1:w // NV12 U+V block origin y = half of Y comp + mov (1) MSGSRC.2<1>:ud 0x00070003:ud // NV12 U+V block width and height (4x8) + + +// 16x2 UV src in GRF (each pix is specified as yx) +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |71 71 61 61 51 51 41 41 31 31 21 21 11 11 01 01 70 70 60 60 50 50 40 40 30 30 20 20 10 10 00 00| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// +// First step (8) <1> <=== <8;4,1>:w +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |71 71 61 61 51 51 41 41 70 70 60 60 50 50 40 40 31 31 21 21 11 11 01 01 30 30 20 20 10 10 00 00| +// +-----------------------+-----------------------+-----------------------+-----------------------+ + mov (8) BUF_W(0,0)<1> PREV_MB_UW(0,0)<8;4,1> + mov (8) BUF_W(0,8)<1> PREV_MB_UW(0,4)<8;4,1> + +// Second step (8) <1> <=== <1;2,4> +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |71 71 70 70 61 61 60 60 51 51 50 50 41 41 40 40 31 31 30 30 21 21 20 20 11 11 10 10 01 01 00 00| +// +-----------------------+-----------------------+-----------------------+-----------------------+ + mov (8) MSGPAYLOADW(0,0)<1> BUF_W(0,0)<1;2,4> + mov (8) MSGPAYLOADW(0,8)<1> BUF_W(0,8)<1;2,4> + +// Transposed U+V in NV12 in 4x8 is ready for writting to dataport. + + send (8) NULLREG MSGHDR MSGSRC<8;8,1>:ud DAPWRITE MSG_LEN(1)+DWBWMSGDSC+BI_DEST_UV // Write 1 GRF + + diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/save_Top_UV_8x2.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/save_Top_UV_8x2.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/save_Top_UV_8x2.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/save_Top_UV_8x2.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,52 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Module name: save_Top_UV_8x2.asm +// +// Save UV 8x2 block (8x2U + 8x2V in NV12) +// +//---------------------------------------------------------------- +// Symbols need to be defined before including this module +// +// Source region in :ud +// SRC_UD: SRC_UD Base=rxx ElementSize=4 SrcRegion=REGION(8,1) Type=ud // 1 GRF +// +// Binding table index: +// BI_DEST_UV: Binding table index of UV surface (NV12) +// +//---------------------------------------------------------------- + +#if defined(_DEBUG) + mov (1) EntrySignatureC:w 0xDDD5:w +#endif + +#if defined(_FIELD) + and.nz.f0.1 (1) NULLREGW BitFields:w BotFieldFlag:w // Get bottom field flag +#endif + + mov (1) MSGSRC.0:ud ORIX_TOP:w { NoDDClr } // Block origin + asr (1) MSGSRC.1:ud ORIY_TOP:w 1:w { NoDDClr, NoDDChk } // NV12 U+V block origin y = half of Y comp + mov (1) MSGSRC.2:ud 0x0001000F:ud { NoDDChk } // NV12 U+V block width and height (16x2) + + mov (8) MSGPAYLOADD(0,0)<1> TOP_MB_UD(0) + + +#if defined(_PROGRESSIVE) + mov (1) MSGDSC MSG_LEN(1)+DWBWMSGDSC_WC+BI_DEST_UV:ud +// send (8) NULLREG MSGHDR MSGSRC<8;8,1>:ud DWBWMSGDSC+0x00100000+BI_DEST_UV +#endif + +#if defined(_FIELD) + // Field picture + (f0.1) mov (1) MSGDSC MSG_LEN(1)+DWBWMSGDSC_WC+ENMSGDSCBF+BI_DEST_UV:ud // Write 1 GRF to DEST_Y bottom field + (-f0.1) mov (1) MSGDSC MSG_LEN(1)+DWBWMSGDSC_WC+ENMSGDSCTF+BI_DEST_UV:ud // Write 1 GRF to DEST_Y top field + +#endif + + send (8) WritebackResponse(0)<1> MSGHDR MSGSRC<8;8,1>:ud DAPWRITE MSGDSC +// End of save_Top_UV_8x2.asm diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/save_Top_UV_8x2_Mbaff.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/save_Top_UV_8x2_Mbaff.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/save_Top_UV_8x2_Mbaff.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/save_Top_UV_8x2_Mbaff.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,69 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Module name: save_Top_UV_8x2.asm +// +// Save UV 8x2 block (8x2U + 8x2V in NV12) +// +//---------------------------------------------------------------- +// Symbols need to be defined before including this module +// +// Source region in :ud +// SRC_UD: SRC_UD Base=rxx ElementSize=4 SrcRegion=REGION(8,1) Type=ud // 1 GRF +// +// Binding table index: +// BI_DEST_UV: Binding table index of UV surface (NV12) +// +//---------------------------------------------------------------- + +#if defined(_DEBUG) + mov (1) EntrySignatureC:w 0xDDD5:w +#endif + and.z.f0.1 (8) NULLREGW DualFieldMode<0;1,0>:w 1:w + + // FieldModeCurrentMbFlag determines how to access above MB + and.z.f0.0 (1) null:w r[ECM_AddrReg, BitFlags]:ub FieldModeCurrentMbFlag:w + + // Pack U and V + mov (1) MSGSRC.0:ud ORIX_TOP:w { NoDDClr } // Block origin + asr (1) MSGSRC.1:ud ORIY_TOP:w 1:w { NoDDClr, NoDDChk } // NV12 U+V block origin y = half of Y comp + mov (1) MSGSRC.2:ud 0x0001000F:ud { NoDDChk } // NV12 U+V block width and height (16x2) + + // Dual field mode + (f0.1) mov (8) MSGPAYLOADD(0)<1> PREV_MB_UD(0) + (-f0.1) mov (8) MSGPAYLOADD(0)<1> PREV_MB_UD(1) // for dual field mode, write last 2 rows + + // Set message descriptor + + and.nz.f0.1 (1) NULLREGW BitFields:w BotFieldFlag:w + + (f0.0) if (1) ELSE_UV_8X2_SAVE + + // Frame picture + mov (1) MSGDSC MSG_LEN(1)+DWBWMSGDSC_WC+BI_DEST_UV:ud // Write 1 GRFs to DEST_UV + + // Add vertical offset 8 for bot MB in MBAFF mode + (f0.1) add (1) MSGSRC.1:d MSGSRC.1:d 8:w + +ELSE_UV_8X2_SAVE: + else (1) ENDIF_UV_8X2_SAVE + + asr (1) MSGSRC.1:d ORIY_CUR:w 2:w // asr 1: NV12 U+V block origin y = half of Y comp + // asr 1: Reduce y by half in field access mode + // Field picture + (f0.1) mov (1) MSGDSC MSG_LEN(1)+DWBWMSGDSC_WC+ENMSGDSCBF+BI_DEST_UV:ud // Write 1 GRF to DEST_Y bottom field + (-f0.1) mov (1) MSGDSC MSG_LEN(1)+DWBWMSGDSC_WC+ENMSGDSCTF+BI_DEST_UV:ud // Write 1 GRF to DEST_Y top field + + add (1) MSGSRC.1:d MSGSRC.1:d -2:w // for last 4 rows of above MB + + endif +ENDIF_UV_8X2_SAVE: + + send (8) WritebackResponse(0)<1> MSGHDR MSGSRC<8;8,1>:ud DAPWRITE MSGDSC + +// End of save_Top_UV_8x2.asm diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/save_Top_Y_16x4.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/save_Top_Y_16x4.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/save_Top_Y_16x4.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/save_Top_Y_16x4.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,52 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Module name: save_Top_Y_16x4.asm +// +// Save a Y 16x4 block +// +//---------------------------------------------------------------- +// Symbols need to be defined before including this module +// +// Source region in :ud +// SRC_YD: SRC_YD Base=rxx ElementSize=4 SrcRegion=REGION(8,1) Type=ud // 2 GRFs +// +// Binding table index: +// BI_DEST_Y: Binding table index of Y surface +// +//---------------------------------------------------------------- + +#if defined(_DEBUG) + mov (1) EntrySignatureC:w 0xDDD5:w +#endif + +#if defined(_FIELD) + and.nz.f0.1 (1) NULLREGW BitFields:w BotFieldFlag:w // Get bottom field flag +#endif + + mov (2) MSGSRC.0<1>:ud ORIX_TOP<2;2,1>:w { NoDDClr } // Block origin + mov (1) MSGSRC.2<1>:ud 0x0003000F:ud { NoDDChk } // Block width and height (16x4) + + // Pack Y + mov (16) MSGPAYLOADD(0)<1> TOP_MB_YD(0) // Compressed inst + + +#if defined(_PROGRESSIVE) + mov (1) MSGDSC MSG_LEN(2)+DWBWMSGDSC_WC+BI_DEST_Y:ud +// send (8) NULLREG MSGHDR MSGSRC<8;8,1>:ud DWBWMSGDSC+0x00200000+BI_DEST_Y +#endif + +#if defined(_FIELD) + // Field picture + (f0.1) mov (1) MSGDSC MSG_LEN(2)+DWBWMSGDSC_WC+ENMSGDSCBF+BI_DEST_Y:ud // Write 2 GRFs to DEST_Y bottom field + (-f0.1) mov (1) MSGDSC MSG_LEN(2)+DWBWMSGDSC_WC+ENMSGDSCTF+BI_DEST_Y:ud // Write 2 GRFs to DEST_Y top field + +#endif + + send (8) WritebackResponse(0)<1> MSGHDR MSGSRC<8;8,1>:ud DAPWRITE MSGDSC +// End of save_Top_Y_16x4.asm diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/save_Top_Y_16x4_Mbaff.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/save_Top_Y_16x4_Mbaff.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/save_Top_Y_16x4_Mbaff.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/save_Top_Y_16x4_Mbaff.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,69 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Module name: save_Top_Y_16x4.asm +// +// Save a Y 16x4 block +// +//---------------------------------------------------------------- +// Symbols need to be defined before including this module +// +// Source region in :ud +// SRC_YD: SRC_YD Base=rxx ElementSize=4 SrcRegion=REGION(8,1) Type=ud // 2 GRFs +// +// Binding table index: +// BI_DEST_Y: Binding table index of Y surface +// +//---------------------------------------------------------------- + +#if defined(_DEBUG) + mov (1) EntrySignatureC:w 0xDDD5:w +#endif + + and.z.f0.1 (16) NULLREGW DualFieldMode<0;1,0>:w 1:w + + // FieldModeCurrentMbFlag determines how to access above MB + and.z.f0.0 (1) null:w r[ECM_AddrReg, BitFlags]:ub FieldModeCurrentMbFlag:w + + mov (2) MSGSRC.0<1>:ud ORIX_TOP<2;2,1>:w { NoDDClr } // Block origin + mov (1) MSGSRC.2<1>:ud 0x0003000F:ud { NoDDChk } // Block width and height (16x4) + + // Pack Y + // Dual field mode + (f0.1) mov (16) MSGPAYLOADD(0)<1> PREV_MB_YD(0) // Compressed inst + (-f0.1) mov (16) MSGPAYLOADD(0)<1> PREV_MB_YD(2) // for dual field mode, write last 4 rows + + // Set message descriptor + + and.nz.f0.1 (1) NULLREGW BitFields:w BotFieldFlag:w + + (f0.0) if (1) ELSE_Y_16x4_SAVE + + // Frame picture + mov (1) MSGDSC MSG_LEN(2)+DWBWMSGDSC_WC+BI_DEST_Y:ud // Write 2 GRFs to DEST_Y + + // Add vertical offset 16 for bot MB in MBAFF mode + (f0.1) add (1) MSGSRC.1:d MSGSRC.1:d 16:w + +ELSE_Y_16x4_SAVE: + else (1) ENDIF_Y_16x4_SAVE + + asr (1) MSGSRC.1:d ORIY_CUR:w 1:w // Reduce y by half in field access mode + + // Field picture + (f0.1) mov (1) MSGDSC MSG_LEN(2)+DWBWMSGDSC_WC+ENMSGDSCBF+BI_DEST_Y:ud // Write 2 GRFs to DEST_Y bottom field + (-f0.1) mov (1) MSGDSC MSG_LEN(2)+DWBWMSGDSC_WC+ENMSGDSCTF+BI_DEST_Y:ud // Write 2 GRFs to DEST_Y top field + + add (1) MSGSRC.1:d MSGSRC.1:d -4:w // for last 4 rows of above MB + + endif +ENDIF_Y_16x4_SAVE: + + send (8) WritebackResponse(0)<1> MSGHDR MSGSRC<8;8,1>:ud DAPWRITE MSGDSC + +// End of save_Top_Y_16x4.asm diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/SetupVPKernel.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/SetupVPKernel.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/SetupVPKernel.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/SetupVPKernel.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,24 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Modual name: SetupVPKernel.asm +// +// Initial setup for running video-processing kernels +// + +#include "ILDB_header.inc" + +// +// Now, begin source code.... +// + +.code + + mov (8) MSGSRC.0<1>:ud r0.0<8;8,1>:ud // Initialize message payload header with R0 + +// End of SetupVPKernel diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/Transpose_Cur_UV_2x8.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/Transpose_Cur_UV_2x8.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/Transpose_Cur_UV_2x8.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/Transpose_Cur_UV_2x8.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,56 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +////////////////////////////////////////////////////////////////////////////////////////// +// Module name: Transpose_UV_2x8.asm +// +// Transpose UV 2x8 to 8x2 block (2x8U + 2x8V in NV12) +// +//---------------------------------------------------------------------------------------- +// Symbols need to be defined before including this module +// +// Source region is :ub +// SRC_UW: SRC_UB Base=rxx ElementSize=2 SrcRegion=REGION(8,1) Type=uw // 4 GRFs +// +// Temp buffer: +// BUF_W: BUF_W Base=rxx ElementSize=2 SrcRegion=REGION(8,1) Type=uw // 4 GRFs +// +////////////////////////////////////////////////////////////////////////////////////////// + +#if defined(_DEBUG) + mov (1) EntrySignatureC:w 0xDDDB:w +#endif + +// Transpose UV (4x8), right most 2 columns in word +// Use BUF_W(0) as temp buf + +// Src U 8x8 and V 8x8 are mixed. (each pix is specified as yx) +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |17 17 16 16 15 15 14 14 13 13 12 12 11 11 10 10 07 07 06 06 05 05 04 04 03 03 02 02 01 01 00 00| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |37 37 36 36 35 35 34 34 33 33 32 32 31 31 30 30 27 27 26 26 25 25 24 24 23 23 22 22 21 21 20 20| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |57 57 56 56 55 55 54 54 53 53 52 52 51 51 50 50 47 47 46 46 45 45 44 44 43 43 42 42 41 41 40 40| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |77 77 76 76 75 75 74 74 73 73 72 72 71 71 70 70 67 67 66 66 65 65 64 64 63 63 62 62 61 61 60 60| +// +-----------------------+-----------------------+-----------------------+-----------------------+ + +// First step (8) <1>:w <==== <8;2,1>:w +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |77 77 76 76 67 67 66 66 57 57 56 56 47 47 46 46 37 37 36 36 27 27 26 26 17 17 16 16 07 07 06 06| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +mov (8) LEFT_TEMP_W(0,0)<1> SRC_UW(0,6)<8;2,1> { NoDDClr } +mov (8) LEFT_TEMP_W(0,8)<1> SRC_UW(2,6)<8;2,1> { NoDDChk } + +// Second step (16) <1>:w <==== <1;8,2>:w +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |77 77 67 67 57 57 47 47 37 37 27 27 17 17 07 07 76 76 66 66 56 56 46 46 36 36 26 26 16 16 06 06| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +mov (16) LEFT_TEMP_W(1,0)<1> LEFT_TEMP_W(0,0)<1;8,2> + +// UV are now transposed. the result is in BUF_W(1) diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/Transpose_Cur_UV_8x8.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/Transpose_Cur_UV_8x8.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/Transpose_Cur_UV_8x8.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/Transpose_Cur_UV_8x8.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,85 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +////////////////////////////////////////////////////////////////////////////////////////// +// Module name: Transpose_UV_8x8.asm +// +// Transpose a 8x8 UV block. (8x8U + 8x8V) The output is also in NV12 +// +//---------------------------------------------------------------------------------------- +// Symbols need to be defined before including this module +// +// Source region is :ub +// SRC_UW: SRC_UW Base=rxx ElementSize=2 SrcRegion=REGION(8,1) Type=uw // 4 GRFs +// +// Temp buffer: +// BUF_W: BUF_W Base=rxx ElementSize=2 SrcRegion=REGION(8,1) Type=uw // 4 GRFs +// +////////////////////////////////////////////////////////////////////////////////////////// + +#if defined(_DEBUG) + mov (1) EntrySignatureC:w 0xDDDA:w +#endif + +////////////////////////////////////////////////////////////////////////////////////////////////////////// + +// Src U and V are mixed in NV12 format. U on even bytes, V on odd bytes. +// Transpose by treating UV pair as a word. + + +// Src U 8x8 and V 8x8 are mixed. (each pix is specified as yx) +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |17 17 16 16 15 15 14 14 13 13 12 12 11 11 10 10 07 07 06 06 05 05 04 04 03 03 02 02 01 01 00 00| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |37 37 36 36 35 35 34 34 33 33 32 32 31 31 30 30 27 27 26 26 25 25 24 24 23 23 22 22 21 21 20 20| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |57 57 56 56 55 55 54 54 53 53 52 52 51 51 50 50 47 47 46 46 45 45 44 44 43 43 42 42 41 41 40 40| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |77 77 76 76 75 75 74 74 73 73 72 72 71 71 70 70 67 67 66 66 65 65 64 64 63 63 62 62 61 61 60 60| +// +-----------------------+-----------------------+-----------------------+-----------------------+ + +// First step (16) <1>:w <==== <8;4,1>:w +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |33 33 32 32 31 31 30 30 23 23 22 22 21 21 20 20 13 13 12 12 11 11 10 10 03 03 02 02 01 01 00 00| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |73 73 72 72 71 71 70 70 63 63 62 62 61 61 60 60 53 53 52 52 51 51 50 50 43 43 42 42 41 41 40 40| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |37 37 36 36 35 35 34 34 27 27 26 26 25 25 24 24 17 17 16 16 15 15 14 14 07 07 06 06 05 05 04 04| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |77 77 76 76 75 75 74 74 67 67 66 66 65 65 64 64 57 57 56 56 55 55 54 54 47 47 46 46 45 45 44 44| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// +// Transpose UV (8x8 words), The first step +mov (16) CUR_TEMP_W(0,0)<1> SRC_UW(0,0)<8;4,1> +mov (16) CUR_TEMP_W(1,0)<1> SRC_UW(2,0)<8;4,1> +mov (16) CUR_TEMP_W(2,0)<1> SRC_UW(0,4)<8;4,1> +mov (16) CUR_TEMP_W(3,0)<1> SRC_UW(2,4)<8;4,1> + + +// Second step (16) <1>:w <=== <16;4,4>:w +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |71 71 61 61 51 51 41 41 31 31 21 21 11 11 01 01 70 70 60 60 50 50 40 40 30 30 20 20 10 10 00 00| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |73 73 63 63 53 53 43 43 33 33 23 23 13 13 03 03 72 72 62 62 52 52 42 42 32 32 22 22 12 12 02 02| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |75 75 65 65 55 55 45 45 35 35 25 25 15 15 05 05 74 74 64 64 54 54 44 44 34 34 24 24 14 14 04 04| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |77 77 67 67 57 57 47 47 37 37 27 27 17 17 07 07 76 76 66 66 56 56 46 46 36 36 26 26 16 16 06 06| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// +// Transpose UV (8x8 words), The second step +mov (8) SRC_UW(0,0)<1> CUR_TEMP_W(0,0)<16;4,4> { NoDDClr } +mov (8) SRC_UW(0,8)<1> CUR_TEMP_W(0,1)<16;4,4> { NoDDChk } +mov (8) SRC_UW(1,0)<1> CUR_TEMP_W(0,2)<16;4,4> { NoDDClr } +mov (8) SRC_UW(1,8)<1> CUR_TEMP_W(0,3)<16;4,4> { NoDDChk } +mov (8) SRC_UW(2,0)<1> CUR_TEMP_W(2,0)<16;4,4> { NoDDClr } +mov (8) SRC_UW(2,8)<1> CUR_TEMP_W(2,1)<16;4,4> { NoDDChk } +mov (8) SRC_UW(3,0)<1> CUR_TEMP_W(2,2)<16;4,4> { NoDDClr } +mov (8) SRC_UW(3,8)<1> CUR_TEMP_W(2,3)<16;4,4> { NoDDChk } + +// U and V are now transposed and separated. diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/Transpose_Cur_UV_Right_Most_2x8.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/Transpose_Cur_UV_Right_Most_2x8.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/Transpose_Cur_UV_Right_Most_2x8.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/Transpose_Cur_UV_Right_Most_2x8.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,25 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Transpose Cur MB Right Most 2x8 to 8x2 +// Assume source is LEFT_TEMP_W(0), and detination is LEFT_TEMP_W(1) + +// Input from dport for transpose: +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |71 71 70 70 61 61 60 60 51 51 50 50 41 41 40 40 31 31 30 30 21 21 20 20 11 11 10 10 01 01 00 00| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// +// Output of transpose: <1> <=== <16;8,2>:w +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |71 71 61 61 51 51 41 41 31 31 21 21 11 11 01 01 70 70 60 60 50 50 40 40 30 30 20 20 10 10 00 00| +// +-----------------------+-----------------------+-----------------------+-----------------------+ + +// mov (8) LEFT_TEMP_W(1,0)<1> LEFT_TEMP_W(0,0)<16;8,2> { NoDDClr } +// mov (8) LEFT_TEMP_W(1,8)<1> LEFT_TEMP_W(0,1)<16;8,2> { NoDDChk } + + mov (16) LEFT_TEMP_W(1,0)<1> LEFT_TEMP_W(0,0)<1;8,2> diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/Transpose_Cur_Y_16x16.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/Transpose_Cur_Y_16x16.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/Transpose_Cur_Y_16x16.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/Transpose_Cur_Y_16x16.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,74 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +////////////////////////////////////////////////////////////////////////////////////////// +// Module name: Transpose_Y_16x16.asm +// +// Transpose Y 16x16 block. +// +//---------------------------------------------------------------------------------------- +// Symbols need to be defined before including this module +// +// Source region is :ub +// SRC_YB: SRC_YB Base=rxx ElementSize=1 SrcRegion=REGION(16,1) Type=ub // 8 GRFs +// +// Temp buffer: +// CUR_TEMP_B: BUF_B Base=rxx ElementSize=1 SrcRegion=REGION(16,1) Type=ub // 8 GRFs +// +////////////////////////////////////////////////////////////////////////////////////////// + +#if defined(_DEBUG) + mov (1) EntrySignatureC:w 0xDDDA:w +#endif + + +// Transpose Y (16x16 bytes) + +// The first step +mov (16) CUR_TEMP_B(0,0)<1> SRC_YB(0,0)<16;4,1> { NoDDClr } +mov (16) CUR_TEMP_B(0,16)<1> SRC_YB(2,0)<16;4,1> { NoDDChk } +mov (16) CUR_TEMP_B(1,0)<1> SRC_YB(4,0)<16;4,1> { NoDDClr } +mov (16) CUR_TEMP_B(1,16)<1> SRC_YB(6,0)<16;4,1> { NoDDChk } + +mov (16) CUR_TEMP_B(2,0)<1> SRC_YB(0,4)<16;4,1> { NoDDClr } +mov (16) CUR_TEMP_B(2,16)<1> SRC_YB(2,4)<16;4,1> { NoDDChk } +mov (16) CUR_TEMP_B(3,0)<1> SRC_YB(4,4)<16;4,1> { NoDDClr } +mov (16) CUR_TEMP_B(3,16)<1> SRC_YB(6,4)<16;4,1> { NoDDChk } + +mov (16) CUR_TEMP_B(4,0)<1> SRC_YB(0,8)<16;4,1> { NoDDClr } +mov (16) CUR_TEMP_B(4,16)<1> SRC_YB(2,8)<16;4,1> { NoDDChk } +mov (16) CUR_TEMP_B(5,0)<1> SRC_YB(4,8)<16;4,1> { NoDDClr } +mov (16) CUR_TEMP_B(5,16)<1> SRC_YB(6,8)<16;4,1> { NoDDChk } + +mov (16) CUR_TEMP_B(6,0)<1> SRC_YB(0,12)<16;4,1> { NoDDClr } +mov (16) CUR_TEMP_B(6,16)<1> SRC_YB(2,12)<16;4,1> { NoDDChk } +mov (16) CUR_TEMP_B(7,0)<1> SRC_YB(4,12)<16;4,1> { NoDDClr } +mov (16) CUR_TEMP_B(7,16)<1> SRC_YB(6,12)<16;4,1> { NoDDChk } + +// The second step +mov (16) SRC_YB(0,0)<1> CUR_TEMP_B(0,0)<32;8,4> { NoDDClr } +mov (16) SRC_YB(0,16)<1> CUR_TEMP_B(0,1)<32;8,4> { NoDDChk } +mov (16) SRC_YB(1,0)<1> CUR_TEMP_B(0,2)<32;8,4> { NoDDClr } +mov (16) SRC_YB(1,16)<1> CUR_TEMP_B(0,3)<32;8,4> { NoDDChk } + +mov (16) SRC_YB(2,0)<1> CUR_TEMP_B(2,0)<32;8,4> { NoDDClr } +mov (16) SRC_YB(2,16)<1> CUR_TEMP_B(2,1)<32;8,4> { NoDDChk } +mov (16) SRC_YB(3,0)<1> CUR_TEMP_B(2,2)<32;8,4> { NoDDClr } +mov (16) SRC_YB(3,16)<1> CUR_TEMP_B(2,3)<32;8,4> { NoDDChk } + +mov (16) SRC_YB(4,0)<1> CUR_TEMP_B(4,0)<32;8,4> { NoDDClr } +mov (16) SRC_YB(4,16)<1> CUR_TEMP_B(4,1)<32;8,4> { NoDDChk } +mov (16) SRC_YB(5,0)<1> CUR_TEMP_B(4,2)<32;8,4> { NoDDClr } +mov (16) SRC_YB(5,16)<1> CUR_TEMP_B(4,3)<32;8,4> { NoDDChk } + +mov (16) SRC_YB(6,0)<1> CUR_TEMP_B(6,0)<32;8,4> { NoDDClr } +mov (16) SRC_YB(6,16)<1> CUR_TEMP_B(6,1)<32;8,4> { NoDDChk } +mov (16) SRC_YB(7,0)<1> CUR_TEMP_B(6,2)<32;8,4> { NoDDClr } +mov (16) SRC_YB(7,16)<1> CUR_TEMP_B(6,3)<32;8,4> { NoDDChk } + +// Y is transposed. diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/Transpose_Cur_Y_4x16.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/Transpose_Cur_Y_4x16.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/Transpose_Cur_Y_4x16.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/Transpose_Cur_Y_4x16.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,75 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +////////////////////////////////////////////////////////////////////////////////////////// +// Module name: Transpose_Y_4x16.asm +// +// Transpose a 4x16 internal planar to 16x4 internal planar block. +// The src block is 16x16. Right moft 4 columns are transposed. +// +//---------------------------------------------------------------------------------------- +// Symbols need to be defined before including this module +// +// Source region is :ub +// SRC_YB: SRC_YB Base=rxx ElementSize=1 SrcRegion=REGION(16,1) Type=ub // 8 GRFs +// +// Temp buffer: +// BUF_B: BUF_B Base=rxx ElementSize=1 SrcRegion=REGION(16,1) Type=ub // 8 GRFs +// +////////////////////////////////////////////////////////////////////////////////////////// + +#if defined(_DEBUG) + mov (1) EntrySignatureC:w 0xDDDB:w +#endif + +// Transpose Y (4x16) right most 4 columns +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |1f 1e 1d 1c 1b 1a 19 18 17 16 15 14 13 12 11 10 0f 0e 0d 0c 0b 0a 09 08 07 06 05 04 03 02 01 00| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |3f 3e 3d 3c 3b 3a 39 38 37 36 35 34 33 32 31 30 2f 2e 2d 2c 2b 2a 29 28 27 26 25 24 23 22 21 20| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |5f 5e 5d 5c 5b 5a 59 58 57 56 55 54 53 52 51 50 4f 4e 4d 4c 4b 4a 49 48 47 46 45 44 43 42 41 40| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |7f 7e 7d 7c 7b 7a 79 78 77 76 75 74 73 72 71 70 6f 6e 6d 6c 6b 6a 69 68 67 66 65 64 63 62 61 60| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |9f 9e 9d 9c 9b 9a 99 98 97 96 95 94 93 92 91 90 8f 8e 8d 8c 8b 8a 89 88 87 86 85 84 83 82 81 80| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |bf be bd bc bb ba b9 b8 b7 b6 b5 b4 b3 b2 b1 b0 af ae ad ac ab aa a9 a8 a7 a6 a5 a4 a3 a2 a1 a0| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |df de dd dc db da d9 d8 d7 d6 d5 d4 d3 d2 d1 d0 cf ce cd cc cb ca c9 c8 c7 c6 c5 c4 c3 c2 c1 c0| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |ff fe fd fc fb fa f9 f8 f7 f6 f5 f4 f3 f2 f1 f0 ef ee ed ec eb ea e9 e8 e7 e6 e5 e4 e3 e2 e1 e0| +// +-----------------------+-----------------------+-----------------------+-----------------------+ + +// The first step +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |7f 7e 7d 7c 6f 6e 6d 6c 5f 5e 5d 5c 4f 4e 4d 4c 3f 3e 3d 3c 2f 2e 2d 2c 1f 1e 1d 1c 0f 0e 0d 0c| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |ff fe fd fc ef ee ed ec df de dd dc cf ce cd cc bf be bd bc af ae ad ac 9f 9e 9d 9c 8f 8e 8d 8c| +// +-----------------------+-----------------------+-----------------------+-----------------------+ + +// The second step +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |fd ed dd cd bd ad 9d 8d 7d 6d 5d 4d 3d 2d 1d 0d fc ec dc cc bc ac 9c 8c 7c 6c 5c 4c 3c 2c 1c 0c| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |ff ef df cf bf af 9f 8f 7f 6f 5f 4f 3f 2f 1f 0f fe ee de ce be ae 9e 8e 7e 6e 5e 4e 3e 2e 1e 0e| +// +-----------------------+-----------------------+-----------------------+-----------------------+ + + +mov (16) LEFT_TEMP_B(0,0)<1> SRC_YB(0,12)<16;4,1> { NoDDClr } +mov (16) LEFT_TEMP_B(0,16)<1> SRC_YB(2,12)<16;4,1> { NoDDChk } +mov (16) LEFT_TEMP_B(1,0)<1> SRC_YB(4,12)<16;4,1> { NoDDClr } +mov (16) LEFT_TEMP_B(1,16)<1> SRC_YB(6,12)<16;4,1> { NoDDChk } + +// The second step +mov (16) LEFT_TEMP_B(2,0)<1> LEFT_TEMP_B(0,0)<32;8,4> { NoDDClr } +mov (16) LEFT_TEMP_B(2,16)<1> LEFT_TEMP_B(0,1)<32;8,4> { NoDDChk } +mov (16) LEFT_TEMP_B(3,0)<1> LEFT_TEMP_B(0,2)<32;8,4> { NoDDClr } +mov (16) LEFT_TEMP_B(3,16)<1> LEFT_TEMP_B(0,3)<32;8,4> { NoDDChk } + +// Y is now transposed. the result is in LEFT_TEMP_B(2) and LEFT_TEMP_B(3). diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/Transpose_Cur_Y_Right_Most_4x16.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/Transpose_Cur_Y_Right_Most_4x16.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/Transpose_Cur_Y_Right_Most_4x16.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/Transpose_Cur_Y_Right_Most_4x16.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,31 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Transpose cur Y right most 4x16 to 16x4 +// Assume source is LEFT_TEMP_B(0), and detination is LEFT_TEMP_B(2) + + +// Input received from dport: +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |73 72 71 70 63 62 61 60 53 52 51 50 43 42 41 40 33 32 31 30 23 22 21 20 13 12 11 10 03 02 01 00| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |f3 f2 f1 f0 e3 e2 e1 e0 d3 d2 d1 d0 c3 c2 c1 c0 b3 b2 b1 b0 a3 a2 a1 a0 93 92 91 90 83 82 81 80| +// +-----------------------+-----------------------+-----------------------+-----------------------+ + +// Output of transpose: <1> <= <32;8,4> +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |f1 e1 d1 c1 b1 a1 91 81 71 61 51 41 31 21 11 01 f0 e0 d0 c0 b0 a0 90 80 70 60 50 40 30 20 10 00| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |f3 e3 d3 c3 b3 a3 93 83 73 63 53 43 33 23 13 03 f2 e2 d2 c2 b2 a2 92 82 72 62 52 42 32 22 12 02| +// +-----------------------+-----------------------+-----------------------+-----------------------+ + + // Transpose the data, also occupy 2 GRFs + mov (16) LEFT_TEMP_B(2)<1> LEFT_TEMP_B(0, 0)<32;8,4> { NoDDClr } + mov (16) LEFT_TEMP_B(2, 16)<1> LEFT_TEMP_B(0, 1)<32;8,4> { NoDDChk } + mov (16) LEFT_TEMP_B(3)<1> LEFT_TEMP_B(0, 2)<32;8,4> { NoDDClr } + mov (16) LEFT_TEMP_B(3, 16)<1> LEFT_TEMP_B(0, 3)<32;8,4> { NoDDChk } diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/Transpose_Left_UV_2x8.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/Transpose_Left_UV_2x8.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/Transpose_Left_UV_2x8.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/Transpose_Left_UV_2x8.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,28 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Transpose left MB 2x8 to 8x2 +// Assume source is LEFT_TEMP_W, and detination is PREV_MB_UW + +// Input from dport for transpose: +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |71 71 70 70 61 61 60 60 51 51 50 50 41 41 40 40 31 31 30 30 21 21 20 20 11 11 10 10 01 01 00 00| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// +// Output of transpose: <1> <=== <16;8,2>:w +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |71 71 61 61 51 51 41 41 31 31 21 21 11 11 01 01 70 70 60 60 50 50 40 40 30 30 20 20 10 10 00 00| +// +-----------------------+-----------------------+-----------------------+-----------------------+ + +// mov (8) PREV_MB_UW(0,0)<1> BUF_W(0,0)<16;8,2> { NoDDClr } +// mov (8) PREV_MB_UW(0,8)<1> BUF_W(0,1)<16;8,2> { NoDDChk } + +// mov (8) PREV_MB_UW(0,0)<1> LEFT_TEMP_W(0,0)<16;8,2> { NoDDClr } +// mov (8) PREV_MB_UW(0,8)<1> LEFT_TEMP_W(0,1)<16;8,2> { NoDDChk } + + mov (16) PREV_MB_UW(0,0)<1> LEFT_TEMP_W(0,0)<1;8,2> diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/Transpose_Left_Y_4x16.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/Transpose_Left_Y_4x16.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/Transpose_Left_Y_4x16.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/Transpose_Left_Y_4x16.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,31 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Transpose left MB 4x16 to 16x4 +// Assume source is LEFT_TEMP_B, and detination is PREV_MB_YB + + +// Input received from dport: +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |73 72 71 70 63 62 61 60 53 52 51 50 43 42 41 40 33 32 31 30 23 22 21 20 13 12 11 10 03 02 01 00| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |f3 f2 f1 f0 e3 e2 e1 e0 d3 d2 d1 d0 c3 c2 c1 c0 b3 b2 b1 b0 a3 a2 a1 a0 93 92 91 90 83 82 81 80| +// +-----------------------+-----------------------+-----------------------+-----------------------+ + +// Output of transpose: <1> <= <32;8,4> +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |f1 e1 d1 c1 b1 a1 91 81 71 61 51 41 31 21 11 01 f0 e0 d0 c0 b0 a0 90 80 70 60 50 40 30 20 10 00| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |f3 e3 d3 c3 b3 a3 93 83 73 63 53 43 33 23 13 03 f2 e2 d2 c2 b2 a2 92 82 72 62 52 42 32 22 12 02| +// +-----------------------+-----------------------+-----------------------+-----------------------+ + + // Transpose the data, also occupy 2 GRFs + mov (16) PREV_MB_YB(0)<1> LEFT_TEMP_B(0, 0)<32;8,4> { NoDDClr } + mov (16) PREV_MB_YB(0, 16)<1> LEFT_TEMP_B(0, 1)<32;8,4> { NoDDChk } + mov (16) PREV_MB_YB(1)<1> LEFT_TEMP_B(0, 2)<32;8,4> { NoDDClr } + mov (16) PREV_MB_YB(1, 16)<1> LEFT_TEMP_B(0, 3)<32;8,4> { NoDDChk } diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/TransposeNV12_16x16.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/TransposeNV12_16x16.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/TransposeNV12_16x16.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/TransposeNV12_16x16.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,135 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +////////////////////////////////////////////////////////////////////////////////////////// +// Module name: TransposeNV12_16x16.asm +// +// Transpose a 16x16 NV12 MB. The output is also in NV12 +// +//---------------------------------------------------------------------------------------- +// Symbols need to be defined before including this module +// +// Source region is :ub +// SRC_YB: SRC_YB Base=rxx ElementSize=1 SrcRegion=REGION(16,1) Type=ub // 8 GRFs +// SRC_UW: SRC_UW Base=rxx ElementSize=2 SrcRegion=REGION(8,1) Type=uw // 4 GRFs +// +// Temp buffer: +// BUF_B: BUF_B Base=rxx ElementSize=1 SrcRegion=REGION(16,1) Type=ub // 8 GRFs +// BUF_W: BUF_W Base=rxx ElementSize=2 SrcRegion=REGION(8,1) Type=uw // 4 GRFs +// +////////////////////////////////////////////////////////////////////////////////////////// + +#if defined(_DEBUG) + mov (1) EntrySignatureC:w 0xDDDA:w +#endif + + +// Transpose Y (16x16 bytes) + +// The first step +mov (16) BUF_B(0,0)<1> SRC_YB(0,0)<16;4,1> +mov (16) BUF_B(0,16)<1> SRC_YB(2,0)<16;4,1> +mov (16) BUF_B(1,0)<1> SRC_YB(4,0)<16;4,1> +mov (16) BUF_B(1,16)<1> SRC_YB(6,0)<16;4,1> + +mov (16) BUF_B(2,0)<1> SRC_YB(0,4)<16;4,1> +mov (16) BUF_B(2,16)<1> SRC_YB(2,4)<16;4,1> +mov (16) BUF_B(3,0)<1> SRC_YB(4,4)<16;4,1> +mov (16) BUF_B(3,16)<1> SRC_YB(6,4)<16;4,1> + +mov (16) BUF_B(4,0)<1> SRC_YB(0,8)<16;4,1> +mov (16) BUF_B(4,16)<1> SRC_YB(2,8)<16;4,1> +mov (16) BUF_B(5,0)<1> SRC_YB(4,8)<16;4,1> +mov (16) BUF_B(5,16)<1> SRC_YB(6,8)<16;4,1> + +mov (16) BUF_B(6,0)<1> SRC_YB(0,12)<16;4,1> +mov (16) BUF_B(6,16)<1> SRC_YB(2,12)<16;4,1> +mov (16) BUF_B(7,0)<1> SRC_YB(4,12)<16;4,1> +mov (16) BUF_B(7,16)<1> SRC_YB(6,12)<16;4,1> + +// The second step +mov (16) SRC_YB(0,0)<1> BUF_B(0,0)<32;8,4> +mov (16) SRC_YB(0,16)<1> BUF_B(0,1)<32;8,4> +mov (16) SRC_YB(1,0)<1> BUF_B(0,2)<32;8,4> +mov (16) SRC_YB(1,16)<1> BUF_B(0,3)<32;8,4> + +mov (16) SRC_YB(2,0)<1> BUF_B(2,0)<32;8,4> +mov (16) SRC_YB(2,16)<1> BUF_B(2,1)<32;8,4> +mov (16) SRC_YB(3,0)<1> BUF_B(2,2)<32;8,4> +mov (16) SRC_YB(3,16)<1> BUF_B(2,3)<32;8,4> + +mov (16) SRC_YB(4,0)<1> BUF_B(4,0)<32;8,4> +mov (16) SRC_YB(4,16)<1> BUF_B(4,1)<32;8,4> +mov (16) SRC_YB(5,0)<1> BUF_B(4,2)<32;8,4> +mov (16) SRC_YB(5,16)<1> BUF_B(4,3)<32;8,4> + +mov (16) SRC_YB(6,0)<1> BUF_B(6,0)<32;8,4> +mov (16) SRC_YB(6,16)<1> BUF_B(6,1)<32;8,4> +mov (16) SRC_YB(7,0)<1> BUF_B(6,2)<32;8,4> +mov (16) SRC_YB(7,16)<1> BUF_B(6,3)<32;8,4> + +// Y is transposed. + + +////////////////////////////////////////////////////////////////////////////////////////////////////////// + +// Src U and V are mixed in NV12 format. U on even bytes, V on odd bytes. +// Transpose by treating UV pair as a word. + + +// Src U 8x8 and V 8x8 are mixed. (each pix is specified as yx) +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |17 17 16 16 15 15 14 14 13 13 12 12 11 11 10 10 07 07 06 06 05 05 04 04 03 03 02 02 01 01 00 00| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |37 37 36 36 35 35 34 34 33 33 32 32 31 31 30 30 27 27 26 26 25 25 24 24 23 23 22 22 21 21 20 20| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |57 57 56 56 55 55 54 54 53 53 52 52 51 51 50 50 47 47 46 46 45 45 44 44 43 43 42 42 41 41 40 40| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |77 77 76 76 75 75 74 74 73 73 72 72 71 71 70 70 67 67 66 66 65 65 64 64 63 63 62 62 61 61 60 60| +// +-----------------------+-----------------------+-----------------------+-----------------------+ + +// First step (16) <1>:w <==== <8;4,1>:w +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |33 33 32 32 31 31 30 30 23 23 22 22 21 21 20 20 13 13 12 12 11 11 10 10 03 03 02 02 01 01 00 00| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |73 73 72 72 71 71 70 70 63 63 62 62 61 61 60 60 53 53 52 52 51 51 50 50 43 43 42 42 41 41 40 40| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |37 37 36 36 35 35 34 34 27 27 26 26 25 25 24 24 17 17 16 16 15 15 14 14 07 07 06 06 05 05 04 04| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |77 77 76 76 75 75 74 74 67 67 66 66 65 65 64 64 57 57 56 56 55 55 54 54 47 47 46 46 45 45 44 44| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// +// Transpose UV (8x8 words), The first step +mov (16) BUF_W(0,0)<1> SRC_UW(0,0)<8;4,1> +mov (16) BUF_W(1,0)<1> SRC_UW(2,0)<8;4,1> +mov (16) BUF_W(2,0)<1> SRC_UW(0,4)<8;4,1> +mov (16) BUF_W(3,0)<1> SRC_UW(2,4)<8;4,1> + + +// Second step (16) <1>:w <=== <16;4,4>:w +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |71 71 61 61 51 51 41 41 31 31 21 21 11 11 01 01 70 70 60 60 50 50 40 40 30 30 20 20 10 10 00 00| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |73 73 63 63 53 53 43 43 33 33 23 23 13 13 03 03 72 72 62 62 52 52 42 42 32 32 22 22 12 12 02 02| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |75 75 65 65 55 55 45 45 35 35 25 25 15 15 05 05 74 74 64 64 54 54 44 44 34 34 24 24 14 14 04 04| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |77 77 67 67 57 57 47 47 37 37 27 27 17 17 07 07 76 76 66 66 56 56 46 46 36 36 26 26 16 16 06 06| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// +// Transpose UV (8x8 words), The second step +mov (8) SRC_UW(0,0)<1> BUF_W(0,0)<16;4,4> +mov (8) SRC_UW(0,8)<1> BUF_W(0,1)<16;4,4> +mov (8) SRC_UW(1,0)<1> BUF_W(0,2)<16;4,4> +mov (8) SRC_UW(1,8)<1> BUF_W(0,3)<16;4,4> +mov (8) SRC_UW(2,0)<1> BUF_W(2,0)<16;4,4> +mov (8) SRC_UW(2,8)<1> BUF_W(2,1)<16;4,4> +mov (8) SRC_UW(3,0)<1> BUF_W(2,2)<16;4,4> +mov (8) SRC_UW(3,8)<1> BUF_W(2,3)<16;4,4> + +// U and V are now transposed and separated. diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/TransposeNV12_4x16.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/TransposeNV12_4x16.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/TransposeNV12_4x16.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/TransposeNV12_4x16.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,94 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +////////////////////////////////////////////////////////////////////////////////////////// +// Module name: TransposeNV12_4x16.asm +// +// Transpose a 4x16 internal planar to 16x4 internal planar block +// +//---------------------------------------------------------------------------------------- +// Symbols need to be defined before including this module +// +// Source region is :ub +// SRC_YB: SRC_YB Base=rxx ElementSize=1 SrcRegion=REGION(16,1) Type=ub // 8 GRFs +// SRC_UW: SRC_UB Base=rxx ElementSize=2 SrcRegion=REGION(8,1) Type=uw // 4 GRFs +// +// Temp buffer: +// BUF_B: BUF_B Base=rxx ElementSize=1 SrcRegion=REGION(16,1) Type=ub // 8 GRFs +// BUF_W: BUF_W Base=rxx ElementSize=2 SrcRegion=REGION(8,1) Type=uw // 4 GRFs +// +////////////////////////////////////////////////////////////////////////////////////////// + +#if defined(_DEBUG) + mov (1) EntrySignatureC:w 0xDDDB:w +#endif + +// Transpose Y (4x16) right most 4 columns + +// The first step +mov (16) BUF_B(0,0)<1> SRC_YB(0,0)<16;4,1> // Read 2 rows, write 1 row +mov (16) BUF_B(0,16)<1> SRC_YB(2,0)<16;4,1> +mov (16) BUF_B(1,0)<1> SRC_YB(4,0)<16;4,1> +mov (16) BUF_B(1,16)<1> SRC_YB(6,0)<16;4,1> + +// The second step +mov (16) BUF_B(2,0)<1> BUF_B(0,0)<32;8,4> // Read 2 rows, write 1 row +mov (16) BUF_B(2,16)<1> BUF_B(0,1)<32;8,4> +mov (16) BUF_B(3,0)<1> BUF_B(0,2)<32;8,4> +mov (16) BUF_B(3,16)<1> BUF_B(0,3)<32;8,4> + +// Y is now transposed. the result is in BUF_B(2) and BUF_B(3). + + + +// Transpose UV (4x8), right most 2 columns in word +// Use BUF_W(0) as temp buf + +// Src U 8x8 and V 8x8 are mixed. (each pix is specified as yx) +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |17 17 16 16 15 15 14 14 13 13 12 12 11 11 10 10 07 07 06 06 05 05 04 04 03 03 02 02 01 01 00 00| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |37 37 36 36 35 35 34 34 33 33 32 32 31 31 30 30 27 27 26 26 25 25 24 24 23 23 22 22 21 21 20 20| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |57 57 56 56 55 55 54 54 53 53 52 52 51 51 50 50 47 47 46 46 45 45 44 44 43 43 42 42 41 41 40 40| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |77 77 76 76 75 75 74 74 73 73 72 72 71 71 70 70 67 67 66 66 65 65 64 64 63 63 62 62 61 61 60 60| +// +-----------------------+-----------------------+-----------------------+-----------------------+ + +// First step (8) <1>:w <==== <8;2,1>:w +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |71 71 70 70 61 61 60 60 51 51 50 50 41 41 40 40 31 31 30 30 21 21 20 20 11 11 10 10 01 01 00 00| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +mov (8) BUF_W(0,0)<1> SRC_UW(0,0)<8;2,1> +mov (8) BUF_W(0,8)<1> SRC_UW(2,0)<8;2,1> + +// Second step (16) <1>:w <==== <1;8,2>:w +// +-----------------------+-----------------------+-----------------------+-----------------------+ +// |71 71 61 61 51 51 41 41 31 31 21 21 11 11 01 01 70 70 60 60 50 50 40 40 30 30 20 20 10 10 00 00| +// +-----------------------+-----------------------+-----------------------+-----------------------+ +mov (16) BUF_W(1,0)<1> BUF_W(0,0)<1;8,2> + +// UV are now transposed. the result is in BUF_W(1). + + + +//The first step +//mov (16) BUF_B(0,0)<1> SRC_UW(0,0)<8;2,1> // Read 2 rows, write 1 row +// The second step +//mov (8) SRC_UB(4,0)<1> BUF_B(0,0)<16;8,2> // Read 1 row, write 1 row +//mov (8) SRC_UB(4,8)<1> BUF_B(0,1)<16;8,2> // Read 1 row, write 1 row + +// Transpose V (8x8), right most 2 columns +// The first step +//mov (16) BUF_B(0,0)<1> SRC_VB(0,1)<8;2,1> // Read 2 rows, write 1 row +// The second step +//mov (8) SRC_UB(4,16)<1> BUF_B(0,0)<16;8,2> // Read 1 row, write 1 row +//mov (8) SRC_UB(4,24)<1> BUF_B(0,1)<16;8,2> // Read 1 row, write 1 row + +// U and V are now transposed. the result is in BUF_B(4). + diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/writeURB.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/writeURB.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/writeURB.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/writeURB.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,38 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Module name: WriteURB.asm +// +// General purpose module to write data to URB using the URB handle/offset in r0 +// +//---------------------------------------------------------------- +// Assume: +// - a0.0 and a0.1 is meg desc, has been assign with URB offset and msg size +// - MRFs are alrady assigned with data. +//---------------------------------------------------------------- +// +// 16x16 byte pixel block can be saved using just 1 "send" instruction. + +#if defined(_DEBUG) + mov (1) EntrySignature:w 0x3535:w +#endif + +// URB write header: +//mov (8) MSGSRC.0:ud r0.0<8;8,1>:ud // Copy parent R0 header + +//shr (1) Temp2_W:uw URBOffset:uw 1:w // divide by 2, because URB entry is counted by 512bits. Offset is counted by 256bits. +//add (1) MSGSRC.0:uw r0.0:uw Temp2_W:uw + + +shr (1) MSGSRC.0:uw URBOffset:uw 1:w // divide by 2, because URB entry is counted by 512bits. Offset is counted by 256bits. +//mov (1) MSGSRC.0:uw URBOffset_2:uw + +//mov (1) MSGSRC.1:ud 0:ud // Reset Handle 1 + +send null:uw m0 MSGSRC<8;8,1>:uw URBWRITE URBWriteMsgDesc:ud // URB write +//send null:ud MRF0 null:ud URBWriteMsgDesc:ud // URB write diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/writeURB_UV_Child.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/writeURB_UV_Child.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/writeURB_UV_Child.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/writeURB_UV_Child.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,39 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Module name: WriteURB_Child.asm +// +// General purpose module to write data to URB using the URB handle/offset in r0 +// +//---------------------------------------------------------------- +// Assume: +// - a0.0 and a0.1 is meg desc, has been assign with URB offset and msg size +// - MRFs are alrady assigned with data. +//---------------------------------------------------------------- +// +// 16x16 byte pixel block can be saved using just 1 "send" instruction. + +#if defined(_DEBUG) + mov (1) EntrySignatureC:w 0x3535:w +#endif + +// URB write header: +//mov (8) MSGSRC.0:ud r0.0<8;8,1>:ud // Copy parent R0 header + +//shr (1) Temp2_W:uw URBOffsetC:uw 1:w // divide by 2, because URB entry is counted by 512bits. Offset is counted by 256bits. +//add (1) MSGSRC.0:uw r0.0:uw Temp2_W:uw + +shr (1) MSGSRC.0:uw URBOffsetC:uw 1:w // divide by 2, because URB entry is counted by 512bits. Offset is counted by 256bits. + +//mov (1) MSGSRC.1:ud 0:ud // Reset Handle 1 + + // URB write 1 MRFs, + // Current MB offset is in URBOffset, use it as write origin + // Add 2 to offset to store data be be passed to the right MB + +send null:uw m0 MSGSRC<8;8,1>:uw URBWRITE MSG_LEN(1)+URBWMSGDSC+0x20 // URB write diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/ildb/writeURB_Y_Child.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/writeURB_Y_Child.asm --- libva-1.0.1/i965_drv_video/shaders/h264/ildb/writeURB_Y_Child.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/ildb/writeURB_Y_Child.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,40 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Module name: WriteURB_Child.asm +// +// General purpose module to write data to URB using the URB handle/offset in r0 +// +//---------------------------------------------------------------- +// Assume: +// - a0.0 and a0.1 is meg desc, has been assign with URB offset and msg size +// - MRFs are alrady assigned with data. +//---------------------------------------------------------------- +// +// 16x16 byte pixel block can be saved using just 1 "send" instruction. + +#if defined(_DEBUG) + mov (1) EntrySignatureC:w 0x3535:w +#endif + +// URB write header: +//mov (8) MSGSRC.0:ud r0.0<8;8,1>:ud // Copy parent R0 header + +//shr (1) Temp2_W:uw URBOffsetC:uw 1:w // divide by 2, because URB entry is counted by 512bits. Offset is counted by 256bits. +//add (1) MSGSRC.0:uw r0.0:uw Temp2_W:uw + +shr (1) MSGSRC.0:uw URBOffsetC:uw 1:w // divide by 2, because URB entry is counted by 512bits. Offset is counted by 256bits. + +//mov (1) MSGSRC.1:ud 0:ud // Reset Handle 1 + + // URB write 2 MRFs, + // Current MB offset is in URBOffset, use it as write origin + // Add 2 to offset to store data be be passed to the right MB + //mov (1) URBWriteMsgDesc:ud 0x06300020:ud + +send null:uw m0 MSGSRC<8;8,1>:uw URBWRITE MSG_LEN(2)+URBWMSGDSC+0x20 // URB write diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/Makefile.am libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/Makefile.am --- libva-1.0.1/i965_drv_video/shaders/h264/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/Makefile.am 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1 @@ +SUBDIRS = mc diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/add_Error_16x16_Y.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/add_Error_16x16_Y.asm --- libva-1.0.1/i965_drv_video/shaders/h264/mc/add_Error_16x16_Y.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/add_Error_16x16_Y.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,51 @@ +/* + * Add macroblock correction Y data blocks to predicted picture + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ + +// Module name: add_Error_16x16_Y.asm +// +// Add macroblock correction Y data blocks to predicted picture +// + +// Every line of predicted Y data is added to Y error data if CBP bit is set + + mov (1) PERROR_UD<1>:ud 0x10001*ERRBUF*GRFWIB+0x00100000:ud // Pointers to first and second row of error block + + and.z.f0.1 (1) NULLREG REG_CBPCY CBP_Y_MASK + (f0.1) jmpi (1) End_add_Error_16x16_Y // Skip all blocks + +// Block Y0 +// + $for(0,0; <8; 2,1) { + add.sat (16) DEC_Y(%1)<2> r[PERROR,%2*GRFWIB]REGION(8,1):w PRED_Y(%1)REGION(8,2) {Compr} + } + +// Block Y1 +// + $for(0,0; <8; 2,1) { + add.sat (16) DEC_Y(%1,16)<2> r[PERROR,%2*GRFWIB+0x80]REGION(8,1):w PRED_Y(%1,16)REGION(8,2) {Compr} + } + +// Block Y2 +// + $for(8,0; <16; 2,1) { + add.sat (16) DEC_Y(%1)<2> r[PERROR,%2*GRFWIB+0x100]REGION(8,1):w PRED_Y(%1)REGION(8,2) {Compr} + } + +// Block Y3 +// + $for(8,0; <16; 2,1) { + add.sat (16) DEC_Y(%1,16)<2> r[PERROR,%2*GRFWIB+0x180]REGION(8,1):w PRED_Y(%1,16)REGION(8,2) {Compr} + } + +End_add_Error_16x16_Y: + add (1) PERROR_UD<1>:ud PERROR_UD:ud 0x01800180:ud // Pointers to Y3 error block + +// End of add_Error_16x16_Y + diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/add_Error_UV.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/add_Error_UV.asm --- libva-1.0.1/i965_drv_video/shaders/h264/mc/add_Error_UV.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/add_Error_UV.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,38 @@ +/* + * Add macroblock correction UV data blocks to predicted picture + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ + +#if !defined(__ADD_ERROR_UV__) // Make sure this is only included once +#define __ADD_ERROR_UV__ + +// Module name: add_Error_UV.asm +// +// Add macroblock correction UV data blocks to predicted picture + +// PERROR points to error block Y3 after decoding Y component + +// Update address register used in instruction compression +// + +// U component +// + add (1) PERROR1<1>:w PERROR:w 0x00010:w // Pointers to next error row + $for(0,0; <8; 2,1) { + add.sat (16) DEC_UV(%1)<4> r[PERROR,%2*GRFWIB+0x80]REGION(8,1):w PRED_UV(%1)REGION(8,4) {Compr} + } + +// V component +// + $for(0,0; <8; 2,1) { + add.sat (16) DEC_UV(%1,2)<4> r[PERROR,%2*GRFWIB+0x100]REGION(8,1):w PRED_UV(%1,2)REGION(8,4) {Compr} + } + +// End of add_Error_UV + +#endif // !defined(__ADD_ERROR_UV__) diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/AllAVC.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/AllAVC.asm --- libva-1.0.1/i965_drv_video/shaders/h264/mc/AllAVC.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/AllAVC.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,426 @@ +/* + * All HWMC kernels + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ + +// Kernel name: AllAVC.asm +// +// All HWMC kernels merged into this file +// +// $Revision: 2 $ +// $Date: 9/10/06 2:02a $ +// + +// Note: To enable SW scoreboard for ILK AVC kernels, simply toggle the HW_SCOREBOARD +// and SW_SCOREBOARD definition as described below. +// +// ---------------------------------------------------- +// Main: ALLINTRA +// ---------------------------------------------------- + +#define COMBINED_KERNEL +#define ENABLE_ILDB + +// WA for *Stim tool issue, should be removed later + +#ifdef DEV_ILK +#define INSTFACTOR 2 // 128-bit count as 2 instructions +#else +#define INSTFACTOR 1 // 128-bit is 1 instruction +#endif // DEV_ILK + +#ifdef DEV_CTG + #define SW_SCOREBOARD // SW Scoreboard should be enabled for CTG and earlier + #undef HW_SCOREBOARD // HW Scoreboard should be disabled for CTG and earlier +#else + #define HW_SCOREBOARD // HW Scoreboard should be enabled for ILK and beyond + #undef SW_SCOREBOARD // SW Scoreboard should be disabled for ILK and beyond +#endif // DEV_CTG +#include "export.inc" +#if defined(_EXPORT) + #include "AllAVC_Export.inc" +#elif defined(_BUILD) + #include "AllAVC.ich" // ISAasm dumped .exports + #include "AllAVC_Export.inc" // Keep jumping targets aligned, only for CTG and beyond + #include "AllAVC_Build.inc" +#else +#endif + +.kernel AllAVC + +// Build all intra prediction kernels +// +#ifdef INTRA_16x16_PAD_NENOP + $for(0; +#define _PROGRESSIVE +#define ILDB_LABEL(x) x##_ILDB_FRAME +#ifdef AVC_ILDB_ROOT_Y_ILDB_FRAME_PAD_NENOP + $for(0; +#define _FIELD +#define ILDB_LABEL(x) x##_ILDB_FIELD +#ifdef AVC_ILDB_ROOT_Y_ILDB_FIELD_PAD_NENOP + $for(0; +#define _MBAFF +#define ILDB_LABEL(x) x##_ILDB_MBAFF +#ifdef AVC_ILDB_ROOT_Y_ILDB_MBAFF_PAD_NENOP + $for(0; , Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +$table { +AllAVC_END_IP/INSTFACTOR // Total instruction count +#if (defined(SW_SCOREBOARD) || defined(HW_SCOREBOARD)) && defined(ENABLE_ILDB) +// 23 // Total kernel count +#elif defined(SW_SCOREBOARD) || defined(HW_SCOREBOARD) +// 11 // Total kernel count +#elif defined(ENABLE_ILDB) +// 21 // Total kernel count +#else +// 11 // Total kernel count +#endif +INTRA_16x16_ENTRY/INSTFACTOR // Instruction offset to 'Intra_16x16' +INTRA_8x8_ENTRY/INSTFACTOR // Instruction offset to 'Intra_8x8' +INTRA_4x4_ENTRY/INSTFACTOR // Instruction offset to 'Intra_4x4' +INTRA_PCM_ENTRY/INSTFACTOR // Instruction offset to 'Intra_PCM' +FRAME_MB_ENTRY/INSTFACTOR // Instruction offset to 'FrameMB_Motion' +FIELD_MB_ENTRY/INSTFACTOR // Instruction offset to 'FieldMB_Motion' +MBAFF_MB_ENTRY/INSTFACTOR // Instruction offset to 'MBAff_Motion' +#ifdef SW_SCOREBOARD +SCOREBOARD_ENTRY/INSTFACTOR // Instruction offset to 'scoreboard' +SCOREBOARD_MBAFF_ENTRY/INSTFACTOR // Instruction offset to 'scoreboard_MBAFF' +#elif defined(HW_SCOREBOARD) +SETHWSCOREBOARD_ENTRY/INSTFACTOR // Instruction offset to 'AVC_SetIntraDepend' +SETHWSCOREBOARD_MBAFF_ENTRY/INSTFACTOR // Instruction offset to 'AVC_SetIntraDependMBAFF' +#endif // SW_SCOREBOARD +#ifdef ENABLE_ILDB +AVC_ILDB_ROOT_Y_ILDB_FRAME_ENTRY/INSTFACTOR // Instruction offset to 'AVC_ILDB_Root_Y' +AVC_ILDB_CHILD_Y_ILDB_FRAME_ENTRY/INSTFACTOR // Instruction offset to 'AVC_ILDB_Child_Y' +AVC_ILDB_ROOT_UV_ILDB_FRAME_ENTRY/INSTFACTOR // Instruction offset to 'AVC_ILDB_Root_UV' +AVC_ILDB_CHILD_UV_ILDB_FRAME_ENTRY/INSTFACTOR // Instruction offset to 'AVC_ILDB_Child_UV' +AVC_ILDB_ROOT_Y_ILDB_FIELD_ENTRY/INSTFACTOR // Instruction offset to 'AVC_ILDB_Root_Field_Y' +AVC_ILDB_CHILD_Y_ILDB_FIELD_ENTRY/INSTFACTOR // Instruction offset to 'AVC_ILDB_Child_Field_Y' +AVC_ILDB_ROOT_UV_ILDB_FIELD_ENTRY/INSTFACTOR // Instruction offset to 'AVC_ILDB_Root_Field_UV' +AVC_ILDB_CHILD_UV_ILDB_FIELD_ENTRY/INSTFACTOR // Instruction offset to 'AVC_ILDB_Child_Field_UV' +AVC_ILDB_ROOT_Y_ILDB_MBAFF_ENTRY/INSTFACTOR // Instruction offset to 'AVC_ILDB_Root_Mbaff_Y' +AVC_ILDB_CHILD_Y_ILDB_MBAFF_ENTRY/INSTFACTOR // Instruction offset to 'AVC_ILDB_Child_Mbaff_Y' +AVC_ILDB_ROOT_UV_ILDB_MBAFF_ENTRY/INSTFACTOR // Instruction offset to 'AVC_ILDB_Root_Mbaff_UV' +AVC_ILDB_CHILD_UV_ILDB_MBAFF_ENTRY/INSTFACTOR // Instruction offset to 'AVC_ILDB_Child_Mbaff_UV' +#endif // ENABLE_ILDB +BSDRESET_ENTRY/INSTFACTOR // Instruction offset to 'BSDReset' +DCRESETDUMMY_ENTRY/INSTFACTOR // Instruction offset to 'DCResetDummy' + +// 0 // Instruction offset to Intra_4x4_luma_prediction_mode_0 +INTRA_4X4_HORIZONTAL_IP-INTRA_4X4_VERTICAL_IP // Instruction offset to Intra_4x4_luma_prediction_mode_1 +INTRA_4X4_DC_IP-INTRA_4X4_VERTICAL_IP // Instruction offset to Intra_4x4_luma_prediction_mode_2 +INTRA_4X4_DIAG_DOWN_LEFT_IP-INTRA_4X4_VERTICAL_IP // Instruction offset to Intra_4x4_luma_prediction_mode_3 +INTRA_4X4_DIAG_DOWN_RIGHT_IP-INTRA_4X4_VERTICAL_IP // Instruction offset to Intra_4x4_luma_prediction_mode_4 +INTRA_4X4_VERT_RIGHT_IP-INTRA_4X4_VERTICAL_IP // Instruction offset to Intra_4x4_luma_prediction_mode_5 +INTRA_4X4_HOR_DOWN_IP-INTRA_4X4_VERTICAL_IP // Instruction offset to Intra_4x4_luma_prediction_mode_6 +INTRA_4X4_VERT_LEFT_IP-INTRA_4X4_VERTICAL_IP // Instruction offset to Intra_4x4_luma_prediction_mode_7 +INTRA_4X4_HOR_UP_IP-INTRA_4X4_VERTICAL_IP // Instruction offset to Intra_4x4_luma_prediction_mode_8 + +// 0 // Instruction offset to Intra_8x8_luma_prediction_mode_0 +INTRA_8X8_HORIZONTAL_IP-INTRA_8X8_VERTICAL_IP // Instruction offset to Intra_8x8_luma_prediction_mode_1 +INTRA_8X8_DC_IP-INTRA_8X8_VERTICAL_IP // Instruction offset to Intra_8x8_luma_prediction_mode_2 +INTRA_8X8_DIAG_DOWN_LEFT_IP-INTRA_8X8_VERTICAL_IP // Instruction offset to Intra_8x8_luma_prediction_mode_3 +INTRA_8X8_DIAG_DOWN_RIGHT_IP-INTRA_8X8_VERTICAL_IP // Instruction offset to Intra_8x8_luma_prediction_mode_4 +INTRA_8X8_VERT_RIGHT_IP-INTRA_8X8_VERTICAL_IP // Instruction offset to Intra_8x8_luma_prediction_mode_5 +INTRA_8X8_HOR_DOWN_IP-INTRA_8X8_VERTICAL_IP // Instruction offset to Intra_8x8_luma_prediction_mode_6 +INTRA_8X8_VERT_LEFT_IP-INTRA_8X8_VERTICAL_IP // Instruction offset to Intra_8x8_luma_prediction_mode_7 +INTRA_8X8_HOR_UP_IP-INTRA_8X8_VERTICAL_IP // Instruction offset to Intra_8x8_luma_prediction_mode_8 + +// 0 // Instruction offset to Intra_16x16_luma_prediction_mode_0 +INTRA_16x16_HORIZONTAL_IP-INTRA_16x16_VERTICAL_IP // Instruction offset to Intra_16x16_luma_prediction_mode_1 +INTRA_16x16_DC_IP-INTRA_16x16_VERTICAL_IP // Instruction offset to Intra_16x16_luma_prediction_mode_2 +INTRA_16x16_PLANE_IP-INTRA_16x16_VERTICAL_IP // Instruction offset to Intra_16x16_luma_prediction_mode_3 + +// 0 // Instruction offset to intra_chroma_prediction_mode_0 +INTRA_CHROMA_HORIZONTAL_IP-INTRA_CHROMA_DC_IP // Instruction offset to intra_chroma_prediction_mode_1 +INTRA_CHROMA_VERTICAL_IP-INTRA_CHROMA_DC_IP // Instruction offset to intra_chroma_prediction_mode_2 +INTRA_Chroma_PLANE_IP-INTRA_CHROMA_DC_IP // Instruction offset to intra_chroma_prediction_mode_3 + +intra_Pred_4x4_Y_IP-ADD_ERROR_SB3_IP*0x100+intra_Pred_4x4_Y_IP-ADD_ERROR_SB2_IP*0x100+intra_Pred_4x4_Y_IP-ADD_ERROR_SB1_IP*0x100+intra_Pred_4x4_Y_IP-ADD_ERROR_SB0_IP // Instruction offset to intra_4x4_pred_module +} diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/AllAVC_Export.inc libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/AllAVC_Export.inc --- libva-1.0.1/i965_drv_video/shaders/h264/mc/AllAVC_Export.inc 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/AllAVC_Export.inc 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,172 @@ +.export entry_point INTRA_16x16 +.export entry_point INTRA_8x8 +.export entry_point INTRA_4x4 +.export entry_point INTRA_PCM +.export entry_point FRAME_MB +.export entry_point FIELD_MB +.export entry_point MBAFF_MB +#ifdef SW_SCOREBOARD +.export entry_point SCOREBOARD +.export entry_point SCOREBOARD_MBAFF +#elif defined(HW_SCOREBOARD) +.export entry_point SETHWSCOREBOARD +.export entry_point SETHWSCOREBOARD_MBAFF +#endif // SW_SCOREBOARD + +#ifdef ENABLE_ILDB +.export entry_point AVC_ILDB_ROOT_Y_ILDB_FRAME +.export entry_point AVC_ILDB_CHILD_Y_ILDB_FRAME +.export entry_point AVC_ILDB_ROOT_UV_ILDB_FRAME +.export entry_point AVC_ILDB_CHILD_UV_ILDB_FRAME +.export entry_point AVC_ILDB_ROOT_Y_ILDB_FIELD +.export entry_point AVC_ILDB_CHILD_Y_ILDB_FIELD +.export entry_point AVC_ILDB_ROOT_UV_ILDB_FIELD +.export entry_point AVC_ILDB_CHILD_UV_ILDB_FIELD +.export entry_point AVC_ILDB_ROOT_Y_ILDB_MBAFF +.export entry_point AVC_ILDB_CHILD_Y_ILDB_MBAFF +.export entry_point AVC_ILDB_ROOT_UV_ILDB_MBAFF +.export entry_point AVC_ILDB_CHILD_UV_ILDB_MBAFF +#endif // ENABLE_ILDB + +.export entry_point BSDRESET +.export entry_point DCRESETDUMMY + +.export label INTRA_16x16_VERTICAL +.export label INTRA_16x16_HORIZONTAL +.export label INTRA_16x16_DC +.export label INTRA_16x16_PLANE + +.export label INTRA_8X8_VERTICAL +.export label INTRA_8X8_HORIZONTAL +.export label INTRA_8X8_DC +.export label INTRA_8X8_DIAG_DOWN_LEFT +.export label INTRA_8X8_DIAG_DOWN_RIGHT +.export label INTRA_8X8_VERT_RIGHT +.export label INTRA_8X8_HOR_DOWN +.export label INTRA_8X8_VERT_LEFT +.export label INTRA_8X8_HOR_UP + +.export label INTRA_4X4_VERTICAL +.export label INTRA_4X4_HORIZONTAL +.export label INTRA_4X4_DC +.export label INTRA_4X4_DIAG_DOWN_LEFT +.export label INTRA_4X4_DIAG_DOWN_RIGHT +.export label INTRA_4X4_VERT_RIGHT +.export label INTRA_4X4_HOR_DOWN +.export label INTRA_4X4_VERT_LEFT +.export label INTRA_4X4_HOR_UP + +.export label INTRA_CHROMA_DC +.export label INTRA_CHROMA_HORIZONTAL +.export label INTRA_CHROMA_VERTICAL +.export label INTRA_Chroma_PLANE + +.export label intra_Pred_4x4_Y +.export label ADD_ERROR_SB0 +.export label ADD_ERROR_SB1 +.export label ADD_ERROR_SB2 +.export label ADD_ERROR_SB3 + +.export label AllAVC_END + +#ifdef SW_SCOREBOARD +.export label MB_Loop +.export label No_Message +.export label Dependency_Check +.export label Notify_MSG +.export label Update_CurMB +.export label MBAFF_MB_Loop +.export label MBAFF_No_Message +.export label MBAFF_Dependency_Check +.export label MBAFF_Notify_MSG +.export label MBAFF_Update_CurMB + +//.export label + +// Definitions for first pass MC kernel building +#ifndef No_Message_IP +#define No_Message_IP 0 +#endif + +#ifndef Dependency_Check_IP +#define Dependency_Check_IP 0 +#endif + +#ifndef Notify_MSG_IP +#define Notify_MSG_IP 0 +#endif + +#ifndef Update_CurMB_IP +#define Update_CurMB_IP 0 +#endif + +#ifndef MBAFF_No_Message_IP +#define MBAFF_No_Message_IP 0 +#endif + +#ifndef MBAFF_Dependency_Check_IP +#define MBAFF_Dependency_Check_IP 0 +#endif + +#ifndef MBAFF_Notify_MSG_IP +#define MBAFF_Notify_MSG_IP 0 +#endif + +#ifndef AS_ENABLED + #ifndef MBAFF_MB_Loop_IP + #define MBAFF_MB_Loop_IP 0 + #endif + + #ifndef MB_Loop_IP + #define MB_Loop_IP 0 + #endif +#endif // End AS_ENABLED + +#ifndef MBAFF_Update_CurMB_IP +#define MBAFF_Update_CurMB_IP 0 +#endif + +#endif // SW_SCOREBOARD +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ + +#ifdef ENABLE_ILDB +.export label ALL_SPAWNED_UV_ILDB_FRAME +.export label SLEEP_ENTRY_UV_ILDB_FRAME +.export label POST_SLEEP_UV_ILDB_FRAME +.export label ALL_SPAWNED_Y_ILDB_FRAME +.export label SLEEP_ENTRY_Y_ILDB_FRAME +.export label POST_SLEEP_Y_ILDB_FRAME + +// Definitions for first pass ILDB kernel building +#ifndef ALL_SPAWNED_UV_ILDB_FRAME_IP +#define ALL_SPAWNED_UV_ILDB_FRAME_IP 0 +#endif + +#ifndef SLEEP_ENTRY_UV_ILDB_FRAME_IP +#define SLEEP_ENTRY_UV_ILDB_FRAME_IP 0 +#endif + +#ifndef POST_SLEEP_UV_ILDB_FRAME_IP +#define POST_SLEEP_UV_ILDB_FRAME_IP 0 +#endif + +#ifndef ALL_SPAWNED_Y_ILDB_FRAME_IP +#define ALL_SPAWNED_Y_ILDB_FRAME_IP 0 +#endif + +#ifndef SLEEP_ENTRY_Y_ILDB_FRAME_IP +#define SLEEP_ENTRY_Y_ILDB_FRAME_IP 0 +#endif + +#ifndef POST_SLEEP_Y_ILDB_FRAME_IP +#define POST_SLEEP_Y_ILDB_FRAME_IP 0 +#endif + +#endif // ENABLE_ILDB diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/AllAVCField.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/AllAVCField.asm --- libva-1.0.1/i965_drv_video/shaders/h264/mc/AllAVCField.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/AllAVCField.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,70 @@ +/* + * All field picture HWMC kernels + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// 2857702934 // 0xAA551616 - GUID for Intra_16x16 luma prediction mode offsets +// 0 // Offset to Intra_16x16 luma prediction mode 0 +// 9 // Offset to Intra_16x16 luma prediction mode 1 +// 19 // Offset to Intra_16x16 luma prediction mode 2 +// 42 // Offset to Intra_16x16 luma prediction mode 3 +// 2857699336 // 0xAA550808 - GUID for Intra_8x8 luma prediction mode offsets +// 0 // Offset to Intra_8x8 luma prediction mode 0 +// 5 // Offset to Intra_8x8 luma prediction mode 1 +// 10 // Offset to Intra_8x8 luma prediction mode 2 +// 26 // Offset to Intra_8x8 luma prediction mode 3 +// 36 // Offset to Intra_8x8 luma prediction mode 4 +// 50 // Offset to Intra_8x8 luma prediction mode 5 +// 68 // Offset to Intra_8x8 luma prediction mode 6 +// 85 // Offset to Intra_8x8 luma prediction mode 7 +// 95 // Offset to Intra_8x8 luma prediction mode 8 +// 2857698308 // 0xAA550404 - GUID for Intra_4x4 luma prediction mode offsets +// 0 // Offset to Intra_4x4 luma prediction mode 0 +// 2 // Offset to Intra_4x4 luma prediction mode 1 +// 4 // Offset to Intra_4x4 luma prediction mode 2 +// 16 // Offset to Intra_4x4 luma prediction mode 3 +// 23 // Offset to Intra_4x4 luma prediction mode 4 +// 32 // Offset to Intra_4x4 luma prediction mode 5 +// 45 // Offset to Intra_4x4 luma prediction mode 6 +// 59 // Offset to Intra_4x4 luma prediction mode 7 +// 66 // Offset to Intra_4x4 luma prediction mode 8 +// 2857700364 // 0xAA550C0C - GUID for intra chroma prediction mode offsets +// 0 // Offset to intra chroma prediction mode 0 +// 30 // Offset to intra chroma prediction mode 1 +// 36 // Offset to intra chroma prediction mode 2 +// 41 // Offset to intra chroma prediction mode 3 + +// Kernel name: AllAVCField.asm +// +// All field picture HWMC kernels merged into this file +// +// $Revision: 1 $ +// $Date: 4/13/06 4:35p $ +// + +// ---------------------------------------------------- +// Main: AllAVCField +// ---------------------------------------------------- + +#define ALLHWMC +#define COMBINED_KERNEL + +.kernel AllAVCField + + #include "Intra_PCM.asm" + #include "Intra_16x16.asm" + #include "Intra_8x8.asm" + #include "Intra_4x4.asm" + #include "scoreboard.asm" + + #define FIELD + #include "AVCMCInter.asm" + +// End of AllAVCField + +.end_kernel + diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/AllAVCFrame.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/AllAVCFrame.asm --- libva-1.0.1/i965_drv_video/shaders/h264/mc/AllAVCFrame.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/AllAVCFrame.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,69 @@ +/* + * All frame picture HWMC kernels + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// 2857702934 // 0xAA551616 - GUID for Intra_16x16 luma prediction mode offsets +// 0 // Offset to Intra_16x16 luma prediction mode 0 +// 9 // Offset to Intra_16x16 luma prediction mode 1 +// 19 // Offset to Intra_16x16 luma prediction mode 2 +// 42 // Offset to Intra_16x16 luma prediction mode 3 +// 2857699336 // 0xAA550808 - GUID for Intra_8x8 luma prediction mode offsets +// 0 // Offset to Intra_8x8 luma prediction mode 0 +// 5 // Offset to Intra_8x8 luma prediction mode 1 +// 10 // Offset to Intra_8x8 luma prediction mode 2 +// 26 // Offset to Intra_8x8 luma prediction mode 3 +// 36 // Offset to Intra_8x8 luma prediction mode 4 +// 50 // Offset to Intra_8x8 luma prediction mode 5 +// 68 // Offset to Intra_8x8 luma prediction mode 6 +// 85 // Offset to Intra_8x8 luma prediction mode 7 +// 95 // Offset to Intra_8x8 luma prediction mode 8 +// 2857698308 // 0xAA550404 - GUID for Intra_4x4 luma prediction mode offsets +// 0 // Offset to Intra_4x4 luma prediction mode 0 +// 2 // Offset to Intra_4x4 luma prediction mode 1 +// 4 // Offset to Intra_4x4 luma prediction mode 2 +// 16 // Offset to Intra_4x4 luma prediction mode 3 +// 23 // Offset to Intra_4x4 luma prediction mode 4 +// 32 // Offset to Intra_4x4 luma prediction mode 5 +// 45 // Offset to Intra_4x4 luma prediction mode 6 +// 59 // Offset to Intra_4x4 luma prediction mode 7 +// 66 // Offset to Intra_4x4 luma prediction mode 8 +// 2857700364 // 0xAA550C0C - GUID for intra chroma prediction mode offsets +// 0 // Offset to intra chroma prediction mode 0 +// 30 // Offset to intra chroma prediction mode 1 +// 36 // Offset to intra chroma prediction mode 2 +// 41 // Offset to intra chroma prediction mode 3 + +// Kernel name: AllAVCFrame.asm +// +// All frame picture HWMC kernels merged into this file +// +// $Revision: 1 $ +// $Date: 4/13/06 4:35p $ +// + +// ---------------------------------------------------- +// Main: AllAVCFrame +// ---------------------------------------------------- + +#define ALLHWMC +#define COMBINED_KERNEL + +.kernel AllAVCFrame + + #include "Intra_PCM.asm" + #include "Intra_16x16.asm" + #include "Intra_8x8.asm" + #include "Intra_4x4.asm" + #include "scoreboard.asm" + + #include "AVCMCInter.asm" + +// End of AllAVCFrame + +.end_kernel + diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/AllAVCMBAFF.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/AllAVCMBAFF.asm --- libva-1.0.1/i965_drv_video/shaders/h264/mc/AllAVCMBAFF.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/AllAVCMBAFF.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,70 @@ +/* + * All MBAFF frame picture HWMC kernels + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// 2857702934 // 0xAA551616 - GUID for Intra_16x16 luma prediction mode offsets +// 0 // Offset to Intra_16x16 luma prediction mode 0 +// 9 // Offset to Intra_16x16 luma prediction mode 1 +// 19 // Offset to Intra_16x16 luma prediction mode 2 +// 42 // Offset to Intra_16x16 luma prediction mode 3 +// 2857699336 // 0xAA550808 - GUID for Intra_8x8 luma prediction mode offsets +// 0 // Offset to Intra_8x8 luma prediction mode 0 +// 5 // Offset to Intra_8x8 luma prediction mode 1 +// 10 // Offset to Intra_8x8 luma prediction mode 2 +// 26 // Offset to Intra_8x8 luma prediction mode 3 +// 36 // Offset to Intra_8x8 luma prediction mode 4 +// 50 // Offset to Intra_8x8 luma prediction mode 5 +// 68 // Offset to Intra_8x8 luma prediction mode 6 +// 85 // Offset to Intra_8x8 luma prediction mode 7 +// 95 // Offset to Intra_8x8 luma prediction mode 8 +// 2857698308 // 0xAA550404 - GUID for Intra_4x4 luma prediction mode offsets +// 0 // Offset to Intra_4x4 luma prediction mode 0 +// 2 // Offset to Intra_4x4 luma prediction mode 1 +// 4 // Offset to Intra_4x4 luma prediction mode 2 +// 16 // Offset to Intra_4x4 luma prediction mode 3 +// 23 // Offset to Intra_4x4 luma prediction mode 4 +// 32 // Offset to Intra_4x4 luma prediction mode 5 +// 45 // Offset to Intra_4x4 luma prediction mode 6 +// 59 // Offset to Intra_4x4 luma prediction mode 7 +// 66 // Offset to Intra_4x4 luma prediction mode 8 +// 2857700364 // 0xAA550C0C - GUID for intra chroma prediction mode offsets +// 0 // Offset to intra chroma prediction mode 0 +// 30 // Offset to intra chroma prediction mode 1 +// 36 // Offset to intra chroma prediction mode 2 +// 41 // Offset to intra chroma prediction mode 3 + +// Kernel name: AllAVCMBAFF.asm +// +// All MBAFF frame picture HWMC kernels merged into this file +// +// $Revision: 1 $ +// $Date: 4/13/06 4:35p $ +// + +// ---------------------------------------------------- +// Main: AllAVCMBAFF +// ---------------------------------------------------- + +#define ALLHWMC +#define COMBINED_KERNEL + +.kernel AllAVCMBAFF + + #include "Intra_PCM.asm" + #include "Intra_16x16.asm" + #include "Intra_8x8.asm" + #include "Intra_4x4.asm" + #include "scoreboard.asm" + + #define MBAFF + #include "AVCMCInter.asm" + +// End of AllAVCMBAFF + +.end_kernel + diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/AllIntra.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/AllIntra.asm --- libva-1.0.1/i965_drv_video/shaders/h264/mc/AllIntra.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/AllIntra.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,68 @@ +/* + * All intra-prediction macroblock kernels + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// 2857702934 // 0xAA551616 - GUID for Intra_16x16 luma prediction mode offsets +// 0 // Offset to Intra_16x16 luma prediction mode 0 +// 9 // Offset to Intra_16x16 luma prediction mode 1 +// 19 // Offset to Intra_16x16 luma prediction mode 2 +// 42 // Offset to Intra_16x16 luma prediction mode 3 +// 2857699336 // 0xAA550808 - GUID for Intra_8x8 luma prediction mode offsets +// 0 // Offset to Intra_8x8 luma prediction mode 0 +// 5 // Offset to Intra_8x8 luma prediction mode 1 +// 10 // Offset to Intra_8x8 luma prediction mode 2 +// 26 // Offset to Intra_8x8 luma prediction mode 3 +// 36 // Offset to Intra_8x8 luma prediction mode 4 +// 50 // Offset to Intra_8x8 luma prediction mode 5 +// 68 // Offset to Intra_8x8 luma prediction mode 6 +// 85 // Offset to Intra_8x8 luma prediction mode 7 +// 95 // Offset to Intra_8x8 luma prediction mode 8 +// 2857698308 // 0xAA550404 - GUID for Intra_4x4 luma prediction mode offsets +// 0 // Offset to Intra_4x4 luma prediction mode 0 +// 2 // Offset to Intra_4x4 luma prediction mode 1 +// 4 // Offset to Intra_4x4 luma prediction mode 2 +// 16 // Offset to Intra_4x4 luma prediction mode 3 +// 23 // Offset to Intra_4x4 luma prediction mode 4 +// 32 // Offset to Intra_4x4 luma prediction mode 5 +// 45 // Offset to Intra_4x4 luma prediction mode 6 +// 59 // Offset to Intra_4x4 luma prediction mode 7 +// 66 // Offset to Intra_4x4 luma prediction mode 8 +// 2857700364 // 0xAA550C0C - GUID for intra chroma prediction mode offsets +// 0 // Offset to intra chroma prediction mode 0 +// 30 // Offset to intra chroma prediction mode 1 +// 36 // Offset to intra chroma prediction mode 2 +// 41 // Offset to intra chroma prediction mode 3 + +// Kernel name: AllIntra.asm +// +// All HWMC kernels merged into this file +// +// $Revision: 1 $ +// $Date: 4/13/06 4:35p $ +// + +// ---------------------------------------------------- +// Main: ALLINTRA +// ---------------------------------------------------- + +#define ALLHWMC +#define COMBINED_KERNEL + +.kernel ALLINTRA + + // All frame destination HWMC kernels + // + #include "Intra_PCM.asm" + #include "Intra_16x16.asm" + #include "Intra_8x8.asm" + #include "Intra_4x4.asm" + +// End of ALLINTRA + +.end_kernel + diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/avc_mc.g4b libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/avc_mc.g4b --- libva-1.0.1/i965_drv_video/shaders/h264/mc/avc_mc.g4b 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/avc_mc.g4b 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,5251 @@ + { 0x00600001, 0x27c00021, 0x008d0000, 0x00000000 }, + { 0x00200009, 0x27fa3e29, 0x00450064, 0x00040004 }, + { 0x00000040, 0x27e01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x000000d4 }, + { 0x00000005, 0x220e3e2c, 0x00000070, 0x000f000f }, + { 0x00000001, 0x26a00221, 0x00009c38, 0x00000000 }, + { 0x00000220, 0x34001400, 0x00001400, 0x000006a0 }, + { 0x00a02001, 0x24000229, 0x00b10624, 0x00000000 }, + { 0x00a02001, 0x24400229, 0x00b10624, 0x00000000 }, + { 0x00a02001, 0x24800229, 0x00b10624, 0x00000000 }, + { 0x00a02001, 0x24c00229, 0x00b10624, 0x00000000 }, + { 0x00a02001, 0x25000229, 0x00b10624, 0x00000000 }, + { 0x00a02001, 0x25400229, 0x00b10624, 0x00000000 }, + { 0x00a02001, 0x25800229, 0x00b10624, 0x00000000 }, + { 0x00a02001, 0x25c00229, 0x00b10624, 0x00000000 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000086 }, + { 0x00000001, 0x22080060, 0x00000000, 0x06440640 }, + { 0x00a02001, 0x24000229, 0x00009003, 0x00000000 }, + { 0x00a02001, 0x24400229, 0x0000900b, 0x00000000 }, + { 0x00a02001, 0x24800229, 0x00009013, 0x00000000 }, + { 0x00a02001, 0x24c00229, 0x0000901b, 0x00000000 }, + { 0x00a02001, 0x25000229, 0x00009023, 0x00000000 }, + { 0x00a02001, 0x25400229, 0x0000902b, 0x00000000 }, + { 0x00a02001, 0x25800229, 0x00009033, 0x00000000 }, + { 0x00a02001, 0x25c00229, 0x0000903b, 0x00000000 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000072 }, + { 0x02600005, 0x20000c20, 0x0000006c, 0x00000002 }, + { 0x00600005, 0x24000c20, 0x0000006c, 0x00000011 }, + { 0x01600007, 0x20000c00, 0x028d0400, 0x00000011 }, + { 0x00780001, 0x26240169, 0x00000000, 0x80808080 }, + { 0x00780001, 0x66430231, 0x028d0624, 0x00000000 }, + { 0x00780001, 0x66630231, 0x028d062c, 0x00000000 }, + { 0x00780001, 0x26240231, 0x00cf0643, 0x00000000 }, + { 0x00780001, 0x262c0231, 0x00cf0663, 0x00000000 }, + { 0x00800040, 0x25e04629, 0x00cf0643, 0x00b10624 }, + { 0x00600040, 0x25e02529, 0x008d05e0, 0x008d05f0 }, + { 0x00400040, 0x25e02529, 0x006905e0, 0x006905e8 }, + { 0x00200040, 0x25e02529, 0x004505e0, 0x004505e4 }, + { 0x00a02040, 0x2400252c, 0x000005e0, 0x000005e2 }, + { 0x00a02040, 0x24003d8c, 0x00b10400, 0x00100010 }, + { 0x00a02008, 0x24003d89, 0x00b10400, 0x00050005 }, + { 0x00a02008, 0x24403d89, 0x00b10400, 0x00050005 }, + { 0x00a02008, 0x24803d89, 0x00b10400, 0x00050005 }, + { 0x00a02008, 0x24c03d89, 0x00b10400, 0x00050005 }, + { 0x00a02008, 0x25003d89, 0x00b10400, 0x00050005 }, + { 0x00a02008, 0x25403d89, 0x00b10400, 0x00050005 }, + { 0x00a02008, 0x25803d89, 0x00b10400, 0x00050005 }, + { 0x00a02008, 0x25c03d89, 0x00b10400, 0x00050005 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000044 }, + { 0x00600041, 0x26806e2d, 0x008d062c, 0x89abcdef }, + { 0x00600041, 0x26906e2d, 0x008d0623, 0xfedcba98 }, + { 0x00600041, 0x26a06e2d, 0x00cf0663, 0x89abcdef }, + { 0x00600041, 0x26b06e2d, 0x00cf0643, 0x0fedcba9 }, + { 0x00000041, 0x26be3e2d, 0x00000623, 0xfff8fff8 }, + { 0x00802040, 0x268035ad, 0x008d4680, 0x008d0690 }, + { 0x00802040, 0x268035ad, 0x008d0680, 0x008d0688 }, + { 0x00802040, 0x268035ad, 0x008d0680, 0x008d0684 }, + { 0x00802040, 0x268035ad, 0x008d0680, 0x008d0682 }, + { 0x00800001, 0x240001ec, 0x00000000, 0x00200020 }, + { 0x00200048, 0x24003dac, 0x00a00680, 0x00050005 }, + { 0x00200008, 0x26e03d8d, 0x00450400, 0x00060006 }, + { 0x00800001, 0x240001ec, 0x00000000, 0x00100010 }, + { 0x00800048, 0x24003e2c, 0x00000633, 0x00100010 }, + { 0x00800048, 0x26c03e2d, 0x0000067f, 0x00100010 }, + { 0x00800048, 0x272055ad, 0x000006e0, 0x00b10040 }, + { 0x00600041, 0x268055ad, 0x000006e2, 0x00ae0040 }, + { 0x00600041, 0x26a055ad, 0x000006e2, 0x00ae0041 }, + { 0x00a02040, 0x240035ac, 0x00b10720, 0x00b00680 }, + { 0x80a02008, 0x44003d91, 0x00b10400, 0x00050005 }, + { 0x00a02040, 0x240035ac, 0x00b10720, 0x00b00682 }, + { 0x80a02008, 0x44403d91, 0x00b10400, 0x00050005 }, + { 0x00a02040, 0x240035ac, 0x00b10720, 0x00b00684 }, + { 0x80a02008, 0x44803d91, 0x00b10400, 0x00050005 }, + { 0x00a02040, 0x240035ac, 0x00b10720, 0x00b00686 }, + { 0x80a02008, 0x44c03d91, 0x00b10400, 0x00050005 }, + { 0x00a02040, 0x240035ac, 0x00b10720, 0x00b00688 }, + { 0x80a02008, 0x45003d91, 0x00b10400, 0x00050005 }, + { 0x00a02040, 0x240035ac, 0x00b10720, 0x00b0068a }, + { 0x80a02008, 0x45403d91, 0x00b10400, 0x00050005 }, + { 0x00a02040, 0x240035ac, 0x00b10720, 0x00b0068c }, + { 0x80a02008, 0x45803d91, 0x00b10400, 0x00050005 }, + { 0x00a02040, 0x240035ac, 0x00b10720, 0x00b0068e }, + { 0x80a02008, 0x45c03d91, 0x00b10400, 0x00050005 }, + { 0x00000001, 0x22040060, 0x00000000, 0x00900080 }, + { 0x01000005, 0x20000c20, 0x02000068, 0x00003c00 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x00000020 }, + { 0x80802040, 0x440045b1, 0x008d8800, 0x00ae0400 }, + { 0x80802040, 0x444045b1, 0x008d8820, 0x00ae0440 }, + { 0x80802040, 0x448045b1, 0x008d8840, 0x00ae0480 }, + { 0x80802040, 0x44c045b1, 0x008d8860, 0x00ae04c0 }, + { 0x80802040, 0x441045b1, 0x008d8880, 0x00ae0410 }, + { 0x80802040, 0x445045b1, 0x008d88a0, 0x00ae0450 }, + { 0x80802040, 0x449045b1, 0x008d88c0, 0x00ae0490 }, + { 0x80802040, 0x44d045b1, 0x008d88e0, 0x00ae04d0 }, + { 0x80802040, 0x450045b1, 0x008d8900, 0x00ae0500 }, + { 0x80802040, 0x454045b1, 0x008d8920, 0x00ae0540 }, + { 0x80802040, 0x458045b1, 0x008d8940, 0x00ae0580 }, + { 0x80802040, 0x45c045b1, 0x008d8960, 0x00ae05c0 }, + { 0x80802040, 0x451045b1, 0x008d8980, 0x00ae0510 }, + { 0x80802040, 0x455045b1, 0x008d89a0, 0x00ae0550 }, + { 0x80802040, 0x459045b1, 0x008d89c0, 0x00ae0590 }, + { 0x80802040, 0x45d045b1, 0x008d89e0, 0x00ae05d0 }, + { 0x00000040, 0x22040c00, 0x00000204, 0x01800180 }, + { 0x00000040, 0x27e01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x000000e2 }, + { 0x00000040, 0x27e01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000018 }, + { 0x00000001, 0x27800021, 0x00000780, 0x00000000 }, + { 0x00000001, 0x27a00021, 0x000007a0, 0x00000000 }, + { 0x01600031, 0x20001c20, 0x708d0000, 0x82000010 }, + { 0x00200440, 0x27c055a5, 0x004507fa, 0x0045002a }, + { 0x00000801, 0x27c80061, 0x00000000, 0x0000001b }, + { 0x00000040, 0x22000d20, 0x00000062, 0x02186000 }, + { 0x01600031, 0x26200021, 0x408d07c0, 0x00000200 }, + { 0x00000440, 0x27c43ca5, 0x000007c4, 0x00010001 }, + { 0x00000801, 0x27c80061, 0x00000000, 0x000f0003 }, + { 0x00000040, 0x22000c00, 0x00000200, 0x00100000 }, + { 0x02600031, 0x26400021, 0x408d07c0, 0x00000200 }, + { 0x00000001, 0x34000020, 0x000007e0, 0x00000000 }, + { 0x00000008, 0x27fc3dad, 0x000007fc, 0x00010001 }, + { 0x00200440, 0x27c055a5, 0x004507fa, 0x0045002a }, + { 0x00000801, 0x27c80061, 0x00000000, 0x00000013 }, + { 0x00000040, 0x22000c00, 0x00000200, 0xefffc001 }, + { 0x01600031, 0x26200021, 0x408d07c0, 0x00000200 }, + { 0x00000440, 0x27c43ca5, 0x000007c4, 0x00010001 }, + { 0x00000801, 0x27c80061, 0x00000000, 0x00070003 }, + { 0x05600031, 0x26400021, 0x408d07c0, 0x00000200 }, + { 0x00000008, 0x220e3e2c, 0x0000006c, 0x00060006 }, + { 0x00000001, 0x26a002a5, 0x00009c3c, 0x00000000 }, + { 0x00000220, 0x34001400, 0x00001400, 0x000006a0 }, + { 0x02600005, 0x20000c20, 0x0000006c, 0x00000002 }, + { 0x00780001, 0x26240169, 0x00000000, 0x80808080 }, + { 0x02400005, 0x20000c20, 0x0200006c, 0x00000001 }, + { 0x00560001, 0x46420129, 0x02690624, 0x00000000 }, + { 0x02400005, 0x20000c20, 0x0200006c, 0x00000010 }, + { 0x00560001, 0x46520129, 0x0269062c, 0x00000000 }, + { 0x00780001, 0x26240129, 0x00ae0642, 0x00000000 }, + { 0x00800040, 0x24004629, 0x00b10624, 0x00650642 }, + { 0x00600040, 0x24002529, 0x00650400, 0x00650404 }, + { 0x00600040, 0x25202529, 0x00050400, 0x00050404 }, + { 0x00600040, 0x25702529, 0x00050408, 0x0005040c }, + { 0x00560001, 0x26240169, 0x00000000, 0x80808080 }, + { 0x00460001, 0x26240129, 0x028a0652, 0x00000000 }, + { 0x00560001, 0x46520129, 0x02690624, 0x00000000 }, + { 0x02400005, 0x20000c20, 0x0200006c, 0x00000001 }, + { 0x00560001, 0x46420169, 0x02000000, 0x80808080 }, + { 0x00460001, 0x46420129, 0x0069062c, 0x00000000 }, + { 0x00560001, 0x262c0129, 0x008a0642, 0x00000000 }, + { 0x00600040, 0x24004629, 0x008d0624, 0x00650652 }, + { 0x00600040, 0x24104629, 0x00650642, 0x008d062c }, + { 0x00600040, 0x24002529, 0x00650400, 0x00650404 }, + { 0x00600040, 0x25302529, 0x00050408, 0x0005040c }, + { 0x00600040, 0x25602529, 0x00050400, 0x00050404 }, + { 0x00a02040, 0x24003d2c, 0x00b10520, 0x00040004 }, + { 0x00a02008, 0x24003d89, 0x00b10400, 0x00030003 }, + { 0x00a02008, 0x24403d89, 0x00b10400, 0x00030003 }, + { 0x00a02040, 0x24003d2c, 0x00b10560, 0x00040004 }, + { 0x00a02008, 0x24803d89, 0x00b10400, 0x00030003 }, + { 0x00a02008, 0x24c03d89, 0x00b10400, 0x00030003 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000048 }, + { 0x00000001, 0x22080060, 0x00000000, 0x06440640 }, + { 0x00a02001, 0x24000229, 0x00059002, 0x00000000 }, + { 0x00a02001, 0x24400229, 0x0005900a, 0x00000000 }, + { 0x00a02001, 0x24800229, 0x00059012, 0x00000000 }, + { 0x00a02001, 0x24c00229, 0x0005901a, 0x00000000 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x0000003c }, + { 0x00a02001, 0x24000229, 0x00b10624, 0x00000000 }, + { 0x00a02001, 0x24400229, 0x00b10624, 0x00000000 }, + { 0x00a02001, 0x24800229, 0x00b10624, 0x00000000 }, + { 0x00a02001, 0x24c00229, 0x00b10624, 0x00000000 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000032 }, + { 0x00600041, 0x26806e2d, 0x008d062c, 0x44332211 }, + { 0x00600041, 0x26906e2d, 0x008d0622, 0xffeeddcc }, + { 0x00600041, 0x26a06e2d, 0x00650652, 0x44332211 }, + { 0x00600041, 0x26b06e2d, 0x00650642, 0x00ffeedd }, + { 0x00200041, 0x26bc3e2d, 0x00450622, 0xfffcfffc }, + { 0x00802040, 0x268035ad, 0x008d0680, 0x008d0690 }, + { 0x00802040, 0x268035ad, 0x008d0680, 0x008d0688 }, + { 0x00802040, 0x268035ad, 0x008d0680, 0x008d0684 }, + { 0x00800001, 0x240001ec, 0x00000000, 0x00200020 }, + { 0x00400048, 0x24003dac, 0x00a50680, 0x00220022 }, + { 0x00400008, 0x26e03d8d, 0x00690400, 0x00060006 }, + { 0x00800001, 0x240001ec, 0x00000000, 0x00100010 }, + { 0x00800048, 0x24003e2c, 0x00050632, 0x00100010 }, + { 0x00800048, 0x26c03e2d, 0x0005065e, 0x00100010 }, + { 0x00800048, 0x272055ad, 0x000506e0, 0x00240044 }, + { 0x00600041, 0x268055ad, 0x000506e4, 0x00440044 }, + { 0x00600041, 0x26a055ad, 0x000506e4, 0x00440045 }, + { 0x00a02040, 0x240035ac, 0x00b10720, 0x00050680 }, + { 0x80a02008, 0x44003d91, 0x00b10400, 0x00050005 }, + { 0x00a02040, 0x240035ac, 0x00b10720, 0x00050684 }, + { 0x80a02008, 0x44403d91, 0x00b10400, 0x00050005 }, + { 0x00a02040, 0x240035ac, 0x00b10720, 0x00050688 }, + { 0x80a02008, 0x44803d91, 0x00b10400, 0x00050005 }, + { 0x00a02040, 0x240035ac, 0x00b10720, 0x0005068c }, + { 0x80a02008, 0x44c03d91, 0x00b10400, 0x00050005 }, + { 0x00000040, 0x22063d8c, 0x00000204, 0x00100010 }, + { 0x80802040, 0x640045b1, 0x008d8880, 0x00cf0400 }, + { 0x80802040, 0x644045b1, 0x008d88a0, 0x00cf0440 }, + { 0x80802040, 0x648045b1, 0x008d88c0, 0x00cf0480 }, + { 0x80802040, 0x64c045b1, 0x008d88e0, 0x00cf04c0 }, + { 0x80802040, 0x640245b1, 0x008d8900, 0x00cf0402 }, + { 0x80802040, 0x644245b1, 0x008d8920, 0x00cf0442 }, + { 0x80802040, 0x648245b1, 0x008d8940, 0x00cf0482 }, + { 0x80802040, 0x64c245b1, 0x008d8960, 0x00cf04c2 }, + { 0x00000401, 0x27c80061, 0x00000000, 0x0007000f }, + { 0x00200801, 0x27c001a1, 0x004507fa, 0x00000000 }, + { 0x00000040, 0x22000c00, 0x00000200, 0x08004000 }, + { 0x00800001, 0x20400232, 0x00d20400, 0x00000000 }, + { 0x00800001, 0x20500232, 0x00d20420, 0x00000000 }, + { 0x00800001, 0x20600232, 0x00d20440, 0x00000000 }, + { 0x00800001, 0x20700232, 0x00d20460, 0x00000000 }, + { 0x00800001, 0x20800232, 0x00d20480, 0x00000000 }, + { 0x00800001, 0x20900232, 0x00d204a0, 0x00000000 }, + { 0x00800001, 0x20a00232, 0x00d204c0, 0x00000000 }, + { 0x00800001, 0x20b00232, 0x00d204e0, 0x00000000 }, + { 0x01600031, 0x27a00021, 0x508d07c0, 0x00000200 }, + { 0x00000001, 0x34000020, 0x000007e0, 0x00000000 }, + { 0x00000401, 0x27c80061, 0x00000000, 0x000f000f }, + { 0x00200801, 0x27c001a1, 0x004507fa, 0x00000000 }, + { 0x00000040, 0x22000c00, 0x00000200, 0x0ff04000 }, + { 0x00000001, 0x22080060, 0x00000000, 0x04400400 }, + { 0x00a02001, 0x20400232, 0x00d29000, 0x00000000 }, + { 0x00a02001, 0x20500232, 0x00d29020, 0x00000000 }, + { 0x00a02001, 0x20800232, 0x00d29080, 0x00000000 }, + { 0x00a02001, 0x20900232, 0x00d290a0, 0x00000000 }, + { 0x00a02001, 0x20c00232, 0x00d29100, 0x00000000 }, + { 0x00a02001, 0x20d00232, 0x00d29120, 0x00000000 }, + { 0x00a02001, 0x21000232, 0x00d29180, 0x00000000 }, + { 0x00a02001, 0x21100232, 0x00d291a0, 0x00000000 }, + { 0x01600031, 0x27800021, 0x508d07c0, 0x00000200 }, + { 0x00000001, 0x34000020, 0x000007e0, 0x00000000 }, + { 0x00600001, 0x27c00021, 0x008d0000, 0x00000000 }, + { 0x00200009, 0x27fa3e29, 0x00450064, 0x00040004 }, + { 0x00000040, 0x27e01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0xffffff04 }, + { 0x00000001, 0x220401ec, 0x00000000, 0x00800080 }, + { 0x00000001, 0x22080060, 0x00000000, 0x04100400 }, + { 0x00200008, 0x27006e2d, 0x0000006c, 0x00000040 }, + { 0x00400001, 0x27400061, 0x00000000, 0x00000000 }, + { 0x00800001, 0x272001a9, 0x00b10620, 0x00000000 }, + { 0x02600005, 0x20001c20, 0x0000006c, 0x00000008 }, + { 0x00110001, 0x27230231, 0x00000624, 0x00000000 }, + { 0x00600001, 0x27420231, 0x00cf0643, 0x00000000 }, + { 0x00110001, 0x27410231, 0x00000643, 0x00000000 }, + { 0x00240001, 0x27400231, 0x00000623, 0x00000000 }, + { 0x02000005, 0x20001c20, 0x0200006c, 0x00000002 }, + { 0x00010001, 0x27400231, 0x02000624, 0x00000000 }, + { 0x02000005, 0x20001c20, 0x0200006c, 0x00000001 }, + { 0x00110001, 0x27420231, 0x02000623, 0x00000000 }, + { 0x00000005, 0x26803e2d, 0x00000070, 0x000f000f }, + { 0x00000001, 0x270801ad, 0x00000700, 0x00000000 }, + { 0x00000040, 0x27e01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000084 }, + { 0x00000040, 0x22043d8c, 0x00000204, 0x00800080 }, + { 0x00800001, 0x27200231, 0x00b10628, 0x00000000 }, + { 0x02600005, 0x20001c20, 0x0200006c, 0x00000004 }, + { 0x00680001, 0x272c0231, 0x028d0634, 0x00000000 }, + { 0x00780001, 0x272c0231, 0x02000633, 0x00000000 }, + { 0x00400001, 0x27420231, 0x00a0040e, 0x00000000 }, + { 0x00400001, 0x27460231, 0x00a0044e, 0x00000000 }, + { 0x00200001, 0x27400231, 0x0000062b, 0x00000000 }, + { 0x02000005, 0x20001c20, 0x0200006c, 0x00000002 }, + { 0x00010001, 0x27400231, 0x0200062c, 0x00000000 }, + { 0x00110001, 0x27410231, 0x0200040e, 0x00000000 }, + { 0x00000008, 0x26803e2d, 0x00000070, 0x00040004 }, + { 0x00200040, 0x22083d8c, 0x00450208, 0x00800080 }, + { 0x00000006, 0x27083dad, 0x00000700, 0x00010001 }, + { 0x00000040, 0x27e01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000064 }, + { 0x00000040, 0x22043d8c, 0x00000204, 0x00800080 }, + { 0x00a02001, 0xb3800231, 0x00d20400, 0x00000000 }, + { 0x00a02001, 0xb3a00231, 0x00d20480, 0x00000000 }, + { 0x00a02001, 0xb3c00231, 0x00d20440, 0x00000000 }, + { 0x00a02001, 0xb3e00231, 0x00d204c0, 0x00000000 }, + { 0x02000005, 0x20001c20, 0x00000060, 0x00000002 }, + { 0x01000005, 0x20001c20, 0x0200006c, 0x00000001 }, + { 0x01010005, 0x20001c20, 0x00000060, 0x00004000 }, + { 0x02010005, 0x20001c20, 0x02000060, 0x00000010 }, + { 0x00030001, 0x27230231, 0x0000065f, 0x00000000 }, + { 0x00030220, 0x34001c00, 0x00001400, 0x00000006 }, + { 0x02600005, 0x20001c20, 0x0000006c, 0x00000001 }, + { 0x00460001, 0x27200231, 0x0069065c, 0x00000000 }, + { 0x00110001, 0x27230231, 0x00000458, 0x00000000 }, + { 0x00600001, 0x27240231, 0x008d0458, 0x00000000 }, + { 0x00600001, 0x272c0231, 0x008d0478, 0x00000000 }, + { 0x00600001, 0x27420231, 0x00cf0663, 0x00000000 }, + { 0x00000001, 0x27400231, 0x00000458, 0x00000000 }, + { 0x00010001, 0x27410231, 0x0000065f, 0x00000000 }, + { 0x00110001, 0x27410231, 0x00000663, 0x00000000 }, + { 0x02000005, 0x20001c20, 0x0200006c, 0x00000010 }, + { 0x00110001, 0x27420231, 0x0200065f, 0x00000000 }, + { 0x00000005, 0x26803e2d, 0x00000071, 0x000f000f }, + { 0x00000006, 0x27083dad, 0x00000702, 0x00020002 }, + { 0x00000040, 0x27e01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000030 }, + { 0x00000040, 0x22043d8c, 0x00000204, 0x00800080 }, + { 0x00400001, 0x27200231, 0x0069045c, 0x00000000 }, + { 0x00600001, 0x27240231, 0x008d0478, 0x00000000 }, + { 0x00800001, 0x272c0231, 0x0000047f, 0x00000000 }, + { 0x00400001, 0x27420231, 0x00a0048e, 0x00000000 }, + { 0x00400001, 0x27460231, 0x00a004ce, 0x00000000 }, + { 0x00000001, 0x27400231, 0x00000478, 0x00000000 }, + { 0x00000001, 0x27410231, 0x0000045f, 0x00000000 }, + { 0x00000008, 0x26803e2d, 0x00000071, 0x00040004 }, + { 0x00200040, 0x22083d8c, 0x00450208, 0x00800080 }, + { 0x00000006, 0x27083dad, 0x00000700, 0x00030003 }, + { 0x00000040, 0x27e01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000016 }, + { 0x00a02001, 0xb3800231, 0x00d20480, 0x00000000 }, + { 0x00a02001, 0xb3a00231, 0x00d20500, 0x00000000 }, + { 0x00a02001, 0xb3c00231, 0x00d204c0, 0x00000000 }, + { 0x00a02001, 0xb3e00231, 0x00d20540, 0x00000000 }, + { 0x00000040, 0x27e01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000100 }, + { 0x00000040, 0x27e01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0xfffffe74 }, + { 0x00000001, 0x27800021, 0x00000780, 0x00000000 }, + { 0x00000001, 0x27a00021, 0x000007a0, 0x00000000 }, + { 0x01600031, 0x20001c20, 0x708d0000, 0x82000010 }, + { 0x00000001, 0x27340231, 0x00000733, 0x00000000 }, + { 0x00600001, 0x274a0231, 0x00000749, 0x00000000 }, + { 0x00800040, 0x24003e2c, 0x00b10723, 0x00020002 }, + { 0x00800048, 0x24003e2c, 0x00b10724, 0x00020002 }, + { 0x00800048, 0x24003e2c, 0x00b10725, 0x00010001 }, + { 0x00800008, 0x26c03d8d, 0x008d0400, 0x00020002 }, + { 0x00800040, 0x24003e2c, 0x00b10740, 0x00020002 }, + { 0x00800048, 0x24003e2c, 0x00b10741, 0x00020002 }, + { 0x00800048, 0x24003e2c, 0x00b10742, 0x00010001 }, + { 0x00800008, 0x26a03d8d, 0x008d0400, 0x00020002 }, + { 0x00800001, 0x27240231, 0x00d206c0, 0x00000000 }, + { 0x00600001, 0x27400231, 0x00ae06a2, 0x00000000 }, + { 0x00000001, 0x27230231, 0x000006a0, 0x00000000 }, + { 0x00000005, 0x220e3dac, 0x00000680, 0x000f000f }, + { 0x00000001, 0x26a00221, 0x00009c2c, 0x00000000 }, + { 0x00000220, 0x34001400, 0x00001400, 0x000006a0 }, + { 0x80800040, 0xd00045b1, 0x00b18800, 0x000d0724 }, + { 0x80800040, 0xd02045b1, 0x00b18820, 0x000d0724 }, + { 0x80800040, 0xd04045b1, 0x00b18840, 0x000d0724 }, + { 0x80800040, 0xd06045b1, 0x00b18860, 0x000d0724 }, + { 0x00000001, 0x34000020, 0x000007e0, 0x00000000 }, + { 0x80800040, 0xd00045b1, 0x00b18800, 0x002c0740 }, + { 0x80800040, 0xd02045b1, 0x00b18820, 0x002c0742 }, + { 0x80800040, 0xd04045b1, 0x00b18840, 0x002c0744 }, + { 0x80800040, 0xd06045b1, 0x00b18860, 0x002c0746 }, + { 0x00000001, 0x34000020, 0x000007e0, 0x00000000 }, + { 0x02802005, 0x20003da0, 0x00000708, 0x00020002 }, + { 0x02600005, 0x20003da0, 0x02000708, 0x00010001 }, + { 0x009a0001, 0x27200169, 0x00000000, 0x80808080 }, + { 0x00780001, 0x27400231, 0x028d0724, 0x00000000 }, + { 0x00780001, 0x27240231, 0x008d0740, 0x00000000 }, + { 0x00600040, 0x25e04629, 0x008d0724, 0x008d0740 }, + { 0x00400040, 0x25e02529, 0x006905e0, 0x006905e8 }, + { 0x00200040, 0x25e02529, 0x004505e0, 0x004505e4 }, + { 0x00800040, 0x2400252c, 0x000005e0, 0x000005e2 }, + { 0x00800040, 0x24003d8c, 0x008d0400, 0x00080008 }, + { 0x00800008, 0x26803d8d, 0x008d0400, 0x00040004 }, + { 0x80800040, 0xd00035b1, 0x00b18800, 0x00b10680 }, + { 0x80800040, 0xd02035b1, 0x00b18820, 0x00b10680 }, + { 0x80800040, 0xd04035b1, 0x00b18840, 0x00b10680 }, + { 0x80800040, 0xd06035b1, 0x00b18860, 0x00b10680 }, + { 0x00000001, 0x34000020, 0x000007e0, 0x00000000 }, + { 0x00600001, 0x27340231, 0x008d0733, 0x00000000 }, + { 0x00800040, 0x24003e2c, 0x00b10726, 0x00020002 }, + { 0x00800048, 0x24003e2c, 0x00b10725, 0x00020002 }, + { 0x00800048, 0x24003e2c, 0x00b10724, 0x00010001 }, + { 0x00800008, 0x26803d8d, 0x00b10400, 0x00020002 }, + { 0x80800040, 0xd00035b1, 0x00b18800, 0x002d0680 }, + { 0x80800040, 0xd02035b1, 0x00b18820, 0x002d0684 }, + { 0x80800040, 0xd04035b1, 0x00b18840, 0x002d0688 }, + { 0x80800040, 0xd06035b1, 0x00b18860, 0x002d068c }, + { 0x00000001, 0x34000020, 0x000007e0, 0x00000000 }, + { 0x00400009, 0x26c05421, 0x00000744, 0x00690050 }, + { 0x00400009, 0x26d05421, 0x00000740, 0x00690050 }, + { 0x00600001, 0x26a00231, 0x00cf06c3, 0x00000000 }, + { 0x00800001, 0x26a80231, 0x00b10723, 0x00000000 }, + { 0x00800040, 0x24003e2c, 0x00b106a2, 0x00020002 }, + { 0x00800048, 0x24003e2c, 0x00b106a1, 0x00020002 }, + { 0x00800048, 0x24003e2c, 0x00b106a0, 0x00010001 }, + { 0x00800008, 0x26a03d8d, 0x00b10400, 0x00020002 }, + { 0x00200040, 0x220c3eac, 0x00450056, 0x06a006a0 }, + { 0x80800040, 0xd06035b1, 0x01ed9800, 0x00b18860 }, + { 0x80800040, 0xd04035b1, 0x01ed9804, 0x00b18840 }, + { 0x80800040, 0xd02035b1, 0x01ed9808, 0x00b18820 }, + { 0x80800040, 0xd00035b1, 0x01ed980c, 0x00b18800 }, + { 0x00000001, 0x34000020, 0x000007e0, 0x00000000 }, + { 0x00400009, 0x26c05421, 0x00000744, 0x00690050 }, + { 0x00400009, 0x26d05421, 0x00000740, 0x00690050 }, + { 0x00600001, 0x26a00231, 0x00cf06c3, 0x00000000 }, + { 0x00800001, 0x26a80231, 0x00b10723, 0x00000000 }, + { 0x00800042, 0x25c04629, 0x00b106a8, 0x00b106a9 }, + { 0x00800040, 0x24003e2c, 0x00b106a3, 0x00020002 }, + { 0x00800048, 0x24003e2c, 0x00b106a2, 0x00020002 }, + { 0x00800048, 0x24003e2c, 0x00b106a1, 0x00010001 }, + { 0x00800008, 0x26c03d8d, 0x008d0400, 0x00020002 }, + { 0x00600001, 0x26a00231, 0x00ae06c0, 0x00000000 }, + { 0x00600001, 0x46a60231, 0x00ae06cc, 0x00000000 }, + { 0x00600001, 0x46a70231, 0x00ae05c0, 0x00000000 }, + { 0x00200040, 0x220c3eac, 0x00450036, 0x06a006a0 }, + { 0x80800040, 0xd0603631, 0x01ee9800, 0x00b18860 }, + { 0x80800040, 0xd0403631, 0x01ee9802, 0x00b18840 }, + { 0x80800040, 0xd0203631, 0x01ee9804, 0x00b18820 }, + { 0x80800040, 0xd0003631, 0x01ee9806, 0x00b18800 }, + { 0x00000001, 0x34000020, 0x000007e0, 0x00000000 }, + { 0x00400009, 0x26c05421, 0x00000744, 0x00690050 }, + { 0x00400009, 0x26d05421, 0x00000740, 0x00690050 }, + { 0x00600001, 0x26a00231, 0x00ab06c3, 0x00000000 }, + { 0x00800001, 0x26a80231, 0x00b10723, 0x00000000 }, + { 0x00800040, 0x24003e2c, 0x00b106a2, 0x00020002 }, + { 0x00800048, 0x24003e2c, 0x00b106a1, 0x00020002 }, + { 0x00800048, 0x24003e2c, 0x00b106a0, 0x00010001 }, + { 0x00800008, 0x25c03d89, 0x008d0400, 0x00020002 }, + { 0x00800042, 0x26a0462d, 0x00b106a0, 0x00b106a1 }, + { 0x00600001, 0x46a10231, 0x00ae05c0, 0x00000000 }, + { 0x00600001, 0x26b00231, 0x00ae05d0, 0x00000000 }, + { 0x00200040, 0x220c3eac, 0x00450056, 0x06a006a0 }, + { 0x80800040, 0xd0603631, 0x01ed9800, 0x00b18860 }, + { 0x80800040, 0xd0403631, 0x01ed9804, 0x00b18840 }, + { 0x80800040, 0xd0203631, 0x01ed9808, 0x00b18820 }, + { 0x80800040, 0xd0003631, 0x01ed980c, 0x00b18800 }, + { 0x00000001, 0x34000020, 0x000007e0, 0x00000000 }, + { 0x00800042, 0x25c04629, 0x00b10724, 0x00b10725 }, + { 0x00800040, 0x24003e2c, 0x00b10726, 0x00020002 }, + { 0x00800048, 0x24003e2c, 0x00b10725, 0x00020002 }, + { 0x00800048, 0x24003e2c, 0x00b10724, 0x00010001 }, + { 0x00800008, 0x25e03d89, 0x002d0400, 0x00020002 }, + { 0x80800040, 0xd0003531, 0x00ad05c0, 0x00b18800 }, + { 0x80800040, 0xd0203531, 0x00ad05c2, 0x00b18820 }, + { 0x80800040, 0xd0403531, 0x00ad05c4, 0x00b18840 }, + { 0x80800040, 0xd0603531, 0x00ad05c6, 0x00b18860 }, + { 0x00000001, 0x34000020, 0x000007e0, 0x00000000 }, + { 0x00600001, 0x27480231, 0x00000747, 0x00000000 }, + { 0x00800042, 0x25c04629, 0x00b10740, 0x00b10741 }, + { 0x00800040, 0x24003e2c, 0x00b10742, 0x00020002 }, + { 0x00800048, 0x24003e2c, 0x00b10741, 0x00020002 }, + { 0x00800048, 0x24003e2c, 0x00b10740, 0x00010001 }, + { 0x00800008, 0x25e03d89, 0x002d0400, 0x00020002 }, + { 0x00800001, 0x45c10231, 0x00d205e0, 0x00000000 }, + { 0x80800040, 0xd0003631, 0x004d05c0, 0x00b18800 }, + { 0x80800040, 0xd0203631, 0x004d05c4, 0x00b18820 }, + { 0x80800040, 0xd0403631, 0x004d05c8, 0x00b18840 }, + { 0x80800040, 0xd0603631, 0x004d05cc, 0x00b18860 }, + { 0x00000001, 0x34000020, 0x000007e0, 0x00000000 }, + { 0x00000401, 0x27c80061, 0x00000000, 0x000f000f }, + { 0x00200801, 0x27c001a1, 0x004507fa, 0x00000000 }, + { 0x00000040, 0x22000c00, 0x00000200, 0x0ff04000 }, + { 0x00800001, 0x20400232, 0x00cd0400, 0x00000000 }, + { 0x00800001, 0x20500232, 0x00cd0408, 0x00000000 }, + { 0x00800001, 0x20600232, 0x00cd0410, 0x00000000 }, + { 0x00800001, 0x20700232, 0x00cd0418, 0x00000000 }, + { 0x00800001, 0x20800232, 0x00cd0440, 0x00000000 }, + { 0x00800001, 0x20900232, 0x00cd0448, 0x00000000 }, + { 0x00800001, 0x20a00232, 0x00cd0450, 0x00000000 }, + { 0x00800001, 0x20b00232, 0x00cd0458, 0x00000000 }, + { 0x00800001, 0x20c00232, 0x00cd0480, 0x00000000 }, + { 0x00800001, 0x20d00232, 0x00cd0488, 0x00000000 }, + { 0x00800001, 0x20e00232, 0x00cd0490, 0x00000000 }, + { 0x00800001, 0x20f00232, 0x00cd0498, 0x00000000 }, + { 0x00800001, 0x21000232, 0x00cd04c0, 0x00000000 }, + { 0x00800001, 0x21100232, 0x00cd04c8, 0x00000000 }, + { 0x00800001, 0x21200232, 0x00cd04d0, 0x00000000 }, + { 0x00800001, 0x21300232, 0x00cd04d8, 0x00000000 }, + { 0x01600031, 0x27800021, 0x508d07c0, 0x00000200 }, + { 0x00000001, 0x34000020, 0x000007e0, 0x00000000 }, + { 0x00600001, 0x27c00021, 0x008d0000, 0x00000000 }, + { 0x00200009, 0x27fa3e29, 0x00450064, 0x00040004 }, + { 0x00000040, 0x27e01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0xfffffd34 }, + { 0x00000001, 0x220401ec, 0x00000000, 0x00800080 }, + { 0x00000001, 0x220601ec, 0x00000000, 0x04000400 }, + { 0x00200008, 0x27006e2d, 0x0000006c, 0x00000040 }, + { 0x02600005, 0x20003e20, 0x0000006c, 0x00040004 }, + { 0x00780001, 0x26340231, 0x00000633, 0x00000000 }, + { 0x00800001, 0x27200231, 0x00b10620, 0x00000000 }, + { 0x00600001, 0x27400231, 0x00cf0643, 0x00000000 }, + { 0x00400008, 0x26806e2d, 0x00240070, 0x00004040 }, + { 0x00000040, 0x27e01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x0000006a }, + { 0x00000040, 0x22043d8c, 0x00000204, 0x00800080 }, + { 0x00000006, 0x27003dad, 0x00000700, 0x00010001 }, + { 0x00800001, 0x27200231, 0x00b10628, 0x00000000 }, + { 0x00400001, 0x27400231, 0x00808c26, 0x00000000 }, + { 0x00400001, 0x27440231, 0x00808c66, 0x00000000 }, + { 0x00400008, 0x26806e2d, 0x00240072, 0x00004040 }, + { 0x00000040, 0x22063d8c, 0x00000206, 0x00800080 }, + { 0x00000040, 0x27e01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000058 }, + { 0x00000040, 0x22043d8c, 0x00000204, 0x00800080 }, + { 0x00000006, 0x27003dad, 0x00000702, 0x00020002 }, + { 0x00800001, 0xaf800231, 0x00d28f80, 0x00000000 }, + { 0x00800001, 0xaf900231, 0x00d28fa0, 0x00000000 }, + { 0x00800001, 0xafc00231, 0x00d28fc0, 0x00000000 }, + { 0x00800001, 0xafd00231, 0x00d28fe0, 0x00000000 }, + { 0x00800001, 0xafa00231, 0x00d28c00, 0x00000000 }, + { 0x00800001, 0xafb00231, 0x00d28c20, 0x00000000 }, + { 0x00800001, 0xafe00231, 0x00d28c40, 0x00000000 }, + { 0x00800001, 0xaff00231, 0x00d28c60, 0x00000000 }, + { 0x00400001, 0x27200231, 0x0069065c, 0x00000000 }, + { 0x00600001, 0x27240231, 0x00a98fcc, 0x00000000 }, + { 0x00600001, 0x272c0231, 0x00a98fec, 0x00000000 }, + { 0x00600001, 0x27340231, 0x00008fff, 0x00000000 }, + { 0x00800001, 0x2620012d, 0x00b10720, 0x00000000 }, + { 0x00600001, 0x27400231, 0x00cf0663, 0x00000000 }, + { 0x00400008, 0x26806e2d, 0x00240074, 0x00004040 }, + { 0x00000040, 0x27e01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000032 }, + { 0x00000040, 0x22043d8c, 0x00000204, 0x00800080 }, + { 0x00000006, 0x27003dad, 0x00000700, 0x00010001 }, + { 0x00800001, 0x27200231, 0x00b10628, 0x00000000 }, + { 0x00600001, 0x27300231, 0x008d0638, 0x00000000 }, + { 0x00400001, 0x27400231, 0x00808c26, 0x00000000 }, + { 0x00400001, 0x27440231, 0x00808c66, 0x00000000 }, + { 0x00400008, 0x26806e2d, 0x00240076, 0x00004040 }, + { 0x00000040, 0x22063d8c, 0x00000206, 0x00800080 }, + { 0x00000040, 0x27e01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x0000001e }, + { 0x00800001, 0xaf800231, 0x00d28f80, 0x00000000 }, + { 0x00800001, 0xaf900231, 0x00d28fa0, 0x00000000 }, + { 0x00800001, 0xafc00231, 0x00d28fc0, 0x00000000 }, + { 0x00800001, 0xafd00231, 0x00d28fe0, 0x00000000 }, + { 0x00800001, 0xafa00231, 0x00d28c00, 0x00000000 }, + { 0x00800001, 0xafb00231, 0x00d28c20, 0x00000000 }, + { 0x00800001, 0xafe00231, 0x00d28c40, 0x00000000 }, + { 0x00800001, 0xaff00231, 0x00d28c60, 0x00000000 }, + { 0x00000040, 0x27e01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x000000e0 }, + { 0x00000040, 0x27e01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0xfffffcce }, + { 0x00000001, 0x27800021, 0x00000780, 0x00000000 }, + { 0x00000001, 0x27a00021, 0x000007a0, 0x00000000 }, + { 0x01600031, 0x20001c20, 0x708d0000, 0x82000010 }, + { 0x00600001, 0x27800231, 0x008d0740, 0x00000000 }, + { 0x00400005, 0x22083dac, 0x00690680, 0x000f000f }, + { 0x00400040, 0x26a04625, 0x01e09020, 0x00690058 }, + { 0x00000001, 0x26d001ad, 0x00000700, 0x00000000 }, + { 0x00000040, 0x27e41c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001400, 0x00001400, 0x000006a0 }, + { 0x80600040, 0xcc0035b1, 0x00898800, 0x008d0760 }, + { 0x80600040, 0xcc1035b1, 0x00898820, 0x008d0770 }, + { 0x00800001, 0x27200231, 0x008d0724, 0x00000000 }, + { 0x00400001, 0x27400231, 0x00808c06, 0x00000000 }, + { 0x00000006, 0x26d03dad, 0x00000700, 0x00010001 }, + { 0x00000040, 0x27e41c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001400, 0x00001400, 0x000006a4 }, + { 0x80600040, 0xcc2035b1, 0x00898808, 0x008d0760 }, + { 0x80600040, 0xcc3035b1, 0x00898828, 0x008d0770 }, + { 0x00000001, 0x27230231, 0x00000783, 0x00000000 }, + { 0x00400001, 0x27240231, 0x008a8c18, 0x00000000 }, + { 0x00400001, 0x27280231, 0x008a8c38, 0x00000000 }, + { 0x00400001, 0x272c0231, 0x00008c3e, 0x00000000 }, + { 0x00400001, 0x27400231, 0x00690784, 0x00000000 }, + { 0x00000006, 0x26d03dad, 0x00000700, 0x00020002 }, + { 0x00000040, 0x27e41c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001400, 0x00001400, 0x000006a8 }, + { 0x80600040, 0xcc4035b1, 0x00898840, 0x008d0760 }, + { 0x80600040, 0xcc5035b1, 0x00898860, 0x008d0770 }, + { 0x00800001, 0x27200231, 0x008d0724, 0x00000000 }, + { 0x00600001, 0x27280231, 0x00000727, 0x00000000 }, + { 0x00400001, 0x27400231, 0x00808c46, 0x00000000 }, + { 0x00000006, 0x26d03dad, 0x00000700, 0x00030003 }, + { 0x00000040, 0x27e41c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001400, 0x00001400, 0x000006ac }, + { 0x80600040, 0xcc6035b1, 0x00898848, 0x008d0760 }, + { 0x80600040, 0xcc7035b1, 0x00898868, 0x008d0770 }, + { 0x00000001, 0x34000020, 0x000007e0, 0x00000000 }, + { 0x00800001, 0x2760022d, 0x00090724, 0x00000000 }, + { 0x00000001, 0x34000020, 0x000007e4, 0x00000000 }, + { 0x00800001, 0x2760022d, 0x00280740, 0x00000000 }, + { 0x00000001, 0x34000020, 0x000007e4, 0x00000000 }, + { 0x02802005, 0x20003da0, 0x000006d0, 0x00020002 }, + { 0x02802005, 0x20003da0, 0x020006d0, 0x00010001 }, + { 0x009a0001, 0x27200169, 0x00000000, 0x80808080 }, + { 0x00780001, 0x27400231, 0x028d0724, 0x00000000 }, + { 0x00780001, 0x27240231, 0x008d0740, 0x00000000 }, + { 0x00400040, 0x25e04629, 0x00690724, 0x00690740 }, + { 0x00200040, 0x25e02529, 0x004505e0, 0x004505e4 }, + { 0x00800040, 0x2400252c, 0x000005e0, 0x000005e2 }, + { 0x00800040, 0x24003d8c, 0x008d0400, 0x00040004 }, + { 0x00800008, 0x27603d8d, 0x008d0400, 0x00030003 }, + { 0x00000001, 0x34000020, 0x000007e4, 0x00000000 }, + { 0x00600001, 0x26c00231, 0x008d0724, 0x00000000 }, + { 0x00400001, 0x26c80231, 0x0069072b, 0x00000000 }, + { 0x00600040, 0x24003e2c, 0x008d06c2, 0x00020002 }, + { 0x00600048, 0x24003e2c, 0x008d06c1, 0x00020002 }, + { 0x00600048, 0x25e03e29, 0x008d06c0, 0x00010001 }, + { 0x00800008, 0x27603d2d, 0x002905e0, 0x00020002 }, + { 0x00000001, 0x34000020, 0x000007e4, 0x00000000 }, + { 0x00400009, 0x26e05421, 0x00000740, 0x00690050 }, + { 0x00600001, 0x26c40231, 0x008d0723, 0x00000000 }, + { 0x00400001, 0x26c00231, 0x00ab06e3, 0x00000000 }, + { 0x00600040, 0x24003e2c, 0x008d06c2, 0x00020002 }, + { 0x00600048, 0x24003e2c, 0x008d06c1, 0x00020002 }, + { 0x00600048, 0x26c03e2d, 0x008d06c0, 0x00010001 }, + { 0x00400040, 0x22083eac, 0x00690054, 0x06c006c0 }, + { 0x00800008, 0x27603dad, 0x01e99000, 0x00020002 }, + { 0x00000001, 0x34000020, 0x000007e4, 0x00000000 }, + { 0x00400009, 0x26e05421, 0x00000740, 0x00690050 }, + { 0x00600001, 0x26c40231, 0x008d0723, 0x00000000 }, + { 0x00400001, 0x26c00231, 0x00ab06e3, 0x00000000 }, + { 0x00600042, 0x25c04629, 0x008d06c4, 0x008d06c5 }, + { 0x00600040, 0x24003e2c, 0x008d06c3, 0x00020002 }, + { 0x00600048, 0x24003e2c, 0x008d06c2, 0x00020002 }, + { 0x00600048, 0x24003e2c, 0x008d06c1, 0x00010001 }, + { 0x00600008, 0x26c03d8d, 0x008d0400, 0x00020002 }, + { 0x00400001, 0x46c401ad, 0x006906c4, 0x00000000 }, + { 0x00400001, 0x46c6012d, 0x006905c0, 0x00000000 }, + { 0x00400040, 0x22083eac, 0x00690054, 0x06c006c0 }, + { 0x00800001, 0x276001ad, 0x01ea9000, 0x00000000 }, + { 0x00000001, 0x34000020, 0x000007e4, 0x00000000 }, + { 0x00400009, 0x26e05421, 0x00000740, 0x00690050 }, + { 0x00600001, 0x26c40231, 0x008d0723, 0x00000000 }, + { 0x00400001, 0x26c00231, 0x00ab06e3, 0x00000000 }, + { 0x00600042, 0x25c04629, 0x008d06c0, 0x008d06c1 }, + { 0x00600040, 0x24003e2c, 0x008d06c2, 0x00020002 }, + { 0x00600048, 0x24003e2c, 0x008d06c1, 0x00020002 }, + { 0x00600048, 0x26e03e2d, 0x008d06c0, 0x00010001 }, + { 0x00400008, 0x46c23dad, 0x006906e0, 0x00020002 }, + { 0x00200008, 0x26d03dad, 0x004506e8, 0x00020002 }, + { 0x00400001, 0x46c0012d, 0x006905c0, 0x00000000 }, + { 0x00400009, 0x22083eac, 0x00690054, 0x00010001 }, + { 0x00400040, 0x22083d8c, 0x00690208, 0x06c006c0 }, + { 0x00800001, 0x276001ad, 0x01e99000, 0x00000000 }, + { 0x00000001, 0x34000020, 0x000007e4, 0x00000000 }, + { 0x00600042, 0x45c04629, 0x008d0724, 0x008d0725 }, + { 0x00600040, 0x24003e2c, 0x008d0726, 0x00020002 }, + { 0x00600048, 0x24003e2c, 0x008d0725, 0x00020002 }, + { 0x00600048, 0x25e03e29, 0x008d0724, 0x00010001 }, + { 0x00600008, 0x45c23d29, 0x008d05e0, 0x00020002 }, + { 0x00800001, 0x2760012d, 0x002a05c0, 0x00000000 }, + { 0x00000001, 0x34000020, 0x000007e4, 0x00000000 }, + { 0x00600001, 0x27440231, 0x00000743, 0x00000000 }, + { 0x00600042, 0x45c04629, 0x008d0740, 0x008d0741 }, + { 0x00600040, 0x24003e2c, 0x008d0742, 0x00020002 }, + { 0x00600048, 0x24003e2c, 0x008d0741, 0x00020002 }, + { 0x00600048, 0x25e03e29, 0x008d0740, 0x00010001 }, + { 0x00600008, 0x45c23d29, 0x008d05e0, 0x00020002 }, + { 0x00800001, 0x2760012d, 0x004905c0, 0x00000000 }, + { 0x00000001, 0x34000020, 0x000007e4, 0x00000000 }, + { 0x00000401, 0x27c80061, 0x00000000, 0x000f000f }, + { 0x00200801, 0x27c001a1, 0x004507fa, 0x00000000 }, + { 0x00000040, 0x22000c00, 0x00000200, 0x0ff04000 }, + { 0x00800001, 0x20400232, 0x00a90400, 0x00000000 }, + { 0x00800001, 0x20500232, 0x00a90404, 0x00000000 }, + { 0x00800001, 0x20600232, 0x00a90408, 0x00000000 }, + { 0x00800001, 0x20700232, 0x00a9040c, 0x00000000 }, + { 0x00800001, 0x20800232, 0x00a90440, 0x00000000 }, + { 0x00800001, 0x20900232, 0x00a90444, 0x00000000 }, + { 0x00800001, 0x20a00232, 0x00a90448, 0x00000000 }, + { 0x00800001, 0x20b00232, 0x00a9044c, 0x00000000 }, + { 0x00800001, 0x20c00232, 0x00a90480, 0x00000000 }, + { 0x00800001, 0x20d00232, 0x00a90484, 0x00000000 }, + { 0x00800001, 0x20e00232, 0x00a90488, 0x00000000 }, + { 0x00800001, 0x20f00232, 0x00a9048c, 0x00000000 }, + { 0x00800001, 0x21000232, 0x00a904c0, 0x00000000 }, + { 0x00800001, 0x21100232, 0x00a904c4, 0x00000000 }, + { 0x00800001, 0x21200232, 0x00a904c8, 0x00000000 }, + { 0x00800001, 0x21300232, 0x00a904cc, 0x00000000 }, + { 0x01600031, 0x27800021, 0x508d07c0, 0x00000200 }, + { 0x00000001, 0x34000020, 0x000007e0, 0x00000000 }, + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x00600001, 0x27c00021, 0x008d0000, 0x00000000 }, + { 0x00200009, 0x27fa3e29, 0x00450064, 0x00040004 }, + { 0x00000401, 0x27c80061, 0x00000000, 0x000f000f }, + { 0x00200809, 0x27c03e21, 0x00450064, 0x00040004 }, + { 0x00000040, 0x22000d20, 0x00000062, 0x1218a000 }, + { 0x00a02401, 0x20400232, 0x00b10080, 0x00000000 }, + { 0x00a02801, 0x20500232, 0x00b10090, 0x00000000 }, + { 0x00a02401, 0x20800232, 0x00b100c0, 0x00000000 }, + { 0x00a02801, 0x20900232, 0x00b100d0, 0x00000000 }, + { 0x00a02401, 0x20c00232, 0x00b10100, 0x00000000 }, + { 0x00a02801, 0x20d00232, 0x00b10110, 0x00000000 }, + { 0x00a02401, 0x21000232, 0x00b10140, 0x00000000 }, + { 0x00a02801, 0x21100232, 0x00b10150, 0x00000000 }, + { 0x01600031, 0x27800021, 0x508d07c0, 0x00000200 }, + { 0x00000401, 0x20280062, 0x00000000, 0x0007000f }, + { 0x0000080c, 0x20243c22, 0x000007c4, 0x00010001 }, + { 0x00000040, 0x22001c00, 0x00000200, 0xf8000001 }, + { 0x00800001, 0x40400232, 0x00b10180, 0x00000000 }, + { 0x00800001, 0x40410232, 0x00b101c0, 0x00000000 }, + { 0x00800001, 0x40600232, 0x00b10190, 0x00000000 }, + { 0x00800001, 0x40610232, 0x00b101d0, 0x00000000 }, + { 0x00800001, 0x40800232, 0x00b101a0, 0x00000000 }, + { 0x00800001, 0x40810232, 0x00b101e0, 0x00000000 }, + { 0x00800001, 0x40a00232, 0x00b101b0, 0x00000000 }, + { 0x00800001, 0x40a10232, 0x00b101f0, 0x00000000 }, + { 0x01600031, 0x27a00001, 0x508d0000, 0x00000200 }, + { 0x00000001, 0x27800021, 0x00000780, 0x00000000 }, + { 0x00000001, 0x27a00021, 0x000007a0, 0x00000000 }, + { 0x01600031, 0x20001c20, 0x708d0000, 0x82000010 }, + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x00600001, 0x20400021, 0x008d0000, 0x00000000 }, + { 0x00000005, 0x20203e2d, 0x00000061, 0x001f001f }, + { 0x00200009, 0x20643e2d, 0x00450064, 0x00040004 }, + { 0x00000001, 0x203a01ed, 0x00000000, 0x00000000 }, + { 0x01000010, 0x20003dac, 0x00000020, 0x00160016 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x0000001e }, + { 0x01200010, 0x20003e2c, 0x0200006c, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x00000024 }, + { 0x00800009, 0x25403dad, 0x00050064, 0x00020002 }, + { 0x00000001, 0x203a01ed, 0x00000000, 0x00180018 }, + { 0x00200040, 0x45483dad, 0x00660548, 0x00100010 }, + { 0x00200040, 0x45523dad, 0x00660552, 0x00100010 }, + { 0x00400040, 0x25583dad, 0x00690558, 0x00100010 }, + { 0x00800040, 0x208035ad, 0x00b10080, 0x00b10540 }, + { 0x00600040, 0x45403dad, 0x00ae0540, 0x00200020 }, + { 0x00800040, 0x20a035ad, 0x00b100a0, 0x00b10540 }, + { 0x00600040, 0x45423dad, 0x00ae0542, 0x00200020 }, + { 0x00800040, 0x20e035ad, 0x00b100e0, 0x00b10540 }, + { 0x00600040, 0x45403dad, 0x00ae0540, 0xffe0ffe0 }, + { 0x00800040, 0x20c035ad, 0x00b100c0, 0x00b10540 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000014 }, + { 0x06600010, 0x20003dac, 0x02000020, 0x00030003 }, + { 0x00000001, 0x206c0171, 0x00000000, 0x00000000 }, + { 0x00610001, 0x208000a5, 0x02050080, 0x00000000 }, + { 0x00610001, 0x212000a5, 0x02090100, 0x00000000 }, + { 0x00410001, 0x211000a5, 0x02690100, 0x00000000 }, + { 0x00200009, 0x25403dad, 0x00450064, 0x00020002 }, + { 0x00800040, 0x208035ad, 0x00b10080, 0x00050540 }, + { 0x00200040, 0x40883dad, 0x00660088, 0x00200020 }, + { 0x00200040, 0x40923dad, 0x00660092, 0x00200020 }, + { 0x00400040, 0x20983dad, 0x00690098, 0x00200020 }, + { 0x00200401, 0x22080060, 0x00000000, 0x03400140 }, + { 0x00000c01, 0x220c0060, 0x00000000, 0x04400080 }, + { 0x00000801, 0x22040060, 0x00000000, 0x01000070 }, + { 0x00000001, 0x20200169, 0x00000000, 0x00000000 }, + { 0x0000000c, 0x2458262d, 0x0000006d, 0x00000020 }, + { 0x00000001, 0x210e0169, 0x00000000, 0x00010001 }, + { 0x00000005, 0x24583dad, 0x00000458, 0x00030003 }, + { 0x01000010, 0x200035ac, 0x0000010e, 0x00000458 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x000002fe }, + { 0x01000010, 0x20003dac, 0x0200010e, 0x00010001 }, + { 0x00010401, 0x24540061, 0x02000000, 0x06c00640 }, + { 0x00010805, 0x245a3e2d, 0x02008800, 0x007f007f }, + { 0x00110401, 0x24540061, 0x02000000, 0x04800780 }, + { 0x00110805, 0x245a3e2d, 0x02008804, 0x007f007f }, + { 0x0000000c, 0x211e362d, 0x0000006c, 0x00000020 }, + { 0x00000040, 0x20780d21, 0x0000045a, 0x0208a002 }, + { 0x02000005, 0x20003dac, 0x0200011e, 0x00030003 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x000001be }, + { 0x01000005, 0x20003dac, 0x00009800, 0x00030003 }, + { 0x00200005, 0x24443dad, 0x00459800, 0x00030003 }, + { 0x0020000c, 0x24403dad, 0x00459800, 0x00020002 }, + { 0x01600006, 0x20003dac, 0x02000446, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000012 }, + { 0x00010040, 0x22000c20, 0x02000078, 0x00400000 }, + { 0x00110040, 0x22000c20, 0x02000078, 0x00700000 }, + { 0x00310040, 0x20401da5, 0x02450440, 0xfffffffe }, + { 0x00110001, 0x20480061, 0x02000000, 0x000c000c }, + { 0x00010040, 0x20401da5, 0x02000440, 0xfffffffe }, + { 0x00010001, 0x204401a5, 0x02000442, 0x00000000 }, + { 0x00010001, 0x20480061, 0x02000000, 0x0007000c }, + { 0x01600031, 0x25600021, 0x408d0040, 0x00000200 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x0000000e }, + { 0x00010040, 0x22000c20, 0x02000078, 0x00200000 }, + { 0x00110040, 0x22000c20, 0x02000078, 0x00400000 }, + { 0x00200001, 0x204001a5, 0x00450440, 0x00000000 }, + { 0x00110040, 0x20441da5, 0x02000442, 0xfffffffe }, + { 0x00110001, 0x20480061, 0x02000000, 0x000c0007 }, + { 0x00010001, 0x20480061, 0x02000000, 0x00070007 }, + { 0x01600031, 0x25600021, 0x408d0040, 0x00000200 }, + { 0x0020040c, 0x24403dad, 0x00459800, 0x00030003 }, + { 0x00200805, 0x24483dad, 0x00459800, 0x00070007 }, + { 0x01600006, 0x20003dac, 0x0000044a, 0x00000000 }, + { 0x00200001, 0x204001a5, 0x00450440, 0x00000000 }, + { 0x00000009, 0x20403ca5, 0x00000040, 0x00010001 }, + { 0x00010040, 0x22000c20, 0x00000078, 0x00200010 }, + { 0x00110040, 0x22000c20, 0x00000078, 0x00300010 }, + { 0x00010001, 0x20480061, 0x00000000, 0x00030009 }, + { 0x00110001, 0x20480061, 0x00000000, 0x00040009 }, + { 0x02600031, 0x27000021, 0x408d0040, 0x00000200 }, + { 0x01000005, 0x20003dac, 0x00009800, 0x00030003 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x0000001a }, + { 0x00600001, 0x26220231, 0x008d05c0, 0x00000000 }, + { 0x00600401, 0x26120231, 0x008d05b8, 0x00000000 }, + { 0x00600801, 0x26020231, 0x008d05b0, 0x00000000 }, + { 0x00600401, 0x25f20231, 0x008d05a8, 0x00000000 }, + { 0x00600801, 0x25e20231, 0x008d05a0, 0x00000000 }, + { 0x00600401, 0x25d20231, 0x008d0598, 0x00000000 }, + { 0x00600801, 0x25c20231, 0x008d0590, 0x00000000 }, + { 0x00600401, 0x25b20231, 0x008d0588, 0x00000000 }, + { 0x00600801, 0x25a20231, 0x008d0580, 0x00000000 }, + { 0x00600401, 0x25920231, 0x008d0578, 0x00000000 }, + { 0x00600801, 0x25820231, 0x008d0570, 0x00000000 }, + { 0x00600001, 0x25720231, 0x008d0568, 0x00000000 }, + { 0x00600001, 0x25620231, 0x008d0560, 0x00000000 }, + { 0x00110001, 0x220001ec, 0x02000000, 0x05820582 }, + { 0x00010001, 0x220001ec, 0x02000000, 0x05620562 }, + { 0x00000001, 0x220e0128, 0x00000454, 0x00000000 }, + { 0x01800006, 0x200035ac, 0x02000446, 0x00000444 }, + { 0x00810001, 0xbc000229, 0x02ad8000, 0x00000000 }, + { 0x00810001, 0xbc200229, 0x02ad8020, 0x00000000 }, + { 0x00810001, 0xbc400229, 0x02ad8040, 0x00000000 }, + { 0x00810001, 0xbc600229, 0x02ad8060, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x0000012a }, + { 0x00600001, 0x2024018d, 0x008d0200, 0x00000000 }, + { 0x01000041, 0x245e35ad, 0x00000446, 0x00000444 }, + { 0x00000040, 0x22022d08, 0x00000200, 0x00100010 }, + { 0x02000005, 0x20003db0, 0x0200045e, 0x00010001 }, + { 0x00200040, 0x22042d08, 0x00450200, 0x00200020 }, + { 0x00400001, 0x244c0109, 0x00690200, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000066 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x00000064 }, + { 0x00000040, 0x22003d08, 0x00000200, 0xffdeffde }, + { 0x00000440, 0x22023d08, 0x00000202, 0xffeeffee }, + { 0x00000801, 0x220c0060, 0x00000000, 0x04a00480 }, + { 0x01000010, 0x20003db0, 0x0000045e, 0x00040004 }, + { 0x00a02040, 0x2400462c, 0x00ad8000, 0x00ad8005 }, + { 0x00a02048, 0x24003e2c, 0x00ad8001, 0xfffbfffb }, + { 0x00a02048, 0x24003e2c, 0x00ad8002, 0x00140014 }, + { 0x00a02048, 0x24003e2c, 0x00ad8003, 0x00140014 }, + { 0x00a02048, 0xb8003e2d, 0x00ad8004, 0xfffbfffb }, + { 0x00a02040, 0x2400462c, 0x00ad8040, 0x00ad8045 }, + { 0x00a02048, 0x24003e2c, 0x00ad8041, 0xfffbfffb }, + { 0x00a02048, 0x24003e2c, 0x00ad8042, 0x00140014 }, + { 0x00a02048, 0x24003e2c, 0x00ad8043, 0x00140014 }, + { 0x00a02048, 0xb8403e2d, 0x00ad8044, 0xfffbfffb }, + { 0x00a02040, 0x2400462c, 0x00ad8080, 0x00ad8085 }, + { 0x00a02048, 0x24003e2c, 0x00ad8081, 0xfffbfffb }, + { 0x00a02048, 0x24003e2c, 0x00ad8082, 0x00140014 }, + { 0x00a02048, 0x24003e2c, 0x00ad8083, 0x00140014 }, + { 0x00a02048, 0xb8803e2d, 0x00ad8084, 0xfffbfffb }, + { 0x00600040, 0x2400462c, 0x008d80c0, 0x008d80c5 }, + { 0x00600048, 0x24003e2c, 0x008d80c1, 0xfffbfffb }, + { 0x00600048, 0x24003e2c, 0x008d80c2, 0x00140014 }, + { 0x00600048, 0x24003e2c, 0x008d80c3, 0x00140014 }, + { 0x00600048, 0xb8c03e2d, 0x008d80c4, 0xfffbfffb }, + { 0x00000401, 0x22000060, 0x00000000, 0x04a00480 }, + { 0x00000c01, 0x22040060, 0x00000000, 0x04a00490 }, + { 0x00010802, 0x220c2d28, 0x00000454, 0x04800480 }, + { 0x00a02040, 0x24003dac, 0x00b18000, 0x02000200 }, + { 0x00800048, 0x24003dac, 0x01ed8800, 0xfffbfffb }, + { 0x00800048, 0x24203dac, 0x01ed8820, 0xfffbfffb }, + { 0x00a02048, 0x24003dac, 0x00b18020, 0x00140014 }, + { 0x00800048, 0x24003dac, 0x01ed8820, 0x00140014 }, + { 0x00800048, 0x24203dac, 0x01ed8840, 0x00140014 }, + { 0x00a02048, 0x24003dac, 0x00b18040, 0xfffbfffb }, + { 0x00800048, 0x24003dac, 0x01ed8840, 0x00010001 }, + { 0x00800048, 0x24203dac, 0x01ed8860, 0x00010001 }, + { 0x8080000c, 0xd8003d91, 0x00b10400, 0x000a000a }, + { 0x8080100c, 0xd8203d91, 0x00b10420, 0x000a000a }, + { 0x00a02040, 0x24003dac, 0x00b18040, 0x02000200 }, + { 0x00800048, 0x24003dac, 0x01ed8840, 0xfffbfffb }, + { 0x00800048, 0x24203dac, 0x01ed8860, 0xfffbfffb }, + { 0x00a02048, 0x24003dac, 0x00b18060, 0x00140014 }, + { 0x00800048, 0x24003dac, 0x01ed8860, 0x00140014 }, + { 0x00800048, 0x24203dac, 0x01ed8880, 0x00140014 }, + { 0x00a02048, 0x24003dac, 0x00b18080, 0xfffbfffb }, + { 0x00800048, 0x24003dac, 0x01ed8880, 0x00010001 }, + { 0x00800048, 0x24203dac, 0x01ed88a0, 0x00010001 }, + { 0x8080000c, 0xd8403d91, 0x00b10400, 0x000a000a }, + { 0x8080100c, 0xd8603d91, 0x00b10420, 0x000a000a }, + { 0x00010220, 0x34001c00, 0x00001400, 0x000000b4 }, + { 0x01000010, 0x20003db0, 0x00000444, 0x00000000 }, + { 0x01000010, 0x20003db0, 0x02000446, 0x00020002 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x0000004c }, + { 0x00010220, 0x34001c00, 0x02001400, 0x0000004a }, + { 0x00400040, 0x22003d28, 0x0069044c, 0xfffefffe }, + { 0x03400010, 0x20003dac, 0x00000446, 0x00020002 }, + { 0x01000010, 0x20003db0, 0x02000444, 0x00020002 }, + { 0x00410040, 0x22002d08, 0x00690200, 0x00100010 }, + { 0x01000010, 0x20003dac, 0x00000446, 0x00000000 }, + { 0x00010002, 0x220c2d28, 0x02000454, 0x04800480 }, + { 0x00800040, 0x24003e2c, 0x01ed8000, 0x00100010 }, + { 0x00800040, 0x24203e2c, 0x01ed8020, 0x00100010 }, + { 0x00800048, 0x24003e2c, 0x01ed8001, 0xfffbfffb }, + { 0x00800048, 0x24203e2c, 0x01ed8021, 0xfffbfffb }, + { 0x00800048, 0x24003e2c, 0x01ed8002, 0x00140014 }, + { 0x00800048, 0x24203e2c, 0x01ed8022, 0x00140014 }, + { 0x00800048, 0x24003e2c, 0x01ed8003, 0x00140014 }, + { 0x00800048, 0x24203e2c, 0x01ed8023, 0x00140014 }, + { 0x00800048, 0x24003e2c, 0x01ed8004, 0xfffbfffb }, + { 0x00800048, 0x24203e2c, 0x01ed8024, 0xfffbfffb }, + { 0x00800048, 0x24003e2c, 0x01ed8005, 0x00010001 }, + { 0x00800048, 0x24203e2c, 0x01ed8025, 0x00010001 }, + { 0x8080000c, 0xd8003d91, 0x00b10400, 0x00050005 }, + { 0x8080100c, 0xd8203d91, 0x00b10420, 0x00050005 }, + { 0x00800040, 0x24003e2c, 0x01ed8040, 0x00100010 }, + { 0x00800040, 0x24203e2c, 0x01ed8060, 0x00100010 }, + { 0x00800048, 0x24003e2c, 0x01ed8041, 0xfffbfffb }, + { 0x00800048, 0x24203e2c, 0x01ed8061, 0xfffbfffb }, + { 0x00800048, 0x24003e2c, 0x01ed8042, 0x00140014 }, + { 0x00800048, 0x24203e2c, 0x01ed8062, 0x00140014 }, + { 0x00800048, 0x24003e2c, 0x01ed8043, 0x00140014 }, + { 0x00800048, 0x24203e2c, 0x01ed8063, 0x00140014 }, + { 0x00800048, 0x24003e2c, 0x01ed8044, 0xfffbfffb }, + { 0x00800048, 0x24203e2c, 0x01ed8064, 0xfffbfffb }, + { 0x00800048, 0x24003e2c, 0x01ed8045, 0x00010001 }, + { 0x00800048, 0x24203e2c, 0x01ed8065, 0x00010001 }, + { 0x8080000c, 0xd8403d91, 0x00b10400, 0x00050005 }, + { 0x8080100c, 0xd8603d91, 0x00b10420, 0x00050005 }, + { 0x00110220, 0x34001c00, 0x02001400, 0x00000004 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x0000005c }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000062 }, + { 0x01000010, 0x20003db0, 0x00000446, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000042 }, + { 0x00200401, 0x22000128, 0x0066044c, 0x00000000 }, + { 0x00200c01, 0x22040128, 0x0045044e, 0x00000000 }, + { 0x00000801, 0x220c0128, 0x00000454, 0x00000000 }, + { 0x03400010, 0x20003dac, 0x02000444, 0x00020002 }, + { 0x01000010, 0x20003dac, 0x00000444, 0x00000000 }, + { 0x00410040, 0x22002d08, 0x02690200, 0x00010001 }, + { 0x01000010, 0x20003db0, 0x02000446, 0x00020002 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x00000002 }, + { 0x00110001, 0x220c0168, 0x02000000, 0x04800480 }, + { 0x00a02040, 0x24003e2c, 0x00ad83e0, 0x00100010 }, + { 0x00800048, 0x24003e2c, 0x01ed8be0, 0xfffbfffb }, + { 0x00800048, 0x24203e2c, 0x01ed8800, 0xfffbfffb }, + { 0x00a02048, 0x24003e2c, 0x00ad8000, 0x00140014 }, + { 0x00800048, 0x24003e2c, 0x01ed8800, 0x00140014 }, + { 0x00800048, 0x24203e2c, 0x01ed8820, 0x00140014 }, + { 0x00a02048, 0x24003e2c, 0x00ad8020, 0xfffbfffb }, + { 0x00800048, 0x24003e2c, 0x01ed8820, 0x00010001 }, + { 0x00800048, 0x24203e2c, 0x01ed8840, 0x00010001 }, + { 0x8080000c, 0xd8003d91, 0x00b10400, 0x00050005 }, + { 0x8080100c, 0xd8203d91, 0x00b10420, 0x00050005 }, + { 0x00a02040, 0x24003e2c, 0x00ad8020, 0x00100010 }, + { 0x00800048, 0x24003e2c, 0x01ed8820, 0xfffbfffb }, + { 0x00800048, 0x24203e2c, 0x01ed8840, 0xfffbfffb }, + { 0x00a02048, 0x24003e2c, 0x00ad8040, 0x00140014 }, + { 0x00800048, 0x24003e2c, 0x01ed8840, 0x00140014 }, + { 0x00800048, 0x24203e2c, 0x01ed8860, 0x00140014 }, + { 0x00a02048, 0x24003e2c, 0x00ad8060, 0xfffbfffb }, + { 0x00800048, 0x24003e2c, 0x01ed8860, 0x00010001 }, + { 0x00800048, 0x24203e2c, 0x01ed8880, 0x00010001 }, + { 0x8080000c, 0xd8403d91, 0x00b10400, 0x00050005 }, + { 0x8080100c, 0xd8603d91, 0x00b10420, 0x00050005 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x00000016 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x0000001c }, + { 0x00200401, 0x22000128, 0x0045044c, 0x00000000 }, + { 0x00000801, 0x220c0128, 0x00000454, 0x00000000 }, + { 0x01200010, 0x20003dac, 0x00000444, 0x00030003 }, + { 0x01200010, 0x20003dac, 0x02000446, 0x00030003 }, + { 0x00210040, 0x22002d08, 0x00450200, 0x00010001 }, + { 0x00210040, 0x22002d08, 0x02450200, 0x00100010 }, + { 0x00800001, 0xb8000229, 0x01ed8000, 0x00000000 }, + { 0x00800001, 0xb8200229, 0x01ed8020, 0x00000000 }, + { 0x00800001, 0xb8400229, 0x01ed8040, 0x00000000 }, + { 0x00800001, 0xb8600229, 0x01ed8060, 0x00000000 }, + { 0x80800042, 0xd8004631, 0x00d29800, 0x00d20480 }, + { 0x80800042, 0xd8204631, 0x00d29820, 0x00d204a0 }, + { 0x80800042, 0xd8404631, 0x00d29840, 0x00d204c0 }, + { 0x80800042, 0xd8604631, 0x00d29860, 0x00d204e0 }, + { 0x00600001, 0x220001ac, 0x008d0024, 0x00000000 }, + { 0x00200040, 0x244c3dad, 0x00450448, 0xfff8fff8 }, + { 0x00000401, 0x220001ec, 0x00000000, 0x07000700 }, + { 0x00000c01, 0x220201e8, 0x00000000, 0x07100710 }, + { 0x00000801, 0x220e0128, 0x00000456, 0x00000000 }, + { 0x00000441, 0x254635ad, 0x00000448, 0x0000044a }, + { 0x00000c41, 0x254025ad, 0x0000444c, 0x0000444e }, + { 0x00000c41, 0x254225ad, 0x00000448, 0x0000444e }, + { 0x00000841, 0x254435ad, 0x0000444c, 0x0000044a }, + { 0x00200040, 0x244c3d09, 0x00450200, 0x00100010 }, + { 0x00800041, 0x24002628, 0x00ad8000, 0x00000540 }, + { 0x00800041, 0x24202628, 0x00ad8020, 0x00000540 }, + { 0x00800048, 0x24002628, 0x00ad8002, 0x00000542 }, + { 0x00800048, 0x24202628, 0x00ad8022, 0x00000542 }, + { 0x00200001, 0x22000128, 0x0045044c, 0x00000000 }, + { 0x00800048, 0x24002628, 0x01ed8000, 0x00000544 }, + { 0x00800048, 0x24202628, 0x01ed8020, 0x00000544 }, + { 0x00800048, 0xbc002629, 0x01ed8002, 0x00000546 }, + { 0x00801048, 0xbc202629, 0x01ed8022, 0x00000546 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000126 }, + { 0x00000001, 0x20220169, 0x00000000, 0x00040004 }, + { 0x00200005, 0x24443dad, 0x00459800, 0x00030003 }, + { 0x0020000c, 0x24403dad, 0x00459800, 0x00020002 }, + { 0x01600006, 0x20003dac, 0x02000446, 0x00000000 }, + { 0x00010040, 0x22000c20, 0x02000078, 0x00200000 }, + { 0x00110040, 0x22000c20, 0x02000078, 0x00500000 }, + { 0x00310040, 0x20401da5, 0x02450440, 0xfffffffe }, + { 0x00110001, 0x20480061, 0x02000000, 0x00080008 }, + { 0x00010040, 0x20401da5, 0x02000440, 0xfffffffe }, + { 0x00010001, 0x204401a5, 0x02000442, 0x00000000 }, + { 0x00010001, 0x20480061, 0x02000000, 0x00030008 }, + { 0x01600031, 0x25600021, 0x408d0040, 0x00000200 }, + { 0x00000040, 0x22000c20, 0x00000078, 0x00100010 }, + { 0x0020040c, 0x24403dad, 0x00459800, 0x00030003 }, + { 0x00200805, 0x24483dad, 0x00459800, 0x00070007 }, + { 0x00200001, 0x204001a5, 0x00450440, 0x00000000 }, + { 0x00000009, 0x20403ca5, 0x00000040, 0x00010001 }, + { 0x00000001, 0x20480061, 0x00000000, 0x00020005 }, + { 0x02600031, 0x27000021, 0x408d0040, 0x00000200 }, + { 0x00110001, 0x220001ec, 0x02000000, 0x05820582 }, + { 0x00010001, 0x220001ec, 0x02000000, 0x05620562 }, + { 0x00000001, 0x220e0128, 0x00000454, 0x00000000 }, + { 0x01800006, 0x200035ac, 0x02000446, 0x00000444 }, + { 0x00410001, 0xbc000229, 0x02698000, 0x00000000 }, + { 0x00410001, 0xbc100229, 0x02698010, 0x00000000 }, + { 0x00410001, 0xbc200229, 0x02698020, 0x00000000 }, + { 0x00410001, 0xbc300229, 0x02698030, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x000000be }, + { 0x00600001, 0x2024018d, 0x008d0200, 0x00000000 }, + { 0x01000041, 0x245e35ad, 0x00000446, 0x00000444 }, + { 0x02000005, 0x20003db0, 0x0200045e, 0x00010001 }, + { 0x00000040, 0x22022d08, 0x00000200, 0x00100010 }, + { 0x00200040, 0x22042d08, 0x00450200, 0x00200020 }, + { 0x00400001, 0x244c0109, 0x00690200, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000044 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x00000042 }, + { 0x00000040, 0x22003d08, 0x00000200, 0xffdeffde }, + { 0x00000440, 0x22023d08, 0x00000202, 0xffeeffee }, + { 0x00000801, 0x220c0060, 0x00000000, 0x04d004c0 }, + { 0x01000010, 0x20003db0, 0x0000045e, 0x00040004 }, + { 0x00802040, 0x2400462c, 0x00a98000, 0x00a98005 }, + { 0x00802048, 0x24003e2c, 0x00a98001, 0xfffbfffb }, + { 0x00802048, 0x24003e2c, 0x00a98002, 0x00140014 }, + { 0x00802048, 0x24003e2c, 0x00a98003, 0x00140014 }, + { 0x00802048, 0xb8003e2d, 0x00a98004, 0xfffbfffb }, + { 0x00802040, 0x2400462c, 0x00a98040, 0x00a98045 }, + { 0x00802048, 0x24003e2c, 0x00a98041, 0xfffbfffb }, + { 0x00802048, 0x24003e2c, 0x00a98042, 0x00140014 }, + { 0x00802048, 0x24003e2c, 0x00a98043, 0x00140014 }, + { 0x00802048, 0xb8203e2d, 0x00a98044, 0xfffbfffb }, + { 0x00400040, 0x2400462c, 0x00698080, 0x00698085 }, + { 0x00400048, 0x24003e2c, 0x00698081, 0xfffbfffb }, + { 0x00400048, 0x24003e2c, 0x00698082, 0x00140014 }, + { 0x00400048, 0x24003e2c, 0x00698083, 0x00140014 }, + { 0x00400048, 0xb8403e2d, 0x00698084, 0xfffbfffb }, + { 0x00000401, 0x220c0060, 0x00000000, 0x04e004d0 }, + { 0x00000c01, 0x22000060, 0x00000000, 0x04d004c8 }, + { 0x00000c01, 0x22040060, 0x00000000, 0x04e004d8 }, + { 0x00000801, 0x22080060, 0x00000000, 0x04f004e8 }, + { 0x00800040, 0x24003dac, 0x00b104c0, 0x02000200 }, + { 0x00800048, 0x24003dac, 0x00b104e0, 0xfffbfffb }, + { 0x00800048, 0x24003dac, 0x01ed9800, 0x00140014 }, + { 0x00010001, 0x220c0168, 0x00000000, 0x05400540 }, + { 0x00110001, 0x220c0168, 0x00000000, 0x04c004c0 }, + { 0x00800048, 0x24003dac, 0x01e98000, 0xfffbfffb }, + { 0x00800048, 0x24003dac, 0x01e98020, 0x00010001 }, + { 0x00800048, 0x24003dac, 0x01e98800, 0x00140014 }, + { 0x8080000c, 0xd8003d91, 0x00b10400, 0x000a000a }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000060 }, + { 0x01000010, 0x20003db0, 0x00000444, 0x00000000 }, + { 0x01000010, 0x20003db0, 0x02000446, 0x00020002 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000024 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x00000022 }, + { 0x00400040, 0x22003d28, 0x0069044c, 0xfffefffe }, + { 0x03400010, 0x20003dac, 0x00000446, 0x00020002 }, + { 0x01000010, 0x20003db0, 0x02000444, 0x00020002 }, + { 0x00410040, 0x22002d08, 0x00690200, 0x00100010 }, + { 0x01000010, 0x20003dac, 0x00000446, 0x00000000 }, + { 0x00010001, 0x220e0168, 0x02000000, 0x05400540 }, + { 0x00110001, 0x220e0168, 0x02000000, 0x04c004c0 }, + { 0x00800040, 0x24003e2c, 0x01e98000, 0x00100010 }, + { 0x00800048, 0x24003e2c, 0x01e98001, 0xfffbfffb }, + { 0x00800048, 0x24003e2c, 0x01e98002, 0x00140014 }, + { 0x00800048, 0x24003e2c, 0x01e98003, 0x00140014 }, + { 0x00800048, 0x24003e2c, 0x01e98004, 0xfffbfffb }, + { 0x00800048, 0x24003e2c, 0x01e98005, 0x00010001 }, + { 0x8080000c, 0xdc003d91, 0x00b10400, 0x00050005 }, + { 0x00110220, 0x34001c00, 0x02001400, 0x00000004 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x00000036 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000036 }, + { 0x01000010, 0x20003db0, 0x00000446, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000024 }, + { 0x03600010, 0x20003dac, 0x02000444, 0x00020002 }, + { 0x00400401, 0x22000128, 0x0069044c, 0x00000000 }, + { 0x00400840, 0x22083d2c, 0x0069044c, 0x00100010 }, + { 0x00610040, 0x22002d08, 0x02690200, 0x00010001 }, + { 0x01000010, 0x20003dac, 0x00000444, 0x00000000 }, + { 0x01000010, 0x20003db0, 0x02000446, 0x00020002 }, + { 0x00800040, 0x24003e2c, 0x01e983e0, 0x00100010 }, + { 0x00800048, 0x24003e2c, 0x01e98000, 0x00140014 }, + { 0x00800048, 0x24003e2c, 0x01e98020, 0xfffbfffb }, + { 0x00800048, 0x24003e2c, 0x01e993e0, 0xfffbfffb }, + { 0x00800048, 0x24003e2c, 0x01e99000, 0x00140014 }, + { 0x00800048, 0x24003e2c, 0x01e99020, 0x00010001 }, + { 0x00000001, 0x220e0168, 0x00000000, 0x05400540 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x00000002 }, + { 0x00110001, 0x220e0168, 0x02000000, 0x04c004c0 }, + { 0x8080000c, 0xdc003d91, 0x00b10400, 0x00050005 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x0000000e }, + { 0x00010220, 0x34001c00, 0x02001400, 0x0000000e }, + { 0x00400001, 0x22000128, 0x0069044c, 0x00000000 }, + { 0x01400010, 0x20003dac, 0x00000444, 0x00030003 }, + { 0x01400010, 0x20003dac, 0x02000446, 0x00030003 }, + { 0x00410040, 0x22002d08, 0x00690200, 0x00010001 }, + { 0x00410040, 0x22002d08, 0x02690200, 0x00100010 }, + { 0x00800001, 0x25400229, 0x01e98000, 0x00000000 }, + { 0x80800042, 0x45404631, 0x00d20540, 0x00d204c0 }, + { 0x00000001, 0x220c0128, 0x00000454, 0x00000000 }, + { 0x00400001, 0xd8000231, 0x008a0540, 0x00000000 }, + { 0x00400001, 0xd8100231, 0x008a0548, 0x00000000 }, + { 0x00400001, 0xd8200231, 0x008a0550, 0x00000000 }, + { 0x00400001, 0xd8300231, 0x008a0558, 0x00000000 }, + { 0x00600001, 0x220001ac, 0x008d0024, 0x00000000 }, + { 0x00200040, 0x244c3dad, 0x00450448, 0xfff8fff8 }, + { 0x00000401, 0x220001ec, 0x00000000, 0x07000700 }, + { 0x00000801, 0x220e0128, 0x00000456, 0x00000000 }, + { 0x00000441, 0x254635ad, 0x00000448, 0x0000044a }, + { 0x00000c41, 0x254025ad, 0x0000444c, 0x0000444e }, + { 0x00000c41, 0x254225ad, 0x00000448, 0x0000444e }, + { 0x00000841, 0x254435ad, 0x0000444c, 0x0000044a }, + { 0x00600041, 0x24002628, 0x00898000, 0x00000540 }, + { 0x00600048, 0x24002628, 0x00898002, 0x00000542 }, + { 0x00600048, 0x24002628, 0x00898008, 0x00000544 }, + { 0x00600048, 0x2540262d, 0x0089800a, 0x00000546 }, + { 0x00400401, 0xbc0001a9, 0x00690540, 0x00000000 }, + { 0x00400801, 0xbc1001a9, 0x00690548, 0x00000000 }, + { 0x01000010, 0x20003d2c, 0x00000022, 0x00030003 }, + { 0x01000040, 0x20223d29, 0x02000022, 0xffffffff }, + { 0x00000040, 0x220c3d8c, 0x0000020c, 0x00080008 }, + { 0x00110040, 0x24540c21, 0x00000454, 0x00080008 }, + { 0x00010040, 0x24540c21, 0x00000454, 0x00180038 }, + { 0x00110220, 0x34001c00, 0x02001400, 0xfffffee6 }, + { 0x01800010, 0x20003dac, 0x0200010e, 0x00010001 }, + { 0x00000040, 0x220c3d8c, 0x0000020c, 0xffe0ffe0 }, + { 0x00010001, 0x24540061, 0x02000000, 0x06c00640 }, + { 0x00110001, 0x24540061, 0x02000000, 0x04800780 }, + { 0x00000001, 0x220e0128, 0x00000456, 0x00000000 }, + { 0x00800040, 0x24003dac, 0x00b19c00, 0x00200020 }, + { 0x00800040, 0x24203dac, 0x00b19c20, 0x00200020 }, + { 0x8080000c, 0xdc003d91, 0x00b10400, 0x00060006 }, + { 0x8080000c, 0xdc203d91, 0x00b10420, 0x00060006 }, + { 0x02000040, 0x210e3d29, 0x0200010e, 0xffffffff }, + { 0x00000040, 0x220c3d8c, 0x0000020c, 0x00040004 }, + { 0x00110220, 0x34001c00, 0x02001400, 0xfffffcf8 }, + { 0x01000005, 0x25643e2d, 0x00000060, 0x00c000c0 }, + { 0x01000010, 0x20003dac, 0x02000458, 0x00020002 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x00000016 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x0000000c }, + { 0x01000010, 0x20003dac, 0x00000458, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000086 }, + { 0x00a02001, 0x46400231, 0x00d20780, 0x00000000 }, + { 0x00a02001, 0x46800231, 0x00d207c0, 0x00000000 }, + { 0x00a02001, 0x46c00231, 0x00d20480, 0x00000000 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x0000007e }, + { 0x80a02042, 0x46404631, 0x00d20640, 0x00d20780 }, + { 0x80a02042, 0x46804631, 0x00d20680, 0x00d207c0 }, + { 0x80a02042, 0x46c04631, 0x00d206c0, 0x00d20480 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000076 }, + { 0x01000010, 0x20003dac, 0x02000564, 0x00800080 }, + { 0x00110220, 0x34001c00, 0x02001400, 0x0000000e }, + { 0x01000010, 0x20003dac, 0x00000458, 0x00020002 }, + { 0x00110220, 0x34001c00, 0x00001400, 0xffffffe4 }, + { 0x00200401, 0x256801ed, 0x00000000, 0x00200020 }, + { 0x00200801, 0x256c01ed, 0x00000000, 0x00060006 }, + { 0x00400001, 0x258001ed, 0x00000000, 0x00000000 }, + { 0x00600001, 0x45a001ad, 0x00058c00, 0x00000000 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000028 }, + { 0x02600005, 0x20006e28, 0x02008c0c, 0x88848421 }, + { 0x0220000c, 0x25663dad, 0x00000458, 0x00010001 }, + { 0x0000000c, 0x25643dad, 0x00000564, 0x00060006 }, + { 0x00310001, 0x25c401ad, 0x00000458, 0x00000000 }, + { 0x00210001, 0x25c00061, 0x00000000, 0x00010001 }, + { 0x00310040, 0x25c03dad, 0x004545c4, 0x00010001 }, + { 0x00610001, 0x25a00061, 0x02000000, 0x00000080 }, + { 0x00710001, 0x45a002ad, 0x02ae8c00, 0x00000000 }, + { 0x00710001, 0x45a202ad, 0x02ae8c01, 0x00000000 }, + { 0x00800041, 0x25a035ad, 0x00b105a0, 0x000905c0 }, + { 0x01200010, 0x20003e2c, 0x0245006e, 0x00000000 }, + { 0x00310009, 0x244c45ad, 0x02000564, 0x0045006e }, + { 0x00210001, 0x244c01ed, 0x02000000, 0x00000000 }, + { 0x0031000c, 0x244c3dad, 0x0245044c, 0x00010001 }, + { 0x00200009, 0x256835ad, 0x0045044c, 0x00000566 }, + { 0x00210040, 0x256835ad, 0x02450568, 0x00000566 }, + { 0x00200040, 0x256c362d, 0x0045006e, 0x00000566 }, + { 0x00400040, 0x240035ac, 0x00ab05a2, 0x00ab05a6 }, + { 0x00400040, 0x2400358c, 0x00690400, 0x00000566 }, + { 0x0040000c, 0x2580358d, 0x00690400, 0x00000566 }, + { 0x00800041, 0x2400362c, 0x00d20640, 0x000005a0 }, + { 0x00800041, 0x2420362c, 0x00d20660, 0x000005a0 }, + { 0x00800048, 0x2400362c, 0x00d20780, 0x000005a4 }, + { 0x00800048, 0x2420362c, 0x00d207a0, 0x000005a4 }, + { 0x00800040, 0x2400358c, 0x00b10400, 0x00000568 }, + { 0x00800040, 0x2420358c, 0x00b10420, 0x00000568 }, + { 0x0080000c, 0x24c0358d, 0x00b10400, 0x0000056c }, + { 0x0080000c, 0x24e0358d, 0x00b10420, 0x0000056c }, + { 0x80800040, 0x464035b1, 0x00b104c0, 0x00000580 }, + { 0x80800040, 0x466035b1, 0x00b104e0, 0x00000580 }, + { 0x00800041, 0x2400362c, 0x00d20680, 0x000005a0 }, + { 0x00800041, 0x2420362c, 0x00d206a0, 0x000005a0 }, + { 0x00800048, 0x2400362c, 0x00d207c0, 0x000005a4 }, + { 0x00800048, 0x2420362c, 0x00d207e0, 0x000005a4 }, + { 0x00800040, 0x2400358c, 0x00b10400, 0x00000568 }, + { 0x00800040, 0x2420358c, 0x00b10420, 0x00000568 }, + { 0x0080000c, 0x24c0358d, 0x00b10400, 0x0000056c }, + { 0x0080000c, 0x24e0358d, 0x00b10420, 0x0000056c }, + { 0x80800040, 0x468035b1, 0x00b104c0, 0x00000580 }, + { 0x80800040, 0x46a035b1, 0x00b104e0, 0x00000580 }, + { 0x00800041, 0x2400362c, 0x00d206c0, 0x000705a8 }, + { 0x00800041, 0x2420362c, 0x00d206e0, 0x000705a8 }, + { 0x00800048, 0x2400362c, 0x00d20480, 0x000705ac }, + { 0x00800048, 0x2420362c, 0x00d204a0, 0x000705ac }, + { 0x00800040, 0x2400358c, 0x00b10400, 0x0000056a }, + { 0x00800040, 0x2420358c, 0x00b10420, 0x0000056a }, + { 0x0080000c, 0x24c0358d, 0x00b10400, 0x0000056e }, + { 0x0080000c, 0x24e0358d, 0x00b10420, 0x0000056e }, + { 0x80800040, 0x46c035b1, 0x00b104c0, 0x00050582 }, + { 0x80800040, 0x46e035b1, 0x00b104e0, 0x00050582 }, + { 0x01800005, 0x20003d2c, 0x02000020, 0x00020002 }, + { 0x80800040, 0xd00045b1, 0x00b19000, 0x00d20640 }, + { 0x80800040, 0xd02045b1, 0x00b19020, 0x00d20660 }, + { 0x80800040, 0xd04045b1, 0x00b19040, 0x00d20680 }, + { 0x80800040, 0xd06045b1, 0x00b19060, 0x00d206a0 }, + { 0x00000040, 0x22083d8c, 0x00000208, 0x00800080 }, + { 0x80400040, 0xd40045b1, 0x00699400, 0x00ab06c0 }, + { 0x80400040, 0xd48045b1, 0x00699480, 0x00ab06c2 }, + { 0x80400040, 0xd42045b1, 0x00699420, 0x00ab06e0 }, + { 0x80400040, 0xd4a045b1, 0x006994a0, 0x00ab06e2 }, + { 0x80400040, 0xd41045b1, 0x00699410, 0x00ab06d0 }, + { 0x80400040, 0xd49045b1, 0x00699490, 0x00ab06d2 }, + { 0x80400040, 0xd43045b1, 0x00699430, 0x00ab06f0 }, + { 0x80400040, 0xd4b045b1, 0x006994b0, 0x00ab06f2 }, + { 0x00000040, 0x220a3d8c, 0x0000020a, 0x00080008 }, + { 0x00110040, 0x220a3d8c, 0x0200020a, 0x00300030 }, + { 0x01000010, 0x20003d2c, 0x02000020, 0x00060006 }, + { 0x00000040, 0x20203d29, 0x00000020, 0x00020002 }, + { 0x00000040, 0x22040c00, 0x00000204, 0x00100001 }, + { 0x00000040, 0x220c358c, 0x0000020c, 0x0000003a }, + { 0x00110220, 0x34001c00, 0x02001400, 0xfffffc36 }, + { 0x00000001, 0x220001ec, 0x00000000, 0x01400140 }, + { 0x00000001, 0x220201ec, 0x00000000, 0x01c001c0 }, + { 0x00800401, 0x20400236, 0x01ee8000, 0x00000000 }, + { 0x00800801, 0x20500236, 0x01ee8010, 0x00000000 }, + { 0x00800401, 0x20600236, 0x01ee8020, 0x00000000 }, + { 0x00800801, 0x20700236, 0x01ee8030, 0x00000000 }, + { 0x00800401, 0x20800236, 0x01ee8040, 0x00000000 }, + { 0x00800801, 0x20900236, 0x01ee8050, 0x00000000 }, + { 0x00800401, 0x20a00236, 0x01ee8060, 0x00000000 }, + { 0x00800801, 0x20b00236, 0x01ee8070, 0x00000000 }, + { 0x00800401, 0x20c00236, 0x01ee8100, 0x00000000 }, + { 0x00800801, 0x20d00236, 0x01ee8110, 0x00000000 }, + { 0x00800401, 0x20e00236, 0x01ee8120, 0x00000000 }, + { 0x00800801, 0x20f00236, 0x01ee8130, 0x00000000 }, + { 0x00800401, 0x21000236, 0x01ee8140, 0x00000000 }, + { 0x00800801, 0x21100236, 0x01ee8150, 0x00000000 }, + { 0x00800401, 0x21200236, 0x01ee8160, 0x00000000 }, + { 0x00800801, 0x21300236, 0x01ee8170, 0x00000000 }, + { 0x00200401, 0x204001a5, 0x00450064, 0x00000000 }, + { 0x00000801, 0x20480061, 0x00000000, 0x000f000f }, + { 0x01600031, 0x21401c21, 0x508d0040, 0x1218a000 }, + { 0x00000001, 0x220001ec, 0x00000000, 0x03400340 }, + { 0x00800401, 0x41600236, 0x00d28000, 0x00000000 }, + { 0x00800801, 0x41610236, 0x00d28080, 0x00000000 }, + { 0x00800401, 0x41800236, 0x00d28020, 0x00000000 }, + { 0x00800801, 0x41810236, 0x00d280a0, 0x00000000 }, + { 0x00800401, 0x41a00236, 0x00d28040, 0x00000000 }, + { 0x00800801, 0x41a10236, 0x00d280c0, 0x00000000 }, + { 0x00800401, 0x41c00236, 0x00d28060, 0x00000000 }, + { 0x00800801, 0x41c10236, 0x00d280e0, 0x00000000 }, + { 0x0000040c, 0x20443ca5, 0x00000044, 0x00010001 }, + { 0x00000801, 0x20480061, 0x00000000, 0x0007000f }, + { 0x0a600031, 0x21601c21, 0x508d0040, 0x0a18a001 }, + { 0x00000001, 0x21400021, 0x00000140, 0x00000000 }, + { 0x00000001, 0x21600021, 0x00000160, 0x00000000 }, + { 0x01600031, 0x20001c20, 0x708d0000, 0x82000010 }, + { 0x00600001, 0x20400021, 0x008d0000, 0x00000000 }, + { 0x00000005, 0x20203e2d, 0x00000061, 0x001f001f }, + { 0x00200009, 0x20643e2d, 0x00450064, 0x00040004 }, + { 0x00000001, 0x203a01ed, 0x00000000, 0x00000000 }, + { 0x01000010, 0x20003dac, 0x00000020, 0x00160016 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x0000001e }, + { 0x01200010, 0x20003e2c, 0x0200006c, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x00000024 }, + { 0x00800009, 0x25403dad, 0x00050064, 0x00020002 }, + { 0x00000001, 0x203a01ed, 0x00000000, 0x00180018 }, + { 0x00200040, 0x45483dad, 0x00660548, 0x00100010 }, + { 0x00200040, 0x45523dad, 0x00660552, 0x00100010 }, + { 0x00400040, 0x25583dad, 0x00690558, 0x00100010 }, + { 0x00800040, 0x208035ad, 0x00b10080, 0x00b10540 }, + { 0x00600040, 0x45403dad, 0x00ae0540, 0x00200020 }, + { 0x00800040, 0x20a035ad, 0x00b100a0, 0x00b10540 }, + { 0x00600040, 0x45423dad, 0x00ae0542, 0x00200020 }, + { 0x00800040, 0x20e035ad, 0x00b100e0, 0x00b10540 }, + { 0x00600040, 0x45403dad, 0x00ae0540, 0xffe0ffe0 }, + { 0x00800040, 0x20c035ad, 0x00b100c0, 0x00b10540 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000014 }, + { 0x06600010, 0x20003dac, 0x02000020, 0x00030003 }, + { 0x00000001, 0x206c0171, 0x00000000, 0x00000000 }, + { 0x00610001, 0x208000a5, 0x02050080, 0x00000000 }, + { 0x00610001, 0x212000a5, 0x02090100, 0x00000000 }, + { 0x00410001, 0x211000a5, 0x02690100, 0x00000000 }, + { 0x00200009, 0x25403dad, 0x00450064, 0x00020002 }, + { 0x00800040, 0x208035ad, 0x00b10080, 0x00050540 }, + { 0x00200040, 0x40883dad, 0x00660088, 0x00200020 }, + { 0x00200040, 0x40923dad, 0x00660092, 0x00200020 }, + { 0x00400040, 0x20983dad, 0x00690098, 0x00200020 }, + { 0x00200401, 0x22080060, 0x00000000, 0x03400140 }, + { 0x00000c01, 0x220c0060, 0x00000000, 0x04400080 }, + { 0x00000801, 0x22040060, 0x00000000, 0x01000070 }, + { 0x00000005, 0x203e2e29, 0x00000063, 0x00010001 }, + { 0x00000001, 0x20200169, 0x00000000, 0x00000000 }, + { 0x0000000c, 0x2458262d, 0x0000006d, 0x00000020 }, + { 0x00000001, 0x210e0169, 0x00000000, 0x00010001 }, + { 0x00000005, 0x24583dad, 0x00000458, 0x00030003 }, + { 0x01000010, 0x200035ac, 0x0000010e, 0x00000458 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000316 }, + { 0x01000010, 0x20003dac, 0x0200010e, 0x00010001 }, + { 0x00010401, 0x24540061, 0x02000000, 0x06c00640 }, + { 0x00010805, 0x245a3e2d, 0x02008800, 0x007f007f }, + { 0x00110401, 0x24540061, 0x02000000, 0x04800780 }, + { 0x00110805, 0x245a3e2d, 0x02008804, 0x007f007f }, + { 0x00010005, 0x245c3e2d, 0x02008800, 0x00800080 }, + { 0x00110005, 0x245c3e2d, 0x02008804, 0x00800080 }, + { 0x00000009, 0x245c3dad, 0x0000045c, 0x00010001 }, + { 0x0000000c, 0x211e362d, 0x0000006c, 0x00000020 }, + { 0x00000040, 0x240035ac, 0x0000003e, 0x0000045c }, + { 0x01000010, 0x20003d8c, 0x00210400, 0x00010001 }, + { 0x01000010, 0x20003d8c, 0x02210400, 0x01000100 }, + { 0x00000001, 0x203c01ed, 0x00000000, 0x00000000 }, + { 0x00010001, 0x203c01ed, 0x00000000, 0x00020002 }, + { 0x00010001, 0x203c01ed, 0x02000000, 0xfffefffe }, + { 0x00000040, 0x20780d21, 0x0000045a, 0x0208e602 }, + { 0x00000040, 0x20782421, 0x00000078, 0x0000045c }, + { 0x02000005, 0x20003dac, 0x0200011e, 0x00030003 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x000001c0 }, + { 0x01000005, 0x20003dac, 0x00009800, 0x00030003 }, + { 0x00200005, 0x24443dad, 0x00459800, 0x00030003 }, + { 0x0020000c, 0x24403dad, 0x00459800, 0x00020002 }, + { 0x01600006, 0x20003dac, 0x02000446, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000012 }, + { 0x00010040, 0x22000c20, 0x02000078, 0x00400000 }, + { 0x00110040, 0x22000c20, 0x02000078, 0x00700000 }, + { 0x00310040, 0x20401da5, 0x02450440, 0xfffffffe }, + { 0x00110001, 0x20480061, 0x02000000, 0x000c000c }, + { 0x00010040, 0x20401da5, 0x02000440, 0xfffffffe }, + { 0x00010001, 0x204401a5, 0x02000442, 0x00000000 }, + { 0x00010001, 0x20480061, 0x02000000, 0x0007000c }, + { 0x01600031, 0x25600021, 0x408d0040, 0x00000200 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x0000000e }, + { 0x00010040, 0x22000c20, 0x02000078, 0x00200000 }, + { 0x00110040, 0x22000c20, 0x02000078, 0x00400000 }, + { 0x00200001, 0x204001a5, 0x00450440, 0x00000000 }, + { 0x00110040, 0x20441da5, 0x02000442, 0xfffffffe }, + { 0x00110001, 0x20480061, 0x02000000, 0x000c0007 }, + { 0x00010001, 0x20480061, 0x02000000, 0x00070007 }, + { 0x01600031, 0x25600021, 0x408d0040, 0x00000200 }, + { 0x00000040, 0xb80235ad, 0x00009802, 0x0000003c }, + { 0x0020040c, 0x24403dad, 0x00459800, 0x00030003 }, + { 0x00200805, 0x24483dad, 0x00459800, 0x00070007 }, + { 0x01600006, 0x20003dac, 0x0000044a, 0x00000000 }, + { 0x00200001, 0x204001a5, 0x00450440, 0x00000000 }, + { 0x00000009, 0x20403ca5, 0x00000040, 0x00010001 }, + { 0x00010040, 0x22000c20, 0x00000078, 0x00200010 }, + { 0x00110040, 0x22000c20, 0x00000078, 0x00300010 }, + { 0x00010001, 0x20480061, 0x00000000, 0x00030009 }, + { 0x00110001, 0x20480061, 0x00000000, 0x00040009 }, + { 0x02600031, 0x27000021, 0x408d0040, 0x00000200 }, + { 0x01000005, 0x20003dac, 0x00009800, 0x00030003 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x0000001a }, + { 0x00600001, 0x26220231, 0x008d05c0, 0x00000000 }, + { 0x00600401, 0x26120231, 0x008d05b8, 0x00000000 }, + { 0x00600801, 0x26020231, 0x008d05b0, 0x00000000 }, + { 0x00600401, 0x25f20231, 0x008d05a8, 0x00000000 }, + { 0x00600801, 0x25e20231, 0x008d05a0, 0x00000000 }, + { 0x00600401, 0x25d20231, 0x008d0598, 0x00000000 }, + { 0x00600801, 0x25c20231, 0x008d0590, 0x00000000 }, + { 0x00600401, 0x25b20231, 0x008d0588, 0x00000000 }, + { 0x00600801, 0x25a20231, 0x008d0580, 0x00000000 }, + { 0x00600401, 0x25920231, 0x008d0578, 0x00000000 }, + { 0x00600801, 0x25820231, 0x008d0570, 0x00000000 }, + { 0x00600001, 0x25720231, 0x008d0568, 0x00000000 }, + { 0x00600001, 0x25620231, 0x008d0560, 0x00000000 }, + { 0x00110001, 0x220001ec, 0x02000000, 0x05820582 }, + { 0x00010001, 0x220001ec, 0x02000000, 0x05620562 }, + { 0x00000001, 0x220e0128, 0x00000454, 0x00000000 }, + { 0x01800006, 0x200035ac, 0x02000446, 0x00000444 }, + { 0x00810001, 0xbc000229, 0x02ad8000, 0x00000000 }, + { 0x00810001, 0xbc200229, 0x02ad8020, 0x00000000 }, + { 0x00810001, 0xbc400229, 0x02ad8040, 0x00000000 }, + { 0x00810001, 0xbc600229, 0x02ad8060, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x0000012a }, + { 0x00600001, 0x2024018d, 0x008d0200, 0x00000000 }, + { 0x01000041, 0x245e35ad, 0x00000446, 0x00000444 }, + { 0x00000040, 0x22022d08, 0x00000200, 0x00100010 }, + { 0x02000005, 0x20003db0, 0x0200045e, 0x00010001 }, + { 0x00200040, 0x22042d08, 0x00450200, 0x00200020 }, + { 0x00400001, 0x244c0109, 0x00690200, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000066 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x00000064 }, + { 0x00000040, 0x22003d08, 0x00000200, 0xffdeffde }, + { 0x00000440, 0x22023d08, 0x00000202, 0xffeeffee }, + { 0x00000801, 0x220c0060, 0x00000000, 0x04a00480 }, + { 0x01000010, 0x20003db0, 0x0000045e, 0x00040004 }, + { 0x00a02040, 0x2400462c, 0x00ad8000, 0x00ad8005 }, + { 0x00a02048, 0x24003e2c, 0x00ad8001, 0xfffbfffb }, + { 0x00a02048, 0x24003e2c, 0x00ad8002, 0x00140014 }, + { 0x00a02048, 0x24003e2c, 0x00ad8003, 0x00140014 }, + { 0x00a02048, 0xb8003e2d, 0x00ad8004, 0xfffbfffb }, + { 0x00a02040, 0x2400462c, 0x00ad8040, 0x00ad8045 }, + { 0x00a02048, 0x24003e2c, 0x00ad8041, 0xfffbfffb }, + { 0x00a02048, 0x24003e2c, 0x00ad8042, 0x00140014 }, + { 0x00a02048, 0x24003e2c, 0x00ad8043, 0x00140014 }, + { 0x00a02048, 0xb8403e2d, 0x00ad8044, 0xfffbfffb }, + { 0x00a02040, 0x2400462c, 0x00ad8080, 0x00ad8085 }, + { 0x00a02048, 0x24003e2c, 0x00ad8081, 0xfffbfffb }, + { 0x00a02048, 0x24003e2c, 0x00ad8082, 0x00140014 }, + { 0x00a02048, 0x24003e2c, 0x00ad8083, 0x00140014 }, + { 0x00a02048, 0xb8803e2d, 0x00ad8084, 0xfffbfffb }, + { 0x00600040, 0x2400462c, 0x008d80c0, 0x008d80c5 }, + { 0x00600048, 0x24003e2c, 0x008d80c1, 0xfffbfffb }, + { 0x00600048, 0x24003e2c, 0x008d80c2, 0x00140014 }, + { 0x00600048, 0x24003e2c, 0x008d80c3, 0x00140014 }, + { 0x00600048, 0xb8c03e2d, 0x008d80c4, 0xfffbfffb }, + { 0x00000401, 0x22000060, 0x00000000, 0x04a00480 }, + { 0x00000c01, 0x22040060, 0x00000000, 0x04a00490 }, + { 0x00010802, 0x220c2d28, 0x00000454, 0x04800480 }, + { 0x00a02040, 0x24003dac, 0x00b18000, 0x02000200 }, + { 0x00800048, 0x24003dac, 0x01ed8800, 0xfffbfffb }, + { 0x00800048, 0x24203dac, 0x01ed8820, 0xfffbfffb }, + { 0x00a02048, 0x24003dac, 0x00b18020, 0x00140014 }, + { 0x00800048, 0x24003dac, 0x01ed8820, 0x00140014 }, + { 0x00800048, 0x24203dac, 0x01ed8840, 0x00140014 }, + { 0x00a02048, 0x24003dac, 0x00b18040, 0xfffbfffb }, + { 0x00800048, 0x24003dac, 0x01ed8840, 0x00010001 }, + { 0x00800048, 0x24203dac, 0x01ed8860, 0x00010001 }, + { 0x8080000c, 0xd8003d91, 0x00b10400, 0x000a000a }, + { 0x8080100c, 0xd8203d91, 0x00b10420, 0x000a000a }, + { 0x00a02040, 0x24003dac, 0x00b18040, 0x02000200 }, + { 0x00800048, 0x24003dac, 0x01ed8840, 0xfffbfffb }, + { 0x00800048, 0x24203dac, 0x01ed8860, 0xfffbfffb }, + { 0x00a02048, 0x24003dac, 0x00b18060, 0x00140014 }, + { 0x00800048, 0x24003dac, 0x01ed8860, 0x00140014 }, + { 0x00800048, 0x24203dac, 0x01ed8880, 0x00140014 }, + { 0x00a02048, 0x24003dac, 0x00b18080, 0xfffbfffb }, + { 0x00800048, 0x24003dac, 0x01ed8880, 0x00010001 }, + { 0x00800048, 0x24203dac, 0x01ed88a0, 0x00010001 }, + { 0x8080000c, 0xd8403d91, 0x00b10400, 0x000a000a }, + { 0x8080100c, 0xd8603d91, 0x00b10420, 0x000a000a }, + { 0x00010220, 0x34001c00, 0x00001400, 0x000000b4 }, + { 0x01000010, 0x20003db0, 0x00000444, 0x00000000 }, + { 0x01000010, 0x20003db0, 0x02000446, 0x00020002 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x0000004c }, + { 0x00010220, 0x34001c00, 0x02001400, 0x0000004a }, + { 0x00400040, 0x22003d28, 0x0069044c, 0xfffefffe }, + { 0x03400010, 0x20003dac, 0x00000446, 0x00020002 }, + { 0x01000010, 0x20003db0, 0x02000444, 0x00020002 }, + { 0x00410040, 0x22002d08, 0x00690200, 0x00100010 }, + { 0x01000010, 0x20003dac, 0x00000446, 0x00000000 }, + { 0x00010002, 0x220c2d28, 0x02000454, 0x04800480 }, + { 0x00800040, 0x24003e2c, 0x01ed8000, 0x00100010 }, + { 0x00800040, 0x24203e2c, 0x01ed8020, 0x00100010 }, + { 0x00800048, 0x24003e2c, 0x01ed8001, 0xfffbfffb }, + { 0x00800048, 0x24203e2c, 0x01ed8021, 0xfffbfffb }, + { 0x00800048, 0x24003e2c, 0x01ed8002, 0x00140014 }, + { 0x00800048, 0x24203e2c, 0x01ed8022, 0x00140014 }, + { 0x00800048, 0x24003e2c, 0x01ed8003, 0x00140014 }, + { 0x00800048, 0x24203e2c, 0x01ed8023, 0x00140014 }, + { 0x00800048, 0x24003e2c, 0x01ed8004, 0xfffbfffb }, + { 0x00800048, 0x24203e2c, 0x01ed8024, 0xfffbfffb }, + { 0x00800048, 0x24003e2c, 0x01ed8005, 0x00010001 }, + { 0x00800048, 0x24203e2c, 0x01ed8025, 0x00010001 }, + { 0x8080000c, 0xd8003d91, 0x00b10400, 0x00050005 }, + { 0x8080100c, 0xd8203d91, 0x00b10420, 0x00050005 }, + { 0x00800040, 0x24003e2c, 0x01ed8040, 0x00100010 }, + { 0x00800040, 0x24203e2c, 0x01ed8060, 0x00100010 }, + { 0x00800048, 0x24003e2c, 0x01ed8041, 0xfffbfffb }, + { 0x00800048, 0x24203e2c, 0x01ed8061, 0xfffbfffb }, + { 0x00800048, 0x24003e2c, 0x01ed8042, 0x00140014 }, + { 0x00800048, 0x24203e2c, 0x01ed8062, 0x00140014 }, + { 0x00800048, 0x24003e2c, 0x01ed8043, 0x00140014 }, + { 0x00800048, 0x24203e2c, 0x01ed8063, 0x00140014 }, + { 0x00800048, 0x24003e2c, 0x01ed8044, 0xfffbfffb }, + { 0x00800048, 0x24203e2c, 0x01ed8064, 0xfffbfffb }, + { 0x00800048, 0x24003e2c, 0x01ed8045, 0x00010001 }, + { 0x00800048, 0x24203e2c, 0x01ed8065, 0x00010001 }, + { 0x8080000c, 0xd8403d91, 0x00b10400, 0x00050005 }, + { 0x8080100c, 0xd8603d91, 0x00b10420, 0x00050005 }, + { 0x00110220, 0x34001c00, 0x02001400, 0x00000004 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x0000005c }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000062 }, + { 0x01000010, 0x20003db0, 0x00000446, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000042 }, + { 0x00200401, 0x22000128, 0x0066044c, 0x00000000 }, + { 0x00200c01, 0x22040128, 0x0045044e, 0x00000000 }, + { 0x00000801, 0x220c0128, 0x00000454, 0x00000000 }, + { 0x03400010, 0x20003dac, 0x02000444, 0x00020002 }, + { 0x01000010, 0x20003dac, 0x00000444, 0x00000000 }, + { 0x00410040, 0x22002d08, 0x02690200, 0x00010001 }, + { 0x01000010, 0x20003db0, 0x02000446, 0x00020002 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x00000002 }, + { 0x00110001, 0x220c0168, 0x02000000, 0x04800480 }, + { 0x00a02040, 0x24003e2c, 0x00ad83e0, 0x00100010 }, + { 0x00800048, 0x24003e2c, 0x01ed8be0, 0xfffbfffb }, + { 0x00800048, 0x24203e2c, 0x01ed8800, 0xfffbfffb }, + { 0x00a02048, 0x24003e2c, 0x00ad8000, 0x00140014 }, + { 0x00800048, 0x24003e2c, 0x01ed8800, 0x00140014 }, + { 0x00800048, 0x24203e2c, 0x01ed8820, 0x00140014 }, + { 0x00a02048, 0x24003e2c, 0x00ad8020, 0xfffbfffb }, + { 0x00800048, 0x24003e2c, 0x01ed8820, 0x00010001 }, + { 0x00800048, 0x24203e2c, 0x01ed8840, 0x00010001 }, + { 0x8080000c, 0xd8003d91, 0x00b10400, 0x00050005 }, + { 0x8080100c, 0xd8203d91, 0x00b10420, 0x00050005 }, + { 0x00a02040, 0x24003e2c, 0x00ad8020, 0x00100010 }, + { 0x00800048, 0x24003e2c, 0x01ed8820, 0xfffbfffb }, + { 0x00800048, 0x24203e2c, 0x01ed8840, 0xfffbfffb }, + { 0x00a02048, 0x24003e2c, 0x00ad8040, 0x00140014 }, + { 0x00800048, 0x24003e2c, 0x01ed8840, 0x00140014 }, + { 0x00800048, 0x24203e2c, 0x01ed8860, 0x00140014 }, + { 0x00a02048, 0x24003e2c, 0x00ad8060, 0xfffbfffb }, + { 0x00800048, 0x24003e2c, 0x01ed8860, 0x00010001 }, + { 0x00800048, 0x24203e2c, 0x01ed8880, 0x00010001 }, + { 0x8080000c, 0xd8403d91, 0x00b10400, 0x00050005 }, + { 0x8080100c, 0xd8603d91, 0x00b10420, 0x00050005 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x00000016 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x0000001c }, + { 0x00200401, 0x22000128, 0x0045044c, 0x00000000 }, + { 0x00000801, 0x220c0128, 0x00000454, 0x00000000 }, + { 0x01200010, 0x20003dac, 0x00000444, 0x00030003 }, + { 0x01200010, 0x20003dac, 0x02000446, 0x00030003 }, + { 0x00210040, 0x22002d08, 0x00450200, 0x00010001 }, + { 0x00210040, 0x22002d08, 0x02450200, 0x00100010 }, + { 0x00800001, 0xb8000229, 0x01ed8000, 0x00000000 }, + { 0x00800001, 0xb8200229, 0x01ed8020, 0x00000000 }, + { 0x00800001, 0xb8400229, 0x01ed8040, 0x00000000 }, + { 0x00800001, 0xb8600229, 0x01ed8060, 0x00000000 }, + { 0x80800042, 0xd8004631, 0x00d29800, 0x00d20480 }, + { 0x80800042, 0xd8204631, 0x00d29820, 0x00d204a0 }, + { 0x80800042, 0xd8404631, 0x00d29840, 0x00d204c0 }, + { 0x80800042, 0xd8604631, 0x00d29860, 0x00d204e0 }, + { 0x00600001, 0x220001ac, 0x008d0024, 0x00000000 }, + { 0x00200040, 0x244c3dad, 0x00450448, 0xfff8fff8 }, + { 0x00000401, 0x220001ec, 0x00000000, 0x07000700 }, + { 0x00000c01, 0x220201e8, 0x00000000, 0x07100710 }, + { 0x00000801, 0x220e0128, 0x00000456, 0x00000000 }, + { 0x00000441, 0x254635ad, 0x00000448, 0x0000044a }, + { 0x00000c41, 0x254025ad, 0x0000444c, 0x0000444e }, + { 0x00000c41, 0x254225ad, 0x00000448, 0x0000444e }, + { 0x00000841, 0x254435ad, 0x0000444c, 0x0000044a }, + { 0x00200040, 0x244c3d09, 0x00450200, 0x00100010 }, + { 0x00800041, 0x24002628, 0x00ad8000, 0x00000540 }, + { 0x00800041, 0x24202628, 0x00ad8020, 0x00000540 }, + { 0x00800048, 0x24002628, 0x00ad8002, 0x00000542 }, + { 0x00800048, 0x24202628, 0x00ad8022, 0x00000542 }, + { 0x00200001, 0x22000128, 0x0045044c, 0x00000000 }, + { 0x00800048, 0x24002628, 0x01ed8000, 0x00000544 }, + { 0x00800048, 0x24202628, 0x01ed8020, 0x00000544 }, + { 0x00800048, 0xbc002629, 0x01ed8002, 0x00000546 }, + { 0x00801048, 0xbc202629, 0x01ed8022, 0x00000546 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000128 }, + { 0x00000001, 0x20220169, 0x00000000, 0x00040004 }, + { 0x00200005, 0x24443dad, 0x00459800, 0x00030003 }, + { 0x0020000c, 0x24403dad, 0x00459800, 0x00020002 }, + { 0x01600006, 0x20003dac, 0x02000446, 0x00000000 }, + { 0x00010040, 0x22000c20, 0x02000078, 0x00200000 }, + { 0x00110040, 0x22000c20, 0x02000078, 0x00500000 }, + { 0x00310040, 0x20401da5, 0x02450440, 0xfffffffe }, + { 0x00110001, 0x20480061, 0x02000000, 0x00080008 }, + { 0x00010040, 0x20401da5, 0x02000440, 0xfffffffe }, + { 0x00010001, 0x204401a5, 0x02000442, 0x00000000 }, + { 0x00010001, 0x20480061, 0x02000000, 0x00030008 }, + { 0x01600031, 0x25600021, 0x408d0040, 0x00000200 }, + { 0x00000040, 0xb80235ad, 0x00009802, 0x0000003c }, + { 0x00000040, 0x22000c20, 0x00000078, 0x00100010 }, + { 0x0020040c, 0x24403dad, 0x00459800, 0x00030003 }, + { 0x00200805, 0x24483dad, 0x00459800, 0x00070007 }, + { 0x00200001, 0x204001a5, 0x00450440, 0x00000000 }, + { 0x00000009, 0x20403ca5, 0x00000040, 0x00010001 }, + { 0x00000001, 0x20480061, 0x00000000, 0x00020005 }, + { 0x02600031, 0x27000021, 0x408d0040, 0x00000200 }, + { 0x00110001, 0x220001ec, 0x02000000, 0x05820582 }, + { 0x00010001, 0x220001ec, 0x02000000, 0x05620562 }, + { 0x00000001, 0x220e0128, 0x00000454, 0x00000000 }, + { 0x01800006, 0x200035ac, 0x02000446, 0x00000444 }, + { 0x00410001, 0xbc000229, 0x02698000, 0x00000000 }, + { 0x00410001, 0xbc100229, 0x02698010, 0x00000000 }, + { 0x00410001, 0xbc200229, 0x02698020, 0x00000000 }, + { 0x00410001, 0xbc300229, 0x02698030, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x000000be }, + { 0x00600001, 0x2024018d, 0x008d0200, 0x00000000 }, + { 0x01000041, 0x245e35ad, 0x00000446, 0x00000444 }, + { 0x02000005, 0x20003db0, 0x0200045e, 0x00010001 }, + { 0x00000040, 0x22022d08, 0x00000200, 0x00100010 }, + { 0x00200040, 0x22042d08, 0x00450200, 0x00200020 }, + { 0x00400001, 0x244c0109, 0x00690200, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000044 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x00000042 }, + { 0x00000040, 0x22003d08, 0x00000200, 0xffdeffde }, + { 0x00000440, 0x22023d08, 0x00000202, 0xffeeffee }, + { 0x00000801, 0x220c0060, 0x00000000, 0x04d004c0 }, + { 0x01000010, 0x20003db0, 0x0000045e, 0x00040004 }, + { 0x00802040, 0x2400462c, 0x00a98000, 0x00a98005 }, + { 0x00802048, 0x24003e2c, 0x00a98001, 0xfffbfffb }, + { 0x00802048, 0x24003e2c, 0x00a98002, 0x00140014 }, + { 0x00802048, 0x24003e2c, 0x00a98003, 0x00140014 }, + { 0x00802048, 0xb8003e2d, 0x00a98004, 0xfffbfffb }, + { 0x00802040, 0x2400462c, 0x00a98040, 0x00a98045 }, + { 0x00802048, 0x24003e2c, 0x00a98041, 0xfffbfffb }, + { 0x00802048, 0x24003e2c, 0x00a98042, 0x00140014 }, + { 0x00802048, 0x24003e2c, 0x00a98043, 0x00140014 }, + { 0x00802048, 0xb8203e2d, 0x00a98044, 0xfffbfffb }, + { 0x00400040, 0x2400462c, 0x00698080, 0x00698085 }, + { 0x00400048, 0x24003e2c, 0x00698081, 0xfffbfffb }, + { 0x00400048, 0x24003e2c, 0x00698082, 0x00140014 }, + { 0x00400048, 0x24003e2c, 0x00698083, 0x00140014 }, + { 0x00400048, 0xb8403e2d, 0x00698084, 0xfffbfffb }, + { 0x00000401, 0x220c0060, 0x00000000, 0x04e004d0 }, + { 0x00000c01, 0x22000060, 0x00000000, 0x04d004c8 }, + { 0x00000c01, 0x22040060, 0x00000000, 0x04e004d8 }, + { 0x00000801, 0x22080060, 0x00000000, 0x04f004e8 }, + { 0x00800040, 0x24003dac, 0x00b104c0, 0x02000200 }, + { 0x00800048, 0x24003dac, 0x00b104e0, 0xfffbfffb }, + { 0x00800048, 0x24003dac, 0x01ed9800, 0x00140014 }, + { 0x00010001, 0x220c0168, 0x00000000, 0x05400540 }, + { 0x00110001, 0x220c0168, 0x00000000, 0x04c004c0 }, + { 0x00800048, 0x24003dac, 0x01e98000, 0xfffbfffb }, + { 0x00800048, 0x24003dac, 0x01e98020, 0x00010001 }, + { 0x00800048, 0x24003dac, 0x01e98800, 0x00140014 }, + { 0x8080000c, 0xd8003d91, 0x00b10400, 0x000a000a }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000060 }, + { 0x01000010, 0x20003db0, 0x00000444, 0x00000000 }, + { 0x01000010, 0x20003db0, 0x02000446, 0x00020002 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000024 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x00000022 }, + { 0x00400040, 0x22003d28, 0x0069044c, 0xfffefffe }, + { 0x03400010, 0x20003dac, 0x00000446, 0x00020002 }, + { 0x01000010, 0x20003db0, 0x02000444, 0x00020002 }, + { 0x00410040, 0x22002d08, 0x00690200, 0x00100010 }, + { 0x01000010, 0x20003dac, 0x00000446, 0x00000000 }, + { 0x00010001, 0x220e0168, 0x02000000, 0x05400540 }, + { 0x00110001, 0x220e0168, 0x02000000, 0x04c004c0 }, + { 0x00800040, 0x24003e2c, 0x01e98000, 0x00100010 }, + { 0x00800048, 0x24003e2c, 0x01e98001, 0xfffbfffb }, + { 0x00800048, 0x24003e2c, 0x01e98002, 0x00140014 }, + { 0x00800048, 0x24003e2c, 0x01e98003, 0x00140014 }, + { 0x00800048, 0x24003e2c, 0x01e98004, 0xfffbfffb }, + { 0x00800048, 0x24003e2c, 0x01e98005, 0x00010001 }, + { 0x8080000c, 0xdc003d91, 0x00b10400, 0x00050005 }, + { 0x00110220, 0x34001c00, 0x02001400, 0x00000004 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x00000036 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000036 }, + { 0x01000010, 0x20003db0, 0x00000446, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000024 }, + { 0x03600010, 0x20003dac, 0x02000444, 0x00020002 }, + { 0x00400401, 0x22000128, 0x0069044c, 0x00000000 }, + { 0x00400840, 0x22083d2c, 0x0069044c, 0x00100010 }, + { 0x00610040, 0x22002d08, 0x02690200, 0x00010001 }, + { 0x01000010, 0x20003dac, 0x00000444, 0x00000000 }, + { 0x01000010, 0x20003db0, 0x02000446, 0x00020002 }, + { 0x00800040, 0x24003e2c, 0x01e983e0, 0x00100010 }, + { 0x00800048, 0x24003e2c, 0x01e98000, 0x00140014 }, + { 0x00800048, 0x24003e2c, 0x01e98020, 0xfffbfffb }, + { 0x00800048, 0x24003e2c, 0x01e993e0, 0xfffbfffb }, + { 0x00800048, 0x24003e2c, 0x01e99000, 0x00140014 }, + { 0x00800048, 0x24003e2c, 0x01e99020, 0x00010001 }, + { 0x00000001, 0x220e0168, 0x00000000, 0x05400540 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x00000002 }, + { 0x00110001, 0x220e0168, 0x02000000, 0x04c004c0 }, + { 0x8080000c, 0xdc003d91, 0x00b10400, 0x00050005 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x0000000e }, + { 0x00010220, 0x34001c00, 0x02001400, 0x0000000e }, + { 0x00400001, 0x22000128, 0x0069044c, 0x00000000 }, + { 0x01400010, 0x20003dac, 0x00000444, 0x00030003 }, + { 0x01400010, 0x20003dac, 0x02000446, 0x00030003 }, + { 0x00410040, 0x22002d08, 0x00690200, 0x00010001 }, + { 0x00410040, 0x22002d08, 0x02690200, 0x00100010 }, + { 0x00800001, 0x25400229, 0x01e98000, 0x00000000 }, + { 0x80800042, 0x45404631, 0x00d20540, 0x00d204c0 }, + { 0x00000001, 0x220c0128, 0x00000454, 0x00000000 }, + { 0x00400001, 0xd8000231, 0x008a0540, 0x00000000 }, + { 0x00400001, 0xd8100231, 0x008a0548, 0x00000000 }, + { 0x00400001, 0xd8200231, 0x008a0550, 0x00000000 }, + { 0x00400001, 0xd8300231, 0x008a0558, 0x00000000 }, + { 0x00600001, 0x220001ac, 0x008d0024, 0x00000000 }, + { 0x00200040, 0x244c3dad, 0x00450448, 0xfff8fff8 }, + { 0x00000401, 0x220001ec, 0x00000000, 0x07000700 }, + { 0x00000801, 0x220e0128, 0x00000456, 0x00000000 }, + { 0x00000441, 0x254635ad, 0x00000448, 0x0000044a }, + { 0x00000c41, 0x254025ad, 0x0000444c, 0x0000444e }, + { 0x00000c41, 0x254225ad, 0x00000448, 0x0000444e }, + { 0x00000841, 0x254435ad, 0x0000444c, 0x0000044a }, + { 0x00600041, 0x24002628, 0x00898000, 0x00000540 }, + { 0x00600048, 0x24002628, 0x00898002, 0x00000542 }, + { 0x00600048, 0x24002628, 0x00898008, 0x00000544 }, + { 0x00600048, 0x2540262d, 0x0089800a, 0x00000546 }, + { 0x00400401, 0xbc0001a9, 0x00690540, 0x00000000 }, + { 0x00400801, 0xbc1001a9, 0x00690548, 0x00000000 }, + { 0x01000010, 0x20003d2c, 0x00000022, 0x00030003 }, + { 0x01000040, 0x20223d29, 0x02000022, 0xffffffff }, + { 0x00000040, 0x220c3d8c, 0x0000020c, 0x00080008 }, + { 0x00110040, 0x24540c21, 0x00000454, 0x00080008 }, + { 0x00010040, 0x24540c21, 0x00000454, 0x00180038 }, + { 0x00110220, 0x34001c00, 0x02001400, 0xfffffee4 }, + { 0x01800010, 0x20003dac, 0x0200010e, 0x00010001 }, + { 0x00000040, 0x220c3d8c, 0x0000020c, 0xffe0ffe0 }, + { 0x00010001, 0x24540061, 0x02000000, 0x06c00640 }, + { 0x00110001, 0x24540061, 0x02000000, 0x04800780 }, + { 0x00000001, 0x220e0128, 0x00000456, 0x00000000 }, + { 0x00800040, 0x24003dac, 0x00b19c00, 0x00200020 }, + { 0x00800040, 0x24203dac, 0x00b19c20, 0x00200020 }, + { 0x8080000c, 0xdc003d91, 0x00b10400, 0x00060006 }, + { 0x8080000c, 0xdc203d91, 0x00b10420, 0x00060006 }, + { 0x02000040, 0x210e3d29, 0x0200010e, 0xffffffff }, + { 0x00000040, 0x220c3d8c, 0x0000020c, 0x00040004 }, + { 0x00110220, 0x34001c00, 0x02001400, 0xfffffce0 }, + { 0x01000005, 0x25643e2d, 0x00000060, 0x00c000c0 }, + { 0x01000010, 0x20003dac, 0x02000458, 0x00020002 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x00000016 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x0000000c }, + { 0x01000010, 0x20003dac, 0x00000458, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000086 }, + { 0x00a02001, 0x46400231, 0x00d20780, 0x00000000 }, + { 0x00a02001, 0x46800231, 0x00d207c0, 0x00000000 }, + { 0x00a02001, 0x46c00231, 0x00d20480, 0x00000000 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x0000007e }, + { 0x80a02042, 0x46404631, 0x00d20640, 0x00d20780 }, + { 0x80a02042, 0x46804631, 0x00d20680, 0x00d207c0 }, + { 0x80a02042, 0x46c04631, 0x00d206c0, 0x00d20480 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000076 }, + { 0x01000010, 0x20003dac, 0x02000564, 0x00800080 }, + { 0x00110220, 0x34001c00, 0x02001400, 0x0000000e }, + { 0x01000010, 0x20003dac, 0x00000458, 0x00020002 }, + { 0x00110220, 0x34001c00, 0x00001400, 0xffffffe4 }, + { 0x00200401, 0x256801ed, 0x00000000, 0x00200020 }, + { 0x00200801, 0x256c01ed, 0x00000000, 0x00060006 }, + { 0x00400001, 0x258001ed, 0x00000000, 0x00000000 }, + { 0x00600001, 0x45a001ad, 0x00058c00, 0x00000000 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000028 }, + { 0x02600005, 0x20006e28, 0x02008c0c, 0x88848421 }, + { 0x0220000c, 0x25663dad, 0x00000458, 0x00010001 }, + { 0x0000000c, 0x25643dad, 0x00000564, 0x00060006 }, + { 0x00310001, 0x25c401ad, 0x00000458, 0x00000000 }, + { 0x00210001, 0x25c00061, 0x00000000, 0x00010001 }, + { 0x00310040, 0x25c03dad, 0x004545c4, 0x00010001 }, + { 0x00610001, 0x25a00061, 0x02000000, 0x00000080 }, + { 0x00710001, 0x45a002ad, 0x02ae8c00, 0x00000000 }, + { 0x00710001, 0x45a202ad, 0x02ae8c01, 0x00000000 }, + { 0x00800041, 0x25a035ad, 0x00b105a0, 0x000905c0 }, + { 0x01200010, 0x20003e2c, 0x0245006e, 0x00000000 }, + { 0x00310009, 0x244c45ad, 0x02000564, 0x0045006e }, + { 0x00210001, 0x244c01ed, 0x02000000, 0x00000000 }, + { 0x0031000c, 0x244c3dad, 0x0245044c, 0x00010001 }, + { 0x00200009, 0x256835ad, 0x0045044c, 0x00000566 }, + { 0x00210040, 0x256835ad, 0x02450568, 0x00000566 }, + { 0x00200040, 0x256c362d, 0x0045006e, 0x00000566 }, + { 0x00400040, 0x240035ac, 0x00ab05a2, 0x00ab05a6 }, + { 0x00400040, 0x2400358c, 0x00690400, 0x00000566 }, + { 0x0040000c, 0x2580358d, 0x00690400, 0x00000566 }, + { 0x00800041, 0x2400362c, 0x00d20640, 0x000005a0 }, + { 0x00800041, 0x2420362c, 0x00d20660, 0x000005a0 }, + { 0x00800048, 0x2400362c, 0x00d20780, 0x000005a4 }, + { 0x00800048, 0x2420362c, 0x00d207a0, 0x000005a4 }, + { 0x00800040, 0x2400358c, 0x00b10400, 0x00000568 }, + { 0x00800040, 0x2420358c, 0x00b10420, 0x00000568 }, + { 0x0080000c, 0x24c0358d, 0x00b10400, 0x0000056c }, + { 0x0080000c, 0x24e0358d, 0x00b10420, 0x0000056c }, + { 0x80800040, 0x464035b1, 0x00b104c0, 0x00000580 }, + { 0x80800040, 0x466035b1, 0x00b104e0, 0x00000580 }, + { 0x00800041, 0x2400362c, 0x00d20680, 0x000005a0 }, + { 0x00800041, 0x2420362c, 0x00d206a0, 0x000005a0 }, + { 0x00800048, 0x2400362c, 0x00d207c0, 0x000005a4 }, + { 0x00800048, 0x2420362c, 0x00d207e0, 0x000005a4 }, + { 0x00800040, 0x2400358c, 0x00b10400, 0x00000568 }, + { 0x00800040, 0x2420358c, 0x00b10420, 0x00000568 }, + { 0x0080000c, 0x24c0358d, 0x00b10400, 0x0000056c }, + { 0x0080000c, 0x24e0358d, 0x00b10420, 0x0000056c }, + { 0x80800040, 0x468035b1, 0x00b104c0, 0x00000580 }, + { 0x80800040, 0x46a035b1, 0x00b104e0, 0x00000580 }, + { 0x00800041, 0x2400362c, 0x00d206c0, 0x000705a8 }, + { 0x00800041, 0x2420362c, 0x00d206e0, 0x000705a8 }, + { 0x00800048, 0x2400362c, 0x00d20480, 0x000705ac }, + { 0x00800048, 0x2420362c, 0x00d204a0, 0x000705ac }, + { 0x00800040, 0x2400358c, 0x00b10400, 0x0000056a }, + { 0x00800040, 0x2420358c, 0x00b10420, 0x0000056a }, + { 0x0080000c, 0x24c0358d, 0x00b10400, 0x0000056e }, + { 0x0080000c, 0x24e0358d, 0x00b10420, 0x0000056e }, + { 0x80800040, 0x46c035b1, 0x00b104c0, 0x00050582 }, + { 0x80800040, 0x46e035b1, 0x00b104e0, 0x00050582 }, + { 0x01800005, 0x20003d2c, 0x02000020, 0x00020002 }, + { 0x80800040, 0xd00045b1, 0x00b19000, 0x00d20640 }, + { 0x80800040, 0xd02045b1, 0x00b19020, 0x00d20660 }, + { 0x80800040, 0xd04045b1, 0x00b19040, 0x00d20680 }, + { 0x80800040, 0xd06045b1, 0x00b19060, 0x00d206a0 }, + { 0x00000040, 0x22083d8c, 0x00000208, 0x00800080 }, + { 0x80400040, 0xd40045b1, 0x00699400, 0x00ab06c0 }, + { 0x80400040, 0xd48045b1, 0x00699480, 0x00ab06c2 }, + { 0x80400040, 0xd42045b1, 0x00699420, 0x00ab06e0 }, + { 0x80400040, 0xd4a045b1, 0x006994a0, 0x00ab06e2 }, + { 0x80400040, 0xd41045b1, 0x00699410, 0x00ab06d0 }, + { 0x80400040, 0xd49045b1, 0x00699490, 0x00ab06d2 }, + { 0x80400040, 0xd43045b1, 0x00699430, 0x00ab06f0 }, + { 0x80400040, 0xd4b045b1, 0x006994b0, 0x00ab06f2 }, + { 0x00000040, 0x220a3d8c, 0x0000020a, 0x00080008 }, + { 0x00110040, 0x220a3d8c, 0x0200020a, 0x00300030 }, + { 0x01000010, 0x20003d2c, 0x02000020, 0x00060006 }, + { 0x00000040, 0x20203d29, 0x00000020, 0x00020002 }, + { 0x00000040, 0x22040c00, 0x00000204, 0x00100001 }, + { 0x00000040, 0x220c358c, 0x0000020c, 0x0000003a }, + { 0x00110220, 0x34001c00, 0x02001400, 0xfffffc1e }, + { 0x00000001, 0x220001ec, 0x00000000, 0x01400140 }, + { 0x00000001, 0x220201ec, 0x00000000, 0x01c001c0 }, + { 0x00800401, 0x20400236, 0x01ee8000, 0x00000000 }, + { 0x00800801, 0x20500236, 0x01ee8010, 0x00000000 }, + { 0x00800401, 0x20600236, 0x01ee8020, 0x00000000 }, + { 0x00800801, 0x20700236, 0x01ee8030, 0x00000000 }, + { 0x00800401, 0x20800236, 0x01ee8040, 0x00000000 }, + { 0x00800801, 0x20900236, 0x01ee8050, 0x00000000 }, + { 0x00800401, 0x20a00236, 0x01ee8060, 0x00000000 }, + { 0x00800801, 0x20b00236, 0x01ee8070, 0x00000000 }, + { 0x00800401, 0x20c00236, 0x01ee8100, 0x00000000 }, + { 0x00800801, 0x20d00236, 0x01ee8110, 0x00000000 }, + { 0x00800401, 0x20e00236, 0x01ee8120, 0x00000000 }, + { 0x00800801, 0x20f00236, 0x01ee8130, 0x00000000 }, + { 0x00800401, 0x21000236, 0x01ee8140, 0x00000000 }, + { 0x00800801, 0x21100236, 0x01ee8150, 0x00000000 }, + { 0x00800401, 0x21200236, 0x01ee8160, 0x00000000 }, + { 0x00800801, 0x21300236, 0x01ee8170, 0x00000000 }, + { 0x00000040, 0x22000d20, 0x00000062, 0x1218a600 }, + { 0x00200401, 0x204001a5, 0x00450064, 0x00000000 }, + { 0x00000801, 0x20480061, 0x00000000, 0x000f000f }, + { 0x01600031, 0x21400021, 0x508d0040, 0x00000200 }, + { 0x00000001, 0x220001ec, 0x00000000, 0x03400340 }, + { 0x00800401, 0x41600236, 0x00d28000, 0x00000000 }, + { 0x00800801, 0x41610236, 0x00d28080, 0x00000000 }, + { 0x00800401, 0x41800236, 0x00d28020, 0x00000000 }, + { 0x00800801, 0x41810236, 0x00d280a0, 0x00000000 }, + { 0x00800401, 0x41a00236, 0x00d28040, 0x00000000 }, + { 0x00800801, 0x41a10236, 0x00d280c0, 0x00000000 }, + { 0x00800401, 0x41c00236, 0x00d28060, 0x00000000 }, + { 0x00800801, 0x41c10236, 0x00d280e0, 0x00000000 }, + { 0x00000040, 0x22000d20, 0x00000062, 0x0a18a601 }, + { 0x0000040c, 0x20443ca5, 0x00000044, 0x00010001 }, + { 0x00000801, 0x20480061, 0x00000000, 0x0007000f }, + { 0x0a600031, 0x21600021, 0x508d0040, 0x00000200 }, + { 0x00000001, 0x21400021, 0x00000140, 0x00000000 }, + { 0x00000001, 0x21600021, 0x00000160, 0x00000000 }, + { 0x01600031, 0x20001c20, 0x708d0000, 0x82000010 }, + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x00600001, 0x20400021, 0x008d0000, 0x00000000 }, + { 0x00000005, 0x20203e2d, 0x00000061, 0x001f001f }, + { 0x00200009, 0x20643e2d, 0x00450064, 0x00040004 }, + { 0x00000001, 0x203a01ed, 0x00000000, 0x00000000 }, + { 0x01000010, 0x20003dac, 0x00000020, 0x00160016 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x0000001e }, + { 0x01200010, 0x20003e2c, 0x0200006c, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x00000024 }, + { 0x00800009, 0x25403dad, 0x00050064, 0x00020002 }, + { 0x00000001, 0x203a01ed, 0x00000000, 0x00180018 }, + { 0x00200040, 0x45483dad, 0x00660548, 0x00100010 }, + { 0x00200040, 0x45523dad, 0x00660552, 0x00100010 }, + { 0x00400040, 0x25583dad, 0x00690558, 0x00100010 }, + { 0x00800040, 0x208035ad, 0x00b10080, 0x00b10540 }, + { 0x00600040, 0x45403dad, 0x00ae0540, 0x00200020 }, + { 0x00800040, 0x20a035ad, 0x00b100a0, 0x00b10540 }, + { 0x00600040, 0x45423dad, 0x00ae0542, 0x00200020 }, + { 0x00800040, 0x20e035ad, 0x00b100e0, 0x00b10540 }, + { 0x00600040, 0x45403dad, 0x00ae0540, 0xffe0ffe0 }, + { 0x00800040, 0x20c035ad, 0x00b100c0, 0x00b10540 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000014 }, + { 0x06600010, 0x20003dac, 0x02000020, 0x00030003 }, + { 0x00000001, 0x206c0171, 0x00000000, 0x00000000 }, + { 0x00610001, 0x208000a5, 0x02050080, 0x00000000 }, + { 0x00610001, 0x212000a5, 0x02090100, 0x00000000 }, + { 0x00410001, 0x211000a5, 0x02690100, 0x00000000 }, + { 0x00200009, 0x25403dad, 0x00450064, 0x00020002 }, + { 0x00800040, 0x208035ad, 0x00b10080, 0x00050540 }, + { 0x00200040, 0x40883dad, 0x00660088, 0x00200020 }, + { 0x00200040, 0x40923dad, 0x00660092, 0x00200020 }, + { 0x00400040, 0x20983dad, 0x00690098, 0x00200020 }, + { 0x00200401, 0x22080060, 0x00000000, 0x03400140 }, + { 0x00000c01, 0x220c0060, 0x00000000, 0x04400080 }, + { 0x00000801, 0x22040060, 0x00000000, 0x01000070 }, + { 0x02000005, 0x20002e28, 0x00000061, 0x00400040 }, + { 0x00010005, 0x203e2e29, 0x00000063, 0x00010001 }, + { 0x00110001, 0x203e0169, 0x00000000, 0x00030003 }, + { 0x00000001, 0x20200169, 0x00000000, 0x00000000 }, + { 0x0000000c, 0x2458262d, 0x0000006d, 0x00000020 }, + { 0x00000001, 0x210e0169, 0x00000000, 0x00010001 }, + { 0x00000005, 0x24583dad, 0x00000458, 0x00030003 }, + { 0x01000010, 0x200035ac, 0x0000010e, 0x00000458 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x0000031a }, + { 0x01000010, 0x20003dac, 0x0200010e, 0x00010001 }, + { 0x00010401, 0x24540061, 0x02000000, 0x06c00640 }, + { 0x00010805, 0x245a3e2d, 0x02008800, 0x007f007f }, + { 0x00110401, 0x24540061, 0x02000000, 0x04800780 }, + { 0x00110805, 0x245a3e2d, 0x02008804, 0x007f007f }, + { 0x00010005, 0x245c3e2d, 0x02008800, 0x00800080 }, + { 0x00110005, 0x245c3e2d, 0x02008804, 0x00800080 }, + { 0x00000009, 0x245c3dad, 0x0000045c, 0x00010001 }, + { 0x0000000c, 0x211e362d, 0x0000006c, 0x00000020 }, + { 0x00000040, 0x240035ac, 0x0000003e, 0x0000045c }, + { 0x01000010, 0x20003d8c, 0x00210400, 0x00010001 }, + { 0x01000010, 0x20003d8c, 0x02210400, 0x01000100 }, + { 0x00000001, 0x203c01ed, 0x00000000, 0x00000000 }, + { 0x00010001, 0x203c01ed, 0x00000000, 0x00020002 }, + { 0x00010001, 0x203c01ed, 0x02000000, 0xfffefffe }, + { 0x02000005, 0x20002e28, 0x00000061, 0x00400040 }, + { 0x00010040, 0x244c0d21, 0x0000045a, 0x0208e602 }, + { 0x00110040, 0x20780d21, 0x0000045a, 0x0208a002 }, + { 0x00010040, 0x20782421, 0x0000044c, 0x0000045c }, + { 0x02000005, 0x20003dac, 0x0200011e, 0x00030003 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x000001c0 }, + { 0x01000005, 0x20003dac, 0x00009800, 0x00030003 }, + { 0x00200005, 0x24443dad, 0x00459800, 0x00030003 }, + { 0x0020000c, 0x24403dad, 0x00459800, 0x00020002 }, + { 0x01600006, 0x20003dac, 0x02000446, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000012 }, + { 0x00010040, 0x22000c20, 0x02000078, 0x00400000 }, + { 0x00110040, 0x22000c20, 0x02000078, 0x00700000 }, + { 0x00310040, 0x20401da5, 0x02450440, 0xfffffffe }, + { 0x00110001, 0x20480061, 0x02000000, 0x000c000c }, + { 0x00010040, 0x20401da5, 0x02000440, 0xfffffffe }, + { 0x00010001, 0x204401a5, 0x02000442, 0x00000000 }, + { 0x00010001, 0x20480061, 0x02000000, 0x0007000c }, + { 0x01600031, 0x25600021, 0x408d0040, 0x00000200 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x0000000e }, + { 0x00010040, 0x22000c20, 0x02000078, 0x00200000 }, + { 0x00110040, 0x22000c20, 0x02000078, 0x00400000 }, + { 0x00200001, 0x204001a5, 0x00450440, 0x00000000 }, + { 0x00110040, 0x20441da5, 0x02000442, 0xfffffffe }, + { 0x00110001, 0x20480061, 0x02000000, 0x000c0007 }, + { 0x00010001, 0x20480061, 0x02000000, 0x00070007 }, + { 0x01600031, 0x25600021, 0x408d0040, 0x00000200 }, + { 0x00000040, 0xb80235ad, 0x00009802, 0x0000003c }, + { 0x0020040c, 0x24403dad, 0x00459800, 0x00030003 }, + { 0x00200805, 0x24483dad, 0x00459800, 0x00070007 }, + { 0x01600006, 0x20003dac, 0x0000044a, 0x00000000 }, + { 0x00200001, 0x204001a5, 0x00450440, 0x00000000 }, + { 0x00000009, 0x20403ca5, 0x00000040, 0x00010001 }, + { 0x00010040, 0x22000c20, 0x00000078, 0x00200010 }, + { 0x00110040, 0x22000c20, 0x00000078, 0x00300010 }, + { 0x00010001, 0x20480061, 0x00000000, 0x00030009 }, + { 0x00110001, 0x20480061, 0x00000000, 0x00040009 }, + { 0x02600031, 0x27000021, 0x408d0040, 0x00000200 }, + { 0x01000005, 0x20003dac, 0x00009800, 0x00030003 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x0000001a }, + { 0x00600001, 0x26220231, 0x008d05c0, 0x00000000 }, + { 0x00600401, 0x26120231, 0x008d05b8, 0x00000000 }, + { 0x00600801, 0x26020231, 0x008d05b0, 0x00000000 }, + { 0x00600401, 0x25f20231, 0x008d05a8, 0x00000000 }, + { 0x00600801, 0x25e20231, 0x008d05a0, 0x00000000 }, + { 0x00600401, 0x25d20231, 0x008d0598, 0x00000000 }, + { 0x00600801, 0x25c20231, 0x008d0590, 0x00000000 }, + { 0x00600401, 0x25b20231, 0x008d0588, 0x00000000 }, + { 0x00600801, 0x25a20231, 0x008d0580, 0x00000000 }, + { 0x00600401, 0x25920231, 0x008d0578, 0x00000000 }, + { 0x00600801, 0x25820231, 0x008d0570, 0x00000000 }, + { 0x00600001, 0x25720231, 0x008d0568, 0x00000000 }, + { 0x00600001, 0x25620231, 0x008d0560, 0x00000000 }, + { 0x00110001, 0x220001ec, 0x02000000, 0x05820582 }, + { 0x00010001, 0x220001ec, 0x02000000, 0x05620562 }, + { 0x00000001, 0x220e0128, 0x00000454, 0x00000000 }, + { 0x01800006, 0x200035ac, 0x02000446, 0x00000444 }, + { 0x00810001, 0xbc000229, 0x02ad8000, 0x00000000 }, + { 0x00810001, 0xbc200229, 0x02ad8020, 0x00000000 }, + { 0x00810001, 0xbc400229, 0x02ad8040, 0x00000000 }, + { 0x00810001, 0xbc600229, 0x02ad8060, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x0000012a }, + { 0x00600001, 0x2024018d, 0x008d0200, 0x00000000 }, + { 0x01000041, 0x245e35ad, 0x00000446, 0x00000444 }, + { 0x00000040, 0x22022d08, 0x00000200, 0x00100010 }, + { 0x02000005, 0x20003db0, 0x0200045e, 0x00010001 }, + { 0x00200040, 0x22042d08, 0x00450200, 0x00200020 }, + { 0x00400001, 0x244c0109, 0x00690200, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000066 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x00000064 }, + { 0x00000040, 0x22003d08, 0x00000200, 0xffdeffde }, + { 0x00000440, 0x22023d08, 0x00000202, 0xffeeffee }, + { 0x00000801, 0x220c0060, 0x00000000, 0x04a00480 }, + { 0x01000010, 0x20003db0, 0x0000045e, 0x00040004 }, + { 0x00a02040, 0x2400462c, 0x00ad8000, 0x00ad8005 }, + { 0x00a02048, 0x24003e2c, 0x00ad8001, 0xfffbfffb }, + { 0x00a02048, 0x24003e2c, 0x00ad8002, 0x00140014 }, + { 0x00a02048, 0x24003e2c, 0x00ad8003, 0x00140014 }, + { 0x00a02048, 0xb8003e2d, 0x00ad8004, 0xfffbfffb }, + { 0x00a02040, 0x2400462c, 0x00ad8040, 0x00ad8045 }, + { 0x00a02048, 0x24003e2c, 0x00ad8041, 0xfffbfffb }, + { 0x00a02048, 0x24003e2c, 0x00ad8042, 0x00140014 }, + { 0x00a02048, 0x24003e2c, 0x00ad8043, 0x00140014 }, + { 0x00a02048, 0xb8403e2d, 0x00ad8044, 0xfffbfffb }, + { 0x00a02040, 0x2400462c, 0x00ad8080, 0x00ad8085 }, + { 0x00a02048, 0x24003e2c, 0x00ad8081, 0xfffbfffb }, + { 0x00a02048, 0x24003e2c, 0x00ad8082, 0x00140014 }, + { 0x00a02048, 0x24003e2c, 0x00ad8083, 0x00140014 }, + { 0x00a02048, 0xb8803e2d, 0x00ad8084, 0xfffbfffb }, + { 0x00600040, 0x2400462c, 0x008d80c0, 0x008d80c5 }, + { 0x00600048, 0x24003e2c, 0x008d80c1, 0xfffbfffb }, + { 0x00600048, 0x24003e2c, 0x008d80c2, 0x00140014 }, + { 0x00600048, 0x24003e2c, 0x008d80c3, 0x00140014 }, + { 0x00600048, 0xb8c03e2d, 0x008d80c4, 0xfffbfffb }, + { 0x00000401, 0x22000060, 0x00000000, 0x04a00480 }, + { 0x00000c01, 0x22040060, 0x00000000, 0x04a00490 }, + { 0x00010802, 0x220c2d28, 0x00000454, 0x04800480 }, + { 0x00a02040, 0x24003dac, 0x00b18000, 0x02000200 }, + { 0x00800048, 0x24003dac, 0x01ed8800, 0xfffbfffb }, + { 0x00800048, 0x24203dac, 0x01ed8820, 0xfffbfffb }, + { 0x00a02048, 0x24003dac, 0x00b18020, 0x00140014 }, + { 0x00800048, 0x24003dac, 0x01ed8820, 0x00140014 }, + { 0x00800048, 0x24203dac, 0x01ed8840, 0x00140014 }, + { 0x00a02048, 0x24003dac, 0x00b18040, 0xfffbfffb }, + { 0x00800048, 0x24003dac, 0x01ed8840, 0x00010001 }, + { 0x00800048, 0x24203dac, 0x01ed8860, 0x00010001 }, + { 0x8080000c, 0xd8003d91, 0x00b10400, 0x000a000a }, + { 0x8080100c, 0xd8203d91, 0x00b10420, 0x000a000a }, + { 0x00a02040, 0x24003dac, 0x00b18040, 0x02000200 }, + { 0x00800048, 0x24003dac, 0x01ed8840, 0xfffbfffb }, + { 0x00800048, 0x24203dac, 0x01ed8860, 0xfffbfffb }, + { 0x00a02048, 0x24003dac, 0x00b18060, 0x00140014 }, + { 0x00800048, 0x24003dac, 0x01ed8860, 0x00140014 }, + { 0x00800048, 0x24203dac, 0x01ed8880, 0x00140014 }, + { 0x00a02048, 0x24003dac, 0x00b18080, 0xfffbfffb }, + { 0x00800048, 0x24003dac, 0x01ed8880, 0x00010001 }, + { 0x00800048, 0x24203dac, 0x01ed88a0, 0x00010001 }, + { 0x8080000c, 0xd8403d91, 0x00b10400, 0x000a000a }, + { 0x8080100c, 0xd8603d91, 0x00b10420, 0x000a000a }, + { 0x00010220, 0x34001c00, 0x00001400, 0x000000b4 }, + { 0x01000010, 0x20003db0, 0x00000444, 0x00000000 }, + { 0x01000010, 0x20003db0, 0x02000446, 0x00020002 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x0000004c }, + { 0x00010220, 0x34001c00, 0x02001400, 0x0000004a }, + { 0x00400040, 0x22003d28, 0x0069044c, 0xfffefffe }, + { 0x03400010, 0x20003dac, 0x00000446, 0x00020002 }, + { 0x01000010, 0x20003db0, 0x02000444, 0x00020002 }, + { 0x00410040, 0x22002d08, 0x00690200, 0x00100010 }, + { 0x01000010, 0x20003dac, 0x00000446, 0x00000000 }, + { 0x00010002, 0x220c2d28, 0x02000454, 0x04800480 }, + { 0x00800040, 0x24003e2c, 0x01ed8000, 0x00100010 }, + { 0x00800040, 0x24203e2c, 0x01ed8020, 0x00100010 }, + { 0x00800048, 0x24003e2c, 0x01ed8001, 0xfffbfffb }, + { 0x00800048, 0x24203e2c, 0x01ed8021, 0xfffbfffb }, + { 0x00800048, 0x24003e2c, 0x01ed8002, 0x00140014 }, + { 0x00800048, 0x24203e2c, 0x01ed8022, 0x00140014 }, + { 0x00800048, 0x24003e2c, 0x01ed8003, 0x00140014 }, + { 0x00800048, 0x24203e2c, 0x01ed8023, 0x00140014 }, + { 0x00800048, 0x24003e2c, 0x01ed8004, 0xfffbfffb }, + { 0x00800048, 0x24203e2c, 0x01ed8024, 0xfffbfffb }, + { 0x00800048, 0x24003e2c, 0x01ed8005, 0x00010001 }, + { 0x00800048, 0x24203e2c, 0x01ed8025, 0x00010001 }, + { 0x8080000c, 0xd8003d91, 0x00b10400, 0x00050005 }, + { 0x8080100c, 0xd8203d91, 0x00b10420, 0x00050005 }, + { 0x00800040, 0x24003e2c, 0x01ed8040, 0x00100010 }, + { 0x00800040, 0x24203e2c, 0x01ed8060, 0x00100010 }, + { 0x00800048, 0x24003e2c, 0x01ed8041, 0xfffbfffb }, + { 0x00800048, 0x24203e2c, 0x01ed8061, 0xfffbfffb }, + { 0x00800048, 0x24003e2c, 0x01ed8042, 0x00140014 }, + { 0x00800048, 0x24203e2c, 0x01ed8062, 0x00140014 }, + { 0x00800048, 0x24003e2c, 0x01ed8043, 0x00140014 }, + { 0x00800048, 0x24203e2c, 0x01ed8063, 0x00140014 }, + { 0x00800048, 0x24003e2c, 0x01ed8044, 0xfffbfffb }, + { 0x00800048, 0x24203e2c, 0x01ed8064, 0xfffbfffb }, + { 0x00800048, 0x24003e2c, 0x01ed8045, 0x00010001 }, + { 0x00800048, 0x24203e2c, 0x01ed8065, 0x00010001 }, + { 0x8080000c, 0xd8403d91, 0x00b10400, 0x00050005 }, + { 0x8080100c, 0xd8603d91, 0x00b10420, 0x00050005 }, + { 0x00110220, 0x34001c00, 0x02001400, 0x00000004 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x0000005c }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000062 }, + { 0x01000010, 0x20003db0, 0x00000446, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000042 }, + { 0x00200401, 0x22000128, 0x0066044c, 0x00000000 }, + { 0x00200c01, 0x22040128, 0x0045044e, 0x00000000 }, + { 0x00000801, 0x220c0128, 0x00000454, 0x00000000 }, + { 0x03400010, 0x20003dac, 0x02000444, 0x00020002 }, + { 0x01000010, 0x20003dac, 0x00000444, 0x00000000 }, + { 0x00410040, 0x22002d08, 0x02690200, 0x00010001 }, + { 0x01000010, 0x20003db0, 0x02000446, 0x00020002 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x00000002 }, + { 0x00110001, 0x220c0168, 0x02000000, 0x04800480 }, + { 0x00a02040, 0x24003e2c, 0x00ad83e0, 0x00100010 }, + { 0x00800048, 0x24003e2c, 0x01ed8be0, 0xfffbfffb }, + { 0x00800048, 0x24203e2c, 0x01ed8800, 0xfffbfffb }, + { 0x00a02048, 0x24003e2c, 0x00ad8000, 0x00140014 }, + { 0x00800048, 0x24003e2c, 0x01ed8800, 0x00140014 }, + { 0x00800048, 0x24203e2c, 0x01ed8820, 0x00140014 }, + { 0x00a02048, 0x24003e2c, 0x00ad8020, 0xfffbfffb }, + { 0x00800048, 0x24003e2c, 0x01ed8820, 0x00010001 }, + { 0x00800048, 0x24203e2c, 0x01ed8840, 0x00010001 }, + { 0x8080000c, 0xd8003d91, 0x00b10400, 0x00050005 }, + { 0x8080100c, 0xd8203d91, 0x00b10420, 0x00050005 }, + { 0x00a02040, 0x24003e2c, 0x00ad8020, 0x00100010 }, + { 0x00800048, 0x24003e2c, 0x01ed8820, 0xfffbfffb }, + { 0x00800048, 0x24203e2c, 0x01ed8840, 0xfffbfffb }, + { 0x00a02048, 0x24003e2c, 0x00ad8040, 0x00140014 }, + { 0x00800048, 0x24003e2c, 0x01ed8840, 0x00140014 }, + { 0x00800048, 0x24203e2c, 0x01ed8860, 0x00140014 }, + { 0x00a02048, 0x24003e2c, 0x00ad8060, 0xfffbfffb }, + { 0x00800048, 0x24003e2c, 0x01ed8860, 0x00010001 }, + { 0x00800048, 0x24203e2c, 0x01ed8880, 0x00010001 }, + { 0x8080000c, 0xd8403d91, 0x00b10400, 0x00050005 }, + { 0x8080100c, 0xd8603d91, 0x00b10420, 0x00050005 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x00000016 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x0000001c }, + { 0x00200401, 0x22000128, 0x0045044c, 0x00000000 }, + { 0x00000801, 0x220c0128, 0x00000454, 0x00000000 }, + { 0x01200010, 0x20003dac, 0x00000444, 0x00030003 }, + { 0x01200010, 0x20003dac, 0x02000446, 0x00030003 }, + { 0x00210040, 0x22002d08, 0x00450200, 0x00010001 }, + { 0x00210040, 0x22002d08, 0x02450200, 0x00100010 }, + { 0x00800001, 0xb8000229, 0x01ed8000, 0x00000000 }, + { 0x00800001, 0xb8200229, 0x01ed8020, 0x00000000 }, + { 0x00800001, 0xb8400229, 0x01ed8040, 0x00000000 }, + { 0x00800001, 0xb8600229, 0x01ed8060, 0x00000000 }, + { 0x80800042, 0xd8004631, 0x00d29800, 0x00d20480 }, + { 0x80800042, 0xd8204631, 0x00d29820, 0x00d204a0 }, + { 0x80800042, 0xd8404631, 0x00d29840, 0x00d204c0 }, + { 0x80800042, 0xd8604631, 0x00d29860, 0x00d204e0 }, + { 0x00600001, 0x220001ac, 0x008d0024, 0x00000000 }, + { 0x00200040, 0x244c3dad, 0x00450448, 0xfff8fff8 }, + { 0x00000401, 0x220001ec, 0x00000000, 0x07000700 }, + { 0x00000c01, 0x220201e8, 0x00000000, 0x07100710 }, + { 0x00000801, 0x220e0128, 0x00000456, 0x00000000 }, + { 0x00000441, 0x254635ad, 0x00000448, 0x0000044a }, + { 0x00000c41, 0x254025ad, 0x0000444c, 0x0000444e }, + { 0x00000c41, 0x254225ad, 0x00000448, 0x0000444e }, + { 0x00000841, 0x254435ad, 0x0000444c, 0x0000044a }, + { 0x00200040, 0x244c3d09, 0x00450200, 0x00100010 }, + { 0x00800041, 0x24002628, 0x00ad8000, 0x00000540 }, + { 0x00800041, 0x24202628, 0x00ad8020, 0x00000540 }, + { 0x00800048, 0x24002628, 0x00ad8002, 0x00000542 }, + { 0x00800048, 0x24202628, 0x00ad8022, 0x00000542 }, + { 0x00200001, 0x22000128, 0x0045044c, 0x00000000 }, + { 0x00800048, 0x24002628, 0x01ed8000, 0x00000544 }, + { 0x00800048, 0x24202628, 0x01ed8020, 0x00000544 }, + { 0x00800048, 0xbc002629, 0x01ed8002, 0x00000546 }, + { 0x00801048, 0xbc202629, 0x01ed8022, 0x00000546 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000128 }, + { 0x00000001, 0x20220169, 0x00000000, 0x00040004 }, + { 0x00200005, 0x24443dad, 0x00459800, 0x00030003 }, + { 0x0020000c, 0x24403dad, 0x00459800, 0x00020002 }, + { 0x01600006, 0x20003dac, 0x02000446, 0x00000000 }, + { 0x00010040, 0x22000c20, 0x02000078, 0x00200000 }, + { 0x00110040, 0x22000c20, 0x02000078, 0x00500000 }, + { 0x00310040, 0x20401da5, 0x02450440, 0xfffffffe }, + { 0x00110001, 0x20480061, 0x02000000, 0x00080008 }, + { 0x00010040, 0x20401da5, 0x02000440, 0xfffffffe }, + { 0x00010001, 0x204401a5, 0x02000442, 0x00000000 }, + { 0x00010001, 0x20480061, 0x02000000, 0x00030008 }, + { 0x01600031, 0x25600021, 0x408d0040, 0x00000200 }, + { 0x00000040, 0xb80235ad, 0x00009802, 0x0000003c }, + { 0x00000040, 0x22000c20, 0x00000078, 0x00100010 }, + { 0x0020040c, 0x24403dad, 0x00459800, 0x00030003 }, + { 0x00200805, 0x24483dad, 0x00459800, 0x00070007 }, + { 0x00200001, 0x204001a5, 0x00450440, 0x00000000 }, + { 0x00000009, 0x20403ca5, 0x00000040, 0x00010001 }, + { 0x00000001, 0x20480061, 0x00000000, 0x00020005 }, + { 0x02600031, 0x27000021, 0x408d0040, 0x00000200 }, + { 0x00110001, 0x220001ec, 0x02000000, 0x05820582 }, + { 0x00010001, 0x220001ec, 0x02000000, 0x05620562 }, + { 0x00000001, 0x220e0128, 0x00000454, 0x00000000 }, + { 0x01800006, 0x200035ac, 0x02000446, 0x00000444 }, + { 0x00410001, 0xbc000229, 0x02698000, 0x00000000 }, + { 0x00410001, 0xbc100229, 0x02698010, 0x00000000 }, + { 0x00410001, 0xbc200229, 0x02698020, 0x00000000 }, + { 0x00410001, 0xbc300229, 0x02698030, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x000000be }, + { 0x00600001, 0x2024018d, 0x008d0200, 0x00000000 }, + { 0x01000041, 0x245e35ad, 0x00000446, 0x00000444 }, + { 0x02000005, 0x20003db0, 0x0200045e, 0x00010001 }, + { 0x00000040, 0x22022d08, 0x00000200, 0x00100010 }, + { 0x00200040, 0x22042d08, 0x00450200, 0x00200020 }, + { 0x00400001, 0x244c0109, 0x00690200, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000044 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x00000042 }, + { 0x00000040, 0x22003d08, 0x00000200, 0xffdeffde }, + { 0x00000440, 0x22023d08, 0x00000202, 0xffeeffee }, + { 0x00000801, 0x220c0060, 0x00000000, 0x04d004c0 }, + { 0x01000010, 0x20003db0, 0x0000045e, 0x00040004 }, + { 0x00802040, 0x2400462c, 0x00a98000, 0x00a98005 }, + { 0x00802048, 0x24003e2c, 0x00a98001, 0xfffbfffb }, + { 0x00802048, 0x24003e2c, 0x00a98002, 0x00140014 }, + { 0x00802048, 0x24003e2c, 0x00a98003, 0x00140014 }, + { 0x00802048, 0xb8003e2d, 0x00a98004, 0xfffbfffb }, + { 0x00802040, 0x2400462c, 0x00a98040, 0x00a98045 }, + { 0x00802048, 0x24003e2c, 0x00a98041, 0xfffbfffb }, + { 0x00802048, 0x24003e2c, 0x00a98042, 0x00140014 }, + { 0x00802048, 0x24003e2c, 0x00a98043, 0x00140014 }, + { 0x00802048, 0xb8203e2d, 0x00a98044, 0xfffbfffb }, + { 0x00400040, 0x2400462c, 0x00698080, 0x00698085 }, + { 0x00400048, 0x24003e2c, 0x00698081, 0xfffbfffb }, + { 0x00400048, 0x24003e2c, 0x00698082, 0x00140014 }, + { 0x00400048, 0x24003e2c, 0x00698083, 0x00140014 }, + { 0x00400048, 0xb8403e2d, 0x00698084, 0xfffbfffb }, + { 0x00000401, 0x220c0060, 0x00000000, 0x04e004d0 }, + { 0x00000c01, 0x22000060, 0x00000000, 0x04d004c8 }, + { 0x00000c01, 0x22040060, 0x00000000, 0x04e004d8 }, + { 0x00000801, 0x22080060, 0x00000000, 0x04f004e8 }, + { 0x00800040, 0x24003dac, 0x00b104c0, 0x02000200 }, + { 0x00800048, 0x24003dac, 0x00b104e0, 0xfffbfffb }, + { 0x00800048, 0x24003dac, 0x01ed9800, 0x00140014 }, + { 0x00010001, 0x220c0168, 0x00000000, 0x05400540 }, + { 0x00110001, 0x220c0168, 0x00000000, 0x04c004c0 }, + { 0x00800048, 0x24003dac, 0x01e98000, 0xfffbfffb }, + { 0x00800048, 0x24003dac, 0x01e98020, 0x00010001 }, + { 0x00800048, 0x24003dac, 0x01e98800, 0x00140014 }, + { 0x8080000c, 0xd8003d91, 0x00b10400, 0x000a000a }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000060 }, + { 0x01000010, 0x20003db0, 0x00000444, 0x00000000 }, + { 0x01000010, 0x20003db0, 0x02000446, 0x00020002 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000024 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x00000022 }, + { 0x00400040, 0x22003d28, 0x0069044c, 0xfffefffe }, + { 0x03400010, 0x20003dac, 0x00000446, 0x00020002 }, + { 0x01000010, 0x20003db0, 0x02000444, 0x00020002 }, + { 0x00410040, 0x22002d08, 0x00690200, 0x00100010 }, + { 0x01000010, 0x20003dac, 0x00000446, 0x00000000 }, + { 0x00010001, 0x220e0168, 0x02000000, 0x05400540 }, + { 0x00110001, 0x220e0168, 0x02000000, 0x04c004c0 }, + { 0x00800040, 0x24003e2c, 0x01e98000, 0x00100010 }, + { 0x00800048, 0x24003e2c, 0x01e98001, 0xfffbfffb }, + { 0x00800048, 0x24003e2c, 0x01e98002, 0x00140014 }, + { 0x00800048, 0x24003e2c, 0x01e98003, 0x00140014 }, + { 0x00800048, 0x24003e2c, 0x01e98004, 0xfffbfffb }, + { 0x00800048, 0x24003e2c, 0x01e98005, 0x00010001 }, + { 0x8080000c, 0xdc003d91, 0x00b10400, 0x00050005 }, + { 0x00110220, 0x34001c00, 0x02001400, 0x00000004 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x00000036 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000036 }, + { 0x01000010, 0x20003db0, 0x00000446, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000024 }, + { 0x03600010, 0x20003dac, 0x02000444, 0x00020002 }, + { 0x00400401, 0x22000128, 0x0069044c, 0x00000000 }, + { 0x00400840, 0x22083d2c, 0x0069044c, 0x00100010 }, + { 0x00610040, 0x22002d08, 0x02690200, 0x00010001 }, + { 0x01000010, 0x20003dac, 0x00000444, 0x00000000 }, + { 0x01000010, 0x20003db0, 0x02000446, 0x00020002 }, + { 0x00800040, 0x24003e2c, 0x01e983e0, 0x00100010 }, + { 0x00800048, 0x24003e2c, 0x01e98000, 0x00140014 }, + { 0x00800048, 0x24003e2c, 0x01e98020, 0xfffbfffb }, + { 0x00800048, 0x24003e2c, 0x01e993e0, 0xfffbfffb }, + { 0x00800048, 0x24003e2c, 0x01e99000, 0x00140014 }, + { 0x00800048, 0x24003e2c, 0x01e99020, 0x00010001 }, + { 0x00000001, 0x220e0168, 0x00000000, 0x05400540 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x00000002 }, + { 0x00110001, 0x220e0168, 0x02000000, 0x04c004c0 }, + { 0x8080000c, 0xdc003d91, 0x00b10400, 0x00050005 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x0000000e }, + { 0x00010220, 0x34001c00, 0x02001400, 0x0000000e }, + { 0x00400001, 0x22000128, 0x0069044c, 0x00000000 }, + { 0x01400010, 0x20003dac, 0x00000444, 0x00030003 }, + { 0x01400010, 0x20003dac, 0x02000446, 0x00030003 }, + { 0x00410040, 0x22002d08, 0x00690200, 0x00010001 }, + { 0x00410040, 0x22002d08, 0x02690200, 0x00100010 }, + { 0x00800001, 0x25400229, 0x01e98000, 0x00000000 }, + { 0x80800042, 0x45404631, 0x00d20540, 0x00d204c0 }, + { 0x00000001, 0x220c0128, 0x00000454, 0x00000000 }, + { 0x00400001, 0xd8000231, 0x008a0540, 0x00000000 }, + { 0x00400001, 0xd8100231, 0x008a0548, 0x00000000 }, + { 0x00400001, 0xd8200231, 0x008a0550, 0x00000000 }, + { 0x00400001, 0xd8300231, 0x008a0558, 0x00000000 }, + { 0x00600001, 0x220001ac, 0x008d0024, 0x00000000 }, + { 0x00200040, 0x244c3dad, 0x00450448, 0xfff8fff8 }, + { 0x00000401, 0x220001ec, 0x00000000, 0x07000700 }, + { 0x00000801, 0x220e0128, 0x00000456, 0x00000000 }, + { 0x00000441, 0x254635ad, 0x00000448, 0x0000044a }, + { 0x00000c41, 0x254025ad, 0x0000444c, 0x0000444e }, + { 0x00000c41, 0x254225ad, 0x00000448, 0x0000444e }, + { 0x00000841, 0x254435ad, 0x0000444c, 0x0000044a }, + { 0x00600041, 0x24002628, 0x00898000, 0x00000540 }, + { 0x00600048, 0x24002628, 0x00898002, 0x00000542 }, + { 0x00600048, 0x24002628, 0x00898008, 0x00000544 }, + { 0x00600048, 0x2540262d, 0x0089800a, 0x00000546 }, + { 0x00400401, 0xbc0001a9, 0x00690540, 0x00000000 }, + { 0x00400801, 0xbc1001a9, 0x00690548, 0x00000000 }, + { 0x01000010, 0x20003d2c, 0x00000022, 0x00030003 }, + { 0x01000040, 0x20223d29, 0x02000022, 0xffffffff }, + { 0x00000040, 0x220c3d8c, 0x0000020c, 0x00080008 }, + { 0x00110040, 0x24540c21, 0x00000454, 0x00080008 }, + { 0x00010040, 0x24540c21, 0x00000454, 0x00180038 }, + { 0x00110220, 0x34001c00, 0x02001400, 0xfffffee4 }, + { 0x01800010, 0x20003dac, 0x0200010e, 0x00010001 }, + { 0x00000040, 0x220c3d8c, 0x0000020c, 0xffe0ffe0 }, + { 0x00010001, 0x24540061, 0x02000000, 0x06c00640 }, + { 0x00110001, 0x24540061, 0x02000000, 0x04800780 }, + { 0x00000001, 0x220e0128, 0x00000456, 0x00000000 }, + { 0x00800040, 0x24003dac, 0x00b19c00, 0x00200020 }, + { 0x00800040, 0x24203dac, 0x00b19c20, 0x00200020 }, + { 0x8080000c, 0xdc003d91, 0x00b10400, 0x00060006 }, + { 0x8080000c, 0xdc203d91, 0x00b10420, 0x00060006 }, + { 0x02000040, 0x210e3d29, 0x0200010e, 0xffffffff }, + { 0x00000040, 0x220c3d8c, 0x0000020c, 0x00040004 }, + { 0x00110220, 0x34001c00, 0x02001400, 0xfffffcdc }, + { 0x01000005, 0x25643e2d, 0x00000060, 0x00c000c0 }, + { 0x01000010, 0x20003dac, 0x02000458, 0x00020002 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x00000016 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x0000000c }, + { 0x01000010, 0x20003dac, 0x00000458, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000086 }, + { 0x00a02001, 0x46400231, 0x00d20780, 0x00000000 }, + { 0x00a02001, 0x46800231, 0x00d207c0, 0x00000000 }, + { 0x00a02001, 0x46c00231, 0x00d20480, 0x00000000 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x0000007e }, + { 0x80a02042, 0x46404631, 0x00d20640, 0x00d20780 }, + { 0x80a02042, 0x46804631, 0x00d20680, 0x00d207c0 }, + { 0x80a02042, 0x46c04631, 0x00d206c0, 0x00d20480 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000076 }, + { 0x01000010, 0x20003dac, 0x02000564, 0x00800080 }, + { 0x00110220, 0x34001c00, 0x02001400, 0x0000000e }, + { 0x01000010, 0x20003dac, 0x00000458, 0x00020002 }, + { 0x00110220, 0x34001c00, 0x00001400, 0xffffffe4 }, + { 0x00200401, 0x256801ed, 0x00000000, 0x00200020 }, + { 0x00200801, 0x256c01ed, 0x00000000, 0x00060006 }, + { 0x00400001, 0x258001ed, 0x00000000, 0x00000000 }, + { 0x00600001, 0x45a001ad, 0x00058c00, 0x00000000 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000028 }, + { 0x02600005, 0x20006e28, 0x02008c0c, 0x88848421 }, + { 0x0220000c, 0x25663dad, 0x00000458, 0x00010001 }, + { 0x0000000c, 0x25643dad, 0x00000564, 0x00060006 }, + { 0x00310001, 0x25c401ad, 0x00000458, 0x00000000 }, + { 0x00210001, 0x25c00061, 0x00000000, 0x00010001 }, + { 0x00310040, 0x25c03dad, 0x004545c4, 0x00010001 }, + { 0x00610001, 0x25a00061, 0x02000000, 0x00000080 }, + { 0x00710001, 0x45a002ad, 0x02ae8c00, 0x00000000 }, + { 0x00710001, 0x45a202ad, 0x02ae8c01, 0x00000000 }, + { 0x00800041, 0x25a035ad, 0x00b105a0, 0x000905c0 }, + { 0x01200010, 0x20003e2c, 0x0245006e, 0x00000000 }, + { 0x00310009, 0x244c45ad, 0x02000564, 0x0045006e }, + { 0x00210001, 0x244c01ed, 0x02000000, 0x00000000 }, + { 0x0031000c, 0x244c3dad, 0x0245044c, 0x00010001 }, + { 0x00200009, 0x256835ad, 0x0045044c, 0x00000566 }, + { 0x00210040, 0x256835ad, 0x02450568, 0x00000566 }, + { 0x00200040, 0x256c362d, 0x0045006e, 0x00000566 }, + { 0x00400040, 0x240035ac, 0x00ab05a2, 0x00ab05a6 }, + { 0x00400040, 0x2400358c, 0x00690400, 0x00000566 }, + { 0x0040000c, 0x2580358d, 0x00690400, 0x00000566 }, + { 0x00800041, 0x2400362c, 0x00d20640, 0x000005a0 }, + { 0x00800041, 0x2420362c, 0x00d20660, 0x000005a0 }, + { 0x00800048, 0x2400362c, 0x00d20780, 0x000005a4 }, + { 0x00800048, 0x2420362c, 0x00d207a0, 0x000005a4 }, + { 0x00800040, 0x2400358c, 0x00b10400, 0x00000568 }, + { 0x00800040, 0x2420358c, 0x00b10420, 0x00000568 }, + { 0x0080000c, 0x24c0358d, 0x00b10400, 0x0000056c }, + { 0x0080000c, 0x24e0358d, 0x00b10420, 0x0000056c }, + { 0x80800040, 0x464035b1, 0x00b104c0, 0x00000580 }, + { 0x80800040, 0x466035b1, 0x00b104e0, 0x00000580 }, + { 0x00800041, 0x2400362c, 0x00d20680, 0x000005a0 }, + { 0x00800041, 0x2420362c, 0x00d206a0, 0x000005a0 }, + { 0x00800048, 0x2400362c, 0x00d207c0, 0x000005a4 }, + { 0x00800048, 0x2420362c, 0x00d207e0, 0x000005a4 }, + { 0x00800040, 0x2400358c, 0x00b10400, 0x00000568 }, + { 0x00800040, 0x2420358c, 0x00b10420, 0x00000568 }, + { 0x0080000c, 0x24c0358d, 0x00b10400, 0x0000056c }, + { 0x0080000c, 0x24e0358d, 0x00b10420, 0x0000056c }, + { 0x80800040, 0x468035b1, 0x00b104c0, 0x00000580 }, + { 0x80800040, 0x46a035b1, 0x00b104e0, 0x00000580 }, + { 0x00800041, 0x2400362c, 0x00d206c0, 0x000705a8 }, + { 0x00800041, 0x2420362c, 0x00d206e0, 0x000705a8 }, + { 0x00800048, 0x2400362c, 0x00d20480, 0x000705ac }, + { 0x00800048, 0x2420362c, 0x00d204a0, 0x000705ac }, + { 0x00800040, 0x2400358c, 0x00b10400, 0x0000056a }, + { 0x00800040, 0x2420358c, 0x00b10420, 0x0000056a }, + { 0x0080000c, 0x24c0358d, 0x00b10400, 0x0000056e }, + { 0x0080000c, 0x24e0358d, 0x00b10420, 0x0000056e }, + { 0x80800040, 0x46c035b1, 0x00b104c0, 0x00050582 }, + { 0x80800040, 0x46e035b1, 0x00b104e0, 0x00050582 }, + { 0x01800005, 0x20003d2c, 0x02000020, 0x00020002 }, + { 0x80800040, 0xd00045b1, 0x00b19000, 0x00d20640 }, + { 0x80800040, 0xd02045b1, 0x00b19020, 0x00d20660 }, + { 0x80800040, 0xd04045b1, 0x00b19040, 0x00d20680 }, + { 0x80800040, 0xd06045b1, 0x00b19060, 0x00d206a0 }, + { 0x00000040, 0x22083d8c, 0x00000208, 0x00800080 }, + { 0x80400040, 0xd40045b1, 0x00699400, 0x00ab06c0 }, + { 0x80400040, 0xd48045b1, 0x00699480, 0x00ab06c2 }, + { 0x80400040, 0xd42045b1, 0x00699420, 0x00ab06e0 }, + { 0x80400040, 0xd4a045b1, 0x006994a0, 0x00ab06e2 }, + { 0x80400040, 0xd41045b1, 0x00699410, 0x00ab06d0 }, + { 0x80400040, 0xd49045b1, 0x00699490, 0x00ab06d2 }, + { 0x80400040, 0xd43045b1, 0x00699430, 0x00ab06f0 }, + { 0x80400040, 0xd4b045b1, 0x006994b0, 0x00ab06f2 }, + { 0x00000040, 0x220a3d8c, 0x0000020a, 0x00080008 }, + { 0x00110040, 0x220a3d8c, 0x0200020a, 0x00300030 }, + { 0x01000010, 0x20003d2c, 0x02000020, 0x00060006 }, + { 0x00000040, 0x20203d29, 0x00000020, 0x00020002 }, + { 0x00000040, 0x22040c00, 0x00000204, 0x00100001 }, + { 0x00000040, 0x220c358c, 0x0000020c, 0x0000003a }, + { 0x00110220, 0x34001c00, 0x02001400, 0xfffffc1a }, + { 0x00000001, 0x220001ec, 0x00000000, 0x01400140 }, + { 0x00000001, 0x220201ec, 0x00000000, 0x01c001c0 }, + { 0x00800401, 0x20400236, 0x01ee8000, 0x00000000 }, + { 0x00800801, 0x20500236, 0x01ee8010, 0x00000000 }, + { 0x00800401, 0x20600236, 0x01ee8020, 0x00000000 }, + { 0x00800801, 0x20700236, 0x01ee8030, 0x00000000 }, + { 0x00800401, 0x20800236, 0x01ee8040, 0x00000000 }, + { 0x00800801, 0x20900236, 0x01ee8050, 0x00000000 }, + { 0x00800401, 0x20a00236, 0x01ee8060, 0x00000000 }, + { 0x00800801, 0x20b00236, 0x01ee8070, 0x00000000 }, + { 0x00800401, 0x20c00236, 0x01ee8100, 0x00000000 }, + { 0x00800801, 0x20d00236, 0x01ee8110, 0x00000000 }, + { 0x00800401, 0x20e00236, 0x01ee8120, 0x00000000 }, + { 0x00800801, 0x20f00236, 0x01ee8130, 0x00000000 }, + { 0x00800401, 0x21000236, 0x01ee8140, 0x00000000 }, + { 0x00800801, 0x21100236, 0x01ee8150, 0x00000000 }, + { 0x00800401, 0x21200236, 0x01ee8160, 0x00000000 }, + { 0x00800801, 0x21300236, 0x01ee8170, 0x00000000 }, + { 0x00000040, 0x22000d20, 0x00000062, 0x1218a000 }, + { 0x00200401, 0x204001a5, 0x00450064, 0x00000000 }, + { 0x00000801, 0x20480061, 0x00000000, 0x000f000f }, + { 0x01600031, 0x21400021, 0x508d0040, 0x00000200 }, + { 0x00000001, 0x220001ec, 0x00000000, 0x03400340 }, + { 0x00800401, 0x41600236, 0x00d28000, 0x00000000 }, + { 0x00800801, 0x41610236, 0x00d28080, 0x00000000 }, + { 0x00800401, 0x41800236, 0x00d28020, 0x00000000 }, + { 0x00800801, 0x41810236, 0x00d280a0, 0x00000000 }, + { 0x00800401, 0x41a00236, 0x00d28040, 0x00000000 }, + { 0x00800801, 0x41a10236, 0x00d280c0, 0x00000000 }, + { 0x00800401, 0x41c00236, 0x00d28060, 0x00000000 }, + { 0x00800801, 0x41c10236, 0x00d280e0, 0x00000000 }, + { 0x00000040, 0x22000d20, 0x00000062, 0x0a18a001 }, + { 0x0000040c, 0x20443ca5, 0x00000044, 0x00010001 }, + { 0x00000801, 0x20480061, 0x00000000, 0x0007000f }, + { 0x0a600031, 0x21600021, 0x508d0040, 0x00000200 }, + { 0x00000001, 0x21400021, 0x00000140, 0x00000000 }, + { 0x00000001, 0x21600021, 0x00000160, 0x00000000 }, + { 0x01600031, 0x20001c20, 0x708d0000, 0x82000010 }, + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x01000005, 0x20602d29, 0x02000042, 0x00070007 }, + { 0x01000005, 0x20422d29, 0x00000042, 0xfff8fff8 }, + { 0x00000001, 0x202001e9, 0x00000000, 0x100c100c }, + { 0x00600001, 0x27e00021, 0x008d0000, 0x00000000 }, + { 0x00000009, 0x27e82d21, 0x00000040, 0x00060006 }, + { 0x00600001, 0x20a00022, 0x008d0000, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000100 }, + { 0x00600001, 0x20200022, 0x008d07e0, 0x00000000 }, + { 0x01800031, 0x20801d09, 0x408d0000, 0x02488400 }, + { 0x00600001, 0x20400022, 0x008d07e0, 0x00000000 }, + { 0x00000040, 0x20480c22, 0x000007e8, 0x00000080 }, + { 0x02800031, 0x21001d09, 0x408d0000, 0x02488400 }, + { 0x00600001, 0x20600022, 0x008d07e0, 0x00000000 }, + { 0x00000040, 0x20680c22, 0x000007e8, 0x00000100 }, + { 0x03800031, 0x21801d09, 0x408d0000, 0x02488400 }, + { 0x00600001, 0x20800022, 0x008d07e0, 0x00000000 }, + { 0x00000040, 0x20880c22, 0x000007e8, 0x00000180 }, + { 0x04800031, 0x22001d09, 0x408d0000, 0x02488400 }, + { 0x02600005, 0x20000c20, 0x02000090, 0x00002000 }, + { 0x00000006, 0x20880c21, 0x00000088, 0x00200000 }, + { 0x00200009, 0x20845529, 0x0000009c, 0x00450020 }, + { 0x00200001, 0x40840231, 0x00450094, 0x00000000 }, + { 0x00310001, 0x20840229, 0x02450094, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x0000000c }, + { 0x00800041, 0x24002628, 0x00000095, 0x00000044 }, + { 0x00800040, 0x24004508, 0x008d0400, 0x00000094 }, + { 0x00000009, 0x20a82d02, 0x00000404, 0x00060006 }, + { 0x00802001, 0x20c00022, 0x008d0080, 0x00000000 }, + { 0x00802001, 0x20800061, 0x00000000, 0x00000000 }, + { 0x05800031, 0x20001d0c, 0x508d0000, 0x06080300 }, + { 0x02600005, 0x20000c20, 0x020000d0, 0x00002000 }, + { 0x00000006, 0x20c80c21, 0x000000c8, 0x00200000 }, + { 0x00200009, 0x20c45529, 0x000000dc, 0x00450020 }, + { 0x00200001, 0x40c40231, 0x004500d4, 0x00000000 }, + { 0x00310001, 0x20c40229, 0x024500d4, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x0000000c }, + { 0x00800041, 0x24002628, 0x000000d5, 0x00000044 }, + { 0x00800040, 0x24004508, 0x008d0400, 0x000000d4 }, + { 0x00000009, 0x20a82d02, 0x00000404, 0x00060006 }, + { 0x00802001, 0x20c00022, 0x008d00c0, 0x00000000 }, + { 0x00802001, 0x20c00061, 0x00000000, 0x00000000 }, + { 0x05800031, 0x20001d0c, 0x508d0000, 0x06080300 }, + { 0x02600005, 0x20000c20, 0x02000110, 0x00002000 }, + { 0x00000006, 0x21080c21, 0x00000108, 0x00200000 }, + { 0x00200009, 0x21045529, 0x0000011c, 0x00450020 }, + { 0x00200001, 0x41040231, 0x00450114, 0x00000000 }, + { 0x00310001, 0x21040229, 0x02450114, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x0000000c }, + { 0x00800041, 0x24002628, 0x00000115, 0x00000044 }, + { 0x00800040, 0x24004508, 0x008d0400, 0x00000114 }, + { 0x00000009, 0x20a82d02, 0x00000404, 0x00060006 }, + { 0x00802001, 0x20c00022, 0x008d0100, 0x00000000 }, + { 0x00802001, 0x21000061, 0x00000000, 0x00000000 }, + { 0x05800031, 0x20001d0c, 0x508d0000, 0x06080300 }, + { 0x02600005, 0x20000c20, 0x02000150, 0x00002000 }, + { 0x00000006, 0x21480c21, 0x00000148, 0x00200000 }, + { 0x00200009, 0x21445529, 0x0000015c, 0x00450020 }, + { 0x00200001, 0x41440231, 0x00450154, 0x00000000 }, + { 0x00310001, 0x21440229, 0x02450154, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x0000000c }, + { 0x00800041, 0x24002628, 0x00000155, 0x00000044 }, + { 0x00800040, 0x24004508, 0x008d0400, 0x00000154 }, + { 0x00000009, 0x20a82d02, 0x00000404, 0x00060006 }, + { 0x00802001, 0x20c00022, 0x008d0140, 0x00000000 }, + { 0x00802001, 0x21400061, 0x00000000, 0x00000000 }, + { 0x05800031, 0x20001d0c, 0x508d0000, 0x06080300 }, + { 0x02600005, 0x20000c20, 0x02000190, 0x00002000 }, + { 0x00000006, 0x21880c21, 0x00000188, 0x00200000 }, + { 0x00200009, 0x21845529, 0x0000019c, 0x00450020 }, + { 0x00200001, 0x41840231, 0x00450194, 0x00000000 }, + { 0x00310001, 0x21840229, 0x02450194, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x0000000c }, + { 0x00800041, 0x24002628, 0x00000195, 0x00000044 }, + { 0x00800040, 0x24004508, 0x008d0400, 0x00000194 }, + { 0x00000009, 0x20a82d02, 0x00000404, 0x00060006 }, + { 0x00802001, 0x20c00022, 0x008d0180, 0x00000000 }, + { 0x00802001, 0x21800061, 0x00000000, 0x00000000 }, + { 0x05800031, 0x20001d0c, 0x508d0000, 0x06080300 }, + { 0x02600005, 0x20000c20, 0x020001d0, 0x00002000 }, + { 0x00000006, 0x21c80c21, 0x000001c8, 0x00200000 }, + { 0x00200009, 0x21c45529, 0x000001dc, 0x00450020 }, + { 0x00200001, 0x41c40231, 0x004501d4, 0x00000000 }, + { 0x00310001, 0x21c40229, 0x024501d4, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x0000000c }, + { 0x00800041, 0x24002628, 0x000001d5, 0x00000044 }, + { 0x00800040, 0x24004508, 0x008d0400, 0x000001d4 }, + { 0x00000009, 0x20a82d02, 0x00000404, 0x00060006 }, + { 0x00802001, 0x20c00022, 0x008d01c0, 0x00000000 }, + { 0x00802001, 0x21c00061, 0x00000000, 0x00000000 }, + { 0x05800031, 0x20001d0c, 0x508d0000, 0x06080300 }, + { 0x02600005, 0x20000c20, 0x02000210, 0x00002000 }, + { 0x00000006, 0x22080c21, 0x00000208, 0x00200000 }, + { 0x00200009, 0x22045529, 0x0000021c, 0x00450020 }, + { 0x00200001, 0x42040231, 0x00450214, 0x00000000 }, + { 0x00310001, 0x22040229, 0x02450214, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x0000000c }, + { 0x00800041, 0x24002628, 0x00000215, 0x00000044 }, + { 0x00800040, 0x24004508, 0x008d0400, 0x00000214 }, + { 0x00000009, 0x20a82d02, 0x00000404, 0x00060006 }, + { 0x00802001, 0x20c00022, 0x008d0200, 0x00000000 }, + { 0x00802001, 0x22000061, 0x00000000, 0x00000000 }, + { 0x05800031, 0x20001d0c, 0x508d0000, 0x06080300 }, + { 0x02600005, 0x20000c20, 0x02000250, 0x00002000 }, + { 0x00000006, 0x22480c21, 0x00000248, 0x00200000 }, + { 0x00200009, 0x22445529, 0x0000025c, 0x00450020 }, + { 0x00200001, 0x42440231, 0x00450254, 0x00000000 }, + { 0x00310001, 0x22440229, 0x02450254, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x0000000c }, + { 0x00800041, 0x24002628, 0x00000255, 0x00000044 }, + { 0x00800040, 0x24004508, 0x008d0400, 0x00000254 }, + { 0x00000009, 0x20a82d02, 0x00000404, 0x00060006 }, + { 0x00802001, 0x20c00022, 0x008d0240, 0x00000000 }, + { 0x00802001, 0x22400061, 0x00000000, 0x00000000 }, + { 0x05800031, 0x20001d0c, 0x508d0000, 0x06080300 }, + { 0x01000040, 0x20423dad, 0x00000042, 0xfff8fff8 }, + { 0x00600001, 0x21600022, 0x008d07e0, 0x00000000 }, + { 0x00802001, 0x21800022, 0x008d0080, 0x00000000 }, + { 0x00802001, 0x21c00022, 0x008d00c0, 0x00000000 }, + { 0x0b800031, 0x20001d0c, 0x508d0000, 0x0a080400 }, + { 0x00600001, 0x20200022, 0x008d07e0, 0x00000000 }, + { 0x00000040, 0x20280c22, 0x000007e8, 0x00000080 }, + { 0x00802001, 0x20400022, 0x008d0100, 0x00000000 }, + { 0x00802001, 0x20800022, 0x008d0140, 0x00000000 }, + { 0x01800031, 0x20001d0c, 0x508d0000, 0x0a080400 }, + { 0x00000040, 0x21680c22, 0x000007e8, 0x00000100 }, + { 0x00802001, 0x21800022, 0x008d0180, 0x00000000 }, + { 0x00802001, 0x21c00022, 0x008d01c0, 0x00000000 }, + { 0x0b800031, 0x20001d0c, 0x508d0000, 0x0a080400 }, + { 0x00000040, 0x20280c22, 0x000007e8, 0x00000180 }, + { 0x00802001, 0x20400022, 0x008d0200, 0x00000000 }, + { 0x00802001, 0x20800022, 0x008d0240, 0x00000000 }, + { 0x01800031, 0x20001d0c, 0x508d0000, 0x0a080400 }, + { 0x00000040, 0x27e80c21, 0x000007e8, 0x00000200 }, + { 0x01000010, 0x20002da0, 0x02000060, 0x00000000 }, + { 0x00110220, 0x34001c00, 0x00001400, 0xffffff00 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x00000040 }, + { 0x00600001, 0x20200022, 0x008d07e0, 0x00000000 }, + { 0x01800031, 0x20801d09, 0x408d0000, 0x02488400 }, + { 0x00600001, 0x20400022, 0x008d07e0, 0x00000000 }, + { 0x00000040, 0x20480c22, 0x000007e8, 0x00000080 }, + { 0x02800031, 0x21001d09, 0x408d0000, 0x02488400 }, + { 0x00600001, 0x20600022, 0x008d07e0, 0x00000000 }, + { 0x00000040, 0x20680c22, 0x000007e8, 0x00000100 }, + { 0x03800031, 0x21801d09, 0x408d0000, 0x02488400 }, + { 0x00600001, 0x20800022, 0x008d07e0, 0x00000000 }, + { 0x00000040, 0x20880c22, 0x000007e8, 0x00000180 }, + { 0x04800031, 0x22001d09, 0x408d0000, 0x02488400 }, + { 0x00000001, 0x220400e0, 0x00000000, 0x00a00080 }, + { 0x00600001, 0x20a00022, 0x008d0000, 0x00000000 }, + { 0x02600005, 0x20000c20, 0x02008810, 0x00002000 }, + { 0x01000040, 0x20603dad, 0x00000060, 0xffffffff }, + { 0x00000006, 0xa8080c21, 0x00008808, 0x00200000 }, + { 0x00200009, 0xa8045529, 0x0000881c, 0x00450020 }, + { 0x00200001, 0xc8040231, 0x00458814, 0x00000000 }, + { 0x00310001, 0xa8040229, 0x02458814, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x0000000c }, + { 0x00800041, 0x24002628, 0x00008815, 0x00000044 }, + { 0x00800040, 0x24004508, 0x008d0400, 0x00008814 }, + { 0x00000009, 0x20a82d02, 0x00000404, 0x00060006 }, + { 0x00802001, 0x20c00022, 0x008d8800, 0x00000000 }, + { 0x00802001, 0xa8000061, 0x00000000, 0x00000000 }, + { 0x05800031, 0x20001d0c, 0x508d0000, 0x06080300 }, + { 0x00600001, 0x21600022, 0x008d07e0, 0x00000000 }, + { 0x00802001, 0x21800022, 0x008d8800, 0x00000000 }, + { 0x0b800031, 0x20001d0c, 0x508d0000, 0x06080300 }, + { 0x00000040, 0x27e80c21, 0x000007e8, 0x00000040 }, + { 0x00000040, 0x22040c00, 0x00000204, 0x00400040 }, + { 0x00110220, 0x34001c00, 0x00001400, 0xffffffda }, + { 0x01600031, 0x20001c20, 0x708d0000, 0x82000010 }, + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x01000005, 0x20602d29, 0x02000042, 0x00070007 }, + { 0x01000005, 0x20422d29, 0x00000042, 0xfff8fff8 }, + { 0x00600001, 0x27e00021, 0x008d0000, 0x00000000 }, + { 0x00000009, 0x27e82d21, 0x00000040, 0x00060006 }, + { 0x00600001, 0x20a00022, 0x008d0000, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000260 }, + { 0x00600001, 0x20200022, 0x008d07e0, 0x00000000 }, + { 0x01800031, 0x20801d09, 0x408d0000, 0x02488400 }, + { 0x00600001, 0x20400022, 0x008d07e0, 0x00000000 }, + { 0x00000040, 0x20480c22, 0x000007e8, 0x00000080 }, + { 0x02800031, 0x21001d09, 0x408d0000, 0x02488400 }, + { 0x00600001, 0x20600022, 0x008d07e0, 0x00000000 }, + { 0x00000040, 0x20680c22, 0x000007e8, 0x00000100 }, + { 0x03800031, 0x21801d09, 0x408d0000, 0x02488400 }, + { 0x00600001, 0x20800022, 0x008d07e0, 0x00000000 }, + { 0x00000040, 0x20880c22, 0x000007e8, 0x00000180 }, + { 0x04800031, 0x22001d09, 0x408d0000, 0x02488400 }, + { 0x00200001, 0x20640229, 0x00450094, 0x00000000 }, + { 0x02600005, 0x20000c20, 0x02000090, 0x01000000 }, + { 0x02600005, 0x20000c20, 0x00000090, 0x00004000 }, + { 0x00600041, 0x24003e2c, 0x00000095, 0x00020002 }, + { 0x00110001, 0x2066018d, 0x02000400, 0x00000000 }, + { 0x00010040, 0x20663d8d, 0x02000400, 0x00010001 }, + { 0x00110001, 0x2066022d, 0x00000095, 0x00000000 }, + { 0x02600005, 0x20000c20, 0x00000090, 0x00002000 }, + { 0x02600005, 0x20001d20, 0x02000066, 0x00000001 }, + { 0x00000006, 0x20881c21, 0x00000088, 0x00200000 }, + { 0x00200001, 0x20840129, 0x00450064, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x0000000e }, + { 0x00800041, 0x24002528, 0x00000066, 0x00000044 }, + { 0x00800040, 0x24002508, 0x008d0400, 0x00000064 }, + { 0x00000009, 0x20a82d02, 0x00000404, 0x00060006 }, + { 0x00802001, 0x20c00022, 0x008d0080, 0x00000000 }, + { 0x00802001, 0x20800061, 0x00000000, 0x00000000 }, + { 0x05800031, 0x20001d0c, 0x508d0000, 0x06080300 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x0000001e }, + { 0x02600005, 0x20000c20, 0x00000090, 0x00004000 }, + { 0x00210002, 0x20700421, 0x02450038, 0x00450030 }, + { 0x00000001, 0x20680129, 0x0000009c, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x0000000e }, + { 0x02600005, 0x20001d20, 0x0000009c, 0x00000010 }, + { 0x00210002, 0x20700421, 0x02450028, 0x00450020 }, + { 0x01600005, 0x20001d20, 0x0200009c, 0x00000001 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000006 }, + { 0x02610005, 0x20001c20, 0x02000090, 0x00008000 }, + { 0x02610005, 0x20001d20, 0x0200009c, 0x00000010 }, + { 0x00010006, 0x20681d29, 0x0200009c, 0x00000010 }, + { 0x02800005, 0x2000452c, 0x02000068, 0x000d0070 }, + { 0x00000009, 0x20843d09, 0x00000602, 0x000c000c }, + { 0x00000005, 0x20862d09, 0x00000602, 0xf000f000 }, + { 0x00200001, 0x40840231, 0x00660064, 0x00000000 }, + { 0x00200001, 0x20640229, 0x004500d4, 0x00000000 }, + { 0x02600005, 0x20000c20, 0x020000d0, 0x01000000 }, + { 0x02600005, 0x20000c20, 0x000000d0, 0x00004000 }, + { 0x00600041, 0x24003e2c, 0x000000d5, 0x00020002 }, + { 0x00110001, 0x2066018d, 0x02000400, 0x00000000 }, + { 0x00010040, 0x20663d8d, 0x02000400, 0x00010001 }, + { 0x00110001, 0x2066022d, 0x000000d5, 0x00000000 }, + { 0x02600005, 0x20000c20, 0x000000d0, 0x00002000 }, + { 0x02600005, 0x20001d20, 0x02000066, 0x00000001 }, + { 0x00000006, 0x20c81c21, 0x000000c8, 0x00200000 }, + { 0x00200001, 0x20c40129, 0x00450064, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x0000000e }, + { 0x00800041, 0x24002528, 0x00000066, 0x00000044 }, + { 0x00800040, 0x24002508, 0x008d0400, 0x00000064 }, + { 0x00000009, 0x20a82d02, 0x00000404, 0x00060006 }, + { 0x00802001, 0x20c00022, 0x008d00c0, 0x00000000 }, + { 0x00802001, 0x20c00061, 0x00000000, 0x00000000 }, + { 0x05800031, 0x20001d0c, 0x508d0000, 0x06080300 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x0000001e }, + { 0x02600005, 0x20000c20, 0x000000d0, 0x00004000 }, + { 0x00210002, 0x20700421, 0x02450038, 0x00450030 }, + { 0x00000001, 0x20680129, 0x000000dc, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x0000000e }, + { 0x02600005, 0x20001d20, 0x000000dc, 0x00000010 }, + { 0x00210002, 0x20700421, 0x02450028, 0x00450020 }, + { 0x01600005, 0x20001d20, 0x020000dc, 0x00000001 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000006 }, + { 0x02610005, 0x20001c20, 0x020000d0, 0x00008000 }, + { 0x02610005, 0x20001d20, 0x020000dc, 0x00000010 }, + { 0x00010006, 0x20681d29, 0x020000dc, 0x00000010 }, + { 0x02800005, 0x2000452c, 0x02000068, 0x000d0070 }, + { 0x00000009, 0x20c43d09, 0x00000602, 0x000c000c }, + { 0x00000005, 0x20c62d09, 0x00000602, 0xf000f000 }, + { 0x00200001, 0x40c40231, 0x00660064, 0x00000000 }, + { 0x00200001, 0x20640229, 0x00450114, 0x00000000 }, + { 0x02600005, 0x20000c20, 0x02000110, 0x01000000 }, + { 0x02600005, 0x20000c20, 0x00000110, 0x00004000 }, + { 0x00600041, 0x24003e2c, 0x00000115, 0x00020002 }, + { 0x00110001, 0x2066018d, 0x02000400, 0x00000000 }, + { 0x00010040, 0x20663d8d, 0x02000400, 0x00010001 }, + { 0x00110001, 0x2066022d, 0x00000115, 0x00000000 }, + { 0x02600005, 0x20000c20, 0x00000110, 0x00002000 }, + { 0x02600005, 0x20001d20, 0x02000066, 0x00000001 }, + { 0x00000006, 0x21081c21, 0x00000108, 0x00200000 }, + { 0x00200001, 0x21040129, 0x00450064, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x0000000e }, + { 0x00800041, 0x24002528, 0x00000066, 0x00000044 }, + { 0x00800040, 0x24002508, 0x008d0400, 0x00000064 }, + { 0x00000009, 0x20a82d02, 0x00000404, 0x00060006 }, + { 0x00802001, 0x20c00022, 0x008d0100, 0x00000000 }, + { 0x00802001, 0x21000061, 0x00000000, 0x00000000 }, + { 0x05800031, 0x20001d0c, 0x508d0000, 0x06080300 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x0000001e }, + { 0x02600005, 0x20000c20, 0x00000110, 0x00004000 }, + { 0x00210002, 0x20700421, 0x02450038, 0x00450030 }, + { 0x00000001, 0x20680129, 0x0000011c, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x0000000e }, + { 0x02600005, 0x20001d20, 0x0000011c, 0x00000010 }, + { 0x00210002, 0x20700421, 0x02450028, 0x00450020 }, + { 0x01600005, 0x20001d20, 0x0200011c, 0x00000001 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000006 }, + { 0x02610005, 0x20001c20, 0x02000110, 0x00008000 }, + { 0x02610005, 0x20001d20, 0x0200011c, 0x00000010 }, + { 0x00010006, 0x20681d29, 0x0200011c, 0x00000010 }, + { 0x02800005, 0x2000452c, 0x02000068, 0x000d0070 }, + { 0x00000009, 0x21043d09, 0x00000602, 0x000c000c }, + { 0x00000005, 0x21062d09, 0x00000602, 0xf000f000 }, + { 0x00200001, 0x41040231, 0x00660064, 0x00000000 }, + { 0x00200001, 0x20640229, 0x00450154, 0x00000000 }, + { 0x02600005, 0x20000c20, 0x02000150, 0x01000000 }, + { 0x02600005, 0x20000c20, 0x00000150, 0x00004000 }, + { 0x00600041, 0x24003e2c, 0x00000155, 0x00020002 }, + { 0x00110001, 0x2066018d, 0x02000400, 0x00000000 }, + { 0x00010040, 0x20663d8d, 0x02000400, 0x00010001 }, + { 0x00110001, 0x2066022d, 0x00000155, 0x00000000 }, + { 0x02600005, 0x20000c20, 0x00000150, 0x00002000 }, + { 0x02600005, 0x20001d20, 0x02000066, 0x00000001 }, + { 0x00000006, 0x21481c21, 0x00000148, 0x00200000 }, + { 0x00200001, 0x21440129, 0x00450064, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x0000000e }, + { 0x00800041, 0x24002528, 0x00000066, 0x00000044 }, + { 0x00800040, 0x24002508, 0x008d0400, 0x00000064 }, + { 0x00000009, 0x20a82d02, 0x00000404, 0x00060006 }, + { 0x00802001, 0x20c00022, 0x008d0140, 0x00000000 }, + { 0x00802001, 0x21400061, 0x00000000, 0x00000000 }, + { 0x05800031, 0x20001d0c, 0x508d0000, 0x06080300 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x0000001e }, + { 0x02600005, 0x20000c20, 0x00000150, 0x00004000 }, + { 0x00210002, 0x20700421, 0x02450038, 0x00450030 }, + { 0x00000001, 0x20680129, 0x0000015c, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x0000000e }, + { 0x02600005, 0x20001d20, 0x0000015c, 0x00000010 }, + { 0x00210002, 0x20700421, 0x02450028, 0x00450020 }, + { 0x01600005, 0x20001d20, 0x0200015c, 0x00000001 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000006 }, + { 0x02610005, 0x20001c20, 0x02000150, 0x00008000 }, + { 0x02610005, 0x20001d20, 0x0200015c, 0x00000010 }, + { 0x00010006, 0x20681d29, 0x0200015c, 0x00000010 }, + { 0x02800005, 0x2000452c, 0x02000068, 0x000d0070 }, + { 0x00000009, 0x21443d09, 0x00000602, 0x000c000c }, + { 0x00000005, 0x21462d09, 0x00000602, 0xf000f000 }, + { 0x00200001, 0x41440231, 0x00660064, 0x00000000 }, + { 0x00200001, 0x20640229, 0x00450194, 0x00000000 }, + { 0x02600005, 0x20000c20, 0x02000190, 0x01000000 }, + { 0x02600005, 0x20000c20, 0x00000190, 0x00004000 }, + { 0x00600041, 0x24003e2c, 0x00000195, 0x00020002 }, + { 0x00110001, 0x2066018d, 0x02000400, 0x00000000 }, + { 0x00010040, 0x20663d8d, 0x02000400, 0x00010001 }, + { 0x00110001, 0x2066022d, 0x00000195, 0x00000000 }, + { 0x02600005, 0x20000c20, 0x00000190, 0x00002000 }, + { 0x02600005, 0x20001d20, 0x02000066, 0x00000001 }, + { 0x00000006, 0x21881c21, 0x00000188, 0x00200000 }, + { 0x00200001, 0x21840129, 0x00450064, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x0000000e }, + { 0x00800041, 0x24002528, 0x00000066, 0x00000044 }, + { 0x00800040, 0x24002508, 0x008d0400, 0x00000064 }, + { 0x00000009, 0x20a82d02, 0x00000404, 0x00060006 }, + { 0x00802001, 0x20c00022, 0x008d0180, 0x00000000 }, + { 0x00802001, 0x21800061, 0x00000000, 0x00000000 }, + { 0x05800031, 0x20001d0c, 0x508d0000, 0x06080300 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x0000001e }, + { 0x02600005, 0x20000c20, 0x00000190, 0x00004000 }, + { 0x00210002, 0x20700421, 0x02450038, 0x00450030 }, + { 0x00000001, 0x20680129, 0x0000019c, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x0000000e }, + { 0x02600005, 0x20001d20, 0x0000019c, 0x00000010 }, + { 0x00210002, 0x20700421, 0x02450028, 0x00450020 }, + { 0x01600005, 0x20001d20, 0x0200019c, 0x00000001 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000006 }, + { 0x02610005, 0x20001c20, 0x02000190, 0x00008000 }, + { 0x02610005, 0x20001d20, 0x0200019c, 0x00000010 }, + { 0x00010006, 0x20681d29, 0x0200019c, 0x00000010 }, + { 0x02800005, 0x2000452c, 0x02000068, 0x000d0070 }, + { 0x00000009, 0x21843d09, 0x00000602, 0x000c000c }, + { 0x00000005, 0x21862d09, 0x00000602, 0xf000f000 }, + { 0x00200001, 0x41840231, 0x00660064, 0x00000000 }, + { 0x00200001, 0x20640229, 0x004501d4, 0x00000000 }, + { 0x02600005, 0x20000c20, 0x020001d0, 0x01000000 }, + { 0x02600005, 0x20000c20, 0x000001d0, 0x00004000 }, + { 0x00600041, 0x24003e2c, 0x000001d5, 0x00020002 }, + { 0x00110001, 0x2066018d, 0x02000400, 0x00000000 }, + { 0x00010040, 0x20663d8d, 0x02000400, 0x00010001 }, + { 0x00110001, 0x2066022d, 0x000001d5, 0x00000000 }, + { 0x02600005, 0x20000c20, 0x000001d0, 0x00002000 }, + { 0x02600005, 0x20001d20, 0x02000066, 0x00000001 }, + { 0x00000006, 0x21c81c21, 0x000001c8, 0x00200000 }, + { 0x00200001, 0x21c40129, 0x00450064, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x0000000e }, + { 0x00800041, 0x24002528, 0x00000066, 0x00000044 }, + { 0x00800040, 0x24002508, 0x008d0400, 0x00000064 }, + { 0x00000009, 0x20a82d02, 0x00000404, 0x00060006 }, + { 0x00802001, 0x20c00022, 0x008d01c0, 0x00000000 }, + { 0x00802001, 0x21c00061, 0x00000000, 0x00000000 }, + { 0x05800031, 0x20001d0c, 0x508d0000, 0x06080300 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x0000001e }, + { 0x02600005, 0x20000c20, 0x000001d0, 0x00004000 }, + { 0x00210002, 0x20700421, 0x02450038, 0x00450030 }, + { 0x00000001, 0x20680129, 0x000001dc, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x0000000e }, + { 0x02600005, 0x20001d20, 0x000001dc, 0x00000010 }, + { 0x00210002, 0x20700421, 0x02450028, 0x00450020 }, + { 0x01600005, 0x20001d20, 0x020001dc, 0x00000001 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000006 }, + { 0x02610005, 0x20001c20, 0x020001d0, 0x00008000 }, + { 0x02610005, 0x20001d20, 0x020001dc, 0x00000010 }, + { 0x00010006, 0x20681d29, 0x020001dc, 0x00000010 }, + { 0x02800005, 0x2000452c, 0x02000068, 0x000d0070 }, + { 0x00000009, 0x21c43d09, 0x00000602, 0x000c000c }, + { 0x00000005, 0x21c62d09, 0x00000602, 0xf000f000 }, + { 0x00200001, 0x41c40231, 0x00660064, 0x00000000 }, + { 0x00200001, 0x20640229, 0x00450214, 0x00000000 }, + { 0x02600005, 0x20000c20, 0x02000210, 0x01000000 }, + { 0x02600005, 0x20000c20, 0x00000210, 0x00004000 }, + { 0x00600041, 0x24003e2c, 0x00000215, 0x00020002 }, + { 0x00110001, 0x2066018d, 0x02000400, 0x00000000 }, + { 0x00010040, 0x20663d8d, 0x02000400, 0x00010001 }, + { 0x00110001, 0x2066022d, 0x00000215, 0x00000000 }, + { 0x02600005, 0x20000c20, 0x00000210, 0x00002000 }, + { 0x02600005, 0x20001d20, 0x02000066, 0x00000001 }, + { 0x00000006, 0x22081c21, 0x00000208, 0x00200000 }, + { 0x00200001, 0x22040129, 0x00450064, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x0000000e }, + { 0x00800041, 0x24002528, 0x00000066, 0x00000044 }, + { 0x00800040, 0x24002508, 0x008d0400, 0x00000064 }, + { 0x00000009, 0x20a82d02, 0x00000404, 0x00060006 }, + { 0x00802001, 0x20c00022, 0x008d0200, 0x00000000 }, + { 0x00802001, 0x22000061, 0x00000000, 0x00000000 }, + { 0x05800031, 0x20001d0c, 0x508d0000, 0x06080300 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x0000001e }, + { 0x02600005, 0x20000c20, 0x00000210, 0x00004000 }, + { 0x00210002, 0x20700421, 0x02450038, 0x00450030 }, + { 0x00000001, 0x20680129, 0x0000021c, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x0000000e }, + { 0x02600005, 0x20001d20, 0x0000021c, 0x00000010 }, + { 0x00210002, 0x20700421, 0x02450028, 0x00450020 }, + { 0x01600005, 0x20001d20, 0x0200021c, 0x00000001 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000006 }, + { 0x02610005, 0x20001c20, 0x02000210, 0x00008000 }, + { 0x02610005, 0x20001d20, 0x0200021c, 0x00000010 }, + { 0x00010006, 0x20681d29, 0x0200021c, 0x00000010 }, + { 0x02800005, 0x2000452c, 0x02000068, 0x000d0070 }, + { 0x00000009, 0x22043d09, 0x00000602, 0x000c000c }, + { 0x00000005, 0x22062d09, 0x00000602, 0xf000f000 }, + { 0x00200001, 0x42040231, 0x00660064, 0x00000000 }, + { 0x00200001, 0x20640229, 0x00450254, 0x00000000 }, + { 0x02600005, 0x20000c20, 0x02000250, 0x01000000 }, + { 0x02600005, 0x20000c20, 0x00000250, 0x00004000 }, + { 0x00600041, 0x24003e2c, 0x00000255, 0x00020002 }, + { 0x00110001, 0x2066018d, 0x02000400, 0x00000000 }, + { 0x00010040, 0x20663d8d, 0x02000400, 0x00010001 }, + { 0x00110001, 0x2066022d, 0x00000255, 0x00000000 }, + { 0x02600005, 0x20000c20, 0x00000250, 0x00002000 }, + { 0x02600005, 0x20001d20, 0x02000066, 0x00000001 }, + { 0x00000006, 0x22481c21, 0x00000248, 0x00200000 }, + { 0x00200001, 0x22440129, 0x00450064, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x0000000e }, + { 0x00800041, 0x24002528, 0x00000066, 0x00000044 }, + { 0x00800040, 0x24002508, 0x008d0400, 0x00000064 }, + { 0x00000009, 0x20a82d02, 0x00000404, 0x00060006 }, + { 0x00802001, 0x20c00022, 0x008d0240, 0x00000000 }, + { 0x00802001, 0x22400061, 0x00000000, 0x00000000 }, + { 0x05800031, 0x20001d0c, 0x508d0000, 0x06080300 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x0000001e }, + { 0x02600005, 0x20000c20, 0x00000250, 0x00004000 }, + { 0x00210002, 0x20700421, 0x02450038, 0x00450030 }, + { 0x00000001, 0x20680129, 0x0000025c, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x0000000e }, + { 0x02600005, 0x20001d20, 0x0000025c, 0x00000010 }, + { 0x00210002, 0x20700421, 0x02450028, 0x00450020 }, + { 0x01600005, 0x20001d20, 0x0200025c, 0x00000001 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000006 }, + { 0x02610005, 0x20001c20, 0x02000250, 0x00008000 }, + { 0x02610005, 0x20001d20, 0x0200025c, 0x00000010 }, + { 0x00010006, 0x20681d29, 0x0200025c, 0x00000010 }, + { 0x02800005, 0x2000452c, 0x02000068, 0x000d0070 }, + { 0x00000009, 0x22443d09, 0x00000602, 0x000c000c }, + { 0x00000005, 0x22462d09, 0x00000602, 0xf000f000 }, + { 0x00200001, 0x42440231, 0x00660064, 0x00000000 }, + { 0x01000040, 0x20423dad, 0x00000042, 0xfff8fff8 }, + { 0x00600001, 0x21600022, 0x008d07e0, 0x00000000 }, + { 0x00802001, 0x21800022, 0x008d0080, 0x00000000 }, + { 0x00802001, 0x21c00022, 0x008d00c0, 0x00000000 }, + { 0x0b800031, 0x20001d0c, 0x508d0000, 0x0a080400 }, + { 0x00600001, 0x20200022, 0x008d07e0, 0x00000000 }, + { 0x00000040, 0x20280c22, 0x000007e8, 0x00000080 }, + { 0x00802001, 0x20400022, 0x008d0100, 0x00000000 }, + { 0x00802001, 0x20800022, 0x008d0140, 0x00000000 }, + { 0x01800031, 0x20001d0c, 0x508d0000, 0x0a080400 }, + { 0x00000040, 0x21680c22, 0x000007e8, 0x00000100 }, + { 0x00802001, 0x21800022, 0x008d0180, 0x00000000 }, + { 0x00802001, 0x21c00022, 0x008d01c0, 0x00000000 }, + { 0x0b800031, 0x20001d0c, 0x508d0000, 0x0a080400 }, + { 0x00000040, 0x20280c22, 0x000007e8, 0x00000180 }, + { 0x00802001, 0x20400022, 0x008d0200, 0x00000000 }, + { 0x00802001, 0x20800022, 0x008d0240, 0x00000000 }, + { 0x01800031, 0x20001d0c, 0x508d0000, 0x0a080400 }, + { 0x00000040, 0x27e80c21, 0x000007e8, 0x00000200 }, + { 0x01000010, 0x20002da0, 0x02000060, 0x00000000 }, + { 0x00110220, 0x34001c00, 0x00001400, 0xfffffda0 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x0000006e }, + { 0x00600001, 0x20200022, 0x008d07e0, 0x00000000 }, + { 0x01800031, 0x20801d09, 0x408d0000, 0x02488400 }, + { 0x00600001, 0x20400022, 0x008d07e0, 0x00000000 }, + { 0x00000040, 0x20480c22, 0x000007e8, 0x00000080 }, + { 0x02800031, 0x21001d09, 0x408d0000, 0x02488400 }, + { 0x00600001, 0x20600022, 0x008d07e0, 0x00000000 }, + { 0x00000040, 0x20680c22, 0x000007e8, 0x00000100 }, + { 0x03800031, 0x21801d09, 0x408d0000, 0x02488400 }, + { 0x00600001, 0x20800022, 0x008d07e0, 0x00000000 }, + { 0x00000040, 0x20880c22, 0x000007e8, 0x00000180 }, + { 0x04800031, 0x22001d09, 0x408d0000, 0x02488400 }, + { 0x00000001, 0x220400e0, 0x00000000, 0x00a00080 }, + { 0x00600001, 0x20a00022, 0x008d0000, 0x00000000 }, + { 0x00200001, 0x20640229, 0x00458814, 0x00000000 }, + { 0x02600005, 0x20000c20, 0x02008810, 0x01000000 }, + { 0x02600005, 0x20000c20, 0x00008810, 0x00004000 }, + { 0x00600041, 0x24003e2c, 0x00008815, 0x00020002 }, + { 0x00110001, 0x2066018d, 0x02000400, 0x00000000 }, + { 0x00010040, 0x20663d8d, 0x02000400, 0x00010001 }, + { 0x00110001, 0x2066022d, 0x00008815, 0x00000000 }, + { 0x02600005, 0x20000c20, 0x00008810, 0x00002000 }, + { 0x01000040, 0x20603dad, 0x02000060, 0xffffffff }, + { 0x00000006, 0xa8080c21, 0x00008808, 0x00200000 }, + { 0x00200001, 0xa8040129, 0x00450064, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x0000000e }, + { 0x00800041, 0x24002528, 0x00000066, 0x00000044 }, + { 0x00800040, 0x24002508, 0x008d0400, 0x00000064 }, + { 0x00000009, 0x20a82d02, 0x00000404, 0x00060006 }, + { 0x00802001, 0x20c00022, 0x008d8800, 0x00000000 }, + { 0x00802001, 0xa8000061, 0x00000000, 0x00000000 }, + { 0x05800031, 0x20001d0c, 0x508d0000, 0x06080300 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000022 }, + { 0x02600005, 0x20000d20, 0x02000066, 0x00000001 }, + { 0x02600005, 0x20000c20, 0x00008810, 0x00004000 }, + { 0x00000001, 0x20680129, 0x0000881c, 0x00000000 }, + { 0x00210002, 0x20700421, 0x02450038, 0x00450030 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x0000000e }, + { 0x02600005, 0x20001d20, 0x0000881c, 0x00000010 }, + { 0x00210002, 0x20700421, 0x02450028, 0x00450020 }, + { 0x01600005, 0x20001d20, 0x0200881c, 0x00000001 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000006 }, + { 0x02610005, 0x20001c20, 0x02008810, 0x00008000 }, + { 0x02610005, 0x20001d20, 0x0200881c, 0x00000010 }, + { 0x00010006, 0x20681d29, 0x0200881c, 0x00000010 }, + { 0x02800005, 0x2000452c, 0x00000068, 0x000d0070 }, + { 0x01000040, 0x20603dad, 0x02000060, 0x00000000 }, + { 0x00000009, 0xa8043d09, 0x00000600, 0x000c000c }, + { 0x00000005, 0xa8062d09, 0x00000600, 0xf000f000 }, + { 0x00200001, 0xc8040231, 0x00660064, 0x00000000 }, + { 0x00600001, 0x21600022, 0x008d07e0, 0x00000000 }, + { 0x00802001, 0x21800022, 0x008d8800, 0x00000000 }, + { 0x0b800031, 0x20001d0c, 0x508d0000, 0x06080300 }, + { 0x00000040, 0x27e80c21, 0x000007e8, 0x00000040 }, + { 0x00000040, 0x22040c00, 0x00000204, 0x00400040 }, + { 0x00110220, 0x34001c00, 0x02001400, 0xffffffac }, + { 0x01600031, 0x20001c20, 0x708d0000, 0x82000010 }, + { 0x01600031, 0x20001c20, 0x708d0000, 0x82000010 }, + { 0x01600031, 0x20001c20, 0x708d0000, 0x82000010 }, + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x00600001, 0x27e00021, 0x008d0000, 0x00000000 }, + { 0x00a02001, 0x20400169, 0x00000000, 0x00000000 }, + { 0x00000001, 0x206601ed, 0x00000000, 0x00030003 }, + { 0x00000009, 0x20663dad, 0x00000066, 0x000a000a }, + { 0x00000008, 0x22403dad, 0x00000026, 0x00010001 }, + { 0x00000041, 0x224235ad, 0x00000020, 0x00000022 }, + { 0x00600001, 0x20200022, 0x008d0000, 0x00000000 }, + { 0x00000001, 0x203c0022, 0x00000018, 0x00000000 }, + { 0x00000001, 0x203f01f2, 0x00000000, 0x00000000 }, + { 0x00000001, 0x202c00e2, 0x00000000, 0x00000000 }, + { 0x00000001, 0x202c010a, 0x00000e00, 0x00000000 }, + { 0x00600001, 0x20400021, 0x008d0020, 0x00000000 }, + { 0x00400001, 0x205401ed, 0x00000000, 0x00000000 }, + { 0x00200040, 0x20583dad, 0x00450020, 0xffffffff }, + { 0x00000001, 0x22000060, 0x00000000, 0x06080000 }, + { 0x00600001, 0x26000021, 0x008d0000, 0x00000000 }, + { 0x00000001, 0x26140061, 0x00000000, 0x00c00400 }, + { 0x00000001, 0x26100169, 0x00000000, 0x12121212 }, + { 0x07600031, 0x26201c21, 0x308d0600, 0x02000000 }, + { 0x00000001, 0x22a00169, 0x00000000, 0x01400140 }, + { 0x00000040, 0x20283c22, 0x00000008, 0x00200020 }, + { 0x00000001, 0x203801e2, 0x00000000, 0x00010001 }, + { 0x00800001, 0x204001ae, 0x00b10020, 0x00000000 }, + { 0x00000008, 0x27e03d29, 0x000002a0, 0x00010001 }, + { 0x00800031, 0x20000128, 0x608d07e0, 0x00000200 }, + { 0x00000006, 0x203025a2, 0x00000066, 0x000002a0 }, + { 0x01600031, 0x20001c00, 0x708d0000, 0x02000001 }, + { 0x00000001, 0x20300022, 0x00000010, 0x00000000 }, + { 0x00000001, 0x22a00169, 0x00000000, 0x00000000 }, + { 0x00000001, 0x22600169, 0x00000000, 0x00020002 }, + { 0x00200401, 0x208000e5, 0x00000000, 0x00000000 }, + { 0x00000c01, 0x208800e5, 0x00000000, 0xffffffc6 }, + { 0x00000801, 0x208c00e5, 0x00000000, 0xffffffca }, + { 0x00200001, 0x260001ec, 0x00000000, 0x00000000 }, + { 0x00600001, 0x20000022, 0x008d07e0, 0x00000000 }, + { 0x00000040, 0x20283c22, 0x00000008, 0x00100010 }, + { 0x00000001, 0x206001ed, 0x00000000, 0x00020002 }, + { 0x00000001, 0x206201ad, 0x0000005a, 0x00000000 }, + { 0x00000001, 0x20a001ed, 0x00000000, 0x00000000 }, + { 0x00200001, 0x228001ed, 0x00000000, 0x00000000 }, + { 0x00802001, 0x20c00061, 0x00000000, 0x00ff00ff }, + { 0x00802001, 0x21000061, 0x00000000, 0x00ff00ff }, + { 0x00802001, 0x21400061, 0x00000000, 0x00ff00ff }, + { 0x00802001, 0x21800061, 0x00000000, 0x00ff00ff }, + { 0x00802001, 0x21c00061, 0x00000000, 0x00ff00ff }, + { 0x00000041, 0x22083dac, 0x00000056, 0x00040004 }, + { 0x05000010, 0x200035ac, 0x02000280, 0x00000240 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x00000004 }, + { 0x00000040, 0x22803dad, 0x00000280, 0xffffffff }, + { 0x00000030, 0x32000084, 0x00001200, 0x00000000 }, + { 0x01000010, 0x20002d28, 0x000090c2, 0x00000000 }, + { 0x03000010, 0x200035ac, 0x02000054, 0x00000058 }, + { 0x00000041, 0x22a03dad, 0x00000056, 0x00040004 }, + { 0x00010220, 0x34001c00, 0x00001400, 0xfffffff4 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x00000014 }, + { 0x00200001, 0xb0c00229, 0x00450054, 0x00000000 }, + { 0x00200040, 0x22803dad, 0x00450280, 0x00010001 }, + { 0x00000001, 0x20300022, 0x00000010, 0x00000000 }, + { 0x00000001, 0x20380122, 0x00000260, 0x00000000 }, + { 0x00800001, 0x204001ae, 0x00b10040, 0x00000000 }, + { 0x00000008, 0x20003d2a, 0x000002a0, 0x00010001 }, + { 0x00000040, 0x22602d29, 0x00000260, 0x00020002 }, + { 0x00800031, 0x20000008, 0x608d0000, 0x00000200 }, + { 0x00000006, 0x203025a2, 0x00000066, 0x000002a0 }, + { 0x01600031, 0x20001c00, 0x708d0000, 0x02000001 }, + { 0x04200010, 0x200035ac, 0x00450054, 0x00450060 }, + { 0x00010040, 0x20a03dad, 0x02000056, 0x00010001 }, + { 0x05200010, 0x200035ac, 0x02450280, 0x00450240 }, + { 0x00000001, 0x240001ec, 0x00000000, 0x00040004 }, + { 0x00000048, 0x22083dac, 0x00000056, 0x00040004 }, + { 0x00200040, 0x205455ad, 0x00450054, 0x00450034 }, + { 0x02000010, 0x20003d8c, 0x00000600, 0x00010001 }, + { 0x00000041, 0x220e3d8c, 0x00000602, 0x00040004 }, + { 0x00010041, 0x22083dac, 0x000000a0, 0x00040004 }, + { 0x00010401, 0x205601ad, 0x000000a0, 0x00000000 }, + { 0x00010840, 0x20543d2d, 0x000090c0, 0x00010001 }, + { 0x00000220, 0x34001400, 0x00001400, 0x00009c80 }, + { 0x01000010, 0x20003dac, 0x02000280, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x00000006 }, + { 0x00000030, 0x32000084, 0x00001200, 0x00000000 }, + { 0x00000040, 0x22803dad, 0x00000280, 0xffffffff }, + { 0x00000220, 0x34001c00, 0x00001400, 0xfffffff6 }, + { 0x05000010, 0x200035ac, 0x00000240, 0x00000026 }, + { 0x00010220, 0x34001c00, 0x00001400, 0xfffffffc }, + { 0x07600031, 0x20001c20, 0x30000000, 0x02000001 }, + { 0x01600031, 0x20001c24, 0x708d0000, 0x82000000 }, + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x00600001, 0x27e00021, 0x008d0000, 0x00000000 }, + { 0x00600009, 0x25c03dad, 0x00050034, 0x00040004 }, + { 0x00000001, 0x220801ec, 0x00000000, 0x02400240 }, + { 0x00000041, 0x20263d29, 0x00000036, 0x00040004 }, + { 0x00000041, 0x25e435a1, 0x00000020, 0x00000036 }, + { 0x00000040, 0x25e43421, 0x000005e4, 0x00000034 }, + { 0x00000041, 0x27e82c21, 0x000005e4, 0x00400040 }, + { 0x01600031, 0x22401c21, 0x408d07e0, 0x02885800 }, + { 0x01800005, 0x20002d28, 0x02b19040, 0xffffffff }, + { 0x02000005, 0x20003e2c, 0x00009030, 0x00010001 }, + { 0x00000040, 0x25c43dad, 0x000005c4, 0xfffcfffc }, + { 0x00000001, 0x25e20129, 0x00000036, 0x00000000 }, + { 0x000b0220, 0x34001c00, 0x02001400, 0x00000178 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000176 }, + { 0x00000040, 0x25ca3dad, 0x000005ca, 0xfffcfffc }, + { 0x00200401, 0x27e001a1, 0x004505c0, 0x00000000 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x000f000f }, + { 0x00000001, 0x22000060, 0x00000000, 0x0288a001 }, + { 0x01600031, 0x20c00021, 0x408d07e0, 0x00000200 }, + { 0x00200401, 0x27e001a1, 0x004505c8, 0x00000000 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x0003000f }, + { 0x00000001, 0x22000060, 0x00000000, 0x02286003 }, + { 0x03600031, 0x20800021, 0x408d07e0, 0x00000200 }, + { 0x00800401, 0x23800231, 0x00a900c0, 0x00000000 }, + { 0x00800801, 0x23900231, 0x00a90100, 0x00000000 }, + { 0x00800401, 0x23a00231, 0x00a90140, 0x00000000 }, + { 0x00800801, 0x23b00231, 0x00a90180, 0x00000000 }, + { 0x00800401, 0x23c00231, 0x00a900c4, 0x00000000 }, + { 0x00800801, 0x23d00231, 0x00a90104, 0x00000000 }, + { 0x00800401, 0x23e00231, 0x00a90144, 0x00000000 }, + { 0x00800801, 0x23f00231, 0x00a90184, 0x00000000 }, + { 0x00800401, 0x24000231, 0x00a900c8, 0x00000000 }, + { 0x00800801, 0x24100231, 0x00a90108, 0x00000000 }, + { 0x00800401, 0x24200231, 0x00a90148, 0x00000000 }, + { 0x00800801, 0x24300231, 0x00a90188, 0x00000000 }, + { 0x00800401, 0x24400231, 0x00a900cc, 0x00000000 }, + { 0x00800801, 0x24500231, 0x00a9010c, 0x00000000 }, + { 0x00800401, 0x24600231, 0x00a9014c, 0x00000000 }, + { 0x00800801, 0x24700231, 0x00a9018c, 0x00000000 }, + { 0x00800401, 0x20c00231, 0x00cf0380, 0x00000000 }, + { 0x00800801, 0x20d00231, 0x00cf0381, 0x00000000 }, + { 0x00800401, 0x20e00231, 0x00cf0382, 0x00000000 }, + { 0x00800801, 0x20f00231, 0x00cf0383, 0x00000000 }, + { 0x00800401, 0x21000231, 0x00cf03c0, 0x00000000 }, + { 0x00800801, 0x21100231, 0x00cf03c1, 0x00000000 }, + { 0x00800401, 0x21200231, 0x00cf03c2, 0x00000000 }, + { 0x00800801, 0x21300231, 0x00cf03c3, 0x00000000 }, + { 0x00800401, 0x21400231, 0x00cf0400, 0x00000000 }, + { 0x00800801, 0x21500231, 0x00cf0401, 0x00000000 }, + { 0x00800401, 0x21600231, 0x00cf0402, 0x00000000 }, + { 0x00800801, 0x21700231, 0x00cf0403, 0x00000000 }, + { 0x00800401, 0x21800231, 0x00cf0440, 0x00000000 }, + { 0x00800801, 0x21900231, 0x00cf0441, 0x00000000 }, + { 0x00800401, 0x21a00231, 0x00cf0442, 0x00000000 }, + { 0x00800801, 0x21b00231, 0x00cf0443, 0x00000000 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00400040 }, + { 0x00000008, 0x25e83e2d, 0x00009080, 0x00020002 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00400040 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x00c000c0 }, + { 0x00200401, 0x25d0022d, 0x00459080, 0x00000000 }, + { 0x00200c01, 0x25d80129, 0x00459050, 0x00000000 }, + { 0x00400801, 0x25d40231, 0x00699060, 0x00000000 }, + { 0x00000040, 0x25e83dad, 0x000005e8, 0x00020002 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x00000134 }, + { 0x00000008, 0x25e83e2d, 0x00009084, 0x00020002 }, + { 0x00200401, 0x25d0022d, 0x00459084, 0x00000000 }, + { 0x00000801, 0x25da01e9, 0x00000000, 0x00000000 }, + { 0x00000040, 0x25e83dad, 0x000005e8, 0x00020002 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00200020 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00c000c0 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x01000100 }, + { 0x00000401, 0x25d80129, 0x00009040, 0x00000000 }, + { 0x00400801, 0x25d40231, 0x00699064, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x0000011e }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00100010 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x01000100 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x01400140 }, + { 0x00000401, 0x25d80129, 0x00009042, 0x00000000 }, + { 0x00400801, 0x25d40231, 0x00699068, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x00000110 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00200020 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x01400140 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x01800180 }, + { 0x00000401, 0x25d80129, 0x00009044, 0x00000000 }, + { 0x00400801, 0x25d40231, 0x0069906c, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x00000102 }, + { 0x00200401, 0x27e001a1, 0x004505c4, 0x00000000 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x000f0003 }, + { 0x00800401, 0x23400231, 0x00a90040, 0x00000000 }, + { 0x00800801, 0x23500231, 0x00a90044, 0x00000000 }, + { 0x00800401, 0x23600231, 0x00a90048, 0x00000000 }, + { 0x00800801, 0x23700231, 0x00a9004c, 0x00000000 }, + { 0x00800001, 0x20400232, 0x002b0340, 0x00000000 }, + { 0x00800001, 0x20500232, 0x002b0350, 0x00000000 }, + { 0x00800001, 0x20600232, 0x002b0360, 0x00000000 }, + { 0x00800001, 0x20700232, 0x002b0370, 0x00000000 }, + { 0x00000001, 0x22000060, 0x00000000, 0x06082003 }, + { 0x01600031, 0x20000020, 0x508d07e0, 0x00000200 }, + { 0x00800401, 0x23800231, 0x00a900c0, 0x00000000 }, + { 0x00800801, 0x23900231, 0x00a90100, 0x00000000 }, + { 0x00800401, 0x23a00231, 0x00a90140, 0x00000000 }, + { 0x00800801, 0x23b00231, 0x00a90180, 0x00000000 }, + { 0x00800401, 0x23c00231, 0x00a900c4, 0x00000000 }, + { 0x00800801, 0x23d00231, 0x00a90104, 0x00000000 }, + { 0x00800401, 0x23e00231, 0x00a90144, 0x00000000 }, + { 0x00800801, 0x23f00231, 0x00a90184, 0x00000000 }, + { 0x00800401, 0x24000231, 0x00a900c8, 0x00000000 }, + { 0x00800801, 0x24100231, 0x00a90108, 0x00000000 }, + { 0x00800401, 0x24200231, 0x00a90148, 0x00000000 }, + { 0x00800801, 0x24300231, 0x00a90188, 0x00000000 }, + { 0x00800401, 0x24400231, 0x00a900cc, 0x00000000 }, + { 0x00800801, 0x24500231, 0x00a9010c, 0x00000000 }, + { 0x00800401, 0x24600231, 0x00a9014c, 0x00000000 }, + { 0x00800801, 0x24700231, 0x00a9018c, 0x00000000 }, + { 0x00800401, 0x20c00231, 0x00cf0380, 0x00000000 }, + { 0x00800801, 0x20d00231, 0x00cf0381, 0x00000000 }, + { 0x00800401, 0x20e00231, 0x00cf0382, 0x00000000 }, + { 0x00800801, 0x20f00231, 0x00cf0383, 0x00000000 }, + { 0x00800401, 0x21000231, 0x00cf03c0, 0x00000000 }, + { 0x00800801, 0x21100231, 0x00cf03c1, 0x00000000 }, + { 0x00800401, 0x21200231, 0x00cf03c2, 0x00000000 }, + { 0x00800801, 0x21300231, 0x00cf03c3, 0x00000000 }, + { 0x00800401, 0x21400231, 0x00cf0400, 0x00000000 }, + { 0x00800801, 0x21500231, 0x00cf0401, 0x00000000 }, + { 0x00800401, 0x21600231, 0x00cf0402, 0x00000000 }, + { 0x00800801, 0x21700231, 0x00cf0403, 0x00000000 }, + { 0x00800401, 0x21800231, 0x00cf0440, 0x00000000 }, + { 0x00800801, 0x21900231, 0x00cf0441, 0x00000000 }, + { 0x00800401, 0x21a00231, 0x00cf0442, 0x00000000 }, + { 0x00800801, 0x21b00231, 0x00cf0443, 0x00000000 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00800080 }, + { 0x00000008, 0x25e83e2d, 0x00009082, 0x00020002 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00800080 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x00c000c0 }, + { 0x00200401, 0x25d0022d, 0x00459082, 0x00000000 }, + { 0x00200c01, 0x25d80129, 0x00459054, 0x00000000 }, + { 0x00400801, 0x25d40231, 0x00699070, 0x00000000 }, + { 0x00000040, 0x25e83dad, 0x000005e8, 0x00020002 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x00000096 }, + { 0x00000008, 0x25e83e2d, 0x00009084, 0x00020002 }, + { 0x00200401, 0x25d0022d, 0x00459084, 0x00000000 }, + { 0x00000801, 0x25da01e9, 0x00000000, 0x00000000 }, + { 0x00000040, 0x25e83dad, 0x000005e8, 0x00020002 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00200020 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00c000c0 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x01000100 }, + { 0x00000401, 0x25d80129, 0x00009046, 0x00000000 }, + { 0x00400801, 0x25d40231, 0x00699074, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x00000080 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00100010 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x01000100 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x01400140 }, + { 0x00000401, 0x25d80129, 0x00009048, 0x00000000 }, + { 0x00400801, 0x25d40231, 0x00699078, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x00000072 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00200020 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x01400140 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x01800180 }, + { 0x00000401, 0x25d80129, 0x0000904a, 0x00000000 }, + { 0x00400801, 0x25d40231, 0x0069907c, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x00000064 }, + { 0x00200401, 0x27e001a1, 0x004505c0, 0x00000000 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x000f000f }, + { 0x00802001, 0x20400022, 0x008d00c0, 0x00000000 }, + { 0x00802001, 0x20800022, 0x008d0100, 0x00000000 }, + { 0x00802001, 0x20c00022, 0x008d0140, 0x00000000 }, + { 0x00802001, 0x21000022, 0x008d0180, 0x00000000 }, + { 0x00000001, 0x22000060, 0x00000000, 0x12082003 }, + { 0x01600031, 0x20000020, 0x508d07e0, 0x00000200 }, + { 0x00200401, 0x27e001a1, 0x004505c8, 0x00000000 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x0003000f }, + { 0x00802001, 0x20400022, 0x008d0080, 0x00000000 }, + { 0x00000001, 0x22000060, 0x00000000, 0x0618a003 }, + { 0x01600031, 0x26400021, 0x508d07e0, 0x00000200 }, + { 0x00800401, 0x23400231, 0x00a900cc, 0x00000000 }, + { 0x00800801, 0x23500231, 0x00a9010c, 0x00000000 }, + { 0x00800401, 0x23600231, 0x00a9014c, 0x00000000 }, + { 0x00800801, 0x23700231, 0x00a9018c, 0x00000000 }, + { 0x00800401, 0x23800231, 0x00cf0340, 0x00000000 }, + { 0x00800801, 0x23900231, 0x00cf0341, 0x00000000 }, + { 0x00800401, 0x23a00231, 0x00cf0342, 0x00000000 }, + { 0x00800801, 0x23b00231, 0x00cf0343, 0x00000000 }, + { 0x00802001, 0x202000a2, 0x008d0380, 0x00000000 }, + { 0x00000008, 0x27e03d29, 0x00000026, 0x00010001 }, + { 0x00800031, 0x20001d28, 0x608d07e0, 0x06080020 }, + { 0x00600001, 0x26400021, 0x008d0640, 0x00000000 }, + { 0x00600001, 0x260001e1, 0x00000000, 0x00000000 }, + { 0x00000009, 0x26143da1, 0x000005e2, 0x00120012 }, + { 0x00000440, 0x26141c21, 0x00000614, 0x00020000 }, + { 0x00000c01, 0x26120129, 0x0000000c, 0x00000000 }, + { 0x00000c01, 0x26100169, 0x00000000, 0x12121212 }, + { 0x00400801, 0x26000171, 0x00000000, 0xffffffff }, + { 0x00600031, 0x20001c20, 0x308d0600, 0x82008002 }, + { 0x00000440, 0x27e03da1, 0x000005c0, 0x000c000c }, + { 0x00000c01, 0x27e401a1, 0x000005c2, 0x00000000 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x000f0003 }, + { 0x02600031, 0x23401c25, 0x408d07e0, 0x02286003 }, + { 0x00800401, 0x23800231, 0x00cf0340, 0x00000000 }, + { 0x00800801, 0x23900231, 0x00cf0341, 0x00000000 }, + { 0x00800401, 0x23a00231, 0x00cf0342, 0x00000000 }, + { 0x00800801, 0x23b00231, 0x00cf0343, 0x00000000 }, + { 0x00802001, 0x202000a2, 0x008d0380, 0x00000000 }, + { 0x00000008, 0x27e03d29, 0x00000026, 0x00010001 }, + { 0x00800031, 0x20001d28, 0x608d07e0, 0x06080020 }, + { 0x00600001, 0x260001e1, 0x00000000, 0x00000000 }, + { 0x00000009, 0x26143da1, 0x000005e2, 0x00120012 }, + { 0x00000440, 0x26141c21, 0x00000614, 0x00020000 }, + { 0x00000c01, 0x26120129, 0x0000000c, 0x00000000 }, + { 0x00000c01, 0x26100169, 0x00000000, 0x12121212 }, + { 0x00400801, 0x26000171, 0x00000000, 0xffffffff }, + { 0x00600031, 0x20001c20, 0x308d0600, 0x82008002 }, + { 0x00200001, 0x26000128, 0x004505d8, 0x00000000 }, + { 0x00800040, 0x2400462d, 0x00b19c00, 0x00b1d830 }, + { 0x00800040, 0x2340462d, 0x00b19820, 0x00b1d830 }, + { 0x00800040, 0x2360462d, 0x00b19c10, 0x00b1dc00 }, + { 0x05810010, 0x200035ac, 0x008d2400, 0x000005d0 }, + { 0x05810010, 0x200035ac, 0x008d2340, 0x000005d2 }, + { 0x05810010, 0x200035ac, 0x008d2360, 0x000005d2 }, + { 0x00818022, 0x34001c00, 0x00001400, 0x000000ca }, + { 0x00800040, 0x2440462d, 0x00b19810, 0x00b1d830 }, + { 0x00800040, 0x2460462d, 0x00b19c20, 0x00b1dc00 }, + { 0x00800201, 0x24a00129, 0x00b19820, 0x00000000 }, + { 0x00818022, 0x34001c00, 0x02001400, 0x00000066 }, + { 0x05800010, 0x200035ac, 0x028d2400, 0x000005e8 }, + { 0x00800040, 0x2520462d, 0x00b19830, 0x00b19820 }, + { 0x00800040, 0x2540462d, 0x00b19c00, 0x00b19c10 }, + { 0x00000201, 0x26000108, 0x00000602, 0x00000000 }, + { 0x05810010, 0x200035ac, 0x028d2440, 0x000005d2 }, + { 0x05810010, 0x200035ac, 0x008d2460, 0x000005d2 }, + { 0x00818022, 0x34001c00, 0x02001400, 0x0000001e }, + { 0x00800040, 0x2560462d, 0x00b19810, 0x00b19800 }, + { 0x00800040, 0x238045ad, 0x008d0520, 0x00b19c00 }, + { 0x00800040, 0x24003d8c, 0x00b10400, 0x00040004 }, + { 0x00800040, 0x23a0458d, 0x00b10400, 0x00b19810 }, + { 0x00800048, 0x24003dac, 0x008d0560, 0x00020002 }, + { 0x80800008, 0x43c03d91, 0x00b10400, 0x00030003 }, + { 0x00800040, 0x24003dac, 0x00b103a0, 0xfffefffe }, + { 0x80800008, 0x43603d91, 0x00b10400, 0x00020002 }, + { 0x00800040, 0x2400362c, 0x00b19c10, 0x00b10380 }, + { 0x00800040, 0x2400358c, 0x00b10400, 0x00b103a0 }, + { 0x80800008, 0x43403d91, 0x00b10400, 0x00030003 }, + { 0x00800001, 0xb8100231, 0x00ae03c0, 0x00000000 }, + { 0x00800001, 0xb8200231, 0x00ae0360, 0x00000000 }, + { 0x00800001, 0xb8300231, 0x00ae0340, 0x00000000 }, + { 0x00808024, 0x34001c00, 0x00001400, 0x0001000e }, + { 0x00800040, 0x2400362c, 0x00b19820, 0x008d0520 }, + { 0x00800040, 0x2400458c, 0x00b10400, 0x00b19c10 }, + { 0x00800040, 0x24003d8c, 0x00b10400, 0x00020002 }, + { 0x80800008, 0x43403d91, 0x00b10400, 0x00020002 }, + { 0x00800001, 0xb8300231, 0x00ae0340, 0x00000000 }, + { 0x00008025, 0x20000000, 0x00000000, 0x00000000 }, + { 0x00818022, 0x34001c00, 0x00001400, 0x0000001e }, + { 0x00800040, 0x2580462d, 0x00b19c20, 0x00b19c30 }, + { 0x00800040, 0x238045ad, 0x008d0540, 0x008d04b0 }, + { 0x00800040, 0x24003d8c, 0x00b10400, 0x00040004 }, + { 0x00800040, 0x23a0458d, 0x00b10400, 0x00b19c20 }, + { 0x00800048, 0x24003dac, 0x008d0580, 0x00020002 }, + { 0x80800008, 0x43c03d91, 0x00b10400, 0x00030003 }, + { 0x00800040, 0x24003dac, 0x00b103a0, 0xfffefffe }, + { 0x80800008, 0x43603d91, 0x00b10400, 0x00020002 }, + { 0x00800040, 0x2400362c, 0x008d04a0, 0x00b10380 }, + { 0x00800040, 0x2400358c, 0x00b10400, 0x00b103a0 }, + { 0x80800008, 0x43403d91, 0x00b10400, 0x00030003 }, + { 0x00800001, 0xbc200231, 0x00ae03c0, 0x00000000 }, + { 0x00800001, 0xbc100231, 0x00ae0360, 0x00000000 }, + { 0x00800001, 0xbc000231, 0x00ae0340, 0x00000000 }, + { 0x00808024, 0x34001c00, 0x00001400, 0x0001000e }, + { 0x00800040, 0x2400362c, 0x008d04a0, 0x008d0540 }, + { 0x00800040, 0x2400458c, 0x00b10400, 0x00b19c10 }, + { 0x00800040, 0x24003d8c, 0x00b10400, 0x00020002 }, + { 0x80800008, 0x43403d91, 0x00b10400, 0x00020002 }, + { 0x00800001, 0xbc000231, 0x00ae0340, 0x00000000 }, + { 0x00008025, 0x20000000, 0x00000000, 0x00000000 }, + { 0x00808024, 0x34001c00, 0x00001400, 0x0001005c }, + { 0x00800201, 0x23e0022d, 0x002805d4, 0x00000000 }, + { 0x00800201, 0x23c0022d, 0x002805d4, 0x00000000 }, + { 0x05800010, 0x200035ac, 0x008d2440, 0x000005d2 }, + { 0x05800010, 0x200035ac, 0x028d2460, 0x000005d2 }, + { 0x00800040, 0x24003e2c, 0x00b19820, 0x00040004 }, + { 0x00800048, 0x24003dac, 0x008d0400, 0x00040004 }, + { 0x00800040, 0x2400458c, 0x00b10400, 0x00b1dc10 }, + { 0x00800008, 0x23403d8d, 0x00b10400, 0x00030003 }, + { 0x00810040, 0x23e03dad, 0x008d03e0, 0x00010001 }, + { 0x00200201, 0x25ec018d, 0x00450600, 0x00000000 }, + { 0x00810040, 0x23e03dad, 0x028d03e0, 0x00010001 }, + { 0x03800010, 0x200035ac, 0x008d0340, 0x008d03e0 }, + { 0x05800010, 0x200035ac, 0x028d0340, 0x008d43e0 }, + { 0x00800042, 0x24c0462d, 0x00b19830, 0x00b19c00 }, + { 0x00810001, 0x234001ad, 0x008d03e0, 0x00000000 }, + { 0x00810001, 0x234001ad, 0x028d43e0, 0x00000000 }, + { 0x00200201, 0x260001ac, 0x004505ec, 0x00000000 }, + { 0x80800040, 0x43603631, 0x00b19830, 0x008d0340 }, + { 0x80800040, 0x43403631, 0x00b19c00, 0x008d4340 }, + { 0x00800001, 0xb8300231, 0x00ae0360, 0x00000000 }, + { 0x00800001, 0xbc000231, 0x00ae0340, 0x00000000 }, + { 0x00818022, 0x34001c00, 0x00001400, 0x00000016 }, + { 0x00800040, 0x2400362c, 0x00b19810, 0x008d04c0 }, + { 0x00800048, 0x24003e2c, 0x00b19820, 0xfffefffe }, + { 0x00800008, 0x23603d8d, 0x00b10400, 0x00010001 }, + { 0x03800010, 0x200035ac, 0x008d0360, 0x008d03c0 }, + { 0x05800010, 0x200035ac, 0x028d0360, 0x008d43c0 }, + { 0x00810001, 0x236001ad, 0x008d03c0, 0x00000000 }, + { 0x00810001, 0x236001ad, 0x028d43c0, 0x00000000 }, + { 0x00000201, 0x260201ac, 0x000005ee, 0x00000000 }, + { 0x80800040, 0x43603631, 0x00b19820, 0x008d0360 }, + { 0x00800001, 0xb8200231, 0x00ae0360, 0x00000000 }, + { 0x00008025, 0x20000000, 0x00000000, 0x00000000 }, + { 0x00818022, 0x34001c00, 0x02001400, 0x00000014 }, + { 0x00800040, 0x2400362c, 0x00b19c20, 0x008d04c0 }, + { 0x00800048, 0x24003e2c, 0x00b19c10, 0xfffefffe }, + { 0x00800008, 0x23603d8d, 0x00b10400, 0x00010001 }, + { 0x03800010, 0x200035ac, 0x008d0360, 0x008d03c0 }, + { 0x05800010, 0x200035ac, 0x028d0360, 0x008d43c0 }, + { 0x00810001, 0x236001ad, 0x008d03c0, 0x00000000 }, + { 0x00810001, 0x236001ad, 0x028d43c0, 0x00000000 }, + { 0x80800040, 0x43603631, 0x00b19c10, 0x008d0360 }, + { 0x00800001, 0xbc100231, 0x00ae0360, 0x00000000 }, + { 0x00008025, 0x20000000, 0x00000000, 0x00000000 }, + { 0x00008025, 0x20000000, 0x00000000, 0x00000000 }, + { 0x00008025, 0x20000000, 0x00000000, 0x00000000 }, + { 0x00000001, 0x34000020, 0x000007c0, 0x00000000 }, + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x00600001, 0x27e00021, 0x008d0000, 0x00000000 }, + { 0x00a02001, 0x20400169, 0x00000000, 0x00000000 }, + { 0x00000001, 0x206601ed, 0x00000000, 0x00030003 }, + { 0x00000009, 0x20663dad, 0x00000066, 0x000a000a }, + { 0x00000001, 0x206801ed, 0x00000000, 0x01400140 }, + { 0x00000001, 0x22600169, 0x00000000, 0x00030003 }, + { 0x00000008, 0x22403dad, 0x00000026, 0x00010001 }, + { 0x00000041, 0x224235ad, 0x00000020, 0x00000022 }, + { 0x00600001, 0x20200022, 0x008d0000, 0x00000000 }, + { 0x00000001, 0x203c0022, 0x00000018, 0x00000000 }, + { 0x00000001, 0x203f01f2, 0x00000000, 0x00000000 }, + { 0x00000001, 0x202c00e2, 0x00000000, 0x00000000 }, + { 0x00000001, 0x202c010a, 0x00000e00, 0x00000000 }, + { 0x00600001, 0x20400021, 0x008d0020, 0x00000000 }, + { 0x00400001, 0x205401ed, 0x00000000, 0x00000000 }, + { 0x00200040, 0x20583dad, 0x00450020, 0xffffffff }, + { 0x00000001, 0x22000060, 0x00000000, 0x06080000 }, + { 0x00600001, 0x26000021, 0x008d0000, 0x00000000 }, + { 0x00000001, 0x26140061, 0x00000000, 0x00c00400 }, + { 0x00000001, 0x26100169, 0x00000000, 0x12121212 }, + { 0x07600031, 0x26201c21, 0x308d0600, 0x02000000 }, + { 0x00200401, 0x208000e5, 0x00000000, 0x00000000 }, + { 0x00000c01, 0x208800e5, 0x00000000, 0xffffffc4 }, + { 0x00000801, 0x208c00e5, 0x00000000, 0xffffffc8 }, + { 0x00200001, 0x260001ec, 0x00000000, 0x00000000 }, + { 0x00600001, 0x20000022, 0x008d07e0, 0x00000000 }, + { 0x00000040, 0x20283c22, 0x00000008, 0x00100010 }, + { 0x00000001, 0x206001ed, 0x00000000, 0x00020002 }, + { 0x00000001, 0x206201ad, 0x0000005a, 0x00000000 }, + { 0x00000001, 0x20a001ed, 0x00000000, 0x00000000 }, + { 0x00200001, 0x228001ed, 0x00000000, 0x00000000 }, + { 0x00802001, 0x20c00061, 0x00000000, 0x00ff00ff }, + { 0x00802001, 0x21000061, 0x00000000, 0x00ff00ff }, + { 0x00802001, 0x21400061, 0x00000000, 0x00ff00ff }, + { 0x00802001, 0x21800061, 0x00000000, 0x00ff00ff }, + { 0x00802001, 0x21c00061, 0x00000000, 0x00ff00ff }, + { 0x00000041, 0x22083dac, 0x00000056, 0x00040004 }, + { 0x05000010, 0x200035ac, 0x02000280, 0x00000240 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x00000004 }, + { 0x00000040, 0x22803dad, 0x00000280, 0xffffffff }, + { 0x00000030, 0x32000084, 0x00001200, 0x00000000 }, + { 0x01000010, 0x20002d28, 0x000090c2, 0x00000000 }, + { 0x03000010, 0x200035ac, 0x02000054, 0x00000058 }, + { 0x00800001, 0x240001ac, 0x00000068, 0x00000000 }, + { 0x00000048, 0x22a03dad, 0x00000056, 0x00040004 }, + { 0x00010220, 0x34001c00, 0x00001400, 0xfffffff2 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x00000014 }, + { 0x00200001, 0xb0c00229, 0x00450054, 0x00000000 }, + { 0x00200040, 0x22803dad, 0x00450280, 0x00010001 }, + { 0x00000001, 0x20300022, 0x00000010, 0x00000000 }, + { 0x00000001, 0x20380122, 0x00000260, 0x00000000 }, + { 0x00800001, 0x204001ae, 0x00b10040, 0x00000000 }, + { 0x00000008, 0x20003d2a, 0x000002a0, 0x00010001 }, + { 0x00000040, 0x22602d29, 0x00000260, 0x00020002 }, + { 0x00800031, 0x20000008, 0x608d0000, 0x00000200 }, + { 0x00000006, 0x203025a2, 0x00000066, 0x000002a0 }, + { 0x01600031, 0x20001c00, 0x708d0000, 0x02000001 }, + { 0x04200010, 0x200035ac, 0x00450054, 0x00450060 }, + { 0x00010040, 0x20a03dad, 0x02000056, 0x00010001 }, + { 0x05200010, 0x200035ac, 0x02450280, 0x00450240 }, + { 0x00000001, 0x240001ec, 0x00000000, 0x00040004 }, + { 0x00000048, 0x22083dac, 0x00000056, 0x00040004 }, + { 0x00200040, 0x205455ad, 0x00450054, 0x00450034 }, + { 0x02000010, 0x20003d8c, 0x00000600, 0x00010001 }, + { 0x00000041, 0x220e3d8c, 0x00000602, 0x00040004 }, + { 0x00010041, 0x22083dac, 0x000000a0, 0x00040004 }, + { 0x00010401, 0x205601ad, 0x000000a0, 0x00000000 }, + { 0x00010840, 0x20543d2d, 0x000090c0, 0x00010001 }, + { 0x00000220, 0x34001400, 0x00001400, 0x00009c80 }, + { 0x01000010, 0x20003dac, 0x02000280, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x00000014 }, + { 0x00000030, 0x32000084, 0x00001200, 0x00000000 }, + { 0x00000040, 0x22803dad, 0x00000280, 0xffffffff }, + { 0x00600401, 0x260001e1, 0x00000000, 0x00000000 }, + { 0x00000c01, 0x26140061, 0x00000000, 0x01800000 }, + { 0x00000c01, 0x26120129, 0x0000000c, 0x00000000 }, + { 0x00000801, 0x26100169, 0x00000000, 0x12121212 }, + { 0x00000040, 0x2078252d, 0x00000026, 0x00004280 }, + { 0x00400001, 0x26000231, 0x00000078, 0x00000000 }, + { 0x00600031, 0x26201c21, 0x308d0600, 0x02000002 }, + { 0x00000220, 0x34001c00, 0x00001400, 0xffffffe8 }, + { 0x07600031, 0x20001c20, 0x30000000, 0x02000001 }, + { 0x01600031, 0x20001c24, 0x708d0000, 0x82000012 }, + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x00600001, 0x27e00021, 0x008d0000, 0x00000000 }, + { 0x00600009, 0x25c03dad, 0x00050034, 0x00040004 }, + { 0x00000001, 0x220801ec, 0x00000000, 0x02400240 }, + { 0x00000041, 0x25e435a1, 0x00000020, 0x00000036 }, + { 0x00000040, 0x25e43421, 0x000005e4, 0x00000034 }, + { 0x00000041, 0x27e82c21, 0x000005e4, 0x00400040 }, + { 0x00000001, 0x240001ec, 0x00000000, 0x01400140 }, + { 0x00000048, 0x20263dad, 0x00000036, 0x00040004 }, + { 0x00000040, 0x25c43dad, 0x000005c4, 0xfffcfffc }, + { 0x00000040, 0x25ca3dad, 0x000005ca, 0xfffcfffc }, + { 0x00800001, 0x2220022d, 0x000d002c, 0x00000000 }, + { 0x00600040, 0x22303dad, 0x008d0230, 0x00080008 }, + { 0x01600031, 0x22401c21, 0x408d07e0, 0x02885800 }, + { 0x01800005, 0x20002d28, 0x02b19040, 0xffffffff }, + { 0x02000005, 0x20003e2c, 0x00009030, 0x00010001 }, + { 0x00000001, 0x25e20129, 0x00000036, 0x00000000 }, + { 0x000b0220, 0x34001c00, 0x02001400, 0x00000126 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000124 }, + { 0x00000401, 0x27e001a1, 0x000005c0, 0x00000000 }, + { 0x00000c0c, 0x27e43da1, 0x000005c2, 0x00010001 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x0007000f }, + { 0x00000001, 0x22000060, 0x00000000, 0x0248a002 }, + { 0x02600031, 0x20c00021, 0x408d07e0, 0x00000200 }, + { 0x00000401, 0x27e001a1, 0x000005c8, 0x00000000 }, + { 0x00000c0c, 0x27e43da1, 0x000005ca, 0x00010001 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x0001000f }, + { 0x00000001, 0x22000060, 0x00000000, 0x02186004 }, + { 0x02600031, 0x20800021, 0x408d07e0, 0x00000200 }, + { 0x00800001, 0x2380012d, 0x008900c0, 0x00000000 }, + { 0x00800001, 0x23a0012d, 0x00890100, 0x00000000 }, + { 0x00800001, 0x23c0012d, 0x008900c8, 0x00000000 }, + { 0x00800001, 0x23e0012d, 0x00890108, 0x00000000 }, + { 0x00600401, 0x20c001a9, 0x00ab0380, 0x00000000 }, + { 0x00600801, 0x20d001a9, 0x00ab0382, 0x00000000 }, + { 0x00600401, 0x20e001a9, 0x00ab0384, 0x00000000 }, + { 0x00600801, 0x20f001a9, 0x00ab0386, 0x00000000 }, + { 0x00600401, 0x210001a9, 0x00ab03c0, 0x00000000 }, + { 0x00600801, 0x211001a9, 0x00ab03c2, 0x00000000 }, + { 0x00600401, 0x212001a9, 0x00ab03c4, 0x00000000 }, + { 0x00600801, 0x213001a9, 0x00ab03c6, 0x00000000 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00400040 }, + { 0x00800008, 0x2340352d, 0x00009050, 0x008d0220 }, + { 0x00800008, 0x2360352d, 0x00009052, 0x008d0220 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000020 }, + { 0x02600005, 0x20003dac, 0x00ae0340, 0x00010001 }, + { 0x02600005, 0x20003dac, 0x02ae0360, 0x00010001 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00400040 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x00c000c0 }, + { 0x00200401, 0x25d0022d, 0x004590c0, 0x00000000 }, + { 0x00400801, 0x25d40231, 0x006990a0, 0x00000000 }, + { 0x00200001, 0x25d80109, 0x00450600, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x000000fc }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00410041 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x00c100c1 }, + { 0x00200401, 0x25d0022d, 0x004590c8, 0x00000000 }, + { 0x00400801, 0x25d40231, 0x006990b0, 0x00000000 }, + { 0x00200001, 0x26000128, 0x004505d8, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x000000ee }, + { 0x00800008, 0x2340352d, 0x00009042, 0x008d0220 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00e000e0 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x01000100 }, + { 0x00200401, 0x25d0022d, 0x004590c4, 0x00000000 }, + { 0x00400801, 0x25d40231, 0x006990a4, 0x00000000 }, + { 0x02600005, 0x20003dac, 0x00ae0340, 0x00010001 }, + { 0x00000001, 0x260201e8, 0x00000000, 0x00000000 }, + { 0x00000401, 0x25da01e9, 0x00000000, 0x00000000 }, + { 0x00000801, 0x25d80109, 0x00000600, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x000000d8 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00e100e1 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x01010101 }, + { 0x00200401, 0x25d0022d, 0x004590cc, 0x00000000 }, + { 0x00400801, 0x25d40231, 0x006990b4, 0x00000000 }, + { 0x00200001, 0x26000128, 0x004505d8, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x000000ca }, + { 0x00000401, 0x27e001a1, 0x000005c4, 0x00000000 }, + { 0x00000c0c, 0x27e43da1, 0x000005c6, 0x00010001 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x00070003 }, + { 0x00600401, 0x2340012d, 0x00890040, 0x00000000 }, + { 0x00600801, 0x2350012d, 0x00890048, 0x00000000 }, + { 0x00600001, 0x204001aa, 0x00270340, 0x00000000 }, + { 0x00600001, 0x205001aa, 0x00270350, 0x00000000 }, + { 0x00000001, 0x22000060, 0x00000000, 0x04082004 }, + { 0x01600031, 0x20000020, 0x508d07e0, 0x00000200 }, + { 0x00800001, 0x2380012d, 0x008900c0, 0x00000000 }, + { 0x00800001, 0x23a0012d, 0x00890100, 0x00000000 }, + { 0x00800001, 0x23c0012d, 0x008900c8, 0x00000000 }, + { 0x00800001, 0x23e0012d, 0x00890108, 0x00000000 }, + { 0x00600401, 0x20c001a9, 0x00ab0380, 0x00000000 }, + { 0x00600801, 0x20d001a9, 0x00ab0382, 0x00000000 }, + { 0x00600401, 0x20e001a9, 0x00ab0384, 0x00000000 }, + { 0x00600801, 0x20f001a9, 0x00ab0386, 0x00000000 }, + { 0x00600401, 0x210001a9, 0x00ab03c0, 0x00000000 }, + { 0x00600801, 0x211001a9, 0x00ab03c2, 0x00000000 }, + { 0x00600401, 0x212001a9, 0x00ab03c4, 0x00000000 }, + { 0x00600801, 0x213001a9, 0x00ab03c6, 0x00000000 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00800080 }, + { 0x00800008, 0x2340352d, 0x00009054, 0x008d0220 }, + { 0x00800008, 0x2360352d, 0x00009056, 0x008d0220 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000020 }, + { 0x02600005, 0x20003dac, 0x00ae0340, 0x00010001 }, + { 0x02600005, 0x20003dac, 0x02ae0360, 0x00010001 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00800080 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x00c000c0 }, + { 0x00200401, 0x25d0022d, 0x004590c2, 0x00000000 }, + { 0x00400801, 0x25d40231, 0x006990a8, 0x00000000 }, + { 0x00200001, 0x25d80109, 0x00450600, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000086 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00810081 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x00c100c1 }, + { 0x00200401, 0x25d0022d, 0x004590ca, 0x00000000 }, + { 0x00400801, 0x25d40231, 0x006990b8, 0x00000000 }, + { 0x00200001, 0x26000128, 0x004505d8, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000078 }, + { 0x00800008, 0x2340352d, 0x00009048, 0x008d0220 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00e000e0 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x01000100 }, + { 0x00200401, 0x25d0022d, 0x004590c4, 0x00000000 }, + { 0x00400801, 0x25d40231, 0x006990ac, 0x00000000 }, + { 0x02600005, 0x20003dac, 0x00ae0340, 0x00010001 }, + { 0x00000001, 0x260201e8, 0x00000000, 0x00000000 }, + { 0x00000401, 0x25da01e9, 0x00000000, 0x00000000 }, + { 0x00000801, 0x25d80109, 0x00000600, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000062 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00e100e1 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x01010101 }, + { 0x00200401, 0x25d0022d, 0x004590cc, 0x00000000 }, + { 0x00400801, 0x25d40231, 0x006990bc, 0x00000000 }, + { 0x00200001, 0x26000128, 0x004505d8, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000054 }, + { 0x00000401, 0x27e001a1, 0x000005c0, 0x00000000 }, + { 0x00000c0c, 0x27e43da1, 0x000005c2, 0x00010001 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x0007000f }, + { 0x00802001, 0x20400022, 0x008d00c0, 0x00000000 }, + { 0x00802001, 0x20800022, 0x008d0100, 0x00000000 }, + { 0x00000001, 0x22000060, 0x00000000, 0x0a082004 }, + { 0x01600031, 0x20000020, 0x508d07e0, 0x00000200 }, + { 0x00000401, 0x27e001a1, 0x000005c8, 0x00000000 }, + { 0x00000c0c, 0x27e43da1, 0x000005ca, 0x00010001 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x0001000f }, + { 0x00600001, 0x20400022, 0x008d0080, 0x00000000 }, + { 0x00000001, 0x22000060, 0x00000000, 0x0418a004 }, + { 0x01600031, 0x26400021, 0x508d07e0, 0x00000200 }, + { 0x00600401, 0x2340012d, 0x008500cc, 0x00000000 }, + { 0x00600801, 0x2350012d, 0x0085010c, 0x00000000 }, + { 0x00800001, 0x236001ad, 0x002e0340, 0x00000000 }, + { 0x00600001, 0x202000a2, 0x008d0360, 0x00000000 }, + { 0x00000008, 0x27e03d29, 0x00000026, 0x00010001 }, + { 0x00800031, 0x20001d28, 0x608d07e0, 0x04080020 }, + { 0x00600001, 0x26400021, 0x008d0640, 0x00000000 }, + { 0x00600001, 0x260001e1, 0x00000000, 0x00000000 }, + { 0x00000009, 0x26143da1, 0x000005e2, 0x00120012 }, + { 0x00000440, 0x26141c21, 0x00000614, 0x00020000 }, + { 0x00000c01, 0x26120129, 0x0000000c, 0x00000000 }, + { 0x00000c01, 0x26100169, 0x00000000, 0x12121212 }, + { 0x00400801, 0x26000171, 0x00000000, 0xffffffff }, + { 0x00600031, 0x20001c20, 0x308d0600, 0x82008002 }, + { 0x00000440, 0x27e03da1, 0x000005c0, 0x000c000c }, + { 0x00000c0c, 0x27e43da1, 0x000005c2, 0x00010001 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x00070003 }, + { 0x02600031, 0x23401c25, 0x408d07e0, 0x02186004 }, + { 0x00800001, 0x236001ad, 0x002e0340, 0x00000000 }, + { 0x00600001, 0x202000a2, 0x008d0360, 0x00000000 }, + { 0x00000008, 0x27e03d29, 0x00000026, 0x00010001 }, + { 0x00800031, 0x20001d28, 0x608d07e0, 0x04080020 }, + { 0x00600001, 0x260001e1, 0x00000000, 0x00000000 }, + { 0x00000009, 0x26143da1, 0x000005e2, 0x00120012 }, + { 0x00000440, 0x26141c21, 0x00000614, 0x00020000 }, + { 0x00000c01, 0x26120129, 0x0000000c, 0x00000000 }, + { 0x00000c01, 0x26100169, 0x00000000, 0x12121212 }, + { 0x00400801, 0x26000171, 0x00000000, 0xffffffff }, + { 0x00600031, 0x20001c20, 0x308d0600, 0x82008002 }, + { 0x00600040, 0x2400462d, 0x00ae9c00, 0x00aed810 }, + { 0x00600040, 0x2340462d, 0x00ae9800, 0x00aed810 }, + { 0x00600040, 0x2360462d, 0x00ae9c10, 0x00aedc00 }, + { 0x05810010, 0x200035ac, 0x008d2400, 0x000005d0 }, + { 0x05810010, 0x200035ac, 0x008d2340, 0x000005d2 }, + { 0x05810010, 0x200035ac, 0x008d2360, 0x000005d2 }, + { 0x00618022, 0x34001c00, 0x00001400, 0x00000038 }, + { 0x00618022, 0x34001c00, 0x02001400, 0x00000016 }, + { 0x00600040, 0x24003e2c, 0x00ae9c10, 0x00020002 }, + { 0x00600048, 0x24003e2c, 0x00ae9800, 0x00020002 }, + { 0x00600040, 0x2400458c, 0x008d0400, 0x00ae9810 }, + { 0x80600008, 0x43403d91, 0x008d0400, 0x00020002 }, + { 0x00600040, 0x24003e2c, 0x00ae9800, 0x00020002 }, + { 0x00600048, 0x24003e2c, 0x00ae9c10, 0x00020002 }, + { 0x00600040, 0x2400458c, 0x008d0400, 0x00ae9c00 }, + { 0x80600008, 0x43603d91, 0x008d0400, 0x00020002 }, + { 0x00600001, 0xd8100231, 0x00ae0340, 0x00000000 }, + { 0x00600001, 0xdc000231, 0x00ae0360, 0x00000000 }, + { 0x00608024, 0x34001c00, 0x00001400, 0x00010020 }, + { 0x00600201, 0x2400022c, 0x002405d4, 0x00000000 }, + { 0x00600040, 0x23e03d8d, 0x008d0400, 0x00010001 }, + { 0x00600040, 0x24003e2c, 0x00ae9800, 0x00040004 }, + { 0x00600048, 0x24003dac, 0x008d0400, 0x00040004 }, + { 0x00600040, 0x2400458c, 0x008d0400, 0x00aedc10 }, + { 0x00600008, 0x23403d8d, 0x008d0400, 0x00030003 }, + { 0x03600010, 0x200035ac, 0x008d0340, 0x008d03e0 }, + { 0x05600010, 0x200035ac, 0x028d0340, 0x008d43e0 }, + { 0x00610001, 0x234001ad, 0x008d03e0, 0x00000000 }, + { 0x00610001, 0x234001ad, 0x028d43e0, 0x00000000 }, + { 0x80600040, 0x43603631, 0x00ae9810, 0x008d0340 }, + { 0x80600040, 0x43403631, 0x00ae9c00, 0x008d4340 }, + { 0x00600001, 0xd8100231, 0x00ae0360, 0x00000000 }, + { 0x00600001, 0xdc000231, 0x00ae0340, 0x00000000 }, + { 0x00008025, 0x20000000, 0x00000000, 0x00000000 }, + { 0x00008025, 0x20000000, 0x00000000, 0x00000000 }, + { 0x00000001, 0x34000020, 0x000007c0, 0x00000000 }, + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x00600001, 0x27e00021, 0x008d0000, 0x00000000 }, + { 0x00a02001, 0x20400169, 0x00000000, 0x00000000 }, + { 0x00000001, 0x206601ed, 0x00000000, 0x00030003 }, + { 0x00000009, 0x20663dad, 0x00000066, 0x000a000a }, + { 0x00000008, 0x22403dad, 0x00000026, 0x00010001 }, + { 0x00000041, 0x224235ad, 0x00000020, 0x00000022 }, + { 0x00600001, 0x20200022, 0x008d0000, 0x00000000 }, + { 0x00000001, 0x203c0022, 0x00000018, 0x00000000 }, + { 0x00000001, 0x203f01f2, 0x00000000, 0x00000000 }, + { 0x00000001, 0x202c00e2, 0x00000000, 0x00000000 }, + { 0x00000001, 0x202c010a, 0x00000e00, 0x00000000 }, + { 0x00600001, 0x20400021, 0x008d0020, 0x00000000 }, + { 0x00400001, 0x205401ed, 0x00000000, 0x00000000 }, + { 0x00200040, 0x20583dad, 0x00450020, 0xffffffff }, + { 0x00000001, 0x22000060, 0x00000000, 0x06080000 }, + { 0x00600001, 0x26000021, 0x008d0000, 0x00000000 }, + { 0x00000001, 0x26140061, 0x00000000, 0x00c00400 }, + { 0x00000001, 0x26100169, 0x00000000, 0x12121212 }, + { 0x07600031, 0x26201c21, 0x308d0600, 0x02000000 }, + { 0x00000001, 0x22a00169, 0x00000000, 0x01400140 }, + { 0x00000040, 0x20283c22, 0x00000008, 0x00200020 }, + { 0x00000001, 0x203801e2, 0x00000000, 0x00010001 }, + { 0x00800001, 0x204001ae, 0x00b10020, 0x00000000 }, + { 0x00000008, 0x27e03d29, 0x000002a0, 0x00010001 }, + { 0x00800031, 0x20000128, 0x608d07e0, 0x00000200 }, + { 0x00000006, 0x203025a2, 0x00000066, 0x000002a0 }, + { 0x01600031, 0x20001c00, 0x708d0000, 0x02000001 }, + { 0x00000001, 0x20300022, 0x00000010, 0x00000000 }, + { 0x00000001, 0x22a00169, 0x00000000, 0x00000000 }, + { 0x00000001, 0x22600169, 0x00000000, 0x00020002 }, + { 0x00200401, 0x208000e5, 0x00000000, 0x00000000 }, + { 0x00000c01, 0x208800e5, 0x00000000, 0xffffffc6 }, + { 0x00000801, 0x208c00e5, 0x00000000, 0xffffffca }, + { 0x00200001, 0x260001ec, 0x00000000, 0x00000000 }, + { 0x00600001, 0x20000022, 0x008d07e0, 0x00000000 }, + { 0x00000040, 0x20283c22, 0x00000008, 0x00100010 }, + { 0x00000001, 0x206001ed, 0x00000000, 0x00020002 }, + { 0x00000001, 0x206201ad, 0x0000005a, 0x00000000 }, + { 0x00000001, 0x20a001ed, 0x00000000, 0x00000000 }, + { 0x00200001, 0x228001ed, 0x00000000, 0x00000000 }, + { 0x00802001, 0x20c00061, 0x00000000, 0x00ff00ff }, + { 0x00802001, 0x21000061, 0x00000000, 0x00ff00ff }, + { 0x00802001, 0x21400061, 0x00000000, 0x00ff00ff }, + { 0x00802001, 0x21800061, 0x00000000, 0x00ff00ff }, + { 0x00802001, 0x21c00061, 0x00000000, 0x00ff00ff }, + { 0x00000041, 0x22083dac, 0x00000056, 0x00040004 }, + { 0x05000010, 0x200035ac, 0x02000280, 0x00000240 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x00000004 }, + { 0x00000040, 0x22803dad, 0x00000280, 0xffffffff }, + { 0x00000030, 0x32000084, 0x00001200, 0x00000000 }, + { 0x01000010, 0x20002d28, 0x000090c2, 0x00000000 }, + { 0x03000010, 0x200035ac, 0x02000054, 0x00000058 }, + { 0x00000041, 0x22a03dad, 0x00000056, 0x00040004 }, + { 0x00010220, 0x34001c00, 0x00001400, 0xfffffff4 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x00000014 }, + { 0x00200001, 0xb0c00229, 0x00450054, 0x00000000 }, + { 0x00200040, 0x22803dad, 0x00450280, 0x00010001 }, + { 0x00000001, 0x20300022, 0x00000010, 0x00000000 }, + { 0x00000001, 0x20380122, 0x00000260, 0x00000000 }, + { 0x00800001, 0x204001ae, 0x00b10040, 0x00000000 }, + { 0x00000008, 0x20003d2a, 0x000002a0, 0x00010001 }, + { 0x00000040, 0x22602d29, 0x00000260, 0x00020002 }, + { 0x00800031, 0x20000008, 0x608d0000, 0x00000200 }, + { 0x00000006, 0x203025a2, 0x00000066, 0x000002a0 }, + { 0x01600031, 0x20001c00, 0x708d0000, 0x02000001 }, + { 0x04200010, 0x200035ac, 0x00450054, 0x00450060 }, + { 0x00010040, 0x20a03dad, 0x02000056, 0x00010001 }, + { 0x05200010, 0x200035ac, 0x02450280, 0x00450240 }, + { 0x00000001, 0x240001ec, 0x00000000, 0x00040004 }, + { 0x00000048, 0x22083dac, 0x00000056, 0x00040004 }, + { 0x00200040, 0x205455ad, 0x00450054, 0x00450034 }, + { 0x02000010, 0x20003d8c, 0x00000600, 0x00010001 }, + { 0x00000041, 0x220e3d8c, 0x00000602, 0x00040004 }, + { 0x00010041, 0x22083dac, 0x000000a0, 0x00040004 }, + { 0x00010401, 0x205601ad, 0x000000a0, 0x00000000 }, + { 0x00010840, 0x20543d2d, 0x000090c0, 0x00010001 }, + { 0x00000220, 0x34001400, 0x00001400, 0x00009c80 }, + { 0x01000010, 0x20003dac, 0x02000280, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x00000006 }, + { 0x00000030, 0x32000084, 0x00001200, 0x00000000 }, + { 0x00000040, 0x22803dad, 0x00000280, 0xffffffff }, + { 0x00000220, 0x34001c00, 0x00001400, 0xfffffff6 }, + { 0x05000010, 0x200035ac, 0x00000240, 0x00000026 }, + { 0x00010220, 0x34001c00, 0x00001400, 0xfffffffc }, + { 0x07600031, 0x20001c20, 0x30000000, 0x02000001 }, + { 0x01600031, 0x20001c24, 0x708d0000, 0x82000000 }, + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x00600001, 0x27e00021, 0x008d0000, 0x00000000 }, + { 0x00600009, 0x25c03dad, 0x00050034, 0x00040004 }, + { 0x00000001, 0x220801ec, 0x00000000, 0x02400240 }, + { 0x00000041, 0x20263d29, 0x00000036, 0x00040004 }, + { 0x00000041, 0x25e435a1, 0x00000020, 0x00000036 }, + { 0x00000040, 0x25e43421, 0x000005e4, 0x00000034 }, + { 0x00000041, 0x27e82c21, 0x000005e4, 0x00400040 }, + { 0x01600031, 0x22401c21, 0x408d07e0, 0x02885800 }, + { 0x01800005, 0x20002d28, 0x02b19040, 0xffffffff }, + { 0x02000005, 0x20003e2c, 0x00009030, 0x00010001 }, + { 0x00000040, 0x25c43dad, 0x000005c4, 0xfffcfffc }, + { 0x00000001, 0x25e20129, 0x00000036, 0x00000000 }, + { 0x000b0220, 0x34001c00, 0x02001400, 0x0000018c }, + { 0x00010220, 0x34001c00, 0x00001400, 0x0000018a }, + { 0x00000040, 0x25ca3dad, 0x000005ca, 0xfffcfffc }, + { 0x02000005, 0x20003dac, 0x0200002a, 0x00020002 }, + { 0x00200401, 0x27e001a1, 0x004505c0, 0x00000000 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x000f000f }, + { 0x00010001, 0x22000060, 0x02000000, 0x0288e701 }, + { 0x00110001, 0x22000060, 0x02000000, 0x0288e601 }, + { 0x01600031, 0x20c00021, 0x408d07e0, 0x00000200 }, + { 0x02000005, 0x20003dac, 0x0200002a, 0x00020002 }, + { 0x00200401, 0x27e001a1, 0x004505c8, 0x00000000 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x0003000f }, + { 0x00010001, 0x22000060, 0x02000000, 0x02286703 }, + { 0x00110001, 0x22000060, 0x02000000, 0x02286603 }, + { 0x03600031, 0x20800021, 0x408d07e0, 0x00000200 }, + { 0x00800401, 0x23800231, 0x00a900c0, 0x00000000 }, + { 0x00800801, 0x23900231, 0x00a90100, 0x00000000 }, + { 0x00800401, 0x23a00231, 0x00a90140, 0x00000000 }, + { 0x00800801, 0x23b00231, 0x00a90180, 0x00000000 }, + { 0x00800401, 0x23c00231, 0x00a900c4, 0x00000000 }, + { 0x00800801, 0x23d00231, 0x00a90104, 0x00000000 }, + { 0x00800401, 0x23e00231, 0x00a90144, 0x00000000 }, + { 0x00800801, 0x23f00231, 0x00a90184, 0x00000000 }, + { 0x00800401, 0x24000231, 0x00a900c8, 0x00000000 }, + { 0x00800801, 0x24100231, 0x00a90108, 0x00000000 }, + { 0x00800401, 0x24200231, 0x00a90148, 0x00000000 }, + { 0x00800801, 0x24300231, 0x00a90188, 0x00000000 }, + { 0x00800401, 0x24400231, 0x00a900cc, 0x00000000 }, + { 0x00800801, 0x24500231, 0x00a9010c, 0x00000000 }, + { 0x00800401, 0x24600231, 0x00a9014c, 0x00000000 }, + { 0x00800801, 0x24700231, 0x00a9018c, 0x00000000 }, + { 0x00800401, 0x20c00231, 0x00cf0380, 0x00000000 }, + { 0x00800801, 0x20d00231, 0x00cf0381, 0x00000000 }, + { 0x00800401, 0x20e00231, 0x00cf0382, 0x00000000 }, + { 0x00800801, 0x20f00231, 0x00cf0383, 0x00000000 }, + { 0x00800401, 0x21000231, 0x00cf03c0, 0x00000000 }, + { 0x00800801, 0x21100231, 0x00cf03c1, 0x00000000 }, + { 0x00800401, 0x21200231, 0x00cf03c2, 0x00000000 }, + { 0x00800801, 0x21300231, 0x00cf03c3, 0x00000000 }, + { 0x00800401, 0x21400231, 0x00cf0400, 0x00000000 }, + { 0x00800801, 0x21500231, 0x00cf0401, 0x00000000 }, + { 0x00800401, 0x21600231, 0x00cf0402, 0x00000000 }, + { 0x00800801, 0x21700231, 0x00cf0403, 0x00000000 }, + { 0x00800401, 0x21800231, 0x00cf0440, 0x00000000 }, + { 0x00800801, 0x21900231, 0x00cf0441, 0x00000000 }, + { 0x00800401, 0x21a00231, 0x00cf0442, 0x00000000 }, + { 0x00800801, 0x21b00231, 0x00cf0443, 0x00000000 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00400040 }, + { 0x00000008, 0x25e83e2d, 0x00009080, 0x00020002 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00400040 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x00c000c0 }, + { 0x00200401, 0x25d0022d, 0x00459080, 0x00000000 }, + { 0x00200c01, 0x25d80129, 0x00459050, 0x00000000 }, + { 0x00400801, 0x25d40231, 0x00699060, 0x00000000 }, + { 0x00000040, 0x25e83dad, 0x000005e8, 0x00020002 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00110220, 0x34001c00, 0x00001400, 0xfffffb8c }, + { 0x00000008, 0x25e83e2d, 0x00009084, 0x00020002 }, + { 0x00200401, 0x25d0022d, 0x00459084, 0x00000000 }, + { 0x00000801, 0x25da01e9, 0x00000000, 0x00000000 }, + { 0x00000040, 0x25e83dad, 0x000005e8, 0x00020002 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00200020 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00c000c0 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x01000100 }, + { 0x00000401, 0x25d80129, 0x00009040, 0x00000000 }, + { 0x00400801, 0x25d40231, 0x00699064, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00110220, 0x34001c00, 0x00001400, 0xfffffb76 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00100010 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x01000100 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x01400140 }, + { 0x00000401, 0x25d80129, 0x00009042, 0x00000000 }, + { 0x00400801, 0x25d40231, 0x00699068, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00110220, 0x34001c00, 0x00001400, 0xfffffb68 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00200020 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x01400140 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x01800180 }, + { 0x00000401, 0x25d80129, 0x00009044, 0x00000000 }, + { 0x00400801, 0x25d40231, 0x0069906c, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00110220, 0x34001c00, 0x00001400, 0xfffffb5a }, + { 0x02000005, 0x20003dac, 0x0200002a, 0x00020002 }, + { 0x00200401, 0x27e001a1, 0x004505c4, 0x00000000 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x000f0003 }, + { 0x00800401, 0x23400231, 0x00a90040, 0x00000000 }, + { 0x00800801, 0x23500231, 0x00a90044, 0x00000000 }, + { 0x00800401, 0x23600231, 0x00a90048, 0x00000000 }, + { 0x00800801, 0x23700231, 0x00a9004c, 0x00000000 }, + { 0x00800001, 0x20400232, 0x002b0340, 0x00000000 }, + { 0x00800001, 0x20500232, 0x002b0350, 0x00000000 }, + { 0x00800001, 0x20600232, 0x002b0360, 0x00000000 }, + { 0x00800001, 0x20700232, 0x002b0370, 0x00000000 }, + { 0x00010001, 0x22000060, 0x02000000, 0x06082703 }, + { 0x00110001, 0x22000060, 0x02000000, 0x06082603 }, + { 0x01600031, 0x20000020, 0x508d07e0, 0x00000200 }, + { 0x00800401, 0x23800231, 0x00a900c0, 0x00000000 }, + { 0x00800801, 0x23900231, 0x00a90100, 0x00000000 }, + { 0x00800401, 0x23a00231, 0x00a90140, 0x00000000 }, + { 0x00800801, 0x23b00231, 0x00a90180, 0x00000000 }, + { 0x00800401, 0x23c00231, 0x00a900c4, 0x00000000 }, + { 0x00800801, 0x23d00231, 0x00a90104, 0x00000000 }, + { 0x00800401, 0x23e00231, 0x00a90144, 0x00000000 }, + { 0x00800801, 0x23f00231, 0x00a90184, 0x00000000 }, + { 0x00800401, 0x24000231, 0x00a900c8, 0x00000000 }, + { 0x00800801, 0x24100231, 0x00a90108, 0x00000000 }, + { 0x00800401, 0x24200231, 0x00a90148, 0x00000000 }, + { 0x00800801, 0x24300231, 0x00a90188, 0x00000000 }, + { 0x00800401, 0x24400231, 0x00a900cc, 0x00000000 }, + { 0x00800801, 0x24500231, 0x00a9010c, 0x00000000 }, + { 0x00800401, 0x24600231, 0x00a9014c, 0x00000000 }, + { 0x00800801, 0x24700231, 0x00a9018c, 0x00000000 }, + { 0x00800401, 0x20c00231, 0x00cf0380, 0x00000000 }, + { 0x00800801, 0x20d00231, 0x00cf0381, 0x00000000 }, + { 0x00800401, 0x20e00231, 0x00cf0382, 0x00000000 }, + { 0x00800801, 0x20f00231, 0x00cf0383, 0x00000000 }, + { 0x00800401, 0x21000231, 0x00cf03c0, 0x00000000 }, + { 0x00800801, 0x21100231, 0x00cf03c1, 0x00000000 }, + { 0x00800401, 0x21200231, 0x00cf03c2, 0x00000000 }, + { 0x00800801, 0x21300231, 0x00cf03c3, 0x00000000 }, + { 0x00800401, 0x21400231, 0x00cf0400, 0x00000000 }, + { 0x00800801, 0x21500231, 0x00cf0401, 0x00000000 }, + { 0x00800401, 0x21600231, 0x00cf0402, 0x00000000 }, + { 0x00800801, 0x21700231, 0x00cf0403, 0x00000000 }, + { 0x00800401, 0x21800231, 0x00cf0440, 0x00000000 }, + { 0x00800801, 0x21900231, 0x00cf0441, 0x00000000 }, + { 0x00800401, 0x21a00231, 0x00cf0442, 0x00000000 }, + { 0x00800801, 0x21b00231, 0x00cf0443, 0x00000000 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00800080 }, + { 0x00000008, 0x25e83e2d, 0x00009082, 0x00020002 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00800080 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x00c000c0 }, + { 0x00200401, 0x25d0022d, 0x00459082, 0x00000000 }, + { 0x00200c01, 0x25d80129, 0x00459054, 0x00000000 }, + { 0x00400801, 0x25d40231, 0x00699070, 0x00000000 }, + { 0x00000040, 0x25e83dad, 0x000005e8, 0x00020002 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00110220, 0x34001c00, 0x00001400, 0xfffffaea }, + { 0x00000008, 0x25e83e2d, 0x00009084, 0x00020002 }, + { 0x00200401, 0x25d0022d, 0x00459084, 0x00000000 }, + { 0x00000801, 0x25da01e9, 0x00000000, 0x00000000 }, + { 0x00000040, 0x25e83dad, 0x000005e8, 0x00020002 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00200020 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00c000c0 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x01000100 }, + { 0x00000401, 0x25d80129, 0x00009046, 0x00000000 }, + { 0x00400801, 0x25d40231, 0x00699074, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00110220, 0x34001c00, 0x00001400, 0xfffffad4 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00100010 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x01000100 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x01400140 }, + { 0x00000401, 0x25d80129, 0x00009048, 0x00000000 }, + { 0x00400801, 0x25d40231, 0x00699078, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00110220, 0x34001c00, 0x00001400, 0xfffffac6 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00200020 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x01400140 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x01800180 }, + { 0x00000401, 0x25d80129, 0x0000904a, 0x00000000 }, + { 0x00400801, 0x25d40231, 0x0069907c, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00110220, 0x34001c00, 0x00001400, 0xfffffab8 }, + { 0x02000005, 0x20003dac, 0x0200002a, 0x00020002 }, + { 0x00200401, 0x27e001a1, 0x004505c0, 0x00000000 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x000f000f }, + { 0x00802001, 0x20400022, 0x008d00c0, 0x00000000 }, + { 0x00802001, 0x20800022, 0x008d0100, 0x00000000 }, + { 0x00802001, 0x20c00022, 0x008d0140, 0x00000000 }, + { 0x00802001, 0x21000022, 0x008d0180, 0x00000000 }, + { 0x00010001, 0x22000060, 0x02000000, 0x12082703 }, + { 0x00110001, 0x22000060, 0x02000000, 0x12082603 }, + { 0x01600031, 0x20000020, 0x508d07e0, 0x00000200 }, + { 0x02000005, 0x20003dac, 0x0200002a, 0x00020002 }, + { 0x00200401, 0x27e001a1, 0x004505c8, 0x00000000 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x0003000f }, + { 0x00802001, 0x20400022, 0x008d0080, 0x00000000 }, + { 0x00010001, 0x22000060, 0x02000000, 0x0618a703 }, + { 0x00110001, 0x22000060, 0x02000000, 0x0618a603 }, + { 0x01600031, 0x26400021, 0x508d07e0, 0x00000200 }, + { 0x00800401, 0x23400231, 0x00a900cc, 0x00000000 }, + { 0x00800801, 0x23500231, 0x00a9010c, 0x00000000 }, + { 0x00800401, 0x23600231, 0x00a9014c, 0x00000000 }, + { 0x00800801, 0x23700231, 0x00a9018c, 0x00000000 }, + { 0x00800401, 0x23800231, 0x00cf0340, 0x00000000 }, + { 0x00800801, 0x23900231, 0x00cf0341, 0x00000000 }, + { 0x00800401, 0x23a00231, 0x00cf0342, 0x00000000 }, + { 0x00800801, 0x23b00231, 0x00cf0343, 0x00000000 }, + { 0x00802001, 0x202000a2, 0x008d0380, 0x00000000 }, + { 0x00000008, 0x27e03d29, 0x00000026, 0x00010001 }, + { 0x00800031, 0x20001d28, 0x608d07e0, 0x06080020 }, + { 0x00600001, 0x26400021, 0x008d0640, 0x00000000 }, + { 0x00600001, 0x260001e1, 0x00000000, 0x00000000 }, + { 0x00000009, 0x26143da1, 0x000005e2, 0x00120012 }, + { 0x00000440, 0x26141c21, 0x00000614, 0x00020000 }, + { 0x00000c01, 0x26120129, 0x0000000c, 0x00000000 }, + { 0x00000c01, 0x26100169, 0x00000000, 0x12121212 }, + { 0x00400801, 0x26000171, 0x00000000, 0xffffffff }, + { 0x00600031, 0x20001c20, 0x308d0600, 0x82008002 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00020002 }, + { 0x02000005, 0x20003dac, 0x0200002a, 0x00020002 }, + { 0x00000440, 0x27e03da1, 0x000005c0, 0x000c000c }, + { 0x00000c01, 0x27e401a1, 0x000005c2, 0x00000000 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x000f0003 }, + { 0x00018022, 0x34001c00, 0x00001400, 0x00000006 }, + { 0x00000001, 0x22000060, 0x00000000, 0x02286003 }, + { 0x00010040, 0x27e43ca5, 0x020007e4, 0x00100010 }, + { 0x00008024, 0x34001c00, 0x00001400, 0x00010008 }, + { 0x00010001, 0x22000060, 0x02000000, 0x02286703 }, + { 0x00110001, 0x22000060, 0x02000000, 0x02286603 }, + { 0x00008025, 0x20000000, 0x00000000, 0x00000000 }, + { 0x02600031, 0x23400025, 0x408d07e0, 0x00000200 }, + { 0x00800401, 0x23800231, 0x00cf0340, 0x00000000 }, + { 0x00800801, 0x23900231, 0x00cf0341, 0x00000000 }, + { 0x00800401, 0x23a00231, 0x00cf0342, 0x00000000 }, + { 0x00800801, 0x23b00231, 0x00cf0343, 0x00000000 }, + { 0x00802001, 0x202000a2, 0x008d0380, 0x00000000 }, + { 0x00000008, 0x27e03d29, 0x00000026, 0x00010001 }, + { 0x00800031, 0x20001d28, 0x608d07e0, 0x06080020 }, + { 0x00600001, 0x260001e1, 0x00000000, 0x00000000 }, + { 0x00000009, 0x26143da1, 0x000005e2, 0x00120012 }, + { 0x00000440, 0x26141c21, 0x00000614, 0x00020000 }, + { 0x00000c01, 0x26120129, 0x0000000c, 0x00000000 }, + { 0x00000c01, 0x26100169, 0x00000000, 0x12121212 }, + { 0x00400801, 0x26000171, 0x00000000, 0xffffffff }, + { 0x00600031, 0x20001c20, 0x308d0600, 0x82008002 }, + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x00600001, 0x27e00021, 0x008d0000, 0x00000000 }, + { 0x00a02001, 0x20400169, 0x00000000, 0x00000000 }, + { 0x00000001, 0x206601ed, 0x00000000, 0x00030003 }, + { 0x00000009, 0x20663dad, 0x00000066, 0x000a000a }, + { 0x00000001, 0x206801ed, 0x00000000, 0x01400140 }, + { 0x00000001, 0x22600169, 0x00000000, 0x00030003 }, + { 0x00000008, 0x22403dad, 0x00000026, 0x00010001 }, + { 0x00000041, 0x224235ad, 0x00000020, 0x00000022 }, + { 0x00600001, 0x20200022, 0x008d0000, 0x00000000 }, + { 0x00000001, 0x203c0022, 0x00000018, 0x00000000 }, + { 0x00000001, 0x203f01f2, 0x00000000, 0x00000000 }, + { 0x00000001, 0x202c00e2, 0x00000000, 0x00000000 }, + { 0x00000001, 0x202c010a, 0x00000e00, 0x00000000 }, + { 0x00600001, 0x20400021, 0x008d0020, 0x00000000 }, + { 0x00400001, 0x205401ed, 0x00000000, 0x00000000 }, + { 0x00200040, 0x20583dad, 0x00450020, 0xffffffff }, + { 0x00000001, 0x22000060, 0x00000000, 0x06080000 }, + { 0x00600001, 0x26000021, 0x008d0000, 0x00000000 }, + { 0x00000001, 0x26140061, 0x00000000, 0x00c00400 }, + { 0x00000001, 0x26100169, 0x00000000, 0x12121212 }, + { 0x07600031, 0x26201c21, 0x308d0600, 0x02000000 }, + { 0x00200401, 0x208000e5, 0x00000000, 0x00000000 }, + { 0x00000c01, 0x208800e5, 0x00000000, 0xffffffc4 }, + { 0x00000801, 0x208c00e5, 0x00000000, 0xffffffc8 }, + { 0x00200001, 0x260001ec, 0x00000000, 0x00000000 }, + { 0x00600001, 0x20000022, 0x008d07e0, 0x00000000 }, + { 0x00000040, 0x20283c22, 0x00000008, 0x00100010 }, + { 0x00000001, 0x206001ed, 0x00000000, 0x00020002 }, + { 0x00000001, 0x206201ad, 0x0000005a, 0x00000000 }, + { 0x00000001, 0x20a001ed, 0x00000000, 0x00000000 }, + { 0x00200001, 0x228001ed, 0x00000000, 0x00000000 }, + { 0x00802001, 0x20c00061, 0x00000000, 0x00ff00ff }, + { 0x00802001, 0x21000061, 0x00000000, 0x00ff00ff }, + { 0x00802001, 0x21400061, 0x00000000, 0x00ff00ff }, + { 0x00802001, 0x21800061, 0x00000000, 0x00ff00ff }, + { 0x00802001, 0x21c00061, 0x00000000, 0x00ff00ff }, + { 0x00000041, 0x22083dac, 0x00000056, 0x00040004 }, + { 0x05000010, 0x200035ac, 0x02000280, 0x00000240 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x00000004 }, + { 0x00000040, 0x22803dad, 0x00000280, 0xffffffff }, + { 0x00000030, 0x32000084, 0x00001200, 0x00000000 }, + { 0x01000010, 0x20002d28, 0x000090c2, 0x00000000 }, + { 0x03000010, 0x200035ac, 0x02000054, 0x00000058 }, + { 0x00800001, 0x240001ac, 0x00000068, 0x00000000 }, + { 0x00000048, 0x22a03dad, 0x00000056, 0x00040004 }, + { 0x00010220, 0x34001c00, 0x00001400, 0xfffffff2 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x00000014 }, + { 0x00200001, 0xb0c00229, 0x00450054, 0x00000000 }, + { 0x00200040, 0x22803dad, 0x00450280, 0x00010001 }, + { 0x00000001, 0x20300022, 0x00000010, 0x00000000 }, + { 0x00000001, 0x20380122, 0x00000260, 0x00000000 }, + { 0x00800001, 0x204001ae, 0x00b10040, 0x00000000 }, + { 0x00000008, 0x20003d2a, 0x000002a0, 0x00010001 }, + { 0x00000040, 0x22602d29, 0x00000260, 0x00020002 }, + { 0x00800031, 0x20000008, 0x608d0000, 0x00000200 }, + { 0x00000006, 0x203025a2, 0x00000066, 0x000002a0 }, + { 0x01600031, 0x20001c00, 0x708d0000, 0x02000001 }, + { 0x04200010, 0x200035ac, 0x00450054, 0x00450060 }, + { 0x00010040, 0x20a03dad, 0x02000056, 0x00010001 }, + { 0x05200010, 0x200035ac, 0x02450280, 0x00450240 }, + { 0x00000001, 0x240001ec, 0x00000000, 0x00040004 }, + { 0x00000048, 0x22083dac, 0x00000056, 0x00040004 }, + { 0x00200040, 0x205455ad, 0x00450054, 0x00450034 }, + { 0x02000010, 0x20003d8c, 0x00000600, 0x00010001 }, + { 0x00000041, 0x220e3d8c, 0x00000602, 0x00040004 }, + { 0x00010041, 0x22083dac, 0x000000a0, 0x00040004 }, + { 0x00010401, 0x205601ad, 0x000000a0, 0x00000000 }, + { 0x00010840, 0x20543d2d, 0x000090c0, 0x00010001 }, + { 0x00000220, 0x34001400, 0x00001400, 0x00009c80 }, + { 0x01000010, 0x20003dac, 0x02000280, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x00000014 }, + { 0x00000030, 0x32000084, 0x00001200, 0x00000000 }, + { 0x00000040, 0x22803dad, 0x00000280, 0xffffffff }, + { 0x00600401, 0x260001e1, 0x00000000, 0x00000000 }, + { 0x00000c01, 0x26140061, 0x00000000, 0x01800000 }, + { 0x00000c01, 0x26120129, 0x0000000c, 0x00000000 }, + { 0x00000801, 0x26100169, 0x00000000, 0x12121212 }, + { 0x00000040, 0x2078252d, 0x00000026, 0x00004280 }, + { 0x00400001, 0x26000231, 0x00000078, 0x00000000 }, + { 0x00600031, 0x26201c21, 0x308d0600, 0x02000002 }, + { 0x00000220, 0x34001c00, 0x00001400, 0xffffffe8 }, + { 0x07600031, 0x20001c20, 0x30000000, 0x02000001 }, + { 0x01600031, 0x20001c24, 0x708d0000, 0x82000012 }, + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x00600001, 0x27e00021, 0x008d0000, 0x00000000 }, + { 0x00600009, 0x25c03dad, 0x00050034, 0x00040004 }, + { 0x00000001, 0x220801ec, 0x00000000, 0x02400240 }, + { 0x00000041, 0x25e435a1, 0x00000020, 0x00000036 }, + { 0x00000040, 0x25e43421, 0x000005e4, 0x00000034 }, + { 0x00000041, 0x27e82c21, 0x000005e4, 0x00400040 }, + { 0x00000001, 0x240001ec, 0x00000000, 0x01400140 }, + { 0x00000048, 0x20263dad, 0x00000036, 0x00040004 }, + { 0x00000040, 0x25c43dad, 0x000005c4, 0xfffcfffc }, + { 0x00000040, 0x25ca3dad, 0x000005ca, 0xfffcfffc }, + { 0x00800001, 0x2220022d, 0x000d002c, 0x00000000 }, + { 0x00600040, 0x22303dad, 0x008d0230, 0x00080008 }, + { 0x01600031, 0x22401c21, 0x408d07e0, 0x02885800 }, + { 0x01800005, 0x20002d28, 0x02b19040, 0xffffffff }, + { 0x02000005, 0x20003e2c, 0x00009030, 0x00010001 }, + { 0x00000001, 0x25e20129, 0x00000036, 0x00000000 }, + { 0x000b0220, 0x34001c00, 0x02001400, 0x0000013a }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000138 }, + { 0x02000005, 0x20003dac, 0x0200002a, 0x00020002 }, + { 0x00000401, 0x27e001a1, 0x000005c0, 0x00000000 }, + { 0x00000c0c, 0x27e43da1, 0x000005c2, 0x00010001 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x0007000f }, + { 0x00010001, 0x22000060, 0x02000000, 0x0248e702 }, + { 0x00110001, 0x22000060, 0x02000000, 0x0248e602 }, + { 0x02600031, 0x20c00021, 0x408d07e0, 0x00000200 }, + { 0x02000005, 0x20003dac, 0x0200002a, 0x00020002 }, + { 0x00000401, 0x27e001a1, 0x000005c8, 0x00000000 }, + { 0x00000c0c, 0x27e43da1, 0x000005ca, 0x00010001 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x0001000f }, + { 0x00010001, 0x22000060, 0x02000000, 0x02186704 }, + { 0x00110001, 0x22000060, 0x02000000, 0x02186604 }, + { 0x02600031, 0x20800021, 0x408d07e0, 0x00000200 }, + { 0x00800001, 0x2380012d, 0x008900c0, 0x00000000 }, + { 0x00800001, 0x23a0012d, 0x00890100, 0x00000000 }, + { 0x00800001, 0x23c0012d, 0x008900c8, 0x00000000 }, + { 0x00800001, 0x23e0012d, 0x00890108, 0x00000000 }, + { 0x00600401, 0x20c001a9, 0x00ab0380, 0x00000000 }, + { 0x00600801, 0x20d001a9, 0x00ab0382, 0x00000000 }, + { 0x00600401, 0x20e001a9, 0x00ab0384, 0x00000000 }, + { 0x00600801, 0x20f001a9, 0x00ab0386, 0x00000000 }, + { 0x00600401, 0x210001a9, 0x00ab03c0, 0x00000000 }, + { 0x00600801, 0x211001a9, 0x00ab03c2, 0x00000000 }, + { 0x00600401, 0x212001a9, 0x00ab03c4, 0x00000000 }, + { 0x00600801, 0x213001a9, 0x00ab03c6, 0x00000000 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00400040 }, + { 0x00800008, 0x2340352d, 0x00009050, 0x008d0220 }, + { 0x00800008, 0x2360352d, 0x00009052, 0x008d0220 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000020 }, + { 0x02600005, 0x20003dac, 0x00ae0340, 0x00010001 }, + { 0x02600005, 0x20003dac, 0x02ae0360, 0x00010001 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00400040 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x00c000c0 }, + { 0x00200401, 0x25d0022d, 0x004590c0, 0x00000000 }, + { 0x00400801, 0x25d40231, 0x006990a0, 0x00000000 }, + { 0x00200001, 0x25d80109, 0x00450600, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0xfffffc0c }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00410041 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x00c100c1 }, + { 0x00200401, 0x25d0022d, 0x004590c8, 0x00000000 }, + { 0x00400801, 0x25d40231, 0x006990b0, 0x00000000 }, + { 0x00200001, 0x26000128, 0x004505d8, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0xfffffbfe }, + { 0x00800008, 0x2340352d, 0x00009042, 0x008d0220 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00e000e0 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x01000100 }, + { 0x00200401, 0x25d0022d, 0x004590c4, 0x00000000 }, + { 0x00400801, 0x25d40231, 0x006990a4, 0x00000000 }, + { 0x02600005, 0x20003dac, 0x00ae0340, 0x00010001 }, + { 0x00000001, 0x260201e8, 0x00000000, 0x00000000 }, + { 0x00000401, 0x25da01e9, 0x00000000, 0x00000000 }, + { 0x00000801, 0x25d80109, 0x00000600, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0xfffffbe8 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00e100e1 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x01010101 }, + { 0x00200401, 0x25d0022d, 0x004590cc, 0x00000000 }, + { 0x00400801, 0x25d40231, 0x006990b4, 0x00000000 }, + { 0x00200001, 0x26000128, 0x004505d8, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0xfffffbda }, + { 0x02000005, 0x20003dac, 0x0200002a, 0x00020002 }, + { 0x00000401, 0x27e001a1, 0x000005c4, 0x00000000 }, + { 0x00000c0c, 0x27e43da1, 0x000005c6, 0x00010001 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x00070003 }, + { 0x00600401, 0x2340012d, 0x00890040, 0x00000000 }, + { 0x00600801, 0x2350012d, 0x00890048, 0x00000000 }, + { 0x00600001, 0x204001aa, 0x00270340, 0x00000000 }, + { 0x00600001, 0x205001aa, 0x00270350, 0x00000000 }, + { 0x00010001, 0x22000060, 0x02000000, 0x04082704 }, + { 0x00110001, 0x22000060, 0x02000000, 0x04082604 }, + { 0x01600031, 0x20000020, 0x508d07e0, 0x00000200 }, + { 0x00800001, 0x2380012d, 0x008900c0, 0x00000000 }, + { 0x00800001, 0x23a0012d, 0x00890100, 0x00000000 }, + { 0x00800001, 0x23c0012d, 0x008900c8, 0x00000000 }, + { 0x00800001, 0x23e0012d, 0x00890108, 0x00000000 }, + { 0x00600401, 0x20c001a9, 0x00ab0380, 0x00000000 }, + { 0x00600801, 0x20d001a9, 0x00ab0382, 0x00000000 }, + { 0x00600401, 0x20e001a9, 0x00ab0384, 0x00000000 }, + { 0x00600801, 0x20f001a9, 0x00ab0386, 0x00000000 }, + { 0x00600401, 0x210001a9, 0x00ab03c0, 0x00000000 }, + { 0x00600801, 0x211001a9, 0x00ab03c2, 0x00000000 }, + { 0x00600401, 0x212001a9, 0x00ab03c4, 0x00000000 }, + { 0x00600801, 0x213001a9, 0x00ab03c6, 0x00000000 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00800080 }, + { 0x00800008, 0x2340352d, 0x00009054, 0x008d0220 }, + { 0x00800008, 0x2360352d, 0x00009056, 0x008d0220 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000020 }, + { 0x02600005, 0x20003dac, 0x00ae0340, 0x00010001 }, + { 0x02600005, 0x20003dac, 0x02ae0360, 0x00010001 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00800080 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x00c000c0 }, + { 0x00200401, 0x25d0022d, 0x004590c2, 0x00000000 }, + { 0x00400801, 0x25d40231, 0x006990a8, 0x00000000 }, + { 0x00200001, 0x25d80109, 0x00450600, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0xfffffb92 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00810081 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x00c100c1 }, + { 0x00200401, 0x25d0022d, 0x004590ca, 0x00000000 }, + { 0x00400801, 0x25d40231, 0x006990b8, 0x00000000 }, + { 0x00200001, 0x26000128, 0x004505d8, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0xfffffb84 }, + { 0x00800008, 0x2340352d, 0x00009048, 0x008d0220 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00e000e0 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x01000100 }, + { 0x00200401, 0x25d0022d, 0x004590c4, 0x00000000 }, + { 0x00400801, 0x25d40231, 0x006990ac, 0x00000000 }, + { 0x02600005, 0x20003dac, 0x00ae0340, 0x00010001 }, + { 0x00000001, 0x260201e8, 0x00000000, 0x00000000 }, + { 0x00000401, 0x25da01e9, 0x00000000, 0x00000000 }, + { 0x00000801, 0x25d80109, 0x00000600, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0xfffffb6e }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00e100e1 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x01010101 }, + { 0x00200401, 0x25d0022d, 0x004590cc, 0x00000000 }, + { 0x00400801, 0x25d40231, 0x006990bc, 0x00000000 }, + { 0x00200001, 0x26000128, 0x004505d8, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0xfffffb60 }, + { 0x02000005, 0x20003dac, 0x0200002a, 0x00020002 }, + { 0x00000401, 0x27e001a1, 0x000005c0, 0x00000000 }, + { 0x00000c0c, 0x27e43da1, 0x000005c2, 0x00010001 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x0007000f }, + { 0x00802001, 0x20400022, 0x008d00c0, 0x00000000 }, + { 0x00802001, 0x20800022, 0x008d0100, 0x00000000 }, + { 0x00010001, 0x22000060, 0x02000000, 0x0a082704 }, + { 0x00110001, 0x22000060, 0x02000000, 0x0a082604 }, + { 0x01600031, 0x20000020, 0x508d07e0, 0x00000200 }, + { 0x02000005, 0x20003dac, 0x0200002a, 0x00020002 }, + { 0x00000401, 0x27e001a1, 0x000005c8, 0x00000000 }, + { 0x00000c0c, 0x27e43da1, 0x000005ca, 0x00010001 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x0001000f }, + { 0x00600001, 0x20400022, 0x008d0080, 0x00000000 }, + { 0x00010001, 0x22000060, 0x02000000, 0x0418a704 }, + { 0x00110001, 0x22000060, 0x02000000, 0x0418a604 }, + { 0x01600031, 0x26400021, 0x508d07e0, 0x00000200 }, + { 0x00600401, 0x2340012d, 0x008500cc, 0x00000000 }, + { 0x00600801, 0x2350012d, 0x0085010c, 0x00000000 }, + { 0x00800001, 0x236001ad, 0x002e0340, 0x00000000 }, + { 0x00600001, 0x202000a2, 0x008d0360, 0x00000000 }, + { 0x00000008, 0x27e03d29, 0x00000026, 0x00010001 }, + { 0x00800031, 0x20001d28, 0x608d07e0, 0x04080020 }, + { 0x00600001, 0x26400021, 0x008d0640, 0x00000000 }, + { 0x00600001, 0x260001e1, 0x00000000, 0x00000000 }, + { 0x00000009, 0x26143da1, 0x000005e2, 0x00120012 }, + { 0x00000440, 0x26141c21, 0x00000614, 0x00020000 }, + { 0x00000c01, 0x26120129, 0x0000000c, 0x00000000 }, + { 0x00000c01, 0x26100169, 0x00000000, 0x12121212 }, + { 0x00400801, 0x26000171, 0x00000000, 0xffffffff }, + { 0x00600031, 0x20001c20, 0x308d0600, 0x82008002 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00020002 }, + { 0x02000005, 0x20003dac, 0x0200002a, 0x00020002 }, + { 0x00000440, 0x27e03da1, 0x000005c0, 0x000c000c }, + { 0x00000c0c, 0x27e43da1, 0x000005c2, 0x00010001 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x00070003 }, + { 0x00018022, 0x34001c00, 0x00001400, 0x00000006 }, + { 0x00000001, 0x22000060, 0x00000000, 0x02186004 }, + { 0x00010040, 0x27e43ca5, 0x020007e4, 0x00080008 }, + { 0x00008024, 0x34001c00, 0x00001400, 0x00010008 }, + { 0x00010001, 0x22000060, 0x02000000, 0x02186704 }, + { 0x00110001, 0x22000060, 0x02000000, 0x02186604 }, + { 0x00008025, 0x20000000, 0x00000000, 0x00000000 }, + { 0x02600031, 0x23400025, 0x408d07e0, 0x00000200 }, + { 0x00800001, 0x236001ad, 0x002e0340, 0x00000000 }, + { 0x00600001, 0x202000a2, 0x008d0360, 0x00000000 }, + { 0x00000008, 0x27e03d29, 0x00000026, 0x00010001 }, + { 0x00800031, 0x20001d28, 0x608d07e0, 0x04080020 }, + { 0x00600001, 0x260001e1, 0x00000000, 0x00000000 }, + { 0x00000009, 0x26143da1, 0x000005e2, 0x00120012 }, + { 0x00000440, 0x26141c21, 0x00000614, 0x00020000 }, + { 0x00000c01, 0x26120129, 0x0000000c, 0x00000000 }, + { 0x00000c01, 0x26100169, 0x00000000, 0x12121212 }, + { 0x00400801, 0x26000171, 0x00000000, 0xffffffff }, + { 0x00600031, 0x20001c20, 0x308d0600, 0x82008002 }, + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x00600001, 0x27e00021, 0x008d0000, 0x00000000 }, + { 0x00a02001, 0x20400169, 0x00000000, 0x00000000 }, + { 0x00000001, 0x206601ed, 0x00000000, 0x00010001 }, + { 0x00000009, 0x20663dad, 0x00000066, 0x000a000a }, + { 0x00000001, 0x22600169, 0x00000000, 0x00010001 }, + { 0x00000008, 0x22403dad, 0x00000026, 0x00010001 }, + { 0x00000041, 0x224235ad, 0x00000020, 0x00000022 }, + { 0x00600001, 0x20200022, 0x008d0000, 0x00000000 }, + { 0x00000001, 0x203c0022, 0x00000018, 0x00000000 }, + { 0x00000001, 0x203f01f2, 0x00000000, 0x00000000 }, + { 0x00000001, 0x202c00e2, 0x00000000, 0x00000000 }, + { 0x00000001, 0x202c010a, 0x00000e00, 0x00000000 }, + { 0x00600001, 0x20400021, 0x008d0020, 0x00000000 }, + { 0x00400001, 0x205401ed, 0x00000000, 0x00000000 }, + { 0x00200040, 0x20583dad, 0x00450020, 0xffffffff }, + { 0x00000001, 0x22000060, 0x00000000, 0x06080000 }, + { 0x00600001, 0x26000021, 0x008d0000, 0x00000000 }, + { 0x00000001, 0x26140061, 0x00000000, 0x00c00400 }, + { 0x00000001, 0x26100169, 0x00000000, 0x12121212 }, + { 0x07600031, 0x26201c21, 0x308d0600, 0x02000000 }, + { 0x00000001, 0x22a00169, 0x00000000, 0x01400140 }, + { 0x00000040, 0x20283c22, 0x00000008, 0x00200020 }, + { 0x00000001, 0x203801e2, 0x00000000, 0x00010001 }, + { 0x00800001, 0x204001ae, 0x00b10020, 0x00000000 }, + { 0x00000008, 0x27e03d29, 0x000002a0, 0x00010001 }, + { 0x00800031, 0x20000128, 0x608d07e0, 0x00000200 }, + { 0x00000006, 0x203025a2, 0x00000066, 0x000002a0 }, + { 0x01600031, 0x20001c00, 0x708d0000, 0x02000001 }, + { 0x00000001, 0x20300022, 0x00000010, 0x00000000 }, + { 0x00000001, 0x22a00169, 0x00000000, 0x00000000 }, + { 0x00000001, 0x22600169, 0x00000000, 0x00020002 }, + { 0x00200401, 0x208000e5, 0x00000000, 0x00000000 }, + { 0x00000c01, 0x208800e5, 0x00000000, 0xffffffc6 }, + { 0x00000801, 0x208c00e5, 0x00000000, 0xffffffca }, + { 0x00200001, 0x260001ec, 0x00000000, 0x00000000 }, + { 0x00600001, 0x20000022, 0x008d07e0, 0x00000000 }, + { 0x00000040, 0x20283c22, 0x00000008, 0x00100010 }, + { 0x00000001, 0x206001ed, 0x00000000, 0x00020002 }, + { 0x00000001, 0x206201ad, 0x0000005a, 0x00000000 }, + { 0x00000001, 0x20a001ed, 0x00000000, 0x00000000 }, + { 0x00200001, 0x228001ed, 0x00000000, 0x00000000 }, + { 0x00802001, 0x20c00061, 0x00000000, 0x00ff00ff }, + { 0x00802001, 0x21000061, 0x00000000, 0x00ff00ff }, + { 0x00802001, 0x21400061, 0x00000000, 0x00ff00ff }, + { 0x00802001, 0x21800061, 0x00000000, 0x00ff00ff }, + { 0x00802001, 0x21c00061, 0x00000000, 0x00ff00ff }, + { 0x00000041, 0x22083dac, 0x00000056, 0x00040004 }, + { 0x05000010, 0x200035ac, 0x02000280, 0x00000240 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x00000004 }, + { 0x00000040, 0x22803dad, 0x00000280, 0xffffffff }, + { 0x00000030, 0x32000084, 0x00001200, 0x00000000 }, + { 0x01000010, 0x20002d28, 0x000090c2, 0x00000000 }, + { 0x03000010, 0x200035ac, 0x02000054, 0x00000058 }, + { 0x00000041, 0x22a03dad, 0x00000056, 0x00040004 }, + { 0x00010220, 0x34001c00, 0x00001400, 0xfffffff4 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x00000014 }, + { 0x00200001, 0xb0c00229, 0x00450054, 0x00000000 }, + { 0x00200040, 0x22803dad, 0x00450280, 0x00010001 }, + { 0x00000001, 0x20300022, 0x00000010, 0x00000000 }, + { 0x00000001, 0x20380122, 0x00000260, 0x00000000 }, + { 0x00800001, 0x204001ae, 0x00b10040, 0x00000000 }, + { 0x00000008, 0x20003d2a, 0x000002a0, 0x00010001 }, + { 0x00000040, 0x22602d29, 0x00000260, 0x00020002 }, + { 0x00800031, 0x20000008, 0x608d0000, 0x00000200 }, + { 0x00000006, 0x203025a2, 0x00000066, 0x000002a0 }, + { 0x01600031, 0x20001c00, 0x708d0000, 0x02000001 }, + { 0x04200010, 0x200035ac, 0x00450054, 0x00450060 }, + { 0x00010040, 0x20a03dad, 0x02000056, 0x00010001 }, + { 0x05200010, 0x200035ac, 0x02450280, 0x00450240 }, + { 0x00000001, 0x240001ec, 0x00000000, 0x00040004 }, + { 0x00000048, 0x22083dac, 0x00000056, 0x00040004 }, + { 0x00200040, 0x205455ad, 0x00450054, 0x00450034 }, + { 0x02000010, 0x20003d8c, 0x00000600, 0x00010001 }, + { 0x00000041, 0x220e3d8c, 0x00000602, 0x00040004 }, + { 0x00010041, 0x22083dac, 0x000000a0, 0x00040004 }, + { 0x00010401, 0x205601ad, 0x000000a0, 0x00000000 }, + { 0x00010840, 0x20543d2d, 0x000090c0, 0x00010001 }, + { 0x00000220, 0x34001400, 0x00001400, 0x00009c80 }, + { 0x01000010, 0x20003dac, 0x02000280, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x00000006 }, + { 0x00000030, 0x32000084, 0x00001200, 0x00000000 }, + { 0x00000040, 0x22803dad, 0x00000280, 0xffffffff }, + { 0x00000220, 0x34001c00, 0x00001400, 0xfffffff6 }, + { 0x05000010, 0x200035ac, 0x00000240, 0x00000026 }, + { 0x00010220, 0x34001c00, 0x00001400, 0xfffffffc }, + { 0x07600031, 0x20001c20, 0x30000000, 0x02000001 }, + { 0x01600031, 0x20001c24, 0x708d0000, 0x82000000 }, + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x00600001, 0x27e00021, 0x008d0000, 0x00000000 }, + { 0x00400441, 0x45c03dad, 0x00000034, 0x00100010 }, + { 0x00400841, 0x45c23dad, 0x00000036, 0x00200020 }, + { 0x00200001, 0x260001ec, 0x00000000, 0x00000000 }, + { 0x00000001, 0x25e20129, 0x00000036, 0x00000000 }, + { 0x00000041, 0x25e435a1, 0x00000020, 0x00000036 }, + { 0x00000040, 0x25e43421, 0x000005e4, 0x00000034 }, + { 0x00000041, 0x25e42c21, 0x000005e4, 0x00800080 }, + { 0x00000040, 0x25c43dad, 0x000005c4, 0xfffcfffc }, + { 0x00000040, 0x25ca3dad, 0x000005ca, 0xfffcfffc }, + { 0x00000005, 0x202a3dad, 0x0000002a, 0xfffdfffd }, + { 0x02000005, 0x20002d2c, 0x0200002a, 0x00020002 }, + { 0x00000001, 0x27e80021, 0x000005e4, 0x00000000 }, + { 0x00010040, 0x27e83c21, 0x020007e8, 0x00400040 }, + { 0x01600031, 0x22401c21, 0x408d07e0, 0x02885800 }, + { 0x00000001, 0x220801ec, 0x00000000, 0x02400240 }, + { 0x01800005, 0x20002d28, 0x02b19040, 0xffffffff }, + { 0x02000005, 0x20003e2c, 0x00009030, 0x00010001 }, + { 0x00000005, 0x25ec2e29, 0x00009002, 0x000a000a }, + { 0x00000005, 0x25ea2e29, 0x00009002, 0x00060006 }, + { 0x000b0220, 0x34001c00, 0x02001400, 0x00000252 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000250 }, + { 0x01000010, 0x20003d2c, 0x000005ec, 0x00080008 }, + { 0x00000005, 0x25e03d8d, 0x00000600, 0x00010001 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00020002 }, + { 0x02000005, 0x20003dac, 0x0200002a, 0x00020002 }, + { 0x00200401, 0x27e001a5, 0x004505c0, 0x00000000 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x000f000f }, + { 0x00018022, 0x34001c00, 0x00001400, 0x00000006 }, + { 0x00000001, 0x22000060, 0x00000000, 0x0288a001 }, + { 0x00010040, 0x27e43ca5, 0x020007e4, 0x00100010 }, + { 0x00008024, 0x34001c00, 0x00001400, 0x0001000a }, + { 0x00010001, 0x22000060, 0x02000000, 0x0288e701 }, + { 0x00110001, 0x22000060, 0x02000000, 0x0288e601 }, + { 0x0000000c, 0x27e43ca5, 0x000007e4, 0x00010001 }, + { 0x00008025, 0x20000000, 0x00000000, 0x00000000 }, + { 0x01600031, 0x20c00021, 0x408d07e0, 0x00000200 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00020002 }, + { 0x02000005, 0x20003dac, 0x0200002a, 0x00020002 }, + { 0x00200401, 0x27e001a1, 0x004505c4, 0x00000000 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x000f0003 }, + { 0x00018022, 0x34001c00, 0x00001400, 0x00000006 }, + { 0x00000001, 0x22000060, 0x00000000, 0x02286003 }, + { 0x00010040, 0x27e43ca5, 0x020007e4, 0x00100010 }, + { 0x00008024, 0x34001c00, 0x00001400, 0x0001000a }, + { 0x00010001, 0x22000060, 0x02000000, 0x02286703 }, + { 0x00110001, 0x22000060, 0x02000000, 0x02286603 }, + { 0x0000000c, 0x27e43ca5, 0x000007e4, 0x00010001 }, + { 0x00008025, 0x20000000, 0x00000000, 0x00000000 }, + { 0x02600031, 0x23400025, 0x408d07e0, 0x00000200 }, + { 0x00800401, 0x23800231, 0x00a900c0, 0x00000000 }, + { 0x00800801, 0x23900231, 0x00a90100, 0x00000000 }, + { 0x00800401, 0x23a00231, 0x00a90140, 0x00000000 }, + { 0x00800801, 0x23b00231, 0x00a90180, 0x00000000 }, + { 0x00800401, 0x23c00231, 0x00a900c4, 0x00000000 }, + { 0x00800801, 0x23d00231, 0x00a90104, 0x00000000 }, + { 0x00800401, 0x23e00231, 0x00a90144, 0x00000000 }, + { 0x00800801, 0x23f00231, 0x00a90184, 0x00000000 }, + { 0x00800401, 0x24000231, 0x00a900c8, 0x00000000 }, + { 0x00800801, 0x24100231, 0x00a90108, 0x00000000 }, + { 0x00800401, 0x24200231, 0x00a90148, 0x00000000 }, + { 0x00800801, 0x24300231, 0x00a90188, 0x00000000 }, + { 0x00800401, 0x24400231, 0x00a900cc, 0x00000000 }, + { 0x00800801, 0x24500231, 0x00a9010c, 0x00000000 }, + { 0x00800401, 0x24600231, 0x00a9014c, 0x00000000 }, + { 0x00800801, 0x24700231, 0x00a9018c, 0x00000000 }, + { 0x00800401, 0x20c00231, 0x00cf0380, 0x00000000 }, + { 0x00800801, 0x20d00231, 0x00cf0381, 0x00000000 }, + { 0x00800401, 0x20e00231, 0x00cf0382, 0x00000000 }, + { 0x00800801, 0x20f00231, 0x00cf0383, 0x00000000 }, + { 0x00800401, 0x21000231, 0x00cf03c0, 0x00000000 }, + { 0x00800801, 0x21100231, 0x00cf03c1, 0x00000000 }, + { 0x00800401, 0x21200231, 0x00cf03c2, 0x00000000 }, + { 0x00800801, 0x21300231, 0x00cf03c3, 0x00000000 }, + { 0x00800401, 0x21400231, 0x00cf0400, 0x00000000 }, + { 0x00800801, 0x21500231, 0x00cf0401, 0x00000000 }, + { 0x00800401, 0x21600231, 0x00cf0402, 0x00000000 }, + { 0x00800801, 0x21700231, 0x00cf0403, 0x00000000 }, + { 0x00800401, 0x21800231, 0x00cf0440, 0x00000000 }, + { 0x00800801, 0x21900231, 0x00cf0441, 0x00000000 }, + { 0x00800401, 0x21a00231, 0x00cf0442, 0x00000000 }, + { 0x00800801, 0x21b00231, 0x00cf0443, 0x00000000 }, + { 0x00800401, 0x20400231, 0x00cf0340, 0x00000000 }, + { 0x00800801, 0x20500231, 0x00cf0341, 0x00000000 }, + { 0x00800401, 0x20600231, 0x00cf0342, 0x00000000 }, + { 0x00800801, 0x20700231, 0x00cf0343, 0x00000000 }, + { 0x01600010, 0x20003d2c, 0x000005ea, 0x00040004 }, + { 0x01600010, 0x20003d2c, 0x020005ea, 0x00020002 }, + { 0x00800001, 0x21c00229, 0x00009080, 0x00000000 }, + { 0x00800001, 0x21e00229, 0x00009081, 0x00000000 }, + { 0x00800001, 0x22000229, 0x00289060, 0x00000000 }, + { 0x00610401, 0x41c00229, 0x00009080, 0x00000000 }, + { 0x00610801, 0x41c20229, 0x00009090, 0x00000000 }, + { 0x00610401, 0x41e00229, 0x00009081, 0x00000000 }, + { 0x00610801, 0x41e20229, 0x00009091, 0x00000000 }, + { 0x00610401, 0x42000229, 0x00249060, 0x00000000 }, + { 0x00610801, 0x42020229, 0x00249098, 0x00000000 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00400040 }, + { 0x00610401, 0x21c00229, 0x02009080, 0x00000000 }, + { 0x00610801, 0x21d00229, 0x02009090, 0x00000000 }, + { 0x00610401, 0x21e00229, 0x02009081, 0x00000000 }, + { 0x00610801, 0x21f00229, 0x02009091, 0x00000000 }, + { 0x00610401, 0x22000229, 0x02249060, 0x00000000 }, + { 0x00610801, 0x22100229, 0x02249098, 0x00000000 }, + { 0x00800008, 0x25a03d29, 0x008d01c0, 0x00020002 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00400040 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x00c000c0 }, + { 0x00200001, 0x25d80129, 0x00459050, 0x00000000 }, + { 0x00800040, 0x25a03d29, 0x00b105a0, 0x00020002 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x000001b4 }, + { 0x00800008, 0x25a03e29, 0x00009084, 0x00020002 }, + { 0x00800001, 0x21c00229, 0x00009084, 0x00000000 }, + { 0x00800001, 0x21e00229, 0x00009085, 0x00000000 }, + { 0x00000001, 0x25da01e9, 0x00000000, 0x00000000 }, + { 0x00800040, 0x25a03d29, 0x00b105a0, 0x00020002 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00200020 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00c000c0 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x01000100 }, + { 0x00000001, 0x25d80129, 0x00009040, 0x00000000 }, + { 0x00800001, 0x22000229, 0x00289064, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x0000019c }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00100010 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x01000100 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x01400140 }, + { 0x00000001, 0x25d80129, 0x00009042, 0x00000000 }, + { 0x00800001, 0x22000229, 0x00289068, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x0000018e }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00200020 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x01400140 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x01800180 }, + { 0x00000001, 0x25d80129, 0x00009044, 0x00000000 }, + { 0x00800001, 0x22000229, 0x0028906c, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x00000180 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00020002 }, + { 0x02000005, 0x20003dac, 0x0200002a, 0x00020002 }, + { 0x00200401, 0x27e001a1, 0x004505c4, 0x00000000 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x000f0003 }, + { 0x00800401, 0x23400231, 0x00a90040, 0x00000000 }, + { 0x00800801, 0x23500231, 0x00a90044, 0x00000000 }, + { 0x00800401, 0x23600231, 0x00a90048, 0x00000000 }, + { 0x00800801, 0x23700231, 0x00a9004c, 0x00000000 }, + { 0x00800001, 0x20400232, 0x002b0340, 0x00000000 }, + { 0x00800001, 0x20500232, 0x002b0350, 0x00000000 }, + { 0x00800001, 0x20600232, 0x002b0360, 0x00000000 }, + { 0x00800001, 0x20700232, 0x002b0370, 0x00000000 }, + { 0x00018022, 0x34001c00, 0x00001400, 0x00000006 }, + { 0x00000001, 0x22000060, 0x00000000, 0x06082003 }, + { 0x00010040, 0x27e43ca5, 0x020007e4, 0x00100010 }, + { 0x00008024, 0x34001c00, 0x00001400, 0x0001000a }, + { 0x00010001, 0x22000060, 0x02000000, 0x06082703 }, + { 0x00110001, 0x22000060, 0x02000000, 0x06082603 }, + { 0x0000000c, 0x27e43ca5, 0x000007e4, 0x00010001 }, + { 0x00008025, 0x20000000, 0x00000000, 0x00000000 }, + { 0x01600031, 0x20000020, 0x508d07e0, 0x00000200 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00020002 }, + { 0x02000005, 0x20003dac, 0x0200002a, 0x00020002 }, + { 0x00200401, 0x27e001a1, 0x004505c8, 0x00000000 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x0003000f }, + { 0x00018022, 0x34001c00, 0x00001400, 0x00000010 }, + { 0x00000001, 0x22000060, 0x00000000, 0x02286003 }, + { 0x00010040, 0x27e43ca5, 0x020007e4, 0x00100010 }, + { 0x01000005, 0x20003dac, 0x020005e0, 0x00010001 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x00000006 }, + { 0x00000440, 0x27e43ca5, 0x000007e4, 0xfffcfffc }, + { 0x00000801, 0x27e80061, 0x00000000, 0x0007000f }, + { 0x00000040, 0x22000c00, 0x00000200, 0x00200000 }, + { 0x00008024, 0x34001c00, 0x00001400, 0x0001000c }, + { 0x0000000c, 0x27e43da5, 0x000005c2, 0x00010001 }, + { 0x00010001, 0x22000060, 0x02000000, 0x02286703 }, + { 0x00110001, 0x22000060, 0x02000000, 0x02286603 }, + { 0x00000040, 0x27e43ca5, 0x000007e4, 0xfffcfffc }, + { 0x00008025, 0x20000000, 0x00000000, 0x00000000 }, + { 0x01600031, 0x20400021, 0x408d07e0, 0x00000200 }, + { 0x00800401, 0x23800231, 0x00a900c0, 0x00000000 }, + { 0x00800801, 0x23900231, 0x00a90100, 0x00000000 }, + { 0x00800401, 0x23a00231, 0x00a90140, 0x00000000 }, + { 0x00800801, 0x23b00231, 0x00a90180, 0x00000000 }, + { 0x00800401, 0x23c00231, 0x00a900c4, 0x00000000 }, + { 0x00800801, 0x23d00231, 0x00a90104, 0x00000000 }, + { 0x00800401, 0x23e00231, 0x00a90144, 0x00000000 }, + { 0x00800801, 0x23f00231, 0x00a90184, 0x00000000 }, + { 0x00800401, 0x24000231, 0x00a900c8, 0x00000000 }, + { 0x00800801, 0x24100231, 0x00a90108, 0x00000000 }, + { 0x00800401, 0x24200231, 0x00a90148, 0x00000000 }, + { 0x00800801, 0x24300231, 0x00a90188, 0x00000000 }, + { 0x00800401, 0x24400231, 0x00a900cc, 0x00000000 }, + { 0x00800801, 0x24500231, 0x00a9010c, 0x00000000 }, + { 0x00800401, 0x24600231, 0x00a9014c, 0x00000000 }, + { 0x00800801, 0x24700231, 0x00a9018c, 0x00000000 }, + { 0x00800401, 0x20c00231, 0x00cf0380, 0x00000000 }, + { 0x00800801, 0x20d00231, 0x00cf0381, 0x00000000 }, + { 0x00800401, 0x20e00231, 0x00cf0382, 0x00000000 }, + { 0x00800801, 0x20f00231, 0x00cf0383, 0x00000000 }, + { 0x00800401, 0x21000231, 0x00cf03c0, 0x00000000 }, + { 0x00800801, 0x21100231, 0x00cf03c1, 0x00000000 }, + { 0x00800401, 0x21200231, 0x00cf03c2, 0x00000000 }, + { 0x00800801, 0x21300231, 0x00cf03c3, 0x00000000 }, + { 0x00800401, 0x21400231, 0x00cf0400, 0x00000000 }, + { 0x00800801, 0x21500231, 0x00cf0401, 0x00000000 }, + { 0x00800401, 0x21600231, 0x00cf0402, 0x00000000 }, + { 0x00800801, 0x21700231, 0x00cf0403, 0x00000000 }, + { 0x00800401, 0x21800231, 0x00cf0440, 0x00000000 }, + { 0x00800801, 0x21900231, 0x00cf0441, 0x00000000 }, + { 0x00800401, 0x21a00231, 0x00cf0442, 0x00000000 }, + { 0x00800801, 0x21b00231, 0x00cf0443, 0x00000000 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00800080 }, + { 0x00000001, 0x260201ac, 0x000005e0, 0x00000000 }, + { 0x00800008, 0x25a03e29, 0x00009082, 0x00020002 }, + { 0x00200001, 0x25d80129, 0x00459054, 0x00000000 }, + { 0x00800001, 0x21c00229, 0x00009082, 0x00000000 }, + { 0x00800001, 0x21e00229, 0x00009083, 0x00000000 }, + { 0x00800001, 0x22000229, 0x00289070, 0x00000000 }, + { 0x00800040, 0x25a03d29, 0x00b105a0, 0x00020002 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000050 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x0000000a }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00400040 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x00c000c0 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x000000d4 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000044 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x05000500 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x05400540 }, + { 0x00800001, 0x25000129, 0x00ad0040, 0x00000000 }, + { 0x00800001, 0x25200129, 0x00ad0080, 0x00000000 }, + { 0x00800001, 0x25400129, 0x00ad00c0, 0x00000000 }, + { 0x00800001, 0x25600129, 0x00ad0100, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x000000c2 }, + { 0x00600001, 0x20600129, 0x008d0510, 0x00000000 }, + { 0x00600001, 0x20800129, 0x008d0520, 0x00000000 }, + { 0x00600001, 0x20a00129, 0x008d0530, 0x00000000 }, + { 0x00600001, 0x20c00129, 0x008d0540, 0x00000000 }, + { 0x00600001, 0x20e00129, 0x008d0550, 0x00000000 }, + { 0x00600001, 0x21000129, 0x008d0560, 0x00000000 }, + { 0x00800008, 0x25a03e29, 0x00009092, 0x00020002 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x05000500 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x05400540 }, + { 0x00800001, 0x25000129, 0x00ad0050, 0x00000000 }, + { 0x00800001, 0x25200129, 0x00ad0090, 0x00000000 }, + { 0x00800001, 0x25400129, 0x00ad00d0, 0x00000000 }, + { 0x00800001, 0x25600129, 0x00ad0110, 0x00000000 }, + { 0x00200001, 0x25d80129, 0x0045905c, 0x00000000 }, + { 0x00800001, 0x21c00229, 0x00009092, 0x00000000 }, + { 0x00800001, 0x21e00229, 0x00009093, 0x00000000 }, + { 0x00800001, 0x22000229, 0x0028909c, 0x00000000 }, + { 0x00800040, 0x25a03d29, 0x00b105a0, 0x00020002 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x0000009a }, + { 0x00600001, 0x20700129, 0x008d0510, 0x00000000 }, + { 0x00600001, 0x20900129, 0x008d0520, 0x00000000 }, + { 0x00600001, 0x20b00129, 0x008d0530, 0x00000000 }, + { 0x00600001, 0x20d00129, 0x008d0540, 0x00000000 }, + { 0x00600001, 0x20f00129, 0x008d0550, 0x00000000 }, + { 0x00600001, 0x21100129, 0x008d0560, 0x00000000 }, + { 0x00800008, 0x25a03e29, 0x00009084, 0x00020002 }, + { 0x00800001, 0x21c00229, 0x00009084, 0x00000000 }, + { 0x00800001, 0x21e00229, 0x00009085, 0x00000000 }, + { 0x00000001, 0x25da01e9, 0x00000000, 0x00000000 }, + { 0x00800040, 0x25a03d29, 0x00b105a0, 0x00020002 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00200020 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00c000c0 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x01000100 }, + { 0x00000001, 0x25d80129, 0x00009046, 0x00000000 }, + { 0x00800001, 0x22000229, 0x00289074, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x00000076 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00100010 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x01000100 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x01400140 }, + { 0x00000001, 0x25d80129, 0x00009048, 0x00000000 }, + { 0x00800001, 0x22000229, 0x00289078, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x00000068 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00200020 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x01400140 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x01800180 }, + { 0x00000001, 0x25d80129, 0x0000904a, 0x00000000 }, + { 0x00800001, 0x22000229, 0x0028907c, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x0000005a }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00020002 }, + { 0x02000005, 0x20003dac, 0x0200002a, 0x00020002 }, + { 0x00200401, 0x27e001a1, 0x004505c0, 0x00000000 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x000f000f }, + { 0x00802001, 0x20400022, 0x008d00c0, 0x00000000 }, + { 0x00802001, 0x20800022, 0x008d0100, 0x00000000 }, + { 0x00802001, 0x20c00022, 0x008d0140, 0x00000000 }, + { 0x00802001, 0x21000022, 0x008d0180, 0x00000000 }, + { 0x00018022, 0x34001c00, 0x00001400, 0x00000006 }, + { 0x00000001, 0x22000060, 0x00000000, 0x12082003 }, + { 0x00010040, 0x27e43ca5, 0x020007e4, 0x00100010 }, + { 0x00008024, 0x34001c00, 0x00001400, 0x0001000a }, + { 0x00010001, 0x22000060, 0x02000000, 0x12082703 }, + { 0x00110001, 0x22000060, 0x02000000, 0x12082603 }, + { 0x0000000c, 0x27e43ca5, 0x000007e4, 0x00010001 }, + { 0x00008025, 0x20000000, 0x00000000, 0x00000000 }, + { 0x01600031, 0x20000020, 0x508d07e0, 0x00000200 }, + { 0x01800005, 0x20003dac, 0x020005e0, 0x00010001 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00020002 }, + { 0x00200401, 0x27e001a1, 0x004505c8, 0x00000000 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x0003000f }, + { 0x00812001, 0x20400022, 0x028d0040, 0x00000000 }, + { 0x00912001, 0x20400022, 0x028d0080, 0x00000000 }, + { 0x02000005, 0x20003dac, 0x0200002a, 0x00020002 }, + { 0x00018022, 0x34001c00, 0x00001400, 0x00000006 }, + { 0x00000001, 0x22000060, 0x00000000, 0x0618a003 }, + { 0x00010040, 0x27e43ca5, 0x020007e4, 0x00100010 }, + { 0x00008024, 0x34001c00, 0x00001400, 0x0001000c }, + { 0x0000000c, 0x27e43da5, 0x000005c2, 0x00010001 }, + { 0x00010001, 0x22000060, 0x02000000, 0x0618a703 }, + { 0x00110001, 0x22000060, 0x02000000, 0x0618a603 }, + { 0x00000040, 0x27e43ca5, 0x000007e4, 0xfffcfffc }, + { 0x00008025, 0x20000000, 0x00000000, 0x00000000 }, + { 0x01600031, 0x26400021, 0x508d07e0, 0x00000200 }, + { 0x01000005, 0x20003dac, 0x0000002a, 0x00020002 }, + { 0x00000006, 0x202a3dad, 0x0000002a, 0x00020002 }, + { 0x00010220, 0x34001c00, 0x00001400, 0xfffffd94 }, + { 0x00600001, 0x26400021, 0x008d0640, 0x00000000 }, + { 0x00600001, 0x260001e1, 0x00000000, 0x00000000 }, + { 0x00000009, 0x26143da1, 0x000005e2, 0x00120012 }, + { 0x00000440, 0x26141c21, 0x00000614, 0x00020000 }, + { 0x00000c01, 0x26120129, 0x0000000c, 0x00000000 }, + { 0x00000c01, 0x26100169, 0x00000000, 0x12121212 }, + { 0x00400801, 0x26000171, 0x00000000, 0xffffffff }, + { 0x00600031, 0x20001c20, 0x308d0600, 0x82008002 }, + { 0x00200001, 0x26000128, 0x004505d8, 0x00000000 }, + { 0x00800040, 0x2400462d, 0x00b19c00, 0x00b1d830 }, + { 0x00800040, 0x2340462d, 0x00b19820, 0x00b1d830 }, + { 0x00800040, 0x2360462d, 0x00b19c10, 0x00b1dc00 }, + { 0x05810010, 0x200025ac, 0x008d2400, 0x008d01c0 }, + { 0x05810010, 0x200025ac, 0x008d2340, 0x008d01e0 }, + { 0x05810010, 0x200025ac, 0x008d2360, 0x008d01e0 }, + { 0x00818022, 0x34001c00, 0x00001400, 0x000000c8 }, + { 0x00800040, 0x2440462d, 0x00b19810, 0x00b1d830 }, + { 0x00800040, 0x2460462d, 0x00b19c20, 0x00b1dc00 }, + { 0x00800201, 0x24a00129, 0x00b19820, 0x00000000 }, + { 0x00818022, 0x34001c00, 0x02001400, 0x00000066 }, + { 0x05800010, 0x200025ac, 0x028d2400, 0x008d05a0 }, + { 0x00800040, 0x2520462d, 0x00b19830, 0x00b19820 }, + { 0x00800040, 0x2540462d, 0x00b19c00, 0x00b19c10 }, + { 0x00000201, 0x26000108, 0x00000602, 0x00000000 }, + { 0x05810010, 0x200025ac, 0x028d2440, 0x008d01e0 }, + { 0x05810010, 0x200025ac, 0x008d2460, 0x008d01e0 }, + { 0x00818022, 0x34001c00, 0x02001400, 0x0000001e }, + { 0x00800040, 0x2560462d, 0x00b19810, 0x00b19800 }, + { 0x00800040, 0x238045ad, 0x008d0520, 0x00b19c00 }, + { 0x00800040, 0x24003d8c, 0x00b10400, 0x00040004 }, + { 0x00800040, 0x23a0458d, 0x00b10400, 0x00b19810 }, + { 0x00800048, 0x24003dac, 0x008d0560, 0x00020002 }, + { 0x80800008, 0x43c03d91, 0x00b10400, 0x00030003 }, + { 0x00800040, 0x24003dac, 0x00b103a0, 0xfffefffe }, + { 0x80800008, 0x43603d91, 0x00b10400, 0x00020002 }, + { 0x00800040, 0x2400362c, 0x00b19c10, 0x00b10380 }, + { 0x00800040, 0x2400358c, 0x00b10400, 0x00b103a0 }, + { 0x80800008, 0x43403d91, 0x00b10400, 0x00030003 }, + { 0x00800001, 0xb8100231, 0x00ae03c0, 0x00000000 }, + { 0x00800001, 0xb8200231, 0x00ae0360, 0x00000000 }, + { 0x00800001, 0xb8300231, 0x00ae0340, 0x00000000 }, + { 0x00808024, 0x34001c00, 0x00001400, 0x0001000e }, + { 0x00800040, 0x2400362c, 0x00b19820, 0x008d0520 }, + { 0x00800040, 0x2400458c, 0x00b10400, 0x00b19c10 }, + { 0x00800040, 0x24003d8c, 0x00b10400, 0x00020002 }, + { 0x80800008, 0x43403d91, 0x00b10400, 0x00020002 }, + { 0x00800001, 0xb8300231, 0x00ae0340, 0x00000000 }, + { 0x00008025, 0x20000000, 0x00000000, 0x00000000 }, + { 0x00818022, 0x34001c00, 0x00001400, 0x0000001e }, + { 0x00800040, 0x2580462d, 0x00b19c20, 0x00b19c30 }, + { 0x00800040, 0x238045ad, 0x008d0540, 0x008d04b0 }, + { 0x00800040, 0x24003d8c, 0x00b10400, 0x00040004 }, + { 0x00800040, 0x23a0458d, 0x00b10400, 0x00b19c20 }, + { 0x00800048, 0x24003dac, 0x008d0580, 0x00020002 }, + { 0x80800008, 0x43c03d91, 0x00b10400, 0x00030003 }, + { 0x00800040, 0x24003dac, 0x00b103a0, 0xfffefffe }, + { 0x80800008, 0x43603d91, 0x00b10400, 0x00020002 }, + { 0x00800040, 0x2400362c, 0x008d04a0, 0x00b10380 }, + { 0x00800040, 0x2400358c, 0x00b10400, 0x00b103a0 }, + { 0x80800008, 0x43403d91, 0x00b10400, 0x00030003 }, + { 0x00800001, 0xbc200231, 0x00ae03c0, 0x00000000 }, + { 0x00800001, 0xbc100231, 0x00ae0360, 0x00000000 }, + { 0x00800001, 0xbc000231, 0x00ae0340, 0x00000000 }, + { 0x00808024, 0x34001c00, 0x00001400, 0x0001000e }, + { 0x00800040, 0x2400362c, 0x008d04a0, 0x008d0540 }, + { 0x00800040, 0x2400458c, 0x00b10400, 0x00b19c10 }, + { 0x00800040, 0x24003d8c, 0x00b10400, 0x00020002 }, + { 0x80800008, 0x43403d91, 0x00b10400, 0x00020002 }, + { 0x00800001, 0xbc000231, 0x00ae0340, 0x00000000 }, + { 0x00008025, 0x20000000, 0x00000000, 0x00000000 }, + { 0x00808024, 0x34001c00, 0x00001400, 0x0001005a }, + { 0x00800001, 0x23e0012d, 0x008d0200, 0x00000000 }, + { 0x05800010, 0x200025ac, 0x008d2440, 0x008d01e0 }, + { 0x05800010, 0x200025ac, 0x028d2460, 0x008d01e0 }, + { 0x00800040, 0x24003e2c, 0x00b19820, 0x00040004 }, + { 0x00800048, 0x24003dac, 0x008d0400, 0x00040004 }, + { 0x00800040, 0x2400458c, 0x00b10400, 0x00b1dc10 }, + { 0x00800008, 0x23403d8d, 0x00b10400, 0x00030003 }, + { 0x00810040, 0x23e03dad, 0x008d03e0, 0x00010001 }, + { 0x00200201, 0x25ec018d, 0x00450600, 0x00000000 }, + { 0x00810040, 0x23e03dad, 0x028d03e0, 0x00010001 }, + { 0x03800010, 0x200035ac, 0x008d0340, 0x008d03e0 }, + { 0x05800010, 0x200035ac, 0x028d0340, 0x008d43e0 }, + { 0x00800042, 0x24c0462d, 0x00b19830, 0x00b19c00 }, + { 0x00810001, 0x234001ad, 0x008d03e0, 0x00000000 }, + { 0x00810001, 0x234001ad, 0x028d43e0, 0x00000000 }, + { 0x00200201, 0x260001ac, 0x004505ec, 0x00000000 }, + { 0x80800040, 0x43603631, 0x00b19830, 0x008d0340 }, + { 0x80800040, 0x43403631, 0x00b19c00, 0x008d4340 }, + { 0x00800001, 0xb8300231, 0x00ae0360, 0x00000000 }, + { 0x00800001, 0xbc000231, 0x00ae0340, 0x00000000 }, + { 0x00818022, 0x34001c00, 0x00001400, 0x00000016 }, + { 0x00800040, 0x2400362c, 0x00b19810, 0x008d04c0 }, + { 0x00800048, 0x24003e2c, 0x00b19820, 0xfffefffe }, + { 0x00800008, 0x23603d8d, 0x00b10400, 0x00010001 }, + { 0x03800010, 0x200025ac, 0x008d0360, 0x008d0200 }, + { 0x05800010, 0x200025ac, 0x028d0360, 0x008d4200 }, + { 0x00810001, 0x2360012d, 0x008d0200, 0x00000000 }, + { 0x00810001, 0x2360012d, 0x028d4200, 0x00000000 }, + { 0x00000201, 0x260201ac, 0x000005ee, 0x00000000 }, + { 0x80800040, 0x43603631, 0x00b19820, 0x008d0360 }, + { 0x00800001, 0xb8200231, 0x00ae0360, 0x00000000 }, + { 0x00008025, 0x20000000, 0x00000000, 0x00000000 }, + { 0x00818022, 0x34001c00, 0x02001400, 0x00000014 }, + { 0x00800040, 0x2400362c, 0x00b19c20, 0x008d04c0 }, + { 0x00800048, 0x24003e2c, 0x00b19c10, 0xfffefffe }, + { 0x00800008, 0x23603d8d, 0x00b10400, 0x00010001 }, + { 0x03800010, 0x200025ac, 0x008d0360, 0x008d0200 }, + { 0x05800010, 0x200025ac, 0x028d0360, 0x008d4200 }, + { 0x00810001, 0x2360012d, 0x008d0200, 0x00000000 }, + { 0x00810001, 0x2360012d, 0x028d4200, 0x00000000 }, + { 0x80800040, 0x43603631, 0x00b19c10, 0x008d0360 }, + { 0x00800001, 0xbc100231, 0x00ae0360, 0x00000000 }, + { 0x00008025, 0x20000000, 0x00000000, 0x00000000 }, + { 0x00008025, 0x20000000, 0x00000000, 0x00000000 }, + { 0x00008025, 0x20000000, 0x00000000, 0x00000000 }, + { 0x00000001, 0x34000020, 0x000007c0, 0x00000000 }, + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x00600001, 0x27e00021, 0x008d0000, 0x00000000 }, + { 0x00a02001, 0x20400169, 0x00000000, 0x00000000 }, + { 0x00000001, 0x206601ed, 0x00000000, 0x00010001 }, + { 0x00000009, 0x20663dad, 0x00000066, 0x000a000a }, + { 0x00000001, 0x206801ed, 0x00000000, 0x01400140 }, + { 0x00000001, 0x22600169, 0x00000000, 0x00030003 }, + { 0x00000008, 0x22403dad, 0x00000026, 0x00010001 }, + { 0x00000041, 0x224235ad, 0x00000020, 0x00000022 }, + { 0x00600001, 0x20200022, 0x008d0000, 0x00000000 }, + { 0x00000001, 0x203c0022, 0x00000018, 0x00000000 }, + { 0x00000001, 0x203f01f2, 0x00000000, 0x00000000 }, + { 0x00000001, 0x202c00e2, 0x00000000, 0x00000000 }, + { 0x00000001, 0x202c010a, 0x00000e00, 0x00000000 }, + { 0x00600001, 0x20400021, 0x008d0020, 0x00000000 }, + { 0x00400001, 0x205401ed, 0x00000000, 0x00000000 }, + { 0x00200040, 0x20583dad, 0x00450020, 0xffffffff }, + { 0x00000001, 0x22000060, 0x00000000, 0x06080000 }, + { 0x00600001, 0x26000021, 0x008d0000, 0x00000000 }, + { 0x00000001, 0x26140061, 0x00000000, 0x00c00400 }, + { 0x00000001, 0x26100169, 0x00000000, 0x12121212 }, + { 0x07600031, 0x26201c21, 0x308d0600, 0x02000000 }, + { 0x00200401, 0x208000e5, 0x00000000, 0x00000000 }, + { 0x00000c01, 0x208800e5, 0x00000000, 0xffffffc4 }, + { 0x00000801, 0x208c00e5, 0x00000000, 0xffffffc8 }, + { 0x00200001, 0x260001ec, 0x00000000, 0x00000000 }, + { 0x00600001, 0x20000022, 0x008d07e0, 0x00000000 }, + { 0x00000040, 0x20283c22, 0x00000008, 0x00100010 }, + { 0x00000001, 0x206001ed, 0x00000000, 0x00020002 }, + { 0x00000001, 0x206201ad, 0x0000005a, 0x00000000 }, + { 0x00000001, 0x20a001ed, 0x00000000, 0x00000000 }, + { 0x00200001, 0x228001ed, 0x00000000, 0x00000000 }, + { 0x00802001, 0x20c00061, 0x00000000, 0x00ff00ff }, + { 0x00802001, 0x21000061, 0x00000000, 0x00ff00ff }, + { 0x00802001, 0x21400061, 0x00000000, 0x00ff00ff }, + { 0x00802001, 0x21800061, 0x00000000, 0x00ff00ff }, + { 0x00802001, 0x21c00061, 0x00000000, 0x00ff00ff }, + { 0x00000041, 0x22083dac, 0x00000056, 0x00040004 }, + { 0x05000010, 0x200035ac, 0x02000280, 0x00000240 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x00000004 }, + { 0x00000040, 0x22803dad, 0x00000280, 0xffffffff }, + { 0x00000030, 0x32000084, 0x00001200, 0x00000000 }, + { 0x01000010, 0x20002d28, 0x000090c2, 0x00000000 }, + { 0x03000010, 0x200035ac, 0x02000054, 0x00000058 }, + { 0x00800001, 0x240001ac, 0x00000068, 0x00000000 }, + { 0x00000048, 0x22a03dad, 0x00000056, 0x00040004 }, + { 0x00010220, 0x34001c00, 0x00001400, 0xfffffff2 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x00000014 }, + { 0x00200001, 0xb0c00229, 0x00450054, 0x00000000 }, + { 0x00200040, 0x22803dad, 0x00450280, 0x00010001 }, + { 0x00000001, 0x20300022, 0x00000010, 0x00000000 }, + { 0x00000001, 0x20380122, 0x00000260, 0x00000000 }, + { 0x00800001, 0x204001ae, 0x00b10040, 0x00000000 }, + { 0x00000008, 0x20003d2a, 0x000002a0, 0x00010001 }, + { 0x00000040, 0x22602d29, 0x00000260, 0x00020002 }, + { 0x00800031, 0x20000008, 0x608d0000, 0x00000200 }, + { 0x00000006, 0x203025a2, 0x00000066, 0x000002a0 }, + { 0x01600031, 0x20001c00, 0x708d0000, 0x02000001 }, + { 0x04200010, 0x200035ac, 0x00450054, 0x00450060 }, + { 0x00010040, 0x20a03dad, 0x02000056, 0x00010001 }, + { 0x05200010, 0x200035ac, 0x02450280, 0x00450240 }, + { 0x00000001, 0x240001ec, 0x00000000, 0x00040004 }, + { 0x00000048, 0x22083dac, 0x00000056, 0x00040004 }, + { 0x00200040, 0x205455ad, 0x00450054, 0x00450034 }, + { 0x02000010, 0x20003d8c, 0x00000600, 0x00010001 }, + { 0x00000041, 0x220e3d8c, 0x00000602, 0x00040004 }, + { 0x00010041, 0x22083dac, 0x000000a0, 0x00040004 }, + { 0x00010401, 0x205601ad, 0x000000a0, 0x00000000 }, + { 0x00010840, 0x20543d2d, 0x000090c0, 0x00010001 }, + { 0x00000220, 0x34001400, 0x00001400, 0x00009c80 }, + { 0x01000010, 0x20003dac, 0x02000280, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x00000014 }, + { 0x00000030, 0x32000084, 0x00001200, 0x00000000 }, + { 0x00000040, 0x22803dad, 0x00000280, 0xffffffff }, + { 0x00600401, 0x260001e1, 0x00000000, 0x00000000 }, + { 0x00000c01, 0x26140061, 0x00000000, 0x01800000 }, + { 0x00000c01, 0x26120129, 0x0000000c, 0x00000000 }, + { 0x00000801, 0x26100169, 0x00000000, 0x12121212 }, + { 0x00000040, 0x2078252d, 0x00000026, 0x00004280 }, + { 0x00400001, 0x26000231, 0x00000078, 0x00000000 }, + { 0x00600031, 0x26201c21, 0x308d0600, 0x02000002 }, + { 0x00000220, 0x34001c00, 0x00001400, 0xffffffe8 }, + { 0x07600031, 0x20001c20, 0x30000000, 0x02000001 }, + { 0x01600031, 0x20001c24, 0x708d0000, 0x82000012 }, + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x00600001, 0x27e00021, 0x008d0000, 0x00000000 }, + { 0x00400441, 0x45c03dad, 0x00000034, 0x00100010 }, + { 0x00400841, 0x45c23dad, 0x00000036, 0x00200020 }, + { 0x00200001, 0x260001ec, 0x00000000, 0x00000000 }, + { 0x00000001, 0x25e20129, 0x00000036, 0x00000000 }, + { 0x00000041, 0x25e435a1, 0x00000020, 0x00000036 }, + { 0x00000040, 0x25e43421, 0x000005e4, 0x00000034 }, + { 0x00000041, 0x25e42c21, 0x000005e4, 0x00800080 }, + { 0x00000040, 0x25c43dad, 0x000005c4, 0xfffcfffc }, + { 0x00000040, 0x25ca3dad, 0x000005ca, 0xfffcfffc }, + { 0x00000005, 0x202a3dad, 0x0000002a, 0xfffdfffd }, + { 0x00800001, 0x2220022d, 0x000d002c, 0x00000000 }, + { 0x00600040, 0x22303dad, 0x008d0230, 0x00080008 }, + { 0x02000005, 0x20002d2c, 0x0200002a, 0x00020002 }, + { 0x00000001, 0x27e80021, 0x000005e4, 0x00000000 }, + { 0x00010040, 0x27e83c21, 0x020007e8, 0x00400040 }, + { 0x01600031, 0x22401c21, 0x408d07e0, 0x02885800 }, + { 0x00000001, 0x220801ec, 0x00000000, 0x02400240 }, + { 0x01800005, 0x20002d28, 0x02b19040, 0xffffffff }, + { 0x02000005, 0x20003e2c, 0x00009030, 0x00010001 }, + { 0x00000005, 0x25ec2e29, 0x00009002, 0x000a000a }, + { 0x00000005, 0x25ea2e29, 0x00009002, 0x00060006 }, + { 0x000b0220, 0x34001c00, 0x02001400, 0x00000252 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000250 }, + { 0x01000010, 0x20003d2c, 0x000005ec, 0x00080008 }, + { 0x00000005, 0x25e03d8d, 0x00000600, 0x00010001 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00020002 }, + { 0x02000005, 0x20003dac, 0x0200002a, 0x00020002 }, + { 0x00000401, 0x27e001a1, 0x000005c0, 0x00000000 }, + { 0x00000c0c, 0x27e43da1, 0x000005c2, 0x00010001 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x0007000f }, + { 0x00018022, 0x34001c00, 0x00001400, 0x00000006 }, + { 0x00000001, 0x22000060, 0x00000000, 0x0248a002 }, + { 0x00010040, 0x27e43ca5, 0x020007e4, 0x00080008 }, + { 0x00008024, 0x34001c00, 0x00001400, 0x0001000a }, + { 0x00010001, 0x22000060, 0x02000000, 0x0248e702 }, + { 0x00110001, 0x22000060, 0x02000000, 0x0248e602 }, + { 0x0000000c, 0x27e43ca5, 0x000007e4, 0x00010001 }, + { 0x00008025, 0x20000000, 0x00000000, 0x00000000 }, + { 0x02600031, 0x20c00021, 0x408d07e0, 0x00000200 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00020002 }, + { 0x02000005, 0x20003dac, 0x0200002a, 0x00020002 }, + { 0x00000401, 0x27e001a1, 0x000005c4, 0x00000000 }, + { 0x00000c0c, 0x27e43da1, 0x000005c6, 0x00010001 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x00070003 }, + { 0x00018022, 0x34001c00, 0x00001400, 0x00000006 }, + { 0x00000001, 0x22000060, 0x00000000, 0x02186004 }, + { 0x00010040, 0x27e43ca5, 0x020007e4, 0x00080008 }, + { 0x00008024, 0x34001c00, 0x00001400, 0x0001000a }, + { 0x00010001, 0x22000060, 0x02000000, 0x02186704 }, + { 0x00110001, 0x22000060, 0x02000000, 0x02186604 }, + { 0x0000000c, 0x27e43ca5, 0x000007e4, 0x00010001 }, + { 0x00008025, 0x20000000, 0x00000000, 0x00000000 }, + { 0x02600031, 0x23400025, 0x408d07e0, 0x00000200 }, + { 0x00800001, 0x2380012d, 0x008900c0, 0x00000000 }, + { 0x00800001, 0x23a0012d, 0x00890100, 0x00000000 }, + { 0x00800001, 0x23c0012d, 0x008900c8, 0x00000000 }, + { 0x00800001, 0x23e0012d, 0x00890108, 0x00000000 }, + { 0x00600401, 0x20c001a9, 0x00ab0380, 0x00000000 }, + { 0x00600801, 0x20d001a9, 0x00ab0382, 0x00000000 }, + { 0x00600401, 0x20e001a9, 0x00ab0384, 0x00000000 }, + { 0x00600801, 0x20f001a9, 0x00ab0386, 0x00000000 }, + { 0x00600401, 0x210001a9, 0x00ab03c0, 0x00000000 }, + { 0x00600801, 0x211001a9, 0x00ab03c2, 0x00000000 }, + { 0x00600401, 0x212001a9, 0x00ab03c4, 0x00000000 }, + { 0x00600801, 0x213001a9, 0x00ab03c6, 0x00000000 }, + { 0x00800001, 0x204001a9, 0x002e0340, 0x00000000 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00400040 }, + { 0x01000010, 0x20003d2c, 0x020005ea, 0x00040004 }, + { 0x00800008, 0x2340352d, 0x00009050, 0x008d0220 }, + { 0x00800008, 0x2360352d, 0x00009052, 0x008d0220 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x0000006a }, + { 0x01000010, 0x20003d2c, 0x000005ea, 0x00020002 }, + { 0x00110220, 0x34001c00, 0x02001400, 0x00000012 }, + { 0x02600005, 0x20003dac, 0x00650340, 0x00010001 }, + { 0x02600005, 0x20003dac, 0x02650360, 0x00010001 }, + { 0x00400401, 0x41c00229, 0x000090c0, 0x00000000 }, + { 0x00400801, 0x41c20229, 0x000090e0, 0x00000000 }, + { 0x00400401, 0x41e00229, 0x000090c1, 0x00000000 }, + { 0x00400801, 0x41e20229, 0x000090e1, 0x00000000 }, + { 0x00400401, 0x42000229, 0x006990a0, 0x00000000 }, + { 0x00400801, 0x42020229, 0x006990e8, 0x00000000 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x0000001e }, + { 0x00110220, 0x34001c00, 0x00001400, 0x00000012 }, + { 0x02600005, 0x20003dac, 0x00ae0340, 0x00010001 }, + { 0x02600005, 0x20003dac, 0x02ae0360, 0x00010001 }, + { 0x00400401, 0x21c00229, 0x000090c0, 0x00000000 }, + { 0x00400801, 0x21c80229, 0x000090e0, 0x00000000 }, + { 0x00400401, 0x21e00229, 0x000090c1, 0x00000000 }, + { 0x00400801, 0x21e80229, 0x000090e1, 0x00000000 }, + { 0x00400401, 0x22000229, 0x006990a0, 0x00000000 }, + { 0x00400801, 0x22080229, 0x006990e8, 0x00000000 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x0000000a }, + { 0x02600005, 0x20003dac, 0x00ae0340, 0x00010001 }, + { 0x02600005, 0x20003dac, 0x02ae0360, 0x00010001 }, + { 0x00600001, 0x21c00229, 0x000090c0, 0x00000000 }, + { 0x00600001, 0x21e00229, 0x000090c1, 0x00000000 }, + { 0x00600001, 0x22000229, 0x002490a0, 0x00000000 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00400040 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x00c000c0 }, + { 0x00200001, 0x25d80109, 0x00450600, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x000001c8 }, + { 0x01400010, 0x20003d2c, 0x000005ea, 0x00040004 }, + { 0x01400010, 0x20003d2c, 0x020005ea, 0x00020002 }, + { 0x00600001, 0x21c00229, 0x000090c8, 0x00000000 }, + { 0x00600001, 0x21e00229, 0x000090c9, 0x00000000 }, + { 0x00600001, 0x22000229, 0x002490b0, 0x00000000 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00410041 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x00c100c1 }, + { 0x00410401, 0x41c00229, 0x000090c8, 0x00000000 }, + { 0x00410801, 0x41c20229, 0x000090f0, 0x00000000 }, + { 0x00410401, 0x41e00229, 0x000090c9, 0x00000000 }, + { 0x00410801, 0x41e20229, 0x000090f1, 0x00000000 }, + { 0x00410401, 0x42000229, 0x006990b0, 0x00000000 }, + { 0x00410801, 0x42020229, 0x006990f8, 0x00000000 }, + { 0x00410401, 0x21c00229, 0x020090c8, 0x00000000 }, + { 0x00410801, 0x21c80229, 0x020090f0, 0x00000000 }, + { 0x00410401, 0x21e00229, 0x020090c9, 0x00000000 }, + { 0x00410801, 0x21e80229, 0x020090f1, 0x00000000 }, + { 0x00410401, 0x22000229, 0x026990b0, 0x00000000 }, + { 0x00410801, 0x22080229, 0x026990f8, 0x00000000 }, + { 0x00200001, 0x26000128, 0x004505d8, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x0000019c }, + { 0x00800008, 0x2340352d, 0x00009042, 0x008d0220 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00e000e0 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x01000100 }, + { 0x00600001, 0x21c00229, 0x000090c4, 0x00000000 }, + { 0x00600001, 0x21e00229, 0x000090c5, 0x00000000 }, + { 0x00600001, 0x22000229, 0x002490a4, 0x00000000 }, + { 0x02600005, 0x20003dac, 0x00ae0340, 0x00010001 }, + { 0x00000001, 0x260201e8, 0x00000000, 0x00000000 }, + { 0x00000401, 0x25da01e9, 0x00000000, 0x00000000 }, + { 0x00000801, 0x25d80109, 0x00000600, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000184 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00e100e1 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x01010101 }, + { 0x00200001, 0x26000128, 0x004505d8, 0x00000000 }, + { 0x00600001, 0x21c00229, 0x000090cc, 0x00000000 }, + { 0x00600001, 0x21e00229, 0x000090cd, 0x00000000 }, + { 0x00600001, 0x22000229, 0x002490b4, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000174 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00020002 }, + { 0x02000005, 0x20003dac, 0x0200002a, 0x00020002 }, + { 0x00000401, 0x27e001a1, 0x000005c4, 0x00000000 }, + { 0x00000c0c, 0x27e43da1, 0x000005c6, 0x00010001 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x00070003 }, + { 0x00600401, 0x2340012d, 0x00890040, 0x00000000 }, + { 0x00600801, 0x2350012d, 0x00890048, 0x00000000 }, + { 0x00600001, 0x204001aa, 0x00270340, 0x00000000 }, + { 0x00600001, 0x205001aa, 0x00270350, 0x00000000 }, + { 0x00018022, 0x34001c00, 0x00001400, 0x00000006 }, + { 0x00000001, 0x22000060, 0x00000000, 0x04082004 }, + { 0x00010040, 0x27e43ca5, 0x020007e4, 0x00080008 }, + { 0x00008024, 0x34001c00, 0x00001400, 0x0001000a }, + { 0x00010001, 0x22000060, 0x02000000, 0x04082704 }, + { 0x00110001, 0x22000060, 0x02000000, 0x04082604 }, + { 0x0000000c, 0x27e43ca5, 0x000007e4, 0x00010001 }, + { 0x00008025, 0x20000000, 0x00000000, 0x00000000 }, + { 0x01600031, 0x20000020, 0x508d07e0, 0x00000200 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00020002 }, + { 0x02000005, 0x20003dac, 0x0200002a, 0x00020002 }, + { 0x00000401, 0x27e001a1, 0x000005c8, 0x00000000 }, + { 0x00000c0c, 0x27e43da5, 0x000005ca, 0x00010001 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x0001000f }, + { 0x00018022, 0x34001c00, 0x00001400, 0x00000010 }, + { 0x00000001, 0x22000060, 0x00000000, 0x02186004 }, + { 0x00010040, 0x27e43ca5, 0x020007e4, 0x00080008 }, + { 0x01000005, 0x20003dac, 0x020005e0, 0x00010001 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x00000006 }, + { 0x00000440, 0x27e43ca5, 0x000007e4, 0xfffefffe }, + { 0x00000801, 0x27e80061, 0x00000000, 0x0003000f }, + { 0x00000040, 0x22000c00, 0x00000200, 0x00100000 }, + { 0x00008024, 0x34001c00, 0x00001400, 0x0001000c }, + { 0x0000000c, 0x27e43da5, 0x000005c2, 0x00020002 }, + { 0x00010001, 0x22000060, 0x02000000, 0x02186704 }, + { 0x00110001, 0x22000060, 0x02000000, 0x02186604 }, + { 0x00000040, 0x27e43ca5, 0x000007e4, 0xfffefffe }, + { 0x00008025, 0x20000000, 0x00000000, 0x00000000 }, + { 0x02600031, 0x20400021, 0x408d07e0, 0x00000200 }, + { 0x00800001, 0x2380012d, 0x008900c0, 0x00000000 }, + { 0x00800001, 0x23a0012d, 0x00890100, 0x00000000 }, + { 0x00800001, 0x23c0012d, 0x008900c8, 0x00000000 }, + { 0x00800001, 0x23e0012d, 0x00890108, 0x00000000 }, + { 0x00600401, 0x20c001a9, 0x00ab0380, 0x00000000 }, + { 0x00600801, 0x20d001a9, 0x00ab0382, 0x00000000 }, + { 0x00600401, 0x20e001a9, 0x00ab0384, 0x00000000 }, + { 0x00600801, 0x20f001a9, 0x00ab0386, 0x00000000 }, + { 0x00600401, 0x210001a9, 0x00ab03c0, 0x00000000 }, + { 0x00600801, 0x211001a9, 0x00ab03c2, 0x00000000 }, + { 0x00600401, 0x212001a9, 0x00ab03c4, 0x00000000 }, + { 0x00600801, 0x213001a9, 0x00ab03c6, 0x00000000 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00800080 }, + { 0x00000001, 0x260201ac, 0x000005e0, 0x00000000 }, + { 0x00800008, 0x2340352d, 0x00009054, 0x008d0220 }, + { 0x00800008, 0x2360352d, 0x00009056, 0x008d0220 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000084 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x00000026 }, + { 0x02600005, 0x20003dac, 0x00ae0340, 0x00010001 }, + { 0x02600005, 0x20003dac, 0x02ae0360, 0x00010001 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00400040 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x00c000c0 }, + { 0x00600001, 0x21c00229, 0x000090c2, 0x00000000 }, + { 0x00600001, 0x21e00229, 0x000090c3, 0x00000000 }, + { 0x00600001, 0x22000229, 0x002490a8, 0x00000000 }, + { 0x00200001, 0x25d80109, 0x00450600, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x000000f0 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00410041 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x00c100c1 }, + { 0x00600001, 0x21c00229, 0x000090ca, 0x00000000 }, + { 0x00600001, 0x21e00229, 0x000090cb, 0x00000000 }, + { 0x00600001, 0x22000229, 0x002490b8, 0x00000000 }, + { 0x00200001, 0x26000128, 0x004505d8, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x000000e0 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x0000005c }, + { 0x02600005, 0x20003dac, 0x00ae0340, 0x00010001 }, + { 0x02600005, 0x20003dac, 0x02ae0360, 0x00010001 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x05000500 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x05200520 }, + { 0x00800001, 0x25000129, 0x00ad0040, 0x00000000 }, + { 0x00800001, 0x25200129, 0x00ad00c0, 0x00000000 }, + { 0x00600001, 0x21c00229, 0x000090c2, 0x00000000 }, + { 0x00600001, 0x21e00229, 0x000090c3, 0x00000000 }, + { 0x00600001, 0x22000229, 0x002490a8, 0x00000000 }, + { 0x00200001, 0x25d80109, 0x00450600, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x000000c6 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x05010501 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x05210521 }, + { 0x00600001, 0x21c00229, 0x000090ca, 0x00000000 }, + { 0x00600001, 0x21e00229, 0x000090cb, 0x00000000 }, + { 0x00600001, 0x22000229, 0x002490b8, 0x00000000 }, + { 0x00200001, 0x26000128, 0x004505d8, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x000000b6 }, + { 0x00800008, 0x2340352d, 0x0000905c, 0x008d0220 }, + { 0x00800008, 0x2360352d, 0x0000905e, 0x008d0220 }, + { 0x00600001, 0x20600129, 0x008d0510, 0x00000000 }, + { 0x00600001, 0x20c00129, 0x008d0520, 0x00000000 }, + { 0x02600005, 0x20003dac, 0x00ae0340, 0x00010001 }, + { 0x02600005, 0x20003dac, 0x02ae0360, 0x00010001 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x05000500 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x05200520 }, + { 0x00800001, 0x25000129, 0x00ad0050, 0x00000000 }, + { 0x00800001, 0x25200129, 0x00ad00d0, 0x00000000 }, + { 0x00600001, 0x21c00229, 0x000090e2, 0x00000000 }, + { 0x00600001, 0x21e00229, 0x000090e3, 0x00000000 }, + { 0x00600001, 0x22000229, 0x002490ec, 0x00000000 }, + { 0x00200001, 0x25d80109, 0x00450600, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000096 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x05010501 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x05210521 }, + { 0x00600001, 0x21c00229, 0x000090f2, 0x00000000 }, + { 0x00600001, 0x21e00229, 0x000090f3, 0x00000000 }, + { 0x00600001, 0x22000229, 0x002490fc, 0x00000000 }, + { 0x00200001, 0x26000128, 0x004505d8, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000086 }, + { 0x00600001, 0x20700129, 0x008d0510, 0x00000000 }, + { 0x00600001, 0x20d00129, 0x008d0520, 0x00000000 }, + { 0x00800008, 0x2340352d, 0x00009048, 0x008d0220 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00e000e0 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x01000100 }, + { 0x00600001, 0x21c00229, 0x000090c4, 0x00000000 }, + { 0x00600001, 0x21e00229, 0x000090c5, 0x00000000 }, + { 0x00600001, 0x22000229, 0x002490ac, 0x00000000 }, + { 0x02600005, 0x20003dac, 0x00ae0340, 0x00010001 }, + { 0x00000001, 0x260201e8, 0x00000000, 0x00000000 }, + { 0x00000401, 0x25da01e9, 0x00000000, 0x00000000 }, + { 0x00000801, 0x25d80109, 0x00000600, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x0000006a }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00e100e1 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x01010101 }, + { 0x00600001, 0x21c00229, 0x000090cc, 0x00000000 }, + { 0x00600001, 0x21e00229, 0x000090cd, 0x00000000 }, + { 0x00600001, 0x22000229, 0x002490bc, 0x00000000 }, + { 0x00200001, 0x26000128, 0x004505d8, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x0000005a }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00020002 }, + { 0x02000005, 0x20003dac, 0x0200002a, 0x00020002 }, + { 0x00000401, 0x27e001a1, 0x000005c0, 0x00000000 }, + { 0x00000c0c, 0x27e43da1, 0x000005c2, 0x00010001 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x0007000f }, + { 0x00802001, 0x20400022, 0x008d00c0, 0x00000000 }, + { 0x00802001, 0x20800022, 0x008d0100, 0x00000000 }, + { 0x00018022, 0x34001c00, 0x00001400, 0x00000006 }, + { 0x00000001, 0x22000060, 0x00000000, 0x0a082004 }, + { 0x00010040, 0x27e43ca5, 0x020007e4, 0x00080008 }, + { 0x00008024, 0x34001c00, 0x00001400, 0x0001000a }, + { 0x00010001, 0x22000060, 0x02000000, 0x0a082704 }, + { 0x00110001, 0x22000060, 0x02000000, 0x0a082604 }, + { 0x0000000c, 0x27e43ca5, 0x000007e4, 0x00010001 }, + { 0x00008025, 0x20000000, 0x00000000, 0x00000000 }, + { 0x01600031, 0x20000020, 0x508d07e0, 0x00000200 }, + { 0x01600005, 0x20003dac, 0x020005e0, 0x00010001 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00020002 }, + { 0x00000401, 0x27e001a1, 0x000005c8, 0x00000000 }, + { 0x00000c0c, 0x27e43da1, 0x000005ca, 0x00010001 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x0001000f }, + { 0x00610001, 0x20400022, 0x028d0040, 0x00000000 }, + { 0x00710001, 0x20400022, 0x028d0060, 0x00000000 }, + { 0x02000005, 0x20003dac, 0x0200002a, 0x00020002 }, + { 0x00018022, 0x34001c00, 0x00001400, 0x00000006 }, + { 0x00000001, 0x22000060, 0x00000000, 0x0418a004 }, + { 0x00010040, 0x27e43ca5, 0x020007e4, 0x00080008 }, + { 0x00008024, 0x34001c00, 0x00001400, 0x0001000c }, + { 0x0000000c, 0x27e43da5, 0x000005c2, 0x00020002 }, + { 0x00010001, 0x22000060, 0x02000000, 0x0418a704 }, + { 0x00110001, 0x22000060, 0x02000000, 0x0418a604 }, + { 0x00000040, 0x27e43ca5, 0x000007e4, 0xfffefffe }, + { 0x00008025, 0x20000000, 0x00000000, 0x00000000 }, + { 0x01600031, 0x26400021, 0x508d07e0, 0x00000200 }, + { 0x01000005, 0x20003dac, 0x0000002a, 0x00020002 }, + { 0x00000006, 0x202a3dad, 0x0000002a, 0x00020002 }, + { 0x00010220, 0x34001c00, 0x00001400, 0xfffffd94 }, + { 0x00600001, 0x26400021, 0x008d0640, 0x00000000 }, + { 0x00600001, 0x260001e1, 0x00000000, 0x00000000 }, + { 0x00000009, 0x26143da1, 0x000005e2, 0x00120012 }, + { 0x00000440, 0x26141c21, 0x00000614, 0x00020000 }, + { 0x00000c01, 0x26120129, 0x0000000c, 0x00000000 }, + { 0x00000c01, 0x26100169, 0x00000000, 0x12121212 }, + { 0x00400801, 0x26000171, 0x00000000, 0xffffffff }, + { 0x00600031, 0x20001c20, 0x308d0600, 0x82008002 }, + { 0x00600040, 0x2400462d, 0x00ae9c00, 0x00aed810 }, + { 0x00600040, 0x2340462d, 0x00ae9800, 0x00aed810 }, + { 0x00600040, 0x2360462d, 0x00ae9c10, 0x00aedc00 }, + { 0x05810010, 0x200025ac, 0x008d2400, 0x008d01c0 }, + { 0x05810010, 0x200025ac, 0x008d2340, 0x008d01e0 }, + { 0x05810010, 0x200025ac, 0x008d2360, 0x008d01e0 }, + { 0x00618022, 0x34001c00, 0x00001400, 0x00000036 }, + { 0x00618022, 0x34001c00, 0x02001400, 0x00000016 }, + { 0x00600040, 0x24003e2c, 0x00ae9c10, 0x00020002 }, + { 0x00600048, 0x24003e2c, 0x00ae9800, 0x00020002 }, + { 0x00600040, 0x2400458c, 0x008d0400, 0x00ae9810 }, + { 0x80600008, 0x43403d91, 0x008d0400, 0x00020002 }, + { 0x00600040, 0x24003e2c, 0x00ae9800, 0x00020002 }, + { 0x00600048, 0x24003e2c, 0x00ae9c10, 0x00020002 }, + { 0x00600040, 0x2400458c, 0x008d0400, 0x00ae9c00 }, + { 0x80600008, 0x43603d91, 0x008d0400, 0x00020002 }, + { 0x00600001, 0xd8100231, 0x00ae0340, 0x00000000 }, + { 0x00600001, 0xdc000231, 0x00ae0360, 0x00000000 }, + { 0x00608024, 0x34001c00, 0x00001400, 0x0001001e }, + { 0x00600040, 0x23e03d2d, 0x008d0200, 0x00010001 }, + { 0x00600040, 0x24003e2c, 0x00ae9800, 0x00040004 }, + { 0x00600048, 0x24003dac, 0x008d0400, 0x00040004 }, + { 0x00600040, 0x2400458c, 0x008d0400, 0x00aedc10 }, + { 0x00600008, 0x23403d8d, 0x008d0400, 0x00030003 }, + { 0x03600010, 0x200035ac, 0x008d0340, 0x008d03e0 }, + { 0x05600010, 0x200035ac, 0x028d0340, 0x008d43e0 }, + { 0x00610001, 0x234001ad, 0x008d03e0, 0x00000000 }, + { 0x00610001, 0x234001ad, 0x028d43e0, 0x00000000 }, + { 0x80600040, 0x43603631, 0x00ae9810, 0x008d0340 }, + { 0x80600040, 0x43403631, 0x00ae9c00, 0x008d4340 }, + { 0x00600001, 0xd8100231, 0x00ae0360, 0x00000000 }, + { 0x00600001, 0xdc000231, 0x00ae0340, 0x00000000 }, + { 0x00008025, 0x20000000, 0x00000000, 0x00000000 }, + { 0x00008025, 0x20000000, 0x00000000, 0x00000000 }, + { 0x00000001, 0x34000020, 0x000007c0, 0x00000000 }, + { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/avc_mc.g4b.gen5 libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/avc_mc.g4b.gen5 --- libva-1.0.1/i965_drv_video/shaders/h264/mc/avc_mc.g4b.gen5 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/avc_mc.g4b.gen5 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,5251 @@ + { 0x00600001, 0x27c00021, 0x008d0000, 0x00000000 }, + { 0x00200009, 0x27fa3e29, 0x00450064, 0x00040004 }, + { 0x00000040, 0x27e01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x000000d4 }, + { 0x00000005, 0x220e3e2c, 0x00000070, 0x000f000f }, + { 0x00000001, 0x26a00221, 0x00009c38, 0x00000000 }, + { 0x00000220, 0x34001400, 0x00001400, 0x000006a0 }, + { 0x00a02001, 0x24000229, 0x00b10624, 0x00000000 }, + { 0x00a02001, 0x24400229, 0x00b10624, 0x00000000 }, + { 0x00a02001, 0x24800229, 0x00b10624, 0x00000000 }, + { 0x00a02001, 0x24c00229, 0x00b10624, 0x00000000 }, + { 0x00a02001, 0x25000229, 0x00b10624, 0x00000000 }, + { 0x00a02001, 0x25400229, 0x00b10624, 0x00000000 }, + { 0x00a02001, 0x25800229, 0x00b10624, 0x00000000 }, + { 0x00a02001, 0x25c00229, 0x00b10624, 0x00000000 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000086 }, + { 0x00000001, 0x22080060, 0x00000000, 0x06440640 }, + { 0x00a02001, 0x24000229, 0x00009003, 0x00000000 }, + { 0x00a02001, 0x24400229, 0x0000900b, 0x00000000 }, + { 0x00a02001, 0x24800229, 0x00009013, 0x00000000 }, + { 0x00a02001, 0x24c00229, 0x0000901b, 0x00000000 }, + { 0x00a02001, 0x25000229, 0x00009023, 0x00000000 }, + { 0x00a02001, 0x25400229, 0x0000902b, 0x00000000 }, + { 0x00a02001, 0x25800229, 0x00009033, 0x00000000 }, + { 0x00a02001, 0x25c00229, 0x0000903b, 0x00000000 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000072 }, + { 0x02600005, 0x20000c20, 0x0000006c, 0x00000002 }, + { 0x00600005, 0x24000c20, 0x0000006c, 0x00000011 }, + { 0x01600007, 0x20000c00, 0x028d0400, 0x00000011 }, + { 0x00780001, 0x26240169, 0x00000000, 0x80808080 }, + { 0x00780001, 0x66430231, 0x028d0624, 0x00000000 }, + { 0x00780001, 0x66630231, 0x028d062c, 0x00000000 }, + { 0x00780001, 0x26240231, 0x00cf0643, 0x00000000 }, + { 0x00780001, 0x262c0231, 0x00cf0663, 0x00000000 }, + { 0x00800040, 0x25e04629, 0x00cf0643, 0x00b10624 }, + { 0x00600040, 0x25e02529, 0x008d05e0, 0x008d05f0 }, + { 0x00400040, 0x25e02529, 0x006905e0, 0x006905e8 }, + { 0x00200040, 0x25e02529, 0x004505e0, 0x004505e4 }, + { 0x00a02040, 0x2400252c, 0x000005e0, 0x000005e2 }, + { 0x00a02040, 0x24003d8c, 0x00b10400, 0x00100010 }, + { 0x00a02008, 0x24003d89, 0x00b10400, 0x00050005 }, + { 0x00a02008, 0x24403d89, 0x00b10400, 0x00050005 }, + { 0x00a02008, 0x24803d89, 0x00b10400, 0x00050005 }, + { 0x00a02008, 0x24c03d89, 0x00b10400, 0x00050005 }, + { 0x00a02008, 0x25003d89, 0x00b10400, 0x00050005 }, + { 0x00a02008, 0x25403d89, 0x00b10400, 0x00050005 }, + { 0x00a02008, 0x25803d89, 0x00b10400, 0x00050005 }, + { 0x00a02008, 0x25c03d89, 0x00b10400, 0x00050005 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000044 }, + { 0x00600041, 0x26806e2d, 0x008d062c, 0x89abcdef }, + { 0x00600041, 0x26906e2d, 0x008d0623, 0xfedcba98 }, + { 0x00600041, 0x26a06e2d, 0x00cf0663, 0x89abcdef }, + { 0x00600041, 0x26b06e2d, 0x00cf0643, 0x0fedcba9 }, + { 0x00000041, 0x26be3e2d, 0x00000623, 0xfff8fff8 }, + { 0x00802040, 0x268035ad, 0x008d4680, 0x008d0690 }, + { 0x00802040, 0x268035ad, 0x008d0680, 0x008d0688 }, + { 0x00802040, 0x268035ad, 0x008d0680, 0x008d0684 }, + { 0x00802040, 0x268035ad, 0x008d0680, 0x008d0682 }, + { 0x00800001, 0x240001ec, 0x00000000, 0x00200020 }, + { 0x00200048, 0x24003dac, 0x00a00680, 0x00050005 }, + { 0x00200008, 0x26e03d8d, 0x00450400, 0x00060006 }, + { 0x00800001, 0x240001ec, 0x00000000, 0x00100010 }, + { 0x00800048, 0x24003e2c, 0x00000633, 0x00100010 }, + { 0x00800048, 0x26c03e2d, 0x0000067f, 0x00100010 }, + { 0x00800048, 0x272055ad, 0x000006e0, 0x00b10040 }, + { 0x00600041, 0x268055ad, 0x000006e2, 0x00ae0040 }, + { 0x00600041, 0x26a055ad, 0x000006e2, 0x00ae0041 }, + { 0x00a02040, 0x240035ac, 0x00b10720, 0x00b00680 }, + { 0x80a02008, 0x44003d91, 0x00b10400, 0x00050005 }, + { 0x00a02040, 0x240035ac, 0x00b10720, 0x00b00682 }, + { 0x80a02008, 0x44403d91, 0x00b10400, 0x00050005 }, + { 0x00a02040, 0x240035ac, 0x00b10720, 0x00b00684 }, + { 0x80a02008, 0x44803d91, 0x00b10400, 0x00050005 }, + { 0x00a02040, 0x240035ac, 0x00b10720, 0x00b00686 }, + { 0x80a02008, 0x44c03d91, 0x00b10400, 0x00050005 }, + { 0x00a02040, 0x240035ac, 0x00b10720, 0x00b00688 }, + { 0x80a02008, 0x45003d91, 0x00b10400, 0x00050005 }, + { 0x00a02040, 0x240035ac, 0x00b10720, 0x00b0068a }, + { 0x80a02008, 0x45403d91, 0x00b10400, 0x00050005 }, + { 0x00a02040, 0x240035ac, 0x00b10720, 0x00b0068c }, + { 0x80a02008, 0x45803d91, 0x00b10400, 0x00050005 }, + { 0x00a02040, 0x240035ac, 0x00b10720, 0x00b0068e }, + { 0x80a02008, 0x45c03d91, 0x00b10400, 0x00050005 }, + { 0x00000001, 0x22040060, 0x00000000, 0x00900080 }, + { 0x01000005, 0x20000c20, 0x02000068, 0x00003c00 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x00000020 }, + { 0x80802040, 0x440045b1, 0x008d8800, 0x00ae0400 }, + { 0x80802040, 0x444045b1, 0x008d8820, 0x00ae0440 }, + { 0x80802040, 0x448045b1, 0x008d8840, 0x00ae0480 }, + { 0x80802040, 0x44c045b1, 0x008d8860, 0x00ae04c0 }, + { 0x80802040, 0x441045b1, 0x008d8880, 0x00ae0410 }, + { 0x80802040, 0x445045b1, 0x008d88a0, 0x00ae0450 }, + { 0x80802040, 0x449045b1, 0x008d88c0, 0x00ae0490 }, + { 0x80802040, 0x44d045b1, 0x008d88e0, 0x00ae04d0 }, + { 0x80802040, 0x450045b1, 0x008d8900, 0x00ae0500 }, + { 0x80802040, 0x454045b1, 0x008d8920, 0x00ae0540 }, + { 0x80802040, 0x458045b1, 0x008d8940, 0x00ae0580 }, + { 0x80802040, 0x45c045b1, 0x008d8960, 0x00ae05c0 }, + { 0x80802040, 0x451045b1, 0x008d8980, 0x00ae0510 }, + { 0x80802040, 0x455045b1, 0x008d89a0, 0x00ae0550 }, + { 0x80802040, 0x459045b1, 0x008d89c0, 0x00ae0590 }, + { 0x80802040, 0x45d045b1, 0x008d89e0, 0x00ae05d0 }, + { 0x00000040, 0x22040c00, 0x00000204, 0x01800180 }, + { 0x00000040, 0x27e01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x000000e2 }, + { 0x00000040, 0x27e01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000018 }, + { 0x00000001, 0x27800021, 0x00000780, 0x00000000 }, + { 0x00000001, 0x27a00021, 0x000007a0, 0x00000000 }, + { 0x01600031, 0x20001c20, 0x708d0000, 0x82000010 }, + { 0x00200440, 0x27c055a5, 0x004507fa, 0x0045002a }, + { 0x00000801, 0x27c80061, 0x00000000, 0x0000001b }, + { 0x00000040, 0x22000d20, 0x00000062, 0x02186000 }, + { 0x01600031, 0x26200021, 0x408d07c0, 0x00000200 }, + { 0x00000440, 0x27c43ca5, 0x000007c4, 0x00010001 }, + { 0x00000801, 0x27c80061, 0x00000000, 0x000f0003 }, + { 0x00000040, 0x22000c00, 0x00000200, 0x00100000 }, + { 0x02600031, 0x26400021, 0x408d07c0, 0x00000200 }, + { 0x00000001, 0x34000020, 0x000007e0, 0x00000000 }, + { 0x00000008, 0x27fc3dad, 0x000007fc, 0x00010001 }, + { 0x00200440, 0x27c055a5, 0x004507fa, 0x0045002a }, + { 0x00000801, 0x27c80061, 0x00000000, 0x00000013 }, + { 0x00000040, 0x22000c00, 0x00000200, 0xefffc001 }, + { 0x01600031, 0x26200021, 0x408d07c0, 0x00000200 }, + { 0x00000440, 0x27c43ca5, 0x000007c4, 0x00010001 }, + { 0x00000801, 0x27c80061, 0x00000000, 0x00070003 }, + { 0x05600031, 0x26400021, 0x408d07c0, 0x00000200 }, + { 0x00000008, 0x220e3e2c, 0x0000006c, 0x00060006 }, + { 0x00000001, 0x26a002a5, 0x00009c3c, 0x00000000 }, + { 0x00000220, 0x34001400, 0x00001400, 0x000006a0 }, + { 0x02600005, 0x20000c20, 0x0000006c, 0x00000002 }, + { 0x00780001, 0x26240169, 0x00000000, 0x80808080 }, + { 0x02400005, 0x20000c20, 0x0200006c, 0x00000001 }, + { 0x00560001, 0x46420129, 0x02690624, 0x00000000 }, + { 0x02400005, 0x20000c20, 0x0200006c, 0x00000010 }, + { 0x00560001, 0x46520129, 0x0269062c, 0x00000000 }, + { 0x00780001, 0x26240129, 0x00ae0642, 0x00000000 }, + { 0x00800040, 0x24004629, 0x00b10624, 0x00650642 }, + { 0x00600040, 0x24002529, 0x00650400, 0x00650404 }, + { 0x00600040, 0x25202529, 0x00050400, 0x00050404 }, + { 0x00600040, 0x25702529, 0x00050408, 0x0005040c }, + { 0x00560001, 0x26240169, 0x00000000, 0x80808080 }, + { 0x00460001, 0x26240129, 0x028a0652, 0x00000000 }, + { 0x00560001, 0x46520129, 0x02690624, 0x00000000 }, + { 0x02400005, 0x20000c20, 0x0200006c, 0x00000001 }, + { 0x00560001, 0x46420169, 0x02000000, 0x80808080 }, + { 0x00460001, 0x46420129, 0x0069062c, 0x00000000 }, + { 0x00560001, 0x262c0129, 0x008a0642, 0x00000000 }, + { 0x00600040, 0x24004629, 0x008d0624, 0x00650652 }, + { 0x00600040, 0x24104629, 0x00650642, 0x008d062c }, + { 0x00600040, 0x24002529, 0x00650400, 0x00650404 }, + { 0x00600040, 0x25302529, 0x00050408, 0x0005040c }, + { 0x00600040, 0x25602529, 0x00050400, 0x00050404 }, + { 0x00a02040, 0x24003d2c, 0x00b10520, 0x00040004 }, + { 0x00a02008, 0x24003d89, 0x00b10400, 0x00030003 }, + { 0x00a02008, 0x24403d89, 0x00b10400, 0x00030003 }, + { 0x00a02040, 0x24003d2c, 0x00b10560, 0x00040004 }, + { 0x00a02008, 0x24803d89, 0x00b10400, 0x00030003 }, + { 0x00a02008, 0x24c03d89, 0x00b10400, 0x00030003 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000048 }, + { 0x00000001, 0x22080060, 0x00000000, 0x06440640 }, + { 0x00a02001, 0x24000229, 0x00059002, 0x00000000 }, + { 0x00a02001, 0x24400229, 0x0005900a, 0x00000000 }, + { 0x00a02001, 0x24800229, 0x00059012, 0x00000000 }, + { 0x00a02001, 0x24c00229, 0x0005901a, 0x00000000 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x0000003c }, + { 0x00a02001, 0x24000229, 0x00b10624, 0x00000000 }, + { 0x00a02001, 0x24400229, 0x00b10624, 0x00000000 }, + { 0x00a02001, 0x24800229, 0x00b10624, 0x00000000 }, + { 0x00a02001, 0x24c00229, 0x00b10624, 0x00000000 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000032 }, + { 0x00600041, 0x26806e2d, 0x008d062c, 0x44332211 }, + { 0x00600041, 0x26906e2d, 0x008d0622, 0xffeeddcc }, + { 0x00600041, 0x26a06e2d, 0x00650652, 0x44332211 }, + { 0x00600041, 0x26b06e2d, 0x00650642, 0x00ffeedd }, + { 0x00200041, 0x26bc3e2d, 0x00450622, 0xfffcfffc }, + { 0x00802040, 0x268035ad, 0x008d0680, 0x008d0690 }, + { 0x00802040, 0x268035ad, 0x008d0680, 0x008d0688 }, + { 0x00802040, 0x268035ad, 0x008d0680, 0x008d0684 }, + { 0x00800001, 0x240001ec, 0x00000000, 0x00200020 }, + { 0x00400048, 0x24003dac, 0x00a50680, 0x00220022 }, + { 0x00400008, 0x26e03d8d, 0x00690400, 0x00060006 }, + { 0x00800001, 0x240001ec, 0x00000000, 0x00100010 }, + { 0x00800048, 0x24003e2c, 0x00050632, 0x00100010 }, + { 0x00800048, 0x26c03e2d, 0x0005065e, 0x00100010 }, + { 0x00800048, 0x272055ad, 0x000506e0, 0x00240044 }, + { 0x00600041, 0x268055ad, 0x000506e4, 0x00440044 }, + { 0x00600041, 0x26a055ad, 0x000506e4, 0x00440045 }, + { 0x00a02040, 0x240035ac, 0x00b10720, 0x00050680 }, + { 0x80a02008, 0x44003d91, 0x00b10400, 0x00050005 }, + { 0x00a02040, 0x240035ac, 0x00b10720, 0x00050684 }, + { 0x80a02008, 0x44403d91, 0x00b10400, 0x00050005 }, + { 0x00a02040, 0x240035ac, 0x00b10720, 0x00050688 }, + { 0x80a02008, 0x44803d91, 0x00b10400, 0x00050005 }, + { 0x00a02040, 0x240035ac, 0x00b10720, 0x0005068c }, + { 0x80a02008, 0x44c03d91, 0x00b10400, 0x00050005 }, + { 0x00000040, 0x22063d8c, 0x00000204, 0x00100010 }, + { 0x80802040, 0x640045b1, 0x008d8880, 0x00cf0400 }, + { 0x80802040, 0x644045b1, 0x008d88a0, 0x00cf0440 }, + { 0x80802040, 0x648045b1, 0x008d88c0, 0x00cf0480 }, + { 0x80802040, 0x64c045b1, 0x008d88e0, 0x00cf04c0 }, + { 0x80802040, 0x640245b1, 0x008d8900, 0x00cf0402 }, + { 0x80802040, 0x644245b1, 0x008d8920, 0x00cf0442 }, + { 0x80802040, 0x648245b1, 0x008d8940, 0x00cf0482 }, + { 0x80802040, 0x64c245b1, 0x008d8960, 0x00cf04c2 }, + { 0x00000401, 0x27c80061, 0x00000000, 0x0007000f }, + { 0x00200801, 0x27c001a1, 0x004507fa, 0x00000000 }, + { 0x00000040, 0x22000c00, 0x00000200, 0x08004000 }, + { 0x00800001, 0x20400232, 0x00d20400, 0x00000000 }, + { 0x00800001, 0x20500232, 0x00d20420, 0x00000000 }, + { 0x00800001, 0x20600232, 0x00d20440, 0x00000000 }, + { 0x00800001, 0x20700232, 0x00d20460, 0x00000000 }, + { 0x00800001, 0x20800232, 0x00d20480, 0x00000000 }, + { 0x00800001, 0x20900232, 0x00d204a0, 0x00000000 }, + { 0x00800001, 0x20a00232, 0x00d204c0, 0x00000000 }, + { 0x00800001, 0x20b00232, 0x00d204e0, 0x00000000 }, + { 0x01600031, 0x27a00021, 0x508d07c0, 0x00000200 }, + { 0x00000001, 0x34000020, 0x000007e0, 0x00000000 }, + { 0x00000401, 0x27c80061, 0x00000000, 0x000f000f }, + { 0x00200801, 0x27c001a1, 0x004507fa, 0x00000000 }, + { 0x00000040, 0x22000c00, 0x00000200, 0x0ff04000 }, + { 0x00000001, 0x22080060, 0x00000000, 0x04400400 }, + { 0x00a02001, 0x20400232, 0x00d29000, 0x00000000 }, + { 0x00a02001, 0x20500232, 0x00d29020, 0x00000000 }, + { 0x00a02001, 0x20800232, 0x00d29080, 0x00000000 }, + { 0x00a02001, 0x20900232, 0x00d290a0, 0x00000000 }, + { 0x00a02001, 0x20c00232, 0x00d29100, 0x00000000 }, + { 0x00a02001, 0x20d00232, 0x00d29120, 0x00000000 }, + { 0x00a02001, 0x21000232, 0x00d29180, 0x00000000 }, + { 0x00a02001, 0x21100232, 0x00d291a0, 0x00000000 }, + { 0x01600031, 0x27800021, 0x508d07c0, 0x00000200 }, + { 0x00000001, 0x34000020, 0x000007e0, 0x00000000 }, + { 0x00600001, 0x27c00021, 0x008d0000, 0x00000000 }, + { 0x00200009, 0x27fa3e29, 0x00450064, 0x00040004 }, + { 0x00000040, 0x27e01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0xffffff04 }, + { 0x00000001, 0x220401ec, 0x00000000, 0x00800080 }, + { 0x00000001, 0x22080060, 0x00000000, 0x04100400 }, + { 0x00200008, 0x27006e2d, 0x0000006c, 0x00000040 }, + { 0x00400001, 0x27400061, 0x00000000, 0x00000000 }, + { 0x00800001, 0x272001a9, 0x00b10620, 0x00000000 }, + { 0x02600005, 0x20001c20, 0x0000006c, 0x00000008 }, + { 0x00110001, 0x27230231, 0x00000624, 0x00000000 }, + { 0x00600001, 0x27420231, 0x00cf0643, 0x00000000 }, + { 0x00110001, 0x27410231, 0x00000643, 0x00000000 }, + { 0x00240001, 0x27400231, 0x00000623, 0x00000000 }, + { 0x02000005, 0x20001c20, 0x0200006c, 0x00000002 }, + { 0x00010001, 0x27400231, 0x02000624, 0x00000000 }, + { 0x02000005, 0x20001c20, 0x0200006c, 0x00000001 }, + { 0x00110001, 0x27420231, 0x02000623, 0x00000000 }, + { 0x00000005, 0x26803e2d, 0x00000070, 0x000f000f }, + { 0x00000001, 0x270801ad, 0x00000700, 0x00000000 }, + { 0x00000040, 0x27e01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000084 }, + { 0x00000040, 0x22043d8c, 0x00000204, 0x00800080 }, + { 0x00800001, 0x27200231, 0x00b10628, 0x00000000 }, + { 0x02600005, 0x20001c20, 0x0200006c, 0x00000004 }, + { 0x00680001, 0x272c0231, 0x028d0634, 0x00000000 }, + { 0x00780001, 0x272c0231, 0x02000633, 0x00000000 }, + { 0x00400001, 0x27420231, 0x00a0040e, 0x00000000 }, + { 0x00400001, 0x27460231, 0x00a0044e, 0x00000000 }, + { 0x00200001, 0x27400231, 0x0000062b, 0x00000000 }, + { 0x02000005, 0x20001c20, 0x0200006c, 0x00000002 }, + { 0x00010001, 0x27400231, 0x0200062c, 0x00000000 }, + { 0x00110001, 0x27410231, 0x0200040e, 0x00000000 }, + { 0x00000008, 0x26803e2d, 0x00000070, 0x00040004 }, + { 0x00200040, 0x22083d8c, 0x00450208, 0x00800080 }, + { 0x00000006, 0x27083dad, 0x00000700, 0x00010001 }, + { 0x00000040, 0x27e01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000064 }, + { 0x00000040, 0x22043d8c, 0x00000204, 0x00800080 }, + { 0x00a02001, 0xb3800231, 0x00d20400, 0x00000000 }, + { 0x00a02001, 0xb3a00231, 0x00d20480, 0x00000000 }, + { 0x00a02001, 0xb3c00231, 0x00d20440, 0x00000000 }, + { 0x00a02001, 0xb3e00231, 0x00d204c0, 0x00000000 }, + { 0x02000005, 0x20001c20, 0x00000060, 0x00000002 }, + { 0x01000005, 0x20001c20, 0x0200006c, 0x00000001 }, + { 0x01010005, 0x20001c20, 0x00000060, 0x00004000 }, + { 0x02010005, 0x20001c20, 0x02000060, 0x00000010 }, + { 0x00030001, 0x27230231, 0x0000065f, 0x00000000 }, + { 0x00030220, 0x34001c00, 0x00001400, 0x00000006 }, + { 0x02600005, 0x20001c20, 0x0000006c, 0x00000001 }, + { 0x00460001, 0x27200231, 0x0069065c, 0x00000000 }, + { 0x00110001, 0x27230231, 0x00000458, 0x00000000 }, + { 0x00600001, 0x27240231, 0x008d0458, 0x00000000 }, + { 0x00600001, 0x272c0231, 0x008d0478, 0x00000000 }, + { 0x00600001, 0x27420231, 0x00cf0663, 0x00000000 }, + { 0x00000001, 0x27400231, 0x00000458, 0x00000000 }, + { 0x00010001, 0x27410231, 0x0000065f, 0x00000000 }, + { 0x00110001, 0x27410231, 0x00000663, 0x00000000 }, + { 0x02000005, 0x20001c20, 0x0200006c, 0x00000010 }, + { 0x00110001, 0x27420231, 0x0200065f, 0x00000000 }, + { 0x00000005, 0x26803e2d, 0x00000071, 0x000f000f }, + { 0x00000006, 0x27083dad, 0x00000702, 0x00020002 }, + { 0x00000040, 0x27e01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000030 }, + { 0x00000040, 0x22043d8c, 0x00000204, 0x00800080 }, + { 0x00400001, 0x27200231, 0x0069045c, 0x00000000 }, + { 0x00600001, 0x27240231, 0x008d0478, 0x00000000 }, + { 0x00800001, 0x272c0231, 0x0000047f, 0x00000000 }, + { 0x00400001, 0x27420231, 0x00a0048e, 0x00000000 }, + { 0x00400001, 0x27460231, 0x00a004ce, 0x00000000 }, + { 0x00000001, 0x27400231, 0x00000478, 0x00000000 }, + { 0x00000001, 0x27410231, 0x0000045f, 0x00000000 }, + { 0x00000008, 0x26803e2d, 0x00000071, 0x00040004 }, + { 0x00200040, 0x22083d8c, 0x00450208, 0x00800080 }, + { 0x00000006, 0x27083dad, 0x00000700, 0x00030003 }, + { 0x00000040, 0x27e01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000016 }, + { 0x00a02001, 0xb3800231, 0x00d20480, 0x00000000 }, + { 0x00a02001, 0xb3a00231, 0x00d20500, 0x00000000 }, + { 0x00a02001, 0xb3c00231, 0x00d204c0, 0x00000000 }, + { 0x00a02001, 0xb3e00231, 0x00d20540, 0x00000000 }, + { 0x00000040, 0x27e01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000100 }, + { 0x00000040, 0x27e01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0xfffffe74 }, + { 0x00000001, 0x27800021, 0x00000780, 0x00000000 }, + { 0x00000001, 0x27a00021, 0x000007a0, 0x00000000 }, + { 0x01600031, 0x20001c20, 0x708d0000, 0x82000010 }, + { 0x00000001, 0x27340231, 0x00000733, 0x00000000 }, + { 0x00600001, 0x274a0231, 0x00000749, 0x00000000 }, + { 0x00800040, 0x24003e2c, 0x00b10723, 0x00020002 }, + { 0x00800048, 0x24003e2c, 0x00b10724, 0x00020002 }, + { 0x00800048, 0x24003e2c, 0x00b10725, 0x00010001 }, + { 0x00800008, 0x26c03d8d, 0x008d0400, 0x00020002 }, + { 0x00800040, 0x24003e2c, 0x00b10740, 0x00020002 }, + { 0x00800048, 0x24003e2c, 0x00b10741, 0x00020002 }, + { 0x00800048, 0x24003e2c, 0x00b10742, 0x00010001 }, + { 0x00800008, 0x26a03d8d, 0x008d0400, 0x00020002 }, + { 0x00800001, 0x27240231, 0x00d206c0, 0x00000000 }, + { 0x00600001, 0x27400231, 0x00ae06a2, 0x00000000 }, + { 0x00000001, 0x27230231, 0x000006a0, 0x00000000 }, + { 0x00000005, 0x220e3dac, 0x00000680, 0x000f000f }, + { 0x00000001, 0x26a00221, 0x00009c2c, 0x00000000 }, + { 0x00000220, 0x34001400, 0x00001400, 0x000006a0 }, + { 0x80800040, 0xd00045b1, 0x00b18800, 0x000d0724 }, + { 0x80800040, 0xd02045b1, 0x00b18820, 0x000d0724 }, + { 0x80800040, 0xd04045b1, 0x00b18840, 0x000d0724 }, + { 0x80800040, 0xd06045b1, 0x00b18860, 0x000d0724 }, + { 0x00000001, 0x34000020, 0x000007e0, 0x00000000 }, + { 0x80800040, 0xd00045b1, 0x00b18800, 0x002c0740 }, + { 0x80800040, 0xd02045b1, 0x00b18820, 0x002c0742 }, + { 0x80800040, 0xd04045b1, 0x00b18840, 0x002c0744 }, + { 0x80800040, 0xd06045b1, 0x00b18860, 0x002c0746 }, + { 0x00000001, 0x34000020, 0x000007e0, 0x00000000 }, + { 0x02802005, 0x20003da0, 0x00000708, 0x00020002 }, + { 0x02600005, 0x20003da0, 0x02000708, 0x00010001 }, + { 0x009a0001, 0x27200169, 0x00000000, 0x80808080 }, + { 0x00780001, 0x27400231, 0x028d0724, 0x00000000 }, + { 0x00780001, 0x27240231, 0x008d0740, 0x00000000 }, + { 0x00600040, 0x25e04629, 0x008d0724, 0x008d0740 }, + { 0x00400040, 0x25e02529, 0x006905e0, 0x006905e8 }, + { 0x00200040, 0x25e02529, 0x004505e0, 0x004505e4 }, + { 0x00800040, 0x2400252c, 0x000005e0, 0x000005e2 }, + { 0x00800040, 0x24003d8c, 0x008d0400, 0x00080008 }, + { 0x00800008, 0x26803d8d, 0x008d0400, 0x00040004 }, + { 0x80800040, 0xd00035b1, 0x00b18800, 0x00b10680 }, + { 0x80800040, 0xd02035b1, 0x00b18820, 0x00b10680 }, + { 0x80800040, 0xd04035b1, 0x00b18840, 0x00b10680 }, + { 0x80800040, 0xd06035b1, 0x00b18860, 0x00b10680 }, + { 0x00000001, 0x34000020, 0x000007e0, 0x00000000 }, + { 0x00600001, 0x27340231, 0x008d0733, 0x00000000 }, + { 0x00800040, 0x24003e2c, 0x00b10726, 0x00020002 }, + { 0x00800048, 0x24003e2c, 0x00b10725, 0x00020002 }, + { 0x00800048, 0x24003e2c, 0x00b10724, 0x00010001 }, + { 0x00800008, 0x26803d8d, 0x00b10400, 0x00020002 }, + { 0x80800040, 0xd00035b1, 0x00b18800, 0x002d0680 }, + { 0x80800040, 0xd02035b1, 0x00b18820, 0x002d0684 }, + { 0x80800040, 0xd04035b1, 0x00b18840, 0x002d0688 }, + { 0x80800040, 0xd06035b1, 0x00b18860, 0x002d068c }, + { 0x00000001, 0x34000020, 0x000007e0, 0x00000000 }, + { 0x00400009, 0x26c05421, 0x00000744, 0x00690050 }, + { 0x00400009, 0x26d05421, 0x00000740, 0x00690050 }, + { 0x00600001, 0x26a00231, 0x00cf06c3, 0x00000000 }, + { 0x00800001, 0x26a80231, 0x00b10723, 0x00000000 }, + { 0x00800040, 0x24003e2c, 0x00b106a2, 0x00020002 }, + { 0x00800048, 0x24003e2c, 0x00b106a1, 0x00020002 }, + { 0x00800048, 0x24003e2c, 0x00b106a0, 0x00010001 }, + { 0x00800008, 0x26a03d8d, 0x00b10400, 0x00020002 }, + { 0x00200040, 0x220c3eac, 0x00450056, 0x06a006a0 }, + { 0x80800040, 0xd06035b1, 0x01ed9800, 0x00b18860 }, + { 0x80800040, 0xd04035b1, 0x01ed9804, 0x00b18840 }, + { 0x80800040, 0xd02035b1, 0x01ed9808, 0x00b18820 }, + { 0x80800040, 0xd00035b1, 0x01ed980c, 0x00b18800 }, + { 0x00000001, 0x34000020, 0x000007e0, 0x00000000 }, + { 0x00400009, 0x26c05421, 0x00000744, 0x00690050 }, + { 0x00400009, 0x26d05421, 0x00000740, 0x00690050 }, + { 0x00600001, 0x26a00231, 0x00cf06c3, 0x00000000 }, + { 0x00800001, 0x26a80231, 0x00b10723, 0x00000000 }, + { 0x00800042, 0x25c04629, 0x00b106a8, 0x00b106a9 }, + { 0x00800040, 0x24003e2c, 0x00b106a3, 0x00020002 }, + { 0x00800048, 0x24003e2c, 0x00b106a2, 0x00020002 }, + { 0x00800048, 0x24003e2c, 0x00b106a1, 0x00010001 }, + { 0x00800008, 0x26c03d8d, 0x008d0400, 0x00020002 }, + { 0x00600001, 0x26a00231, 0x00ae06c0, 0x00000000 }, + { 0x00600001, 0x46a60231, 0x00ae06cc, 0x00000000 }, + { 0x00600001, 0x46a70231, 0x00ae05c0, 0x00000000 }, + { 0x00200040, 0x220c3eac, 0x00450036, 0x06a006a0 }, + { 0x80800040, 0xd0603631, 0x01ee9800, 0x00b18860 }, + { 0x80800040, 0xd0403631, 0x01ee9802, 0x00b18840 }, + { 0x80800040, 0xd0203631, 0x01ee9804, 0x00b18820 }, + { 0x80800040, 0xd0003631, 0x01ee9806, 0x00b18800 }, + { 0x00000001, 0x34000020, 0x000007e0, 0x00000000 }, + { 0x00400009, 0x26c05421, 0x00000744, 0x00690050 }, + { 0x00400009, 0x26d05421, 0x00000740, 0x00690050 }, + { 0x00600001, 0x26a00231, 0x00ab06c3, 0x00000000 }, + { 0x00800001, 0x26a80231, 0x00b10723, 0x00000000 }, + { 0x00800040, 0x24003e2c, 0x00b106a2, 0x00020002 }, + { 0x00800048, 0x24003e2c, 0x00b106a1, 0x00020002 }, + { 0x00800048, 0x24003e2c, 0x00b106a0, 0x00010001 }, + { 0x00800008, 0x25c03d89, 0x008d0400, 0x00020002 }, + { 0x00800042, 0x26a0462d, 0x00b106a0, 0x00b106a1 }, + { 0x00600001, 0x46a10231, 0x00ae05c0, 0x00000000 }, + { 0x00600001, 0x26b00231, 0x00ae05d0, 0x00000000 }, + { 0x00200040, 0x220c3eac, 0x00450056, 0x06a006a0 }, + { 0x80800040, 0xd0603631, 0x01ed9800, 0x00b18860 }, + { 0x80800040, 0xd0403631, 0x01ed9804, 0x00b18840 }, + { 0x80800040, 0xd0203631, 0x01ed9808, 0x00b18820 }, + { 0x80800040, 0xd0003631, 0x01ed980c, 0x00b18800 }, + { 0x00000001, 0x34000020, 0x000007e0, 0x00000000 }, + { 0x00800042, 0x25c04629, 0x00b10724, 0x00b10725 }, + { 0x00800040, 0x24003e2c, 0x00b10726, 0x00020002 }, + { 0x00800048, 0x24003e2c, 0x00b10725, 0x00020002 }, + { 0x00800048, 0x24003e2c, 0x00b10724, 0x00010001 }, + { 0x00800008, 0x25e03d89, 0x002d0400, 0x00020002 }, + { 0x80800040, 0xd0003531, 0x00ad05c0, 0x00b18800 }, + { 0x80800040, 0xd0203531, 0x00ad05c2, 0x00b18820 }, + { 0x80800040, 0xd0403531, 0x00ad05c4, 0x00b18840 }, + { 0x80800040, 0xd0603531, 0x00ad05c6, 0x00b18860 }, + { 0x00000001, 0x34000020, 0x000007e0, 0x00000000 }, + { 0x00600001, 0x27480231, 0x00000747, 0x00000000 }, + { 0x00800042, 0x25c04629, 0x00b10740, 0x00b10741 }, + { 0x00800040, 0x24003e2c, 0x00b10742, 0x00020002 }, + { 0x00800048, 0x24003e2c, 0x00b10741, 0x00020002 }, + { 0x00800048, 0x24003e2c, 0x00b10740, 0x00010001 }, + { 0x00800008, 0x25e03d89, 0x002d0400, 0x00020002 }, + { 0x00800001, 0x45c10231, 0x00d205e0, 0x00000000 }, + { 0x80800040, 0xd0003631, 0x004d05c0, 0x00b18800 }, + { 0x80800040, 0xd0203631, 0x004d05c4, 0x00b18820 }, + { 0x80800040, 0xd0403631, 0x004d05c8, 0x00b18840 }, + { 0x80800040, 0xd0603631, 0x004d05cc, 0x00b18860 }, + { 0x00000001, 0x34000020, 0x000007e0, 0x00000000 }, + { 0x00000401, 0x27c80061, 0x00000000, 0x000f000f }, + { 0x00200801, 0x27c001a1, 0x004507fa, 0x00000000 }, + { 0x00000040, 0x22000c00, 0x00000200, 0x0ff04000 }, + { 0x00800001, 0x20400232, 0x00cd0400, 0x00000000 }, + { 0x00800001, 0x20500232, 0x00cd0408, 0x00000000 }, + { 0x00800001, 0x20600232, 0x00cd0410, 0x00000000 }, + { 0x00800001, 0x20700232, 0x00cd0418, 0x00000000 }, + { 0x00800001, 0x20800232, 0x00cd0440, 0x00000000 }, + { 0x00800001, 0x20900232, 0x00cd0448, 0x00000000 }, + { 0x00800001, 0x20a00232, 0x00cd0450, 0x00000000 }, + { 0x00800001, 0x20b00232, 0x00cd0458, 0x00000000 }, + { 0x00800001, 0x20c00232, 0x00cd0480, 0x00000000 }, + { 0x00800001, 0x20d00232, 0x00cd0488, 0x00000000 }, + { 0x00800001, 0x20e00232, 0x00cd0490, 0x00000000 }, + { 0x00800001, 0x20f00232, 0x00cd0498, 0x00000000 }, + { 0x00800001, 0x21000232, 0x00cd04c0, 0x00000000 }, + { 0x00800001, 0x21100232, 0x00cd04c8, 0x00000000 }, + { 0x00800001, 0x21200232, 0x00cd04d0, 0x00000000 }, + { 0x00800001, 0x21300232, 0x00cd04d8, 0x00000000 }, + { 0x01600031, 0x27800021, 0x508d07c0, 0x00000200 }, + { 0x00000001, 0x34000020, 0x000007e0, 0x00000000 }, + { 0x00600001, 0x27c00021, 0x008d0000, 0x00000000 }, + { 0x00200009, 0x27fa3e29, 0x00450064, 0x00040004 }, + { 0x00000040, 0x27e01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0xfffffd34 }, + { 0x00000001, 0x220401ec, 0x00000000, 0x00800080 }, + { 0x00000001, 0x220601ec, 0x00000000, 0x04000400 }, + { 0x00200008, 0x27006e2d, 0x0000006c, 0x00000040 }, + { 0x02600005, 0x20003e20, 0x0000006c, 0x00040004 }, + { 0x00780001, 0x26340231, 0x00000633, 0x00000000 }, + { 0x00800001, 0x27200231, 0x00b10620, 0x00000000 }, + { 0x00600001, 0x27400231, 0x00cf0643, 0x00000000 }, + { 0x00400008, 0x26806e2d, 0x00240070, 0x00004040 }, + { 0x00000040, 0x27e01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x0000006a }, + { 0x00000040, 0x22043d8c, 0x00000204, 0x00800080 }, + { 0x00000006, 0x27003dad, 0x00000700, 0x00010001 }, + { 0x00800001, 0x27200231, 0x00b10628, 0x00000000 }, + { 0x00400001, 0x27400231, 0x00808c26, 0x00000000 }, + { 0x00400001, 0x27440231, 0x00808c66, 0x00000000 }, + { 0x00400008, 0x26806e2d, 0x00240072, 0x00004040 }, + { 0x00000040, 0x22063d8c, 0x00000206, 0x00800080 }, + { 0x00000040, 0x27e01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000058 }, + { 0x00000040, 0x22043d8c, 0x00000204, 0x00800080 }, + { 0x00000006, 0x27003dad, 0x00000702, 0x00020002 }, + { 0x00800001, 0xaf800231, 0x00d28f80, 0x00000000 }, + { 0x00800001, 0xaf900231, 0x00d28fa0, 0x00000000 }, + { 0x00800001, 0xafc00231, 0x00d28fc0, 0x00000000 }, + { 0x00800001, 0xafd00231, 0x00d28fe0, 0x00000000 }, + { 0x00800001, 0xafa00231, 0x00d28c00, 0x00000000 }, + { 0x00800001, 0xafb00231, 0x00d28c20, 0x00000000 }, + { 0x00800001, 0xafe00231, 0x00d28c40, 0x00000000 }, + { 0x00800001, 0xaff00231, 0x00d28c60, 0x00000000 }, + { 0x00400001, 0x27200231, 0x0069065c, 0x00000000 }, + { 0x00600001, 0x27240231, 0x00a98fcc, 0x00000000 }, + { 0x00600001, 0x272c0231, 0x00a98fec, 0x00000000 }, + { 0x00600001, 0x27340231, 0x00008fff, 0x00000000 }, + { 0x00800001, 0x2620012d, 0x00b10720, 0x00000000 }, + { 0x00600001, 0x27400231, 0x00cf0663, 0x00000000 }, + { 0x00400008, 0x26806e2d, 0x00240074, 0x00004040 }, + { 0x00000040, 0x27e01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000032 }, + { 0x00000040, 0x22043d8c, 0x00000204, 0x00800080 }, + { 0x00000006, 0x27003dad, 0x00000700, 0x00010001 }, + { 0x00800001, 0x27200231, 0x00b10628, 0x00000000 }, + { 0x00600001, 0x27300231, 0x008d0638, 0x00000000 }, + { 0x00400001, 0x27400231, 0x00808c26, 0x00000000 }, + { 0x00400001, 0x27440231, 0x00808c66, 0x00000000 }, + { 0x00400008, 0x26806e2d, 0x00240076, 0x00004040 }, + { 0x00000040, 0x22063d8c, 0x00000206, 0x00800080 }, + { 0x00000040, 0x27e01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x0000001e }, + { 0x00800001, 0xaf800231, 0x00d28f80, 0x00000000 }, + { 0x00800001, 0xaf900231, 0x00d28fa0, 0x00000000 }, + { 0x00800001, 0xafc00231, 0x00d28fc0, 0x00000000 }, + { 0x00800001, 0xafd00231, 0x00d28fe0, 0x00000000 }, + { 0x00800001, 0xafa00231, 0x00d28c00, 0x00000000 }, + { 0x00800001, 0xafb00231, 0x00d28c20, 0x00000000 }, + { 0x00800001, 0xafe00231, 0x00d28c40, 0x00000000 }, + { 0x00800001, 0xaff00231, 0x00d28c60, 0x00000000 }, + { 0x00000040, 0x27e01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x000000e0 }, + { 0x00000040, 0x27e01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0xfffffcce }, + { 0x00000001, 0x27800021, 0x00000780, 0x00000000 }, + { 0x00000001, 0x27a00021, 0x000007a0, 0x00000000 }, + { 0x01600031, 0x20001c20, 0x708d0000, 0x82000010 }, + { 0x00600001, 0x27800231, 0x008d0740, 0x00000000 }, + { 0x00400005, 0x22083dac, 0x00690680, 0x000f000f }, + { 0x00400040, 0x26a04625, 0x01e09020, 0x00690058 }, + { 0x00000001, 0x26d001ad, 0x00000700, 0x00000000 }, + { 0x00000040, 0x27e41c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001400, 0x00001400, 0x000006a0 }, + { 0x80600040, 0xcc0035b1, 0x00898800, 0x008d0760 }, + { 0x80600040, 0xcc1035b1, 0x00898820, 0x008d0770 }, + { 0x00800001, 0x27200231, 0x008d0724, 0x00000000 }, + { 0x00400001, 0x27400231, 0x00808c06, 0x00000000 }, + { 0x00000006, 0x26d03dad, 0x00000700, 0x00010001 }, + { 0x00000040, 0x27e41c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001400, 0x00001400, 0x000006a4 }, + { 0x80600040, 0xcc2035b1, 0x00898808, 0x008d0760 }, + { 0x80600040, 0xcc3035b1, 0x00898828, 0x008d0770 }, + { 0x00000001, 0x27230231, 0x00000783, 0x00000000 }, + { 0x00400001, 0x27240231, 0x008a8c18, 0x00000000 }, + { 0x00400001, 0x27280231, 0x008a8c38, 0x00000000 }, + { 0x00400001, 0x272c0231, 0x00008c3e, 0x00000000 }, + { 0x00400001, 0x27400231, 0x00690784, 0x00000000 }, + { 0x00000006, 0x26d03dad, 0x00000700, 0x00020002 }, + { 0x00000040, 0x27e41c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001400, 0x00001400, 0x000006a8 }, + { 0x80600040, 0xcc4035b1, 0x00898840, 0x008d0760 }, + { 0x80600040, 0xcc5035b1, 0x00898860, 0x008d0770 }, + { 0x00800001, 0x27200231, 0x008d0724, 0x00000000 }, + { 0x00600001, 0x27280231, 0x00000727, 0x00000000 }, + { 0x00400001, 0x27400231, 0x00808c46, 0x00000000 }, + { 0x00000006, 0x26d03dad, 0x00000700, 0x00030003 }, + { 0x00000040, 0x27e41c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001400, 0x00001400, 0x000006ac }, + { 0x80600040, 0xcc6035b1, 0x00898848, 0x008d0760 }, + { 0x80600040, 0xcc7035b1, 0x00898868, 0x008d0770 }, + { 0x00000001, 0x34000020, 0x000007e0, 0x00000000 }, + { 0x00800001, 0x2760022d, 0x00090724, 0x00000000 }, + { 0x00000001, 0x34000020, 0x000007e4, 0x00000000 }, + { 0x00800001, 0x2760022d, 0x00280740, 0x00000000 }, + { 0x00000001, 0x34000020, 0x000007e4, 0x00000000 }, + { 0x02802005, 0x20003da0, 0x000006d0, 0x00020002 }, + { 0x02802005, 0x20003da0, 0x020006d0, 0x00010001 }, + { 0x009a0001, 0x27200169, 0x00000000, 0x80808080 }, + { 0x00780001, 0x27400231, 0x028d0724, 0x00000000 }, + { 0x00780001, 0x27240231, 0x008d0740, 0x00000000 }, + { 0x00400040, 0x25e04629, 0x00690724, 0x00690740 }, + { 0x00200040, 0x25e02529, 0x004505e0, 0x004505e4 }, + { 0x00800040, 0x2400252c, 0x000005e0, 0x000005e2 }, + { 0x00800040, 0x24003d8c, 0x008d0400, 0x00040004 }, + { 0x00800008, 0x27603d8d, 0x008d0400, 0x00030003 }, + { 0x00000001, 0x34000020, 0x000007e4, 0x00000000 }, + { 0x00600001, 0x26c00231, 0x008d0724, 0x00000000 }, + { 0x00400001, 0x26c80231, 0x0069072b, 0x00000000 }, + { 0x00600040, 0x24003e2c, 0x008d06c2, 0x00020002 }, + { 0x00600048, 0x24003e2c, 0x008d06c1, 0x00020002 }, + { 0x00600048, 0x25e03e29, 0x008d06c0, 0x00010001 }, + { 0x00800008, 0x27603d2d, 0x002905e0, 0x00020002 }, + { 0x00000001, 0x34000020, 0x000007e4, 0x00000000 }, + { 0x00400009, 0x26e05421, 0x00000740, 0x00690050 }, + { 0x00600001, 0x26c40231, 0x008d0723, 0x00000000 }, + { 0x00400001, 0x26c00231, 0x00ab06e3, 0x00000000 }, + { 0x00600040, 0x24003e2c, 0x008d06c2, 0x00020002 }, + { 0x00600048, 0x24003e2c, 0x008d06c1, 0x00020002 }, + { 0x00600048, 0x26c03e2d, 0x008d06c0, 0x00010001 }, + { 0x00400040, 0x22083eac, 0x00690054, 0x06c006c0 }, + { 0x00800008, 0x27603dad, 0x01e99000, 0x00020002 }, + { 0x00000001, 0x34000020, 0x000007e4, 0x00000000 }, + { 0x00400009, 0x26e05421, 0x00000740, 0x00690050 }, + { 0x00600001, 0x26c40231, 0x008d0723, 0x00000000 }, + { 0x00400001, 0x26c00231, 0x00ab06e3, 0x00000000 }, + { 0x00600042, 0x25c04629, 0x008d06c4, 0x008d06c5 }, + { 0x00600040, 0x24003e2c, 0x008d06c3, 0x00020002 }, + { 0x00600048, 0x24003e2c, 0x008d06c2, 0x00020002 }, + { 0x00600048, 0x24003e2c, 0x008d06c1, 0x00010001 }, + { 0x00600008, 0x26c03d8d, 0x008d0400, 0x00020002 }, + { 0x00400001, 0x46c401ad, 0x006906c4, 0x00000000 }, + { 0x00400001, 0x46c6012d, 0x006905c0, 0x00000000 }, + { 0x00400040, 0x22083eac, 0x00690054, 0x06c006c0 }, + { 0x00800001, 0x276001ad, 0x01ea9000, 0x00000000 }, + { 0x00000001, 0x34000020, 0x000007e4, 0x00000000 }, + { 0x00400009, 0x26e05421, 0x00000740, 0x00690050 }, + { 0x00600001, 0x26c40231, 0x008d0723, 0x00000000 }, + { 0x00400001, 0x26c00231, 0x00ab06e3, 0x00000000 }, + { 0x00600042, 0x25c04629, 0x008d06c0, 0x008d06c1 }, + { 0x00600040, 0x24003e2c, 0x008d06c2, 0x00020002 }, + { 0x00600048, 0x24003e2c, 0x008d06c1, 0x00020002 }, + { 0x00600048, 0x26e03e2d, 0x008d06c0, 0x00010001 }, + { 0x00400008, 0x46c23dad, 0x006906e0, 0x00020002 }, + { 0x00200008, 0x26d03dad, 0x004506e8, 0x00020002 }, + { 0x00400001, 0x46c0012d, 0x006905c0, 0x00000000 }, + { 0x00400009, 0x22083eac, 0x00690054, 0x00010001 }, + { 0x00400040, 0x22083d8c, 0x00690208, 0x06c006c0 }, + { 0x00800001, 0x276001ad, 0x01e99000, 0x00000000 }, + { 0x00000001, 0x34000020, 0x000007e4, 0x00000000 }, + { 0x00600042, 0x45c04629, 0x008d0724, 0x008d0725 }, + { 0x00600040, 0x24003e2c, 0x008d0726, 0x00020002 }, + { 0x00600048, 0x24003e2c, 0x008d0725, 0x00020002 }, + { 0x00600048, 0x25e03e29, 0x008d0724, 0x00010001 }, + { 0x00600008, 0x45c23d29, 0x008d05e0, 0x00020002 }, + { 0x00800001, 0x2760012d, 0x002a05c0, 0x00000000 }, + { 0x00000001, 0x34000020, 0x000007e4, 0x00000000 }, + { 0x00600001, 0x27440231, 0x00000743, 0x00000000 }, + { 0x00600042, 0x45c04629, 0x008d0740, 0x008d0741 }, + { 0x00600040, 0x24003e2c, 0x008d0742, 0x00020002 }, + { 0x00600048, 0x24003e2c, 0x008d0741, 0x00020002 }, + { 0x00600048, 0x25e03e29, 0x008d0740, 0x00010001 }, + { 0x00600008, 0x45c23d29, 0x008d05e0, 0x00020002 }, + { 0x00800001, 0x2760012d, 0x004905c0, 0x00000000 }, + { 0x00000001, 0x34000020, 0x000007e4, 0x00000000 }, + { 0x00000401, 0x27c80061, 0x00000000, 0x000f000f }, + { 0x00200801, 0x27c001a1, 0x004507fa, 0x00000000 }, + { 0x00000040, 0x22000c00, 0x00000200, 0x0ff04000 }, + { 0x00800001, 0x20400232, 0x00a90400, 0x00000000 }, + { 0x00800001, 0x20500232, 0x00a90404, 0x00000000 }, + { 0x00800001, 0x20600232, 0x00a90408, 0x00000000 }, + { 0x00800001, 0x20700232, 0x00a9040c, 0x00000000 }, + { 0x00800001, 0x20800232, 0x00a90440, 0x00000000 }, + { 0x00800001, 0x20900232, 0x00a90444, 0x00000000 }, + { 0x00800001, 0x20a00232, 0x00a90448, 0x00000000 }, + { 0x00800001, 0x20b00232, 0x00a9044c, 0x00000000 }, + { 0x00800001, 0x20c00232, 0x00a90480, 0x00000000 }, + { 0x00800001, 0x20d00232, 0x00a90484, 0x00000000 }, + { 0x00800001, 0x20e00232, 0x00a90488, 0x00000000 }, + { 0x00800001, 0x20f00232, 0x00a9048c, 0x00000000 }, + { 0x00800001, 0x21000232, 0x00a904c0, 0x00000000 }, + { 0x00800001, 0x21100232, 0x00a904c4, 0x00000000 }, + { 0x00800001, 0x21200232, 0x00a904c8, 0x00000000 }, + { 0x00800001, 0x21300232, 0x00a904cc, 0x00000000 }, + { 0x01600031, 0x27800021, 0x508d07c0, 0x00000200 }, + { 0x00000001, 0x34000020, 0x000007e0, 0x00000000 }, + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x00600001, 0x27c00021, 0x008d0000, 0x00000000 }, + { 0x00200009, 0x27fa3e29, 0x00450064, 0x00040004 }, + { 0x00000401, 0x27c80061, 0x00000000, 0x000f000f }, + { 0x00200809, 0x27c03e21, 0x00450064, 0x00040004 }, + { 0x00000040, 0x22000d20, 0x00000062, 0x1218a000 }, + { 0x00a02401, 0x20400232, 0x00b10080, 0x00000000 }, + { 0x00a02801, 0x20500232, 0x00b10090, 0x00000000 }, + { 0x00a02401, 0x20800232, 0x00b100c0, 0x00000000 }, + { 0x00a02801, 0x20900232, 0x00b100d0, 0x00000000 }, + { 0x00a02401, 0x20c00232, 0x00b10100, 0x00000000 }, + { 0x00a02801, 0x20d00232, 0x00b10110, 0x00000000 }, + { 0x00a02401, 0x21000232, 0x00b10140, 0x00000000 }, + { 0x00a02801, 0x21100232, 0x00b10150, 0x00000000 }, + { 0x01600031, 0x27800021, 0x508d07c0, 0x00000200 }, + { 0x00000401, 0x20280062, 0x00000000, 0x0007000f }, + { 0x0000080c, 0x20243c22, 0x000007c4, 0x00010001 }, + { 0x00000040, 0x22001c00, 0x00000200, 0xf8000001 }, + { 0x00800001, 0x40400232, 0x00b10180, 0x00000000 }, + { 0x00800001, 0x40410232, 0x00b101c0, 0x00000000 }, + { 0x00800001, 0x40600232, 0x00b10190, 0x00000000 }, + { 0x00800001, 0x40610232, 0x00b101d0, 0x00000000 }, + { 0x00800001, 0x40800232, 0x00b101a0, 0x00000000 }, + { 0x00800001, 0x40810232, 0x00b101e0, 0x00000000 }, + { 0x00800001, 0x40a00232, 0x00b101b0, 0x00000000 }, + { 0x00800001, 0x40a10232, 0x00b101f0, 0x00000000 }, + { 0x01600031, 0x27a00001, 0x508d0000, 0x00000200 }, + { 0x00000001, 0x27800021, 0x00000780, 0x00000000 }, + { 0x00000001, 0x27a00021, 0x000007a0, 0x00000000 }, + { 0x01600031, 0x20001c20, 0x708d0000, 0x82000010 }, + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x00600001, 0x20400021, 0x008d0000, 0x00000000 }, + { 0x00000005, 0x20203e2d, 0x00000061, 0x001f001f }, + { 0x00200009, 0x20643e2d, 0x00450064, 0x00040004 }, + { 0x00000001, 0x203a01ed, 0x00000000, 0x00000000 }, + { 0x01000010, 0x20003dac, 0x00000020, 0x00160016 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x0000001e }, + { 0x01200010, 0x20003e2c, 0x0200006c, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x00000024 }, + { 0x00800009, 0x25403dad, 0x00050064, 0x00020002 }, + { 0x00000001, 0x203a01ed, 0x00000000, 0x00180018 }, + { 0x00200040, 0x45483dad, 0x00660548, 0x00100010 }, + { 0x00200040, 0x45523dad, 0x00660552, 0x00100010 }, + { 0x00400040, 0x25583dad, 0x00690558, 0x00100010 }, + { 0x00800040, 0x208035ad, 0x00b10080, 0x00b10540 }, + { 0x00600040, 0x45403dad, 0x00ae0540, 0x00200020 }, + { 0x00800040, 0x20a035ad, 0x00b100a0, 0x00b10540 }, + { 0x00600040, 0x45423dad, 0x00ae0542, 0x00200020 }, + { 0x00800040, 0x20e035ad, 0x00b100e0, 0x00b10540 }, + { 0x00600040, 0x45403dad, 0x00ae0540, 0xffe0ffe0 }, + { 0x00800040, 0x20c035ad, 0x00b100c0, 0x00b10540 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000014 }, + { 0x06600010, 0x20003dac, 0x02000020, 0x00030003 }, + { 0x00000001, 0x206c0171, 0x00000000, 0x00000000 }, + { 0x00610001, 0x208000a5, 0x02050080, 0x00000000 }, + { 0x00610001, 0x212000a5, 0x02090100, 0x00000000 }, + { 0x00410001, 0x211000a5, 0x02690100, 0x00000000 }, + { 0x00200009, 0x25403dad, 0x00450064, 0x00020002 }, + { 0x00800040, 0x208035ad, 0x00b10080, 0x00050540 }, + { 0x00200040, 0x40883dad, 0x00660088, 0x00200020 }, + { 0x00200040, 0x40923dad, 0x00660092, 0x00200020 }, + { 0x00400040, 0x20983dad, 0x00690098, 0x00200020 }, + { 0x00200401, 0x22080060, 0x00000000, 0x03400140 }, + { 0x00000c01, 0x220c0060, 0x00000000, 0x04400080 }, + { 0x00000801, 0x22040060, 0x00000000, 0x01000070 }, + { 0x00000001, 0x20200169, 0x00000000, 0x00000000 }, + { 0x0000000c, 0x2458262d, 0x0000006d, 0x00000020 }, + { 0x00000001, 0x210e0169, 0x00000000, 0x00010001 }, + { 0x00000005, 0x24583dad, 0x00000458, 0x00030003 }, + { 0x01000010, 0x200035ac, 0x0000010e, 0x00000458 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x000002fe }, + { 0x01000010, 0x20003dac, 0x0200010e, 0x00010001 }, + { 0x00010401, 0x24540061, 0x02000000, 0x06c00640 }, + { 0x00010805, 0x245a3e2d, 0x02008800, 0x007f007f }, + { 0x00110401, 0x24540061, 0x02000000, 0x04800780 }, + { 0x00110805, 0x245a3e2d, 0x02008804, 0x007f007f }, + { 0x0000000c, 0x211e362d, 0x0000006c, 0x00000020 }, + { 0x00000040, 0x20780d21, 0x0000045a, 0x0208a002 }, + { 0x02000005, 0x20003dac, 0x0200011e, 0x00030003 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x000001be }, + { 0x01000005, 0x20003dac, 0x00009800, 0x00030003 }, + { 0x00200005, 0x24443dad, 0x00459800, 0x00030003 }, + { 0x0020000c, 0x24403dad, 0x00459800, 0x00020002 }, + { 0x01600006, 0x20003dac, 0x02000446, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000012 }, + { 0x00010040, 0x22000c20, 0x02000078, 0x00400000 }, + { 0x00110040, 0x22000c20, 0x02000078, 0x00700000 }, + { 0x00310040, 0x20401da5, 0x02450440, 0xfffffffe }, + { 0x00110001, 0x20480061, 0x02000000, 0x000c000c }, + { 0x00010040, 0x20401da5, 0x02000440, 0xfffffffe }, + { 0x00010001, 0x204401a5, 0x02000442, 0x00000000 }, + { 0x00010001, 0x20480061, 0x02000000, 0x0007000c }, + { 0x01600031, 0x25600021, 0x408d0040, 0x00000200 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x0000000e }, + { 0x00010040, 0x22000c20, 0x02000078, 0x00200000 }, + { 0x00110040, 0x22000c20, 0x02000078, 0x00400000 }, + { 0x00200001, 0x204001a5, 0x00450440, 0x00000000 }, + { 0x00110040, 0x20441da5, 0x02000442, 0xfffffffe }, + { 0x00110001, 0x20480061, 0x02000000, 0x000c0007 }, + { 0x00010001, 0x20480061, 0x02000000, 0x00070007 }, + { 0x01600031, 0x25600021, 0x408d0040, 0x00000200 }, + { 0x0020040c, 0x24403dad, 0x00459800, 0x00030003 }, + { 0x00200805, 0x24483dad, 0x00459800, 0x00070007 }, + { 0x01600006, 0x20003dac, 0x0000044a, 0x00000000 }, + { 0x00200001, 0x204001a5, 0x00450440, 0x00000000 }, + { 0x00000009, 0x20403ca5, 0x00000040, 0x00010001 }, + { 0x00010040, 0x22000c20, 0x00000078, 0x00200010 }, + { 0x00110040, 0x22000c20, 0x00000078, 0x00300010 }, + { 0x00010001, 0x20480061, 0x00000000, 0x00030009 }, + { 0x00110001, 0x20480061, 0x00000000, 0x00040009 }, + { 0x02600031, 0x27000021, 0x408d0040, 0x00000200 }, + { 0x01000005, 0x20003dac, 0x00009800, 0x00030003 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x0000001a }, + { 0x00600001, 0x26220231, 0x008d05c0, 0x00000000 }, + { 0x00600401, 0x26120231, 0x008d05b8, 0x00000000 }, + { 0x00600801, 0x26020231, 0x008d05b0, 0x00000000 }, + { 0x00600401, 0x25f20231, 0x008d05a8, 0x00000000 }, + { 0x00600801, 0x25e20231, 0x008d05a0, 0x00000000 }, + { 0x00600401, 0x25d20231, 0x008d0598, 0x00000000 }, + { 0x00600801, 0x25c20231, 0x008d0590, 0x00000000 }, + { 0x00600401, 0x25b20231, 0x008d0588, 0x00000000 }, + { 0x00600801, 0x25a20231, 0x008d0580, 0x00000000 }, + { 0x00600401, 0x25920231, 0x008d0578, 0x00000000 }, + { 0x00600801, 0x25820231, 0x008d0570, 0x00000000 }, + { 0x00600001, 0x25720231, 0x008d0568, 0x00000000 }, + { 0x00600001, 0x25620231, 0x008d0560, 0x00000000 }, + { 0x00110001, 0x220001ec, 0x02000000, 0x05820582 }, + { 0x00010001, 0x220001ec, 0x02000000, 0x05620562 }, + { 0x00000001, 0x220e0128, 0x00000454, 0x00000000 }, + { 0x01800006, 0x200035ac, 0x02000446, 0x00000444 }, + { 0x00810001, 0xbc000229, 0x02ad8000, 0x00000000 }, + { 0x00810001, 0xbc200229, 0x02ad8020, 0x00000000 }, + { 0x00810001, 0xbc400229, 0x02ad8040, 0x00000000 }, + { 0x00810001, 0xbc600229, 0x02ad8060, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x0000012a }, + { 0x00600001, 0x2024018d, 0x008d0200, 0x00000000 }, + { 0x01000041, 0x245e35ad, 0x00000446, 0x00000444 }, + { 0x00000040, 0x22022d08, 0x00000200, 0x00100010 }, + { 0x02000005, 0x20003db0, 0x0200045e, 0x00010001 }, + { 0x00200040, 0x22042d08, 0x00450200, 0x00200020 }, + { 0x00400001, 0x244c0109, 0x00690200, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000066 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x00000064 }, + { 0x00000040, 0x22003d08, 0x00000200, 0xffdeffde }, + { 0x00000440, 0x22023d08, 0x00000202, 0xffeeffee }, + { 0x00000801, 0x220c0060, 0x00000000, 0x04a00480 }, + { 0x01000010, 0x20003db0, 0x0000045e, 0x00040004 }, + { 0x00a02040, 0x2400462c, 0x00ad8000, 0x00ad8005 }, + { 0x00a02048, 0x24003e2c, 0x00ad8001, 0xfffbfffb }, + { 0x00a02048, 0x24003e2c, 0x00ad8002, 0x00140014 }, + { 0x00a02048, 0x24003e2c, 0x00ad8003, 0x00140014 }, + { 0x00a02048, 0xb8003e2d, 0x00ad8004, 0xfffbfffb }, + { 0x00a02040, 0x2400462c, 0x00ad8040, 0x00ad8045 }, + { 0x00a02048, 0x24003e2c, 0x00ad8041, 0xfffbfffb }, + { 0x00a02048, 0x24003e2c, 0x00ad8042, 0x00140014 }, + { 0x00a02048, 0x24003e2c, 0x00ad8043, 0x00140014 }, + { 0x00a02048, 0xb8403e2d, 0x00ad8044, 0xfffbfffb }, + { 0x00a02040, 0x2400462c, 0x00ad8080, 0x00ad8085 }, + { 0x00a02048, 0x24003e2c, 0x00ad8081, 0xfffbfffb }, + { 0x00a02048, 0x24003e2c, 0x00ad8082, 0x00140014 }, + { 0x00a02048, 0x24003e2c, 0x00ad8083, 0x00140014 }, + { 0x00a02048, 0xb8803e2d, 0x00ad8084, 0xfffbfffb }, + { 0x00600040, 0x2400462c, 0x008d80c0, 0x008d80c5 }, + { 0x00600048, 0x24003e2c, 0x008d80c1, 0xfffbfffb }, + { 0x00600048, 0x24003e2c, 0x008d80c2, 0x00140014 }, + { 0x00600048, 0x24003e2c, 0x008d80c3, 0x00140014 }, + { 0x00600048, 0xb8c03e2d, 0x008d80c4, 0xfffbfffb }, + { 0x00000401, 0x22000060, 0x00000000, 0x04a00480 }, + { 0x00000c01, 0x22040060, 0x00000000, 0x04a00490 }, + { 0x00010802, 0x220c2d28, 0x00000454, 0x04800480 }, + { 0x00a02040, 0x24003dac, 0x00b18000, 0x02000200 }, + { 0x00800048, 0x24003dac, 0x01ed8800, 0xfffbfffb }, + { 0x00800048, 0x24203dac, 0x01ed8820, 0xfffbfffb }, + { 0x00a02048, 0x24003dac, 0x00b18020, 0x00140014 }, + { 0x00800048, 0x24003dac, 0x01ed8820, 0x00140014 }, + { 0x00800048, 0x24203dac, 0x01ed8840, 0x00140014 }, + { 0x00a02048, 0x24003dac, 0x00b18040, 0xfffbfffb }, + { 0x00800048, 0x24003dac, 0x01ed8840, 0x00010001 }, + { 0x00800048, 0x24203dac, 0x01ed8860, 0x00010001 }, + { 0x8080000c, 0xd8003d91, 0x00b10400, 0x000a000a }, + { 0x8080100c, 0xd8203d91, 0x00b10420, 0x000a000a }, + { 0x00a02040, 0x24003dac, 0x00b18040, 0x02000200 }, + { 0x00800048, 0x24003dac, 0x01ed8840, 0xfffbfffb }, + { 0x00800048, 0x24203dac, 0x01ed8860, 0xfffbfffb }, + { 0x00a02048, 0x24003dac, 0x00b18060, 0x00140014 }, + { 0x00800048, 0x24003dac, 0x01ed8860, 0x00140014 }, + { 0x00800048, 0x24203dac, 0x01ed8880, 0x00140014 }, + { 0x00a02048, 0x24003dac, 0x00b18080, 0xfffbfffb }, + { 0x00800048, 0x24003dac, 0x01ed8880, 0x00010001 }, + { 0x00800048, 0x24203dac, 0x01ed88a0, 0x00010001 }, + { 0x8080000c, 0xd8403d91, 0x00b10400, 0x000a000a }, + { 0x8080100c, 0xd8603d91, 0x00b10420, 0x000a000a }, + { 0x00010220, 0x34001c00, 0x00001400, 0x000000b4 }, + { 0x01000010, 0x20003db0, 0x00000444, 0x00000000 }, + { 0x01000010, 0x20003db0, 0x02000446, 0x00020002 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x0000004c }, + { 0x00010220, 0x34001c00, 0x02001400, 0x0000004a }, + { 0x00400040, 0x22003d28, 0x0069044c, 0xfffefffe }, + { 0x03400010, 0x20003dac, 0x00000446, 0x00020002 }, + { 0x01000010, 0x20003db0, 0x02000444, 0x00020002 }, + { 0x00410040, 0x22002d08, 0x00690200, 0x00100010 }, + { 0x01000010, 0x20003dac, 0x00000446, 0x00000000 }, + { 0x00010002, 0x220c2d28, 0x02000454, 0x04800480 }, + { 0x00800040, 0x24003e2c, 0x01ed8000, 0x00100010 }, + { 0x00800040, 0x24203e2c, 0x01ed8020, 0x00100010 }, + { 0x00800048, 0x24003e2c, 0x01ed8001, 0xfffbfffb }, + { 0x00800048, 0x24203e2c, 0x01ed8021, 0xfffbfffb }, + { 0x00800048, 0x24003e2c, 0x01ed8002, 0x00140014 }, + { 0x00800048, 0x24203e2c, 0x01ed8022, 0x00140014 }, + { 0x00800048, 0x24003e2c, 0x01ed8003, 0x00140014 }, + { 0x00800048, 0x24203e2c, 0x01ed8023, 0x00140014 }, + { 0x00800048, 0x24003e2c, 0x01ed8004, 0xfffbfffb }, + { 0x00800048, 0x24203e2c, 0x01ed8024, 0xfffbfffb }, + { 0x00800048, 0x24003e2c, 0x01ed8005, 0x00010001 }, + { 0x00800048, 0x24203e2c, 0x01ed8025, 0x00010001 }, + { 0x8080000c, 0xd8003d91, 0x00b10400, 0x00050005 }, + { 0x8080100c, 0xd8203d91, 0x00b10420, 0x00050005 }, + { 0x00800040, 0x24003e2c, 0x01ed8040, 0x00100010 }, + { 0x00800040, 0x24203e2c, 0x01ed8060, 0x00100010 }, + { 0x00800048, 0x24003e2c, 0x01ed8041, 0xfffbfffb }, + { 0x00800048, 0x24203e2c, 0x01ed8061, 0xfffbfffb }, + { 0x00800048, 0x24003e2c, 0x01ed8042, 0x00140014 }, + { 0x00800048, 0x24203e2c, 0x01ed8062, 0x00140014 }, + { 0x00800048, 0x24003e2c, 0x01ed8043, 0x00140014 }, + { 0x00800048, 0x24203e2c, 0x01ed8063, 0x00140014 }, + { 0x00800048, 0x24003e2c, 0x01ed8044, 0xfffbfffb }, + { 0x00800048, 0x24203e2c, 0x01ed8064, 0xfffbfffb }, + { 0x00800048, 0x24003e2c, 0x01ed8045, 0x00010001 }, + { 0x00800048, 0x24203e2c, 0x01ed8065, 0x00010001 }, + { 0x8080000c, 0xd8403d91, 0x00b10400, 0x00050005 }, + { 0x8080100c, 0xd8603d91, 0x00b10420, 0x00050005 }, + { 0x00110220, 0x34001c00, 0x02001400, 0x00000004 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x0000005c }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000062 }, + { 0x01000010, 0x20003db0, 0x00000446, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000042 }, + { 0x00200401, 0x22000128, 0x0066044c, 0x00000000 }, + { 0x00200c01, 0x22040128, 0x0045044e, 0x00000000 }, + { 0x00000801, 0x220c0128, 0x00000454, 0x00000000 }, + { 0x03400010, 0x20003dac, 0x02000444, 0x00020002 }, + { 0x01000010, 0x20003dac, 0x00000444, 0x00000000 }, + { 0x00410040, 0x22002d08, 0x02690200, 0x00010001 }, + { 0x01000010, 0x20003db0, 0x02000446, 0x00020002 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x00000002 }, + { 0x00110001, 0x220c0168, 0x02000000, 0x04800480 }, + { 0x00a02040, 0x24003e2c, 0x00ad83e0, 0x00100010 }, + { 0x00800048, 0x24003e2c, 0x01ed8be0, 0xfffbfffb }, + { 0x00800048, 0x24203e2c, 0x01ed8800, 0xfffbfffb }, + { 0x00a02048, 0x24003e2c, 0x00ad8000, 0x00140014 }, + { 0x00800048, 0x24003e2c, 0x01ed8800, 0x00140014 }, + { 0x00800048, 0x24203e2c, 0x01ed8820, 0x00140014 }, + { 0x00a02048, 0x24003e2c, 0x00ad8020, 0xfffbfffb }, + { 0x00800048, 0x24003e2c, 0x01ed8820, 0x00010001 }, + { 0x00800048, 0x24203e2c, 0x01ed8840, 0x00010001 }, + { 0x8080000c, 0xd8003d91, 0x00b10400, 0x00050005 }, + { 0x8080100c, 0xd8203d91, 0x00b10420, 0x00050005 }, + { 0x00a02040, 0x24003e2c, 0x00ad8020, 0x00100010 }, + { 0x00800048, 0x24003e2c, 0x01ed8820, 0xfffbfffb }, + { 0x00800048, 0x24203e2c, 0x01ed8840, 0xfffbfffb }, + { 0x00a02048, 0x24003e2c, 0x00ad8040, 0x00140014 }, + { 0x00800048, 0x24003e2c, 0x01ed8840, 0x00140014 }, + { 0x00800048, 0x24203e2c, 0x01ed8860, 0x00140014 }, + { 0x00a02048, 0x24003e2c, 0x00ad8060, 0xfffbfffb }, + { 0x00800048, 0x24003e2c, 0x01ed8860, 0x00010001 }, + { 0x00800048, 0x24203e2c, 0x01ed8880, 0x00010001 }, + { 0x8080000c, 0xd8403d91, 0x00b10400, 0x00050005 }, + { 0x8080100c, 0xd8603d91, 0x00b10420, 0x00050005 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x00000016 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x0000001c }, + { 0x00200401, 0x22000128, 0x0045044c, 0x00000000 }, + { 0x00000801, 0x220c0128, 0x00000454, 0x00000000 }, + { 0x01200010, 0x20003dac, 0x00000444, 0x00030003 }, + { 0x01200010, 0x20003dac, 0x02000446, 0x00030003 }, + { 0x00210040, 0x22002d08, 0x00450200, 0x00010001 }, + { 0x00210040, 0x22002d08, 0x02450200, 0x00100010 }, + { 0x00800001, 0xb8000229, 0x01ed8000, 0x00000000 }, + { 0x00800001, 0xb8200229, 0x01ed8020, 0x00000000 }, + { 0x00800001, 0xb8400229, 0x01ed8040, 0x00000000 }, + { 0x00800001, 0xb8600229, 0x01ed8060, 0x00000000 }, + { 0x80800042, 0xd8004631, 0x00d29800, 0x00d20480 }, + { 0x80800042, 0xd8204631, 0x00d29820, 0x00d204a0 }, + { 0x80800042, 0xd8404631, 0x00d29840, 0x00d204c0 }, + { 0x80800042, 0xd8604631, 0x00d29860, 0x00d204e0 }, + { 0x00600001, 0x220001ac, 0x008d0024, 0x00000000 }, + { 0x00200040, 0x244c3dad, 0x00450448, 0xfff8fff8 }, + { 0x00000401, 0x220001ec, 0x00000000, 0x07000700 }, + { 0x00000c01, 0x220201e8, 0x00000000, 0x07100710 }, + { 0x00000801, 0x220e0128, 0x00000456, 0x00000000 }, + { 0x00000441, 0x254635ad, 0x00000448, 0x0000044a }, + { 0x00000c41, 0x254025ad, 0x0000444c, 0x0000444e }, + { 0x00000c41, 0x254225ad, 0x00000448, 0x0000444e }, + { 0x00000841, 0x254435ad, 0x0000444c, 0x0000044a }, + { 0x00200040, 0x244c3d09, 0x00450200, 0x00100010 }, + { 0x00800041, 0x24002628, 0x00ad8000, 0x00000540 }, + { 0x00800041, 0x24202628, 0x00ad8020, 0x00000540 }, + { 0x00800048, 0x24002628, 0x00ad8002, 0x00000542 }, + { 0x00800048, 0x24202628, 0x00ad8022, 0x00000542 }, + { 0x00200001, 0x22000128, 0x0045044c, 0x00000000 }, + { 0x00800048, 0x24002628, 0x01ed8000, 0x00000544 }, + { 0x00800048, 0x24202628, 0x01ed8020, 0x00000544 }, + { 0x00800048, 0xbc002629, 0x01ed8002, 0x00000546 }, + { 0x00801048, 0xbc202629, 0x01ed8022, 0x00000546 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000126 }, + { 0x00000001, 0x20220169, 0x00000000, 0x00040004 }, + { 0x00200005, 0x24443dad, 0x00459800, 0x00030003 }, + { 0x0020000c, 0x24403dad, 0x00459800, 0x00020002 }, + { 0x01600006, 0x20003dac, 0x02000446, 0x00000000 }, + { 0x00010040, 0x22000c20, 0x02000078, 0x00200000 }, + { 0x00110040, 0x22000c20, 0x02000078, 0x00500000 }, + { 0x00310040, 0x20401da5, 0x02450440, 0xfffffffe }, + { 0x00110001, 0x20480061, 0x02000000, 0x00080008 }, + { 0x00010040, 0x20401da5, 0x02000440, 0xfffffffe }, + { 0x00010001, 0x204401a5, 0x02000442, 0x00000000 }, + { 0x00010001, 0x20480061, 0x02000000, 0x00030008 }, + { 0x01600031, 0x25600021, 0x408d0040, 0x00000200 }, + { 0x00000040, 0x22000c20, 0x00000078, 0x00100010 }, + { 0x0020040c, 0x24403dad, 0x00459800, 0x00030003 }, + { 0x00200805, 0x24483dad, 0x00459800, 0x00070007 }, + { 0x00200001, 0x204001a5, 0x00450440, 0x00000000 }, + { 0x00000009, 0x20403ca5, 0x00000040, 0x00010001 }, + { 0x00000001, 0x20480061, 0x00000000, 0x00020005 }, + { 0x02600031, 0x27000021, 0x408d0040, 0x00000200 }, + { 0x00110001, 0x220001ec, 0x02000000, 0x05820582 }, + { 0x00010001, 0x220001ec, 0x02000000, 0x05620562 }, + { 0x00000001, 0x220e0128, 0x00000454, 0x00000000 }, + { 0x01800006, 0x200035ac, 0x02000446, 0x00000444 }, + { 0x00410001, 0xbc000229, 0x02698000, 0x00000000 }, + { 0x00410001, 0xbc100229, 0x02698010, 0x00000000 }, + { 0x00410001, 0xbc200229, 0x02698020, 0x00000000 }, + { 0x00410001, 0xbc300229, 0x02698030, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x000000be }, + { 0x00600001, 0x2024018d, 0x008d0200, 0x00000000 }, + { 0x01000041, 0x245e35ad, 0x00000446, 0x00000444 }, + { 0x02000005, 0x20003db0, 0x0200045e, 0x00010001 }, + { 0x00000040, 0x22022d08, 0x00000200, 0x00100010 }, + { 0x00200040, 0x22042d08, 0x00450200, 0x00200020 }, + { 0x00400001, 0x244c0109, 0x00690200, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000044 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x00000042 }, + { 0x00000040, 0x22003d08, 0x00000200, 0xffdeffde }, + { 0x00000440, 0x22023d08, 0x00000202, 0xffeeffee }, + { 0x00000801, 0x220c0060, 0x00000000, 0x04d004c0 }, + { 0x01000010, 0x20003db0, 0x0000045e, 0x00040004 }, + { 0x00802040, 0x2400462c, 0x00a98000, 0x00a98005 }, + { 0x00802048, 0x24003e2c, 0x00a98001, 0xfffbfffb }, + { 0x00802048, 0x24003e2c, 0x00a98002, 0x00140014 }, + { 0x00802048, 0x24003e2c, 0x00a98003, 0x00140014 }, + { 0x00802048, 0xb8003e2d, 0x00a98004, 0xfffbfffb }, + { 0x00802040, 0x2400462c, 0x00a98040, 0x00a98045 }, + { 0x00802048, 0x24003e2c, 0x00a98041, 0xfffbfffb }, + { 0x00802048, 0x24003e2c, 0x00a98042, 0x00140014 }, + { 0x00802048, 0x24003e2c, 0x00a98043, 0x00140014 }, + { 0x00802048, 0xb8203e2d, 0x00a98044, 0xfffbfffb }, + { 0x00400040, 0x2400462c, 0x00698080, 0x00698085 }, + { 0x00400048, 0x24003e2c, 0x00698081, 0xfffbfffb }, + { 0x00400048, 0x24003e2c, 0x00698082, 0x00140014 }, + { 0x00400048, 0x24003e2c, 0x00698083, 0x00140014 }, + { 0x00400048, 0xb8403e2d, 0x00698084, 0xfffbfffb }, + { 0x00000401, 0x220c0060, 0x00000000, 0x04e004d0 }, + { 0x00000c01, 0x22000060, 0x00000000, 0x04d004c8 }, + { 0x00000c01, 0x22040060, 0x00000000, 0x04e004d8 }, + { 0x00000801, 0x22080060, 0x00000000, 0x04f004e8 }, + { 0x00800040, 0x24003dac, 0x00b104c0, 0x02000200 }, + { 0x00800048, 0x24003dac, 0x00b104e0, 0xfffbfffb }, + { 0x00800048, 0x24003dac, 0x01ed9800, 0x00140014 }, + { 0x00010001, 0x220c0168, 0x00000000, 0x05400540 }, + { 0x00110001, 0x220c0168, 0x00000000, 0x04c004c0 }, + { 0x00800048, 0x24003dac, 0x01e98000, 0xfffbfffb }, + { 0x00800048, 0x24003dac, 0x01e98020, 0x00010001 }, + { 0x00800048, 0x24003dac, 0x01e98800, 0x00140014 }, + { 0x8080000c, 0xd8003d91, 0x00b10400, 0x000a000a }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000060 }, + { 0x01000010, 0x20003db0, 0x00000444, 0x00000000 }, + { 0x01000010, 0x20003db0, 0x02000446, 0x00020002 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000024 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x00000022 }, + { 0x00400040, 0x22003d28, 0x0069044c, 0xfffefffe }, + { 0x03400010, 0x20003dac, 0x00000446, 0x00020002 }, + { 0x01000010, 0x20003db0, 0x02000444, 0x00020002 }, + { 0x00410040, 0x22002d08, 0x00690200, 0x00100010 }, + { 0x01000010, 0x20003dac, 0x00000446, 0x00000000 }, + { 0x00010001, 0x220e0168, 0x02000000, 0x05400540 }, + { 0x00110001, 0x220e0168, 0x02000000, 0x04c004c0 }, + { 0x00800040, 0x24003e2c, 0x01e98000, 0x00100010 }, + { 0x00800048, 0x24003e2c, 0x01e98001, 0xfffbfffb }, + { 0x00800048, 0x24003e2c, 0x01e98002, 0x00140014 }, + { 0x00800048, 0x24003e2c, 0x01e98003, 0x00140014 }, + { 0x00800048, 0x24003e2c, 0x01e98004, 0xfffbfffb }, + { 0x00800048, 0x24003e2c, 0x01e98005, 0x00010001 }, + { 0x8080000c, 0xdc003d91, 0x00b10400, 0x00050005 }, + { 0x00110220, 0x34001c00, 0x02001400, 0x00000004 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x00000036 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000036 }, + { 0x01000010, 0x20003db0, 0x00000446, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000024 }, + { 0x03600010, 0x20003dac, 0x02000444, 0x00020002 }, + { 0x00400401, 0x22000128, 0x0069044c, 0x00000000 }, + { 0x00400840, 0x22083d2c, 0x0069044c, 0x00100010 }, + { 0x00610040, 0x22002d08, 0x02690200, 0x00010001 }, + { 0x01000010, 0x20003dac, 0x00000444, 0x00000000 }, + { 0x01000010, 0x20003db0, 0x02000446, 0x00020002 }, + { 0x00800040, 0x24003e2c, 0x01e983e0, 0x00100010 }, + { 0x00800048, 0x24003e2c, 0x01e98000, 0x00140014 }, + { 0x00800048, 0x24003e2c, 0x01e98020, 0xfffbfffb }, + { 0x00800048, 0x24003e2c, 0x01e993e0, 0xfffbfffb }, + { 0x00800048, 0x24003e2c, 0x01e99000, 0x00140014 }, + { 0x00800048, 0x24003e2c, 0x01e99020, 0x00010001 }, + { 0x00000001, 0x220e0168, 0x00000000, 0x05400540 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x00000002 }, + { 0x00110001, 0x220e0168, 0x02000000, 0x04c004c0 }, + { 0x8080000c, 0xdc003d91, 0x00b10400, 0x00050005 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x0000000e }, + { 0x00010220, 0x34001c00, 0x02001400, 0x0000000e }, + { 0x00400001, 0x22000128, 0x0069044c, 0x00000000 }, + { 0x01400010, 0x20003dac, 0x00000444, 0x00030003 }, + { 0x01400010, 0x20003dac, 0x02000446, 0x00030003 }, + { 0x00410040, 0x22002d08, 0x00690200, 0x00010001 }, + { 0x00410040, 0x22002d08, 0x02690200, 0x00100010 }, + { 0x00800001, 0x25400229, 0x01e98000, 0x00000000 }, + { 0x80800042, 0x45404631, 0x00d20540, 0x00d204c0 }, + { 0x00000001, 0x220c0128, 0x00000454, 0x00000000 }, + { 0x00400001, 0xd8000231, 0x008a0540, 0x00000000 }, + { 0x00400001, 0xd8100231, 0x008a0548, 0x00000000 }, + { 0x00400001, 0xd8200231, 0x008a0550, 0x00000000 }, + { 0x00400001, 0xd8300231, 0x008a0558, 0x00000000 }, + { 0x00600001, 0x220001ac, 0x008d0024, 0x00000000 }, + { 0x00200040, 0x244c3dad, 0x00450448, 0xfff8fff8 }, + { 0x00000401, 0x220001ec, 0x00000000, 0x07000700 }, + { 0x00000801, 0x220e0128, 0x00000456, 0x00000000 }, + { 0x00000441, 0x254635ad, 0x00000448, 0x0000044a }, + { 0x00000c41, 0x254025ad, 0x0000444c, 0x0000444e }, + { 0x00000c41, 0x254225ad, 0x00000448, 0x0000444e }, + { 0x00000841, 0x254435ad, 0x0000444c, 0x0000044a }, + { 0x00600041, 0x24002628, 0x00898000, 0x00000540 }, + { 0x00600048, 0x24002628, 0x00898002, 0x00000542 }, + { 0x00600048, 0x24002628, 0x00898008, 0x00000544 }, + { 0x00600048, 0x2540262d, 0x0089800a, 0x00000546 }, + { 0x00400401, 0xbc0001a9, 0x00690540, 0x00000000 }, + { 0x00400801, 0xbc1001a9, 0x00690548, 0x00000000 }, + { 0x01000010, 0x20003d2c, 0x00000022, 0x00030003 }, + { 0x01000040, 0x20223d29, 0x02000022, 0xffffffff }, + { 0x00000040, 0x220c3d8c, 0x0000020c, 0x00080008 }, + { 0x00110040, 0x24540c21, 0x00000454, 0x00080008 }, + { 0x00010040, 0x24540c21, 0x00000454, 0x00180038 }, + { 0x00110220, 0x34001c00, 0x02001400, 0xfffffee6 }, + { 0x01800010, 0x20003dac, 0x0200010e, 0x00010001 }, + { 0x00000040, 0x220c3d8c, 0x0000020c, 0xffe0ffe0 }, + { 0x00010001, 0x24540061, 0x02000000, 0x06c00640 }, + { 0x00110001, 0x24540061, 0x02000000, 0x04800780 }, + { 0x00000001, 0x220e0128, 0x00000456, 0x00000000 }, + { 0x00800040, 0x24003dac, 0x00b19c00, 0x00200020 }, + { 0x00800040, 0x24203dac, 0x00b19c20, 0x00200020 }, + { 0x8080000c, 0xdc003d91, 0x00b10400, 0x00060006 }, + { 0x8080000c, 0xdc203d91, 0x00b10420, 0x00060006 }, + { 0x02000040, 0x210e3d29, 0x0200010e, 0xffffffff }, + { 0x00000040, 0x220c3d8c, 0x0000020c, 0x00040004 }, + { 0x00110220, 0x34001c00, 0x02001400, 0xfffffcf8 }, + { 0x01000005, 0x25643e2d, 0x00000060, 0x00c000c0 }, + { 0x01000010, 0x20003dac, 0x02000458, 0x00020002 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x00000016 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x0000000c }, + { 0x01000010, 0x20003dac, 0x00000458, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000086 }, + { 0x00a02001, 0x46400231, 0x00d20780, 0x00000000 }, + { 0x00a02001, 0x46800231, 0x00d207c0, 0x00000000 }, + { 0x00a02001, 0x46c00231, 0x00d20480, 0x00000000 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x0000007e }, + { 0x80a02042, 0x46404631, 0x00d20640, 0x00d20780 }, + { 0x80a02042, 0x46804631, 0x00d20680, 0x00d207c0 }, + { 0x80a02042, 0x46c04631, 0x00d206c0, 0x00d20480 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000076 }, + { 0x01000010, 0x20003dac, 0x02000564, 0x00800080 }, + { 0x00110220, 0x34001c00, 0x02001400, 0x0000000e }, + { 0x01000010, 0x20003dac, 0x00000458, 0x00020002 }, + { 0x00110220, 0x34001c00, 0x00001400, 0xffffffe4 }, + { 0x00200401, 0x256801ed, 0x00000000, 0x00200020 }, + { 0x00200801, 0x256c01ed, 0x00000000, 0x00060006 }, + { 0x00400001, 0x258001ed, 0x00000000, 0x00000000 }, + { 0x00600001, 0x45a001ad, 0x00058c00, 0x00000000 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000028 }, + { 0x02600005, 0x20006e28, 0x02008c0c, 0x88848421 }, + { 0x0220000c, 0x25663dad, 0x00000458, 0x00010001 }, + { 0x0000000c, 0x25643dad, 0x00000564, 0x00060006 }, + { 0x00310001, 0x25c401ad, 0x00000458, 0x00000000 }, + { 0x00210001, 0x25c00061, 0x00000000, 0x00010001 }, + { 0x00310040, 0x25c03dad, 0x004545c4, 0x00010001 }, + { 0x00610001, 0x25a00061, 0x02000000, 0x00000080 }, + { 0x00710001, 0x45a002ad, 0x02ae8c00, 0x00000000 }, + { 0x00710001, 0x45a202ad, 0x02ae8c01, 0x00000000 }, + { 0x00800041, 0x25a035ad, 0x00b105a0, 0x000905c0 }, + { 0x01200010, 0x20003e2c, 0x0245006e, 0x00000000 }, + { 0x00310009, 0x244c45ad, 0x02000564, 0x0045006e }, + { 0x00210001, 0x244c01ed, 0x02000000, 0x00000000 }, + { 0x0031000c, 0x244c3dad, 0x0245044c, 0x00010001 }, + { 0x00200009, 0x256835ad, 0x0045044c, 0x00000566 }, + { 0x00210040, 0x256835ad, 0x02450568, 0x00000566 }, + { 0x00200040, 0x256c362d, 0x0045006e, 0x00000566 }, + { 0x00400040, 0x240035ac, 0x00ab05a2, 0x00ab05a6 }, + { 0x00400040, 0x2400358c, 0x00690400, 0x00000566 }, + { 0x0040000c, 0x2580358d, 0x00690400, 0x00000566 }, + { 0x00800041, 0x2400362c, 0x00d20640, 0x000005a0 }, + { 0x00800041, 0x2420362c, 0x00d20660, 0x000005a0 }, + { 0x00800048, 0x2400362c, 0x00d20780, 0x000005a4 }, + { 0x00800048, 0x2420362c, 0x00d207a0, 0x000005a4 }, + { 0x00800040, 0x2400358c, 0x00b10400, 0x00000568 }, + { 0x00800040, 0x2420358c, 0x00b10420, 0x00000568 }, + { 0x0080000c, 0x24c0358d, 0x00b10400, 0x0000056c }, + { 0x0080000c, 0x24e0358d, 0x00b10420, 0x0000056c }, + { 0x80800040, 0x464035b1, 0x00b104c0, 0x00000580 }, + { 0x80800040, 0x466035b1, 0x00b104e0, 0x00000580 }, + { 0x00800041, 0x2400362c, 0x00d20680, 0x000005a0 }, + { 0x00800041, 0x2420362c, 0x00d206a0, 0x000005a0 }, + { 0x00800048, 0x2400362c, 0x00d207c0, 0x000005a4 }, + { 0x00800048, 0x2420362c, 0x00d207e0, 0x000005a4 }, + { 0x00800040, 0x2400358c, 0x00b10400, 0x00000568 }, + { 0x00800040, 0x2420358c, 0x00b10420, 0x00000568 }, + { 0x0080000c, 0x24c0358d, 0x00b10400, 0x0000056c }, + { 0x0080000c, 0x24e0358d, 0x00b10420, 0x0000056c }, + { 0x80800040, 0x468035b1, 0x00b104c0, 0x00000580 }, + { 0x80800040, 0x46a035b1, 0x00b104e0, 0x00000580 }, + { 0x00800041, 0x2400362c, 0x00d206c0, 0x000705a8 }, + { 0x00800041, 0x2420362c, 0x00d206e0, 0x000705a8 }, + { 0x00800048, 0x2400362c, 0x00d20480, 0x000705ac }, + { 0x00800048, 0x2420362c, 0x00d204a0, 0x000705ac }, + { 0x00800040, 0x2400358c, 0x00b10400, 0x0000056a }, + { 0x00800040, 0x2420358c, 0x00b10420, 0x0000056a }, + { 0x0080000c, 0x24c0358d, 0x00b10400, 0x0000056e }, + { 0x0080000c, 0x24e0358d, 0x00b10420, 0x0000056e }, + { 0x80800040, 0x46c035b1, 0x00b104c0, 0x00050582 }, + { 0x80800040, 0x46e035b1, 0x00b104e0, 0x00050582 }, + { 0x01800005, 0x20003d2c, 0x02000020, 0x00020002 }, + { 0x80800040, 0xd00045b1, 0x00b19000, 0x00d20640 }, + { 0x80800040, 0xd02045b1, 0x00b19020, 0x00d20660 }, + { 0x80800040, 0xd04045b1, 0x00b19040, 0x00d20680 }, + { 0x80800040, 0xd06045b1, 0x00b19060, 0x00d206a0 }, + { 0x00000040, 0x22083d8c, 0x00000208, 0x00800080 }, + { 0x80400040, 0xd40045b1, 0x00699400, 0x00ab06c0 }, + { 0x80400040, 0xd48045b1, 0x00699480, 0x00ab06c2 }, + { 0x80400040, 0xd42045b1, 0x00699420, 0x00ab06e0 }, + { 0x80400040, 0xd4a045b1, 0x006994a0, 0x00ab06e2 }, + { 0x80400040, 0xd41045b1, 0x00699410, 0x00ab06d0 }, + { 0x80400040, 0xd49045b1, 0x00699490, 0x00ab06d2 }, + { 0x80400040, 0xd43045b1, 0x00699430, 0x00ab06f0 }, + { 0x80400040, 0xd4b045b1, 0x006994b0, 0x00ab06f2 }, + { 0x00000040, 0x220a3d8c, 0x0000020a, 0x00080008 }, + { 0x00110040, 0x220a3d8c, 0x0200020a, 0x00300030 }, + { 0x01000010, 0x20003d2c, 0x02000020, 0x00060006 }, + { 0x00000040, 0x20203d29, 0x00000020, 0x00020002 }, + { 0x00000040, 0x22040c00, 0x00000204, 0x00100001 }, + { 0x00000040, 0x220c358c, 0x0000020c, 0x0000003a }, + { 0x00110220, 0x34001c00, 0x02001400, 0xfffffc36 }, + { 0x00000001, 0x220001ec, 0x00000000, 0x01400140 }, + { 0x00000001, 0x220201ec, 0x00000000, 0x01c001c0 }, + { 0x00800401, 0x20400236, 0x01ee8000, 0x00000000 }, + { 0x00800801, 0x20500236, 0x01ee8010, 0x00000000 }, + { 0x00800401, 0x20600236, 0x01ee8020, 0x00000000 }, + { 0x00800801, 0x20700236, 0x01ee8030, 0x00000000 }, + { 0x00800401, 0x20800236, 0x01ee8040, 0x00000000 }, + { 0x00800801, 0x20900236, 0x01ee8050, 0x00000000 }, + { 0x00800401, 0x20a00236, 0x01ee8060, 0x00000000 }, + { 0x00800801, 0x20b00236, 0x01ee8070, 0x00000000 }, + { 0x00800401, 0x20c00236, 0x01ee8100, 0x00000000 }, + { 0x00800801, 0x20d00236, 0x01ee8110, 0x00000000 }, + { 0x00800401, 0x20e00236, 0x01ee8120, 0x00000000 }, + { 0x00800801, 0x20f00236, 0x01ee8130, 0x00000000 }, + { 0x00800401, 0x21000236, 0x01ee8140, 0x00000000 }, + { 0x00800801, 0x21100236, 0x01ee8150, 0x00000000 }, + { 0x00800401, 0x21200236, 0x01ee8160, 0x00000000 }, + { 0x00800801, 0x21300236, 0x01ee8170, 0x00000000 }, + { 0x00200401, 0x204001a5, 0x00450064, 0x00000000 }, + { 0x00000801, 0x20480061, 0x00000000, 0x000f000f }, + { 0x01600031, 0x21401c21, 0x508d0040, 0x1218a000 }, + { 0x00000001, 0x220001ec, 0x00000000, 0x03400340 }, + { 0x00800401, 0x41600236, 0x00d28000, 0x00000000 }, + { 0x00800801, 0x41610236, 0x00d28080, 0x00000000 }, + { 0x00800401, 0x41800236, 0x00d28020, 0x00000000 }, + { 0x00800801, 0x41810236, 0x00d280a0, 0x00000000 }, + { 0x00800401, 0x41a00236, 0x00d28040, 0x00000000 }, + { 0x00800801, 0x41a10236, 0x00d280c0, 0x00000000 }, + { 0x00800401, 0x41c00236, 0x00d28060, 0x00000000 }, + { 0x00800801, 0x41c10236, 0x00d280e0, 0x00000000 }, + { 0x0000040c, 0x20443ca5, 0x00000044, 0x00010001 }, + { 0x00000801, 0x20480061, 0x00000000, 0x0007000f }, + { 0x0a600031, 0x21601c21, 0x508d0040, 0x0a18a001 }, + { 0x00000001, 0x21400021, 0x00000140, 0x00000000 }, + { 0x00000001, 0x21600021, 0x00000160, 0x00000000 }, + { 0x01600031, 0x20001c20, 0x708d0000, 0x82000010 }, + { 0x00600001, 0x20400021, 0x008d0000, 0x00000000 }, + { 0x00000005, 0x20203e2d, 0x00000061, 0x001f001f }, + { 0x00200009, 0x20643e2d, 0x00450064, 0x00040004 }, + { 0x00000001, 0x203a01ed, 0x00000000, 0x00000000 }, + { 0x01000010, 0x20003dac, 0x00000020, 0x00160016 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x0000001e }, + { 0x01200010, 0x20003e2c, 0x0200006c, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x00000024 }, + { 0x00800009, 0x25403dad, 0x00050064, 0x00020002 }, + { 0x00000001, 0x203a01ed, 0x00000000, 0x00180018 }, + { 0x00200040, 0x45483dad, 0x00660548, 0x00100010 }, + { 0x00200040, 0x45523dad, 0x00660552, 0x00100010 }, + { 0x00400040, 0x25583dad, 0x00690558, 0x00100010 }, + { 0x00800040, 0x208035ad, 0x00b10080, 0x00b10540 }, + { 0x00600040, 0x45403dad, 0x00ae0540, 0x00200020 }, + { 0x00800040, 0x20a035ad, 0x00b100a0, 0x00b10540 }, + { 0x00600040, 0x45423dad, 0x00ae0542, 0x00200020 }, + { 0x00800040, 0x20e035ad, 0x00b100e0, 0x00b10540 }, + { 0x00600040, 0x45403dad, 0x00ae0540, 0xffe0ffe0 }, + { 0x00800040, 0x20c035ad, 0x00b100c0, 0x00b10540 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000014 }, + { 0x06600010, 0x20003dac, 0x02000020, 0x00030003 }, + { 0x00000001, 0x206c0171, 0x00000000, 0x00000000 }, + { 0x00610001, 0x208000a5, 0x02050080, 0x00000000 }, + { 0x00610001, 0x212000a5, 0x02090100, 0x00000000 }, + { 0x00410001, 0x211000a5, 0x02690100, 0x00000000 }, + { 0x00200009, 0x25403dad, 0x00450064, 0x00020002 }, + { 0x00800040, 0x208035ad, 0x00b10080, 0x00050540 }, + { 0x00200040, 0x40883dad, 0x00660088, 0x00200020 }, + { 0x00200040, 0x40923dad, 0x00660092, 0x00200020 }, + { 0x00400040, 0x20983dad, 0x00690098, 0x00200020 }, + { 0x00200401, 0x22080060, 0x00000000, 0x03400140 }, + { 0x00000c01, 0x220c0060, 0x00000000, 0x04400080 }, + { 0x00000801, 0x22040060, 0x00000000, 0x01000070 }, + { 0x00000005, 0x203e2e29, 0x00000063, 0x00010001 }, + { 0x00000001, 0x20200169, 0x00000000, 0x00000000 }, + { 0x0000000c, 0x2458262d, 0x0000006d, 0x00000020 }, + { 0x00000001, 0x210e0169, 0x00000000, 0x00010001 }, + { 0x00000005, 0x24583dad, 0x00000458, 0x00030003 }, + { 0x01000010, 0x200035ac, 0x0000010e, 0x00000458 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000316 }, + { 0x01000010, 0x20003dac, 0x0200010e, 0x00010001 }, + { 0x00010401, 0x24540061, 0x02000000, 0x06c00640 }, + { 0x00010805, 0x245a3e2d, 0x02008800, 0x007f007f }, + { 0x00110401, 0x24540061, 0x02000000, 0x04800780 }, + { 0x00110805, 0x245a3e2d, 0x02008804, 0x007f007f }, + { 0x00010005, 0x245c3e2d, 0x02008800, 0x00800080 }, + { 0x00110005, 0x245c3e2d, 0x02008804, 0x00800080 }, + { 0x00000009, 0x245c3dad, 0x0000045c, 0x00010001 }, + { 0x0000000c, 0x211e362d, 0x0000006c, 0x00000020 }, + { 0x00000040, 0x240035ac, 0x0000003e, 0x0000045c }, + { 0x01000010, 0x20003d8c, 0x00210400, 0x00010001 }, + { 0x01000010, 0x20003d8c, 0x02210400, 0x01000100 }, + { 0x00000001, 0x203c01ed, 0x00000000, 0x00000000 }, + { 0x00010001, 0x203c01ed, 0x00000000, 0x00020002 }, + { 0x00010001, 0x203c01ed, 0x02000000, 0xfffefffe }, + { 0x00000040, 0x20780d21, 0x0000045a, 0x0208e602 }, + { 0x00000040, 0x20782421, 0x00000078, 0x0000045c }, + { 0x02000005, 0x20003dac, 0x0200011e, 0x00030003 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x000001c0 }, + { 0x01000005, 0x20003dac, 0x00009800, 0x00030003 }, + { 0x00200005, 0x24443dad, 0x00459800, 0x00030003 }, + { 0x0020000c, 0x24403dad, 0x00459800, 0x00020002 }, + { 0x01600006, 0x20003dac, 0x02000446, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000012 }, + { 0x00010040, 0x22000c20, 0x02000078, 0x00400000 }, + { 0x00110040, 0x22000c20, 0x02000078, 0x00700000 }, + { 0x00310040, 0x20401da5, 0x02450440, 0xfffffffe }, + { 0x00110001, 0x20480061, 0x02000000, 0x000c000c }, + { 0x00010040, 0x20401da5, 0x02000440, 0xfffffffe }, + { 0x00010001, 0x204401a5, 0x02000442, 0x00000000 }, + { 0x00010001, 0x20480061, 0x02000000, 0x0007000c }, + { 0x01600031, 0x25600021, 0x408d0040, 0x00000200 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x0000000e }, + { 0x00010040, 0x22000c20, 0x02000078, 0x00200000 }, + { 0x00110040, 0x22000c20, 0x02000078, 0x00400000 }, + { 0x00200001, 0x204001a5, 0x00450440, 0x00000000 }, + { 0x00110040, 0x20441da5, 0x02000442, 0xfffffffe }, + { 0x00110001, 0x20480061, 0x02000000, 0x000c0007 }, + { 0x00010001, 0x20480061, 0x02000000, 0x00070007 }, + { 0x01600031, 0x25600021, 0x408d0040, 0x00000200 }, + { 0x00000040, 0xb80235ad, 0x00009802, 0x0000003c }, + { 0x0020040c, 0x24403dad, 0x00459800, 0x00030003 }, + { 0x00200805, 0x24483dad, 0x00459800, 0x00070007 }, + { 0x01600006, 0x20003dac, 0x0000044a, 0x00000000 }, + { 0x00200001, 0x204001a5, 0x00450440, 0x00000000 }, + { 0x00000009, 0x20403ca5, 0x00000040, 0x00010001 }, + { 0x00010040, 0x22000c20, 0x00000078, 0x00200010 }, + { 0x00110040, 0x22000c20, 0x00000078, 0x00300010 }, + { 0x00010001, 0x20480061, 0x00000000, 0x00030009 }, + { 0x00110001, 0x20480061, 0x00000000, 0x00040009 }, + { 0x02600031, 0x27000021, 0x408d0040, 0x00000200 }, + { 0x01000005, 0x20003dac, 0x00009800, 0x00030003 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x0000001a }, + { 0x00600001, 0x26220231, 0x008d05c0, 0x00000000 }, + { 0x00600401, 0x26120231, 0x008d05b8, 0x00000000 }, + { 0x00600801, 0x26020231, 0x008d05b0, 0x00000000 }, + { 0x00600401, 0x25f20231, 0x008d05a8, 0x00000000 }, + { 0x00600801, 0x25e20231, 0x008d05a0, 0x00000000 }, + { 0x00600401, 0x25d20231, 0x008d0598, 0x00000000 }, + { 0x00600801, 0x25c20231, 0x008d0590, 0x00000000 }, + { 0x00600401, 0x25b20231, 0x008d0588, 0x00000000 }, + { 0x00600801, 0x25a20231, 0x008d0580, 0x00000000 }, + { 0x00600401, 0x25920231, 0x008d0578, 0x00000000 }, + { 0x00600801, 0x25820231, 0x008d0570, 0x00000000 }, + { 0x00600001, 0x25720231, 0x008d0568, 0x00000000 }, + { 0x00600001, 0x25620231, 0x008d0560, 0x00000000 }, + { 0x00110001, 0x220001ec, 0x02000000, 0x05820582 }, + { 0x00010001, 0x220001ec, 0x02000000, 0x05620562 }, + { 0x00000001, 0x220e0128, 0x00000454, 0x00000000 }, + { 0x01800006, 0x200035ac, 0x02000446, 0x00000444 }, + { 0x00810001, 0xbc000229, 0x02ad8000, 0x00000000 }, + { 0x00810001, 0xbc200229, 0x02ad8020, 0x00000000 }, + { 0x00810001, 0xbc400229, 0x02ad8040, 0x00000000 }, + { 0x00810001, 0xbc600229, 0x02ad8060, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x0000012a }, + { 0x00600001, 0x2024018d, 0x008d0200, 0x00000000 }, + { 0x01000041, 0x245e35ad, 0x00000446, 0x00000444 }, + { 0x00000040, 0x22022d08, 0x00000200, 0x00100010 }, + { 0x02000005, 0x20003db0, 0x0200045e, 0x00010001 }, + { 0x00200040, 0x22042d08, 0x00450200, 0x00200020 }, + { 0x00400001, 0x244c0109, 0x00690200, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000066 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x00000064 }, + { 0x00000040, 0x22003d08, 0x00000200, 0xffdeffde }, + { 0x00000440, 0x22023d08, 0x00000202, 0xffeeffee }, + { 0x00000801, 0x220c0060, 0x00000000, 0x04a00480 }, + { 0x01000010, 0x20003db0, 0x0000045e, 0x00040004 }, + { 0x00a02040, 0x2400462c, 0x00ad8000, 0x00ad8005 }, + { 0x00a02048, 0x24003e2c, 0x00ad8001, 0xfffbfffb }, + { 0x00a02048, 0x24003e2c, 0x00ad8002, 0x00140014 }, + { 0x00a02048, 0x24003e2c, 0x00ad8003, 0x00140014 }, + { 0x00a02048, 0xb8003e2d, 0x00ad8004, 0xfffbfffb }, + { 0x00a02040, 0x2400462c, 0x00ad8040, 0x00ad8045 }, + { 0x00a02048, 0x24003e2c, 0x00ad8041, 0xfffbfffb }, + { 0x00a02048, 0x24003e2c, 0x00ad8042, 0x00140014 }, + { 0x00a02048, 0x24003e2c, 0x00ad8043, 0x00140014 }, + { 0x00a02048, 0xb8403e2d, 0x00ad8044, 0xfffbfffb }, + { 0x00a02040, 0x2400462c, 0x00ad8080, 0x00ad8085 }, + { 0x00a02048, 0x24003e2c, 0x00ad8081, 0xfffbfffb }, + { 0x00a02048, 0x24003e2c, 0x00ad8082, 0x00140014 }, + { 0x00a02048, 0x24003e2c, 0x00ad8083, 0x00140014 }, + { 0x00a02048, 0xb8803e2d, 0x00ad8084, 0xfffbfffb }, + { 0x00600040, 0x2400462c, 0x008d80c0, 0x008d80c5 }, + { 0x00600048, 0x24003e2c, 0x008d80c1, 0xfffbfffb }, + { 0x00600048, 0x24003e2c, 0x008d80c2, 0x00140014 }, + { 0x00600048, 0x24003e2c, 0x008d80c3, 0x00140014 }, + { 0x00600048, 0xb8c03e2d, 0x008d80c4, 0xfffbfffb }, + { 0x00000401, 0x22000060, 0x00000000, 0x04a00480 }, + { 0x00000c01, 0x22040060, 0x00000000, 0x04a00490 }, + { 0x00010802, 0x220c2d28, 0x00000454, 0x04800480 }, + { 0x00a02040, 0x24003dac, 0x00b18000, 0x02000200 }, + { 0x00800048, 0x24003dac, 0x01ed8800, 0xfffbfffb }, + { 0x00800048, 0x24203dac, 0x01ed8820, 0xfffbfffb }, + { 0x00a02048, 0x24003dac, 0x00b18020, 0x00140014 }, + { 0x00800048, 0x24003dac, 0x01ed8820, 0x00140014 }, + { 0x00800048, 0x24203dac, 0x01ed8840, 0x00140014 }, + { 0x00a02048, 0x24003dac, 0x00b18040, 0xfffbfffb }, + { 0x00800048, 0x24003dac, 0x01ed8840, 0x00010001 }, + { 0x00800048, 0x24203dac, 0x01ed8860, 0x00010001 }, + { 0x8080000c, 0xd8003d91, 0x00b10400, 0x000a000a }, + { 0x8080100c, 0xd8203d91, 0x00b10420, 0x000a000a }, + { 0x00a02040, 0x24003dac, 0x00b18040, 0x02000200 }, + { 0x00800048, 0x24003dac, 0x01ed8840, 0xfffbfffb }, + { 0x00800048, 0x24203dac, 0x01ed8860, 0xfffbfffb }, + { 0x00a02048, 0x24003dac, 0x00b18060, 0x00140014 }, + { 0x00800048, 0x24003dac, 0x01ed8860, 0x00140014 }, + { 0x00800048, 0x24203dac, 0x01ed8880, 0x00140014 }, + { 0x00a02048, 0x24003dac, 0x00b18080, 0xfffbfffb }, + { 0x00800048, 0x24003dac, 0x01ed8880, 0x00010001 }, + { 0x00800048, 0x24203dac, 0x01ed88a0, 0x00010001 }, + { 0x8080000c, 0xd8403d91, 0x00b10400, 0x000a000a }, + { 0x8080100c, 0xd8603d91, 0x00b10420, 0x000a000a }, + { 0x00010220, 0x34001c00, 0x00001400, 0x000000b4 }, + { 0x01000010, 0x20003db0, 0x00000444, 0x00000000 }, + { 0x01000010, 0x20003db0, 0x02000446, 0x00020002 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x0000004c }, + { 0x00010220, 0x34001c00, 0x02001400, 0x0000004a }, + { 0x00400040, 0x22003d28, 0x0069044c, 0xfffefffe }, + { 0x03400010, 0x20003dac, 0x00000446, 0x00020002 }, + { 0x01000010, 0x20003db0, 0x02000444, 0x00020002 }, + { 0x00410040, 0x22002d08, 0x00690200, 0x00100010 }, + { 0x01000010, 0x20003dac, 0x00000446, 0x00000000 }, + { 0x00010002, 0x220c2d28, 0x02000454, 0x04800480 }, + { 0x00800040, 0x24003e2c, 0x01ed8000, 0x00100010 }, + { 0x00800040, 0x24203e2c, 0x01ed8020, 0x00100010 }, + { 0x00800048, 0x24003e2c, 0x01ed8001, 0xfffbfffb }, + { 0x00800048, 0x24203e2c, 0x01ed8021, 0xfffbfffb }, + { 0x00800048, 0x24003e2c, 0x01ed8002, 0x00140014 }, + { 0x00800048, 0x24203e2c, 0x01ed8022, 0x00140014 }, + { 0x00800048, 0x24003e2c, 0x01ed8003, 0x00140014 }, + { 0x00800048, 0x24203e2c, 0x01ed8023, 0x00140014 }, + { 0x00800048, 0x24003e2c, 0x01ed8004, 0xfffbfffb }, + { 0x00800048, 0x24203e2c, 0x01ed8024, 0xfffbfffb }, + { 0x00800048, 0x24003e2c, 0x01ed8005, 0x00010001 }, + { 0x00800048, 0x24203e2c, 0x01ed8025, 0x00010001 }, + { 0x8080000c, 0xd8003d91, 0x00b10400, 0x00050005 }, + { 0x8080100c, 0xd8203d91, 0x00b10420, 0x00050005 }, + { 0x00800040, 0x24003e2c, 0x01ed8040, 0x00100010 }, + { 0x00800040, 0x24203e2c, 0x01ed8060, 0x00100010 }, + { 0x00800048, 0x24003e2c, 0x01ed8041, 0xfffbfffb }, + { 0x00800048, 0x24203e2c, 0x01ed8061, 0xfffbfffb }, + { 0x00800048, 0x24003e2c, 0x01ed8042, 0x00140014 }, + { 0x00800048, 0x24203e2c, 0x01ed8062, 0x00140014 }, + { 0x00800048, 0x24003e2c, 0x01ed8043, 0x00140014 }, + { 0x00800048, 0x24203e2c, 0x01ed8063, 0x00140014 }, + { 0x00800048, 0x24003e2c, 0x01ed8044, 0xfffbfffb }, + { 0x00800048, 0x24203e2c, 0x01ed8064, 0xfffbfffb }, + { 0x00800048, 0x24003e2c, 0x01ed8045, 0x00010001 }, + { 0x00800048, 0x24203e2c, 0x01ed8065, 0x00010001 }, + { 0x8080000c, 0xd8403d91, 0x00b10400, 0x00050005 }, + { 0x8080100c, 0xd8603d91, 0x00b10420, 0x00050005 }, + { 0x00110220, 0x34001c00, 0x02001400, 0x00000004 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x0000005c }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000062 }, + { 0x01000010, 0x20003db0, 0x00000446, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000042 }, + { 0x00200401, 0x22000128, 0x0066044c, 0x00000000 }, + { 0x00200c01, 0x22040128, 0x0045044e, 0x00000000 }, + { 0x00000801, 0x220c0128, 0x00000454, 0x00000000 }, + { 0x03400010, 0x20003dac, 0x02000444, 0x00020002 }, + { 0x01000010, 0x20003dac, 0x00000444, 0x00000000 }, + { 0x00410040, 0x22002d08, 0x02690200, 0x00010001 }, + { 0x01000010, 0x20003db0, 0x02000446, 0x00020002 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x00000002 }, + { 0x00110001, 0x220c0168, 0x02000000, 0x04800480 }, + { 0x00a02040, 0x24003e2c, 0x00ad83e0, 0x00100010 }, + { 0x00800048, 0x24003e2c, 0x01ed8be0, 0xfffbfffb }, + { 0x00800048, 0x24203e2c, 0x01ed8800, 0xfffbfffb }, + { 0x00a02048, 0x24003e2c, 0x00ad8000, 0x00140014 }, + { 0x00800048, 0x24003e2c, 0x01ed8800, 0x00140014 }, + { 0x00800048, 0x24203e2c, 0x01ed8820, 0x00140014 }, + { 0x00a02048, 0x24003e2c, 0x00ad8020, 0xfffbfffb }, + { 0x00800048, 0x24003e2c, 0x01ed8820, 0x00010001 }, + { 0x00800048, 0x24203e2c, 0x01ed8840, 0x00010001 }, + { 0x8080000c, 0xd8003d91, 0x00b10400, 0x00050005 }, + { 0x8080100c, 0xd8203d91, 0x00b10420, 0x00050005 }, + { 0x00a02040, 0x24003e2c, 0x00ad8020, 0x00100010 }, + { 0x00800048, 0x24003e2c, 0x01ed8820, 0xfffbfffb }, + { 0x00800048, 0x24203e2c, 0x01ed8840, 0xfffbfffb }, + { 0x00a02048, 0x24003e2c, 0x00ad8040, 0x00140014 }, + { 0x00800048, 0x24003e2c, 0x01ed8840, 0x00140014 }, + { 0x00800048, 0x24203e2c, 0x01ed8860, 0x00140014 }, + { 0x00a02048, 0x24003e2c, 0x00ad8060, 0xfffbfffb }, + { 0x00800048, 0x24003e2c, 0x01ed8860, 0x00010001 }, + { 0x00800048, 0x24203e2c, 0x01ed8880, 0x00010001 }, + { 0x8080000c, 0xd8403d91, 0x00b10400, 0x00050005 }, + { 0x8080100c, 0xd8603d91, 0x00b10420, 0x00050005 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x00000016 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x0000001c }, + { 0x00200401, 0x22000128, 0x0045044c, 0x00000000 }, + { 0x00000801, 0x220c0128, 0x00000454, 0x00000000 }, + { 0x01200010, 0x20003dac, 0x00000444, 0x00030003 }, + { 0x01200010, 0x20003dac, 0x02000446, 0x00030003 }, + { 0x00210040, 0x22002d08, 0x00450200, 0x00010001 }, + { 0x00210040, 0x22002d08, 0x02450200, 0x00100010 }, + { 0x00800001, 0xb8000229, 0x01ed8000, 0x00000000 }, + { 0x00800001, 0xb8200229, 0x01ed8020, 0x00000000 }, + { 0x00800001, 0xb8400229, 0x01ed8040, 0x00000000 }, + { 0x00800001, 0xb8600229, 0x01ed8060, 0x00000000 }, + { 0x80800042, 0xd8004631, 0x00d29800, 0x00d20480 }, + { 0x80800042, 0xd8204631, 0x00d29820, 0x00d204a0 }, + { 0x80800042, 0xd8404631, 0x00d29840, 0x00d204c0 }, + { 0x80800042, 0xd8604631, 0x00d29860, 0x00d204e0 }, + { 0x00600001, 0x220001ac, 0x008d0024, 0x00000000 }, + { 0x00200040, 0x244c3dad, 0x00450448, 0xfff8fff8 }, + { 0x00000401, 0x220001ec, 0x00000000, 0x07000700 }, + { 0x00000c01, 0x220201e8, 0x00000000, 0x07100710 }, + { 0x00000801, 0x220e0128, 0x00000456, 0x00000000 }, + { 0x00000441, 0x254635ad, 0x00000448, 0x0000044a }, + { 0x00000c41, 0x254025ad, 0x0000444c, 0x0000444e }, + { 0x00000c41, 0x254225ad, 0x00000448, 0x0000444e }, + { 0x00000841, 0x254435ad, 0x0000444c, 0x0000044a }, + { 0x00200040, 0x244c3d09, 0x00450200, 0x00100010 }, + { 0x00800041, 0x24002628, 0x00ad8000, 0x00000540 }, + { 0x00800041, 0x24202628, 0x00ad8020, 0x00000540 }, + { 0x00800048, 0x24002628, 0x00ad8002, 0x00000542 }, + { 0x00800048, 0x24202628, 0x00ad8022, 0x00000542 }, + { 0x00200001, 0x22000128, 0x0045044c, 0x00000000 }, + { 0x00800048, 0x24002628, 0x01ed8000, 0x00000544 }, + { 0x00800048, 0x24202628, 0x01ed8020, 0x00000544 }, + { 0x00800048, 0xbc002629, 0x01ed8002, 0x00000546 }, + { 0x00801048, 0xbc202629, 0x01ed8022, 0x00000546 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000128 }, + { 0x00000001, 0x20220169, 0x00000000, 0x00040004 }, + { 0x00200005, 0x24443dad, 0x00459800, 0x00030003 }, + { 0x0020000c, 0x24403dad, 0x00459800, 0x00020002 }, + { 0x01600006, 0x20003dac, 0x02000446, 0x00000000 }, + { 0x00010040, 0x22000c20, 0x02000078, 0x00200000 }, + { 0x00110040, 0x22000c20, 0x02000078, 0x00500000 }, + { 0x00310040, 0x20401da5, 0x02450440, 0xfffffffe }, + { 0x00110001, 0x20480061, 0x02000000, 0x00080008 }, + { 0x00010040, 0x20401da5, 0x02000440, 0xfffffffe }, + { 0x00010001, 0x204401a5, 0x02000442, 0x00000000 }, + { 0x00010001, 0x20480061, 0x02000000, 0x00030008 }, + { 0x01600031, 0x25600021, 0x408d0040, 0x00000200 }, + { 0x00000040, 0xb80235ad, 0x00009802, 0x0000003c }, + { 0x00000040, 0x22000c20, 0x00000078, 0x00100010 }, + { 0x0020040c, 0x24403dad, 0x00459800, 0x00030003 }, + { 0x00200805, 0x24483dad, 0x00459800, 0x00070007 }, + { 0x00200001, 0x204001a5, 0x00450440, 0x00000000 }, + { 0x00000009, 0x20403ca5, 0x00000040, 0x00010001 }, + { 0x00000001, 0x20480061, 0x00000000, 0x00020005 }, + { 0x02600031, 0x27000021, 0x408d0040, 0x00000200 }, + { 0x00110001, 0x220001ec, 0x02000000, 0x05820582 }, + { 0x00010001, 0x220001ec, 0x02000000, 0x05620562 }, + { 0x00000001, 0x220e0128, 0x00000454, 0x00000000 }, + { 0x01800006, 0x200035ac, 0x02000446, 0x00000444 }, + { 0x00410001, 0xbc000229, 0x02698000, 0x00000000 }, + { 0x00410001, 0xbc100229, 0x02698010, 0x00000000 }, + { 0x00410001, 0xbc200229, 0x02698020, 0x00000000 }, + { 0x00410001, 0xbc300229, 0x02698030, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x000000be }, + { 0x00600001, 0x2024018d, 0x008d0200, 0x00000000 }, + { 0x01000041, 0x245e35ad, 0x00000446, 0x00000444 }, + { 0x02000005, 0x20003db0, 0x0200045e, 0x00010001 }, + { 0x00000040, 0x22022d08, 0x00000200, 0x00100010 }, + { 0x00200040, 0x22042d08, 0x00450200, 0x00200020 }, + { 0x00400001, 0x244c0109, 0x00690200, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000044 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x00000042 }, + { 0x00000040, 0x22003d08, 0x00000200, 0xffdeffde }, + { 0x00000440, 0x22023d08, 0x00000202, 0xffeeffee }, + { 0x00000801, 0x220c0060, 0x00000000, 0x04d004c0 }, + { 0x01000010, 0x20003db0, 0x0000045e, 0x00040004 }, + { 0x00802040, 0x2400462c, 0x00a98000, 0x00a98005 }, + { 0x00802048, 0x24003e2c, 0x00a98001, 0xfffbfffb }, + { 0x00802048, 0x24003e2c, 0x00a98002, 0x00140014 }, + { 0x00802048, 0x24003e2c, 0x00a98003, 0x00140014 }, + { 0x00802048, 0xb8003e2d, 0x00a98004, 0xfffbfffb }, + { 0x00802040, 0x2400462c, 0x00a98040, 0x00a98045 }, + { 0x00802048, 0x24003e2c, 0x00a98041, 0xfffbfffb }, + { 0x00802048, 0x24003e2c, 0x00a98042, 0x00140014 }, + { 0x00802048, 0x24003e2c, 0x00a98043, 0x00140014 }, + { 0x00802048, 0xb8203e2d, 0x00a98044, 0xfffbfffb }, + { 0x00400040, 0x2400462c, 0x00698080, 0x00698085 }, + { 0x00400048, 0x24003e2c, 0x00698081, 0xfffbfffb }, + { 0x00400048, 0x24003e2c, 0x00698082, 0x00140014 }, + { 0x00400048, 0x24003e2c, 0x00698083, 0x00140014 }, + { 0x00400048, 0xb8403e2d, 0x00698084, 0xfffbfffb }, + { 0x00000401, 0x220c0060, 0x00000000, 0x04e004d0 }, + { 0x00000c01, 0x22000060, 0x00000000, 0x04d004c8 }, + { 0x00000c01, 0x22040060, 0x00000000, 0x04e004d8 }, + { 0x00000801, 0x22080060, 0x00000000, 0x04f004e8 }, + { 0x00800040, 0x24003dac, 0x00b104c0, 0x02000200 }, + { 0x00800048, 0x24003dac, 0x00b104e0, 0xfffbfffb }, + { 0x00800048, 0x24003dac, 0x01ed9800, 0x00140014 }, + { 0x00010001, 0x220c0168, 0x00000000, 0x05400540 }, + { 0x00110001, 0x220c0168, 0x00000000, 0x04c004c0 }, + { 0x00800048, 0x24003dac, 0x01e98000, 0xfffbfffb }, + { 0x00800048, 0x24003dac, 0x01e98020, 0x00010001 }, + { 0x00800048, 0x24003dac, 0x01e98800, 0x00140014 }, + { 0x8080000c, 0xd8003d91, 0x00b10400, 0x000a000a }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000060 }, + { 0x01000010, 0x20003db0, 0x00000444, 0x00000000 }, + { 0x01000010, 0x20003db0, 0x02000446, 0x00020002 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000024 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x00000022 }, + { 0x00400040, 0x22003d28, 0x0069044c, 0xfffefffe }, + { 0x03400010, 0x20003dac, 0x00000446, 0x00020002 }, + { 0x01000010, 0x20003db0, 0x02000444, 0x00020002 }, + { 0x00410040, 0x22002d08, 0x00690200, 0x00100010 }, + { 0x01000010, 0x20003dac, 0x00000446, 0x00000000 }, + { 0x00010001, 0x220e0168, 0x02000000, 0x05400540 }, + { 0x00110001, 0x220e0168, 0x02000000, 0x04c004c0 }, + { 0x00800040, 0x24003e2c, 0x01e98000, 0x00100010 }, + { 0x00800048, 0x24003e2c, 0x01e98001, 0xfffbfffb }, + { 0x00800048, 0x24003e2c, 0x01e98002, 0x00140014 }, + { 0x00800048, 0x24003e2c, 0x01e98003, 0x00140014 }, + { 0x00800048, 0x24003e2c, 0x01e98004, 0xfffbfffb }, + { 0x00800048, 0x24003e2c, 0x01e98005, 0x00010001 }, + { 0x8080000c, 0xdc003d91, 0x00b10400, 0x00050005 }, + { 0x00110220, 0x34001c00, 0x02001400, 0x00000004 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x00000036 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000036 }, + { 0x01000010, 0x20003db0, 0x00000446, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000024 }, + { 0x03600010, 0x20003dac, 0x02000444, 0x00020002 }, + { 0x00400401, 0x22000128, 0x0069044c, 0x00000000 }, + { 0x00400840, 0x22083d2c, 0x0069044c, 0x00100010 }, + { 0x00610040, 0x22002d08, 0x02690200, 0x00010001 }, + { 0x01000010, 0x20003dac, 0x00000444, 0x00000000 }, + { 0x01000010, 0x20003db0, 0x02000446, 0x00020002 }, + { 0x00800040, 0x24003e2c, 0x01e983e0, 0x00100010 }, + { 0x00800048, 0x24003e2c, 0x01e98000, 0x00140014 }, + { 0x00800048, 0x24003e2c, 0x01e98020, 0xfffbfffb }, + { 0x00800048, 0x24003e2c, 0x01e993e0, 0xfffbfffb }, + { 0x00800048, 0x24003e2c, 0x01e99000, 0x00140014 }, + { 0x00800048, 0x24003e2c, 0x01e99020, 0x00010001 }, + { 0x00000001, 0x220e0168, 0x00000000, 0x05400540 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x00000002 }, + { 0x00110001, 0x220e0168, 0x02000000, 0x04c004c0 }, + { 0x8080000c, 0xdc003d91, 0x00b10400, 0x00050005 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x0000000e }, + { 0x00010220, 0x34001c00, 0x02001400, 0x0000000e }, + { 0x00400001, 0x22000128, 0x0069044c, 0x00000000 }, + { 0x01400010, 0x20003dac, 0x00000444, 0x00030003 }, + { 0x01400010, 0x20003dac, 0x02000446, 0x00030003 }, + { 0x00410040, 0x22002d08, 0x00690200, 0x00010001 }, + { 0x00410040, 0x22002d08, 0x02690200, 0x00100010 }, + { 0x00800001, 0x25400229, 0x01e98000, 0x00000000 }, + { 0x80800042, 0x45404631, 0x00d20540, 0x00d204c0 }, + { 0x00000001, 0x220c0128, 0x00000454, 0x00000000 }, + { 0x00400001, 0xd8000231, 0x008a0540, 0x00000000 }, + { 0x00400001, 0xd8100231, 0x008a0548, 0x00000000 }, + { 0x00400001, 0xd8200231, 0x008a0550, 0x00000000 }, + { 0x00400001, 0xd8300231, 0x008a0558, 0x00000000 }, + { 0x00600001, 0x220001ac, 0x008d0024, 0x00000000 }, + { 0x00200040, 0x244c3dad, 0x00450448, 0xfff8fff8 }, + { 0x00000401, 0x220001ec, 0x00000000, 0x07000700 }, + { 0x00000801, 0x220e0128, 0x00000456, 0x00000000 }, + { 0x00000441, 0x254635ad, 0x00000448, 0x0000044a }, + { 0x00000c41, 0x254025ad, 0x0000444c, 0x0000444e }, + { 0x00000c41, 0x254225ad, 0x00000448, 0x0000444e }, + { 0x00000841, 0x254435ad, 0x0000444c, 0x0000044a }, + { 0x00600041, 0x24002628, 0x00898000, 0x00000540 }, + { 0x00600048, 0x24002628, 0x00898002, 0x00000542 }, + { 0x00600048, 0x24002628, 0x00898008, 0x00000544 }, + { 0x00600048, 0x2540262d, 0x0089800a, 0x00000546 }, + { 0x00400401, 0xbc0001a9, 0x00690540, 0x00000000 }, + { 0x00400801, 0xbc1001a9, 0x00690548, 0x00000000 }, + { 0x01000010, 0x20003d2c, 0x00000022, 0x00030003 }, + { 0x01000040, 0x20223d29, 0x02000022, 0xffffffff }, + { 0x00000040, 0x220c3d8c, 0x0000020c, 0x00080008 }, + { 0x00110040, 0x24540c21, 0x00000454, 0x00080008 }, + { 0x00010040, 0x24540c21, 0x00000454, 0x00180038 }, + { 0x00110220, 0x34001c00, 0x02001400, 0xfffffee4 }, + { 0x01800010, 0x20003dac, 0x0200010e, 0x00010001 }, + { 0x00000040, 0x220c3d8c, 0x0000020c, 0xffe0ffe0 }, + { 0x00010001, 0x24540061, 0x02000000, 0x06c00640 }, + { 0x00110001, 0x24540061, 0x02000000, 0x04800780 }, + { 0x00000001, 0x220e0128, 0x00000456, 0x00000000 }, + { 0x00800040, 0x24003dac, 0x00b19c00, 0x00200020 }, + { 0x00800040, 0x24203dac, 0x00b19c20, 0x00200020 }, + { 0x8080000c, 0xdc003d91, 0x00b10400, 0x00060006 }, + { 0x8080000c, 0xdc203d91, 0x00b10420, 0x00060006 }, + { 0x02000040, 0x210e3d29, 0x0200010e, 0xffffffff }, + { 0x00000040, 0x220c3d8c, 0x0000020c, 0x00040004 }, + { 0x00110220, 0x34001c00, 0x02001400, 0xfffffce0 }, + { 0x01000005, 0x25643e2d, 0x00000060, 0x00c000c0 }, + { 0x01000010, 0x20003dac, 0x02000458, 0x00020002 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x00000016 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x0000000c }, + { 0x01000010, 0x20003dac, 0x00000458, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000086 }, + { 0x00a02001, 0x46400231, 0x00d20780, 0x00000000 }, + { 0x00a02001, 0x46800231, 0x00d207c0, 0x00000000 }, + { 0x00a02001, 0x46c00231, 0x00d20480, 0x00000000 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x0000007e }, + { 0x80a02042, 0x46404631, 0x00d20640, 0x00d20780 }, + { 0x80a02042, 0x46804631, 0x00d20680, 0x00d207c0 }, + { 0x80a02042, 0x46c04631, 0x00d206c0, 0x00d20480 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000076 }, + { 0x01000010, 0x20003dac, 0x02000564, 0x00800080 }, + { 0x00110220, 0x34001c00, 0x02001400, 0x0000000e }, + { 0x01000010, 0x20003dac, 0x00000458, 0x00020002 }, + { 0x00110220, 0x34001c00, 0x00001400, 0xffffffe4 }, + { 0x00200401, 0x256801ed, 0x00000000, 0x00200020 }, + { 0x00200801, 0x256c01ed, 0x00000000, 0x00060006 }, + { 0x00400001, 0x258001ed, 0x00000000, 0x00000000 }, + { 0x00600001, 0x45a001ad, 0x00058c00, 0x00000000 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000028 }, + { 0x02600005, 0x20006e28, 0x02008c0c, 0x88848421 }, + { 0x0220000c, 0x25663dad, 0x00000458, 0x00010001 }, + { 0x0000000c, 0x25643dad, 0x00000564, 0x00060006 }, + { 0x00310001, 0x25c401ad, 0x00000458, 0x00000000 }, + { 0x00210001, 0x25c00061, 0x00000000, 0x00010001 }, + { 0x00310040, 0x25c03dad, 0x004545c4, 0x00010001 }, + { 0x00610001, 0x25a00061, 0x02000000, 0x00000080 }, + { 0x00710001, 0x45a002ad, 0x02ae8c00, 0x00000000 }, + { 0x00710001, 0x45a202ad, 0x02ae8c01, 0x00000000 }, + { 0x00800041, 0x25a035ad, 0x00b105a0, 0x000905c0 }, + { 0x01200010, 0x20003e2c, 0x0245006e, 0x00000000 }, + { 0x00310009, 0x244c45ad, 0x02000564, 0x0045006e }, + { 0x00210001, 0x244c01ed, 0x02000000, 0x00000000 }, + { 0x0031000c, 0x244c3dad, 0x0245044c, 0x00010001 }, + { 0x00200009, 0x256835ad, 0x0045044c, 0x00000566 }, + { 0x00210040, 0x256835ad, 0x02450568, 0x00000566 }, + { 0x00200040, 0x256c362d, 0x0045006e, 0x00000566 }, + { 0x00400040, 0x240035ac, 0x00ab05a2, 0x00ab05a6 }, + { 0x00400040, 0x2400358c, 0x00690400, 0x00000566 }, + { 0x0040000c, 0x2580358d, 0x00690400, 0x00000566 }, + { 0x00800041, 0x2400362c, 0x00d20640, 0x000005a0 }, + { 0x00800041, 0x2420362c, 0x00d20660, 0x000005a0 }, + { 0x00800048, 0x2400362c, 0x00d20780, 0x000005a4 }, + { 0x00800048, 0x2420362c, 0x00d207a0, 0x000005a4 }, + { 0x00800040, 0x2400358c, 0x00b10400, 0x00000568 }, + { 0x00800040, 0x2420358c, 0x00b10420, 0x00000568 }, + { 0x0080000c, 0x24c0358d, 0x00b10400, 0x0000056c }, + { 0x0080000c, 0x24e0358d, 0x00b10420, 0x0000056c }, + { 0x80800040, 0x464035b1, 0x00b104c0, 0x00000580 }, + { 0x80800040, 0x466035b1, 0x00b104e0, 0x00000580 }, + { 0x00800041, 0x2400362c, 0x00d20680, 0x000005a0 }, + { 0x00800041, 0x2420362c, 0x00d206a0, 0x000005a0 }, + { 0x00800048, 0x2400362c, 0x00d207c0, 0x000005a4 }, + { 0x00800048, 0x2420362c, 0x00d207e0, 0x000005a4 }, + { 0x00800040, 0x2400358c, 0x00b10400, 0x00000568 }, + { 0x00800040, 0x2420358c, 0x00b10420, 0x00000568 }, + { 0x0080000c, 0x24c0358d, 0x00b10400, 0x0000056c }, + { 0x0080000c, 0x24e0358d, 0x00b10420, 0x0000056c }, + { 0x80800040, 0x468035b1, 0x00b104c0, 0x00000580 }, + { 0x80800040, 0x46a035b1, 0x00b104e0, 0x00000580 }, + { 0x00800041, 0x2400362c, 0x00d206c0, 0x000705a8 }, + { 0x00800041, 0x2420362c, 0x00d206e0, 0x000705a8 }, + { 0x00800048, 0x2400362c, 0x00d20480, 0x000705ac }, + { 0x00800048, 0x2420362c, 0x00d204a0, 0x000705ac }, + { 0x00800040, 0x2400358c, 0x00b10400, 0x0000056a }, + { 0x00800040, 0x2420358c, 0x00b10420, 0x0000056a }, + { 0x0080000c, 0x24c0358d, 0x00b10400, 0x0000056e }, + { 0x0080000c, 0x24e0358d, 0x00b10420, 0x0000056e }, + { 0x80800040, 0x46c035b1, 0x00b104c0, 0x00050582 }, + { 0x80800040, 0x46e035b1, 0x00b104e0, 0x00050582 }, + { 0x01800005, 0x20003d2c, 0x02000020, 0x00020002 }, + { 0x80800040, 0xd00045b1, 0x00b19000, 0x00d20640 }, + { 0x80800040, 0xd02045b1, 0x00b19020, 0x00d20660 }, + { 0x80800040, 0xd04045b1, 0x00b19040, 0x00d20680 }, + { 0x80800040, 0xd06045b1, 0x00b19060, 0x00d206a0 }, + { 0x00000040, 0x22083d8c, 0x00000208, 0x00800080 }, + { 0x80400040, 0xd40045b1, 0x00699400, 0x00ab06c0 }, + { 0x80400040, 0xd48045b1, 0x00699480, 0x00ab06c2 }, + { 0x80400040, 0xd42045b1, 0x00699420, 0x00ab06e0 }, + { 0x80400040, 0xd4a045b1, 0x006994a0, 0x00ab06e2 }, + { 0x80400040, 0xd41045b1, 0x00699410, 0x00ab06d0 }, + { 0x80400040, 0xd49045b1, 0x00699490, 0x00ab06d2 }, + { 0x80400040, 0xd43045b1, 0x00699430, 0x00ab06f0 }, + { 0x80400040, 0xd4b045b1, 0x006994b0, 0x00ab06f2 }, + { 0x00000040, 0x220a3d8c, 0x0000020a, 0x00080008 }, + { 0x00110040, 0x220a3d8c, 0x0200020a, 0x00300030 }, + { 0x01000010, 0x20003d2c, 0x02000020, 0x00060006 }, + { 0x00000040, 0x20203d29, 0x00000020, 0x00020002 }, + { 0x00000040, 0x22040c00, 0x00000204, 0x00100001 }, + { 0x00000040, 0x220c358c, 0x0000020c, 0x0000003a }, + { 0x00110220, 0x34001c00, 0x02001400, 0xfffffc1e }, + { 0x00000001, 0x220001ec, 0x00000000, 0x01400140 }, + { 0x00000001, 0x220201ec, 0x00000000, 0x01c001c0 }, + { 0x00800401, 0x20400236, 0x01ee8000, 0x00000000 }, + { 0x00800801, 0x20500236, 0x01ee8010, 0x00000000 }, + { 0x00800401, 0x20600236, 0x01ee8020, 0x00000000 }, + { 0x00800801, 0x20700236, 0x01ee8030, 0x00000000 }, + { 0x00800401, 0x20800236, 0x01ee8040, 0x00000000 }, + { 0x00800801, 0x20900236, 0x01ee8050, 0x00000000 }, + { 0x00800401, 0x20a00236, 0x01ee8060, 0x00000000 }, + { 0x00800801, 0x20b00236, 0x01ee8070, 0x00000000 }, + { 0x00800401, 0x20c00236, 0x01ee8100, 0x00000000 }, + { 0x00800801, 0x20d00236, 0x01ee8110, 0x00000000 }, + { 0x00800401, 0x20e00236, 0x01ee8120, 0x00000000 }, + { 0x00800801, 0x20f00236, 0x01ee8130, 0x00000000 }, + { 0x00800401, 0x21000236, 0x01ee8140, 0x00000000 }, + { 0x00800801, 0x21100236, 0x01ee8150, 0x00000000 }, + { 0x00800401, 0x21200236, 0x01ee8160, 0x00000000 }, + { 0x00800801, 0x21300236, 0x01ee8170, 0x00000000 }, + { 0x00000040, 0x22000d20, 0x00000062, 0x1218a600 }, + { 0x00200401, 0x204001a5, 0x00450064, 0x00000000 }, + { 0x00000801, 0x20480061, 0x00000000, 0x000f000f }, + { 0x01600031, 0x21400021, 0x508d0040, 0x00000200 }, + { 0x00000001, 0x220001ec, 0x00000000, 0x03400340 }, + { 0x00800401, 0x41600236, 0x00d28000, 0x00000000 }, + { 0x00800801, 0x41610236, 0x00d28080, 0x00000000 }, + { 0x00800401, 0x41800236, 0x00d28020, 0x00000000 }, + { 0x00800801, 0x41810236, 0x00d280a0, 0x00000000 }, + { 0x00800401, 0x41a00236, 0x00d28040, 0x00000000 }, + { 0x00800801, 0x41a10236, 0x00d280c0, 0x00000000 }, + { 0x00800401, 0x41c00236, 0x00d28060, 0x00000000 }, + { 0x00800801, 0x41c10236, 0x00d280e0, 0x00000000 }, + { 0x00000040, 0x22000d20, 0x00000062, 0x0a18a601 }, + { 0x0000040c, 0x20443ca5, 0x00000044, 0x00010001 }, + { 0x00000801, 0x20480061, 0x00000000, 0x0007000f }, + { 0x0a600031, 0x21600021, 0x508d0040, 0x00000200 }, + { 0x00000001, 0x21400021, 0x00000140, 0x00000000 }, + { 0x00000001, 0x21600021, 0x00000160, 0x00000000 }, + { 0x01600031, 0x20001c20, 0x708d0000, 0x82000010 }, + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x00600001, 0x20400021, 0x008d0000, 0x00000000 }, + { 0x00000005, 0x20203e2d, 0x00000061, 0x001f001f }, + { 0x00200009, 0x20643e2d, 0x00450064, 0x00040004 }, + { 0x00000001, 0x203a01ed, 0x00000000, 0x00000000 }, + { 0x01000010, 0x20003dac, 0x00000020, 0x00160016 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x0000001e }, + { 0x01200010, 0x20003e2c, 0x0200006c, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x00000024 }, + { 0x00800009, 0x25403dad, 0x00050064, 0x00020002 }, + { 0x00000001, 0x203a01ed, 0x00000000, 0x00180018 }, + { 0x00200040, 0x45483dad, 0x00660548, 0x00100010 }, + { 0x00200040, 0x45523dad, 0x00660552, 0x00100010 }, + { 0x00400040, 0x25583dad, 0x00690558, 0x00100010 }, + { 0x00800040, 0x208035ad, 0x00b10080, 0x00b10540 }, + { 0x00600040, 0x45403dad, 0x00ae0540, 0x00200020 }, + { 0x00800040, 0x20a035ad, 0x00b100a0, 0x00b10540 }, + { 0x00600040, 0x45423dad, 0x00ae0542, 0x00200020 }, + { 0x00800040, 0x20e035ad, 0x00b100e0, 0x00b10540 }, + { 0x00600040, 0x45403dad, 0x00ae0540, 0xffe0ffe0 }, + { 0x00800040, 0x20c035ad, 0x00b100c0, 0x00b10540 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000014 }, + { 0x06600010, 0x20003dac, 0x02000020, 0x00030003 }, + { 0x00000001, 0x206c0171, 0x00000000, 0x00000000 }, + { 0x00610001, 0x208000a5, 0x02050080, 0x00000000 }, + { 0x00610001, 0x212000a5, 0x02090100, 0x00000000 }, + { 0x00410001, 0x211000a5, 0x02690100, 0x00000000 }, + { 0x00200009, 0x25403dad, 0x00450064, 0x00020002 }, + { 0x00800040, 0x208035ad, 0x00b10080, 0x00050540 }, + { 0x00200040, 0x40883dad, 0x00660088, 0x00200020 }, + { 0x00200040, 0x40923dad, 0x00660092, 0x00200020 }, + { 0x00400040, 0x20983dad, 0x00690098, 0x00200020 }, + { 0x00200401, 0x22080060, 0x00000000, 0x03400140 }, + { 0x00000c01, 0x220c0060, 0x00000000, 0x04400080 }, + { 0x00000801, 0x22040060, 0x00000000, 0x01000070 }, + { 0x02000005, 0x20002e28, 0x00000061, 0x00400040 }, + { 0x00010005, 0x203e2e29, 0x00000063, 0x00010001 }, + { 0x00110001, 0x203e0169, 0x00000000, 0x00030003 }, + { 0x00000001, 0x20200169, 0x00000000, 0x00000000 }, + { 0x0000000c, 0x2458262d, 0x0000006d, 0x00000020 }, + { 0x00000001, 0x210e0169, 0x00000000, 0x00010001 }, + { 0x00000005, 0x24583dad, 0x00000458, 0x00030003 }, + { 0x01000010, 0x200035ac, 0x0000010e, 0x00000458 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x0000031a }, + { 0x01000010, 0x20003dac, 0x0200010e, 0x00010001 }, + { 0x00010401, 0x24540061, 0x02000000, 0x06c00640 }, + { 0x00010805, 0x245a3e2d, 0x02008800, 0x007f007f }, + { 0x00110401, 0x24540061, 0x02000000, 0x04800780 }, + { 0x00110805, 0x245a3e2d, 0x02008804, 0x007f007f }, + { 0x00010005, 0x245c3e2d, 0x02008800, 0x00800080 }, + { 0x00110005, 0x245c3e2d, 0x02008804, 0x00800080 }, + { 0x00000009, 0x245c3dad, 0x0000045c, 0x00010001 }, + { 0x0000000c, 0x211e362d, 0x0000006c, 0x00000020 }, + { 0x00000040, 0x240035ac, 0x0000003e, 0x0000045c }, + { 0x01000010, 0x20003d8c, 0x00210400, 0x00010001 }, + { 0x01000010, 0x20003d8c, 0x02210400, 0x01000100 }, + { 0x00000001, 0x203c01ed, 0x00000000, 0x00000000 }, + { 0x00010001, 0x203c01ed, 0x00000000, 0x00020002 }, + { 0x00010001, 0x203c01ed, 0x02000000, 0xfffefffe }, + { 0x02000005, 0x20002e28, 0x00000061, 0x00400040 }, + { 0x00010040, 0x244c0d21, 0x0000045a, 0x0208e602 }, + { 0x00110040, 0x20780d21, 0x0000045a, 0x0208a002 }, + { 0x00010040, 0x20782421, 0x0000044c, 0x0000045c }, + { 0x02000005, 0x20003dac, 0x0200011e, 0x00030003 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x000001c0 }, + { 0x01000005, 0x20003dac, 0x00009800, 0x00030003 }, + { 0x00200005, 0x24443dad, 0x00459800, 0x00030003 }, + { 0x0020000c, 0x24403dad, 0x00459800, 0x00020002 }, + { 0x01600006, 0x20003dac, 0x02000446, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000012 }, + { 0x00010040, 0x22000c20, 0x02000078, 0x00400000 }, + { 0x00110040, 0x22000c20, 0x02000078, 0x00700000 }, + { 0x00310040, 0x20401da5, 0x02450440, 0xfffffffe }, + { 0x00110001, 0x20480061, 0x02000000, 0x000c000c }, + { 0x00010040, 0x20401da5, 0x02000440, 0xfffffffe }, + { 0x00010001, 0x204401a5, 0x02000442, 0x00000000 }, + { 0x00010001, 0x20480061, 0x02000000, 0x0007000c }, + { 0x01600031, 0x25600021, 0x408d0040, 0x00000200 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x0000000e }, + { 0x00010040, 0x22000c20, 0x02000078, 0x00200000 }, + { 0x00110040, 0x22000c20, 0x02000078, 0x00400000 }, + { 0x00200001, 0x204001a5, 0x00450440, 0x00000000 }, + { 0x00110040, 0x20441da5, 0x02000442, 0xfffffffe }, + { 0x00110001, 0x20480061, 0x02000000, 0x000c0007 }, + { 0x00010001, 0x20480061, 0x02000000, 0x00070007 }, + { 0x01600031, 0x25600021, 0x408d0040, 0x00000200 }, + { 0x00000040, 0xb80235ad, 0x00009802, 0x0000003c }, + { 0x0020040c, 0x24403dad, 0x00459800, 0x00030003 }, + { 0x00200805, 0x24483dad, 0x00459800, 0x00070007 }, + { 0x01600006, 0x20003dac, 0x0000044a, 0x00000000 }, + { 0x00200001, 0x204001a5, 0x00450440, 0x00000000 }, + { 0x00000009, 0x20403ca5, 0x00000040, 0x00010001 }, + { 0x00010040, 0x22000c20, 0x00000078, 0x00200010 }, + { 0x00110040, 0x22000c20, 0x00000078, 0x00300010 }, + { 0x00010001, 0x20480061, 0x00000000, 0x00030009 }, + { 0x00110001, 0x20480061, 0x00000000, 0x00040009 }, + { 0x02600031, 0x27000021, 0x408d0040, 0x00000200 }, + { 0x01000005, 0x20003dac, 0x00009800, 0x00030003 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x0000001a }, + { 0x00600001, 0x26220231, 0x008d05c0, 0x00000000 }, + { 0x00600401, 0x26120231, 0x008d05b8, 0x00000000 }, + { 0x00600801, 0x26020231, 0x008d05b0, 0x00000000 }, + { 0x00600401, 0x25f20231, 0x008d05a8, 0x00000000 }, + { 0x00600801, 0x25e20231, 0x008d05a0, 0x00000000 }, + { 0x00600401, 0x25d20231, 0x008d0598, 0x00000000 }, + { 0x00600801, 0x25c20231, 0x008d0590, 0x00000000 }, + { 0x00600401, 0x25b20231, 0x008d0588, 0x00000000 }, + { 0x00600801, 0x25a20231, 0x008d0580, 0x00000000 }, + { 0x00600401, 0x25920231, 0x008d0578, 0x00000000 }, + { 0x00600801, 0x25820231, 0x008d0570, 0x00000000 }, + { 0x00600001, 0x25720231, 0x008d0568, 0x00000000 }, + { 0x00600001, 0x25620231, 0x008d0560, 0x00000000 }, + { 0x00110001, 0x220001ec, 0x02000000, 0x05820582 }, + { 0x00010001, 0x220001ec, 0x02000000, 0x05620562 }, + { 0x00000001, 0x220e0128, 0x00000454, 0x00000000 }, + { 0x01800006, 0x200035ac, 0x02000446, 0x00000444 }, + { 0x00810001, 0xbc000229, 0x02ad8000, 0x00000000 }, + { 0x00810001, 0xbc200229, 0x02ad8020, 0x00000000 }, + { 0x00810001, 0xbc400229, 0x02ad8040, 0x00000000 }, + { 0x00810001, 0xbc600229, 0x02ad8060, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x0000012a }, + { 0x00600001, 0x2024018d, 0x008d0200, 0x00000000 }, + { 0x01000041, 0x245e35ad, 0x00000446, 0x00000444 }, + { 0x00000040, 0x22022d08, 0x00000200, 0x00100010 }, + { 0x02000005, 0x20003db0, 0x0200045e, 0x00010001 }, + { 0x00200040, 0x22042d08, 0x00450200, 0x00200020 }, + { 0x00400001, 0x244c0109, 0x00690200, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000066 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x00000064 }, + { 0x00000040, 0x22003d08, 0x00000200, 0xffdeffde }, + { 0x00000440, 0x22023d08, 0x00000202, 0xffeeffee }, + { 0x00000801, 0x220c0060, 0x00000000, 0x04a00480 }, + { 0x01000010, 0x20003db0, 0x0000045e, 0x00040004 }, + { 0x00a02040, 0x2400462c, 0x00ad8000, 0x00ad8005 }, + { 0x00a02048, 0x24003e2c, 0x00ad8001, 0xfffbfffb }, + { 0x00a02048, 0x24003e2c, 0x00ad8002, 0x00140014 }, + { 0x00a02048, 0x24003e2c, 0x00ad8003, 0x00140014 }, + { 0x00a02048, 0xb8003e2d, 0x00ad8004, 0xfffbfffb }, + { 0x00a02040, 0x2400462c, 0x00ad8040, 0x00ad8045 }, + { 0x00a02048, 0x24003e2c, 0x00ad8041, 0xfffbfffb }, + { 0x00a02048, 0x24003e2c, 0x00ad8042, 0x00140014 }, + { 0x00a02048, 0x24003e2c, 0x00ad8043, 0x00140014 }, + { 0x00a02048, 0xb8403e2d, 0x00ad8044, 0xfffbfffb }, + { 0x00a02040, 0x2400462c, 0x00ad8080, 0x00ad8085 }, + { 0x00a02048, 0x24003e2c, 0x00ad8081, 0xfffbfffb }, + { 0x00a02048, 0x24003e2c, 0x00ad8082, 0x00140014 }, + { 0x00a02048, 0x24003e2c, 0x00ad8083, 0x00140014 }, + { 0x00a02048, 0xb8803e2d, 0x00ad8084, 0xfffbfffb }, + { 0x00600040, 0x2400462c, 0x008d80c0, 0x008d80c5 }, + { 0x00600048, 0x24003e2c, 0x008d80c1, 0xfffbfffb }, + { 0x00600048, 0x24003e2c, 0x008d80c2, 0x00140014 }, + { 0x00600048, 0x24003e2c, 0x008d80c3, 0x00140014 }, + { 0x00600048, 0xb8c03e2d, 0x008d80c4, 0xfffbfffb }, + { 0x00000401, 0x22000060, 0x00000000, 0x04a00480 }, + { 0x00000c01, 0x22040060, 0x00000000, 0x04a00490 }, + { 0x00010802, 0x220c2d28, 0x00000454, 0x04800480 }, + { 0x00a02040, 0x24003dac, 0x00b18000, 0x02000200 }, + { 0x00800048, 0x24003dac, 0x01ed8800, 0xfffbfffb }, + { 0x00800048, 0x24203dac, 0x01ed8820, 0xfffbfffb }, + { 0x00a02048, 0x24003dac, 0x00b18020, 0x00140014 }, + { 0x00800048, 0x24003dac, 0x01ed8820, 0x00140014 }, + { 0x00800048, 0x24203dac, 0x01ed8840, 0x00140014 }, + { 0x00a02048, 0x24003dac, 0x00b18040, 0xfffbfffb }, + { 0x00800048, 0x24003dac, 0x01ed8840, 0x00010001 }, + { 0x00800048, 0x24203dac, 0x01ed8860, 0x00010001 }, + { 0x8080000c, 0xd8003d91, 0x00b10400, 0x000a000a }, + { 0x8080100c, 0xd8203d91, 0x00b10420, 0x000a000a }, + { 0x00a02040, 0x24003dac, 0x00b18040, 0x02000200 }, + { 0x00800048, 0x24003dac, 0x01ed8840, 0xfffbfffb }, + { 0x00800048, 0x24203dac, 0x01ed8860, 0xfffbfffb }, + { 0x00a02048, 0x24003dac, 0x00b18060, 0x00140014 }, + { 0x00800048, 0x24003dac, 0x01ed8860, 0x00140014 }, + { 0x00800048, 0x24203dac, 0x01ed8880, 0x00140014 }, + { 0x00a02048, 0x24003dac, 0x00b18080, 0xfffbfffb }, + { 0x00800048, 0x24003dac, 0x01ed8880, 0x00010001 }, + { 0x00800048, 0x24203dac, 0x01ed88a0, 0x00010001 }, + { 0x8080000c, 0xd8403d91, 0x00b10400, 0x000a000a }, + { 0x8080100c, 0xd8603d91, 0x00b10420, 0x000a000a }, + { 0x00010220, 0x34001c00, 0x00001400, 0x000000b4 }, + { 0x01000010, 0x20003db0, 0x00000444, 0x00000000 }, + { 0x01000010, 0x20003db0, 0x02000446, 0x00020002 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x0000004c }, + { 0x00010220, 0x34001c00, 0x02001400, 0x0000004a }, + { 0x00400040, 0x22003d28, 0x0069044c, 0xfffefffe }, + { 0x03400010, 0x20003dac, 0x00000446, 0x00020002 }, + { 0x01000010, 0x20003db0, 0x02000444, 0x00020002 }, + { 0x00410040, 0x22002d08, 0x00690200, 0x00100010 }, + { 0x01000010, 0x20003dac, 0x00000446, 0x00000000 }, + { 0x00010002, 0x220c2d28, 0x02000454, 0x04800480 }, + { 0x00800040, 0x24003e2c, 0x01ed8000, 0x00100010 }, + { 0x00800040, 0x24203e2c, 0x01ed8020, 0x00100010 }, + { 0x00800048, 0x24003e2c, 0x01ed8001, 0xfffbfffb }, + { 0x00800048, 0x24203e2c, 0x01ed8021, 0xfffbfffb }, + { 0x00800048, 0x24003e2c, 0x01ed8002, 0x00140014 }, + { 0x00800048, 0x24203e2c, 0x01ed8022, 0x00140014 }, + { 0x00800048, 0x24003e2c, 0x01ed8003, 0x00140014 }, + { 0x00800048, 0x24203e2c, 0x01ed8023, 0x00140014 }, + { 0x00800048, 0x24003e2c, 0x01ed8004, 0xfffbfffb }, + { 0x00800048, 0x24203e2c, 0x01ed8024, 0xfffbfffb }, + { 0x00800048, 0x24003e2c, 0x01ed8005, 0x00010001 }, + { 0x00800048, 0x24203e2c, 0x01ed8025, 0x00010001 }, + { 0x8080000c, 0xd8003d91, 0x00b10400, 0x00050005 }, + { 0x8080100c, 0xd8203d91, 0x00b10420, 0x00050005 }, + { 0x00800040, 0x24003e2c, 0x01ed8040, 0x00100010 }, + { 0x00800040, 0x24203e2c, 0x01ed8060, 0x00100010 }, + { 0x00800048, 0x24003e2c, 0x01ed8041, 0xfffbfffb }, + { 0x00800048, 0x24203e2c, 0x01ed8061, 0xfffbfffb }, + { 0x00800048, 0x24003e2c, 0x01ed8042, 0x00140014 }, + { 0x00800048, 0x24203e2c, 0x01ed8062, 0x00140014 }, + { 0x00800048, 0x24003e2c, 0x01ed8043, 0x00140014 }, + { 0x00800048, 0x24203e2c, 0x01ed8063, 0x00140014 }, + { 0x00800048, 0x24003e2c, 0x01ed8044, 0xfffbfffb }, + { 0x00800048, 0x24203e2c, 0x01ed8064, 0xfffbfffb }, + { 0x00800048, 0x24003e2c, 0x01ed8045, 0x00010001 }, + { 0x00800048, 0x24203e2c, 0x01ed8065, 0x00010001 }, + { 0x8080000c, 0xd8403d91, 0x00b10400, 0x00050005 }, + { 0x8080100c, 0xd8603d91, 0x00b10420, 0x00050005 }, + { 0x00110220, 0x34001c00, 0x02001400, 0x00000004 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x0000005c }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000062 }, + { 0x01000010, 0x20003db0, 0x00000446, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000042 }, + { 0x00200401, 0x22000128, 0x0066044c, 0x00000000 }, + { 0x00200c01, 0x22040128, 0x0045044e, 0x00000000 }, + { 0x00000801, 0x220c0128, 0x00000454, 0x00000000 }, + { 0x03400010, 0x20003dac, 0x02000444, 0x00020002 }, + { 0x01000010, 0x20003dac, 0x00000444, 0x00000000 }, + { 0x00410040, 0x22002d08, 0x02690200, 0x00010001 }, + { 0x01000010, 0x20003db0, 0x02000446, 0x00020002 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x00000002 }, + { 0x00110001, 0x220c0168, 0x02000000, 0x04800480 }, + { 0x00a02040, 0x24003e2c, 0x00ad83e0, 0x00100010 }, + { 0x00800048, 0x24003e2c, 0x01ed8be0, 0xfffbfffb }, + { 0x00800048, 0x24203e2c, 0x01ed8800, 0xfffbfffb }, + { 0x00a02048, 0x24003e2c, 0x00ad8000, 0x00140014 }, + { 0x00800048, 0x24003e2c, 0x01ed8800, 0x00140014 }, + { 0x00800048, 0x24203e2c, 0x01ed8820, 0x00140014 }, + { 0x00a02048, 0x24003e2c, 0x00ad8020, 0xfffbfffb }, + { 0x00800048, 0x24003e2c, 0x01ed8820, 0x00010001 }, + { 0x00800048, 0x24203e2c, 0x01ed8840, 0x00010001 }, + { 0x8080000c, 0xd8003d91, 0x00b10400, 0x00050005 }, + { 0x8080100c, 0xd8203d91, 0x00b10420, 0x00050005 }, + { 0x00a02040, 0x24003e2c, 0x00ad8020, 0x00100010 }, + { 0x00800048, 0x24003e2c, 0x01ed8820, 0xfffbfffb }, + { 0x00800048, 0x24203e2c, 0x01ed8840, 0xfffbfffb }, + { 0x00a02048, 0x24003e2c, 0x00ad8040, 0x00140014 }, + { 0x00800048, 0x24003e2c, 0x01ed8840, 0x00140014 }, + { 0x00800048, 0x24203e2c, 0x01ed8860, 0x00140014 }, + { 0x00a02048, 0x24003e2c, 0x00ad8060, 0xfffbfffb }, + { 0x00800048, 0x24003e2c, 0x01ed8860, 0x00010001 }, + { 0x00800048, 0x24203e2c, 0x01ed8880, 0x00010001 }, + { 0x8080000c, 0xd8403d91, 0x00b10400, 0x00050005 }, + { 0x8080100c, 0xd8603d91, 0x00b10420, 0x00050005 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x00000016 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x0000001c }, + { 0x00200401, 0x22000128, 0x0045044c, 0x00000000 }, + { 0x00000801, 0x220c0128, 0x00000454, 0x00000000 }, + { 0x01200010, 0x20003dac, 0x00000444, 0x00030003 }, + { 0x01200010, 0x20003dac, 0x02000446, 0x00030003 }, + { 0x00210040, 0x22002d08, 0x00450200, 0x00010001 }, + { 0x00210040, 0x22002d08, 0x02450200, 0x00100010 }, + { 0x00800001, 0xb8000229, 0x01ed8000, 0x00000000 }, + { 0x00800001, 0xb8200229, 0x01ed8020, 0x00000000 }, + { 0x00800001, 0xb8400229, 0x01ed8040, 0x00000000 }, + { 0x00800001, 0xb8600229, 0x01ed8060, 0x00000000 }, + { 0x80800042, 0xd8004631, 0x00d29800, 0x00d20480 }, + { 0x80800042, 0xd8204631, 0x00d29820, 0x00d204a0 }, + { 0x80800042, 0xd8404631, 0x00d29840, 0x00d204c0 }, + { 0x80800042, 0xd8604631, 0x00d29860, 0x00d204e0 }, + { 0x00600001, 0x220001ac, 0x008d0024, 0x00000000 }, + { 0x00200040, 0x244c3dad, 0x00450448, 0xfff8fff8 }, + { 0x00000401, 0x220001ec, 0x00000000, 0x07000700 }, + { 0x00000c01, 0x220201e8, 0x00000000, 0x07100710 }, + { 0x00000801, 0x220e0128, 0x00000456, 0x00000000 }, + { 0x00000441, 0x254635ad, 0x00000448, 0x0000044a }, + { 0x00000c41, 0x254025ad, 0x0000444c, 0x0000444e }, + { 0x00000c41, 0x254225ad, 0x00000448, 0x0000444e }, + { 0x00000841, 0x254435ad, 0x0000444c, 0x0000044a }, + { 0x00200040, 0x244c3d09, 0x00450200, 0x00100010 }, + { 0x00800041, 0x24002628, 0x00ad8000, 0x00000540 }, + { 0x00800041, 0x24202628, 0x00ad8020, 0x00000540 }, + { 0x00800048, 0x24002628, 0x00ad8002, 0x00000542 }, + { 0x00800048, 0x24202628, 0x00ad8022, 0x00000542 }, + { 0x00200001, 0x22000128, 0x0045044c, 0x00000000 }, + { 0x00800048, 0x24002628, 0x01ed8000, 0x00000544 }, + { 0x00800048, 0x24202628, 0x01ed8020, 0x00000544 }, + { 0x00800048, 0xbc002629, 0x01ed8002, 0x00000546 }, + { 0x00801048, 0xbc202629, 0x01ed8022, 0x00000546 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000128 }, + { 0x00000001, 0x20220169, 0x00000000, 0x00040004 }, + { 0x00200005, 0x24443dad, 0x00459800, 0x00030003 }, + { 0x0020000c, 0x24403dad, 0x00459800, 0x00020002 }, + { 0x01600006, 0x20003dac, 0x02000446, 0x00000000 }, + { 0x00010040, 0x22000c20, 0x02000078, 0x00200000 }, + { 0x00110040, 0x22000c20, 0x02000078, 0x00500000 }, + { 0x00310040, 0x20401da5, 0x02450440, 0xfffffffe }, + { 0x00110001, 0x20480061, 0x02000000, 0x00080008 }, + { 0x00010040, 0x20401da5, 0x02000440, 0xfffffffe }, + { 0x00010001, 0x204401a5, 0x02000442, 0x00000000 }, + { 0x00010001, 0x20480061, 0x02000000, 0x00030008 }, + { 0x01600031, 0x25600021, 0x408d0040, 0x00000200 }, + { 0x00000040, 0xb80235ad, 0x00009802, 0x0000003c }, + { 0x00000040, 0x22000c20, 0x00000078, 0x00100010 }, + { 0x0020040c, 0x24403dad, 0x00459800, 0x00030003 }, + { 0x00200805, 0x24483dad, 0x00459800, 0x00070007 }, + { 0x00200001, 0x204001a5, 0x00450440, 0x00000000 }, + { 0x00000009, 0x20403ca5, 0x00000040, 0x00010001 }, + { 0x00000001, 0x20480061, 0x00000000, 0x00020005 }, + { 0x02600031, 0x27000021, 0x408d0040, 0x00000200 }, + { 0x00110001, 0x220001ec, 0x02000000, 0x05820582 }, + { 0x00010001, 0x220001ec, 0x02000000, 0x05620562 }, + { 0x00000001, 0x220e0128, 0x00000454, 0x00000000 }, + { 0x01800006, 0x200035ac, 0x02000446, 0x00000444 }, + { 0x00410001, 0xbc000229, 0x02698000, 0x00000000 }, + { 0x00410001, 0xbc100229, 0x02698010, 0x00000000 }, + { 0x00410001, 0xbc200229, 0x02698020, 0x00000000 }, + { 0x00410001, 0xbc300229, 0x02698030, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x000000be }, + { 0x00600001, 0x2024018d, 0x008d0200, 0x00000000 }, + { 0x01000041, 0x245e35ad, 0x00000446, 0x00000444 }, + { 0x02000005, 0x20003db0, 0x0200045e, 0x00010001 }, + { 0x00000040, 0x22022d08, 0x00000200, 0x00100010 }, + { 0x00200040, 0x22042d08, 0x00450200, 0x00200020 }, + { 0x00400001, 0x244c0109, 0x00690200, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000044 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x00000042 }, + { 0x00000040, 0x22003d08, 0x00000200, 0xffdeffde }, + { 0x00000440, 0x22023d08, 0x00000202, 0xffeeffee }, + { 0x00000801, 0x220c0060, 0x00000000, 0x04d004c0 }, + { 0x01000010, 0x20003db0, 0x0000045e, 0x00040004 }, + { 0x00802040, 0x2400462c, 0x00a98000, 0x00a98005 }, + { 0x00802048, 0x24003e2c, 0x00a98001, 0xfffbfffb }, + { 0x00802048, 0x24003e2c, 0x00a98002, 0x00140014 }, + { 0x00802048, 0x24003e2c, 0x00a98003, 0x00140014 }, + { 0x00802048, 0xb8003e2d, 0x00a98004, 0xfffbfffb }, + { 0x00802040, 0x2400462c, 0x00a98040, 0x00a98045 }, + { 0x00802048, 0x24003e2c, 0x00a98041, 0xfffbfffb }, + { 0x00802048, 0x24003e2c, 0x00a98042, 0x00140014 }, + { 0x00802048, 0x24003e2c, 0x00a98043, 0x00140014 }, + { 0x00802048, 0xb8203e2d, 0x00a98044, 0xfffbfffb }, + { 0x00400040, 0x2400462c, 0x00698080, 0x00698085 }, + { 0x00400048, 0x24003e2c, 0x00698081, 0xfffbfffb }, + { 0x00400048, 0x24003e2c, 0x00698082, 0x00140014 }, + { 0x00400048, 0x24003e2c, 0x00698083, 0x00140014 }, + { 0x00400048, 0xb8403e2d, 0x00698084, 0xfffbfffb }, + { 0x00000401, 0x220c0060, 0x00000000, 0x04e004d0 }, + { 0x00000c01, 0x22000060, 0x00000000, 0x04d004c8 }, + { 0x00000c01, 0x22040060, 0x00000000, 0x04e004d8 }, + { 0x00000801, 0x22080060, 0x00000000, 0x04f004e8 }, + { 0x00800040, 0x24003dac, 0x00b104c0, 0x02000200 }, + { 0x00800048, 0x24003dac, 0x00b104e0, 0xfffbfffb }, + { 0x00800048, 0x24003dac, 0x01ed9800, 0x00140014 }, + { 0x00010001, 0x220c0168, 0x00000000, 0x05400540 }, + { 0x00110001, 0x220c0168, 0x00000000, 0x04c004c0 }, + { 0x00800048, 0x24003dac, 0x01e98000, 0xfffbfffb }, + { 0x00800048, 0x24003dac, 0x01e98020, 0x00010001 }, + { 0x00800048, 0x24003dac, 0x01e98800, 0x00140014 }, + { 0x8080000c, 0xd8003d91, 0x00b10400, 0x000a000a }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000060 }, + { 0x01000010, 0x20003db0, 0x00000444, 0x00000000 }, + { 0x01000010, 0x20003db0, 0x02000446, 0x00020002 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000024 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x00000022 }, + { 0x00400040, 0x22003d28, 0x0069044c, 0xfffefffe }, + { 0x03400010, 0x20003dac, 0x00000446, 0x00020002 }, + { 0x01000010, 0x20003db0, 0x02000444, 0x00020002 }, + { 0x00410040, 0x22002d08, 0x00690200, 0x00100010 }, + { 0x01000010, 0x20003dac, 0x00000446, 0x00000000 }, + { 0x00010001, 0x220e0168, 0x02000000, 0x05400540 }, + { 0x00110001, 0x220e0168, 0x02000000, 0x04c004c0 }, + { 0x00800040, 0x24003e2c, 0x01e98000, 0x00100010 }, + { 0x00800048, 0x24003e2c, 0x01e98001, 0xfffbfffb }, + { 0x00800048, 0x24003e2c, 0x01e98002, 0x00140014 }, + { 0x00800048, 0x24003e2c, 0x01e98003, 0x00140014 }, + { 0x00800048, 0x24003e2c, 0x01e98004, 0xfffbfffb }, + { 0x00800048, 0x24003e2c, 0x01e98005, 0x00010001 }, + { 0x8080000c, 0xdc003d91, 0x00b10400, 0x00050005 }, + { 0x00110220, 0x34001c00, 0x02001400, 0x00000004 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x00000036 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000036 }, + { 0x01000010, 0x20003db0, 0x00000446, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000024 }, + { 0x03600010, 0x20003dac, 0x02000444, 0x00020002 }, + { 0x00400401, 0x22000128, 0x0069044c, 0x00000000 }, + { 0x00400840, 0x22083d2c, 0x0069044c, 0x00100010 }, + { 0x00610040, 0x22002d08, 0x02690200, 0x00010001 }, + { 0x01000010, 0x20003dac, 0x00000444, 0x00000000 }, + { 0x01000010, 0x20003db0, 0x02000446, 0x00020002 }, + { 0x00800040, 0x24003e2c, 0x01e983e0, 0x00100010 }, + { 0x00800048, 0x24003e2c, 0x01e98000, 0x00140014 }, + { 0x00800048, 0x24003e2c, 0x01e98020, 0xfffbfffb }, + { 0x00800048, 0x24003e2c, 0x01e993e0, 0xfffbfffb }, + { 0x00800048, 0x24003e2c, 0x01e99000, 0x00140014 }, + { 0x00800048, 0x24003e2c, 0x01e99020, 0x00010001 }, + { 0x00000001, 0x220e0168, 0x00000000, 0x05400540 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x00000002 }, + { 0x00110001, 0x220e0168, 0x02000000, 0x04c004c0 }, + { 0x8080000c, 0xdc003d91, 0x00b10400, 0x00050005 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x0000000e }, + { 0x00010220, 0x34001c00, 0x02001400, 0x0000000e }, + { 0x00400001, 0x22000128, 0x0069044c, 0x00000000 }, + { 0x01400010, 0x20003dac, 0x00000444, 0x00030003 }, + { 0x01400010, 0x20003dac, 0x02000446, 0x00030003 }, + { 0x00410040, 0x22002d08, 0x00690200, 0x00010001 }, + { 0x00410040, 0x22002d08, 0x02690200, 0x00100010 }, + { 0x00800001, 0x25400229, 0x01e98000, 0x00000000 }, + { 0x80800042, 0x45404631, 0x00d20540, 0x00d204c0 }, + { 0x00000001, 0x220c0128, 0x00000454, 0x00000000 }, + { 0x00400001, 0xd8000231, 0x008a0540, 0x00000000 }, + { 0x00400001, 0xd8100231, 0x008a0548, 0x00000000 }, + { 0x00400001, 0xd8200231, 0x008a0550, 0x00000000 }, + { 0x00400001, 0xd8300231, 0x008a0558, 0x00000000 }, + { 0x00600001, 0x220001ac, 0x008d0024, 0x00000000 }, + { 0x00200040, 0x244c3dad, 0x00450448, 0xfff8fff8 }, + { 0x00000401, 0x220001ec, 0x00000000, 0x07000700 }, + { 0x00000801, 0x220e0128, 0x00000456, 0x00000000 }, + { 0x00000441, 0x254635ad, 0x00000448, 0x0000044a }, + { 0x00000c41, 0x254025ad, 0x0000444c, 0x0000444e }, + { 0x00000c41, 0x254225ad, 0x00000448, 0x0000444e }, + { 0x00000841, 0x254435ad, 0x0000444c, 0x0000044a }, + { 0x00600041, 0x24002628, 0x00898000, 0x00000540 }, + { 0x00600048, 0x24002628, 0x00898002, 0x00000542 }, + { 0x00600048, 0x24002628, 0x00898008, 0x00000544 }, + { 0x00600048, 0x2540262d, 0x0089800a, 0x00000546 }, + { 0x00400401, 0xbc0001a9, 0x00690540, 0x00000000 }, + { 0x00400801, 0xbc1001a9, 0x00690548, 0x00000000 }, + { 0x01000010, 0x20003d2c, 0x00000022, 0x00030003 }, + { 0x01000040, 0x20223d29, 0x02000022, 0xffffffff }, + { 0x00000040, 0x220c3d8c, 0x0000020c, 0x00080008 }, + { 0x00110040, 0x24540c21, 0x00000454, 0x00080008 }, + { 0x00010040, 0x24540c21, 0x00000454, 0x00180038 }, + { 0x00110220, 0x34001c00, 0x02001400, 0xfffffee4 }, + { 0x01800010, 0x20003dac, 0x0200010e, 0x00010001 }, + { 0x00000040, 0x220c3d8c, 0x0000020c, 0xffe0ffe0 }, + { 0x00010001, 0x24540061, 0x02000000, 0x06c00640 }, + { 0x00110001, 0x24540061, 0x02000000, 0x04800780 }, + { 0x00000001, 0x220e0128, 0x00000456, 0x00000000 }, + { 0x00800040, 0x24003dac, 0x00b19c00, 0x00200020 }, + { 0x00800040, 0x24203dac, 0x00b19c20, 0x00200020 }, + { 0x8080000c, 0xdc003d91, 0x00b10400, 0x00060006 }, + { 0x8080000c, 0xdc203d91, 0x00b10420, 0x00060006 }, + { 0x02000040, 0x210e3d29, 0x0200010e, 0xffffffff }, + { 0x00000040, 0x220c3d8c, 0x0000020c, 0x00040004 }, + { 0x00110220, 0x34001c00, 0x02001400, 0xfffffcdc }, + { 0x01000005, 0x25643e2d, 0x00000060, 0x00c000c0 }, + { 0x01000010, 0x20003dac, 0x02000458, 0x00020002 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x00000016 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x0000000c }, + { 0x01000010, 0x20003dac, 0x00000458, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000086 }, + { 0x00a02001, 0x46400231, 0x00d20780, 0x00000000 }, + { 0x00a02001, 0x46800231, 0x00d207c0, 0x00000000 }, + { 0x00a02001, 0x46c00231, 0x00d20480, 0x00000000 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x0000007e }, + { 0x80a02042, 0x46404631, 0x00d20640, 0x00d20780 }, + { 0x80a02042, 0x46804631, 0x00d20680, 0x00d207c0 }, + { 0x80a02042, 0x46c04631, 0x00d206c0, 0x00d20480 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000076 }, + { 0x01000010, 0x20003dac, 0x02000564, 0x00800080 }, + { 0x00110220, 0x34001c00, 0x02001400, 0x0000000e }, + { 0x01000010, 0x20003dac, 0x00000458, 0x00020002 }, + { 0x00110220, 0x34001c00, 0x00001400, 0xffffffe4 }, + { 0x00200401, 0x256801ed, 0x00000000, 0x00200020 }, + { 0x00200801, 0x256c01ed, 0x00000000, 0x00060006 }, + { 0x00400001, 0x258001ed, 0x00000000, 0x00000000 }, + { 0x00600001, 0x45a001ad, 0x00058c00, 0x00000000 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000028 }, + { 0x02600005, 0x20006e28, 0x02008c0c, 0x88848421 }, + { 0x0220000c, 0x25663dad, 0x00000458, 0x00010001 }, + { 0x0000000c, 0x25643dad, 0x00000564, 0x00060006 }, + { 0x00310001, 0x25c401ad, 0x00000458, 0x00000000 }, + { 0x00210001, 0x25c00061, 0x00000000, 0x00010001 }, + { 0x00310040, 0x25c03dad, 0x004545c4, 0x00010001 }, + { 0x00610001, 0x25a00061, 0x02000000, 0x00000080 }, + { 0x00710001, 0x45a002ad, 0x02ae8c00, 0x00000000 }, + { 0x00710001, 0x45a202ad, 0x02ae8c01, 0x00000000 }, + { 0x00800041, 0x25a035ad, 0x00b105a0, 0x000905c0 }, + { 0x01200010, 0x20003e2c, 0x0245006e, 0x00000000 }, + { 0x00310009, 0x244c45ad, 0x02000564, 0x0045006e }, + { 0x00210001, 0x244c01ed, 0x02000000, 0x00000000 }, + { 0x0031000c, 0x244c3dad, 0x0245044c, 0x00010001 }, + { 0x00200009, 0x256835ad, 0x0045044c, 0x00000566 }, + { 0x00210040, 0x256835ad, 0x02450568, 0x00000566 }, + { 0x00200040, 0x256c362d, 0x0045006e, 0x00000566 }, + { 0x00400040, 0x240035ac, 0x00ab05a2, 0x00ab05a6 }, + { 0x00400040, 0x2400358c, 0x00690400, 0x00000566 }, + { 0x0040000c, 0x2580358d, 0x00690400, 0x00000566 }, + { 0x00800041, 0x2400362c, 0x00d20640, 0x000005a0 }, + { 0x00800041, 0x2420362c, 0x00d20660, 0x000005a0 }, + { 0x00800048, 0x2400362c, 0x00d20780, 0x000005a4 }, + { 0x00800048, 0x2420362c, 0x00d207a0, 0x000005a4 }, + { 0x00800040, 0x2400358c, 0x00b10400, 0x00000568 }, + { 0x00800040, 0x2420358c, 0x00b10420, 0x00000568 }, + { 0x0080000c, 0x24c0358d, 0x00b10400, 0x0000056c }, + { 0x0080000c, 0x24e0358d, 0x00b10420, 0x0000056c }, + { 0x80800040, 0x464035b1, 0x00b104c0, 0x00000580 }, + { 0x80800040, 0x466035b1, 0x00b104e0, 0x00000580 }, + { 0x00800041, 0x2400362c, 0x00d20680, 0x000005a0 }, + { 0x00800041, 0x2420362c, 0x00d206a0, 0x000005a0 }, + { 0x00800048, 0x2400362c, 0x00d207c0, 0x000005a4 }, + { 0x00800048, 0x2420362c, 0x00d207e0, 0x000005a4 }, + { 0x00800040, 0x2400358c, 0x00b10400, 0x00000568 }, + { 0x00800040, 0x2420358c, 0x00b10420, 0x00000568 }, + { 0x0080000c, 0x24c0358d, 0x00b10400, 0x0000056c }, + { 0x0080000c, 0x24e0358d, 0x00b10420, 0x0000056c }, + { 0x80800040, 0x468035b1, 0x00b104c0, 0x00000580 }, + { 0x80800040, 0x46a035b1, 0x00b104e0, 0x00000580 }, + { 0x00800041, 0x2400362c, 0x00d206c0, 0x000705a8 }, + { 0x00800041, 0x2420362c, 0x00d206e0, 0x000705a8 }, + { 0x00800048, 0x2400362c, 0x00d20480, 0x000705ac }, + { 0x00800048, 0x2420362c, 0x00d204a0, 0x000705ac }, + { 0x00800040, 0x2400358c, 0x00b10400, 0x0000056a }, + { 0x00800040, 0x2420358c, 0x00b10420, 0x0000056a }, + { 0x0080000c, 0x24c0358d, 0x00b10400, 0x0000056e }, + { 0x0080000c, 0x24e0358d, 0x00b10420, 0x0000056e }, + { 0x80800040, 0x46c035b1, 0x00b104c0, 0x00050582 }, + { 0x80800040, 0x46e035b1, 0x00b104e0, 0x00050582 }, + { 0x01800005, 0x20003d2c, 0x02000020, 0x00020002 }, + { 0x80800040, 0xd00045b1, 0x00b19000, 0x00d20640 }, + { 0x80800040, 0xd02045b1, 0x00b19020, 0x00d20660 }, + { 0x80800040, 0xd04045b1, 0x00b19040, 0x00d20680 }, + { 0x80800040, 0xd06045b1, 0x00b19060, 0x00d206a0 }, + { 0x00000040, 0x22083d8c, 0x00000208, 0x00800080 }, + { 0x80400040, 0xd40045b1, 0x00699400, 0x00ab06c0 }, + { 0x80400040, 0xd48045b1, 0x00699480, 0x00ab06c2 }, + { 0x80400040, 0xd42045b1, 0x00699420, 0x00ab06e0 }, + { 0x80400040, 0xd4a045b1, 0x006994a0, 0x00ab06e2 }, + { 0x80400040, 0xd41045b1, 0x00699410, 0x00ab06d0 }, + { 0x80400040, 0xd49045b1, 0x00699490, 0x00ab06d2 }, + { 0x80400040, 0xd43045b1, 0x00699430, 0x00ab06f0 }, + { 0x80400040, 0xd4b045b1, 0x006994b0, 0x00ab06f2 }, + { 0x00000040, 0x220a3d8c, 0x0000020a, 0x00080008 }, + { 0x00110040, 0x220a3d8c, 0x0200020a, 0x00300030 }, + { 0x01000010, 0x20003d2c, 0x02000020, 0x00060006 }, + { 0x00000040, 0x20203d29, 0x00000020, 0x00020002 }, + { 0x00000040, 0x22040c00, 0x00000204, 0x00100001 }, + { 0x00000040, 0x220c358c, 0x0000020c, 0x0000003a }, + { 0x00110220, 0x34001c00, 0x02001400, 0xfffffc1a }, + { 0x00000001, 0x220001ec, 0x00000000, 0x01400140 }, + { 0x00000001, 0x220201ec, 0x00000000, 0x01c001c0 }, + { 0x00800401, 0x20400236, 0x01ee8000, 0x00000000 }, + { 0x00800801, 0x20500236, 0x01ee8010, 0x00000000 }, + { 0x00800401, 0x20600236, 0x01ee8020, 0x00000000 }, + { 0x00800801, 0x20700236, 0x01ee8030, 0x00000000 }, + { 0x00800401, 0x20800236, 0x01ee8040, 0x00000000 }, + { 0x00800801, 0x20900236, 0x01ee8050, 0x00000000 }, + { 0x00800401, 0x20a00236, 0x01ee8060, 0x00000000 }, + { 0x00800801, 0x20b00236, 0x01ee8070, 0x00000000 }, + { 0x00800401, 0x20c00236, 0x01ee8100, 0x00000000 }, + { 0x00800801, 0x20d00236, 0x01ee8110, 0x00000000 }, + { 0x00800401, 0x20e00236, 0x01ee8120, 0x00000000 }, + { 0x00800801, 0x20f00236, 0x01ee8130, 0x00000000 }, + { 0x00800401, 0x21000236, 0x01ee8140, 0x00000000 }, + { 0x00800801, 0x21100236, 0x01ee8150, 0x00000000 }, + { 0x00800401, 0x21200236, 0x01ee8160, 0x00000000 }, + { 0x00800801, 0x21300236, 0x01ee8170, 0x00000000 }, + { 0x00000040, 0x22000d20, 0x00000062, 0x1218a000 }, + { 0x00200401, 0x204001a5, 0x00450064, 0x00000000 }, + { 0x00000801, 0x20480061, 0x00000000, 0x000f000f }, + { 0x01600031, 0x21400021, 0x508d0040, 0x00000200 }, + { 0x00000001, 0x220001ec, 0x00000000, 0x03400340 }, + { 0x00800401, 0x41600236, 0x00d28000, 0x00000000 }, + { 0x00800801, 0x41610236, 0x00d28080, 0x00000000 }, + { 0x00800401, 0x41800236, 0x00d28020, 0x00000000 }, + { 0x00800801, 0x41810236, 0x00d280a0, 0x00000000 }, + { 0x00800401, 0x41a00236, 0x00d28040, 0x00000000 }, + { 0x00800801, 0x41a10236, 0x00d280c0, 0x00000000 }, + { 0x00800401, 0x41c00236, 0x00d28060, 0x00000000 }, + { 0x00800801, 0x41c10236, 0x00d280e0, 0x00000000 }, + { 0x00000040, 0x22000d20, 0x00000062, 0x0a18a001 }, + { 0x0000040c, 0x20443ca5, 0x00000044, 0x00010001 }, + { 0x00000801, 0x20480061, 0x00000000, 0x0007000f }, + { 0x0a600031, 0x21600021, 0x508d0040, 0x00000200 }, + { 0x00000001, 0x21400021, 0x00000140, 0x00000000 }, + { 0x00000001, 0x21600021, 0x00000160, 0x00000000 }, + { 0x01600031, 0x20001c20, 0x708d0000, 0x82000010 }, + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x01000005, 0x20602d29, 0x02000042, 0x00070007 }, + { 0x01000005, 0x20422d29, 0x00000042, 0xfff8fff8 }, + { 0x00000001, 0x202001e9, 0x00000000, 0x100c100c }, + { 0x00600001, 0x27e00021, 0x008d0000, 0x00000000 }, + { 0x00000009, 0x27e82d21, 0x00000040, 0x00060006 }, + { 0x00600001, 0x20a00022, 0x008d0000, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000100 }, + { 0x00600001, 0x20200022, 0x008d07e0, 0x00000000 }, + { 0x01800031, 0x20801d09, 0x408d0000, 0x02488400 }, + { 0x00600001, 0x20400022, 0x008d07e0, 0x00000000 }, + { 0x00000040, 0x20480c22, 0x000007e8, 0x00000080 }, + { 0x02800031, 0x21001d09, 0x408d0000, 0x02488400 }, + { 0x00600001, 0x20600022, 0x008d07e0, 0x00000000 }, + { 0x00000040, 0x20680c22, 0x000007e8, 0x00000100 }, + { 0x03800031, 0x21801d09, 0x408d0000, 0x02488400 }, + { 0x00600001, 0x20800022, 0x008d07e0, 0x00000000 }, + { 0x00000040, 0x20880c22, 0x000007e8, 0x00000180 }, + { 0x04800031, 0x22001d09, 0x408d0000, 0x02488400 }, + { 0x02600005, 0x20000c20, 0x02000090, 0x00002000 }, + { 0x00000006, 0x20880c21, 0x00000088, 0x00200000 }, + { 0x00200009, 0x20845529, 0x0000009c, 0x00450020 }, + { 0x00200001, 0x40840231, 0x00450094, 0x00000000 }, + { 0x00310001, 0x20840229, 0x02450094, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x0000000c }, + { 0x00800041, 0x24002628, 0x00000095, 0x00000044 }, + { 0x00800040, 0x24004508, 0x008d0400, 0x00000094 }, + { 0x00000009, 0x20a82d02, 0x00000404, 0x00060006 }, + { 0x00802001, 0x20c00022, 0x008d0080, 0x00000000 }, + { 0x00802001, 0x20800061, 0x00000000, 0x00000000 }, + { 0x05800031, 0x20001d0c, 0x508d0000, 0x06080300 }, + { 0x02600005, 0x20000c20, 0x020000d0, 0x00002000 }, + { 0x00000006, 0x20c80c21, 0x000000c8, 0x00200000 }, + { 0x00200009, 0x20c45529, 0x000000dc, 0x00450020 }, + { 0x00200001, 0x40c40231, 0x004500d4, 0x00000000 }, + { 0x00310001, 0x20c40229, 0x024500d4, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x0000000c }, + { 0x00800041, 0x24002628, 0x000000d5, 0x00000044 }, + { 0x00800040, 0x24004508, 0x008d0400, 0x000000d4 }, + { 0x00000009, 0x20a82d02, 0x00000404, 0x00060006 }, + { 0x00802001, 0x20c00022, 0x008d00c0, 0x00000000 }, + { 0x00802001, 0x20c00061, 0x00000000, 0x00000000 }, + { 0x05800031, 0x20001d0c, 0x508d0000, 0x06080300 }, + { 0x02600005, 0x20000c20, 0x02000110, 0x00002000 }, + { 0x00000006, 0x21080c21, 0x00000108, 0x00200000 }, + { 0x00200009, 0x21045529, 0x0000011c, 0x00450020 }, + { 0x00200001, 0x41040231, 0x00450114, 0x00000000 }, + { 0x00310001, 0x21040229, 0x02450114, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x0000000c }, + { 0x00800041, 0x24002628, 0x00000115, 0x00000044 }, + { 0x00800040, 0x24004508, 0x008d0400, 0x00000114 }, + { 0x00000009, 0x20a82d02, 0x00000404, 0x00060006 }, + { 0x00802001, 0x20c00022, 0x008d0100, 0x00000000 }, + { 0x00802001, 0x21000061, 0x00000000, 0x00000000 }, + { 0x05800031, 0x20001d0c, 0x508d0000, 0x06080300 }, + { 0x02600005, 0x20000c20, 0x02000150, 0x00002000 }, + { 0x00000006, 0x21480c21, 0x00000148, 0x00200000 }, + { 0x00200009, 0x21445529, 0x0000015c, 0x00450020 }, + { 0x00200001, 0x41440231, 0x00450154, 0x00000000 }, + { 0x00310001, 0x21440229, 0x02450154, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x0000000c }, + { 0x00800041, 0x24002628, 0x00000155, 0x00000044 }, + { 0x00800040, 0x24004508, 0x008d0400, 0x00000154 }, + { 0x00000009, 0x20a82d02, 0x00000404, 0x00060006 }, + { 0x00802001, 0x20c00022, 0x008d0140, 0x00000000 }, + { 0x00802001, 0x21400061, 0x00000000, 0x00000000 }, + { 0x05800031, 0x20001d0c, 0x508d0000, 0x06080300 }, + { 0x02600005, 0x20000c20, 0x02000190, 0x00002000 }, + { 0x00000006, 0x21880c21, 0x00000188, 0x00200000 }, + { 0x00200009, 0x21845529, 0x0000019c, 0x00450020 }, + { 0x00200001, 0x41840231, 0x00450194, 0x00000000 }, + { 0x00310001, 0x21840229, 0x02450194, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x0000000c }, + { 0x00800041, 0x24002628, 0x00000195, 0x00000044 }, + { 0x00800040, 0x24004508, 0x008d0400, 0x00000194 }, + { 0x00000009, 0x20a82d02, 0x00000404, 0x00060006 }, + { 0x00802001, 0x20c00022, 0x008d0180, 0x00000000 }, + { 0x00802001, 0x21800061, 0x00000000, 0x00000000 }, + { 0x05800031, 0x20001d0c, 0x508d0000, 0x06080300 }, + { 0x02600005, 0x20000c20, 0x020001d0, 0x00002000 }, + { 0x00000006, 0x21c80c21, 0x000001c8, 0x00200000 }, + { 0x00200009, 0x21c45529, 0x000001dc, 0x00450020 }, + { 0x00200001, 0x41c40231, 0x004501d4, 0x00000000 }, + { 0x00310001, 0x21c40229, 0x024501d4, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x0000000c }, + { 0x00800041, 0x24002628, 0x000001d5, 0x00000044 }, + { 0x00800040, 0x24004508, 0x008d0400, 0x000001d4 }, + { 0x00000009, 0x20a82d02, 0x00000404, 0x00060006 }, + { 0x00802001, 0x20c00022, 0x008d01c0, 0x00000000 }, + { 0x00802001, 0x21c00061, 0x00000000, 0x00000000 }, + { 0x05800031, 0x20001d0c, 0x508d0000, 0x06080300 }, + { 0x02600005, 0x20000c20, 0x02000210, 0x00002000 }, + { 0x00000006, 0x22080c21, 0x00000208, 0x00200000 }, + { 0x00200009, 0x22045529, 0x0000021c, 0x00450020 }, + { 0x00200001, 0x42040231, 0x00450214, 0x00000000 }, + { 0x00310001, 0x22040229, 0x02450214, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x0000000c }, + { 0x00800041, 0x24002628, 0x00000215, 0x00000044 }, + { 0x00800040, 0x24004508, 0x008d0400, 0x00000214 }, + { 0x00000009, 0x20a82d02, 0x00000404, 0x00060006 }, + { 0x00802001, 0x20c00022, 0x008d0200, 0x00000000 }, + { 0x00802001, 0x22000061, 0x00000000, 0x00000000 }, + { 0x05800031, 0x20001d0c, 0x508d0000, 0x06080300 }, + { 0x02600005, 0x20000c20, 0x02000250, 0x00002000 }, + { 0x00000006, 0x22480c21, 0x00000248, 0x00200000 }, + { 0x00200009, 0x22445529, 0x0000025c, 0x00450020 }, + { 0x00200001, 0x42440231, 0x00450254, 0x00000000 }, + { 0x00310001, 0x22440229, 0x02450254, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x0000000c }, + { 0x00800041, 0x24002628, 0x00000255, 0x00000044 }, + { 0x00800040, 0x24004508, 0x008d0400, 0x00000254 }, + { 0x00000009, 0x20a82d02, 0x00000404, 0x00060006 }, + { 0x00802001, 0x20c00022, 0x008d0240, 0x00000000 }, + { 0x00802001, 0x22400061, 0x00000000, 0x00000000 }, + { 0x05800031, 0x20001d0c, 0x508d0000, 0x06080300 }, + { 0x01000040, 0x20423dad, 0x00000042, 0xfff8fff8 }, + { 0x00600001, 0x21600022, 0x008d07e0, 0x00000000 }, + { 0x00802001, 0x21800022, 0x008d0080, 0x00000000 }, + { 0x00802001, 0x21c00022, 0x008d00c0, 0x00000000 }, + { 0x0b800031, 0x20001d0c, 0x508d0000, 0x0a080400 }, + { 0x00600001, 0x20200022, 0x008d07e0, 0x00000000 }, + { 0x00000040, 0x20280c22, 0x000007e8, 0x00000080 }, + { 0x00802001, 0x20400022, 0x008d0100, 0x00000000 }, + { 0x00802001, 0x20800022, 0x008d0140, 0x00000000 }, + { 0x01800031, 0x20001d0c, 0x508d0000, 0x0a080400 }, + { 0x00000040, 0x21680c22, 0x000007e8, 0x00000100 }, + { 0x00802001, 0x21800022, 0x008d0180, 0x00000000 }, + { 0x00802001, 0x21c00022, 0x008d01c0, 0x00000000 }, + { 0x0b800031, 0x20001d0c, 0x508d0000, 0x0a080400 }, + { 0x00000040, 0x20280c22, 0x000007e8, 0x00000180 }, + { 0x00802001, 0x20400022, 0x008d0200, 0x00000000 }, + { 0x00802001, 0x20800022, 0x008d0240, 0x00000000 }, + { 0x01800031, 0x20001d0c, 0x508d0000, 0x0a080400 }, + { 0x00000040, 0x27e80c21, 0x000007e8, 0x00000200 }, + { 0x01000010, 0x20002da0, 0x02000060, 0x00000000 }, + { 0x00110220, 0x34001c00, 0x00001400, 0xffffff00 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x00000040 }, + { 0x00600001, 0x20200022, 0x008d07e0, 0x00000000 }, + { 0x01800031, 0x20801d09, 0x408d0000, 0x02488400 }, + { 0x00600001, 0x20400022, 0x008d07e0, 0x00000000 }, + { 0x00000040, 0x20480c22, 0x000007e8, 0x00000080 }, + { 0x02800031, 0x21001d09, 0x408d0000, 0x02488400 }, + { 0x00600001, 0x20600022, 0x008d07e0, 0x00000000 }, + { 0x00000040, 0x20680c22, 0x000007e8, 0x00000100 }, + { 0x03800031, 0x21801d09, 0x408d0000, 0x02488400 }, + { 0x00600001, 0x20800022, 0x008d07e0, 0x00000000 }, + { 0x00000040, 0x20880c22, 0x000007e8, 0x00000180 }, + { 0x04800031, 0x22001d09, 0x408d0000, 0x02488400 }, + { 0x00000001, 0x220400e0, 0x00000000, 0x00a00080 }, + { 0x00600001, 0x20a00022, 0x008d0000, 0x00000000 }, + { 0x02600005, 0x20000c20, 0x02008810, 0x00002000 }, + { 0x01000040, 0x20603dad, 0x00000060, 0xffffffff }, + { 0x00000006, 0xa8080c21, 0x00008808, 0x00200000 }, + { 0x00200009, 0xa8045529, 0x0000881c, 0x00450020 }, + { 0x00200001, 0xc8040231, 0x00458814, 0x00000000 }, + { 0x00310001, 0xa8040229, 0x02458814, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x0000000c }, + { 0x00800041, 0x24002628, 0x00008815, 0x00000044 }, + { 0x00800040, 0x24004508, 0x008d0400, 0x00008814 }, + { 0x00000009, 0x20a82d02, 0x00000404, 0x00060006 }, + { 0x00802001, 0x20c00022, 0x008d8800, 0x00000000 }, + { 0x00802001, 0xa8000061, 0x00000000, 0x00000000 }, + { 0x05800031, 0x20001d0c, 0x508d0000, 0x06080300 }, + { 0x00600001, 0x21600022, 0x008d07e0, 0x00000000 }, + { 0x00802001, 0x21800022, 0x008d8800, 0x00000000 }, + { 0x0b800031, 0x20001d0c, 0x508d0000, 0x06080300 }, + { 0x00000040, 0x27e80c21, 0x000007e8, 0x00000040 }, + { 0x00000040, 0x22040c00, 0x00000204, 0x00400040 }, + { 0x00110220, 0x34001c00, 0x00001400, 0xffffffda }, + { 0x01600031, 0x20001c20, 0x708d0000, 0x82000010 }, + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x01000005, 0x20602d29, 0x02000042, 0x00070007 }, + { 0x01000005, 0x20422d29, 0x00000042, 0xfff8fff8 }, + { 0x00600001, 0x27e00021, 0x008d0000, 0x00000000 }, + { 0x00000009, 0x27e82d21, 0x00000040, 0x00060006 }, + { 0x00600001, 0x20a00022, 0x008d0000, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000260 }, + { 0x00600001, 0x20200022, 0x008d07e0, 0x00000000 }, + { 0x01800031, 0x20801d09, 0x408d0000, 0x02488400 }, + { 0x00600001, 0x20400022, 0x008d07e0, 0x00000000 }, + { 0x00000040, 0x20480c22, 0x000007e8, 0x00000080 }, + { 0x02800031, 0x21001d09, 0x408d0000, 0x02488400 }, + { 0x00600001, 0x20600022, 0x008d07e0, 0x00000000 }, + { 0x00000040, 0x20680c22, 0x000007e8, 0x00000100 }, + { 0x03800031, 0x21801d09, 0x408d0000, 0x02488400 }, + { 0x00600001, 0x20800022, 0x008d07e0, 0x00000000 }, + { 0x00000040, 0x20880c22, 0x000007e8, 0x00000180 }, + { 0x04800031, 0x22001d09, 0x408d0000, 0x02488400 }, + { 0x00200001, 0x20640229, 0x00450094, 0x00000000 }, + { 0x02600005, 0x20000c20, 0x02000090, 0x01000000 }, + { 0x02600005, 0x20000c20, 0x00000090, 0x00004000 }, + { 0x00600041, 0x24003e2c, 0x00000095, 0x00020002 }, + { 0x00110001, 0x2066018d, 0x02000400, 0x00000000 }, + { 0x00010040, 0x20663d8d, 0x02000400, 0x00010001 }, + { 0x00110001, 0x2066022d, 0x00000095, 0x00000000 }, + { 0x02600005, 0x20000c20, 0x00000090, 0x00002000 }, + { 0x02600005, 0x20001d20, 0x02000066, 0x00000001 }, + { 0x00000006, 0x20881c21, 0x00000088, 0x00200000 }, + { 0x00200001, 0x20840129, 0x00450064, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x0000000e }, + { 0x00800041, 0x24002528, 0x00000066, 0x00000044 }, + { 0x00800040, 0x24002508, 0x008d0400, 0x00000064 }, + { 0x00000009, 0x20a82d02, 0x00000404, 0x00060006 }, + { 0x00802001, 0x20c00022, 0x008d0080, 0x00000000 }, + { 0x00802001, 0x20800061, 0x00000000, 0x00000000 }, + { 0x05800031, 0x20001d0c, 0x508d0000, 0x06080300 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x0000001e }, + { 0x02600005, 0x20000c20, 0x00000090, 0x00004000 }, + { 0x00210002, 0x20700421, 0x02450038, 0x00450030 }, + { 0x00000001, 0x20680129, 0x0000009c, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x0000000e }, + { 0x02600005, 0x20001d20, 0x0000009c, 0x00000010 }, + { 0x00210002, 0x20700421, 0x02450028, 0x00450020 }, + { 0x01600005, 0x20001d20, 0x0200009c, 0x00000001 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000006 }, + { 0x02610005, 0x20001c20, 0x02000090, 0x00008000 }, + { 0x02610005, 0x20001d20, 0x0200009c, 0x00000010 }, + { 0x00010006, 0x20681d29, 0x0200009c, 0x00000010 }, + { 0x02800005, 0x2000452c, 0x02000068, 0x000d0070 }, + { 0x00000009, 0x20843d09, 0x00000602, 0x000c000c }, + { 0x00000005, 0x20862d09, 0x00000602, 0xf000f000 }, + { 0x00200001, 0x40840231, 0x00660064, 0x00000000 }, + { 0x00200001, 0x20640229, 0x004500d4, 0x00000000 }, + { 0x02600005, 0x20000c20, 0x020000d0, 0x01000000 }, + { 0x02600005, 0x20000c20, 0x000000d0, 0x00004000 }, + { 0x00600041, 0x24003e2c, 0x000000d5, 0x00020002 }, + { 0x00110001, 0x2066018d, 0x02000400, 0x00000000 }, + { 0x00010040, 0x20663d8d, 0x02000400, 0x00010001 }, + { 0x00110001, 0x2066022d, 0x000000d5, 0x00000000 }, + { 0x02600005, 0x20000c20, 0x000000d0, 0x00002000 }, + { 0x02600005, 0x20001d20, 0x02000066, 0x00000001 }, + { 0x00000006, 0x20c81c21, 0x000000c8, 0x00200000 }, + { 0x00200001, 0x20c40129, 0x00450064, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x0000000e }, + { 0x00800041, 0x24002528, 0x00000066, 0x00000044 }, + { 0x00800040, 0x24002508, 0x008d0400, 0x00000064 }, + { 0x00000009, 0x20a82d02, 0x00000404, 0x00060006 }, + { 0x00802001, 0x20c00022, 0x008d00c0, 0x00000000 }, + { 0x00802001, 0x20c00061, 0x00000000, 0x00000000 }, + { 0x05800031, 0x20001d0c, 0x508d0000, 0x06080300 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x0000001e }, + { 0x02600005, 0x20000c20, 0x000000d0, 0x00004000 }, + { 0x00210002, 0x20700421, 0x02450038, 0x00450030 }, + { 0x00000001, 0x20680129, 0x000000dc, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x0000000e }, + { 0x02600005, 0x20001d20, 0x000000dc, 0x00000010 }, + { 0x00210002, 0x20700421, 0x02450028, 0x00450020 }, + { 0x01600005, 0x20001d20, 0x020000dc, 0x00000001 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000006 }, + { 0x02610005, 0x20001c20, 0x020000d0, 0x00008000 }, + { 0x02610005, 0x20001d20, 0x020000dc, 0x00000010 }, + { 0x00010006, 0x20681d29, 0x020000dc, 0x00000010 }, + { 0x02800005, 0x2000452c, 0x02000068, 0x000d0070 }, + { 0x00000009, 0x20c43d09, 0x00000602, 0x000c000c }, + { 0x00000005, 0x20c62d09, 0x00000602, 0xf000f000 }, + { 0x00200001, 0x40c40231, 0x00660064, 0x00000000 }, + { 0x00200001, 0x20640229, 0x00450114, 0x00000000 }, + { 0x02600005, 0x20000c20, 0x02000110, 0x01000000 }, + { 0x02600005, 0x20000c20, 0x00000110, 0x00004000 }, + { 0x00600041, 0x24003e2c, 0x00000115, 0x00020002 }, + { 0x00110001, 0x2066018d, 0x02000400, 0x00000000 }, + { 0x00010040, 0x20663d8d, 0x02000400, 0x00010001 }, + { 0x00110001, 0x2066022d, 0x00000115, 0x00000000 }, + { 0x02600005, 0x20000c20, 0x00000110, 0x00002000 }, + { 0x02600005, 0x20001d20, 0x02000066, 0x00000001 }, + { 0x00000006, 0x21081c21, 0x00000108, 0x00200000 }, + { 0x00200001, 0x21040129, 0x00450064, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x0000000e }, + { 0x00800041, 0x24002528, 0x00000066, 0x00000044 }, + { 0x00800040, 0x24002508, 0x008d0400, 0x00000064 }, + { 0x00000009, 0x20a82d02, 0x00000404, 0x00060006 }, + { 0x00802001, 0x20c00022, 0x008d0100, 0x00000000 }, + { 0x00802001, 0x21000061, 0x00000000, 0x00000000 }, + { 0x05800031, 0x20001d0c, 0x508d0000, 0x06080300 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x0000001e }, + { 0x02600005, 0x20000c20, 0x00000110, 0x00004000 }, + { 0x00210002, 0x20700421, 0x02450038, 0x00450030 }, + { 0x00000001, 0x20680129, 0x0000011c, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x0000000e }, + { 0x02600005, 0x20001d20, 0x0000011c, 0x00000010 }, + { 0x00210002, 0x20700421, 0x02450028, 0x00450020 }, + { 0x01600005, 0x20001d20, 0x0200011c, 0x00000001 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000006 }, + { 0x02610005, 0x20001c20, 0x02000110, 0x00008000 }, + { 0x02610005, 0x20001d20, 0x0200011c, 0x00000010 }, + { 0x00010006, 0x20681d29, 0x0200011c, 0x00000010 }, + { 0x02800005, 0x2000452c, 0x02000068, 0x000d0070 }, + { 0x00000009, 0x21043d09, 0x00000602, 0x000c000c }, + { 0x00000005, 0x21062d09, 0x00000602, 0xf000f000 }, + { 0x00200001, 0x41040231, 0x00660064, 0x00000000 }, + { 0x00200001, 0x20640229, 0x00450154, 0x00000000 }, + { 0x02600005, 0x20000c20, 0x02000150, 0x01000000 }, + { 0x02600005, 0x20000c20, 0x00000150, 0x00004000 }, + { 0x00600041, 0x24003e2c, 0x00000155, 0x00020002 }, + { 0x00110001, 0x2066018d, 0x02000400, 0x00000000 }, + { 0x00010040, 0x20663d8d, 0x02000400, 0x00010001 }, + { 0x00110001, 0x2066022d, 0x00000155, 0x00000000 }, + { 0x02600005, 0x20000c20, 0x00000150, 0x00002000 }, + { 0x02600005, 0x20001d20, 0x02000066, 0x00000001 }, + { 0x00000006, 0x21481c21, 0x00000148, 0x00200000 }, + { 0x00200001, 0x21440129, 0x00450064, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x0000000e }, + { 0x00800041, 0x24002528, 0x00000066, 0x00000044 }, + { 0x00800040, 0x24002508, 0x008d0400, 0x00000064 }, + { 0x00000009, 0x20a82d02, 0x00000404, 0x00060006 }, + { 0x00802001, 0x20c00022, 0x008d0140, 0x00000000 }, + { 0x00802001, 0x21400061, 0x00000000, 0x00000000 }, + { 0x05800031, 0x20001d0c, 0x508d0000, 0x06080300 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x0000001e }, + { 0x02600005, 0x20000c20, 0x00000150, 0x00004000 }, + { 0x00210002, 0x20700421, 0x02450038, 0x00450030 }, + { 0x00000001, 0x20680129, 0x0000015c, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x0000000e }, + { 0x02600005, 0x20001d20, 0x0000015c, 0x00000010 }, + { 0x00210002, 0x20700421, 0x02450028, 0x00450020 }, + { 0x01600005, 0x20001d20, 0x0200015c, 0x00000001 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000006 }, + { 0x02610005, 0x20001c20, 0x02000150, 0x00008000 }, + { 0x02610005, 0x20001d20, 0x0200015c, 0x00000010 }, + { 0x00010006, 0x20681d29, 0x0200015c, 0x00000010 }, + { 0x02800005, 0x2000452c, 0x02000068, 0x000d0070 }, + { 0x00000009, 0x21443d09, 0x00000602, 0x000c000c }, + { 0x00000005, 0x21462d09, 0x00000602, 0xf000f000 }, + { 0x00200001, 0x41440231, 0x00660064, 0x00000000 }, + { 0x00200001, 0x20640229, 0x00450194, 0x00000000 }, + { 0x02600005, 0x20000c20, 0x02000190, 0x01000000 }, + { 0x02600005, 0x20000c20, 0x00000190, 0x00004000 }, + { 0x00600041, 0x24003e2c, 0x00000195, 0x00020002 }, + { 0x00110001, 0x2066018d, 0x02000400, 0x00000000 }, + { 0x00010040, 0x20663d8d, 0x02000400, 0x00010001 }, + { 0x00110001, 0x2066022d, 0x00000195, 0x00000000 }, + { 0x02600005, 0x20000c20, 0x00000190, 0x00002000 }, + { 0x02600005, 0x20001d20, 0x02000066, 0x00000001 }, + { 0x00000006, 0x21881c21, 0x00000188, 0x00200000 }, + { 0x00200001, 0x21840129, 0x00450064, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x0000000e }, + { 0x00800041, 0x24002528, 0x00000066, 0x00000044 }, + { 0x00800040, 0x24002508, 0x008d0400, 0x00000064 }, + { 0x00000009, 0x20a82d02, 0x00000404, 0x00060006 }, + { 0x00802001, 0x20c00022, 0x008d0180, 0x00000000 }, + { 0x00802001, 0x21800061, 0x00000000, 0x00000000 }, + { 0x05800031, 0x20001d0c, 0x508d0000, 0x06080300 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x0000001e }, + { 0x02600005, 0x20000c20, 0x00000190, 0x00004000 }, + { 0x00210002, 0x20700421, 0x02450038, 0x00450030 }, + { 0x00000001, 0x20680129, 0x0000019c, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x0000000e }, + { 0x02600005, 0x20001d20, 0x0000019c, 0x00000010 }, + { 0x00210002, 0x20700421, 0x02450028, 0x00450020 }, + { 0x01600005, 0x20001d20, 0x0200019c, 0x00000001 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000006 }, + { 0x02610005, 0x20001c20, 0x02000190, 0x00008000 }, + { 0x02610005, 0x20001d20, 0x0200019c, 0x00000010 }, + { 0x00010006, 0x20681d29, 0x0200019c, 0x00000010 }, + { 0x02800005, 0x2000452c, 0x02000068, 0x000d0070 }, + { 0x00000009, 0x21843d09, 0x00000602, 0x000c000c }, + { 0x00000005, 0x21862d09, 0x00000602, 0xf000f000 }, + { 0x00200001, 0x41840231, 0x00660064, 0x00000000 }, + { 0x00200001, 0x20640229, 0x004501d4, 0x00000000 }, + { 0x02600005, 0x20000c20, 0x020001d0, 0x01000000 }, + { 0x02600005, 0x20000c20, 0x000001d0, 0x00004000 }, + { 0x00600041, 0x24003e2c, 0x000001d5, 0x00020002 }, + { 0x00110001, 0x2066018d, 0x02000400, 0x00000000 }, + { 0x00010040, 0x20663d8d, 0x02000400, 0x00010001 }, + { 0x00110001, 0x2066022d, 0x000001d5, 0x00000000 }, + { 0x02600005, 0x20000c20, 0x000001d0, 0x00002000 }, + { 0x02600005, 0x20001d20, 0x02000066, 0x00000001 }, + { 0x00000006, 0x21c81c21, 0x000001c8, 0x00200000 }, + { 0x00200001, 0x21c40129, 0x00450064, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x0000000e }, + { 0x00800041, 0x24002528, 0x00000066, 0x00000044 }, + { 0x00800040, 0x24002508, 0x008d0400, 0x00000064 }, + { 0x00000009, 0x20a82d02, 0x00000404, 0x00060006 }, + { 0x00802001, 0x20c00022, 0x008d01c0, 0x00000000 }, + { 0x00802001, 0x21c00061, 0x00000000, 0x00000000 }, + { 0x05800031, 0x20001d0c, 0x508d0000, 0x06080300 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x0000001e }, + { 0x02600005, 0x20000c20, 0x000001d0, 0x00004000 }, + { 0x00210002, 0x20700421, 0x02450038, 0x00450030 }, + { 0x00000001, 0x20680129, 0x000001dc, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x0000000e }, + { 0x02600005, 0x20001d20, 0x000001dc, 0x00000010 }, + { 0x00210002, 0x20700421, 0x02450028, 0x00450020 }, + { 0x01600005, 0x20001d20, 0x020001dc, 0x00000001 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000006 }, + { 0x02610005, 0x20001c20, 0x020001d0, 0x00008000 }, + { 0x02610005, 0x20001d20, 0x020001dc, 0x00000010 }, + { 0x00010006, 0x20681d29, 0x020001dc, 0x00000010 }, + { 0x02800005, 0x2000452c, 0x02000068, 0x000d0070 }, + { 0x00000009, 0x21c43d09, 0x00000602, 0x000c000c }, + { 0x00000005, 0x21c62d09, 0x00000602, 0xf000f000 }, + { 0x00200001, 0x41c40231, 0x00660064, 0x00000000 }, + { 0x00200001, 0x20640229, 0x00450214, 0x00000000 }, + { 0x02600005, 0x20000c20, 0x02000210, 0x01000000 }, + { 0x02600005, 0x20000c20, 0x00000210, 0x00004000 }, + { 0x00600041, 0x24003e2c, 0x00000215, 0x00020002 }, + { 0x00110001, 0x2066018d, 0x02000400, 0x00000000 }, + { 0x00010040, 0x20663d8d, 0x02000400, 0x00010001 }, + { 0x00110001, 0x2066022d, 0x00000215, 0x00000000 }, + { 0x02600005, 0x20000c20, 0x00000210, 0x00002000 }, + { 0x02600005, 0x20001d20, 0x02000066, 0x00000001 }, + { 0x00000006, 0x22081c21, 0x00000208, 0x00200000 }, + { 0x00200001, 0x22040129, 0x00450064, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x0000000e }, + { 0x00800041, 0x24002528, 0x00000066, 0x00000044 }, + { 0x00800040, 0x24002508, 0x008d0400, 0x00000064 }, + { 0x00000009, 0x20a82d02, 0x00000404, 0x00060006 }, + { 0x00802001, 0x20c00022, 0x008d0200, 0x00000000 }, + { 0x00802001, 0x22000061, 0x00000000, 0x00000000 }, + { 0x05800031, 0x20001d0c, 0x508d0000, 0x06080300 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x0000001e }, + { 0x02600005, 0x20000c20, 0x00000210, 0x00004000 }, + { 0x00210002, 0x20700421, 0x02450038, 0x00450030 }, + { 0x00000001, 0x20680129, 0x0000021c, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x0000000e }, + { 0x02600005, 0x20001d20, 0x0000021c, 0x00000010 }, + { 0x00210002, 0x20700421, 0x02450028, 0x00450020 }, + { 0x01600005, 0x20001d20, 0x0200021c, 0x00000001 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000006 }, + { 0x02610005, 0x20001c20, 0x02000210, 0x00008000 }, + { 0x02610005, 0x20001d20, 0x0200021c, 0x00000010 }, + { 0x00010006, 0x20681d29, 0x0200021c, 0x00000010 }, + { 0x02800005, 0x2000452c, 0x02000068, 0x000d0070 }, + { 0x00000009, 0x22043d09, 0x00000602, 0x000c000c }, + { 0x00000005, 0x22062d09, 0x00000602, 0xf000f000 }, + { 0x00200001, 0x42040231, 0x00660064, 0x00000000 }, + { 0x00200001, 0x20640229, 0x00450254, 0x00000000 }, + { 0x02600005, 0x20000c20, 0x02000250, 0x01000000 }, + { 0x02600005, 0x20000c20, 0x00000250, 0x00004000 }, + { 0x00600041, 0x24003e2c, 0x00000255, 0x00020002 }, + { 0x00110001, 0x2066018d, 0x02000400, 0x00000000 }, + { 0x00010040, 0x20663d8d, 0x02000400, 0x00010001 }, + { 0x00110001, 0x2066022d, 0x00000255, 0x00000000 }, + { 0x02600005, 0x20000c20, 0x00000250, 0x00002000 }, + { 0x02600005, 0x20001d20, 0x02000066, 0x00000001 }, + { 0x00000006, 0x22481c21, 0x00000248, 0x00200000 }, + { 0x00200001, 0x22440129, 0x00450064, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x0000000e }, + { 0x00800041, 0x24002528, 0x00000066, 0x00000044 }, + { 0x00800040, 0x24002508, 0x008d0400, 0x00000064 }, + { 0x00000009, 0x20a82d02, 0x00000404, 0x00060006 }, + { 0x00802001, 0x20c00022, 0x008d0240, 0x00000000 }, + { 0x00802001, 0x22400061, 0x00000000, 0x00000000 }, + { 0x05800031, 0x20001d0c, 0x508d0000, 0x06080300 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x0000001e }, + { 0x02600005, 0x20000c20, 0x00000250, 0x00004000 }, + { 0x00210002, 0x20700421, 0x02450038, 0x00450030 }, + { 0x00000001, 0x20680129, 0x0000025c, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x0000000e }, + { 0x02600005, 0x20001d20, 0x0000025c, 0x00000010 }, + { 0x00210002, 0x20700421, 0x02450028, 0x00450020 }, + { 0x01600005, 0x20001d20, 0x0200025c, 0x00000001 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000006 }, + { 0x02610005, 0x20001c20, 0x02000250, 0x00008000 }, + { 0x02610005, 0x20001d20, 0x0200025c, 0x00000010 }, + { 0x00010006, 0x20681d29, 0x0200025c, 0x00000010 }, + { 0x02800005, 0x2000452c, 0x02000068, 0x000d0070 }, + { 0x00000009, 0x22443d09, 0x00000602, 0x000c000c }, + { 0x00000005, 0x22462d09, 0x00000602, 0xf000f000 }, + { 0x00200001, 0x42440231, 0x00660064, 0x00000000 }, + { 0x01000040, 0x20423dad, 0x00000042, 0xfff8fff8 }, + { 0x00600001, 0x21600022, 0x008d07e0, 0x00000000 }, + { 0x00802001, 0x21800022, 0x008d0080, 0x00000000 }, + { 0x00802001, 0x21c00022, 0x008d00c0, 0x00000000 }, + { 0x0b800031, 0x20001d0c, 0x508d0000, 0x0a080400 }, + { 0x00600001, 0x20200022, 0x008d07e0, 0x00000000 }, + { 0x00000040, 0x20280c22, 0x000007e8, 0x00000080 }, + { 0x00802001, 0x20400022, 0x008d0100, 0x00000000 }, + { 0x00802001, 0x20800022, 0x008d0140, 0x00000000 }, + { 0x01800031, 0x20001d0c, 0x508d0000, 0x0a080400 }, + { 0x00000040, 0x21680c22, 0x000007e8, 0x00000100 }, + { 0x00802001, 0x21800022, 0x008d0180, 0x00000000 }, + { 0x00802001, 0x21c00022, 0x008d01c0, 0x00000000 }, + { 0x0b800031, 0x20001d0c, 0x508d0000, 0x0a080400 }, + { 0x00000040, 0x20280c22, 0x000007e8, 0x00000180 }, + { 0x00802001, 0x20400022, 0x008d0200, 0x00000000 }, + { 0x00802001, 0x20800022, 0x008d0240, 0x00000000 }, + { 0x01800031, 0x20001d0c, 0x508d0000, 0x0a080400 }, + { 0x00000040, 0x27e80c21, 0x000007e8, 0x00000200 }, + { 0x01000010, 0x20002da0, 0x02000060, 0x00000000 }, + { 0x00110220, 0x34001c00, 0x00001400, 0xfffffda0 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x0000006e }, + { 0x00600001, 0x20200022, 0x008d07e0, 0x00000000 }, + { 0x01800031, 0x20801d09, 0x408d0000, 0x02488400 }, + { 0x00600001, 0x20400022, 0x008d07e0, 0x00000000 }, + { 0x00000040, 0x20480c22, 0x000007e8, 0x00000080 }, + { 0x02800031, 0x21001d09, 0x408d0000, 0x02488400 }, + { 0x00600001, 0x20600022, 0x008d07e0, 0x00000000 }, + { 0x00000040, 0x20680c22, 0x000007e8, 0x00000100 }, + { 0x03800031, 0x21801d09, 0x408d0000, 0x02488400 }, + { 0x00600001, 0x20800022, 0x008d07e0, 0x00000000 }, + { 0x00000040, 0x20880c22, 0x000007e8, 0x00000180 }, + { 0x04800031, 0x22001d09, 0x408d0000, 0x02488400 }, + { 0x00000001, 0x220400e0, 0x00000000, 0x00a00080 }, + { 0x00600001, 0x20a00022, 0x008d0000, 0x00000000 }, + { 0x00200001, 0x20640229, 0x00458814, 0x00000000 }, + { 0x02600005, 0x20000c20, 0x02008810, 0x01000000 }, + { 0x02600005, 0x20000c20, 0x00008810, 0x00004000 }, + { 0x00600041, 0x24003e2c, 0x00008815, 0x00020002 }, + { 0x00110001, 0x2066018d, 0x02000400, 0x00000000 }, + { 0x00010040, 0x20663d8d, 0x02000400, 0x00010001 }, + { 0x00110001, 0x2066022d, 0x00008815, 0x00000000 }, + { 0x02600005, 0x20000c20, 0x00008810, 0x00002000 }, + { 0x01000040, 0x20603dad, 0x02000060, 0xffffffff }, + { 0x00000006, 0xa8080c21, 0x00008808, 0x00200000 }, + { 0x00200001, 0xa8040129, 0x00450064, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x0000000e }, + { 0x00800041, 0x24002528, 0x00000066, 0x00000044 }, + { 0x00800040, 0x24002508, 0x008d0400, 0x00000064 }, + { 0x00000009, 0x20a82d02, 0x00000404, 0x00060006 }, + { 0x00802001, 0x20c00022, 0x008d8800, 0x00000000 }, + { 0x00802001, 0xa8000061, 0x00000000, 0x00000000 }, + { 0x05800031, 0x20001d0c, 0x508d0000, 0x06080300 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000022 }, + { 0x02600005, 0x20000d20, 0x02000066, 0x00000001 }, + { 0x02600005, 0x20000c20, 0x00008810, 0x00004000 }, + { 0x00000001, 0x20680129, 0x0000881c, 0x00000000 }, + { 0x00210002, 0x20700421, 0x02450038, 0x00450030 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x0000000e }, + { 0x02600005, 0x20001d20, 0x0000881c, 0x00000010 }, + { 0x00210002, 0x20700421, 0x02450028, 0x00450020 }, + { 0x01600005, 0x20001d20, 0x0200881c, 0x00000001 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000006 }, + { 0x02610005, 0x20001c20, 0x02008810, 0x00008000 }, + { 0x02610005, 0x20001d20, 0x0200881c, 0x00000010 }, + { 0x00010006, 0x20681d29, 0x0200881c, 0x00000010 }, + { 0x02800005, 0x2000452c, 0x00000068, 0x000d0070 }, + { 0x01000040, 0x20603dad, 0x02000060, 0x00000000 }, + { 0x00000009, 0xa8043d09, 0x00000600, 0x000c000c }, + { 0x00000005, 0xa8062d09, 0x00000600, 0xf000f000 }, + { 0x00200001, 0xc8040231, 0x00660064, 0x00000000 }, + { 0x00600001, 0x21600022, 0x008d07e0, 0x00000000 }, + { 0x00802001, 0x21800022, 0x008d8800, 0x00000000 }, + { 0x0b800031, 0x20001d0c, 0x508d0000, 0x06080300 }, + { 0x00000040, 0x27e80c21, 0x000007e8, 0x00000040 }, + { 0x00000040, 0x22040c00, 0x00000204, 0x00400040 }, + { 0x00110220, 0x34001c00, 0x02001400, 0xffffffac }, + { 0x01600031, 0x20001c20, 0x708d0000, 0x82000010 }, + { 0x01600031, 0x20001c20, 0x708d0000, 0x82000010 }, + { 0x01600031, 0x20001c20, 0x708d0000, 0x82000010 }, + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x00600001, 0x27e00021, 0x008d0000, 0x00000000 }, + { 0x00a02001, 0x20400169, 0x00000000, 0x00000000 }, + { 0x00000001, 0x206601ed, 0x00000000, 0x00030003 }, + { 0x00000009, 0x20663dad, 0x00000066, 0x000a000a }, + { 0x00000008, 0x22403dad, 0x00000026, 0x00010001 }, + { 0x00000041, 0x224235ad, 0x00000020, 0x00000022 }, + { 0x00600001, 0x20200022, 0x008d0000, 0x00000000 }, + { 0x00000001, 0x203c0022, 0x00000018, 0x00000000 }, + { 0x00000001, 0x203f01f2, 0x00000000, 0x00000000 }, + { 0x00000001, 0x202c00e2, 0x00000000, 0x00000000 }, + { 0x00000001, 0x202c010a, 0x00000e00, 0x00000000 }, + { 0x00600001, 0x20400021, 0x008d0020, 0x00000000 }, + { 0x00400001, 0x205401ed, 0x00000000, 0x00000000 }, + { 0x00200040, 0x20583dad, 0x00450020, 0xffffffff }, + { 0x00000001, 0x22000060, 0x00000000, 0x06080000 }, + { 0x00600001, 0x26000021, 0x008d0000, 0x00000000 }, + { 0x00000001, 0x26140061, 0x00000000, 0x00c00400 }, + { 0x00000001, 0x26100169, 0x00000000, 0x12121212 }, + { 0x07600031, 0x26201c21, 0x308d0600, 0x02000000 }, + { 0x00000001, 0x22a00169, 0x00000000, 0x01400140 }, + { 0x00000040, 0x20283c22, 0x00000008, 0x00200020 }, + { 0x00000001, 0x203801e2, 0x00000000, 0x00010001 }, + { 0x00800001, 0x204001ae, 0x00b10020, 0x00000000 }, + { 0x00000008, 0x27e03d29, 0x000002a0, 0x00010001 }, + { 0x00800031, 0x20000128, 0x608d07e0, 0x00000200 }, + { 0x00000006, 0x203025a2, 0x00000066, 0x000002a0 }, + { 0x01600031, 0x20001c00, 0x708d0000, 0x02000001 }, + { 0x00000001, 0x20300022, 0x00000010, 0x00000000 }, + { 0x00000001, 0x22a00169, 0x00000000, 0x00000000 }, + { 0x00000001, 0x22600169, 0x00000000, 0x00020002 }, + { 0x00200401, 0x208000e5, 0x00000000, 0x00000000 }, + { 0x00000c01, 0x208800e5, 0x00000000, 0xffffffc6 }, + { 0x00000801, 0x208c00e5, 0x00000000, 0xffffffca }, + { 0x00200001, 0x260001ec, 0x00000000, 0x00000000 }, + { 0x00600001, 0x20000022, 0x008d07e0, 0x00000000 }, + { 0x00000040, 0x20283c22, 0x00000008, 0x00100010 }, + { 0x00000001, 0x206001ed, 0x00000000, 0x00020002 }, + { 0x00000001, 0x206201ad, 0x0000005a, 0x00000000 }, + { 0x00000001, 0x20a001ed, 0x00000000, 0x00000000 }, + { 0x00200001, 0x228001ed, 0x00000000, 0x00000000 }, + { 0x00802001, 0x20c00061, 0x00000000, 0x00ff00ff }, + { 0x00802001, 0x21000061, 0x00000000, 0x00ff00ff }, + { 0x00802001, 0x21400061, 0x00000000, 0x00ff00ff }, + { 0x00802001, 0x21800061, 0x00000000, 0x00ff00ff }, + { 0x00802001, 0x21c00061, 0x00000000, 0x00ff00ff }, + { 0x00000041, 0x22083dac, 0x00000056, 0x00040004 }, + { 0x05000010, 0x200035ac, 0x02000280, 0x00000240 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x00000004 }, + { 0x00000040, 0x22803dad, 0x00000280, 0xffffffff }, + { 0x00000030, 0x32000084, 0x00001200, 0x00000000 }, + { 0x01000010, 0x20002d28, 0x000090c2, 0x00000000 }, + { 0x03000010, 0x200035ac, 0x02000054, 0x00000058 }, + { 0x00000041, 0x22a03dad, 0x00000056, 0x00040004 }, + { 0x00010220, 0x34001c00, 0x00001400, 0xfffffff4 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x00000014 }, + { 0x00200001, 0xb0c00229, 0x00450054, 0x00000000 }, + { 0x00200040, 0x22803dad, 0x00450280, 0x00010001 }, + { 0x00000001, 0x20300022, 0x00000010, 0x00000000 }, + { 0x00000001, 0x20380122, 0x00000260, 0x00000000 }, + { 0x00800001, 0x204001ae, 0x00b10040, 0x00000000 }, + { 0x00000008, 0x20003d2a, 0x000002a0, 0x00010001 }, + { 0x00000040, 0x22602d29, 0x00000260, 0x00020002 }, + { 0x00800031, 0x20000008, 0x608d0000, 0x00000200 }, + { 0x00000006, 0x203025a2, 0x00000066, 0x000002a0 }, + { 0x01600031, 0x20001c00, 0x708d0000, 0x02000001 }, + { 0x04200010, 0x200035ac, 0x00450054, 0x00450060 }, + { 0x00010040, 0x20a03dad, 0x02000056, 0x00010001 }, + { 0x05200010, 0x200035ac, 0x02450280, 0x00450240 }, + { 0x00000001, 0x240001ec, 0x00000000, 0x00040004 }, + { 0x00000048, 0x22083dac, 0x00000056, 0x00040004 }, + { 0x00200040, 0x205455ad, 0x00450054, 0x00450034 }, + { 0x02000010, 0x20003d8c, 0x00000600, 0x00010001 }, + { 0x00000041, 0x220e3d8c, 0x00000602, 0x00040004 }, + { 0x00010041, 0x22083dac, 0x000000a0, 0x00040004 }, + { 0x00010401, 0x205601ad, 0x000000a0, 0x00000000 }, + { 0x00010840, 0x20543d2d, 0x000090c0, 0x00010001 }, + { 0x00000220, 0x34001400, 0x00001400, 0x00009c80 }, + { 0x01000010, 0x20003dac, 0x02000280, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x00000006 }, + { 0x00000030, 0x32000084, 0x00001200, 0x00000000 }, + { 0x00000040, 0x22803dad, 0x00000280, 0xffffffff }, + { 0x00000220, 0x34001c00, 0x00001400, 0xfffffff6 }, + { 0x05000010, 0x200035ac, 0x00000240, 0x00000026 }, + { 0x00010220, 0x34001c00, 0x00001400, 0xfffffffc }, + { 0x07600031, 0x20001c20, 0x30000000, 0x02000001 }, + { 0x01600031, 0x20001c24, 0x708d0000, 0x82000000 }, + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x00600001, 0x27e00021, 0x008d0000, 0x00000000 }, + { 0x00600009, 0x25c03dad, 0x00050034, 0x00040004 }, + { 0x00000001, 0x220801ec, 0x00000000, 0x02400240 }, + { 0x00000041, 0x20263d29, 0x00000036, 0x00040004 }, + { 0x00000041, 0x25e435a1, 0x00000020, 0x00000036 }, + { 0x00000040, 0x25e43421, 0x000005e4, 0x00000034 }, + { 0x00000041, 0x27e82c21, 0x000005e4, 0x00400040 }, + { 0x01600031, 0x22401c21, 0x408d07e0, 0x02885800 }, + { 0x01800005, 0x20002d28, 0x02b19040, 0xffffffff }, + { 0x02000005, 0x20003e2c, 0x00009030, 0x00010001 }, + { 0x00000040, 0x25c43dad, 0x000005c4, 0xfffcfffc }, + { 0x00000001, 0x25e20129, 0x00000036, 0x00000000 }, + { 0x000b0220, 0x34001c00, 0x02001400, 0x00000178 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000176 }, + { 0x00000040, 0x25ca3dad, 0x000005ca, 0xfffcfffc }, + { 0x00200401, 0x27e001a1, 0x004505c0, 0x00000000 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x000f000f }, + { 0x00000001, 0x22000060, 0x00000000, 0x0288a001 }, + { 0x01600031, 0x20c00021, 0x408d07e0, 0x00000200 }, + { 0x00200401, 0x27e001a1, 0x004505c8, 0x00000000 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x0003000f }, + { 0x00000001, 0x22000060, 0x00000000, 0x02286003 }, + { 0x03600031, 0x20800021, 0x408d07e0, 0x00000200 }, + { 0x00800401, 0x23800231, 0x00a900c0, 0x00000000 }, + { 0x00800801, 0x23900231, 0x00a90100, 0x00000000 }, + { 0x00800401, 0x23a00231, 0x00a90140, 0x00000000 }, + { 0x00800801, 0x23b00231, 0x00a90180, 0x00000000 }, + { 0x00800401, 0x23c00231, 0x00a900c4, 0x00000000 }, + { 0x00800801, 0x23d00231, 0x00a90104, 0x00000000 }, + { 0x00800401, 0x23e00231, 0x00a90144, 0x00000000 }, + { 0x00800801, 0x23f00231, 0x00a90184, 0x00000000 }, + { 0x00800401, 0x24000231, 0x00a900c8, 0x00000000 }, + { 0x00800801, 0x24100231, 0x00a90108, 0x00000000 }, + { 0x00800401, 0x24200231, 0x00a90148, 0x00000000 }, + { 0x00800801, 0x24300231, 0x00a90188, 0x00000000 }, + { 0x00800401, 0x24400231, 0x00a900cc, 0x00000000 }, + { 0x00800801, 0x24500231, 0x00a9010c, 0x00000000 }, + { 0x00800401, 0x24600231, 0x00a9014c, 0x00000000 }, + { 0x00800801, 0x24700231, 0x00a9018c, 0x00000000 }, + { 0x00800401, 0x20c00231, 0x00cf0380, 0x00000000 }, + { 0x00800801, 0x20d00231, 0x00cf0381, 0x00000000 }, + { 0x00800401, 0x20e00231, 0x00cf0382, 0x00000000 }, + { 0x00800801, 0x20f00231, 0x00cf0383, 0x00000000 }, + { 0x00800401, 0x21000231, 0x00cf03c0, 0x00000000 }, + { 0x00800801, 0x21100231, 0x00cf03c1, 0x00000000 }, + { 0x00800401, 0x21200231, 0x00cf03c2, 0x00000000 }, + { 0x00800801, 0x21300231, 0x00cf03c3, 0x00000000 }, + { 0x00800401, 0x21400231, 0x00cf0400, 0x00000000 }, + { 0x00800801, 0x21500231, 0x00cf0401, 0x00000000 }, + { 0x00800401, 0x21600231, 0x00cf0402, 0x00000000 }, + { 0x00800801, 0x21700231, 0x00cf0403, 0x00000000 }, + { 0x00800401, 0x21800231, 0x00cf0440, 0x00000000 }, + { 0x00800801, 0x21900231, 0x00cf0441, 0x00000000 }, + { 0x00800401, 0x21a00231, 0x00cf0442, 0x00000000 }, + { 0x00800801, 0x21b00231, 0x00cf0443, 0x00000000 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00400040 }, + { 0x00000008, 0x25e83e2d, 0x00009080, 0x00020002 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00400040 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x00c000c0 }, + { 0x00200401, 0x25d0022d, 0x00459080, 0x00000000 }, + { 0x00200c01, 0x25d80129, 0x00459050, 0x00000000 }, + { 0x00400801, 0x25d40231, 0x00699060, 0x00000000 }, + { 0x00000040, 0x25e83dad, 0x000005e8, 0x00020002 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x00000134 }, + { 0x00000008, 0x25e83e2d, 0x00009084, 0x00020002 }, + { 0x00200401, 0x25d0022d, 0x00459084, 0x00000000 }, + { 0x00000801, 0x25da01e9, 0x00000000, 0x00000000 }, + { 0x00000040, 0x25e83dad, 0x000005e8, 0x00020002 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00200020 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00c000c0 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x01000100 }, + { 0x00000401, 0x25d80129, 0x00009040, 0x00000000 }, + { 0x00400801, 0x25d40231, 0x00699064, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x0000011e }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00100010 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x01000100 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x01400140 }, + { 0x00000401, 0x25d80129, 0x00009042, 0x00000000 }, + { 0x00400801, 0x25d40231, 0x00699068, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x00000110 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00200020 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x01400140 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x01800180 }, + { 0x00000401, 0x25d80129, 0x00009044, 0x00000000 }, + { 0x00400801, 0x25d40231, 0x0069906c, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x00000102 }, + { 0x00200401, 0x27e001a1, 0x004505c4, 0x00000000 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x000f0003 }, + { 0x00800401, 0x23400231, 0x00a90040, 0x00000000 }, + { 0x00800801, 0x23500231, 0x00a90044, 0x00000000 }, + { 0x00800401, 0x23600231, 0x00a90048, 0x00000000 }, + { 0x00800801, 0x23700231, 0x00a9004c, 0x00000000 }, + { 0x00800001, 0x20400232, 0x002b0340, 0x00000000 }, + { 0x00800001, 0x20500232, 0x002b0350, 0x00000000 }, + { 0x00800001, 0x20600232, 0x002b0360, 0x00000000 }, + { 0x00800001, 0x20700232, 0x002b0370, 0x00000000 }, + { 0x00000001, 0x22000060, 0x00000000, 0x06082003 }, + { 0x01600031, 0x20000020, 0x508d07e0, 0x00000200 }, + { 0x00800401, 0x23800231, 0x00a900c0, 0x00000000 }, + { 0x00800801, 0x23900231, 0x00a90100, 0x00000000 }, + { 0x00800401, 0x23a00231, 0x00a90140, 0x00000000 }, + { 0x00800801, 0x23b00231, 0x00a90180, 0x00000000 }, + { 0x00800401, 0x23c00231, 0x00a900c4, 0x00000000 }, + { 0x00800801, 0x23d00231, 0x00a90104, 0x00000000 }, + { 0x00800401, 0x23e00231, 0x00a90144, 0x00000000 }, + { 0x00800801, 0x23f00231, 0x00a90184, 0x00000000 }, + { 0x00800401, 0x24000231, 0x00a900c8, 0x00000000 }, + { 0x00800801, 0x24100231, 0x00a90108, 0x00000000 }, + { 0x00800401, 0x24200231, 0x00a90148, 0x00000000 }, + { 0x00800801, 0x24300231, 0x00a90188, 0x00000000 }, + { 0x00800401, 0x24400231, 0x00a900cc, 0x00000000 }, + { 0x00800801, 0x24500231, 0x00a9010c, 0x00000000 }, + { 0x00800401, 0x24600231, 0x00a9014c, 0x00000000 }, + { 0x00800801, 0x24700231, 0x00a9018c, 0x00000000 }, + { 0x00800401, 0x20c00231, 0x00cf0380, 0x00000000 }, + { 0x00800801, 0x20d00231, 0x00cf0381, 0x00000000 }, + { 0x00800401, 0x20e00231, 0x00cf0382, 0x00000000 }, + { 0x00800801, 0x20f00231, 0x00cf0383, 0x00000000 }, + { 0x00800401, 0x21000231, 0x00cf03c0, 0x00000000 }, + { 0x00800801, 0x21100231, 0x00cf03c1, 0x00000000 }, + { 0x00800401, 0x21200231, 0x00cf03c2, 0x00000000 }, + { 0x00800801, 0x21300231, 0x00cf03c3, 0x00000000 }, + { 0x00800401, 0x21400231, 0x00cf0400, 0x00000000 }, + { 0x00800801, 0x21500231, 0x00cf0401, 0x00000000 }, + { 0x00800401, 0x21600231, 0x00cf0402, 0x00000000 }, + { 0x00800801, 0x21700231, 0x00cf0403, 0x00000000 }, + { 0x00800401, 0x21800231, 0x00cf0440, 0x00000000 }, + { 0x00800801, 0x21900231, 0x00cf0441, 0x00000000 }, + { 0x00800401, 0x21a00231, 0x00cf0442, 0x00000000 }, + { 0x00800801, 0x21b00231, 0x00cf0443, 0x00000000 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00800080 }, + { 0x00000008, 0x25e83e2d, 0x00009082, 0x00020002 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00800080 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x00c000c0 }, + { 0x00200401, 0x25d0022d, 0x00459082, 0x00000000 }, + { 0x00200c01, 0x25d80129, 0x00459054, 0x00000000 }, + { 0x00400801, 0x25d40231, 0x00699070, 0x00000000 }, + { 0x00000040, 0x25e83dad, 0x000005e8, 0x00020002 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x00000096 }, + { 0x00000008, 0x25e83e2d, 0x00009084, 0x00020002 }, + { 0x00200401, 0x25d0022d, 0x00459084, 0x00000000 }, + { 0x00000801, 0x25da01e9, 0x00000000, 0x00000000 }, + { 0x00000040, 0x25e83dad, 0x000005e8, 0x00020002 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00200020 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00c000c0 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x01000100 }, + { 0x00000401, 0x25d80129, 0x00009046, 0x00000000 }, + { 0x00400801, 0x25d40231, 0x00699074, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x00000080 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00100010 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x01000100 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x01400140 }, + { 0x00000401, 0x25d80129, 0x00009048, 0x00000000 }, + { 0x00400801, 0x25d40231, 0x00699078, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x00000072 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00200020 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x01400140 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x01800180 }, + { 0x00000401, 0x25d80129, 0x0000904a, 0x00000000 }, + { 0x00400801, 0x25d40231, 0x0069907c, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x00000064 }, + { 0x00200401, 0x27e001a1, 0x004505c0, 0x00000000 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x000f000f }, + { 0x00802001, 0x20400022, 0x008d00c0, 0x00000000 }, + { 0x00802001, 0x20800022, 0x008d0100, 0x00000000 }, + { 0x00802001, 0x20c00022, 0x008d0140, 0x00000000 }, + { 0x00802001, 0x21000022, 0x008d0180, 0x00000000 }, + { 0x00000001, 0x22000060, 0x00000000, 0x12082003 }, + { 0x01600031, 0x20000020, 0x508d07e0, 0x00000200 }, + { 0x00200401, 0x27e001a1, 0x004505c8, 0x00000000 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x0003000f }, + { 0x00802001, 0x20400022, 0x008d0080, 0x00000000 }, + { 0x00000001, 0x22000060, 0x00000000, 0x0618a003 }, + { 0x01600031, 0x26400021, 0x508d07e0, 0x00000200 }, + { 0x00800401, 0x23400231, 0x00a900cc, 0x00000000 }, + { 0x00800801, 0x23500231, 0x00a9010c, 0x00000000 }, + { 0x00800401, 0x23600231, 0x00a9014c, 0x00000000 }, + { 0x00800801, 0x23700231, 0x00a9018c, 0x00000000 }, + { 0x00800401, 0x23800231, 0x00cf0340, 0x00000000 }, + { 0x00800801, 0x23900231, 0x00cf0341, 0x00000000 }, + { 0x00800401, 0x23a00231, 0x00cf0342, 0x00000000 }, + { 0x00800801, 0x23b00231, 0x00cf0343, 0x00000000 }, + { 0x00802001, 0x202000a2, 0x008d0380, 0x00000000 }, + { 0x00000008, 0x27e03d29, 0x00000026, 0x00010001 }, + { 0x00800031, 0x20001d28, 0x608d07e0, 0x06080020 }, + { 0x00600001, 0x26400021, 0x008d0640, 0x00000000 }, + { 0x00600001, 0x260001e1, 0x00000000, 0x00000000 }, + { 0x00000009, 0x26143da1, 0x000005e2, 0x00120012 }, + { 0x00000440, 0x26141c21, 0x00000614, 0x00020000 }, + { 0x00000c01, 0x26120129, 0x0000000c, 0x00000000 }, + { 0x00000c01, 0x26100169, 0x00000000, 0x12121212 }, + { 0x00400801, 0x26000171, 0x00000000, 0xffffffff }, + { 0x00600031, 0x20001c20, 0x308d0600, 0x82008002 }, + { 0x00000440, 0x27e03da1, 0x000005c0, 0x000c000c }, + { 0x00000c01, 0x27e401a1, 0x000005c2, 0x00000000 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x000f0003 }, + { 0x02600031, 0x23401c25, 0x408d07e0, 0x02286003 }, + { 0x00800401, 0x23800231, 0x00cf0340, 0x00000000 }, + { 0x00800801, 0x23900231, 0x00cf0341, 0x00000000 }, + { 0x00800401, 0x23a00231, 0x00cf0342, 0x00000000 }, + { 0x00800801, 0x23b00231, 0x00cf0343, 0x00000000 }, + { 0x00802001, 0x202000a2, 0x008d0380, 0x00000000 }, + { 0x00000008, 0x27e03d29, 0x00000026, 0x00010001 }, + { 0x00800031, 0x20001d28, 0x608d07e0, 0x06080020 }, + { 0x00600001, 0x260001e1, 0x00000000, 0x00000000 }, + { 0x00000009, 0x26143da1, 0x000005e2, 0x00120012 }, + { 0x00000440, 0x26141c21, 0x00000614, 0x00020000 }, + { 0x00000c01, 0x26120129, 0x0000000c, 0x00000000 }, + { 0x00000c01, 0x26100169, 0x00000000, 0x12121212 }, + { 0x00400801, 0x26000171, 0x00000000, 0xffffffff }, + { 0x00600031, 0x20001c20, 0x308d0600, 0x82008002 }, + { 0x00200001, 0x26000128, 0x004505d8, 0x00000000 }, + { 0x00800040, 0x2400462d, 0x00b19c00, 0x00b1d830 }, + { 0x00800040, 0x2340462d, 0x00b19820, 0x00b1d830 }, + { 0x00800040, 0x2360462d, 0x00b19c10, 0x00b1dc00 }, + { 0x05810010, 0x200035ac, 0x008d2400, 0x000005d0 }, + { 0x05810010, 0x200035ac, 0x008d2340, 0x000005d2 }, + { 0x05810010, 0x200035ac, 0x008d2360, 0x000005d2 }, + { 0x00818022, 0x34001c00, 0x00001400, 0x000000ca }, + { 0x00800040, 0x2440462d, 0x00b19810, 0x00b1d830 }, + { 0x00800040, 0x2460462d, 0x00b19c20, 0x00b1dc00 }, + { 0x00800201, 0x24a00129, 0x00b19820, 0x00000000 }, + { 0x00818022, 0x34001c00, 0x02001400, 0x00000066 }, + { 0x05800010, 0x200035ac, 0x028d2400, 0x000005e8 }, + { 0x00800040, 0x2520462d, 0x00b19830, 0x00b19820 }, + { 0x00800040, 0x2540462d, 0x00b19c00, 0x00b19c10 }, + { 0x00000201, 0x26000108, 0x00000602, 0x00000000 }, + { 0x05810010, 0x200035ac, 0x028d2440, 0x000005d2 }, + { 0x05810010, 0x200035ac, 0x008d2460, 0x000005d2 }, + { 0x00818022, 0x34001c00, 0x02001400, 0x0000001e }, + { 0x00800040, 0x2560462d, 0x00b19810, 0x00b19800 }, + { 0x00800040, 0x238045ad, 0x008d0520, 0x00b19c00 }, + { 0x00800040, 0x24003d8c, 0x00b10400, 0x00040004 }, + { 0x00800040, 0x23a0458d, 0x00b10400, 0x00b19810 }, + { 0x00800048, 0x24003dac, 0x008d0560, 0x00020002 }, + { 0x80800008, 0x43c03d91, 0x00b10400, 0x00030003 }, + { 0x00800040, 0x24003dac, 0x00b103a0, 0xfffefffe }, + { 0x80800008, 0x43603d91, 0x00b10400, 0x00020002 }, + { 0x00800040, 0x2400362c, 0x00b19c10, 0x00b10380 }, + { 0x00800040, 0x2400358c, 0x00b10400, 0x00b103a0 }, + { 0x80800008, 0x43403d91, 0x00b10400, 0x00030003 }, + { 0x00800001, 0xb8100231, 0x00ae03c0, 0x00000000 }, + { 0x00800001, 0xb8200231, 0x00ae0360, 0x00000000 }, + { 0x00800001, 0xb8300231, 0x00ae0340, 0x00000000 }, + { 0x00808024, 0x34001c00, 0x00001400, 0x0001000e }, + { 0x00800040, 0x2400362c, 0x00b19820, 0x008d0520 }, + { 0x00800040, 0x2400458c, 0x00b10400, 0x00b19c10 }, + { 0x00800040, 0x24003d8c, 0x00b10400, 0x00020002 }, + { 0x80800008, 0x43403d91, 0x00b10400, 0x00020002 }, + { 0x00800001, 0xb8300231, 0x00ae0340, 0x00000000 }, + { 0x00008025, 0x20000000, 0x00000000, 0x00000000 }, + { 0x00818022, 0x34001c00, 0x00001400, 0x0000001e }, + { 0x00800040, 0x2580462d, 0x00b19c20, 0x00b19c30 }, + { 0x00800040, 0x238045ad, 0x008d0540, 0x008d04b0 }, + { 0x00800040, 0x24003d8c, 0x00b10400, 0x00040004 }, + { 0x00800040, 0x23a0458d, 0x00b10400, 0x00b19c20 }, + { 0x00800048, 0x24003dac, 0x008d0580, 0x00020002 }, + { 0x80800008, 0x43c03d91, 0x00b10400, 0x00030003 }, + { 0x00800040, 0x24003dac, 0x00b103a0, 0xfffefffe }, + { 0x80800008, 0x43603d91, 0x00b10400, 0x00020002 }, + { 0x00800040, 0x2400362c, 0x008d04a0, 0x00b10380 }, + { 0x00800040, 0x2400358c, 0x00b10400, 0x00b103a0 }, + { 0x80800008, 0x43403d91, 0x00b10400, 0x00030003 }, + { 0x00800001, 0xbc200231, 0x00ae03c0, 0x00000000 }, + { 0x00800001, 0xbc100231, 0x00ae0360, 0x00000000 }, + { 0x00800001, 0xbc000231, 0x00ae0340, 0x00000000 }, + { 0x00808024, 0x34001c00, 0x00001400, 0x0001000e }, + { 0x00800040, 0x2400362c, 0x008d04a0, 0x008d0540 }, + { 0x00800040, 0x2400458c, 0x00b10400, 0x00b19c10 }, + { 0x00800040, 0x24003d8c, 0x00b10400, 0x00020002 }, + { 0x80800008, 0x43403d91, 0x00b10400, 0x00020002 }, + { 0x00800001, 0xbc000231, 0x00ae0340, 0x00000000 }, + { 0x00008025, 0x20000000, 0x00000000, 0x00000000 }, + { 0x00808024, 0x34001c00, 0x00001400, 0x0001005c }, + { 0x00800201, 0x23e0022d, 0x002805d4, 0x00000000 }, + { 0x00800201, 0x23c0022d, 0x002805d4, 0x00000000 }, + { 0x05800010, 0x200035ac, 0x008d2440, 0x000005d2 }, + { 0x05800010, 0x200035ac, 0x028d2460, 0x000005d2 }, + { 0x00800040, 0x24003e2c, 0x00b19820, 0x00040004 }, + { 0x00800048, 0x24003dac, 0x008d0400, 0x00040004 }, + { 0x00800040, 0x2400458c, 0x00b10400, 0x00b1dc10 }, + { 0x00800008, 0x23403d8d, 0x00b10400, 0x00030003 }, + { 0x00810040, 0x23e03dad, 0x008d03e0, 0x00010001 }, + { 0x00200201, 0x25ec018d, 0x00450600, 0x00000000 }, + { 0x00810040, 0x23e03dad, 0x028d03e0, 0x00010001 }, + { 0x03800010, 0x200035ac, 0x008d0340, 0x008d03e0 }, + { 0x05800010, 0x200035ac, 0x028d0340, 0x008d43e0 }, + { 0x00800042, 0x24c0462d, 0x00b19830, 0x00b19c00 }, + { 0x00810001, 0x234001ad, 0x008d03e0, 0x00000000 }, + { 0x00810001, 0x234001ad, 0x028d43e0, 0x00000000 }, + { 0x00200201, 0x260001ac, 0x004505ec, 0x00000000 }, + { 0x80800040, 0x43603631, 0x00b19830, 0x008d0340 }, + { 0x80800040, 0x43403631, 0x00b19c00, 0x008d4340 }, + { 0x00800001, 0xb8300231, 0x00ae0360, 0x00000000 }, + { 0x00800001, 0xbc000231, 0x00ae0340, 0x00000000 }, + { 0x00818022, 0x34001c00, 0x00001400, 0x00000016 }, + { 0x00800040, 0x2400362c, 0x00b19810, 0x008d04c0 }, + { 0x00800048, 0x24003e2c, 0x00b19820, 0xfffefffe }, + { 0x00800008, 0x23603d8d, 0x00b10400, 0x00010001 }, + { 0x03800010, 0x200035ac, 0x008d0360, 0x008d03c0 }, + { 0x05800010, 0x200035ac, 0x028d0360, 0x008d43c0 }, + { 0x00810001, 0x236001ad, 0x008d03c0, 0x00000000 }, + { 0x00810001, 0x236001ad, 0x028d43c0, 0x00000000 }, + { 0x00000201, 0x260201ac, 0x000005ee, 0x00000000 }, + { 0x80800040, 0x43603631, 0x00b19820, 0x008d0360 }, + { 0x00800001, 0xb8200231, 0x00ae0360, 0x00000000 }, + { 0x00008025, 0x20000000, 0x00000000, 0x00000000 }, + { 0x00818022, 0x34001c00, 0x02001400, 0x00000014 }, + { 0x00800040, 0x2400362c, 0x00b19c20, 0x008d04c0 }, + { 0x00800048, 0x24003e2c, 0x00b19c10, 0xfffefffe }, + { 0x00800008, 0x23603d8d, 0x00b10400, 0x00010001 }, + { 0x03800010, 0x200035ac, 0x008d0360, 0x008d03c0 }, + { 0x05800010, 0x200035ac, 0x028d0360, 0x008d43c0 }, + { 0x00810001, 0x236001ad, 0x008d03c0, 0x00000000 }, + { 0x00810001, 0x236001ad, 0x028d43c0, 0x00000000 }, + { 0x80800040, 0x43603631, 0x00b19c10, 0x008d0360 }, + { 0x00800001, 0xbc100231, 0x00ae0360, 0x00000000 }, + { 0x00008025, 0x20000000, 0x00000000, 0x00000000 }, + { 0x00008025, 0x20000000, 0x00000000, 0x00000000 }, + { 0x00008025, 0x20000000, 0x00000000, 0x00000000 }, + { 0x00000001, 0x34000020, 0x000007c0, 0x00000000 }, + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x00600001, 0x27e00021, 0x008d0000, 0x00000000 }, + { 0x00a02001, 0x20400169, 0x00000000, 0x00000000 }, + { 0x00000001, 0x206601ed, 0x00000000, 0x00030003 }, + { 0x00000009, 0x20663dad, 0x00000066, 0x000a000a }, + { 0x00000001, 0x206801ed, 0x00000000, 0x01400140 }, + { 0x00000001, 0x22600169, 0x00000000, 0x00030003 }, + { 0x00000008, 0x22403dad, 0x00000026, 0x00010001 }, + { 0x00000041, 0x224235ad, 0x00000020, 0x00000022 }, + { 0x00600001, 0x20200022, 0x008d0000, 0x00000000 }, + { 0x00000001, 0x203c0022, 0x00000018, 0x00000000 }, + { 0x00000001, 0x203f01f2, 0x00000000, 0x00000000 }, + { 0x00000001, 0x202c00e2, 0x00000000, 0x00000000 }, + { 0x00000001, 0x202c010a, 0x00000e00, 0x00000000 }, + { 0x00600001, 0x20400021, 0x008d0020, 0x00000000 }, + { 0x00400001, 0x205401ed, 0x00000000, 0x00000000 }, + { 0x00200040, 0x20583dad, 0x00450020, 0xffffffff }, + { 0x00000001, 0x22000060, 0x00000000, 0x06080000 }, + { 0x00600001, 0x26000021, 0x008d0000, 0x00000000 }, + { 0x00000001, 0x26140061, 0x00000000, 0x00c00400 }, + { 0x00000001, 0x26100169, 0x00000000, 0x12121212 }, + { 0x07600031, 0x26201c21, 0x308d0600, 0x02000000 }, + { 0x00200401, 0x208000e5, 0x00000000, 0x00000000 }, + { 0x00000c01, 0x208800e5, 0x00000000, 0xffffffc4 }, + { 0x00000801, 0x208c00e5, 0x00000000, 0xffffffc8 }, + { 0x00200001, 0x260001ec, 0x00000000, 0x00000000 }, + { 0x00600001, 0x20000022, 0x008d07e0, 0x00000000 }, + { 0x00000040, 0x20283c22, 0x00000008, 0x00100010 }, + { 0x00000001, 0x206001ed, 0x00000000, 0x00020002 }, + { 0x00000001, 0x206201ad, 0x0000005a, 0x00000000 }, + { 0x00000001, 0x20a001ed, 0x00000000, 0x00000000 }, + { 0x00200001, 0x228001ed, 0x00000000, 0x00000000 }, + { 0x00802001, 0x20c00061, 0x00000000, 0x00ff00ff }, + { 0x00802001, 0x21000061, 0x00000000, 0x00ff00ff }, + { 0x00802001, 0x21400061, 0x00000000, 0x00ff00ff }, + { 0x00802001, 0x21800061, 0x00000000, 0x00ff00ff }, + { 0x00802001, 0x21c00061, 0x00000000, 0x00ff00ff }, + { 0x00000041, 0x22083dac, 0x00000056, 0x00040004 }, + { 0x05000010, 0x200035ac, 0x02000280, 0x00000240 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x00000004 }, + { 0x00000040, 0x22803dad, 0x00000280, 0xffffffff }, + { 0x00000030, 0x32000084, 0x00001200, 0x00000000 }, + { 0x01000010, 0x20002d28, 0x000090c2, 0x00000000 }, + { 0x03000010, 0x200035ac, 0x02000054, 0x00000058 }, + { 0x00800001, 0x240001ac, 0x00000068, 0x00000000 }, + { 0x00000048, 0x22a03dad, 0x00000056, 0x00040004 }, + { 0x00010220, 0x34001c00, 0x00001400, 0xfffffff2 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x00000014 }, + { 0x00200001, 0xb0c00229, 0x00450054, 0x00000000 }, + { 0x00200040, 0x22803dad, 0x00450280, 0x00010001 }, + { 0x00000001, 0x20300022, 0x00000010, 0x00000000 }, + { 0x00000001, 0x20380122, 0x00000260, 0x00000000 }, + { 0x00800001, 0x204001ae, 0x00b10040, 0x00000000 }, + { 0x00000008, 0x20003d2a, 0x000002a0, 0x00010001 }, + { 0x00000040, 0x22602d29, 0x00000260, 0x00020002 }, + { 0x00800031, 0x20000008, 0x608d0000, 0x00000200 }, + { 0x00000006, 0x203025a2, 0x00000066, 0x000002a0 }, + { 0x01600031, 0x20001c00, 0x708d0000, 0x02000001 }, + { 0x04200010, 0x200035ac, 0x00450054, 0x00450060 }, + { 0x00010040, 0x20a03dad, 0x02000056, 0x00010001 }, + { 0x05200010, 0x200035ac, 0x02450280, 0x00450240 }, + { 0x00000001, 0x240001ec, 0x00000000, 0x00040004 }, + { 0x00000048, 0x22083dac, 0x00000056, 0x00040004 }, + { 0x00200040, 0x205455ad, 0x00450054, 0x00450034 }, + { 0x02000010, 0x20003d8c, 0x00000600, 0x00010001 }, + { 0x00000041, 0x220e3d8c, 0x00000602, 0x00040004 }, + { 0x00010041, 0x22083dac, 0x000000a0, 0x00040004 }, + { 0x00010401, 0x205601ad, 0x000000a0, 0x00000000 }, + { 0x00010840, 0x20543d2d, 0x000090c0, 0x00010001 }, + { 0x00000220, 0x34001400, 0x00001400, 0x00009c80 }, + { 0x01000010, 0x20003dac, 0x02000280, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x00000014 }, + { 0x00000030, 0x32000084, 0x00001200, 0x00000000 }, + { 0x00000040, 0x22803dad, 0x00000280, 0xffffffff }, + { 0x00600401, 0x260001e1, 0x00000000, 0x00000000 }, + { 0x00000c01, 0x26140061, 0x00000000, 0x01800000 }, + { 0x00000c01, 0x26120129, 0x0000000c, 0x00000000 }, + { 0x00000801, 0x26100169, 0x00000000, 0x12121212 }, + { 0x00000040, 0x2078252d, 0x00000026, 0x00004280 }, + { 0x00400001, 0x26000231, 0x00000078, 0x00000000 }, + { 0x00600031, 0x26201c21, 0x308d0600, 0x02000002 }, + { 0x00000220, 0x34001c00, 0x00001400, 0xffffffe8 }, + { 0x07600031, 0x20001c20, 0x30000000, 0x02000001 }, + { 0x01600031, 0x20001c24, 0x708d0000, 0x82000012 }, + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x00600001, 0x27e00021, 0x008d0000, 0x00000000 }, + { 0x00600009, 0x25c03dad, 0x00050034, 0x00040004 }, + { 0x00000001, 0x220801ec, 0x00000000, 0x02400240 }, + { 0x00000041, 0x25e435a1, 0x00000020, 0x00000036 }, + { 0x00000040, 0x25e43421, 0x000005e4, 0x00000034 }, + { 0x00000041, 0x27e82c21, 0x000005e4, 0x00400040 }, + { 0x00000001, 0x240001ec, 0x00000000, 0x01400140 }, + { 0x00000048, 0x20263dad, 0x00000036, 0x00040004 }, + { 0x00000040, 0x25c43dad, 0x000005c4, 0xfffcfffc }, + { 0x00000040, 0x25ca3dad, 0x000005ca, 0xfffcfffc }, + { 0x00800001, 0x2220022d, 0x000d002c, 0x00000000 }, + { 0x00600040, 0x22303dad, 0x008d0230, 0x00080008 }, + { 0x01600031, 0x22401c21, 0x408d07e0, 0x02885800 }, + { 0x01800005, 0x20002d28, 0x02b19040, 0xffffffff }, + { 0x02000005, 0x20003e2c, 0x00009030, 0x00010001 }, + { 0x00000001, 0x25e20129, 0x00000036, 0x00000000 }, + { 0x000b0220, 0x34001c00, 0x02001400, 0x00000126 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000124 }, + { 0x00000401, 0x27e001a1, 0x000005c0, 0x00000000 }, + { 0x00000c0c, 0x27e43da1, 0x000005c2, 0x00010001 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x0007000f }, + { 0x00000001, 0x22000060, 0x00000000, 0x0248a002 }, + { 0x02600031, 0x20c00021, 0x408d07e0, 0x00000200 }, + { 0x00000401, 0x27e001a1, 0x000005c8, 0x00000000 }, + { 0x00000c0c, 0x27e43da1, 0x000005ca, 0x00010001 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x0001000f }, + { 0x00000001, 0x22000060, 0x00000000, 0x02186004 }, + { 0x02600031, 0x20800021, 0x408d07e0, 0x00000200 }, + { 0x00800001, 0x2380012d, 0x008900c0, 0x00000000 }, + { 0x00800001, 0x23a0012d, 0x00890100, 0x00000000 }, + { 0x00800001, 0x23c0012d, 0x008900c8, 0x00000000 }, + { 0x00800001, 0x23e0012d, 0x00890108, 0x00000000 }, + { 0x00600401, 0x20c001a9, 0x00ab0380, 0x00000000 }, + { 0x00600801, 0x20d001a9, 0x00ab0382, 0x00000000 }, + { 0x00600401, 0x20e001a9, 0x00ab0384, 0x00000000 }, + { 0x00600801, 0x20f001a9, 0x00ab0386, 0x00000000 }, + { 0x00600401, 0x210001a9, 0x00ab03c0, 0x00000000 }, + { 0x00600801, 0x211001a9, 0x00ab03c2, 0x00000000 }, + { 0x00600401, 0x212001a9, 0x00ab03c4, 0x00000000 }, + { 0x00600801, 0x213001a9, 0x00ab03c6, 0x00000000 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00400040 }, + { 0x00800008, 0x2340352d, 0x00009050, 0x008d0220 }, + { 0x00800008, 0x2360352d, 0x00009052, 0x008d0220 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000020 }, + { 0x02600005, 0x20003dac, 0x00ae0340, 0x00010001 }, + { 0x02600005, 0x20003dac, 0x02ae0360, 0x00010001 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00400040 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x00c000c0 }, + { 0x00200401, 0x25d0022d, 0x004590c0, 0x00000000 }, + { 0x00400801, 0x25d40231, 0x006990a0, 0x00000000 }, + { 0x00200001, 0x25d80109, 0x00450600, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x000000fc }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00410041 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x00c100c1 }, + { 0x00200401, 0x25d0022d, 0x004590c8, 0x00000000 }, + { 0x00400801, 0x25d40231, 0x006990b0, 0x00000000 }, + { 0x00200001, 0x26000128, 0x004505d8, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x000000ee }, + { 0x00800008, 0x2340352d, 0x00009042, 0x008d0220 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00e000e0 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x01000100 }, + { 0x00200401, 0x25d0022d, 0x004590c4, 0x00000000 }, + { 0x00400801, 0x25d40231, 0x006990a4, 0x00000000 }, + { 0x02600005, 0x20003dac, 0x00ae0340, 0x00010001 }, + { 0x00000001, 0x260201e8, 0x00000000, 0x00000000 }, + { 0x00000401, 0x25da01e9, 0x00000000, 0x00000000 }, + { 0x00000801, 0x25d80109, 0x00000600, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x000000d8 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00e100e1 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x01010101 }, + { 0x00200401, 0x25d0022d, 0x004590cc, 0x00000000 }, + { 0x00400801, 0x25d40231, 0x006990b4, 0x00000000 }, + { 0x00200001, 0x26000128, 0x004505d8, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x000000ca }, + { 0x00000401, 0x27e001a1, 0x000005c4, 0x00000000 }, + { 0x00000c0c, 0x27e43da1, 0x000005c6, 0x00010001 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x00070003 }, + { 0x00600401, 0x2340012d, 0x00890040, 0x00000000 }, + { 0x00600801, 0x2350012d, 0x00890048, 0x00000000 }, + { 0x00600001, 0x204001aa, 0x00270340, 0x00000000 }, + { 0x00600001, 0x205001aa, 0x00270350, 0x00000000 }, + { 0x00000001, 0x22000060, 0x00000000, 0x04082004 }, + { 0x01600031, 0x20000020, 0x508d07e0, 0x00000200 }, + { 0x00800001, 0x2380012d, 0x008900c0, 0x00000000 }, + { 0x00800001, 0x23a0012d, 0x00890100, 0x00000000 }, + { 0x00800001, 0x23c0012d, 0x008900c8, 0x00000000 }, + { 0x00800001, 0x23e0012d, 0x00890108, 0x00000000 }, + { 0x00600401, 0x20c001a9, 0x00ab0380, 0x00000000 }, + { 0x00600801, 0x20d001a9, 0x00ab0382, 0x00000000 }, + { 0x00600401, 0x20e001a9, 0x00ab0384, 0x00000000 }, + { 0x00600801, 0x20f001a9, 0x00ab0386, 0x00000000 }, + { 0x00600401, 0x210001a9, 0x00ab03c0, 0x00000000 }, + { 0x00600801, 0x211001a9, 0x00ab03c2, 0x00000000 }, + { 0x00600401, 0x212001a9, 0x00ab03c4, 0x00000000 }, + { 0x00600801, 0x213001a9, 0x00ab03c6, 0x00000000 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00800080 }, + { 0x00800008, 0x2340352d, 0x00009054, 0x008d0220 }, + { 0x00800008, 0x2360352d, 0x00009056, 0x008d0220 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000020 }, + { 0x02600005, 0x20003dac, 0x00ae0340, 0x00010001 }, + { 0x02600005, 0x20003dac, 0x02ae0360, 0x00010001 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00800080 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x00c000c0 }, + { 0x00200401, 0x25d0022d, 0x004590c2, 0x00000000 }, + { 0x00400801, 0x25d40231, 0x006990a8, 0x00000000 }, + { 0x00200001, 0x25d80109, 0x00450600, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000086 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00810081 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x00c100c1 }, + { 0x00200401, 0x25d0022d, 0x004590ca, 0x00000000 }, + { 0x00400801, 0x25d40231, 0x006990b8, 0x00000000 }, + { 0x00200001, 0x26000128, 0x004505d8, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000078 }, + { 0x00800008, 0x2340352d, 0x00009048, 0x008d0220 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00e000e0 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x01000100 }, + { 0x00200401, 0x25d0022d, 0x004590c4, 0x00000000 }, + { 0x00400801, 0x25d40231, 0x006990ac, 0x00000000 }, + { 0x02600005, 0x20003dac, 0x00ae0340, 0x00010001 }, + { 0x00000001, 0x260201e8, 0x00000000, 0x00000000 }, + { 0x00000401, 0x25da01e9, 0x00000000, 0x00000000 }, + { 0x00000801, 0x25d80109, 0x00000600, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000062 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00e100e1 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x01010101 }, + { 0x00200401, 0x25d0022d, 0x004590cc, 0x00000000 }, + { 0x00400801, 0x25d40231, 0x006990bc, 0x00000000 }, + { 0x00200001, 0x26000128, 0x004505d8, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000054 }, + { 0x00000401, 0x27e001a1, 0x000005c0, 0x00000000 }, + { 0x00000c0c, 0x27e43da1, 0x000005c2, 0x00010001 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x0007000f }, + { 0x00802001, 0x20400022, 0x008d00c0, 0x00000000 }, + { 0x00802001, 0x20800022, 0x008d0100, 0x00000000 }, + { 0x00000001, 0x22000060, 0x00000000, 0x0a082004 }, + { 0x01600031, 0x20000020, 0x508d07e0, 0x00000200 }, + { 0x00000401, 0x27e001a1, 0x000005c8, 0x00000000 }, + { 0x00000c0c, 0x27e43da1, 0x000005ca, 0x00010001 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x0001000f }, + { 0x00600001, 0x20400022, 0x008d0080, 0x00000000 }, + { 0x00000001, 0x22000060, 0x00000000, 0x0418a004 }, + { 0x01600031, 0x26400021, 0x508d07e0, 0x00000200 }, + { 0x00600401, 0x2340012d, 0x008500cc, 0x00000000 }, + { 0x00600801, 0x2350012d, 0x0085010c, 0x00000000 }, + { 0x00800001, 0x236001ad, 0x002e0340, 0x00000000 }, + { 0x00600001, 0x202000a2, 0x008d0360, 0x00000000 }, + { 0x00000008, 0x27e03d29, 0x00000026, 0x00010001 }, + { 0x00800031, 0x20001d28, 0x608d07e0, 0x04080020 }, + { 0x00600001, 0x26400021, 0x008d0640, 0x00000000 }, + { 0x00600001, 0x260001e1, 0x00000000, 0x00000000 }, + { 0x00000009, 0x26143da1, 0x000005e2, 0x00120012 }, + { 0x00000440, 0x26141c21, 0x00000614, 0x00020000 }, + { 0x00000c01, 0x26120129, 0x0000000c, 0x00000000 }, + { 0x00000c01, 0x26100169, 0x00000000, 0x12121212 }, + { 0x00400801, 0x26000171, 0x00000000, 0xffffffff }, + { 0x00600031, 0x20001c20, 0x308d0600, 0x82008002 }, + { 0x00000440, 0x27e03da1, 0x000005c0, 0x000c000c }, + { 0x00000c0c, 0x27e43da1, 0x000005c2, 0x00010001 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x00070003 }, + { 0x02600031, 0x23401c25, 0x408d07e0, 0x02186004 }, + { 0x00800001, 0x236001ad, 0x002e0340, 0x00000000 }, + { 0x00600001, 0x202000a2, 0x008d0360, 0x00000000 }, + { 0x00000008, 0x27e03d29, 0x00000026, 0x00010001 }, + { 0x00800031, 0x20001d28, 0x608d07e0, 0x04080020 }, + { 0x00600001, 0x260001e1, 0x00000000, 0x00000000 }, + { 0x00000009, 0x26143da1, 0x000005e2, 0x00120012 }, + { 0x00000440, 0x26141c21, 0x00000614, 0x00020000 }, + { 0x00000c01, 0x26120129, 0x0000000c, 0x00000000 }, + { 0x00000c01, 0x26100169, 0x00000000, 0x12121212 }, + { 0x00400801, 0x26000171, 0x00000000, 0xffffffff }, + { 0x00600031, 0x20001c20, 0x308d0600, 0x82008002 }, + { 0x00600040, 0x2400462d, 0x00ae9c00, 0x00aed810 }, + { 0x00600040, 0x2340462d, 0x00ae9800, 0x00aed810 }, + { 0x00600040, 0x2360462d, 0x00ae9c10, 0x00aedc00 }, + { 0x05810010, 0x200035ac, 0x008d2400, 0x000005d0 }, + { 0x05810010, 0x200035ac, 0x008d2340, 0x000005d2 }, + { 0x05810010, 0x200035ac, 0x008d2360, 0x000005d2 }, + { 0x00618022, 0x34001c00, 0x00001400, 0x00000038 }, + { 0x00618022, 0x34001c00, 0x02001400, 0x00000016 }, + { 0x00600040, 0x24003e2c, 0x00ae9c10, 0x00020002 }, + { 0x00600048, 0x24003e2c, 0x00ae9800, 0x00020002 }, + { 0x00600040, 0x2400458c, 0x008d0400, 0x00ae9810 }, + { 0x80600008, 0x43403d91, 0x008d0400, 0x00020002 }, + { 0x00600040, 0x24003e2c, 0x00ae9800, 0x00020002 }, + { 0x00600048, 0x24003e2c, 0x00ae9c10, 0x00020002 }, + { 0x00600040, 0x2400458c, 0x008d0400, 0x00ae9c00 }, + { 0x80600008, 0x43603d91, 0x008d0400, 0x00020002 }, + { 0x00600001, 0xd8100231, 0x00ae0340, 0x00000000 }, + { 0x00600001, 0xdc000231, 0x00ae0360, 0x00000000 }, + { 0x00608024, 0x34001c00, 0x00001400, 0x00010020 }, + { 0x00600201, 0x2400022c, 0x002405d4, 0x00000000 }, + { 0x00600040, 0x23e03d8d, 0x008d0400, 0x00010001 }, + { 0x00600040, 0x24003e2c, 0x00ae9800, 0x00040004 }, + { 0x00600048, 0x24003dac, 0x008d0400, 0x00040004 }, + { 0x00600040, 0x2400458c, 0x008d0400, 0x00aedc10 }, + { 0x00600008, 0x23403d8d, 0x008d0400, 0x00030003 }, + { 0x03600010, 0x200035ac, 0x008d0340, 0x008d03e0 }, + { 0x05600010, 0x200035ac, 0x028d0340, 0x008d43e0 }, + { 0x00610001, 0x234001ad, 0x008d03e0, 0x00000000 }, + { 0x00610001, 0x234001ad, 0x028d43e0, 0x00000000 }, + { 0x80600040, 0x43603631, 0x00ae9810, 0x008d0340 }, + { 0x80600040, 0x43403631, 0x00ae9c00, 0x008d4340 }, + { 0x00600001, 0xd8100231, 0x00ae0360, 0x00000000 }, + { 0x00600001, 0xdc000231, 0x00ae0340, 0x00000000 }, + { 0x00008025, 0x20000000, 0x00000000, 0x00000000 }, + { 0x00008025, 0x20000000, 0x00000000, 0x00000000 }, + { 0x00000001, 0x34000020, 0x000007c0, 0x00000000 }, + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x00600001, 0x27e00021, 0x008d0000, 0x00000000 }, + { 0x00a02001, 0x20400169, 0x00000000, 0x00000000 }, + { 0x00000001, 0x206601ed, 0x00000000, 0x00030003 }, + { 0x00000009, 0x20663dad, 0x00000066, 0x000a000a }, + { 0x00000008, 0x22403dad, 0x00000026, 0x00010001 }, + { 0x00000041, 0x224235ad, 0x00000020, 0x00000022 }, + { 0x00600001, 0x20200022, 0x008d0000, 0x00000000 }, + { 0x00000001, 0x203c0022, 0x00000018, 0x00000000 }, + { 0x00000001, 0x203f01f2, 0x00000000, 0x00000000 }, + { 0x00000001, 0x202c00e2, 0x00000000, 0x00000000 }, + { 0x00000001, 0x202c010a, 0x00000e00, 0x00000000 }, + { 0x00600001, 0x20400021, 0x008d0020, 0x00000000 }, + { 0x00400001, 0x205401ed, 0x00000000, 0x00000000 }, + { 0x00200040, 0x20583dad, 0x00450020, 0xffffffff }, + { 0x00000001, 0x22000060, 0x00000000, 0x06080000 }, + { 0x00600001, 0x26000021, 0x008d0000, 0x00000000 }, + { 0x00000001, 0x26140061, 0x00000000, 0x00c00400 }, + { 0x00000001, 0x26100169, 0x00000000, 0x12121212 }, + { 0x07600031, 0x26201c21, 0x308d0600, 0x02000000 }, + { 0x00000001, 0x22a00169, 0x00000000, 0x01400140 }, + { 0x00000040, 0x20283c22, 0x00000008, 0x00200020 }, + { 0x00000001, 0x203801e2, 0x00000000, 0x00010001 }, + { 0x00800001, 0x204001ae, 0x00b10020, 0x00000000 }, + { 0x00000008, 0x27e03d29, 0x000002a0, 0x00010001 }, + { 0x00800031, 0x20000128, 0x608d07e0, 0x00000200 }, + { 0x00000006, 0x203025a2, 0x00000066, 0x000002a0 }, + { 0x01600031, 0x20001c00, 0x708d0000, 0x02000001 }, + { 0x00000001, 0x20300022, 0x00000010, 0x00000000 }, + { 0x00000001, 0x22a00169, 0x00000000, 0x00000000 }, + { 0x00000001, 0x22600169, 0x00000000, 0x00020002 }, + { 0x00200401, 0x208000e5, 0x00000000, 0x00000000 }, + { 0x00000c01, 0x208800e5, 0x00000000, 0xffffffc6 }, + { 0x00000801, 0x208c00e5, 0x00000000, 0xffffffca }, + { 0x00200001, 0x260001ec, 0x00000000, 0x00000000 }, + { 0x00600001, 0x20000022, 0x008d07e0, 0x00000000 }, + { 0x00000040, 0x20283c22, 0x00000008, 0x00100010 }, + { 0x00000001, 0x206001ed, 0x00000000, 0x00020002 }, + { 0x00000001, 0x206201ad, 0x0000005a, 0x00000000 }, + { 0x00000001, 0x20a001ed, 0x00000000, 0x00000000 }, + { 0x00200001, 0x228001ed, 0x00000000, 0x00000000 }, + { 0x00802001, 0x20c00061, 0x00000000, 0x00ff00ff }, + { 0x00802001, 0x21000061, 0x00000000, 0x00ff00ff }, + { 0x00802001, 0x21400061, 0x00000000, 0x00ff00ff }, + { 0x00802001, 0x21800061, 0x00000000, 0x00ff00ff }, + { 0x00802001, 0x21c00061, 0x00000000, 0x00ff00ff }, + { 0x00000041, 0x22083dac, 0x00000056, 0x00040004 }, + { 0x05000010, 0x200035ac, 0x02000280, 0x00000240 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x00000004 }, + { 0x00000040, 0x22803dad, 0x00000280, 0xffffffff }, + { 0x00000030, 0x32000084, 0x00001200, 0x00000000 }, + { 0x01000010, 0x20002d28, 0x000090c2, 0x00000000 }, + { 0x03000010, 0x200035ac, 0x02000054, 0x00000058 }, + { 0x00000041, 0x22a03dad, 0x00000056, 0x00040004 }, + { 0x00010220, 0x34001c00, 0x00001400, 0xfffffff4 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x00000014 }, + { 0x00200001, 0xb0c00229, 0x00450054, 0x00000000 }, + { 0x00200040, 0x22803dad, 0x00450280, 0x00010001 }, + { 0x00000001, 0x20300022, 0x00000010, 0x00000000 }, + { 0x00000001, 0x20380122, 0x00000260, 0x00000000 }, + { 0x00800001, 0x204001ae, 0x00b10040, 0x00000000 }, + { 0x00000008, 0x20003d2a, 0x000002a0, 0x00010001 }, + { 0x00000040, 0x22602d29, 0x00000260, 0x00020002 }, + { 0x00800031, 0x20000008, 0x608d0000, 0x00000200 }, + { 0x00000006, 0x203025a2, 0x00000066, 0x000002a0 }, + { 0x01600031, 0x20001c00, 0x708d0000, 0x02000001 }, + { 0x04200010, 0x200035ac, 0x00450054, 0x00450060 }, + { 0x00010040, 0x20a03dad, 0x02000056, 0x00010001 }, + { 0x05200010, 0x200035ac, 0x02450280, 0x00450240 }, + { 0x00000001, 0x240001ec, 0x00000000, 0x00040004 }, + { 0x00000048, 0x22083dac, 0x00000056, 0x00040004 }, + { 0x00200040, 0x205455ad, 0x00450054, 0x00450034 }, + { 0x02000010, 0x20003d8c, 0x00000600, 0x00010001 }, + { 0x00000041, 0x220e3d8c, 0x00000602, 0x00040004 }, + { 0x00010041, 0x22083dac, 0x000000a0, 0x00040004 }, + { 0x00010401, 0x205601ad, 0x000000a0, 0x00000000 }, + { 0x00010840, 0x20543d2d, 0x000090c0, 0x00010001 }, + { 0x00000220, 0x34001400, 0x00001400, 0x00009c80 }, + { 0x01000010, 0x20003dac, 0x02000280, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x00000006 }, + { 0x00000030, 0x32000084, 0x00001200, 0x00000000 }, + { 0x00000040, 0x22803dad, 0x00000280, 0xffffffff }, + { 0x00000220, 0x34001c00, 0x00001400, 0xfffffff6 }, + { 0x05000010, 0x200035ac, 0x00000240, 0x00000026 }, + { 0x00010220, 0x34001c00, 0x00001400, 0xfffffffc }, + { 0x07600031, 0x20001c20, 0x30000000, 0x02000001 }, + { 0x01600031, 0x20001c24, 0x708d0000, 0x82000000 }, + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x00600001, 0x27e00021, 0x008d0000, 0x00000000 }, + { 0x00600009, 0x25c03dad, 0x00050034, 0x00040004 }, + { 0x00000001, 0x220801ec, 0x00000000, 0x02400240 }, + { 0x00000041, 0x20263d29, 0x00000036, 0x00040004 }, + { 0x00000041, 0x25e435a1, 0x00000020, 0x00000036 }, + { 0x00000040, 0x25e43421, 0x000005e4, 0x00000034 }, + { 0x00000041, 0x27e82c21, 0x000005e4, 0x00400040 }, + { 0x01600031, 0x22401c21, 0x408d07e0, 0x02885800 }, + { 0x01800005, 0x20002d28, 0x02b19040, 0xffffffff }, + { 0x02000005, 0x20003e2c, 0x00009030, 0x00010001 }, + { 0x00000040, 0x25c43dad, 0x000005c4, 0xfffcfffc }, + { 0x00000001, 0x25e20129, 0x00000036, 0x00000000 }, + { 0x000b0220, 0x34001c00, 0x02001400, 0x0000018c }, + { 0x00010220, 0x34001c00, 0x00001400, 0x0000018a }, + { 0x00000040, 0x25ca3dad, 0x000005ca, 0xfffcfffc }, + { 0x02000005, 0x20003dac, 0x0200002a, 0x00020002 }, + { 0x00200401, 0x27e001a1, 0x004505c0, 0x00000000 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x000f000f }, + { 0x00010001, 0x22000060, 0x02000000, 0x0288e701 }, + { 0x00110001, 0x22000060, 0x02000000, 0x0288e601 }, + { 0x01600031, 0x20c00021, 0x408d07e0, 0x00000200 }, + { 0x02000005, 0x20003dac, 0x0200002a, 0x00020002 }, + { 0x00200401, 0x27e001a1, 0x004505c8, 0x00000000 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x0003000f }, + { 0x00010001, 0x22000060, 0x02000000, 0x02286703 }, + { 0x00110001, 0x22000060, 0x02000000, 0x02286603 }, + { 0x03600031, 0x20800021, 0x408d07e0, 0x00000200 }, + { 0x00800401, 0x23800231, 0x00a900c0, 0x00000000 }, + { 0x00800801, 0x23900231, 0x00a90100, 0x00000000 }, + { 0x00800401, 0x23a00231, 0x00a90140, 0x00000000 }, + { 0x00800801, 0x23b00231, 0x00a90180, 0x00000000 }, + { 0x00800401, 0x23c00231, 0x00a900c4, 0x00000000 }, + { 0x00800801, 0x23d00231, 0x00a90104, 0x00000000 }, + { 0x00800401, 0x23e00231, 0x00a90144, 0x00000000 }, + { 0x00800801, 0x23f00231, 0x00a90184, 0x00000000 }, + { 0x00800401, 0x24000231, 0x00a900c8, 0x00000000 }, + { 0x00800801, 0x24100231, 0x00a90108, 0x00000000 }, + { 0x00800401, 0x24200231, 0x00a90148, 0x00000000 }, + { 0x00800801, 0x24300231, 0x00a90188, 0x00000000 }, + { 0x00800401, 0x24400231, 0x00a900cc, 0x00000000 }, + { 0x00800801, 0x24500231, 0x00a9010c, 0x00000000 }, + { 0x00800401, 0x24600231, 0x00a9014c, 0x00000000 }, + { 0x00800801, 0x24700231, 0x00a9018c, 0x00000000 }, + { 0x00800401, 0x20c00231, 0x00cf0380, 0x00000000 }, + { 0x00800801, 0x20d00231, 0x00cf0381, 0x00000000 }, + { 0x00800401, 0x20e00231, 0x00cf0382, 0x00000000 }, + { 0x00800801, 0x20f00231, 0x00cf0383, 0x00000000 }, + { 0x00800401, 0x21000231, 0x00cf03c0, 0x00000000 }, + { 0x00800801, 0x21100231, 0x00cf03c1, 0x00000000 }, + { 0x00800401, 0x21200231, 0x00cf03c2, 0x00000000 }, + { 0x00800801, 0x21300231, 0x00cf03c3, 0x00000000 }, + { 0x00800401, 0x21400231, 0x00cf0400, 0x00000000 }, + { 0x00800801, 0x21500231, 0x00cf0401, 0x00000000 }, + { 0x00800401, 0x21600231, 0x00cf0402, 0x00000000 }, + { 0x00800801, 0x21700231, 0x00cf0403, 0x00000000 }, + { 0x00800401, 0x21800231, 0x00cf0440, 0x00000000 }, + { 0x00800801, 0x21900231, 0x00cf0441, 0x00000000 }, + { 0x00800401, 0x21a00231, 0x00cf0442, 0x00000000 }, + { 0x00800801, 0x21b00231, 0x00cf0443, 0x00000000 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00400040 }, + { 0x00000008, 0x25e83e2d, 0x00009080, 0x00020002 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00400040 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x00c000c0 }, + { 0x00200401, 0x25d0022d, 0x00459080, 0x00000000 }, + { 0x00200c01, 0x25d80129, 0x00459050, 0x00000000 }, + { 0x00400801, 0x25d40231, 0x00699060, 0x00000000 }, + { 0x00000040, 0x25e83dad, 0x000005e8, 0x00020002 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00110220, 0x34001c00, 0x00001400, 0xfffffb8c }, + { 0x00000008, 0x25e83e2d, 0x00009084, 0x00020002 }, + { 0x00200401, 0x25d0022d, 0x00459084, 0x00000000 }, + { 0x00000801, 0x25da01e9, 0x00000000, 0x00000000 }, + { 0x00000040, 0x25e83dad, 0x000005e8, 0x00020002 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00200020 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00c000c0 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x01000100 }, + { 0x00000401, 0x25d80129, 0x00009040, 0x00000000 }, + { 0x00400801, 0x25d40231, 0x00699064, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00110220, 0x34001c00, 0x00001400, 0xfffffb76 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00100010 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x01000100 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x01400140 }, + { 0x00000401, 0x25d80129, 0x00009042, 0x00000000 }, + { 0x00400801, 0x25d40231, 0x00699068, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00110220, 0x34001c00, 0x00001400, 0xfffffb68 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00200020 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x01400140 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x01800180 }, + { 0x00000401, 0x25d80129, 0x00009044, 0x00000000 }, + { 0x00400801, 0x25d40231, 0x0069906c, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00110220, 0x34001c00, 0x00001400, 0xfffffb5a }, + { 0x02000005, 0x20003dac, 0x0200002a, 0x00020002 }, + { 0x00200401, 0x27e001a1, 0x004505c4, 0x00000000 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x000f0003 }, + { 0x00800401, 0x23400231, 0x00a90040, 0x00000000 }, + { 0x00800801, 0x23500231, 0x00a90044, 0x00000000 }, + { 0x00800401, 0x23600231, 0x00a90048, 0x00000000 }, + { 0x00800801, 0x23700231, 0x00a9004c, 0x00000000 }, + { 0x00800001, 0x20400232, 0x002b0340, 0x00000000 }, + { 0x00800001, 0x20500232, 0x002b0350, 0x00000000 }, + { 0x00800001, 0x20600232, 0x002b0360, 0x00000000 }, + { 0x00800001, 0x20700232, 0x002b0370, 0x00000000 }, + { 0x00010001, 0x22000060, 0x02000000, 0x06082703 }, + { 0x00110001, 0x22000060, 0x02000000, 0x06082603 }, + { 0x01600031, 0x20000020, 0x508d07e0, 0x00000200 }, + { 0x00800401, 0x23800231, 0x00a900c0, 0x00000000 }, + { 0x00800801, 0x23900231, 0x00a90100, 0x00000000 }, + { 0x00800401, 0x23a00231, 0x00a90140, 0x00000000 }, + { 0x00800801, 0x23b00231, 0x00a90180, 0x00000000 }, + { 0x00800401, 0x23c00231, 0x00a900c4, 0x00000000 }, + { 0x00800801, 0x23d00231, 0x00a90104, 0x00000000 }, + { 0x00800401, 0x23e00231, 0x00a90144, 0x00000000 }, + { 0x00800801, 0x23f00231, 0x00a90184, 0x00000000 }, + { 0x00800401, 0x24000231, 0x00a900c8, 0x00000000 }, + { 0x00800801, 0x24100231, 0x00a90108, 0x00000000 }, + { 0x00800401, 0x24200231, 0x00a90148, 0x00000000 }, + { 0x00800801, 0x24300231, 0x00a90188, 0x00000000 }, + { 0x00800401, 0x24400231, 0x00a900cc, 0x00000000 }, + { 0x00800801, 0x24500231, 0x00a9010c, 0x00000000 }, + { 0x00800401, 0x24600231, 0x00a9014c, 0x00000000 }, + { 0x00800801, 0x24700231, 0x00a9018c, 0x00000000 }, + { 0x00800401, 0x20c00231, 0x00cf0380, 0x00000000 }, + { 0x00800801, 0x20d00231, 0x00cf0381, 0x00000000 }, + { 0x00800401, 0x20e00231, 0x00cf0382, 0x00000000 }, + { 0x00800801, 0x20f00231, 0x00cf0383, 0x00000000 }, + { 0x00800401, 0x21000231, 0x00cf03c0, 0x00000000 }, + { 0x00800801, 0x21100231, 0x00cf03c1, 0x00000000 }, + { 0x00800401, 0x21200231, 0x00cf03c2, 0x00000000 }, + { 0x00800801, 0x21300231, 0x00cf03c3, 0x00000000 }, + { 0x00800401, 0x21400231, 0x00cf0400, 0x00000000 }, + { 0x00800801, 0x21500231, 0x00cf0401, 0x00000000 }, + { 0x00800401, 0x21600231, 0x00cf0402, 0x00000000 }, + { 0x00800801, 0x21700231, 0x00cf0403, 0x00000000 }, + { 0x00800401, 0x21800231, 0x00cf0440, 0x00000000 }, + { 0x00800801, 0x21900231, 0x00cf0441, 0x00000000 }, + { 0x00800401, 0x21a00231, 0x00cf0442, 0x00000000 }, + { 0x00800801, 0x21b00231, 0x00cf0443, 0x00000000 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00800080 }, + { 0x00000008, 0x25e83e2d, 0x00009082, 0x00020002 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00800080 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x00c000c0 }, + { 0x00200401, 0x25d0022d, 0x00459082, 0x00000000 }, + { 0x00200c01, 0x25d80129, 0x00459054, 0x00000000 }, + { 0x00400801, 0x25d40231, 0x00699070, 0x00000000 }, + { 0x00000040, 0x25e83dad, 0x000005e8, 0x00020002 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00110220, 0x34001c00, 0x00001400, 0xfffffaea }, + { 0x00000008, 0x25e83e2d, 0x00009084, 0x00020002 }, + { 0x00200401, 0x25d0022d, 0x00459084, 0x00000000 }, + { 0x00000801, 0x25da01e9, 0x00000000, 0x00000000 }, + { 0x00000040, 0x25e83dad, 0x000005e8, 0x00020002 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00200020 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00c000c0 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x01000100 }, + { 0x00000401, 0x25d80129, 0x00009046, 0x00000000 }, + { 0x00400801, 0x25d40231, 0x00699074, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00110220, 0x34001c00, 0x00001400, 0xfffffad4 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00100010 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x01000100 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x01400140 }, + { 0x00000401, 0x25d80129, 0x00009048, 0x00000000 }, + { 0x00400801, 0x25d40231, 0x00699078, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00110220, 0x34001c00, 0x00001400, 0xfffffac6 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00200020 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x01400140 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x01800180 }, + { 0x00000401, 0x25d80129, 0x0000904a, 0x00000000 }, + { 0x00400801, 0x25d40231, 0x0069907c, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00110220, 0x34001c00, 0x00001400, 0xfffffab8 }, + { 0x02000005, 0x20003dac, 0x0200002a, 0x00020002 }, + { 0x00200401, 0x27e001a1, 0x004505c0, 0x00000000 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x000f000f }, + { 0x00802001, 0x20400022, 0x008d00c0, 0x00000000 }, + { 0x00802001, 0x20800022, 0x008d0100, 0x00000000 }, + { 0x00802001, 0x20c00022, 0x008d0140, 0x00000000 }, + { 0x00802001, 0x21000022, 0x008d0180, 0x00000000 }, + { 0x00010001, 0x22000060, 0x02000000, 0x12082703 }, + { 0x00110001, 0x22000060, 0x02000000, 0x12082603 }, + { 0x01600031, 0x20000020, 0x508d07e0, 0x00000200 }, + { 0x02000005, 0x20003dac, 0x0200002a, 0x00020002 }, + { 0x00200401, 0x27e001a1, 0x004505c8, 0x00000000 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x0003000f }, + { 0x00802001, 0x20400022, 0x008d0080, 0x00000000 }, + { 0x00010001, 0x22000060, 0x02000000, 0x0618a703 }, + { 0x00110001, 0x22000060, 0x02000000, 0x0618a603 }, + { 0x01600031, 0x26400021, 0x508d07e0, 0x00000200 }, + { 0x00800401, 0x23400231, 0x00a900cc, 0x00000000 }, + { 0x00800801, 0x23500231, 0x00a9010c, 0x00000000 }, + { 0x00800401, 0x23600231, 0x00a9014c, 0x00000000 }, + { 0x00800801, 0x23700231, 0x00a9018c, 0x00000000 }, + { 0x00800401, 0x23800231, 0x00cf0340, 0x00000000 }, + { 0x00800801, 0x23900231, 0x00cf0341, 0x00000000 }, + { 0x00800401, 0x23a00231, 0x00cf0342, 0x00000000 }, + { 0x00800801, 0x23b00231, 0x00cf0343, 0x00000000 }, + { 0x00802001, 0x202000a2, 0x008d0380, 0x00000000 }, + { 0x00000008, 0x27e03d29, 0x00000026, 0x00010001 }, + { 0x00800031, 0x20001d28, 0x608d07e0, 0x06080020 }, + { 0x00600001, 0x26400021, 0x008d0640, 0x00000000 }, + { 0x00600001, 0x260001e1, 0x00000000, 0x00000000 }, + { 0x00000009, 0x26143da1, 0x000005e2, 0x00120012 }, + { 0x00000440, 0x26141c21, 0x00000614, 0x00020000 }, + { 0x00000c01, 0x26120129, 0x0000000c, 0x00000000 }, + { 0x00000c01, 0x26100169, 0x00000000, 0x12121212 }, + { 0x00400801, 0x26000171, 0x00000000, 0xffffffff }, + { 0x00600031, 0x20001c20, 0x308d0600, 0x82008002 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00020002 }, + { 0x02000005, 0x20003dac, 0x0200002a, 0x00020002 }, + { 0x00000440, 0x27e03da1, 0x000005c0, 0x000c000c }, + { 0x00000c01, 0x27e401a1, 0x000005c2, 0x00000000 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x000f0003 }, + { 0x00018022, 0x34001c00, 0x00001400, 0x00000006 }, + { 0x00000001, 0x22000060, 0x00000000, 0x02286003 }, + { 0x00010040, 0x27e43ca5, 0x020007e4, 0x00100010 }, + { 0x00008024, 0x34001c00, 0x00001400, 0x00010008 }, + { 0x00010001, 0x22000060, 0x02000000, 0x02286703 }, + { 0x00110001, 0x22000060, 0x02000000, 0x02286603 }, + { 0x00008025, 0x20000000, 0x00000000, 0x00000000 }, + { 0x02600031, 0x23400025, 0x408d07e0, 0x00000200 }, + { 0x00800401, 0x23800231, 0x00cf0340, 0x00000000 }, + { 0x00800801, 0x23900231, 0x00cf0341, 0x00000000 }, + { 0x00800401, 0x23a00231, 0x00cf0342, 0x00000000 }, + { 0x00800801, 0x23b00231, 0x00cf0343, 0x00000000 }, + { 0x00802001, 0x202000a2, 0x008d0380, 0x00000000 }, + { 0x00000008, 0x27e03d29, 0x00000026, 0x00010001 }, + { 0x00800031, 0x20001d28, 0x608d07e0, 0x06080020 }, + { 0x00600001, 0x260001e1, 0x00000000, 0x00000000 }, + { 0x00000009, 0x26143da1, 0x000005e2, 0x00120012 }, + { 0x00000440, 0x26141c21, 0x00000614, 0x00020000 }, + { 0x00000c01, 0x26120129, 0x0000000c, 0x00000000 }, + { 0x00000c01, 0x26100169, 0x00000000, 0x12121212 }, + { 0x00400801, 0x26000171, 0x00000000, 0xffffffff }, + { 0x00600031, 0x20001c20, 0x308d0600, 0x82008002 }, + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x00600001, 0x27e00021, 0x008d0000, 0x00000000 }, + { 0x00a02001, 0x20400169, 0x00000000, 0x00000000 }, + { 0x00000001, 0x206601ed, 0x00000000, 0x00030003 }, + { 0x00000009, 0x20663dad, 0x00000066, 0x000a000a }, + { 0x00000001, 0x206801ed, 0x00000000, 0x01400140 }, + { 0x00000001, 0x22600169, 0x00000000, 0x00030003 }, + { 0x00000008, 0x22403dad, 0x00000026, 0x00010001 }, + { 0x00000041, 0x224235ad, 0x00000020, 0x00000022 }, + { 0x00600001, 0x20200022, 0x008d0000, 0x00000000 }, + { 0x00000001, 0x203c0022, 0x00000018, 0x00000000 }, + { 0x00000001, 0x203f01f2, 0x00000000, 0x00000000 }, + { 0x00000001, 0x202c00e2, 0x00000000, 0x00000000 }, + { 0x00000001, 0x202c010a, 0x00000e00, 0x00000000 }, + { 0x00600001, 0x20400021, 0x008d0020, 0x00000000 }, + { 0x00400001, 0x205401ed, 0x00000000, 0x00000000 }, + { 0x00200040, 0x20583dad, 0x00450020, 0xffffffff }, + { 0x00000001, 0x22000060, 0x00000000, 0x06080000 }, + { 0x00600001, 0x26000021, 0x008d0000, 0x00000000 }, + { 0x00000001, 0x26140061, 0x00000000, 0x00c00400 }, + { 0x00000001, 0x26100169, 0x00000000, 0x12121212 }, + { 0x07600031, 0x26201c21, 0x308d0600, 0x02000000 }, + { 0x00200401, 0x208000e5, 0x00000000, 0x00000000 }, + { 0x00000c01, 0x208800e5, 0x00000000, 0xffffffc4 }, + { 0x00000801, 0x208c00e5, 0x00000000, 0xffffffc8 }, + { 0x00200001, 0x260001ec, 0x00000000, 0x00000000 }, + { 0x00600001, 0x20000022, 0x008d07e0, 0x00000000 }, + { 0x00000040, 0x20283c22, 0x00000008, 0x00100010 }, + { 0x00000001, 0x206001ed, 0x00000000, 0x00020002 }, + { 0x00000001, 0x206201ad, 0x0000005a, 0x00000000 }, + { 0x00000001, 0x20a001ed, 0x00000000, 0x00000000 }, + { 0x00200001, 0x228001ed, 0x00000000, 0x00000000 }, + { 0x00802001, 0x20c00061, 0x00000000, 0x00ff00ff }, + { 0x00802001, 0x21000061, 0x00000000, 0x00ff00ff }, + { 0x00802001, 0x21400061, 0x00000000, 0x00ff00ff }, + { 0x00802001, 0x21800061, 0x00000000, 0x00ff00ff }, + { 0x00802001, 0x21c00061, 0x00000000, 0x00ff00ff }, + { 0x00000041, 0x22083dac, 0x00000056, 0x00040004 }, + { 0x05000010, 0x200035ac, 0x02000280, 0x00000240 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x00000004 }, + { 0x00000040, 0x22803dad, 0x00000280, 0xffffffff }, + { 0x00000030, 0x32000084, 0x00001200, 0x00000000 }, + { 0x01000010, 0x20002d28, 0x000090c2, 0x00000000 }, + { 0x03000010, 0x200035ac, 0x02000054, 0x00000058 }, + { 0x00800001, 0x240001ac, 0x00000068, 0x00000000 }, + { 0x00000048, 0x22a03dad, 0x00000056, 0x00040004 }, + { 0x00010220, 0x34001c00, 0x00001400, 0xfffffff2 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x00000014 }, + { 0x00200001, 0xb0c00229, 0x00450054, 0x00000000 }, + { 0x00200040, 0x22803dad, 0x00450280, 0x00010001 }, + { 0x00000001, 0x20300022, 0x00000010, 0x00000000 }, + { 0x00000001, 0x20380122, 0x00000260, 0x00000000 }, + { 0x00800001, 0x204001ae, 0x00b10040, 0x00000000 }, + { 0x00000008, 0x20003d2a, 0x000002a0, 0x00010001 }, + { 0x00000040, 0x22602d29, 0x00000260, 0x00020002 }, + { 0x00800031, 0x20000008, 0x608d0000, 0x00000200 }, + { 0x00000006, 0x203025a2, 0x00000066, 0x000002a0 }, + { 0x01600031, 0x20001c00, 0x708d0000, 0x02000001 }, + { 0x04200010, 0x200035ac, 0x00450054, 0x00450060 }, + { 0x00010040, 0x20a03dad, 0x02000056, 0x00010001 }, + { 0x05200010, 0x200035ac, 0x02450280, 0x00450240 }, + { 0x00000001, 0x240001ec, 0x00000000, 0x00040004 }, + { 0x00000048, 0x22083dac, 0x00000056, 0x00040004 }, + { 0x00200040, 0x205455ad, 0x00450054, 0x00450034 }, + { 0x02000010, 0x20003d8c, 0x00000600, 0x00010001 }, + { 0x00000041, 0x220e3d8c, 0x00000602, 0x00040004 }, + { 0x00010041, 0x22083dac, 0x000000a0, 0x00040004 }, + { 0x00010401, 0x205601ad, 0x000000a0, 0x00000000 }, + { 0x00010840, 0x20543d2d, 0x000090c0, 0x00010001 }, + { 0x00000220, 0x34001400, 0x00001400, 0x00009c80 }, + { 0x01000010, 0x20003dac, 0x02000280, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x00000014 }, + { 0x00000030, 0x32000084, 0x00001200, 0x00000000 }, + { 0x00000040, 0x22803dad, 0x00000280, 0xffffffff }, + { 0x00600401, 0x260001e1, 0x00000000, 0x00000000 }, + { 0x00000c01, 0x26140061, 0x00000000, 0x01800000 }, + { 0x00000c01, 0x26120129, 0x0000000c, 0x00000000 }, + { 0x00000801, 0x26100169, 0x00000000, 0x12121212 }, + { 0x00000040, 0x2078252d, 0x00000026, 0x00004280 }, + { 0x00400001, 0x26000231, 0x00000078, 0x00000000 }, + { 0x00600031, 0x26201c21, 0x308d0600, 0x02000002 }, + { 0x00000220, 0x34001c00, 0x00001400, 0xffffffe8 }, + { 0x07600031, 0x20001c20, 0x30000000, 0x02000001 }, + { 0x01600031, 0x20001c24, 0x708d0000, 0x82000012 }, + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x00600001, 0x27e00021, 0x008d0000, 0x00000000 }, + { 0x00600009, 0x25c03dad, 0x00050034, 0x00040004 }, + { 0x00000001, 0x220801ec, 0x00000000, 0x02400240 }, + { 0x00000041, 0x25e435a1, 0x00000020, 0x00000036 }, + { 0x00000040, 0x25e43421, 0x000005e4, 0x00000034 }, + { 0x00000041, 0x27e82c21, 0x000005e4, 0x00400040 }, + { 0x00000001, 0x240001ec, 0x00000000, 0x01400140 }, + { 0x00000048, 0x20263dad, 0x00000036, 0x00040004 }, + { 0x00000040, 0x25c43dad, 0x000005c4, 0xfffcfffc }, + { 0x00000040, 0x25ca3dad, 0x000005ca, 0xfffcfffc }, + { 0x00800001, 0x2220022d, 0x000d002c, 0x00000000 }, + { 0x00600040, 0x22303dad, 0x008d0230, 0x00080008 }, + { 0x01600031, 0x22401c21, 0x408d07e0, 0x02885800 }, + { 0x01800005, 0x20002d28, 0x02b19040, 0xffffffff }, + { 0x02000005, 0x20003e2c, 0x00009030, 0x00010001 }, + { 0x00000001, 0x25e20129, 0x00000036, 0x00000000 }, + { 0x000b0220, 0x34001c00, 0x02001400, 0x0000013a }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000138 }, + { 0x02000005, 0x20003dac, 0x0200002a, 0x00020002 }, + { 0x00000401, 0x27e001a1, 0x000005c0, 0x00000000 }, + { 0x00000c0c, 0x27e43da1, 0x000005c2, 0x00010001 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x0007000f }, + { 0x00010001, 0x22000060, 0x02000000, 0x0248e702 }, + { 0x00110001, 0x22000060, 0x02000000, 0x0248e602 }, + { 0x02600031, 0x20c00021, 0x408d07e0, 0x00000200 }, + { 0x02000005, 0x20003dac, 0x0200002a, 0x00020002 }, + { 0x00000401, 0x27e001a1, 0x000005c8, 0x00000000 }, + { 0x00000c0c, 0x27e43da1, 0x000005ca, 0x00010001 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x0001000f }, + { 0x00010001, 0x22000060, 0x02000000, 0x02186704 }, + { 0x00110001, 0x22000060, 0x02000000, 0x02186604 }, + { 0x02600031, 0x20800021, 0x408d07e0, 0x00000200 }, + { 0x00800001, 0x2380012d, 0x008900c0, 0x00000000 }, + { 0x00800001, 0x23a0012d, 0x00890100, 0x00000000 }, + { 0x00800001, 0x23c0012d, 0x008900c8, 0x00000000 }, + { 0x00800001, 0x23e0012d, 0x00890108, 0x00000000 }, + { 0x00600401, 0x20c001a9, 0x00ab0380, 0x00000000 }, + { 0x00600801, 0x20d001a9, 0x00ab0382, 0x00000000 }, + { 0x00600401, 0x20e001a9, 0x00ab0384, 0x00000000 }, + { 0x00600801, 0x20f001a9, 0x00ab0386, 0x00000000 }, + { 0x00600401, 0x210001a9, 0x00ab03c0, 0x00000000 }, + { 0x00600801, 0x211001a9, 0x00ab03c2, 0x00000000 }, + { 0x00600401, 0x212001a9, 0x00ab03c4, 0x00000000 }, + { 0x00600801, 0x213001a9, 0x00ab03c6, 0x00000000 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00400040 }, + { 0x00800008, 0x2340352d, 0x00009050, 0x008d0220 }, + { 0x00800008, 0x2360352d, 0x00009052, 0x008d0220 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000020 }, + { 0x02600005, 0x20003dac, 0x00ae0340, 0x00010001 }, + { 0x02600005, 0x20003dac, 0x02ae0360, 0x00010001 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00400040 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x00c000c0 }, + { 0x00200401, 0x25d0022d, 0x004590c0, 0x00000000 }, + { 0x00400801, 0x25d40231, 0x006990a0, 0x00000000 }, + { 0x00200001, 0x25d80109, 0x00450600, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0xfffffc0c }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00410041 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x00c100c1 }, + { 0x00200401, 0x25d0022d, 0x004590c8, 0x00000000 }, + { 0x00400801, 0x25d40231, 0x006990b0, 0x00000000 }, + { 0x00200001, 0x26000128, 0x004505d8, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0xfffffbfe }, + { 0x00800008, 0x2340352d, 0x00009042, 0x008d0220 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00e000e0 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x01000100 }, + { 0x00200401, 0x25d0022d, 0x004590c4, 0x00000000 }, + { 0x00400801, 0x25d40231, 0x006990a4, 0x00000000 }, + { 0x02600005, 0x20003dac, 0x00ae0340, 0x00010001 }, + { 0x00000001, 0x260201e8, 0x00000000, 0x00000000 }, + { 0x00000401, 0x25da01e9, 0x00000000, 0x00000000 }, + { 0x00000801, 0x25d80109, 0x00000600, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0xfffffbe8 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00e100e1 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x01010101 }, + { 0x00200401, 0x25d0022d, 0x004590cc, 0x00000000 }, + { 0x00400801, 0x25d40231, 0x006990b4, 0x00000000 }, + { 0x00200001, 0x26000128, 0x004505d8, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0xfffffbda }, + { 0x02000005, 0x20003dac, 0x0200002a, 0x00020002 }, + { 0x00000401, 0x27e001a1, 0x000005c4, 0x00000000 }, + { 0x00000c0c, 0x27e43da1, 0x000005c6, 0x00010001 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x00070003 }, + { 0x00600401, 0x2340012d, 0x00890040, 0x00000000 }, + { 0x00600801, 0x2350012d, 0x00890048, 0x00000000 }, + { 0x00600001, 0x204001aa, 0x00270340, 0x00000000 }, + { 0x00600001, 0x205001aa, 0x00270350, 0x00000000 }, + { 0x00010001, 0x22000060, 0x02000000, 0x04082704 }, + { 0x00110001, 0x22000060, 0x02000000, 0x04082604 }, + { 0x01600031, 0x20000020, 0x508d07e0, 0x00000200 }, + { 0x00800001, 0x2380012d, 0x008900c0, 0x00000000 }, + { 0x00800001, 0x23a0012d, 0x00890100, 0x00000000 }, + { 0x00800001, 0x23c0012d, 0x008900c8, 0x00000000 }, + { 0x00800001, 0x23e0012d, 0x00890108, 0x00000000 }, + { 0x00600401, 0x20c001a9, 0x00ab0380, 0x00000000 }, + { 0x00600801, 0x20d001a9, 0x00ab0382, 0x00000000 }, + { 0x00600401, 0x20e001a9, 0x00ab0384, 0x00000000 }, + { 0x00600801, 0x20f001a9, 0x00ab0386, 0x00000000 }, + { 0x00600401, 0x210001a9, 0x00ab03c0, 0x00000000 }, + { 0x00600801, 0x211001a9, 0x00ab03c2, 0x00000000 }, + { 0x00600401, 0x212001a9, 0x00ab03c4, 0x00000000 }, + { 0x00600801, 0x213001a9, 0x00ab03c6, 0x00000000 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00800080 }, + { 0x00800008, 0x2340352d, 0x00009054, 0x008d0220 }, + { 0x00800008, 0x2360352d, 0x00009056, 0x008d0220 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000020 }, + { 0x02600005, 0x20003dac, 0x00ae0340, 0x00010001 }, + { 0x02600005, 0x20003dac, 0x02ae0360, 0x00010001 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00800080 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x00c000c0 }, + { 0x00200401, 0x25d0022d, 0x004590c2, 0x00000000 }, + { 0x00400801, 0x25d40231, 0x006990a8, 0x00000000 }, + { 0x00200001, 0x25d80109, 0x00450600, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0xfffffb92 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00810081 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x00c100c1 }, + { 0x00200401, 0x25d0022d, 0x004590ca, 0x00000000 }, + { 0x00400801, 0x25d40231, 0x006990b8, 0x00000000 }, + { 0x00200001, 0x26000128, 0x004505d8, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0xfffffb84 }, + { 0x00800008, 0x2340352d, 0x00009048, 0x008d0220 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00e000e0 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x01000100 }, + { 0x00200401, 0x25d0022d, 0x004590c4, 0x00000000 }, + { 0x00400801, 0x25d40231, 0x006990ac, 0x00000000 }, + { 0x02600005, 0x20003dac, 0x00ae0340, 0x00010001 }, + { 0x00000001, 0x260201e8, 0x00000000, 0x00000000 }, + { 0x00000401, 0x25da01e9, 0x00000000, 0x00000000 }, + { 0x00000801, 0x25d80109, 0x00000600, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0xfffffb6e }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00e100e1 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x01010101 }, + { 0x00200401, 0x25d0022d, 0x004590cc, 0x00000000 }, + { 0x00400801, 0x25d40231, 0x006990bc, 0x00000000 }, + { 0x00200001, 0x26000128, 0x004505d8, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0xfffffb60 }, + { 0x02000005, 0x20003dac, 0x0200002a, 0x00020002 }, + { 0x00000401, 0x27e001a1, 0x000005c0, 0x00000000 }, + { 0x00000c0c, 0x27e43da1, 0x000005c2, 0x00010001 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x0007000f }, + { 0x00802001, 0x20400022, 0x008d00c0, 0x00000000 }, + { 0x00802001, 0x20800022, 0x008d0100, 0x00000000 }, + { 0x00010001, 0x22000060, 0x02000000, 0x0a082704 }, + { 0x00110001, 0x22000060, 0x02000000, 0x0a082604 }, + { 0x01600031, 0x20000020, 0x508d07e0, 0x00000200 }, + { 0x02000005, 0x20003dac, 0x0200002a, 0x00020002 }, + { 0x00000401, 0x27e001a1, 0x000005c8, 0x00000000 }, + { 0x00000c0c, 0x27e43da1, 0x000005ca, 0x00010001 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x0001000f }, + { 0x00600001, 0x20400022, 0x008d0080, 0x00000000 }, + { 0x00010001, 0x22000060, 0x02000000, 0x0418a704 }, + { 0x00110001, 0x22000060, 0x02000000, 0x0418a604 }, + { 0x01600031, 0x26400021, 0x508d07e0, 0x00000200 }, + { 0x00600401, 0x2340012d, 0x008500cc, 0x00000000 }, + { 0x00600801, 0x2350012d, 0x0085010c, 0x00000000 }, + { 0x00800001, 0x236001ad, 0x002e0340, 0x00000000 }, + { 0x00600001, 0x202000a2, 0x008d0360, 0x00000000 }, + { 0x00000008, 0x27e03d29, 0x00000026, 0x00010001 }, + { 0x00800031, 0x20001d28, 0x608d07e0, 0x04080020 }, + { 0x00600001, 0x26400021, 0x008d0640, 0x00000000 }, + { 0x00600001, 0x260001e1, 0x00000000, 0x00000000 }, + { 0x00000009, 0x26143da1, 0x000005e2, 0x00120012 }, + { 0x00000440, 0x26141c21, 0x00000614, 0x00020000 }, + { 0x00000c01, 0x26120129, 0x0000000c, 0x00000000 }, + { 0x00000c01, 0x26100169, 0x00000000, 0x12121212 }, + { 0x00400801, 0x26000171, 0x00000000, 0xffffffff }, + { 0x00600031, 0x20001c20, 0x308d0600, 0x82008002 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00020002 }, + { 0x02000005, 0x20003dac, 0x0200002a, 0x00020002 }, + { 0x00000440, 0x27e03da1, 0x000005c0, 0x000c000c }, + { 0x00000c0c, 0x27e43da1, 0x000005c2, 0x00010001 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x00070003 }, + { 0x00018022, 0x34001c00, 0x00001400, 0x00000006 }, + { 0x00000001, 0x22000060, 0x00000000, 0x02186004 }, + { 0x00010040, 0x27e43ca5, 0x020007e4, 0x00080008 }, + { 0x00008024, 0x34001c00, 0x00001400, 0x00010008 }, + { 0x00010001, 0x22000060, 0x02000000, 0x02186704 }, + { 0x00110001, 0x22000060, 0x02000000, 0x02186604 }, + { 0x00008025, 0x20000000, 0x00000000, 0x00000000 }, + { 0x02600031, 0x23400025, 0x408d07e0, 0x00000200 }, + { 0x00800001, 0x236001ad, 0x002e0340, 0x00000000 }, + { 0x00600001, 0x202000a2, 0x008d0360, 0x00000000 }, + { 0x00000008, 0x27e03d29, 0x00000026, 0x00010001 }, + { 0x00800031, 0x20001d28, 0x608d07e0, 0x04080020 }, + { 0x00600001, 0x260001e1, 0x00000000, 0x00000000 }, + { 0x00000009, 0x26143da1, 0x000005e2, 0x00120012 }, + { 0x00000440, 0x26141c21, 0x00000614, 0x00020000 }, + { 0x00000c01, 0x26120129, 0x0000000c, 0x00000000 }, + { 0x00000c01, 0x26100169, 0x00000000, 0x12121212 }, + { 0x00400801, 0x26000171, 0x00000000, 0xffffffff }, + { 0x00600031, 0x20001c20, 0x308d0600, 0x82008002 }, + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x00600001, 0x27e00021, 0x008d0000, 0x00000000 }, + { 0x00a02001, 0x20400169, 0x00000000, 0x00000000 }, + { 0x00000001, 0x206601ed, 0x00000000, 0x00010001 }, + { 0x00000009, 0x20663dad, 0x00000066, 0x000a000a }, + { 0x00000001, 0x22600169, 0x00000000, 0x00010001 }, + { 0x00000008, 0x22403dad, 0x00000026, 0x00010001 }, + { 0x00000041, 0x224235ad, 0x00000020, 0x00000022 }, + { 0x00600001, 0x20200022, 0x008d0000, 0x00000000 }, + { 0x00000001, 0x203c0022, 0x00000018, 0x00000000 }, + { 0x00000001, 0x203f01f2, 0x00000000, 0x00000000 }, + { 0x00000001, 0x202c00e2, 0x00000000, 0x00000000 }, + { 0x00000001, 0x202c010a, 0x00000e00, 0x00000000 }, + { 0x00600001, 0x20400021, 0x008d0020, 0x00000000 }, + { 0x00400001, 0x205401ed, 0x00000000, 0x00000000 }, + { 0x00200040, 0x20583dad, 0x00450020, 0xffffffff }, + { 0x00000001, 0x22000060, 0x00000000, 0x06080000 }, + { 0x00600001, 0x26000021, 0x008d0000, 0x00000000 }, + { 0x00000001, 0x26140061, 0x00000000, 0x00c00400 }, + { 0x00000001, 0x26100169, 0x00000000, 0x12121212 }, + { 0x07600031, 0x26201c21, 0x308d0600, 0x02000000 }, + { 0x00000001, 0x22a00169, 0x00000000, 0x01400140 }, + { 0x00000040, 0x20283c22, 0x00000008, 0x00200020 }, + { 0x00000001, 0x203801e2, 0x00000000, 0x00010001 }, + { 0x00800001, 0x204001ae, 0x00b10020, 0x00000000 }, + { 0x00000008, 0x27e03d29, 0x000002a0, 0x00010001 }, + { 0x00800031, 0x20000128, 0x608d07e0, 0x00000200 }, + { 0x00000006, 0x203025a2, 0x00000066, 0x000002a0 }, + { 0x01600031, 0x20001c00, 0x708d0000, 0x02000001 }, + { 0x00000001, 0x20300022, 0x00000010, 0x00000000 }, + { 0x00000001, 0x22a00169, 0x00000000, 0x00000000 }, + { 0x00000001, 0x22600169, 0x00000000, 0x00020002 }, + { 0x00200401, 0x208000e5, 0x00000000, 0x00000000 }, + { 0x00000c01, 0x208800e5, 0x00000000, 0xffffffc6 }, + { 0x00000801, 0x208c00e5, 0x00000000, 0xffffffca }, + { 0x00200001, 0x260001ec, 0x00000000, 0x00000000 }, + { 0x00600001, 0x20000022, 0x008d07e0, 0x00000000 }, + { 0x00000040, 0x20283c22, 0x00000008, 0x00100010 }, + { 0x00000001, 0x206001ed, 0x00000000, 0x00020002 }, + { 0x00000001, 0x206201ad, 0x0000005a, 0x00000000 }, + { 0x00000001, 0x20a001ed, 0x00000000, 0x00000000 }, + { 0x00200001, 0x228001ed, 0x00000000, 0x00000000 }, + { 0x00802001, 0x20c00061, 0x00000000, 0x00ff00ff }, + { 0x00802001, 0x21000061, 0x00000000, 0x00ff00ff }, + { 0x00802001, 0x21400061, 0x00000000, 0x00ff00ff }, + { 0x00802001, 0x21800061, 0x00000000, 0x00ff00ff }, + { 0x00802001, 0x21c00061, 0x00000000, 0x00ff00ff }, + { 0x00000041, 0x22083dac, 0x00000056, 0x00040004 }, + { 0x05000010, 0x200035ac, 0x02000280, 0x00000240 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x00000004 }, + { 0x00000040, 0x22803dad, 0x00000280, 0xffffffff }, + { 0x00000030, 0x32000084, 0x00001200, 0x00000000 }, + { 0x01000010, 0x20002d28, 0x000090c2, 0x00000000 }, + { 0x03000010, 0x200035ac, 0x02000054, 0x00000058 }, + { 0x00000041, 0x22a03dad, 0x00000056, 0x00040004 }, + { 0x00010220, 0x34001c00, 0x00001400, 0xfffffff4 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x00000014 }, + { 0x00200001, 0xb0c00229, 0x00450054, 0x00000000 }, + { 0x00200040, 0x22803dad, 0x00450280, 0x00010001 }, + { 0x00000001, 0x20300022, 0x00000010, 0x00000000 }, + { 0x00000001, 0x20380122, 0x00000260, 0x00000000 }, + { 0x00800001, 0x204001ae, 0x00b10040, 0x00000000 }, + { 0x00000008, 0x20003d2a, 0x000002a0, 0x00010001 }, + { 0x00000040, 0x22602d29, 0x00000260, 0x00020002 }, + { 0x00800031, 0x20000008, 0x608d0000, 0x00000200 }, + { 0x00000006, 0x203025a2, 0x00000066, 0x000002a0 }, + { 0x01600031, 0x20001c00, 0x708d0000, 0x02000001 }, + { 0x04200010, 0x200035ac, 0x00450054, 0x00450060 }, + { 0x00010040, 0x20a03dad, 0x02000056, 0x00010001 }, + { 0x05200010, 0x200035ac, 0x02450280, 0x00450240 }, + { 0x00000001, 0x240001ec, 0x00000000, 0x00040004 }, + { 0x00000048, 0x22083dac, 0x00000056, 0x00040004 }, + { 0x00200040, 0x205455ad, 0x00450054, 0x00450034 }, + { 0x02000010, 0x20003d8c, 0x00000600, 0x00010001 }, + { 0x00000041, 0x220e3d8c, 0x00000602, 0x00040004 }, + { 0x00010041, 0x22083dac, 0x000000a0, 0x00040004 }, + { 0x00010401, 0x205601ad, 0x000000a0, 0x00000000 }, + { 0x00010840, 0x20543d2d, 0x000090c0, 0x00010001 }, + { 0x00000220, 0x34001400, 0x00001400, 0x00009c80 }, + { 0x01000010, 0x20003dac, 0x02000280, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x00000006 }, + { 0x00000030, 0x32000084, 0x00001200, 0x00000000 }, + { 0x00000040, 0x22803dad, 0x00000280, 0xffffffff }, + { 0x00000220, 0x34001c00, 0x00001400, 0xfffffff6 }, + { 0x05000010, 0x200035ac, 0x00000240, 0x00000026 }, + { 0x00010220, 0x34001c00, 0x00001400, 0xfffffffc }, + { 0x07600031, 0x20001c20, 0x30000000, 0x02000001 }, + { 0x01600031, 0x20001c24, 0x708d0000, 0x82000000 }, + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x00600001, 0x27e00021, 0x008d0000, 0x00000000 }, + { 0x00400441, 0x45c03dad, 0x00000034, 0x00100010 }, + { 0x00400841, 0x45c23dad, 0x00000036, 0x00200020 }, + { 0x00200001, 0x260001ec, 0x00000000, 0x00000000 }, + { 0x00000001, 0x25e20129, 0x00000036, 0x00000000 }, + { 0x00000041, 0x25e435a1, 0x00000020, 0x00000036 }, + { 0x00000040, 0x25e43421, 0x000005e4, 0x00000034 }, + { 0x00000041, 0x25e42c21, 0x000005e4, 0x00800080 }, + { 0x00000040, 0x25c43dad, 0x000005c4, 0xfffcfffc }, + { 0x00000040, 0x25ca3dad, 0x000005ca, 0xfffcfffc }, + { 0x00000005, 0x202a3dad, 0x0000002a, 0xfffdfffd }, + { 0x02000005, 0x20002d2c, 0x0200002a, 0x00020002 }, + { 0x00000001, 0x27e80021, 0x000005e4, 0x00000000 }, + { 0x00010040, 0x27e83c21, 0x020007e8, 0x00400040 }, + { 0x01600031, 0x22401c21, 0x408d07e0, 0x02885800 }, + { 0x00000001, 0x220801ec, 0x00000000, 0x02400240 }, + { 0x01800005, 0x20002d28, 0x02b19040, 0xffffffff }, + { 0x02000005, 0x20003e2c, 0x00009030, 0x00010001 }, + { 0x00000005, 0x25ec2e29, 0x00009002, 0x000a000a }, + { 0x00000005, 0x25ea2e29, 0x00009002, 0x00060006 }, + { 0x000b0220, 0x34001c00, 0x02001400, 0x00000252 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000250 }, + { 0x01000010, 0x20003d2c, 0x000005ec, 0x00080008 }, + { 0x00000005, 0x25e03d8d, 0x00000600, 0x00010001 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00020002 }, + { 0x02000005, 0x20003dac, 0x0200002a, 0x00020002 }, + { 0x00200401, 0x27e001a5, 0x004505c0, 0x00000000 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x000f000f }, + { 0x00018022, 0x34001c00, 0x00001400, 0x00000006 }, + { 0x00000001, 0x22000060, 0x00000000, 0x0288a001 }, + { 0x00010040, 0x27e43ca5, 0x020007e4, 0x00100010 }, + { 0x00008024, 0x34001c00, 0x00001400, 0x0001000a }, + { 0x00010001, 0x22000060, 0x02000000, 0x0288e701 }, + { 0x00110001, 0x22000060, 0x02000000, 0x0288e601 }, + { 0x0000000c, 0x27e43ca5, 0x000007e4, 0x00010001 }, + { 0x00008025, 0x20000000, 0x00000000, 0x00000000 }, + { 0x01600031, 0x20c00021, 0x408d07e0, 0x00000200 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00020002 }, + { 0x02000005, 0x20003dac, 0x0200002a, 0x00020002 }, + { 0x00200401, 0x27e001a1, 0x004505c4, 0x00000000 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x000f0003 }, + { 0x00018022, 0x34001c00, 0x00001400, 0x00000006 }, + { 0x00000001, 0x22000060, 0x00000000, 0x02286003 }, + { 0x00010040, 0x27e43ca5, 0x020007e4, 0x00100010 }, + { 0x00008024, 0x34001c00, 0x00001400, 0x0001000a }, + { 0x00010001, 0x22000060, 0x02000000, 0x02286703 }, + { 0x00110001, 0x22000060, 0x02000000, 0x02286603 }, + { 0x0000000c, 0x27e43ca5, 0x000007e4, 0x00010001 }, + { 0x00008025, 0x20000000, 0x00000000, 0x00000000 }, + { 0x02600031, 0x23400025, 0x408d07e0, 0x00000200 }, + { 0x00800401, 0x23800231, 0x00a900c0, 0x00000000 }, + { 0x00800801, 0x23900231, 0x00a90100, 0x00000000 }, + { 0x00800401, 0x23a00231, 0x00a90140, 0x00000000 }, + { 0x00800801, 0x23b00231, 0x00a90180, 0x00000000 }, + { 0x00800401, 0x23c00231, 0x00a900c4, 0x00000000 }, + { 0x00800801, 0x23d00231, 0x00a90104, 0x00000000 }, + { 0x00800401, 0x23e00231, 0x00a90144, 0x00000000 }, + { 0x00800801, 0x23f00231, 0x00a90184, 0x00000000 }, + { 0x00800401, 0x24000231, 0x00a900c8, 0x00000000 }, + { 0x00800801, 0x24100231, 0x00a90108, 0x00000000 }, + { 0x00800401, 0x24200231, 0x00a90148, 0x00000000 }, + { 0x00800801, 0x24300231, 0x00a90188, 0x00000000 }, + { 0x00800401, 0x24400231, 0x00a900cc, 0x00000000 }, + { 0x00800801, 0x24500231, 0x00a9010c, 0x00000000 }, + { 0x00800401, 0x24600231, 0x00a9014c, 0x00000000 }, + { 0x00800801, 0x24700231, 0x00a9018c, 0x00000000 }, + { 0x00800401, 0x20c00231, 0x00cf0380, 0x00000000 }, + { 0x00800801, 0x20d00231, 0x00cf0381, 0x00000000 }, + { 0x00800401, 0x20e00231, 0x00cf0382, 0x00000000 }, + { 0x00800801, 0x20f00231, 0x00cf0383, 0x00000000 }, + { 0x00800401, 0x21000231, 0x00cf03c0, 0x00000000 }, + { 0x00800801, 0x21100231, 0x00cf03c1, 0x00000000 }, + { 0x00800401, 0x21200231, 0x00cf03c2, 0x00000000 }, + { 0x00800801, 0x21300231, 0x00cf03c3, 0x00000000 }, + { 0x00800401, 0x21400231, 0x00cf0400, 0x00000000 }, + { 0x00800801, 0x21500231, 0x00cf0401, 0x00000000 }, + { 0x00800401, 0x21600231, 0x00cf0402, 0x00000000 }, + { 0x00800801, 0x21700231, 0x00cf0403, 0x00000000 }, + { 0x00800401, 0x21800231, 0x00cf0440, 0x00000000 }, + { 0x00800801, 0x21900231, 0x00cf0441, 0x00000000 }, + { 0x00800401, 0x21a00231, 0x00cf0442, 0x00000000 }, + { 0x00800801, 0x21b00231, 0x00cf0443, 0x00000000 }, + { 0x00800401, 0x20400231, 0x00cf0340, 0x00000000 }, + { 0x00800801, 0x20500231, 0x00cf0341, 0x00000000 }, + { 0x00800401, 0x20600231, 0x00cf0342, 0x00000000 }, + { 0x00800801, 0x20700231, 0x00cf0343, 0x00000000 }, + { 0x01600010, 0x20003d2c, 0x000005ea, 0x00040004 }, + { 0x01600010, 0x20003d2c, 0x020005ea, 0x00020002 }, + { 0x00800001, 0x21c00229, 0x00009080, 0x00000000 }, + { 0x00800001, 0x21e00229, 0x00009081, 0x00000000 }, + { 0x00800001, 0x22000229, 0x00289060, 0x00000000 }, + { 0x00610401, 0x41c00229, 0x00009080, 0x00000000 }, + { 0x00610801, 0x41c20229, 0x00009090, 0x00000000 }, + { 0x00610401, 0x41e00229, 0x00009081, 0x00000000 }, + { 0x00610801, 0x41e20229, 0x00009091, 0x00000000 }, + { 0x00610401, 0x42000229, 0x00249060, 0x00000000 }, + { 0x00610801, 0x42020229, 0x00249098, 0x00000000 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00400040 }, + { 0x00610401, 0x21c00229, 0x02009080, 0x00000000 }, + { 0x00610801, 0x21d00229, 0x02009090, 0x00000000 }, + { 0x00610401, 0x21e00229, 0x02009081, 0x00000000 }, + { 0x00610801, 0x21f00229, 0x02009091, 0x00000000 }, + { 0x00610401, 0x22000229, 0x02249060, 0x00000000 }, + { 0x00610801, 0x22100229, 0x02249098, 0x00000000 }, + { 0x00800008, 0x25a03d29, 0x008d01c0, 0x00020002 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00400040 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x00c000c0 }, + { 0x00200001, 0x25d80129, 0x00459050, 0x00000000 }, + { 0x00800040, 0x25a03d29, 0x00b105a0, 0x00020002 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x000001b4 }, + { 0x00800008, 0x25a03e29, 0x00009084, 0x00020002 }, + { 0x00800001, 0x21c00229, 0x00009084, 0x00000000 }, + { 0x00800001, 0x21e00229, 0x00009085, 0x00000000 }, + { 0x00000001, 0x25da01e9, 0x00000000, 0x00000000 }, + { 0x00800040, 0x25a03d29, 0x00b105a0, 0x00020002 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00200020 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00c000c0 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x01000100 }, + { 0x00000001, 0x25d80129, 0x00009040, 0x00000000 }, + { 0x00800001, 0x22000229, 0x00289064, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x0000019c }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00100010 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x01000100 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x01400140 }, + { 0x00000001, 0x25d80129, 0x00009042, 0x00000000 }, + { 0x00800001, 0x22000229, 0x00289068, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x0000018e }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00200020 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x01400140 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x01800180 }, + { 0x00000001, 0x25d80129, 0x00009044, 0x00000000 }, + { 0x00800001, 0x22000229, 0x0028906c, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x00000180 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00020002 }, + { 0x02000005, 0x20003dac, 0x0200002a, 0x00020002 }, + { 0x00200401, 0x27e001a1, 0x004505c4, 0x00000000 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x000f0003 }, + { 0x00800401, 0x23400231, 0x00a90040, 0x00000000 }, + { 0x00800801, 0x23500231, 0x00a90044, 0x00000000 }, + { 0x00800401, 0x23600231, 0x00a90048, 0x00000000 }, + { 0x00800801, 0x23700231, 0x00a9004c, 0x00000000 }, + { 0x00800001, 0x20400232, 0x002b0340, 0x00000000 }, + { 0x00800001, 0x20500232, 0x002b0350, 0x00000000 }, + { 0x00800001, 0x20600232, 0x002b0360, 0x00000000 }, + { 0x00800001, 0x20700232, 0x002b0370, 0x00000000 }, + { 0x00018022, 0x34001c00, 0x00001400, 0x00000006 }, + { 0x00000001, 0x22000060, 0x00000000, 0x06082003 }, + { 0x00010040, 0x27e43ca5, 0x020007e4, 0x00100010 }, + { 0x00008024, 0x34001c00, 0x00001400, 0x0001000a }, + { 0x00010001, 0x22000060, 0x02000000, 0x06082703 }, + { 0x00110001, 0x22000060, 0x02000000, 0x06082603 }, + { 0x0000000c, 0x27e43ca5, 0x000007e4, 0x00010001 }, + { 0x00008025, 0x20000000, 0x00000000, 0x00000000 }, + { 0x01600031, 0x20000020, 0x508d07e0, 0x00000200 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00020002 }, + { 0x02000005, 0x20003dac, 0x0200002a, 0x00020002 }, + { 0x00200401, 0x27e001a1, 0x004505c8, 0x00000000 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x0003000f }, + { 0x00018022, 0x34001c00, 0x00001400, 0x00000010 }, + { 0x00000001, 0x22000060, 0x00000000, 0x02286003 }, + { 0x00010040, 0x27e43ca5, 0x020007e4, 0x00100010 }, + { 0x01000005, 0x20003dac, 0x020005e0, 0x00010001 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x00000006 }, + { 0x00000440, 0x27e43ca5, 0x000007e4, 0xfffcfffc }, + { 0x00000801, 0x27e80061, 0x00000000, 0x0007000f }, + { 0x00000040, 0x22000c00, 0x00000200, 0x00200000 }, + { 0x00008024, 0x34001c00, 0x00001400, 0x0001000c }, + { 0x0000000c, 0x27e43da5, 0x000005c2, 0x00010001 }, + { 0x00010001, 0x22000060, 0x02000000, 0x02286703 }, + { 0x00110001, 0x22000060, 0x02000000, 0x02286603 }, + { 0x00000040, 0x27e43ca5, 0x000007e4, 0xfffcfffc }, + { 0x00008025, 0x20000000, 0x00000000, 0x00000000 }, + { 0x01600031, 0x20400021, 0x408d07e0, 0x00000200 }, + { 0x00800401, 0x23800231, 0x00a900c0, 0x00000000 }, + { 0x00800801, 0x23900231, 0x00a90100, 0x00000000 }, + { 0x00800401, 0x23a00231, 0x00a90140, 0x00000000 }, + { 0x00800801, 0x23b00231, 0x00a90180, 0x00000000 }, + { 0x00800401, 0x23c00231, 0x00a900c4, 0x00000000 }, + { 0x00800801, 0x23d00231, 0x00a90104, 0x00000000 }, + { 0x00800401, 0x23e00231, 0x00a90144, 0x00000000 }, + { 0x00800801, 0x23f00231, 0x00a90184, 0x00000000 }, + { 0x00800401, 0x24000231, 0x00a900c8, 0x00000000 }, + { 0x00800801, 0x24100231, 0x00a90108, 0x00000000 }, + { 0x00800401, 0x24200231, 0x00a90148, 0x00000000 }, + { 0x00800801, 0x24300231, 0x00a90188, 0x00000000 }, + { 0x00800401, 0x24400231, 0x00a900cc, 0x00000000 }, + { 0x00800801, 0x24500231, 0x00a9010c, 0x00000000 }, + { 0x00800401, 0x24600231, 0x00a9014c, 0x00000000 }, + { 0x00800801, 0x24700231, 0x00a9018c, 0x00000000 }, + { 0x00800401, 0x20c00231, 0x00cf0380, 0x00000000 }, + { 0x00800801, 0x20d00231, 0x00cf0381, 0x00000000 }, + { 0x00800401, 0x20e00231, 0x00cf0382, 0x00000000 }, + { 0x00800801, 0x20f00231, 0x00cf0383, 0x00000000 }, + { 0x00800401, 0x21000231, 0x00cf03c0, 0x00000000 }, + { 0x00800801, 0x21100231, 0x00cf03c1, 0x00000000 }, + { 0x00800401, 0x21200231, 0x00cf03c2, 0x00000000 }, + { 0x00800801, 0x21300231, 0x00cf03c3, 0x00000000 }, + { 0x00800401, 0x21400231, 0x00cf0400, 0x00000000 }, + { 0x00800801, 0x21500231, 0x00cf0401, 0x00000000 }, + { 0x00800401, 0x21600231, 0x00cf0402, 0x00000000 }, + { 0x00800801, 0x21700231, 0x00cf0403, 0x00000000 }, + { 0x00800401, 0x21800231, 0x00cf0440, 0x00000000 }, + { 0x00800801, 0x21900231, 0x00cf0441, 0x00000000 }, + { 0x00800401, 0x21a00231, 0x00cf0442, 0x00000000 }, + { 0x00800801, 0x21b00231, 0x00cf0443, 0x00000000 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00800080 }, + { 0x00000001, 0x260201ac, 0x000005e0, 0x00000000 }, + { 0x00800008, 0x25a03e29, 0x00009082, 0x00020002 }, + { 0x00200001, 0x25d80129, 0x00459054, 0x00000000 }, + { 0x00800001, 0x21c00229, 0x00009082, 0x00000000 }, + { 0x00800001, 0x21e00229, 0x00009083, 0x00000000 }, + { 0x00800001, 0x22000229, 0x00289070, 0x00000000 }, + { 0x00800040, 0x25a03d29, 0x00b105a0, 0x00020002 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000050 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x0000000a }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00400040 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x00c000c0 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x000000d4 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000044 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x05000500 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x05400540 }, + { 0x00800001, 0x25000129, 0x00ad0040, 0x00000000 }, + { 0x00800001, 0x25200129, 0x00ad0080, 0x00000000 }, + { 0x00800001, 0x25400129, 0x00ad00c0, 0x00000000 }, + { 0x00800001, 0x25600129, 0x00ad0100, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x000000c2 }, + { 0x00600001, 0x20600129, 0x008d0510, 0x00000000 }, + { 0x00600001, 0x20800129, 0x008d0520, 0x00000000 }, + { 0x00600001, 0x20a00129, 0x008d0530, 0x00000000 }, + { 0x00600001, 0x20c00129, 0x008d0540, 0x00000000 }, + { 0x00600001, 0x20e00129, 0x008d0550, 0x00000000 }, + { 0x00600001, 0x21000129, 0x008d0560, 0x00000000 }, + { 0x00800008, 0x25a03e29, 0x00009092, 0x00020002 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x05000500 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x05400540 }, + { 0x00800001, 0x25000129, 0x00ad0050, 0x00000000 }, + { 0x00800001, 0x25200129, 0x00ad0090, 0x00000000 }, + { 0x00800001, 0x25400129, 0x00ad00d0, 0x00000000 }, + { 0x00800001, 0x25600129, 0x00ad0110, 0x00000000 }, + { 0x00200001, 0x25d80129, 0x0045905c, 0x00000000 }, + { 0x00800001, 0x21c00229, 0x00009092, 0x00000000 }, + { 0x00800001, 0x21e00229, 0x00009093, 0x00000000 }, + { 0x00800001, 0x22000229, 0x0028909c, 0x00000000 }, + { 0x00800040, 0x25a03d29, 0x00b105a0, 0x00020002 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x0000009a }, + { 0x00600001, 0x20700129, 0x008d0510, 0x00000000 }, + { 0x00600001, 0x20900129, 0x008d0520, 0x00000000 }, + { 0x00600001, 0x20b00129, 0x008d0530, 0x00000000 }, + { 0x00600001, 0x20d00129, 0x008d0540, 0x00000000 }, + { 0x00600001, 0x20f00129, 0x008d0550, 0x00000000 }, + { 0x00600001, 0x21100129, 0x008d0560, 0x00000000 }, + { 0x00800008, 0x25a03e29, 0x00009084, 0x00020002 }, + { 0x00800001, 0x21c00229, 0x00009084, 0x00000000 }, + { 0x00800001, 0x21e00229, 0x00009085, 0x00000000 }, + { 0x00000001, 0x25da01e9, 0x00000000, 0x00000000 }, + { 0x00800040, 0x25a03d29, 0x00b105a0, 0x00020002 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00200020 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00c000c0 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x01000100 }, + { 0x00000001, 0x25d80129, 0x00009046, 0x00000000 }, + { 0x00800001, 0x22000229, 0x00289074, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x00000076 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00100010 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x01000100 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x01400140 }, + { 0x00000001, 0x25d80129, 0x00009048, 0x00000000 }, + { 0x00800001, 0x22000229, 0x00289078, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x00000068 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00200020 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x01400140 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x01800180 }, + { 0x00000001, 0x25d80129, 0x0000904a, 0x00000000 }, + { 0x00800001, 0x22000229, 0x0028907c, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00110220, 0x34001c00, 0x00001400, 0x0000005a }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00020002 }, + { 0x02000005, 0x20003dac, 0x0200002a, 0x00020002 }, + { 0x00200401, 0x27e001a1, 0x004505c0, 0x00000000 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x000f000f }, + { 0x00802001, 0x20400022, 0x008d00c0, 0x00000000 }, + { 0x00802001, 0x20800022, 0x008d0100, 0x00000000 }, + { 0x00802001, 0x20c00022, 0x008d0140, 0x00000000 }, + { 0x00802001, 0x21000022, 0x008d0180, 0x00000000 }, + { 0x00018022, 0x34001c00, 0x00001400, 0x00000006 }, + { 0x00000001, 0x22000060, 0x00000000, 0x12082003 }, + { 0x00010040, 0x27e43ca5, 0x020007e4, 0x00100010 }, + { 0x00008024, 0x34001c00, 0x00001400, 0x0001000a }, + { 0x00010001, 0x22000060, 0x02000000, 0x12082703 }, + { 0x00110001, 0x22000060, 0x02000000, 0x12082603 }, + { 0x0000000c, 0x27e43ca5, 0x000007e4, 0x00010001 }, + { 0x00008025, 0x20000000, 0x00000000, 0x00000000 }, + { 0x01600031, 0x20000020, 0x508d07e0, 0x00000200 }, + { 0x01800005, 0x20003dac, 0x020005e0, 0x00010001 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00020002 }, + { 0x00200401, 0x27e001a1, 0x004505c8, 0x00000000 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x0003000f }, + { 0x00812001, 0x20400022, 0x028d0040, 0x00000000 }, + { 0x00912001, 0x20400022, 0x028d0080, 0x00000000 }, + { 0x02000005, 0x20003dac, 0x0200002a, 0x00020002 }, + { 0x00018022, 0x34001c00, 0x00001400, 0x00000006 }, + { 0x00000001, 0x22000060, 0x00000000, 0x0618a003 }, + { 0x00010040, 0x27e43ca5, 0x020007e4, 0x00100010 }, + { 0x00008024, 0x34001c00, 0x00001400, 0x0001000c }, + { 0x0000000c, 0x27e43da5, 0x000005c2, 0x00010001 }, + { 0x00010001, 0x22000060, 0x02000000, 0x0618a703 }, + { 0x00110001, 0x22000060, 0x02000000, 0x0618a603 }, + { 0x00000040, 0x27e43ca5, 0x000007e4, 0xfffcfffc }, + { 0x00008025, 0x20000000, 0x00000000, 0x00000000 }, + { 0x01600031, 0x26400021, 0x508d07e0, 0x00000200 }, + { 0x01000005, 0x20003dac, 0x0000002a, 0x00020002 }, + { 0x00000006, 0x202a3dad, 0x0000002a, 0x00020002 }, + { 0x00010220, 0x34001c00, 0x00001400, 0xfffffd94 }, + { 0x00600001, 0x26400021, 0x008d0640, 0x00000000 }, + { 0x00600001, 0x260001e1, 0x00000000, 0x00000000 }, + { 0x00000009, 0x26143da1, 0x000005e2, 0x00120012 }, + { 0x00000440, 0x26141c21, 0x00000614, 0x00020000 }, + { 0x00000c01, 0x26120129, 0x0000000c, 0x00000000 }, + { 0x00000c01, 0x26100169, 0x00000000, 0x12121212 }, + { 0x00400801, 0x26000171, 0x00000000, 0xffffffff }, + { 0x00600031, 0x20001c20, 0x308d0600, 0x82008002 }, + { 0x00200001, 0x26000128, 0x004505d8, 0x00000000 }, + { 0x00800040, 0x2400462d, 0x00b19c00, 0x00b1d830 }, + { 0x00800040, 0x2340462d, 0x00b19820, 0x00b1d830 }, + { 0x00800040, 0x2360462d, 0x00b19c10, 0x00b1dc00 }, + { 0x05810010, 0x200025ac, 0x008d2400, 0x008d01c0 }, + { 0x05810010, 0x200025ac, 0x008d2340, 0x008d01e0 }, + { 0x05810010, 0x200025ac, 0x008d2360, 0x008d01e0 }, + { 0x00818022, 0x34001c00, 0x00001400, 0x000000c8 }, + { 0x00800040, 0x2440462d, 0x00b19810, 0x00b1d830 }, + { 0x00800040, 0x2460462d, 0x00b19c20, 0x00b1dc00 }, + { 0x00800201, 0x24a00129, 0x00b19820, 0x00000000 }, + { 0x00818022, 0x34001c00, 0x02001400, 0x00000066 }, + { 0x05800010, 0x200025ac, 0x028d2400, 0x008d05a0 }, + { 0x00800040, 0x2520462d, 0x00b19830, 0x00b19820 }, + { 0x00800040, 0x2540462d, 0x00b19c00, 0x00b19c10 }, + { 0x00000201, 0x26000108, 0x00000602, 0x00000000 }, + { 0x05810010, 0x200025ac, 0x028d2440, 0x008d01e0 }, + { 0x05810010, 0x200025ac, 0x008d2460, 0x008d01e0 }, + { 0x00818022, 0x34001c00, 0x02001400, 0x0000001e }, + { 0x00800040, 0x2560462d, 0x00b19810, 0x00b19800 }, + { 0x00800040, 0x238045ad, 0x008d0520, 0x00b19c00 }, + { 0x00800040, 0x24003d8c, 0x00b10400, 0x00040004 }, + { 0x00800040, 0x23a0458d, 0x00b10400, 0x00b19810 }, + { 0x00800048, 0x24003dac, 0x008d0560, 0x00020002 }, + { 0x80800008, 0x43c03d91, 0x00b10400, 0x00030003 }, + { 0x00800040, 0x24003dac, 0x00b103a0, 0xfffefffe }, + { 0x80800008, 0x43603d91, 0x00b10400, 0x00020002 }, + { 0x00800040, 0x2400362c, 0x00b19c10, 0x00b10380 }, + { 0x00800040, 0x2400358c, 0x00b10400, 0x00b103a0 }, + { 0x80800008, 0x43403d91, 0x00b10400, 0x00030003 }, + { 0x00800001, 0xb8100231, 0x00ae03c0, 0x00000000 }, + { 0x00800001, 0xb8200231, 0x00ae0360, 0x00000000 }, + { 0x00800001, 0xb8300231, 0x00ae0340, 0x00000000 }, + { 0x00808024, 0x34001c00, 0x00001400, 0x0001000e }, + { 0x00800040, 0x2400362c, 0x00b19820, 0x008d0520 }, + { 0x00800040, 0x2400458c, 0x00b10400, 0x00b19c10 }, + { 0x00800040, 0x24003d8c, 0x00b10400, 0x00020002 }, + { 0x80800008, 0x43403d91, 0x00b10400, 0x00020002 }, + { 0x00800001, 0xb8300231, 0x00ae0340, 0x00000000 }, + { 0x00008025, 0x20000000, 0x00000000, 0x00000000 }, + { 0x00818022, 0x34001c00, 0x00001400, 0x0000001e }, + { 0x00800040, 0x2580462d, 0x00b19c20, 0x00b19c30 }, + { 0x00800040, 0x238045ad, 0x008d0540, 0x008d04b0 }, + { 0x00800040, 0x24003d8c, 0x00b10400, 0x00040004 }, + { 0x00800040, 0x23a0458d, 0x00b10400, 0x00b19c20 }, + { 0x00800048, 0x24003dac, 0x008d0580, 0x00020002 }, + { 0x80800008, 0x43c03d91, 0x00b10400, 0x00030003 }, + { 0x00800040, 0x24003dac, 0x00b103a0, 0xfffefffe }, + { 0x80800008, 0x43603d91, 0x00b10400, 0x00020002 }, + { 0x00800040, 0x2400362c, 0x008d04a0, 0x00b10380 }, + { 0x00800040, 0x2400358c, 0x00b10400, 0x00b103a0 }, + { 0x80800008, 0x43403d91, 0x00b10400, 0x00030003 }, + { 0x00800001, 0xbc200231, 0x00ae03c0, 0x00000000 }, + { 0x00800001, 0xbc100231, 0x00ae0360, 0x00000000 }, + { 0x00800001, 0xbc000231, 0x00ae0340, 0x00000000 }, + { 0x00808024, 0x34001c00, 0x00001400, 0x0001000e }, + { 0x00800040, 0x2400362c, 0x008d04a0, 0x008d0540 }, + { 0x00800040, 0x2400458c, 0x00b10400, 0x00b19c10 }, + { 0x00800040, 0x24003d8c, 0x00b10400, 0x00020002 }, + { 0x80800008, 0x43403d91, 0x00b10400, 0x00020002 }, + { 0x00800001, 0xbc000231, 0x00ae0340, 0x00000000 }, + { 0x00008025, 0x20000000, 0x00000000, 0x00000000 }, + { 0x00808024, 0x34001c00, 0x00001400, 0x0001005a }, + { 0x00800001, 0x23e0012d, 0x008d0200, 0x00000000 }, + { 0x05800010, 0x200025ac, 0x008d2440, 0x008d01e0 }, + { 0x05800010, 0x200025ac, 0x028d2460, 0x008d01e0 }, + { 0x00800040, 0x24003e2c, 0x00b19820, 0x00040004 }, + { 0x00800048, 0x24003dac, 0x008d0400, 0x00040004 }, + { 0x00800040, 0x2400458c, 0x00b10400, 0x00b1dc10 }, + { 0x00800008, 0x23403d8d, 0x00b10400, 0x00030003 }, + { 0x00810040, 0x23e03dad, 0x008d03e0, 0x00010001 }, + { 0x00200201, 0x25ec018d, 0x00450600, 0x00000000 }, + { 0x00810040, 0x23e03dad, 0x028d03e0, 0x00010001 }, + { 0x03800010, 0x200035ac, 0x008d0340, 0x008d03e0 }, + { 0x05800010, 0x200035ac, 0x028d0340, 0x008d43e0 }, + { 0x00800042, 0x24c0462d, 0x00b19830, 0x00b19c00 }, + { 0x00810001, 0x234001ad, 0x008d03e0, 0x00000000 }, + { 0x00810001, 0x234001ad, 0x028d43e0, 0x00000000 }, + { 0x00200201, 0x260001ac, 0x004505ec, 0x00000000 }, + { 0x80800040, 0x43603631, 0x00b19830, 0x008d0340 }, + { 0x80800040, 0x43403631, 0x00b19c00, 0x008d4340 }, + { 0x00800001, 0xb8300231, 0x00ae0360, 0x00000000 }, + { 0x00800001, 0xbc000231, 0x00ae0340, 0x00000000 }, + { 0x00818022, 0x34001c00, 0x00001400, 0x00000016 }, + { 0x00800040, 0x2400362c, 0x00b19810, 0x008d04c0 }, + { 0x00800048, 0x24003e2c, 0x00b19820, 0xfffefffe }, + { 0x00800008, 0x23603d8d, 0x00b10400, 0x00010001 }, + { 0x03800010, 0x200025ac, 0x008d0360, 0x008d0200 }, + { 0x05800010, 0x200025ac, 0x028d0360, 0x008d4200 }, + { 0x00810001, 0x2360012d, 0x008d0200, 0x00000000 }, + { 0x00810001, 0x2360012d, 0x028d4200, 0x00000000 }, + { 0x00000201, 0x260201ac, 0x000005ee, 0x00000000 }, + { 0x80800040, 0x43603631, 0x00b19820, 0x008d0360 }, + { 0x00800001, 0xb8200231, 0x00ae0360, 0x00000000 }, + { 0x00008025, 0x20000000, 0x00000000, 0x00000000 }, + { 0x00818022, 0x34001c00, 0x02001400, 0x00000014 }, + { 0x00800040, 0x2400362c, 0x00b19c20, 0x008d04c0 }, + { 0x00800048, 0x24003e2c, 0x00b19c10, 0xfffefffe }, + { 0x00800008, 0x23603d8d, 0x00b10400, 0x00010001 }, + { 0x03800010, 0x200025ac, 0x008d0360, 0x008d0200 }, + { 0x05800010, 0x200025ac, 0x028d0360, 0x008d4200 }, + { 0x00810001, 0x2360012d, 0x008d0200, 0x00000000 }, + { 0x00810001, 0x2360012d, 0x028d4200, 0x00000000 }, + { 0x80800040, 0x43603631, 0x00b19c10, 0x008d0360 }, + { 0x00800001, 0xbc100231, 0x00ae0360, 0x00000000 }, + { 0x00008025, 0x20000000, 0x00000000, 0x00000000 }, + { 0x00008025, 0x20000000, 0x00000000, 0x00000000 }, + { 0x00008025, 0x20000000, 0x00000000, 0x00000000 }, + { 0x00000001, 0x34000020, 0x000007c0, 0x00000000 }, + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x00600001, 0x27e00021, 0x008d0000, 0x00000000 }, + { 0x00a02001, 0x20400169, 0x00000000, 0x00000000 }, + { 0x00000001, 0x206601ed, 0x00000000, 0x00010001 }, + { 0x00000009, 0x20663dad, 0x00000066, 0x000a000a }, + { 0x00000001, 0x206801ed, 0x00000000, 0x01400140 }, + { 0x00000001, 0x22600169, 0x00000000, 0x00030003 }, + { 0x00000008, 0x22403dad, 0x00000026, 0x00010001 }, + { 0x00000041, 0x224235ad, 0x00000020, 0x00000022 }, + { 0x00600001, 0x20200022, 0x008d0000, 0x00000000 }, + { 0x00000001, 0x203c0022, 0x00000018, 0x00000000 }, + { 0x00000001, 0x203f01f2, 0x00000000, 0x00000000 }, + { 0x00000001, 0x202c00e2, 0x00000000, 0x00000000 }, + { 0x00000001, 0x202c010a, 0x00000e00, 0x00000000 }, + { 0x00600001, 0x20400021, 0x008d0020, 0x00000000 }, + { 0x00400001, 0x205401ed, 0x00000000, 0x00000000 }, + { 0x00200040, 0x20583dad, 0x00450020, 0xffffffff }, + { 0x00000001, 0x22000060, 0x00000000, 0x06080000 }, + { 0x00600001, 0x26000021, 0x008d0000, 0x00000000 }, + { 0x00000001, 0x26140061, 0x00000000, 0x00c00400 }, + { 0x00000001, 0x26100169, 0x00000000, 0x12121212 }, + { 0x07600031, 0x26201c21, 0x308d0600, 0x02000000 }, + { 0x00200401, 0x208000e5, 0x00000000, 0x00000000 }, + { 0x00000c01, 0x208800e5, 0x00000000, 0xffffffc4 }, + { 0x00000801, 0x208c00e5, 0x00000000, 0xffffffc8 }, + { 0x00200001, 0x260001ec, 0x00000000, 0x00000000 }, + { 0x00600001, 0x20000022, 0x008d07e0, 0x00000000 }, + { 0x00000040, 0x20283c22, 0x00000008, 0x00100010 }, + { 0x00000001, 0x206001ed, 0x00000000, 0x00020002 }, + { 0x00000001, 0x206201ad, 0x0000005a, 0x00000000 }, + { 0x00000001, 0x20a001ed, 0x00000000, 0x00000000 }, + { 0x00200001, 0x228001ed, 0x00000000, 0x00000000 }, + { 0x00802001, 0x20c00061, 0x00000000, 0x00ff00ff }, + { 0x00802001, 0x21000061, 0x00000000, 0x00ff00ff }, + { 0x00802001, 0x21400061, 0x00000000, 0x00ff00ff }, + { 0x00802001, 0x21800061, 0x00000000, 0x00ff00ff }, + { 0x00802001, 0x21c00061, 0x00000000, 0x00ff00ff }, + { 0x00000041, 0x22083dac, 0x00000056, 0x00040004 }, + { 0x05000010, 0x200035ac, 0x02000280, 0x00000240 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x00000004 }, + { 0x00000040, 0x22803dad, 0x00000280, 0xffffffff }, + { 0x00000030, 0x32000084, 0x00001200, 0x00000000 }, + { 0x01000010, 0x20002d28, 0x000090c2, 0x00000000 }, + { 0x03000010, 0x200035ac, 0x02000054, 0x00000058 }, + { 0x00800001, 0x240001ac, 0x00000068, 0x00000000 }, + { 0x00000048, 0x22a03dad, 0x00000056, 0x00040004 }, + { 0x00010220, 0x34001c00, 0x00001400, 0xfffffff2 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x00000014 }, + { 0x00200001, 0xb0c00229, 0x00450054, 0x00000000 }, + { 0x00200040, 0x22803dad, 0x00450280, 0x00010001 }, + { 0x00000001, 0x20300022, 0x00000010, 0x00000000 }, + { 0x00000001, 0x20380122, 0x00000260, 0x00000000 }, + { 0x00800001, 0x204001ae, 0x00b10040, 0x00000000 }, + { 0x00000008, 0x20003d2a, 0x000002a0, 0x00010001 }, + { 0x00000040, 0x22602d29, 0x00000260, 0x00020002 }, + { 0x00800031, 0x20000008, 0x608d0000, 0x00000200 }, + { 0x00000006, 0x203025a2, 0x00000066, 0x000002a0 }, + { 0x01600031, 0x20001c00, 0x708d0000, 0x02000001 }, + { 0x04200010, 0x200035ac, 0x00450054, 0x00450060 }, + { 0x00010040, 0x20a03dad, 0x02000056, 0x00010001 }, + { 0x05200010, 0x200035ac, 0x02450280, 0x00450240 }, + { 0x00000001, 0x240001ec, 0x00000000, 0x00040004 }, + { 0x00000048, 0x22083dac, 0x00000056, 0x00040004 }, + { 0x00200040, 0x205455ad, 0x00450054, 0x00450034 }, + { 0x02000010, 0x20003d8c, 0x00000600, 0x00010001 }, + { 0x00000041, 0x220e3d8c, 0x00000602, 0x00040004 }, + { 0x00010041, 0x22083dac, 0x000000a0, 0x00040004 }, + { 0x00010401, 0x205601ad, 0x000000a0, 0x00000000 }, + { 0x00010840, 0x20543d2d, 0x000090c0, 0x00010001 }, + { 0x00000220, 0x34001400, 0x00001400, 0x00009c80 }, + { 0x01000010, 0x20003dac, 0x02000280, 0x00000000 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x00000014 }, + { 0x00000030, 0x32000084, 0x00001200, 0x00000000 }, + { 0x00000040, 0x22803dad, 0x00000280, 0xffffffff }, + { 0x00600401, 0x260001e1, 0x00000000, 0x00000000 }, + { 0x00000c01, 0x26140061, 0x00000000, 0x01800000 }, + { 0x00000c01, 0x26120129, 0x0000000c, 0x00000000 }, + { 0x00000801, 0x26100169, 0x00000000, 0x12121212 }, + { 0x00000040, 0x2078252d, 0x00000026, 0x00004280 }, + { 0x00400001, 0x26000231, 0x00000078, 0x00000000 }, + { 0x00600031, 0x26201c21, 0x308d0600, 0x02000002 }, + { 0x00000220, 0x34001c00, 0x00001400, 0xffffffe8 }, + { 0x07600031, 0x20001c20, 0x30000000, 0x02000001 }, + { 0x01600031, 0x20001c24, 0x708d0000, 0x82000012 }, + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x00600001, 0x27e00021, 0x008d0000, 0x00000000 }, + { 0x00400441, 0x45c03dad, 0x00000034, 0x00100010 }, + { 0x00400841, 0x45c23dad, 0x00000036, 0x00200020 }, + { 0x00200001, 0x260001ec, 0x00000000, 0x00000000 }, + { 0x00000001, 0x25e20129, 0x00000036, 0x00000000 }, + { 0x00000041, 0x25e435a1, 0x00000020, 0x00000036 }, + { 0x00000040, 0x25e43421, 0x000005e4, 0x00000034 }, + { 0x00000041, 0x25e42c21, 0x000005e4, 0x00800080 }, + { 0x00000040, 0x25c43dad, 0x000005c4, 0xfffcfffc }, + { 0x00000040, 0x25ca3dad, 0x000005ca, 0xfffcfffc }, + { 0x00000005, 0x202a3dad, 0x0000002a, 0xfffdfffd }, + { 0x00800001, 0x2220022d, 0x000d002c, 0x00000000 }, + { 0x00600040, 0x22303dad, 0x008d0230, 0x00080008 }, + { 0x02000005, 0x20002d2c, 0x0200002a, 0x00020002 }, + { 0x00000001, 0x27e80021, 0x000005e4, 0x00000000 }, + { 0x00010040, 0x27e83c21, 0x020007e8, 0x00400040 }, + { 0x01600031, 0x22401c21, 0x408d07e0, 0x02885800 }, + { 0x00000001, 0x220801ec, 0x00000000, 0x02400240 }, + { 0x01800005, 0x20002d28, 0x02b19040, 0xffffffff }, + { 0x02000005, 0x20003e2c, 0x00009030, 0x00010001 }, + { 0x00000005, 0x25ec2e29, 0x00009002, 0x000a000a }, + { 0x00000005, 0x25ea2e29, 0x00009002, 0x00060006 }, + { 0x000b0220, 0x34001c00, 0x02001400, 0x00000252 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000250 }, + { 0x01000010, 0x20003d2c, 0x000005ec, 0x00080008 }, + { 0x00000005, 0x25e03d8d, 0x00000600, 0x00010001 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00020002 }, + { 0x02000005, 0x20003dac, 0x0200002a, 0x00020002 }, + { 0x00000401, 0x27e001a1, 0x000005c0, 0x00000000 }, + { 0x00000c0c, 0x27e43da1, 0x000005c2, 0x00010001 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x0007000f }, + { 0x00018022, 0x34001c00, 0x00001400, 0x00000006 }, + { 0x00000001, 0x22000060, 0x00000000, 0x0248a002 }, + { 0x00010040, 0x27e43ca5, 0x020007e4, 0x00080008 }, + { 0x00008024, 0x34001c00, 0x00001400, 0x0001000a }, + { 0x00010001, 0x22000060, 0x02000000, 0x0248e702 }, + { 0x00110001, 0x22000060, 0x02000000, 0x0248e602 }, + { 0x0000000c, 0x27e43ca5, 0x000007e4, 0x00010001 }, + { 0x00008025, 0x20000000, 0x00000000, 0x00000000 }, + { 0x02600031, 0x20c00021, 0x408d07e0, 0x00000200 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00020002 }, + { 0x02000005, 0x20003dac, 0x0200002a, 0x00020002 }, + { 0x00000401, 0x27e001a1, 0x000005c4, 0x00000000 }, + { 0x00000c0c, 0x27e43da1, 0x000005c6, 0x00010001 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x00070003 }, + { 0x00018022, 0x34001c00, 0x00001400, 0x00000006 }, + { 0x00000001, 0x22000060, 0x00000000, 0x02186004 }, + { 0x00010040, 0x27e43ca5, 0x020007e4, 0x00080008 }, + { 0x00008024, 0x34001c00, 0x00001400, 0x0001000a }, + { 0x00010001, 0x22000060, 0x02000000, 0x02186704 }, + { 0x00110001, 0x22000060, 0x02000000, 0x02186604 }, + { 0x0000000c, 0x27e43ca5, 0x000007e4, 0x00010001 }, + { 0x00008025, 0x20000000, 0x00000000, 0x00000000 }, + { 0x02600031, 0x23400025, 0x408d07e0, 0x00000200 }, + { 0x00800001, 0x2380012d, 0x008900c0, 0x00000000 }, + { 0x00800001, 0x23a0012d, 0x00890100, 0x00000000 }, + { 0x00800001, 0x23c0012d, 0x008900c8, 0x00000000 }, + { 0x00800001, 0x23e0012d, 0x00890108, 0x00000000 }, + { 0x00600401, 0x20c001a9, 0x00ab0380, 0x00000000 }, + { 0x00600801, 0x20d001a9, 0x00ab0382, 0x00000000 }, + { 0x00600401, 0x20e001a9, 0x00ab0384, 0x00000000 }, + { 0x00600801, 0x20f001a9, 0x00ab0386, 0x00000000 }, + { 0x00600401, 0x210001a9, 0x00ab03c0, 0x00000000 }, + { 0x00600801, 0x211001a9, 0x00ab03c2, 0x00000000 }, + { 0x00600401, 0x212001a9, 0x00ab03c4, 0x00000000 }, + { 0x00600801, 0x213001a9, 0x00ab03c6, 0x00000000 }, + { 0x00800001, 0x204001a9, 0x002e0340, 0x00000000 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00400040 }, + { 0x01000010, 0x20003d2c, 0x020005ea, 0x00040004 }, + { 0x00800008, 0x2340352d, 0x00009050, 0x008d0220 }, + { 0x00800008, 0x2360352d, 0x00009052, 0x008d0220 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x0000006a }, + { 0x01000010, 0x20003d2c, 0x000005ea, 0x00020002 }, + { 0x00110220, 0x34001c00, 0x02001400, 0x00000012 }, + { 0x02600005, 0x20003dac, 0x00650340, 0x00010001 }, + { 0x02600005, 0x20003dac, 0x02650360, 0x00010001 }, + { 0x00400401, 0x41c00229, 0x000090c0, 0x00000000 }, + { 0x00400801, 0x41c20229, 0x000090e0, 0x00000000 }, + { 0x00400401, 0x41e00229, 0x000090c1, 0x00000000 }, + { 0x00400801, 0x41e20229, 0x000090e1, 0x00000000 }, + { 0x00400401, 0x42000229, 0x006990a0, 0x00000000 }, + { 0x00400801, 0x42020229, 0x006990e8, 0x00000000 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x0000001e }, + { 0x00110220, 0x34001c00, 0x00001400, 0x00000012 }, + { 0x02600005, 0x20003dac, 0x00ae0340, 0x00010001 }, + { 0x02600005, 0x20003dac, 0x02ae0360, 0x00010001 }, + { 0x00400401, 0x21c00229, 0x000090c0, 0x00000000 }, + { 0x00400801, 0x21c80229, 0x000090e0, 0x00000000 }, + { 0x00400401, 0x21e00229, 0x000090c1, 0x00000000 }, + { 0x00400801, 0x21e80229, 0x000090e1, 0x00000000 }, + { 0x00400401, 0x22000229, 0x006990a0, 0x00000000 }, + { 0x00400801, 0x22080229, 0x006990e8, 0x00000000 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x0000000a }, + { 0x02600005, 0x20003dac, 0x00ae0340, 0x00010001 }, + { 0x02600005, 0x20003dac, 0x02ae0360, 0x00010001 }, + { 0x00600001, 0x21c00229, 0x000090c0, 0x00000000 }, + { 0x00600001, 0x21e00229, 0x000090c1, 0x00000000 }, + { 0x00600001, 0x22000229, 0x002490a0, 0x00000000 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00400040 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x00c000c0 }, + { 0x00200001, 0x25d80109, 0x00450600, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x000001c8 }, + { 0x01400010, 0x20003d2c, 0x000005ea, 0x00040004 }, + { 0x01400010, 0x20003d2c, 0x020005ea, 0x00020002 }, + { 0x00600001, 0x21c00229, 0x000090c8, 0x00000000 }, + { 0x00600001, 0x21e00229, 0x000090c9, 0x00000000 }, + { 0x00600001, 0x22000229, 0x002490b0, 0x00000000 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00410041 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x00c100c1 }, + { 0x00410401, 0x41c00229, 0x000090c8, 0x00000000 }, + { 0x00410801, 0x41c20229, 0x000090f0, 0x00000000 }, + { 0x00410401, 0x41e00229, 0x000090c9, 0x00000000 }, + { 0x00410801, 0x41e20229, 0x000090f1, 0x00000000 }, + { 0x00410401, 0x42000229, 0x006990b0, 0x00000000 }, + { 0x00410801, 0x42020229, 0x006990f8, 0x00000000 }, + { 0x00410401, 0x21c00229, 0x020090c8, 0x00000000 }, + { 0x00410801, 0x21c80229, 0x020090f0, 0x00000000 }, + { 0x00410401, 0x21e00229, 0x020090c9, 0x00000000 }, + { 0x00410801, 0x21e80229, 0x020090f1, 0x00000000 }, + { 0x00410401, 0x22000229, 0x026990b0, 0x00000000 }, + { 0x00410801, 0x22080229, 0x026990f8, 0x00000000 }, + { 0x00200001, 0x26000128, 0x004505d8, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x0000019c }, + { 0x00800008, 0x2340352d, 0x00009042, 0x008d0220 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00e000e0 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x01000100 }, + { 0x00600001, 0x21c00229, 0x000090c4, 0x00000000 }, + { 0x00600001, 0x21e00229, 0x000090c5, 0x00000000 }, + { 0x00600001, 0x22000229, 0x002490a4, 0x00000000 }, + { 0x02600005, 0x20003dac, 0x00ae0340, 0x00010001 }, + { 0x00000001, 0x260201e8, 0x00000000, 0x00000000 }, + { 0x00000401, 0x25da01e9, 0x00000000, 0x00000000 }, + { 0x00000801, 0x25d80109, 0x00000600, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000184 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00e100e1 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x01010101 }, + { 0x00200001, 0x26000128, 0x004505d8, 0x00000000 }, + { 0x00600001, 0x21c00229, 0x000090cc, 0x00000000 }, + { 0x00600001, 0x21e00229, 0x000090cd, 0x00000000 }, + { 0x00600001, 0x22000229, 0x002490b4, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000174 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00020002 }, + { 0x02000005, 0x20003dac, 0x0200002a, 0x00020002 }, + { 0x00000401, 0x27e001a1, 0x000005c4, 0x00000000 }, + { 0x00000c0c, 0x27e43da1, 0x000005c6, 0x00010001 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x00070003 }, + { 0x00600401, 0x2340012d, 0x00890040, 0x00000000 }, + { 0x00600801, 0x2350012d, 0x00890048, 0x00000000 }, + { 0x00600001, 0x204001aa, 0x00270340, 0x00000000 }, + { 0x00600001, 0x205001aa, 0x00270350, 0x00000000 }, + { 0x00018022, 0x34001c00, 0x00001400, 0x00000006 }, + { 0x00000001, 0x22000060, 0x00000000, 0x04082004 }, + { 0x00010040, 0x27e43ca5, 0x020007e4, 0x00080008 }, + { 0x00008024, 0x34001c00, 0x00001400, 0x0001000a }, + { 0x00010001, 0x22000060, 0x02000000, 0x04082704 }, + { 0x00110001, 0x22000060, 0x02000000, 0x04082604 }, + { 0x0000000c, 0x27e43ca5, 0x000007e4, 0x00010001 }, + { 0x00008025, 0x20000000, 0x00000000, 0x00000000 }, + { 0x01600031, 0x20000020, 0x508d07e0, 0x00000200 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00020002 }, + { 0x02000005, 0x20003dac, 0x0200002a, 0x00020002 }, + { 0x00000401, 0x27e001a1, 0x000005c8, 0x00000000 }, + { 0x00000c0c, 0x27e43da5, 0x000005ca, 0x00010001 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x0001000f }, + { 0x00018022, 0x34001c00, 0x00001400, 0x00000010 }, + { 0x00000001, 0x22000060, 0x00000000, 0x02186004 }, + { 0x00010040, 0x27e43ca5, 0x020007e4, 0x00080008 }, + { 0x01000005, 0x20003dac, 0x020005e0, 0x00010001 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x00000006 }, + { 0x00000440, 0x27e43ca5, 0x000007e4, 0xfffefffe }, + { 0x00000801, 0x27e80061, 0x00000000, 0x0003000f }, + { 0x00000040, 0x22000c00, 0x00000200, 0x00100000 }, + { 0x00008024, 0x34001c00, 0x00001400, 0x0001000c }, + { 0x0000000c, 0x27e43da5, 0x000005c2, 0x00020002 }, + { 0x00010001, 0x22000060, 0x02000000, 0x02186704 }, + { 0x00110001, 0x22000060, 0x02000000, 0x02186604 }, + { 0x00000040, 0x27e43ca5, 0x000007e4, 0xfffefffe }, + { 0x00008025, 0x20000000, 0x00000000, 0x00000000 }, + { 0x02600031, 0x20400021, 0x408d07e0, 0x00000200 }, + { 0x00800001, 0x2380012d, 0x008900c0, 0x00000000 }, + { 0x00800001, 0x23a0012d, 0x00890100, 0x00000000 }, + { 0x00800001, 0x23c0012d, 0x008900c8, 0x00000000 }, + { 0x00800001, 0x23e0012d, 0x00890108, 0x00000000 }, + { 0x00600401, 0x20c001a9, 0x00ab0380, 0x00000000 }, + { 0x00600801, 0x20d001a9, 0x00ab0382, 0x00000000 }, + { 0x00600401, 0x20e001a9, 0x00ab0384, 0x00000000 }, + { 0x00600801, 0x20f001a9, 0x00ab0386, 0x00000000 }, + { 0x00600401, 0x210001a9, 0x00ab03c0, 0x00000000 }, + { 0x00600801, 0x211001a9, 0x00ab03c2, 0x00000000 }, + { 0x00600401, 0x212001a9, 0x00ab03c4, 0x00000000 }, + { 0x00600801, 0x213001a9, 0x00ab03c6, 0x00000000 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00800080 }, + { 0x00000001, 0x260201ac, 0x000005e0, 0x00000000 }, + { 0x00800008, 0x2340352d, 0x00009054, 0x008d0220 }, + { 0x00800008, 0x2360352d, 0x00009056, 0x008d0220 }, + { 0x00010220, 0x34001c00, 0x00001400, 0x00000084 }, + { 0x00010220, 0x34001c00, 0x02001400, 0x00000026 }, + { 0x02600005, 0x20003dac, 0x00ae0340, 0x00010001 }, + { 0x02600005, 0x20003dac, 0x02ae0360, 0x00010001 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00400040 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x00c000c0 }, + { 0x00600001, 0x21c00229, 0x000090c2, 0x00000000 }, + { 0x00600001, 0x21e00229, 0x000090c3, 0x00000000 }, + { 0x00600001, 0x22000229, 0x002490a8, 0x00000000 }, + { 0x00200001, 0x25d80109, 0x00450600, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x000000f0 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00410041 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x00c100c1 }, + { 0x00600001, 0x21c00229, 0x000090ca, 0x00000000 }, + { 0x00600001, 0x21e00229, 0x000090cb, 0x00000000 }, + { 0x00600001, 0x22000229, 0x002490b8, 0x00000000 }, + { 0x00200001, 0x26000128, 0x004505d8, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x000000e0 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x0000005c }, + { 0x02600005, 0x20003dac, 0x00ae0340, 0x00010001 }, + { 0x02600005, 0x20003dac, 0x02ae0360, 0x00010001 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x05000500 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x05200520 }, + { 0x00800001, 0x25000129, 0x00ad0040, 0x00000000 }, + { 0x00800001, 0x25200129, 0x00ad00c0, 0x00000000 }, + { 0x00600001, 0x21c00229, 0x000090c2, 0x00000000 }, + { 0x00600001, 0x21e00229, 0x000090c3, 0x00000000 }, + { 0x00600001, 0x22000229, 0x002490a8, 0x00000000 }, + { 0x00200001, 0x25d80109, 0x00450600, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x000000c6 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x05010501 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x05210521 }, + { 0x00600001, 0x21c00229, 0x000090ca, 0x00000000 }, + { 0x00600001, 0x21e00229, 0x000090cb, 0x00000000 }, + { 0x00600001, 0x22000229, 0x002490b8, 0x00000000 }, + { 0x00200001, 0x26000128, 0x004505d8, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x000000b6 }, + { 0x00800008, 0x2340352d, 0x0000905c, 0x008d0220 }, + { 0x00800008, 0x2360352d, 0x0000905e, 0x008d0220 }, + { 0x00600001, 0x20600129, 0x008d0510, 0x00000000 }, + { 0x00600001, 0x20c00129, 0x008d0520, 0x00000000 }, + { 0x02600005, 0x20003dac, 0x00ae0340, 0x00010001 }, + { 0x02600005, 0x20003dac, 0x02ae0360, 0x00010001 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x05000500 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x05200520 }, + { 0x00800001, 0x25000129, 0x00ad0050, 0x00000000 }, + { 0x00800001, 0x25200129, 0x00ad00d0, 0x00000000 }, + { 0x00600001, 0x21c00229, 0x000090e2, 0x00000000 }, + { 0x00600001, 0x21e00229, 0x000090e3, 0x00000000 }, + { 0x00600001, 0x22000229, 0x002490ec, 0x00000000 }, + { 0x00200001, 0x25d80109, 0x00450600, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000096 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x05010501 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x05210521 }, + { 0x00600001, 0x21c00229, 0x000090f2, 0x00000000 }, + { 0x00600001, 0x21e00229, 0x000090f3, 0x00000000 }, + { 0x00600001, 0x22000229, 0x002490fc, 0x00000000 }, + { 0x00200001, 0x26000128, 0x004505d8, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x00000086 }, + { 0x00600001, 0x20700129, 0x008d0510, 0x00000000 }, + { 0x00600001, 0x20d00129, 0x008d0520, 0x00000000 }, + { 0x00800008, 0x2340352d, 0x00009048, 0x008d0220 }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00e000e0 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x01000100 }, + { 0x00600001, 0x21c00229, 0x000090c4, 0x00000000 }, + { 0x00600001, 0x21e00229, 0x000090c5, 0x00000000 }, + { 0x00600001, 0x22000229, 0x002490ac, 0x00000000 }, + { 0x02600005, 0x20003dac, 0x00ae0340, 0x00010001 }, + { 0x00000001, 0x260201e8, 0x00000000, 0x00000000 }, + { 0x00000401, 0x25da01e9, 0x00000000, 0x00000000 }, + { 0x00000801, 0x25d80109, 0x00000600, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x0000006a }, + { 0x00000401, 0x220c01ec, 0x00000000, 0x00e100e1 }, + { 0x00000801, 0x220e01ec, 0x00000000, 0x01010101 }, + { 0x00600001, 0x21c00229, 0x000090cc, 0x00000000 }, + { 0x00600001, 0x21e00229, 0x000090cd, 0x00000000 }, + { 0x00600001, 0x22000229, 0x002490bc, 0x00000000 }, + { 0x00200001, 0x26000128, 0x004505d8, 0x00000000 }, + { 0x00000040, 0x27c01c01, 0x00001400, 0x00000020 }, + { 0x00000220, 0x34001c00, 0x00001400, 0x0000005a }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00020002 }, + { 0x02000005, 0x20003dac, 0x0200002a, 0x00020002 }, + { 0x00000401, 0x27e001a1, 0x000005c0, 0x00000000 }, + { 0x00000c0c, 0x27e43da1, 0x000005c2, 0x00010001 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x0007000f }, + { 0x00802001, 0x20400022, 0x008d00c0, 0x00000000 }, + { 0x00802001, 0x20800022, 0x008d0100, 0x00000000 }, + { 0x00018022, 0x34001c00, 0x00001400, 0x00000006 }, + { 0x00000001, 0x22000060, 0x00000000, 0x0a082004 }, + { 0x00010040, 0x27e43ca5, 0x020007e4, 0x00080008 }, + { 0x00008024, 0x34001c00, 0x00001400, 0x0001000a }, + { 0x00010001, 0x22000060, 0x02000000, 0x0a082704 }, + { 0x00110001, 0x22000060, 0x02000000, 0x0a082604 }, + { 0x0000000c, 0x27e43ca5, 0x000007e4, 0x00010001 }, + { 0x00008025, 0x20000000, 0x00000000, 0x00000000 }, + { 0x01600031, 0x20000020, 0x508d07e0, 0x00000200 }, + { 0x01600005, 0x20003dac, 0x020005e0, 0x00010001 }, + { 0x01000005, 0x20003e2c, 0x00009002, 0x00020002 }, + { 0x00000401, 0x27e001a1, 0x000005c8, 0x00000000 }, + { 0x00000c0c, 0x27e43da1, 0x000005ca, 0x00010001 }, + { 0x00000801, 0x27e80061, 0x00000000, 0x0001000f }, + { 0x00610001, 0x20400022, 0x028d0040, 0x00000000 }, + { 0x00710001, 0x20400022, 0x028d0060, 0x00000000 }, + { 0x02000005, 0x20003dac, 0x0200002a, 0x00020002 }, + { 0x00018022, 0x34001c00, 0x00001400, 0x00000006 }, + { 0x00000001, 0x22000060, 0x00000000, 0x0418a004 }, + { 0x00010040, 0x27e43ca5, 0x020007e4, 0x00080008 }, + { 0x00008024, 0x34001c00, 0x00001400, 0x0001000c }, + { 0x0000000c, 0x27e43da5, 0x000005c2, 0x00020002 }, + { 0x00010001, 0x22000060, 0x02000000, 0x0418a704 }, + { 0x00110001, 0x22000060, 0x02000000, 0x0418a604 }, + { 0x00000040, 0x27e43ca5, 0x000007e4, 0xfffefffe }, + { 0x00008025, 0x20000000, 0x00000000, 0x00000000 }, + { 0x01600031, 0x26400021, 0x508d07e0, 0x00000200 }, + { 0x01000005, 0x20003dac, 0x0000002a, 0x00020002 }, + { 0x00000006, 0x202a3dad, 0x0000002a, 0x00020002 }, + { 0x00010220, 0x34001c00, 0x00001400, 0xfffffd94 }, + { 0x00600001, 0x26400021, 0x008d0640, 0x00000000 }, + { 0x00600001, 0x260001e1, 0x00000000, 0x00000000 }, + { 0x00000009, 0x26143da1, 0x000005e2, 0x00120012 }, + { 0x00000440, 0x26141c21, 0x00000614, 0x00020000 }, + { 0x00000c01, 0x26120129, 0x0000000c, 0x00000000 }, + { 0x00000c01, 0x26100169, 0x00000000, 0x12121212 }, + { 0x00400801, 0x26000171, 0x00000000, 0xffffffff }, + { 0x00600031, 0x20001c20, 0x308d0600, 0x82008002 }, + { 0x00600040, 0x2400462d, 0x00ae9c00, 0x00aed810 }, + { 0x00600040, 0x2340462d, 0x00ae9800, 0x00aed810 }, + { 0x00600040, 0x2360462d, 0x00ae9c10, 0x00aedc00 }, + { 0x05810010, 0x200025ac, 0x008d2400, 0x008d01c0 }, + { 0x05810010, 0x200025ac, 0x008d2340, 0x008d01e0 }, + { 0x05810010, 0x200025ac, 0x008d2360, 0x008d01e0 }, + { 0x00618022, 0x34001c00, 0x00001400, 0x00000036 }, + { 0x00618022, 0x34001c00, 0x02001400, 0x00000016 }, + { 0x00600040, 0x24003e2c, 0x00ae9c10, 0x00020002 }, + { 0x00600048, 0x24003e2c, 0x00ae9800, 0x00020002 }, + { 0x00600040, 0x2400458c, 0x008d0400, 0x00ae9810 }, + { 0x80600008, 0x43403d91, 0x008d0400, 0x00020002 }, + { 0x00600040, 0x24003e2c, 0x00ae9800, 0x00020002 }, + { 0x00600048, 0x24003e2c, 0x00ae9c10, 0x00020002 }, + { 0x00600040, 0x2400458c, 0x008d0400, 0x00ae9c00 }, + { 0x80600008, 0x43603d91, 0x008d0400, 0x00020002 }, + { 0x00600001, 0xd8100231, 0x00ae0340, 0x00000000 }, + { 0x00600001, 0xdc000231, 0x00ae0360, 0x00000000 }, + { 0x00608024, 0x34001c00, 0x00001400, 0x0001001e }, + { 0x00600040, 0x23e03d2d, 0x008d0200, 0x00010001 }, + { 0x00600040, 0x24003e2c, 0x00ae9800, 0x00040004 }, + { 0x00600048, 0x24003dac, 0x008d0400, 0x00040004 }, + { 0x00600040, 0x2400458c, 0x008d0400, 0x00aedc10 }, + { 0x00600008, 0x23403d8d, 0x008d0400, 0x00030003 }, + { 0x03600010, 0x200035ac, 0x008d0340, 0x008d03e0 }, + { 0x05600010, 0x200035ac, 0x028d0340, 0x008d43e0 }, + { 0x00610001, 0x234001ad, 0x008d03e0, 0x00000000 }, + { 0x00610001, 0x234001ad, 0x028d43e0, 0x00000000 }, + { 0x80600040, 0x43603631, 0x00ae9810, 0x008d0340 }, + { 0x80600040, 0x43403631, 0x00ae9c00, 0x008d4340 }, + { 0x00600001, 0xd8100231, 0x00ae0360, 0x00000000 }, + { 0x00600001, 0xdc000231, 0x00ae0340, 0x00000000 }, + { 0x00008025, 0x20000000, 0x00000000, 0x00000000 }, + { 0x00008025, 0x20000000, 0x00000000, 0x00000000 }, + { 0x00000001, 0x34000020, 0x000007c0, 0x00000000 }, + { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/AVCMCInter.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/AVCMCInter.asm --- libva-1.0.1/i965_drv_video/shaders/h264/mc/AVCMCInter.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/AVCMCInter.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,254 @@ +/* + * All inter-prediction macroblock kernels + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Kernel name: AVCMCInter.asm + +#ifdef INTERLABEL +#undef INTERLABEL +#endif + +#if defined(MBAFF) +// < MBaff_Motion > +#define INTERLABEL(x) x##_##MBF +#elif defined(FIELD) +// < FieldMB_Motion > +#define INTERLABEL(x) x##_##FLD +#else // FRAME +// < FrameMB_Motion > +#define INTERLABEL(x) x##_##FRM +#endif +// +// Decoding an inter-prediction macroblock (conditional compile) +// -DMBAFF : MBAff picture MB +// -DFRAME : Frame picture MB +// -DFIELD : Field picture MB +// -DMBAFF -DMONO : MBAff mono picture MB +// -DFRAME -DMONO : Frame mono picture MB +// -DFIELD -DMONO : Field mono picture MB + + +//#if !defined(__AVCMCInter__) // Make sure this is only included once +//#define __AVCMCInter__ + + +// TODO: header files need to be in sync with intra prediction +#include "header.inc" +#include "inter_Header.inc" + +// TODO: Kernel names for mono cases +#if defined(MBAFF) +.kernel MBAff_Motion +MBAFF_MB: +#elif defined(FIELD) +.kernel FieldMB_Motion +FIELD_MB: +#else // Frame +.kernel FrameMB_Motion +FRAME_MB: +#endif + +#ifdef _DEBUG +// WA for FULSIM so we'll know which kernel is being debugged +#if defined(MBAFF) +mov (1) acc0:ud 0x0aaa55a5:ud +#elif defined(FIELD) +mov (1) acc0:ud 0x0baa55a5:ud +#else // Frame +mov (1) acc0:ud 0x0caa55a5:ud +#endif +#endif + + +#ifdef SW_SCOREBOARD + CALL(scoreboard_start_inter,1) +#endif + + mov (8) gMSGSRC<1>:ud r0.0<8;8,1>:ud // Initialize message header payload with R0 + + and (1) gwMBTYPE<1> gMBTYPE:ub nMBTYPE_MASK:w // MB type + shl (2) gX<1>:w gORIX<2;2,1>:ub 4:w // Convert MB origin to pixel unit + +// #include "process_inter16x16.asm" // Handle B_L0_16x16 case with zero MVs and weighted pred off. + // In the case of B_L0_16x16 with zero MVs and weighted pred off, the kernel jumps to INTERLABEL(EXIT_LOOP). + +INTERLABEL(INIT_MBPARA): + #include "initialize_MBPara.asm" + + + //========================= BEGIN - LOOP_SUBMB =========================== + mov (1) gLOOP_SUBMB:uw 0:uw // 0, 2, 4, 6 +INTERLABEL(LOOP_SUBMB): + + //========================== BEGIN - LOOP_DIR ============================ + // Prediction flag (gPREDFLAG - 0:Pred_L0, 1:Pred_L1, 2:BiPred) + asr (1) gPREDFLAG:w gSUBMB_MODE:ub gLOOP_SUBMB:uw + mov (1) gLOOP_DIR:uw 1:uw // 1, 0 + and (1) gPREDFLAG:w gPREDFLAG:w 0x3:w +INTERLABEL(LOOP_DIR): + + cmp.e.f0.0 (1) null:w gLOOP_DIR:w gPREDFLAG:w + (f0.0) jmpi INTERLABEL(LOOP_DIR_CONTINUE) + + // Get binding table index + // & reference picture parity (gREFPARITY - 0:top, 0x100:bottom, x:frame) + // & address of interpolation result + cmp.e.f0.1 (1) null:w gLOOP_DIR:w 1:w + (f0.1) mov (1) gpINTP:ud nOFFSET_INTP0:ud {NoDDClr} // + (f0.1) and (1) gBIDX:w r[pBIDX]:ub 0x7f:w {NoDDChk} // + (-f0.1) mov (1) gpINTP:ud nOFFSET_INTP1:ud {NoDDClr} // + (-f0.1) and (1) gBIDX:w r[pBIDX,4]:ub 0x7f:w {NoDDChk} // +#if defined(MBAFF) || defined(FIELD) + (f0.1) and (1) gREFPARITY:w r[pBIDX]:ub 0x80:w + (-f0.1) and (1) gREFPARITY:w r[pBIDX,4]:ub 0x80:w + shl (1) gREFPARITY:w gREFPARITY<0;1,0>:w 1:w +#endif + + // Sub MB shape + asr (1) gSHAPETEMP:w gSUBMB_SHAPE:ub gLOOP_SUBMB:w + + // Chroma MV adjustment & Set message descriptor for frame/field read +#if defined(MBAFF) + #include "chromaMVAdjust.asm" + and.nz.f0.0 (1) null:uw gFIELDMBFLAG:ub nFIELDMB_MASK:uw + (f0.0) add (1) gD0:ud gBIDX:uw nDWBRMSGDSC_SC_TF:ud + (-f0.0) add (1) gMSGDSC_R:ud gBIDX:uw nDWBRMSGDSC_SC:ud + (f0.0) add (1) gMSGDSC_R:ud gD0:ud gREFPARITY:uw +#elif defined(FIELD) + #include "chromaMVAdjust.asm" + add (1) gMSGDSC_R:ud gBIDX:uw nDWBRMSGDSC_SC_TF:ud + add (1) gMSGDSC_R:ud gMSGDSC_R:ud gREFPARITY:uw +#else // FRAME + add (1) gMSGDSC_R:ud gBIDX:uw nDWBRMSGDSC_SC:ud +#endif + + and.nz.f0.1 (1) null:w gSHAPETEMP:w 3:w + (f0.1) jmpi INTERLABEL(PROCESS4x4) + + //======================== BEGIN - PROCESS 8x8 =========================== + + // Reference block load + #include "loadRef_Y_16x13.asm" +#ifndef MONO +#if defined(MBAFF) || defined(FIELD) + add (1) r[pMV,2]:w r[pMV,2]:w gCHRMVADJ:w +#endif + #include "loadRef_C_10x5.asm" +#endif + + // Interpolation + //CALL_INTER(INTERLABEL(Interpolate_Y_8x8_Func), 1) + #include "interpolate_Y_8x8.asm" +#ifndef MONO + //CALL_INTER(INTERLABEL(Interpolate_C_4x4_Func), 1) + #include "interpolate_C_4x4.asm" +#endif + + jmpi INTERLABEL(ROUND_SHIFT_C) + //========================= END - PROCESS 8x8 ============================ + + //======================== BEGIN - LOOP_SUBMBPT ========================== +INTERLABEL(PROCESS4x4): + + mov (1) gLOOP_SUBMBPT:uw 4:uw // 4, 3, 2, 1 +INTERLABEL(LOOP_SUBMBPT): + + // Reference block load + #include "loadRef_Y_16x9.asm" +#ifndef MONO +#if defined(MBAFF) || defined(FIELD) + add (1) r[pMV,2]:w r[pMV,2]:w gCHRMVADJ:w +#endif + #include "loadRef_C_6x3.asm" +#endif + + // Interpolation + #include "interpolate_Y_4x4.asm" +#ifndef MONO + #include "interpolate_C_2x2.asm" +#endif + + cmp.e.f0.0 (1) null:w gLOOP_SUBMBPT:uw 3:w + add.z.f0.1 (1) gLOOP_SUBMBPT:uw gLOOP_SUBMBPT:uw -1:w + add (1) pMV:w pMV:w 8:w + (-f0.0) add (1) gpINTP:ud gpINTP:ud 0x00080008:ud // 8 & 8 + (f0.0) add (1) gpINTP:ud gpINTP:ud 0x00180038:ud // 24 & 56 + (-f0.1) jmpi INTERLABEL(LOOP_SUBMBPT) + + cmp.e.f0.1 null:w gLOOP_DIR:w 1:w + add (1) pMV:w pMV:w -32:w + (f0.1) mov (1) gpINTP:ud nOFFSET_INTP0:ud + (-f0.1) mov (1) gpINTP:ud nOFFSET_INTP1:ud + + mov (1) pRESULT:uw gpINTPC:uw + + //========================= END - LOOP_SUBMBPT =========================== + +INTERLABEL(ROUND_SHIFT_C): + +#ifndef MONO + #include "roundShift_C_4x4.asm" +#endif + +INTERLABEL(LOOP_DIR_CONTINUE): + + add.nz.f0.1 (1) gLOOP_DIR:uw gLOOP_DIR:uw -1:w + add (1) pMV:w pMV:w 4:w + (-f0.1) jmpi INTERLABEL(LOOP_DIR) + //=========================== END - LOOP_DIR ============================= + +INTERLABEL(Weighted_Prediction): + #include "weightedPred.asm" + + and.z.f0.1 (16) null<1>:w gLOOP_SUBMB<0;1,0>:uw 2:w + + #include "recon_Y_8x8.asm" +#ifndef MONO + #include "recon_C_4x4.asm" + + (-f0.1) add (1) pERRORC:w pERRORC:w 48:w +#endif + + cmp.e.f0.1 (1) null:w gLOOP_SUBMB:uw 6:w + add (1) gLOOP_SUBMB:uw gLOOP_SUBMB:uw 2:w + + add (1) pWGT_BIDX:ud pWGT_BIDX:ud 0x00100001:ud // 12 & 1 + add (1) pMV:w pMV:w gMVSTEP:w + + (-f0.1) jmpi INTERLABEL(LOOP_SUBMB) + //========================== END - LOOP_SUBMB ============================ + +INTERLABEL(EXIT_LOOP): + #include "writeRecon_YC.asm" + +#ifdef SW_SCOREBOARD + wait n0:ud // Now wait for scoreboard to response + #include "Soreboard_update.asm" // scorboard update function +#else +// Check for write commit first if SW scoreboard is disabled + mov (1) gREG_WRITE_COMMIT_Y<1>:ud gREG_WRITE_COMMIT_Y<0;1,0>:ud // Make sure Y write is committed + mov (1) gREG_WRITE_COMMIT_UV<1>:ud gREG_WRITE_COMMIT_UV<0;1,0>:ud // Make sure U/V write is committed +#endif + +// Terminate the thread +// + END_THREAD + + +//#include "Interpolate_Y_8x8_Func.asm" +//#include "Interpolate_C_4x4_Func.asm" +//#include "WeightedPred_Y_Func.asm" +//#include "WeightedPred_C_Func.asm" + + +.end_code + +.end_kernel + + +//#endif // !defined(__AVCMCInter__) diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/BSDReset.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/BSDReset.asm --- libva-1.0.1/i965_drv_video/shaders/h264/mc/BSDReset.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/BSDReset.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,43 @@ +/* + * Initial kernel for filling initial BSD command buffer + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Kernel name: BSDReset.asm +// +// Initial kernel for filling initial BSD command buffer +// + +// ---------------------------------------------------- +// Main: BSDReset +// ---------------------------------------------------- + +.kernel BSDReset +BSDRESET: + +#include "header.inc" + +.code +#ifdef SW_SCOREBOARD + CALL(scoreboard_start_inter,1) + wait n0:ud // Now wait for scoreboard to response + +#define BSDRESET_ENABLE + #include "scoreboard_update.asm" // scorboard update function +#undef BSDRESET_ENABLE + +#endif // defined(SW_SCOREBOARD) + +// Terminate the thread +// + END_THREAD + +#if !defined(COMBINED_KERNEL) // For standalone kernel only +.end_code + +.end_kernel +#endif // !defined(COMBINED_KERNEL) diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/chromaMVAdjust.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/chromaMVAdjust.asm --- libva-1.0.1/i965_drv_video/shaders/h264/mc/chromaMVAdjust.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/chromaMVAdjust.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,27 @@ +/* + * Adjust chrom MV + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Kernel name: ChromaMVAdjust.asm +// +// + + +//#if !defined(__ChromaMVAdjust__) // Make sure this is only included once +//#define __ChromaMVAdjust__ + + + // Chroma MV adjustment + add (1) acc0:w gPARITY:w gREFPARITY:w + cmp.e.f0.0 (1) null:w acc0:w 0x1:w + cmp.e.f0.1 (1) null:w acc0:w 0x100:w + mov (1) gCHRMVADJ:w 0:w + (f0.0) mov (1) gCHRMVADJ:w 2:w + (f0.1) mov (1) gCHRMVADJ:w -2:w + +//#endif // !defined(__ChromaMVAdjust__) diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/DCResetDummy.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/DCResetDummy.asm --- libva-1.0.1/i965_drv_video/shaders/h264/mc/DCResetDummy.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/DCResetDummy.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,34 @@ +/* + * Dummy kernel + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Kernel name: DCResetDummy.asm +// +// Dummy kernel used by driver for debug-counter reset SW WA +// + +// ---------------------------------------------------- +// Main: DCResetDummy +// ---------------------------------------------------- + +.kernel DCResetDummy +DCRESETDUMMY: + +#include "header.inc" + +.code + +// Terminate the thread +// + END_THREAD + +#if !defined(COMBINED_KERNEL) // For standalone kernel only +.end_code + +.end_kernel +#endif // !defined(COMBINED_KERNEL) diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/Decode_Chroma_Intra.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/Decode_Chroma_Intra.asm --- libva-1.0.1/i965_drv_video/shaders/h264/mc/Decode_Chroma_Intra.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/Decode_Chroma_Intra.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,29 @@ +/* + * Decode both intra chroma blocks + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +#if !defined(__DECODE_CHROMA_INTRA__) // Make sure this is only included once +#define __DECODE_CHROMA_INTRA__ + +// Module name: Decode_Chroma_Intra.asm +// +// Decode both intra chroma blocks +// + +decode_Chroma_Intra: +#ifndef MONO + #include "load_Intra_Ref_UV.asm" // Load intra U/V reference data + #include "intra_Pred_Chroma.asm" // Intra predict chroma blocks + #include "add_Error_UV.asm" // Add error data to predicted U/V data blocks +#endif // !defined(MONO) + #include "save_8x8_UV.asm" // Save to destination U/V frame surface + + RETURN +// End of Decode_Chroma_Intra + +#endif // !defined(__DECODE_CHROMA_INTRA__) diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/EndIntraThread.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/EndIntraThread.asm --- libva-1.0.1/i965_drv_video/shaders/h264/mc/EndIntraThread.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/EndIntraThread.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,30 @@ +/* + * Common module to end current intra thread + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Kernel name: EndIntraThread.asm +// +// Common module to end current intra thread +// +#ifndef SW_SCOREBOARD +// Check for write commit first if SW scoreboard is disabled + mov (1) REG_WRITE_COMMIT_Y<1>:ud REG_WRITE_COMMIT_Y<0;1,0>:ud // Make sure Y write is committed + mov (1) REG_WRITE_COMMIT_UV<1>:ud REG_WRITE_COMMIT_UV<0;1,0>:ud // Make sure U/V write is committed +#endif + + END_THREAD + + #include "Intra_funcLib.asm" + +#ifndef COMBINED_KERNEL // For standalone kernel only +.end_code + +.end_kernel +#endif // COMBINED_KERNEL + +// End of EndIntraThread diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/export.inc libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/export.inc --- libva-1.0.1/i965_drv_video/shaders/h264/mc/export.inc 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/export.inc 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,345 @@ +#define INTRA_16x16_IP 0 +#define INTRA_16x16_VERTICAL_IP 14 +#define INTRA_16x16_HORIZONTAL_IP 32 +#define INTRA_16x16_DC_IP 52 +#define INTRA_16x16_PLANE_IP 98 +#define End_intra_Pred_16x16_Y_IP 166 +#define End_add_Error_16x16_Y_IP 204 +#define load_Intra_Ref_Y_IP 220 +#define decode_Chroma_Intra_IP 238 +#define INTRA_CHROMA_DC_IP 260 +#define INTRA_CHROMA_HORIZONTAL_IP 320 +#define INTRA_CHROMA_VERTICAL_IP 332 +#define INTRA_Chroma_PLANE_IP 342 +#define End_of_intra_Pred_Chroma_IP 392 +#define save_16x16_Y_IP 436 +#define INTRA_8x8_IP 464 +#define INTRA_8x8_BLK2_IP 568 +#define intra_Pred_8x8_Y_IP 640 +#define INTRA_8X8_VERTICAL_IP 672 +#define INTRA_8X8_HORIZONTAL_IP 682 +#define INTRA_8X8_DC_IP 692 +#define INTRA_8X8_DIAG_DOWN_LEFT_IP 724 +#define INTRA_8X8_DIAG_DOWN_RIGHT_IP 744 +#define INTRA_8X8_VERT_RIGHT_IP 772 +#define INTRA_8X8_HOR_DOWN_IP 808 +#define INTRA_8X8_VERT_LEFT_IP 842 +#define INTRA_8X8_HOR_UP_IP 862 +#define save_8x8_Y_IP 886 +#define INTRA_4x4_IP 928 +#define intra_Pred_4x4_Y_4_IP 1062 +#define ADD_ERROR_SB0_IP 1074 +#define ADD_ERROR_SB1_IP 1088 +#define ADD_ERROR_SB2_IP 1108 +#define ADD_ERROR_SB3_IP 1124 +#define intra_Pred_4x4_Y_IP 1130 +#define INTRA_4X4_VERTICAL_IP 1130 +#define INTRA_4X4_HORIZONTAL_IP 1134 +#define INTRA_4X4_DC_IP 1138 +#define INTRA_4X4_DIAG_DOWN_LEFT_IP 1160 +#define INTRA_4X4_DIAG_DOWN_RIGHT_IP 1174 +#define INTRA_4X4_VERT_RIGHT_IP 1192 +#define INTRA_4X4_HOR_DOWN_IP 1218 +#define INTRA_4X4_VERT_LEFT_IP 1246 +#define INTRA_4X4_HOR_UP_IP 1260 +#define save_4x4_Y_IP 1276 +#define INTRA_PCM_IP 1320 +#define FRAME_MB_IP 1384 +#define INIT_MBPARA_FRM_IP 1390 +#define NOT_8x8_MODE_FRM_IP 1426 +#define CONVERT_MVS_FRM_IP 1436 +#define INIT_ADDRESS_REGS_FRM_IP 1446 +#define LOOP_SUBMB_FRM_IP 1454 +#define LOOP_DIR_FRM_IP 1460 +#define LOADREF_MVXZERO_FRM_IP 1510 +#define EXIT_LOADREF_Y_16x13_FRM_IP 1524 +#define Interpolate_Y_8x8_Func_FRM_IP 1544 +#define Interpolate_Y_8x8_Func2_FRM_IP 1574 +#define Interpolate_Y_H_8x8_FRM_IP 1708 +#define Interpolate_Y_V_8x8_FRM_IP 1790 +#define VFILTER_8x8_FRM_IP 1812 +#define Interpolate_Y_I_8x8_FRM_IP 1860 +#define Average_8x8_FRM_IP 1880 +#define Return_Interpolate_Y_8x8_FRM_IP 1888 +#define Exit_Interpolate_Y_8x8_FRM_IP 1890 +#define Interpolate_C_4x4_Func_FRM_IP 1890 +#define PROCESS4x4_FRM_IP 1928 +#define LOOP_SUBMBPT_FRM_IP 1930 +#define Interpolate_Y_H_4x4_FRM_IP 2066 +#define Interpolate_Y_V_4x4_FRM_IP 2108 +#define VFILTER_4x4_FRM_IP 2142 +#define Interpolate_Y_I_4x4_FRM_IP 2148 +#define Average_4x4_FRM_IP 2160 +#define Return_Interpolate_Y_4x4_FRM_IP 2162 +#define Exit_Interpolate_Y_4x4_FRM_IP 2174 +#define ROUND_SHIFT_C_FRM_IP 2222 +#define LOOP_DIR_CONTINUE_FRM_IP 2230 +#define Weighted_Prediction_FRM_IP 2236 +#define DefaultWeightedPred_UniPred_FRM_IP 2244 +#define DefaultWeightedPred_BiPred_FRM_IP 2256 +#define WeightedPred_FRM_IP 2264 +#define WeightedPred_Explicit_FRM_IP 2282 +#define WeightedPred_LOOP_FRM_IP 2322 +#define Return_WeightedPred_FRM_IP 2382 +#define EXIT_LOOP_FRM_IP 2424 +#define FIELD_MB_IP 2496 +#define INIT_MBPARA_FLD_IP 2502 +#define NOT_8x8_MODE_FLD_IP 2538 +#define CONVERT_MVS_FLD_IP 2548 +#define INIT_ADDRESS_REGS_FLD_IP 2558 +#define LOOP_SUBMB_FLD_IP 2568 +#define LOOP_DIR_FLD_IP 2574 +#define LOADREF_MVXZERO_FLD_IP 2644 +#define EXIT_LOADREF_Y_16x13_FLD_IP 2658 +#define Interpolate_Y_8x8_Func_FLD_IP 2680 +#define Interpolate_Y_8x8_Func2_FLD_IP 2710 +#define Interpolate_Y_H_8x8_FLD_IP 2844 +#define Interpolate_Y_V_8x8_FLD_IP 2926 +#define VFILTER_8x8_FLD_IP 2948 +#define Interpolate_Y_I_8x8_FLD_IP 2996 +#define Average_8x8_FLD_IP 3016 +#define Return_Interpolate_Y_8x8_FLD_IP 3024 +#define Exit_Interpolate_Y_8x8_FLD_IP 3026 +#define Interpolate_C_4x4_Func_FLD_IP 3026 +#define PROCESS4x4_FLD_IP 3064 +#define LOOP_SUBMBPT_FLD_IP 3066 +#define Interpolate_Y_H_4x4_FLD_IP 3204 +#define Interpolate_Y_V_4x4_FLD_IP 3246 +#define VFILTER_4x4_FLD_IP 3280 +#define Interpolate_Y_I_4x4_FLD_IP 3286 +#define Average_4x4_FLD_IP 3298 +#define Return_Interpolate_Y_4x4_FLD_IP 3300 +#define Exit_Interpolate_Y_4x4_FLD_IP 3312 +#define ROUND_SHIFT_C_FLD_IP 3360 +#define LOOP_DIR_CONTINUE_FLD_IP 3368 +#define Weighted_Prediction_FLD_IP 3374 +#define DefaultWeightedPred_UniPred_FLD_IP 3382 +#define DefaultWeightedPred_BiPred_FLD_IP 3394 +#define WeightedPred_FLD_IP 3402 +#define WeightedPred_Explicit_FLD_IP 3420 +#define WeightedPred_LOOP_FLD_IP 3460 +#define Return_WeightedPred_FLD_IP 3520 +#define EXIT_LOOP_FLD_IP 3562 +#define MBAFF_MB_IP 3640 +#define INIT_MBPARA_MBF_IP 3646 +#define NOT_8x8_MODE_MBF_IP 3682 +#define CONVERT_MVS_MBF_IP 3692 +#define INIT_ADDRESS_REGS_MBF_IP 3702 +#define LOOP_SUBMB_MBF_IP 3716 +#define LOOP_DIR_MBF_IP 3722 +#define LOADREF_MVXZERO_MBF_IP 3796 +#define EXIT_LOADREF_Y_16x13_MBF_IP 3810 +#define Interpolate_Y_8x8_Func_MBF_IP 3832 +#define Interpolate_Y_8x8_Func2_MBF_IP 3862 +#define Interpolate_Y_H_8x8_MBF_IP 3996 +#define Interpolate_Y_V_8x8_MBF_IP 4078 +#define VFILTER_8x8_MBF_IP 4100 +#define Interpolate_Y_I_8x8_MBF_IP 4148 +#define Average_8x8_MBF_IP 4168 +#define Return_Interpolate_Y_8x8_MBF_IP 4176 +#define Exit_Interpolate_Y_8x8_MBF_IP 4178 +#define Interpolate_C_4x4_Func_MBF_IP 4178 +#define PROCESS4x4_MBF_IP 4216 +#define LOOP_SUBMBPT_MBF_IP 4218 +#define Interpolate_Y_H_4x4_MBF_IP 4356 +#define Interpolate_Y_V_4x4_MBF_IP 4398 +#define VFILTER_4x4_MBF_IP 4432 +#define Interpolate_Y_I_4x4_MBF_IP 4438 +#define Average_4x4_MBF_IP 4450 +#define Return_Interpolate_Y_4x4_MBF_IP 4452 +#define Exit_Interpolate_Y_4x4_MBF_IP 4464 +#define ROUND_SHIFT_C_MBF_IP 4512 +#define LOOP_DIR_CONTINUE_MBF_IP 4520 +#define Weighted_Prediction_MBF_IP 4526 +#define DefaultWeightedPred_UniPred_MBF_IP 4534 +#define DefaultWeightedPred_BiPred_MBF_IP 4546 +#define WeightedPred_MBF_IP 4554 +#define WeightedPred_Explicit_MBF_IP 4572 +#define WeightedPred_LOOP_MBF_IP 4612 +#define Return_WeightedPred_MBF_IP 4672 +#define EXIT_LOOP_MBF_IP 4714 +#define SETHWSCOREBOARD_IP 4792 +#define SetHWScoreboard_Loop_IP 4806 +#define Parse_8_Loop_0_IP 4852 +#define Parse_8_Loop_2_IP 4876 +#define Parse_8_Loop_4_IP 4900 +#define Parse_8_Loop_6_IP 4924 +#define Parse_8_Loop_8_IP 4948 +#define Parse_8_Loop_10_IP 4972 +#define Parse_8_Loop_12_IP 4996 +#define Parse_8_Loop_14_IP 5020 +#define SetHWScoreboard_Remainder_IP 5062 +#define SetHWScoreboard_Remainder_Loop_IP 5090 +#define Output_Remainder_Intra_IP 5116 +#define SetHWScoreboard_Done_IP 5128 +#define SETHWSCOREBOARD_MBAFF_IP 5136 +#define SetHWScoreboard_MBAFF_Loop_IP 5148 +#define SET_SB_MBAFF_INTRA_0_IP 5208 +#define SET_SB_MBAFF_0_IP 5230 +#define NEXT_MB_MBAFF_0_IP 5238 +#define SET_SB_MBAFF_INTRA_2_IP 5276 +#define SET_SB_MBAFF_2_IP 5298 +#define NEXT_MB_MBAFF_2_IP 5306 +#define SET_SB_MBAFF_INTRA_4_IP 5344 +#define SET_SB_MBAFF_4_IP 5366 +#define NEXT_MB_MBAFF_4_IP 5374 +#define SET_SB_MBAFF_INTRA_6_IP 5412 +#define SET_SB_MBAFF_6_IP 5434 +#define NEXT_MB_MBAFF_6_IP 5442 +#define SET_SB_MBAFF_INTRA_8_IP 5480 +#define SET_SB_MBAFF_8_IP 5502 +#define NEXT_MB_MBAFF_8_IP 5510 +#define SET_SB_MBAFF_INTRA_10_IP 5548 +#define SET_SB_MBAFF_10_IP 5570 +#define NEXT_MB_MBAFF_10_IP 5578 +#define SET_SB_MBAFF_INTRA_12_IP 5616 +#define SET_SB_MBAFF_12_IP 5638 +#define NEXT_MB_MBAFF_12_IP 5646 +#define SET_SB_MBAFF_INTRA_14_IP 5684 +#define SET_SB_MBAFF_14_IP 5706 +#define NEXT_MB_MBAFF_14_IP 5714 +#define SetHWScoreboard_MBAFF_Remainder_IP 5756 +#define SetHWScoreboard_MBAFF_Remainder_Loop_IP 5784 +#define SET_SB_MBAFF_REM_INTRA_IP 5822 +#define SET_SB_MBAFF_REM_IP 5846 +#define Output_MBAFF_Remainder_Intra_IP 5856 +#define SetHWScoreboard_MBAFF_Done_IP 5868 +#define BSDRESET_IP 5870 +#define DCRESETDUMMY_IP 5872 +#define AVC_ILDB_ROOT_Y_ILDB_FRAME_IP 5880 +#define SLEEP_ENTRY_Y_ILDB_FRAME_IP 5976 +#define POST_SLEEP_Y_ILDB_FRAME_IP 5980 +#define NEXT_MB_Y_ILDB_FRAME_IP 6010 +#define ALL_SPAWNED_Y_ILDB_FRAME_IP 6034 +#define ALL_DONE_Y_ILDB_FRAME_IP 6044 +#define WAIT_FOR_UV_ILDB_FRAME_IP 6044 +#define AVC_ILDB_CHILD_Y_ILDB_FRAME_IP 6056 +#define WRITE_URB_Y_ILDB_FRAME_IP 6436 +#define POST_ILDB_Y_ILDB_FRAME_IP 6444 +#define READ_FOR_URB_Y_ILDB_FRAME_IP 6458 +#define FILTER_Y_IP 6494 +#define Y_ELSE3_IP 6560 +#define Y_ENDIF3_IP 6574 +#define Y_ELSE4_IP 6604 +#define Y_ENDIF4_IP 6618 +#define Y_ELSE2_IP 6618 +#define Y_ENDIF6_IP 6684 +#define Y_ENDIF7_IP 6706 +#define Y_ENDIF2_IP 6710 +#define Y_ENDIF1_IP 6710 +#define AVC_ILDB_ROOT_UV_ILDB_FRAME_IP 6720 +#define SLEEP_ENTRY_UV_ILDB_FRAME_IP 6798 +#define POST_SLEEP_UV_ILDB_FRAME_IP 6802 +#define NEXT_MB_UV_ILDB_FRAME_IP 6834 +#define ALL_SPAWNED_UV_ILDB_FRAME_IP 6858 +#define ALL_DONE_UV_ILDB_FRAME_IP 6882 +#define AVC_ILDB_CHILD_UV_ILDB_FRAME_IP 6888 +#define BYPASS_EXT_LEFT_EDGE_UV_ILDB_FRAME_IP 7008 +#define BYPASS_EXT_TOP_EDGE_UV_ILDB_FRAME_IP 7126 +#define WRITE_URB_UV_ILDB_FRAME_IP 7194 +#define POST_ILDB_UV_ILDB_FRAME_IP 7202 +#define READ_FOR_URB_UV_ILDB_FRAME_IP 7216 +#define FILTER_UV_IP 7246 +#define UV_ELSE2_IP 7282 +#define UV_ENDIF2_IP 7314 +#define UV_ENDIF1_IP 7314 +#define AVC_ILDB_ROOT_Y_ILDB_FIELD_IP 7320 +#define SLEEP_ENTRY_Y_ILDB_FIELD_IP 7416 +#define POST_SLEEP_Y_ILDB_FIELD_IP 7420 +#define NEXT_MB_Y_ILDB_FIELD_IP 7450 +#define ALL_SPAWNED_Y_ILDB_FIELD_IP 7474 +#define ALL_DONE_Y_ILDB_FIELD_IP 7484 +#define WAIT_FOR_UV_ILDB_FIELD_IP 7484 +#define AVC_ILDB_CHILD_Y_ILDB_FIELD_IP 7496 +#define WRITE_URB_Y_ILDB_FIELD_IP 7896 +#define POST_ILDB_Y_ILDB_FIELD_IP 7904 +#define READ_FOR_URB_Y_ILDB_FIELD_IP 7918 +#define ELSE_Y_4x16T_ILDB_FIELD_IP 7934 +#define ENDIF_Y_4x16T_ILDB_FIELD_IP 7942 +#define AVC_ILDB_ROOT_UV_ILDB_FIELD_IP 7976 +#define SLEEP_ENTRY_UV_ILDB_FIELD_IP 8054 +#define POST_SLEEP_UV_ILDB_FIELD_IP 8058 +#define NEXT_MB_UV_ILDB_FIELD_IP 8090 +#define ALL_SPAWNED_UV_ILDB_FIELD_IP 8114 +#define ALL_DONE_UV_ILDB_FIELD_IP 8138 +#define AVC_ILDB_CHILD_UV_ILDB_FIELD_IP 8144 +#define BYPASS_EXT_LEFT_EDGE_UV_ILDB_FIELD_IP 8272 +#define BYPASS_EXT_TOP_EDGE_UV_ILDB_FIELD_IP 8394 +#define WRITE_URB_UV_ILDB_FIELD_IP 8470 +#define POST_ILDB_UV_ILDB_FIELD_IP 8478 +#define READ_FOR_URB_UV_ILDB_FIELD_IP 8492 +#define ELSE_Y_2x8T_ILDB_FIELD_IP 8508 +#define ENDIF_Y_2x8T_ILDB_FIELD_IP 8516 +#define AVC_ILDB_ROOT_Y_ILDB_MBAFF_IP 8544 +#define SLEEP_ENTRY_Y_ILDB_MBAFF_IP 8642 +#define POST_SLEEP_Y_ILDB_MBAFF_IP 8646 +#define NEXT_MB_Y_ILDB_MBAFF_IP 8676 +#define ALL_SPAWNED_Y_ILDB_MBAFF_IP 8700 +#define ALL_DONE_Y_ILDB_MBAFF_IP 8710 +#define WAIT_FOR_UV_ILDB_MBAFF_IP 8710 +#define AVC_ILDB_CHILD_Y_ILDB_MBAFF_IP 8720 +#define RE_ENTRY_IP 8742 +#define ELSE_Y_16x16T_ILDB_MBAFF_IP 8782 +#define ENDIF_Y_16x16T_ILDB_MBAFF_IP 8792 +#define ELSE_Y_4x16T_IP 8808 +#define ENDIF_Y_4x16T_IP 8818 +#define BYPASS_V1_Y_IP 8966 +#define BYPASS_V2_Y_IP 8980 +#define BYPASS_V3_Y_IP 8994 +#define ELSE_Y_16x4T_IP 9024 +#define ENDIF_Y_16x4T_IP 9034 +#define NOT_DUAL_FIELD_IP 9060 +#define ELSE_Y_16x4_IP 9060 +#define ENDIF_Y_16x4_IP 9072 +#define DUAL_FIELD_Y_IP 9168 +#define H0_Y_DONE_IP 9236 +#define ELSE_Y_16x16_IP 9310 +#define ENDIF_Y_16x16_IP 9320 +#define ELSE_Y_16x4_SAVE_IP 9342 +#define ENDIF_Y_16x4_SAVE_IP 9354 +#define SKIP_ILDB_IP 9356 +#define POST_ILDB_IP 9364 +#define FILTER_Y_MBAFF_IP 9378 +#define MBAFF_Y_ELSE3_IP 9444 +#define MBAFF_Y_ENDIF3_IP 9458 +#define MBAFF_Y_ELSE4_IP 9488 +#define MBAFF_Y_ENDIF4_IP 9502 +#define MBAFF_Y_ELSE2_IP 9502 +#define MBAFF_Y_ENDIF6_IP 9566 +#define MBAFF_Y_ENDIF7_IP 9588 +#define MBAFF_Y_ENDIF2_IP 9592 +#define MBAFF_Y_ENDIF1_IP 9592 +#define AVC_ILDB_ROOT_UV_ILDB_MBAFF_IP 9600 +#define SLEEP_ENTRY_UV_ILDB_MBAFF_IP 9678 +#define POST_SLEEP_UV_ILDB_MBAFF_IP 9682 +#define NEXT_MB_UV_ILDB_MBAFF_IP 9714 +#define ALL_SPAWNED_UV_ILDB_MBAFF_IP 9738 +#define ALL_DONE_UV_ILDB_MBAFF_IP 9762 +#define AVC_ILDB_CHILD_UV_ILDB_MBAFF_IP 9768 +#define RE_ENTRY_UV_ILDB_MBAFF_IP 9794 +#define ELSE_UV_8X8T_ILDB_MBAFF_IP 9836 +#define ENDIF_UV_8X8T_ILDB_MBAFF_IP 9846 +#define ELSE_Y_2x8T_ILDB_MBAFF_IP 9864 +#define ENDIF_Y_2x8T_ILDB_MBAFF_IP 9874 +#define V0_U_NEXT1_IP 9934 +#define V0_U_NEXT2_IP 9954 +#define V0_U_NEXT3_IP 9964 +#define BYPASS_V0_UV_IP 10018 +#define ELSE_UV_8X2T_IP 10082 +#define ENDIF_UV_8X2T_IP 10092 +#define NOT_DUAL_FIELD_UV_IP 10120 +#define ELSE_UV_8X2_IP 10120 +#define ENDIF_UV_8X2_IP 10132 +#define DUAL_FIELD_UV_IP 10208 +#define H0_UV_DONE_IP 10300 +#define ELSE_UV_8X8_IP 10360 +#define ENDIF_UV_8X8_IP 10370 +#define ELSE_UV_8X2_SAVE_IP 10394 +#define ENDIF_UV_8X2_SAVE_IP 10406 +#define SKIP_ILDB_UV_ILDB_MBAFF_IP 10408 +#define POST_ILDB_UV_ILDB_MBAFF_IP 10416 +#define FILTER_UV_MBAFF_IP 10430 +#define MBAFF_UV_ELSE2_IP 10466 +#define MBAFF_UV_ENDIF2_IP 10496 +#define MBAFF_UV_ENDIF1_IP 10496 +#define AllAVC_END_IP 10500 diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/export.inc.gen5 libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/export.inc.gen5 --- libva-1.0.1/i965_drv_video/shaders/h264/mc/export.inc.gen5 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/export.inc.gen5 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,345 @@ +#define INTRA_16x16_IP_GEN5 0 +#define INTRA_16x16_VERTICAL_IP_GEN5 14 +#define INTRA_16x16_HORIZONTAL_IP_GEN5 32 +#define INTRA_16x16_DC_IP_GEN5 52 +#define INTRA_16x16_PLANE_IP_GEN5 98 +#define End_intra_Pred_16x16_Y_IP_GEN5 166 +#define End_add_Error_16x16_Y_IP_GEN5 204 +#define load_Intra_Ref_Y_IP_GEN5 220 +#define decode_Chroma_Intra_IP_GEN5 238 +#define INTRA_CHROMA_DC_IP_GEN5 260 +#define INTRA_CHROMA_HORIZONTAL_IP_GEN5 320 +#define INTRA_CHROMA_VERTICAL_IP_GEN5 332 +#define INTRA_Chroma_PLANE_IP_GEN5 342 +#define End_of_intra_Pred_Chroma_IP_GEN5 392 +#define save_16x16_Y_IP_GEN5 436 +#define INTRA_8x8_IP_GEN5 464 +#define INTRA_8x8_BLK2_IP_GEN5 568 +#define intra_Pred_8x8_Y_IP_GEN5 640 +#define INTRA_8X8_VERTICAL_IP_GEN5 672 +#define INTRA_8X8_HORIZONTAL_IP_GEN5 682 +#define INTRA_8X8_DC_IP_GEN5 692 +#define INTRA_8X8_DIAG_DOWN_LEFT_IP_GEN5 724 +#define INTRA_8X8_DIAG_DOWN_RIGHT_IP_GEN5 744 +#define INTRA_8X8_VERT_RIGHT_IP_GEN5 772 +#define INTRA_8X8_HOR_DOWN_IP_GEN5 808 +#define INTRA_8X8_VERT_LEFT_IP_GEN5 842 +#define INTRA_8X8_HOR_UP_IP_GEN5 862 +#define save_8x8_Y_IP_GEN5 886 +#define INTRA_4x4_IP_GEN5 928 +#define intra_Pred_4x4_Y_4_IP_GEN5 1062 +#define ADD_ERROR_SB0_IP_GEN5 1074 +#define ADD_ERROR_SB1_IP_GEN5 1088 +#define ADD_ERROR_SB2_IP_GEN5 1108 +#define ADD_ERROR_SB3_IP_GEN5 1124 +#define intra_Pred_4x4_Y_IP_GEN5 1130 +#define INTRA_4X4_VERTICAL_IP_GEN5 1130 +#define INTRA_4X4_HORIZONTAL_IP_GEN5 1134 +#define INTRA_4X4_DC_IP_GEN5 1138 +#define INTRA_4X4_DIAG_DOWN_LEFT_IP_GEN5 1160 +#define INTRA_4X4_DIAG_DOWN_RIGHT_IP_GEN5 1174 +#define INTRA_4X4_VERT_RIGHT_IP_GEN5 1192 +#define INTRA_4X4_HOR_DOWN_IP_GEN5 1218 +#define INTRA_4X4_VERT_LEFT_IP_GEN5 1246 +#define INTRA_4X4_HOR_UP_IP_GEN5 1260 +#define save_4x4_Y_IP_GEN5 1276 +#define INTRA_PCM_IP_GEN5 1320 +#define FRAME_MB_IP_GEN5 1384 +#define INIT_MBPARA_FRM_IP_GEN5 1390 +#define NOT_8x8_MODE_FRM_IP_GEN5 1426 +#define CONVERT_MVS_FRM_IP_GEN5 1436 +#define INIT_ADDRESS_REGS_FRM_IP_GEN5 1446 +#define LOOP_SUBMB_FRM_IP_GEN5 1454 +#define LOOP_DIR_FRM_IP_GEN5 1460 +#define LOADREF_MVXZERO_FRM_IP_GEN5 1510 +#define EXIT_LOADREF_Y_16x13_FRM_IP_GEN5 1524 +#define Interpolate_Y_8x8_Func_FRM_IP_GEN5 1544 +#define Interpolate_Y_8x8_Func2_FRM_IP_GEN5 1574 +#define Interpolate_Y_H_8x8_FRM_IP_GEN5 1708 +#define Interpolate_Y_V_8x8_FRM_IP_GEN5 1790 +#define VFILTER_8x8_FRM_IP_GEN5 1812 +#define Interpolate_Y_I_8x8_FRM_IP_GEN5 1860 +#define Average_8x8_FRM_IP_GEN5 1880 +#define Return_Interpolate_Y_8x8_FRM_IP_GEN5 1888 +#define Exit_Interpolate_Y_8x8_FRM_IP_GEN5 1890 +#define Interpolate_C_4x4_Func_FRM_IP_GEN5 1890 +#define PROCESS4x4_FRM_IP_GEN5 1928 +#define LOOP_SUBMBPT_FRM_IP_GEN5 1930 +#define Interpolate_Y_H_4x4_FRM_IP_GEN5 2066 +#define Interpolate_Y_V_4x4_FRM_IP_GEN5 2108 +#define VFILTER_4x4_FRM_IP_GEN5 2142 +#define Interpolate_Y_I_4x4_FRM_IP_GEN5 2148 +#define Average_4x4_FRM_IP_GEN5 2160 +#define Return_Interpolate_Y_4x4_FRM_IP_GEN5 2162 +#define Exit_Interpolate_Y_4x4_FRM_IP_GEN5 2174 +#define ROUND_SHIFT_C_FRM_IP_GEN5 2222 +#define LOOP_DIR_CONTINUE_FRM_IP_GEN5 2230 +#define Weighted_Prediction_FRM_IP_GEN5 2236 +#define DefaultWeightedPred_UniPred_FRM_IP_GEN5 2244 +#define DefaultWeightedPred_BiPred_FRM_IP_GEN5 2256 +#define WeightedPred_FRM_IP_GEN5 2264 +#define WeightedPred_Explicit_FRM_IP_GEN5 2282 +#define WeightedPred_LOOP_FRM_IP_GEN5 2322 +#define Return_WeightedPred_FRM_IP_GEN5 2382 +#define EXIT_LOOP_FRM_IP_GEN5 2424 +#define FIELD_MB_IP_GEN5 2496 +#define INIT_MBPARA_FLD_IP_GEN5 2502 +#define NOT_8x8_MODE_FLD_IP_GEN5 2538 +#define CONVERT_MVS_FLD_IP_GEN5 2548 +#define INIT_ADDRESS_REGS_FLD_IP_GEN5 2558 +#define LOOP_SUBMB_FLD_IP_GEN5 2568 +#define LOOP_DIR_FLD_IP_GEN5 2574 +#define LOADREF_MVXZERO_FLD_IP_GEN5 2644 +#define EXIT_LOADREF_Y_16x13_FLD_IP_GEN5 2658 +#define Interpolate_Y_8x8_Func_FLD_IP_GEN5 2680 +#define Interpolate_Y_8x8_Func2_FLD_IP_GEN5 2710 +#define Interpolate_Y_H_8x8_FLD_IP_GEN5 2844 +#define Interpolate_Y_V_8x8_FLD_IP_GEN5 2926 +#define VFILTER_8x8_FLD_IP_GEN5 2948 +#define Interpolate_Y_I_8x8_FLD_IP_GEN5 2996 +#define Average_8x8_FLD_IP_GEN5 3016 +#define Return_Interpolate_Y_8x8_FLD_IP_GEN5 3024 +#define Exit_Interpolate_Y_8x8_FLD_IP_GEN5 3026 +#define Interpolate_C_4x4_Func_FLD_IP_GEN5 3026 +#define PROCESS4x4_FLD_IP_GEN5 3064 +#define LOOP_SUBMBPT_FLD_IP_GEN5 3066 +#define Interpolate_Y_H_4x4_FLD_IP_GEN5 3204 +#define Interpolate_Y_V_4x4_FLD_IP_GEN5 3246 +#define VFILTER_4x4_FLD_IP_GEN5 3280 +#define Interpolate_Y_I_4x4_FLD_IP_GEN5 3286 +#define Average_4x4_FLD_IP_GEN5 3298 +#define Return_Interpolate_Y_4x4_FLD_IP_GEN5 3300 +#define Exit_Interpolate_Y_4x4_FLD_IP_GEN5 3312 +#define ROUND_SHIFT_C_FLD_IP_GEN5 3360 +#define LOOP_DIR_CONTINUE_FLD_IP_GEN5 3368 +#define Weighted_Prediction_FLD_IP_GEN5 3374 +#define DefaultWeightedPred_UniPred_FLD_IP_GEN5 3382 +#define DefaultWeightedPred_BiPred_FLD_IP_GEN5 3394 +#define WeightedPred_FLD_IP_GEN5 3402 +#define WeightedPred_Explicit_FLD_IP_GEN5 3420 +#define WeightedPred_LOOP_FLD_IP_GEN5 3460 +#define Return_WeightedPred_FLD_IP_GEN5 3520 +#define EXIT_LOOP_FLD_IP_GEN5 3562 +#define MBAFF_MB_IP_GEN5 3640 +#define INIT_MBPARA_MBF_IP_GEN5 3646 +#define NOT_8x8_MODE_MBF_IP_GEN5 3682 +#define CONVERT_MVS_MBF_IP_GEN5 3692 +#define INIT_ADDRESS_REGS_MBF_IP_GEN5 3702 +#define LOOP_SUBMB_MBF_IP_GEN5 3716 +#define LOOP_DIR_MBF_IP_GEN5 3722 +#define LOADREF_MVXZERO_MBF_IP_GEN5 3796 +#define EXIT_LOADREF_Y_16x13_MBF_IP_GEN5 3810 +#define Interpolate_Y_8x8_Func_MBF_IP_GEN5 3832 +#define Interpolate_Y_8x8_Func2_MBF_IP_GEN5 3862 +#define Interpolate_Y_H_8x8_MBF_IP_GEN5 3996 +#define Interpolate_Y_V_8x8_MBF_IP_GEN5 4078 +#define VFILTER_8x8_MBF_IP_GEN5 4100 +#define Interpolate_Y_I_8x8_MBF_IP_GEN5 4148 +#define Average_8x8_MBF_IP_GEN5 4168 +#define Return_Interpolate_Y_8x8_MBF_IP_GEN5 4176 +#define Exit_Interpolate_Y_8x8_MBF_IP_GEN5 4178 +#define Interpolate_C_4x4_Func_MBF_IP_GEN5 4178 +#define PROCESS4x4_MBF_IP_GEN5 4216 +#define LOOP_SUBMBPT_MBF_IP_GEN5 4218 +#define Interpolate_Y_H_4x4_MBF_IP_GEN5 4356 +#define Interpolate_Y_V_4x4_MBF_IP_GEN5 4398 +#define VFILTER_4x4_MBF_IP_GEN5 4432 +#define Interpolate_Y_I_4x4_MBF_IP_GEN5 4438 +#define Average_4x4_MBF_IP_GEN5 4450 +#define Return_Interpolate_Y_4x4_MBF_IP_GEN5 4452 +#define Exit_Interpolate_Y_4x4_MBF_IP_GEN5 4464 +#define ROUND_SHIFT_C_MBF_IP_GEN5 4512 +#define LOOP_DIR_CONTINUE_MBF_IP_GEN5 4520 +#define Weighted_Prediction_MBF_IP_GEN5 4526 +#define DefaultWeightedPred_UniPred_MBF_IP_GEN5 4534 +#define DefaultWeightedPred_BiPred_MBF_IP_GEN5 4546 +#define WeightedPred_MBF_IP_GEN5 4554 +#define WeightedPred_Explicit_MBF_IP_GEN5 4572 +#define WeightedPred_LOOP_MBF_IP_GEN5 4612 +#define Return_WeightedPred_MBF_IP_GEN5 4672 +#define EXIT_LOOP_MBF_IP_GEN5 4714 +#define SETHWSCOREBOARD_IP_GEN5 4792 +#define SetHWScoreboard_Loop_IP_GEN5 4806 +#define Parse_8_Loop_0_IP_GEN5 4852 +#define Parse_8_Loop_2_IP_GEN5 4876 +#define Parse_8_Loop_4_IP_GEN5 4900 +#define Parse_8_Loop_6_IP_GEN5 4924 +#define Parse_8_Loop_8_IP_GEN5 4948 +#define Parse_8_Loop_10_IP_GEN5 4972 +#define Parse_8_Loop_12_IP_GEN5 4996 +#define Parse_8_Loop_14_IP_GEN5 5020 +#define SetHWScoreboard_Remainder_IP_GEN5 5062 +#define SetHWScoreboard_Remainder_Loop_IP_GEN5 5090 +#define Output_Remainder_Intra_IP_GEN5 5116 +#define SetHWScoreboard_Done_IP_GEN5 5128 +#define SETHWSCOREBOARD_MBAFF_IP_GEN5 5136 +#define SetHWScoreboard_MBAFF_Loop_IP_GEN5 5148 +#define SET_SB_MBAFF_INTRA_0_IP_GEN5 5208 +#define SET_SB_MBAFF_0_IP_GEN5 5230 +#define NEXT_MB_MBAFF_0_IP_GEN5 5238 +#define SET_SB_MBAFF_INTRA_2_IP_GEN5 5276 +#define SET_SB_MBAFF_2_IP_GEN5 5298 +#define NEXT_MB_MBAFF_2_IP_GEN5 5306 +#define SET_SB_MBAFF_INTRA_4_IP_GEN5 5344 +#define SET_SB_MBAFF_4_IP_GEN5 5366 +#define NEXT_MB_MBAFF_4_IP_GEN5 5374 +#define SET_SB_MBAFF_INTRA_6_IP_GEN5 5412 +#define SET_SB_MBAFF_6_IP_GEN5 5434 +#define NEXT_MB_MBAFF_6_IP_GEN5 5442 +#define SET_SB_MBAFF_INTRA_8_IP_GEN5 5480 +#define SET_SB_MBAFF_8_IP_GEN5 5502 +#define NEXT_MB_MBAFF_8_IP_GEN5 5510 +#define SET_SB_MBAFF_INTRA_10_IP_GEN5 5548 +#define SET_SB_MBAFF_10_IP_GEN5 5570 +#define NEXT_MB_MBAFF_10_IP_GEN5 5578 +#define SET_SB_MBAFF_INTRA_12_IP_GEN5 5616 +#define SET_SB_MBAFF_12_IP_GEN5 5638 +#define NEXT_MB_MBAFF_12_IP_GEN5 5646 +#define SET_SB_MBAFF_INTRA_14_IP_GEN5 5684 +#define SET_SB_MBAFF_14_IP_GEN5 5706 +#define NEXT_MB_MBAFF_14_IP_GEN5 5714 +#define SetHWScoreboard_MBAFF_Remainder_IP_GEN5 5756 +#define SetHWScoreboard_MBAFF_Remainder_Loop_IP_GEN5 5784 +#define SET_SB_MBAFF_REM_INTRA_IP_GEN5 5822 +#define SET_SB_MBAFF_REM_IP_GEN5 5846 +#define Output_MBAFF_Remainder_Intra_IP_GEN5 5856 +#define SetHWScoreboard_MBAFF_Done_IP_GEN5 5868 +#define BSDRESET_IP_GEN5 5870 +#define DCRESETDUMMY_IP_GEN5 5872 +#define AVC_ILDB_ROOT_Y_ILDB_FRAME_IP_GEN5 5880 +#define SLEEP_ENTRY_Y_ILDB_FRAME_IP_GEN5 5976 +#define POST_SLEEP_Y_ILDB_FRAME_IP_GEN5 5980 +#define NEXT_MB_Y_ILDB_FRAME_IP_GEN5 6010 +#define ALL_SPAWNED_Y_ILDB_FRAME_IP_GEN5 6034 +#define ALL_DONE_Y_ILDB_FRAME_IP_GEN5 6044 +#define WAIT_FOR_UV_ILDB_FRAME_IP_GEN5 6044 +#define AVC_ILDB_CHILD_Y_ILDB_FRAME_IP_GEN5 6056 +#define WRITE_URB_Y_ILDB_FRAME_IP_GEN5 6436 +#define POST_ILDB_Y_ILDB_FRAME_IP_GEN5 6444 +#define READ_FOR_URB_Y_ILDB_FRAME_IP_GEN5 6458 +#define FILTER_Y_IP_GEN5 6494 +#define Y_ELSE3_IP_GEN5 6560 +#define Y_ENDIF3_IP_GEN5 6574 +#define Y_ELSE4_IP_GEN5 6604 +#define Y_ENDIF4_IP_GEN5 6618 +#define Y_ELSE2_IP_GEN5 6618 +#define Y_ENDIF6_IP_GEN5 6684 +#define Y_ENDIF7_IP_GEN5 6706 +#define Y_ENDIF2_IP_GEN5 6710 +#define Y_ENDIF1_IP_GEN5 6710 +#define AVC_ILDB_ROOT_UV_ILDB_FRAME_IP_GEN5 6720 +#define SLEEP_ENTRY_UV_ILDB_FRAME_IP_GEN5 6798 +#define POST_SLEEP_UV_ILDB_FRAME_IP_GEN5 6802 +#define NEXT_MB_UV_ILDB_FRAME_IP_GEN5 6834 +#define ALL_SPAWNED_UV_ILDB_FRAME_IP_GEN5 6858 +#define ALL_DONE_UV_ILDB_FRAME_IP_GEN5 6882 +#define AVC_ILDB_CHILD_UV_ILDB_FRAME_IP_GEN5 6888 +#define BYPASS_EXT_LEFT_EDGE_UV_ILDB_FRAME_IP_GEN5 7008 +#define BYPASS_EXT_TOP_EDGE_UV_ILDB_FRAME_IP_GEN5 7126 +#define WRITE_URB_UV_ILDB_FRAME_IP_GEN5 7194 +#define POST_ILDB_UV_ILDB_FRAME_IP_GEN5 7202 +#define READ_FOR_URB_UV_ILDB_FRAME_IP_GEN5 7216 +#define FILTER_UV_IP_GEN5 7246 +#define UV_ELSE2_IP_GEN5 7282 +#define UV_ENDIF2_IP_GEN5 7314 +#define UV_ENDIF1_IP_GEN5 7314 +#define AVC_ILDB_ROOT_Y_ILDB_FIELD_IP_GEN5 7320 +#define SLEEP_ENTRY_Y_ILDB_FIELD_IP_GEN5 7416 +#define POST_SLEEP_Y_ILDB_FIELD_IP_GEN5 7420 +#define NEXT_MB_Y_ILDB_FIELD_IP_GEN5 7450 +#define ALL_SPAWNED_Y_ILDB_FIELD_IP_GEN5 7474 +#define ALL_DONE_Y_ILDB_FIELD_IP_GEN5 7484 +#define WAIT_FOR_UV_ILDB_FIELD_IP_GEN5 7484 +#define AVC_ILDB_CHILD_Y_ILDB_FIELD_IP_GEN5 7496 +#define WRITE_URB_Y_ILDB_FIELD_IP_GEN5 7896 +#define POST_ILDB_Y_ILDB_FIELD_IP_GEN5 7904 +#define READ_FOR_URB_Y_ILDB_FIELD_IP_GEN5 7918 +#define ELSE_Y_4x16T_ILDB_FIELD_IP_GEN5 7934 +#define ENDIF_Y_4x16T_ILDB_FIELD_IP_GEN5 7942 +#define AVC_ILDB_ROOT_UV_ILDB_FIELD_IP_GEN5 7976 +#define SLEEP_ENTRY_UV_ILDB_FIELD_IP_GEN5 8054 +#define POST_SLEEP_UV_ILDB_FIELD_IP_GEN5 8058 +#define NEXT_MB_UV_ILDB_FIELD_IP_GEN5 8090 +#define ALL_SPAWNED_UV_ILDB_FIELD_IP_GEN5 8114 +#define ALL_DONE_UV_ILDB_FIELD_IP_GEN5 8138 +#define AVC_ILDB_CHILD_UV_ILDB_FIELD_IP_GEN5 8144 +#define BYPASS_EXT_LEFT_EDGE_UV_ILDB_FIELD_IP_GEN5 8272 +#define BYPASS_EXT_TOP_EDGE_UV_ILDB_FIELD_IP_GEN5 8394 +#define WRITE_URB_UV_ILDB_FIELD_IP_GEN5 8470 +#define POST_ILDB_UV_ILDB_FIELD_IP_GEN5 8478 +#define READ_FOR_URB_UV_ILDB_FIELD_IP_GEN5 8492 +#define ELSE_Y_2x8T_ILDB_FIELD_IP_GEN5 8508 +#define ENDIF_Y_2x8T_ILDB_FIELD_IP_GEN5 8516 +#define AVC_ILDB_ROOT_Y_ILDB_MBAFF_IP_GEN5 8544 +#define SLEEP_ENTRY_Y_ILDB_MBAFF_IP_GEN5 8642 +#define POST_SLEEP_Y_ILDB_MBAFF_IP_GEN5 8646 +#define NEXT_MB_Y_ILDB_MBAFF_IP_GEN5 8676 +#define ALL_SPAWNED_Y_ILDB_MBAFF_IP_GEN5 8700 +#define ALL_DONE_Y_ILDB_MBAFF_IP_GEN5 8710 +#define WAIT_FOR_UV_ILDB_MBAFF_IP_GEN5 8710 +#define AVC_ILDB_CHILD_Y_ILDB_MBAFF_IP_GEN5 8720 +#define RE_ENTRY_IP_GEN5 8742 +#define ELSE_Y_16x16T_ILDB_MBAFF_IP_GEN5 8782 +#define ENDIF_Y_16x16T_ILDB_MBAFF_IP_GEN5 8792 +#define ELSE_Y_4x16T_IP_GEN5 8808 +#define ENDIF_Y_4x16T_IP_GEN5 8818 +#define BYPASS_V1_Y_IP_GEN5 8966 +#define BYPASS_V2_Y_IP_GEN5 8980 +#define BYPASS_V3_Y_IP_GEN5 8994 +#define ELSE_Y_16x4T_IP_GEN5 9024 +#define ENDIF_Y_16x4T_IP_GEN5 9034 +#define NOT_DUAL_FIELD_IP_GEN5 9060 +#define ELSE_Y_16x4_IP_GEN5 9060 +#define ENDIF_Y_16x4_IP_GEN5 9072 +#define DUAL_FIELD_Y_IP_GEN5 9168 +#define H0_Y_DONE_IP_GEN5 9236 +#define ELSE_Y_16x16_IP_GEN5 9310 +#define ENDIF_Y_16x16_IP_GEN5 9320 +#define ELSE_Y_16x4_SAVE_IP_GEN5 9342 +#define ENDIF_Y_16x4_SAVE_IP_GEN5 9354 +#define SKIP_ILDB_IP_GEN5 9356 +#define POST_ILDB_IP_GEN5 9364 +#define FILTER_Y_MBAFF_IP_GEN5 9378 +#define MBAFF_Y_ELSE3_IP_GEN5 9444 +#define MBAFF_Y_ENDIF3_IP_GEN5 9458 +#define MBAFF_Y_ELSE4_IP_GEN5 9488 +#define MBAFF_Y_ENDIF4_IP_GEN5 9502 +#define MBAFF_Y_ELSE2_IP_GEN5 9502 +#define MBAFF_Y_ENDIF6_IP_GEN5 9566 +#define MBAFF_Y_ENDIF7_IP_GEN5 9588 +#define MBAFF_Y_ENDIF2_IP_GEN5 9592 +#define MBAFF_Y_ENDIF1_IP_GEN5 9592 +#define AVC_ILDB_ROOT_UV_ILDB_MBAFF_IP_GEN5 9600 +#define SLEEP_ENTRY_UV_ILDB_MBAFF_IP_GEN5 9678 +#define POST_SLEEP_UV_ILDB_MBAFF_IP_GEN5 9682 +#define NEXT_MB_UV_ILDB_MBAFF_IP_GEN5 9714 +#define ALL_SPAWNED_UV_ILDB_MBAFF_IP_GEN5 9738 +#define ALL_DONE_UV_ILDB_MBAFF_IP_GEN5 9762 +#define AVC_ILDB_CHILD_UV_ILDB_MBAFF_IP_GEN5 9768 +#define RE_ENTRY_UV_ILDB_MBAFF_IP_GEN5 9794 +#define ELSE_UV_8X8T_ILDB_MBAFF_IP_GEN5 9836 +#define ENDIF_UV_8X8T_ILDB_MBAFF_IP_GEN5 9846 +#define ELSE_Y_2x8T_ILDB_MBAFF_IP_GEN5 9864 +#define ENDIF_Y_2x8T_ILDB_MBAFF_IP_GEN5 9874 +#define V0_U_NEXT1_IP_GEN5 9934 +#define V0_U_NEXT2_IP_GEN5 9954 +#define V0_U_NEXT3_IP_GEN5 9964 +#define BYPASS_V0_UV_IP_GEN5 10018 +#define ELSE_UV_8X2T_IP_GEN5 10082 +#define ENDIF_UV_8X2T_IP_GEN5 10092 +#define NOT_DUAL_FIELD_UV_IP_GEN5 10120 +#define ELSE_UV_8X2_IP_GEN5 10120 +#define ENDIF_UV_8X2_IP_GEN5 10132 +#define DUAL_FIELD_UV_IP_GEN5 10208 +#define H0_UV_DONE_IP_GEN5 10300 +#define ELSE_UV_8X8_IP_GEN5 10360 +#define ENDIF_UV_8X8_IP_GEN5 10370 +#define ELSE_UV_8X2_SAVE_IP_GEN5 10394 +#define ENDIF_UV_8X2_SAVE_IP_GEN5 10406 +#define SKIP_ILDB_UV_ILDB_MBAFF_IP_GEN5 10408 +#define POST_ILDB_UV_ILDB_MBAFF_IP_GEN5 10416 +#define FILTER_UV_MBAFF_IP_GEN5 10430 +#define MBAFF_UV_ELSE2_IP_GEN5 10466 +#define MBAFF_UV_ENDIF2_IP_GEN5 10496 +#define MBAFF_UV_ENDIF1_IP_GEN5 10496 +#define AllAVC_END_IP_GEN5 10500 diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/header.inc libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/header.inc --- libva-1.0.1/i965_drv_video/shaders/h264/mc/header.inc 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/header.inc 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,303 @@ +/* + * Common header file for all AVC MC kernels + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +#if !defined(__HEADER__) // Make sure this file is only included once +#define __HEADER__ + +// Module name: header.inc +// +// Common header file for all AVC MC kernels +// + +#ifndef COMBINED_KERNEL +#ifdef DEV_CTG + #define SW_SCOREBOARD // SW Scoreboard should be enabled for CTG and earlier + #undef HW_SCOREBOARD // HW Scoreboard should be disabled for CTG and earlier +#else + #define HW_SCOREBOARD // HW Scoreboard should be enabled for ILK and beyond + #undef SW_SCOREBOARD // SW Scoreboard should be disabled for ILK and beyond +#endif // DEV_CTG +#endif // COMBINED_KERNEL + +//#define MONO // Build Monochrome kernels + +// Surface state definition +// +#define DESTY 0 +#define DESTUV 1 +#define REFYFM0 2 +#define REFYFM1 3 +#define REFYFM2 4 +#define REFYFM3 5 +#define REFYFM4 6 +#define REFYFM5 7 +#define REFYFM6 8 +#define REFYFM7 9 +#define REFYFM8 10 +#define REFYFM9 11 +#define REFYFM10 12 +#define REFYFM11 13 +#define REFYFM12 14 +#define REFYFM13 15 +#define REFYFM14 16 +#define REFYFM15 17 +#define REFUVFM0 18 +#define REFUVFM1 19 +#define REFUVFM2 20 +#define REFUVFM3 21 +#define REFUVFM4 22 +#define REFUVFM5 23 +#define REFUVFM6 24 +#define REFUVFM7 25 +#define REFUVFM8 26 +#define REFUVFM9 27 +#define REFUVFM10 28 +#define REFUVFM11 29 +#define REFUVFM12 30 +#define REFUVFM13 31 +#define REFUVFM14 32 +#define REFUVFM15 33 + +.default_execution_size (16) +.default_register_type :ub + +// ----------- Common constant definitions ------------ +// +// Bit position constants +// +#define BIT0 0x01 +#define BIT1 0x02 +#define BIT2 0x04 +#define BIT3 0x08 +#define BIT4 0x10 +#define BIT5 0x20 +#define BIT6 0x40 +#define BIT7 0x80 +#define BIT8 0x0100 +#define BIT9 0x0200 +#define BIT10 0x0400 +#define BIT11 0x0800 +#define BIT12 0x1000 +#define BIT13 0x2000 +#define BIT14 0x4000 +#define BIT15 0x8000 +#define BIT16 0x00010000 +#define BIT17 0x00020000 +#define BIT18 0x00040000 +#define BIT19 0x00080000 +#define BIT20 0x00100000 +#define BIT21 0x00200000 +#define BIT22 0x00400000 +#define BIT23 0x00800000 +#define BIT24 0x01000000 +#define BIT25 0x02000000 +#define BIT26 0x04000000 +#define BIT27 0x08000000 +#define BIT28 0x10000000 +#define BIT29 0x20000000 +#define BIT30 0x40000000 +#define BIT31 0x80000000 + +#define GRFWIB 32 // GRF register width in byte +#define GRFWIW 16 // GRF register width in word +#define GRFWID 8 // GRF register width in dword + +#define INST_SIZE 16 // Instruction size = 128b = 16 Bytes + +#define REGION(Width,HStride) + +#define NULLREG null<1>:ud +#define NULLREGW null<1>:w + +#define TOP_FIELD 0 +#define BOTTOM_FIELD 1 + +// M2 - M9 for date writing message payload +.declare MSGPAYLOAD Base=m2 ElementSize=1 SrcRegion=REGION(16,1) Type=ub +.declare MSGPAYLOADB Base=m2 ElementSize=1 SrcRegion=REGION(16,1) Type=ub +.declare MSGPAYLOADW Base=m2 ElementSize=2 SrcRegion=REGION(16,1) Type=uw +.declare MSGPAYLOADD Base=m2 ElementSize=4 SrcRegion=REGION(8,1) Type=ud + +// ----------- Common Message Descriptor ------------ +// +#ifdef DEV_ILK +#define MSG_GW 0x03 // Message Gateway Extended Message Descriptor, +#define DAPREAD 0x04 // Data Port Read Extended Message Descriptor, +#define DAPWRITE 0x05 // Data Port Write Extended Message Descriptor, +#define TS 0x07 // Thread Spawner Extended Message Descriptor +#define TS_EOT 0x27 // End of Thread Extended Message Descriptor + +#define EOTMSGDSC 0x02000010 // End of Thread Message Descriptor, don't deference URB handle + +// Data Port Message Descriptor +#define DWBRMSGDSC_RC 0x02086000 // DWORD Block Read Message Descriptor, reading from render cache = 6. +#define DWBRMSGDSC_RC_TF 0x02086600 // DWORD Block Read Message Descriptor, reading from render cache = 6. +#define DWBRMSGDSC_RC_BF 0x02086700 // DWORD Block Read Message Descriptor, reading from render cache = 6. +#define DWBRMSGDSC_SC 0x0208A000 // DWORD Block Read Message Descriptor, reading from sampler cache = A. +#define DWBRMSGDSC_SC_TF 0x0208E600 // DWORD Block Read Message Descriptor, reading top field from field mode sampler cache. +#define DWBRMSGDSC_SC_BF 0x0208E700 // DWORD Block Read Message Descriptor, reading bottom field from field mode sampler cache. + +#define DWBWMSGDSC 0x02082000 // DWORD Block Write Message Descriptor +#define DWBWMSGDSC_WC 0x0218A000 // DWORD Block Write Message Descriptor + write commit + +// Enable Write Commit writeback mesage +#define ENWRCOM 0x00108000 // Enable "write commit" and set response length = 1 + +// Thread Spawner Message Descriptor +#define TSMSGDSC 0x02000011 + +// Message Gateway Message Descriptors +#define OGWMSGDSC 0x02000000 // OpenGateway Message Descriptor +#define CGWMSGDSC 0x02000001 // CloseGateway Message Descriptor +#define FWDMSGDSC 0x02000002 // ForwardMsg Message Descriptor + +#define NOTIFYMSG 0x00008000 // Send notification with ForwardMsg message + +#define RESP_LEN(len) 0x100000*len +#define MSG_LEN(len) 0x2000000*len + +#else // Pre DEV_ILK + +#define MSG_GW +#define DAPREAD +#define DAPWRITE +#define TS +#define TS_EOT + +#define EOTMSGDSC 0x87100010 // End of Thread Message Descriptor, don't deference URB handle + +// Data Port Message Descriptor +#define DWBRMSGDSC_RC 0x04106000 // DWORD Block Read Message Descriptor, reading from render cache = 6. +#define DWBRMSGDSC_RC_TF 0x04106600 // DWORD Block Read Message Descriptor, reading from render cache = 6. +#define DWBRMSGDSC_RC_BF 0x04106700 // DWORD Block Read Message Descriptor, reading from render cache = 6. +#define DWBRMSGDSC_SC 0x0410A000 // DWORD Block Read Message Descriptor, reading from sampler cache = A. +#define DWBRMSGDSC_SC_TF 0x0410A600 // DWORD Block Read Message Descriptor, reading top field from field mode sampler cache. +#define DWBRMSGDSC_SC_BF 0x0410A700 // DWORD Block Read Message Descriptor, reading bottom field from field mode sampler cache. + +#define DWBWMSGDSC 0x05102000 // DWORD Block Write Message Descriptor +#define DWBWMSGDSC_WC 0x0511A000 // DWORD Block Write Message Descriptor + write commit + +// Enable Write Commit writeback mesage +#define ENWRCOM 0x00018000 // Enable "write commit" and set response length = 1 + +// Thread Spawner Message Descriptor +#define TSMSGDSC 0x07100011 + +// Message Gateway Message Descriptors +#define OGWMSGDSC 0x03100000 // OpenGateway Message Descriptor +#define CGWMSGDSC 0x03100001 // CloseGateway Message Descriptor +#define FWDMSGDSC 0x03100002 // ForwardMsg Message Descriptor + +#define NOTIFYMSG 0x00008000 // Send notification with ForwardMsg message +#define ACKREQMSG 0x00014000 // Acknowledgement required so response length should be 1 + +#define RESP_LEN(len) 0x10000*len +#define MSG_LEN(len) 0x100000*len + +#endif // DEV_ILK + +// Enable frame/field selection in message descriptor +#define ENMSGDSCFM 0x400 // Enable MSGDSC to select frame surface +#define ENMSGDSCTF 0x600 // Enable MSGDSC to select top field surface +#define ENMSGDSCBF 0x700 // Enable MSGDSC to select bottom field surface + +// ----------- Message related register ------------ +// +#define MSGHDR m1 // Message Payload Header +#define MSGHDRY m1 // Message Payload Header register for Y data +#define MSGHDRY0 m1 // Message Payload Header register for Y data +#define MSGHDRY1 m2 // Message Payload Header register for Y data +#define MSGHDRY2 m3 // Message Payload Header register for Y data +#define MSGHDRY3 m4 // Message Payload Header register for Y data +#define MSGHDRUV m5 // Message Payload Header register for U/V data +#define MSGSRC r62 // Message source register, should never be used for other purposes +#define MSGDSC a0.0:ud // Message Descriptor register (type DWORD) + +#define MH_ORI MSGSRC.0 // DWORD block R/W message header block offset +#define MH_ORIX MSGSRC.0 // DWORD block R/W message header X offset +#define MH_ORIY MSGSRC.1 // DWORD block R/W message header Y offset +#define MH_SIZE MSGSRC.2 // DWORD block R/W message header block width & height + +// Data necessary for kernel operations +// +// Address registers used as pointers +// +// Note: Please keep the register order as is since they are used in compressed instructions +// +#define PPREDBUF_Y a0.4 // Pointer to predicted Y picture +#define PPREDBUF_Y1 a0.5 // Pointer to predicted Y picture for extended instruction + +#define PPREDBUF_UV a0.4 // Pointer to predicted U/V picture +#define PPREDBUF_UV1 a0.5 // Pointer to predicted U/V picture for extended instruction + +#define PDECBUF a0.4 // Pointer to decoded picture data +#define PDECBUF_UD a0.2 // Pointer to decoded picture data in DWORD unit + +// ----------- R63 is reserved for global variables ------------ +// +// Note: Don't program it with values other than what are defined here. + +#define G_REG r63 + +#define RETURN_REG G_REG.0 // Return pointer for all sub-routine calls (type DWORD) +#define RETURN_REG1 G_REG.1 // Return pointer for second-level calls + +#define I_ORIX G_REG.13 // :uw, H. origin of the macroblock in pixel unit, don't overwrite in-line data +#define I_ORIY G_REG.14 // :uw, V. origin of the macroblock in pixel unit, don't overwrite in-line data + +// Macros +// +// Note: For macros that require multiple line expansion, insert "\n" at the end of each line. +// +#define GRF(reg) r##reg +#ifdef DEV_ILK +#define END_THREAD send (8) NULLREG MSGHDR r0:ud TS_EOT EOTMSGDSC +#else +#define END_THREAD send (8) NULLREG MSGHDR r0:ud EOTMSGDSC +#endif // DEV_ILK + +#define CALL(subFunc, skipInst) add (1) RETURN_REG<1>:ud ip:ud (1+skipInst)*INST_SIZE \n\ + jmpi (1) subFunc + +#define CALL_1(subFunc, skipInst) add (1) RETURN_REG1<1>:ud ip:ud (1+skipInst)*INST_SIZE \n\ + jmpi (1) subFunc + +#define RETURN mov (1) ip:ud RETURN_REG<0;1,0>:ud // Return to calling module +#define RETURN_1 mov (1) ip:ud RETURN_REG1<0;1,0>:ud // Return to second-level calling module + // To support iterative calling +#ifdef SW_SCOREBOARD + +#ifdef DEV_CTG_A + #define LEADING_THREAD 1 // For CTG A, no SRT is needed. Only PRT is necessary +#else + #define LEADING_THREAD 0 // For CTG B0 and beyond, PRT doesn't take into debug count + #define DOUBLE_SB // Scoreboard size needs to be doubled +#endif + +#ifdef DOUBLE_SB // Scoreboard size needs to be doubled + #define SB_MASK 0x1ff // Scoreboard wrap-around mask (for 512 entries) +#else + #define SB_MASK 0xff // Scoreboard wrap-around mask (for 256 entries) +#endif // defined(DOUBLE_SB) + +// Scoreboard related definitions + +#define TEMPX r50 +#define TEMPY r51 +#define DELTA r52 + +#define M05_STORE r0.13 // :uw, reuse r0.6:ud upper-word to store M0.5 header information for scoreboard + + +#endif // SW_SCOREBOARD + +// End of header.inc + +#endif // !defined(__HEADER__) + diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/HwmcOnlyHeader.inc libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/HwmcOnlyHeader.inc --- libva-1.0.1/i965_drv_video/shaders/h264/mc/HwmcOnlyHeader.inc 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/HwmcOnlyHeader.inc 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,29 @@ +/* + * Header file used only in HWMC_ONLY mode + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Module name: HwmcOnlyHeader.inc +// +// Header file used only in HWMC_ONLY mode +// + +#include "header.inc" + +#if !defined(__HWMCONLYHEADER__) // Make sure the following are only included once +#define __HWMCONLYHEADER__ + +.reg_count_total 64 +.reg_count_payload 2 + +// +// Now, begin source code.... +// + +.code +#endif // !defined(__HWMCONLYHEADER__) + diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/initialize_MBPara.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/initialize_MBPara.asm --- libva-1.0.1/i965_drv_video/shaders/h264/mc/initialize_MBPara.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/initialize_MBPara.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,125 @@ +/* + * Initialize parameters + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Kernel name: Initialize_MBPara.asm +// + + +//#if !defined(__INITIALIZE_MBPARA__) // Make sure this is only included once +//#define __INITIALIZE_MBPARA__ + + +// WA for weighted prediction - 2007/09/06 // shlee +// mov (1) guwW128(0)<1> guwR1(0)<0;1,0> // Copy the unique number indicating weight/offset=(128,0) + + + +// MB Type Category +// 1 B_L0_16x16 +// 2 B_L1_16x16 +// 3 B_Bi_16x16 +// 4 B_L0_L0_16x8 +// 5 B_L0_L0_8x16 +// 6 B_L1_L1_16x8 +// 7 B_L1_L1_8x16 +// 8 B_L0_L1_16x8 +// 9 B_L0_L1_8x16 +// 10 B_L1_L0_16x8 +// 11 B_L1_L0_8x16 +// 12 B_L0_Bi_16x8 +// 13 B_L0_Bi_8x16 +// 14 B_L1_Bi_16x8 +// 15 B_L1_Bi_8x16 +// 16 B_Bi_L0_16x8 +// 17 B_Bi_L0_8x16 +// 18 B_Bi_L1_16x8 +// 19 B_Bi_L1_8x16 +// 20 B_Bi_Bi_16x8 +// 21 B_Bi_Bi_8x16 +// 22 B_8x8 + + // TODO: + // Initialize interpolation area to eliminate uninitialized registers making the results of mac instructions XX. + // This issue was reported by Sharath on 5/25/2006, and why multiplication by zero still yields XX has not been understood yet. +#if 0 + mov (16) gudINTPY0(0)<1> 0:ud {Compr} + mov (16) gudINTPY0(2)<1> 0:ud {Compr} + mov (16) gudINTPY1(0)<1> 0:ud {Compr} + mov (16) gudINTPY1(2)<1> 0:ud {Compr} + mov (16) gudINTPC0(0)<1> 0:ud {Compr} + mov (16) gudINTPC1(0)<1> 0:ud {Compr} +#endif + + mov (1) gMVSTEP:w 0:w // Address increament for MV read + + cmp.e.f0.0 (1) null:w gwMBTYPE<0;1,0> 22:w + (-f0.0) jmpi INTERLABEL(NOT_8x8_MODE) + + //--- 8x8 mode + + // Starting address of error data blocks + cmp.e.f0.1 (2) null<1>:w gSUBMB_SHAPE<0;1,0>:ub 0:w + (f0.1) jmpi INTERLABEL(CONVERT_MVS) + + // Note: MVs and Weights/Offsets are already expanded by HW or driver + + // MV conversion - Convert each MV to absolute coord. (= MV + MB org. + block offset) + shl (16) gwTEMP(0)<1> gX<0;2,1>:w 2:w // Convert MB origin to 1/4-pel unit + mov (1) gMVSTEP:w 24:w // Address increament for MV read + add (2) gwTEMP(0,4)<2> gwTEMP(0,4)<4;2,2> 16:w + add (2) gwTEMP(0,9)<2> gwTEMP(0,9)<4;2,2> 16:w + add (4) gwTEMP(0,12)<1> gwTEMP(0,12)<4;4,1> 16:w + + add (16) gMV<1>:w gMV<16;16,1>:w gwTEMP(0)<16;16,1> + add (8) gwTEMP(0)<2> gwTEMP(0)<16;8,2> 32:w + add (16) gwMV(1,0)<1> gwMV(1,0)<16;16,1> gwTEMP(0)<16;16,1> + add (8) gwTEMP(0,1)<2> gwTEMP(0,1)<16;8,2> 32:w + add (16) gwMV(3,0)<1> gwMV(3,0)<16;16,1> gwTEMP(0)<16;16,1> + add (8) gwTEMP(0)<2> gwTEMP(0)<16;8,2> -32:w + add (16) gwMV(2,0)<1> gwMV(2,0)<16;16,1> gwTEMP(0)<16;16,1> + + jmpi INTERLABEL(INIT_ADDRESS_REGS) + +INTERLABEL(NOT_8x8_MODE): + + //--- !8x8 mode (16x16, 16x8, 8x16) + + // MVs and Weights/Offsets are expanded + cmp.le.f0.1 (8) null<1>:w gwMBTYPE<0;1,0> 3:w // Check 16x16 + mov (1) gSUBMB_SHAPE:ub 0:uw // subMB shape + (f0.1) mov (8) gMV<1>:d gMV<0;2,1>:d + (f0.1) mov (8) gdWGT(1,0)<1> gWGT<0;4,1>:d + (f0.1) mov (4) gdWGT(0,4)<1> gWGT<4;4,1>:d + +INTERLABEL(CONVERT_MVS): + // MV conversion - Convert each MV to absolute coord. (= MV + MB org. + block offset) + shl (2) gwTEMP(0)<1> gX<2;2,1>:w 2:w // Convert MB origin to 1/4-pel unit + add (16) gMV<1>:w gMV<16;16,1>:w gwTEMP(0)<0;2,1> + add (2) gwMV(0,4)<2> gwMV(0,4)<4;2,2> 32:w //{NoDDClr} + add (2) gwMV(0,9)<2> gwMV(0,9)<4;2,2> 32:w //{NoDDChk,NoDDClr} + add (4) gwMV(0,12)<1> gwMV(0,12)<4;4,1> 32:w //{NoDDChk} + +INTERLABEL(INIT_ADDRESS_REGS): + // Initialize the address registers + mov (2) pERRORYC:ud nOFFSET_ERROR:ud {NoDDClr} // Address of Y and C error blocks + mov (1) pRECON_MV:ud nOFFSET_RECON_MV:ud {NoDDChk,NoDDClr} // Address of recon area and motion vectors + mov (1) pWGT_BIDX:ud nOFFSET_WGT_BIDX:ud {NoDDChk} // Address of weights/offsets and binding tbl idx + + // Read the parity of the current field (gPARITY - 0:top, 1:bottom, 3:frame) + // and set message descriptor for frame/field write +#if defined(MBAFF) + and.nz.f0.0 (1) null:uw gFIELDMBFLAG:ub nFIELDMB_MASK:uw + (f0.0) and (1) gPARITY:uw gMBPARITY:ub nMBPARITY_MASK:uw + (-f0.0) mov (1) gPARITY:uw 3:uw +#elif defined(FIELD) + and (1) gPARITY:uw gMBPARITY:ub nMBPARITY_MASK:uw +#endif + + +//#endif // !defined(__INITIALIZE_MBPARA__) diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/inter_Header.inc libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/inter_Header.inc --- libva-1.0.1/i965_drv_video/shaders/h264/mc/inter_Header.inc 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/inter_Header.inc 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,371 @@ +/* + * Header file for all AVC INTER prediction kernels + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +#if !defined(__INTER_HEADER__) // Make sure this file is only included once +#define __INTER_HEADER__ + +// Module name: inter_header.inc +// +// Header file for all AVC INTER prediction kernels +// + +#define INTER_KERNEL + +//------------------------------------------------------------------------------------------- +// TODO: The followings will be merged with the above definitions later +//------------------------------------------------------------------------------------------- + + +//------------ Input parameters & bit masks + +// SW WA for weighted prediction - 2007/09/06 +//.declare guwR1 Base=r1 ElementSize=2 Type=uw +//.declare guwW128 Base=r63.13 ElementSize=2 Type=uw + +#ifdef DEV_ILK +// #define SW_W_128 // Enable SW WA for special Weight=128 case. Can be commented to disable it +#else // Pre DEV_ILK +#define SW_W_128 // Enable SW WA for special Weight=128 case. +#endif // DEV_ILK + +#ifdef SW_W_128 +.declare gudW128 Base=r1.0 ElementSize=4 Type=ud +#else +#endif // SW_W_128 + +#define gORIX r3.4 // :ub, X origin +#define gORIY r3.5 // :ub, Y origin + +#define gCBP r3.9 // :ub, CBP (0, 0, Y0, Y1, Y2, Y3, Cb, Cr) +#define nCBPY_MASK 0x3c +#define nCBPU_MASK 0x2 +#define nCBPV_MASK 0x1 + +#define gFIELDFLAGS r3.1 // :uw - To compute message descriptor for write + +#define gMBTYPE r3.1 // :ub, MB type +#define nMBTYPE_MASK 0x1f +#define gFIELDMBFLAG r3.1 // :ub, Field MB flag +#define nFIELDMB_MASK 0x40 +#define gMBPARITY r3.3 // :ub, Bottom field flag +#define nMBPARITY_MASK 0x01 + +#define gWPREDFLAG r3.0 // :ub, Weighted pred flag +#define nWBIDIR_MASK 0xc0 + +#define gSUBMB_SHAPE r3.12 // :ub, Sub-MB shape +#define gSUBMB_MODE r3.13 // :ub, Sub-MB prediction mode +.declare guwSUBMB_SHAPE_MODE Base=r3.6 ElementSize=2 Type=uw + +#define gYWDENOM r3.14 // :ub, Luma log2 weight denom +#define gCWDENOM r3.15 // :ub, Chroma log2 weight denom + +#define gADDR r3.24 // :ub, Register addresses of error data / MV + +.declare gubBIDX Base=r3.16 ElementSize=1 Type=ub + +#define gWGT r8 // Weights/offsets +.declare gdWGT Base=r8 ElementSize=4 Type=d +.declare gwWGT Base=r8 ElementSize=2 Type=w +#define gMV r4 // MVs +.declare gwMV Base=r4 ElementSize=2 Type=w +.declare gdMV Base=r4 ElementSize=4 Type=d + +.declare gwERRORY Base=r10 ElementSize=2 Type=w // 16 GRFs +.declare gubERRORY Base=r10 ElementSize=1 Type=ub +.declare gwERRORC Base=r26 ElementSize=2 Type=w // 8 GRFs +.declare gubERRORC Base=r26 ElementSize=2 Type=ub + +//------------ Address registers +#define pMSGDSC a0.0 // ud: Must be the leading dword of the address register +#define pREF a0.0 + +#define pBIDX a0.2 +#define pWGT a0.3 +#define pERRORYC a0.2 // :ud +#define pERRORY a0.4 +#define pERRORC a0.5 +#define pMV a0.6 + +#define pWGT_BIDX a0.1 // :ud, WGT & BIDX +#define pRECON_MV a0.3 // :ud, RECON & MV + +#define pREF0 a0.0 // :uw +#define pREF0D a0.0 // :ud +#define pREF1 a0.1 +#define pREF2 a0.2 +#define pREF2D a0.1 // :ud +#define pREF3 a0.3 +#define pREF4 a0.4 +#define pREF4D a0.2 // :ud +#define pREF5 a0.5 +#define pREF6 a0.6 +#define pREF6D a0.3 // :ud +#define pREF7 a0.7 + +#define pRES a0.6 +#define pRESD a0.3 // :ud +#define pRESULT a0.7 + +#define p0 a0.0 +#define p1 a0.1 + +//------------ Constants for static/inline/indirect +#define nOFFSET_BIDX 112 // = 32*3+4*4 + +#define nOFFSET_WGT 256 // = 32*8 +#define nOFFSET_WGT_BIDX 0x01000070 // = (256<<16)+112 +#define nOFFSET_ERROR 0x03400140 // = (320+128*4)<<16+320=0x03400140 +#define nOFFSET_ERRORY 0x0140 +#define nOFFSET_ERRORC 0x0340 +#define nOFFSET_MV 128 // = 32*4 +#define nOFFSET_RECON_MV 0x04400080 // = (1088<<16)+128 // TODO: OFFSET_RECON is obsolete + +//------------ Constants for kernel internal variables +#define nOFFSET_INTPY0 0x0640 // = 32*50 +#define nOFFSET_INTPY1 0x0780 // = 32*60 +#define nOFFSET_INTPC0 0x06c0 // = 32*54 +#define nOFFSET_INTPC1 0x0480 // = 32*36 +#define nOFFSET_INTP0 0x06c00640 +#define nOFFSET_INTP1 0x04800780 + +#define nOFFSET_INTERIM 0x0480 // = 32*36 +#define nOFFSET_INTERIM2 0x04A00480 // = ((32*37)<<16)|(32*36) +#define nOFFSET_INTERIM3 0x04A00480 // = ((32*36+32)<<16)|(32*36) +#define nOFFSET_INTERIM4 0x04A00490 // = ((32*37)<<16)|(32*36+16) + +#define nOFFSET_INTERIM4x4 0x04C0 // = 32*38 +#define nOFFSET_INTERIM4x4_4 0x04E004D0 // = ((32*38+32)<<16)|(32*38+16) +#define nOFFSET_INTERIM4x4_5 0x04D004C0 // = ((32*38+16)<<16)|(32*38) +#define nOFFSET_INTERIM4x4_6 0x04E004C0 // = ((32*38+32)<<16)|(32*38) +#define nOFFSET_INTERIM4x4_7 0x04D004C8 // = ((32*38+16)<<16)|(32*38+8) +#define nOFFSET_INTERIM4x4_8 0x04E004D8 // = ((32*38+32)<<16)|(32*38+24) +#define nOFFSET_INTERIM4x4_9 0x04F004E8 // = ((32*38+48)<<16)|(32*38+40) + +#define nOFFSET_RES 0x540 // = 32*42 +#define nOFFSET_REF 0x560 // = 32*43 +#define nOFFSET_REFC 0x700 // = 32*56 + + // Binding table index +#define nBDIX_DESTY 0 +#define nBDIX_DESTC 1 +#define nBI_LC_DIFF 0x10 // Binding table index diff between luma and chroma + +#define nGRFWIB 32 +#define nGRFHWIB 16 + +//------------ Regions + +.declare gudREF Base=r43 ElementSize=4 SrcRegion=<16;16,1> Type=ud +.declare gubREF Base=r43 ElementSize=1 Type=ub +.declare gudREFC Base=r56 ElementSize=4 SrcRegion=<16;16,1> Type=ud + +// 16x16 handling +.declare gudREF21x21 Base=r58 ElementSize=4 SrcRegion=<16;16,1> Type=ud +.declare gudREF18x10 Base=r66 ElementSize=4 SrcRegion=<16;16,1> Type=ud +.declare gubREF18x10 Base=r66 ElementSize=1 SrcRegion=<16;16,1> Type=ub + + + +.declare gudREF16x16 Base=r38 ElementSize=4 Type=ud // 8 GRFs +.declare gubREF16x16 Base=r38 ElementSize=1 Type=ub +.declare gudREFC16x8 Base=r46 ElementSize=4 Type=ud // 4 GRFs +.declare gubREFC16x8 Base=r46 ElementSize=1 Type=ub + +// TODO +.declare gubAVG Base=r56 ElementSize=1 Type=ub +.declare gubREFY_BWD Base=r64 ElementSize=1 Type=ub +.declare gubREFC_BWD Base=r72 ElementSize=1 Type=ub + + +.declare guwINTPY0 Base=r50 ElementSize=2 SrcRegion=<16;16,1> Type=uw +.declare gudINTPY0 Base=r50 ElementSize=4 Type=ud +.declare gubINTPY0 Base=r50 ElementSize=1 SrcRegion=<32;16,2> Type=ub +.declare guwINTPY1 Base=r60 ElementSize=2 SrcRegion=<16;16,1> Type=uw +.declare gudINTPY1 Base=r60 ElementSize=4 Type=ud +.declare gubINTPY1 Base=r60 ElementSize=1 SrcRegion=<32;16,2> Type=ub +.declare guwYPRED Base=r50 ElementSize=2 SrcRegion=<8;8,1> Type=uw +.declare gubYPRED Base=r50 ElementSize=1 SrcRegion=<32;16,2> Type=ub + +.declare guwINTPC0 Base=r54 ElementSize=2 SrcRegion=<16;16,1> Type=uw +.declare gwINTPC0 Base=r54 ElementSize=2 SrcRegion=<16;16,1> Type=w +.declare gudINTPC0 Base=r54 ElementSize=4 Type=ud +.declare gubINTPC0 Base=r54 ElementSize=1 SrcRegion=<32;16,2> Type=ub +.declare guwINTPC1 Base=r36 ElementSize=2 SrcRegion=<16;16,1> Type=uw +.declare gudINTPC1 Base=r36 ElementSize=4 Type=ud +.declare gubINTPC1 Base=r36 ElementSize=1 SrcRegion=<32;16,2> Type=ub +.declare guwCPRED Base=r54 ElementSize=2 SrcRegion=<16;8,2> Type=uw +.declare gubCPRED Base=r54 ElementSize=1 SrcRegion=<32;8,4> Type=ub + +#define gINTERIM r36 +.declare gubINTERIM_BUF Base=r36 ElementSize=1 SrcRegion=<32;16,2> Type=ub +#define gINTERIM4x4 r38 +.declare gubINTERIM4x4_BUF Base=r38 ElementSize=1 SrcRegion=<32;16,2> Type=ub +.declare gwINTERIM4x4_BUF Base=r38 ElementSize=2 Type=w + +.declare gubINTERIM_BUF2 Base=r42 ElementSize=1 SrcRegion=<8;4,2> Type=ub +.declare gwINTERIM_BUF2 Base=r42 ElementSize=2 SrcRegion=<16;16,1> Type=w +.declare guwINTERIM_BUF2 Base=r42 ElementSize=2 Type=uw + +.declare gwINTERIM_BUF3 Base=r38 ElementSize=2 SrcRegion=<16;16,1> Type=w // 2 GRFs +.declare gubINTERIM_BUF3 Base=r38 ElementSize=1 Type=ub + +.declare gwTEMP Base=r42 ElementSize=2 SrcRegion=<16;16,1> Type=w + +//------------ General registers + +#define gX r3.2 // w +#define gY r3.3 // w + +#define gMSGDSC_R r3.6 // ud +#define gMSGDSC_W r3.7 // ud + +#ifdef SW_W_128 +.declare gwMBTYPE Base=r8.6 ElementSize=2 Type=w // Shared with gLOOP_SUBMB + +// TODO +#define gLOOP_SUBMB r8.6 +#define gLOOP_SUBMBPT r8.7 +#define gLOOP_DIR r9.6 +#define gLOOPCNT r9.7 // Loop counter for submodules +#else +.declare gwMBTYPE Base=r1.0 ElementSize=2 Type=w // Shared with gLOOP_SUBMB + +// TODO +#define gLOOP_SUBMB r1.0 +#define gLOOP_SUBMBPT r1.1 +#define gLOOP_DIR r8.7 +#define gLOOPCNT r9.7 // Loop counter for submodules +#endif // SW_W_128 + +#define gW0 r34.6 // Temporary WORD +#define gW1 r34.7 // Temporary WORD +#define gW2 r34.8 // Temporary WORD +#define gW3 r34.9 // Temporary WORD +#define gD0 r34.3 // Temporary DWORD + +#define gW4 r34.15 + +// + +#define gMVX_INT r34.0 // :w +#define gMVY_INT r34.1 // :w +#define gMVX_FRAC r34.2 // :w +#define gMVY_FRAC r34.3 // :w +#define gMVX_FRACC r34.4 // :w +#define gMVY_FRACC r34.5 // :w + +#define gpINTPY r34.10 +#define gpINTPC r34.11 +#define gpINTP r34.5 // DW + +#define gPREDFLAG r34.12 +#define gBIDX r34.13 +#define gREFPARITY r34.14 +#define gCHRMVADJ r1.14 +#define gPARITY r1.15 +#define gCBP_MASK r1.1 + +#define gMVSTEP r1.13 + +#define gpADDR r1.2 // :uw (8 words) + +#define gSHAPETEMP r8.15 // :uw + +#define gCOEFA r42.0 +#define gCOEFB r42.1 +#define gCOEFC r42.2 +#define gCOEFD r42.3 + +// Weighted prediction +#define gPREDFLAG0 r46.0 +#define gPREDFLAG1 r46.2 + +#define gWEIGHTFLAG r43.2 +#define gBIPRED r43.3 +#define gYADD r43.4 +#define gCADD r43.5 +#define gYSHIFT r43.6 +#define gCSHIFT r43.7 + +#define gOFFSET r44.0 +#define gUOFFSET r44.1 +#define gVOFFSET r44.2 + +#define gWT0 r45.0 +#define gO0 r45.1 +#define gWT1 r45.2 +#define gO1 r45.3 +#define gUW0 r45.4 +#define gUO0 r45.5 +#define gUW1 r45.6 +#define gUO1 r45.7 +#define gVW0 r45.8 +#define gVO0 r45.9 +#define gVW1 r45.10 +#define gVO1 r45.11 + +#define gWT0_D r45.0 +#define gUW0_D r45.2 + +//------------ Message-related Registers & constants +#define gMSGSRC r2 // Message Source + +#define mMSGHDR m1 +#define mMSGHDRY m1 +#define mMSGHDRC m2 +#define mMSGHDR1 m1 +#define mMSGHDR2 m2 +#define mMSGHDR3 m3 +#define mMSGHDR4 m4 +#define mMSGHDRYW m1 +#define mMSGHDRCW m10 + +#ifdef DEV_ILK + // 0000 0100(read) 0001(msg len) xxxx(resp len) 1010 (sampler cache) xxxx (field/frame) xxxx xxxx (bidx) +#define nDWBRMSGDSC_SC 0x0208A002 // DWORD Block Read Message Descriptor through Data Port, Sampler Cache +#define nDWBRMSGDSC_SC_TF 0x0208E602 // DWORD Block Read Message Descriptor through Data Port, Sampler Cache +#define nDWBRMSGDSC_SC_BF 0x0208E702 // DWORD Block Read Message Descriptor through Data Port, Sampler Cache + // 0000 0101(write) 0001(msg len) xxxx(resp len) 0010 (render cache) xxxx (field/frame) xxxx xxxx (bidx) +#define nDWBWMSGDSC 0x02082000 // DWORD Block Write Message Descriptor through Data Port, Render Cache +#define nDWBWMSGDSC_TF 0x02082600 // DWORD Block Write Message Descriptor through Data Port, Render Cache +#define nDWBWMSGDSC_BF 0x02082700 // DWORD Block Write Message Descriptor through Data Port, Render Cache + +#else // Pre DEV_ILK + // 0000 0100(read) 0001(msg len) xxxx(resp len) 1010 (sampler cache) xxxx (field/frame) xxxx xxxx (bidx) +#define nDWBRMSGDSC_SC 0x0410A002 // DWORD Block Read Message Descriptor through Data Port, Sampler Cache +#define nDWBRMSGDSC_SC_TF 0x0410A602 // DWORD Block Read Message Descriptor through Data Port, Sampler Cache +#define nDWBRMSGDSC_SC_BF 0x0410A702 // DWORD Block Read Message Descriptor through Data Port, Sampler Cache + // 0000 0101(write) 0001(msg len) xxxx(resp len) 0010 (render cache) xxxx (field/frame) xxxx xxxx (bidx) +#define nDWBWMSGDSC 0x05102000 // DWORD Block Write Message Descriptor through Data Port, Render Cache +#define nDWBWMSGDSC_TF 0x05102600 // DWORD Block Write Message Descriptor through Data Port, Render Cache +#define nDWBWMSGDSC_BF 0x05102700 // DWORD Block Write Message Descriptor through Data Port, Render Cache +#endif // DEV_ILK + +#define nDWB_FIELD_MASK 0x0600 + +// message data payload +.declare mbMSGPAYLOADY Base=m2 ElementSize=1 SrcRegion=REGION(16,1) Type=b +.declare mbMSGPAYLOADC Base=m11 ElementSize=1 SrcRegion=REGION(16,1) Type=b + +// Destination registers for write commit +#define gREG_WRITE_COMMIT_Y r10.0 +#define gREG_WRITE_COMMIT_UV r11.0 + +#define RETURN_REG_INTER r1.5 // Return pointer for all sub-routine calls (type DWORD) + +#define CALL_INTER(subFunc, skipInst) add (1) RETURN_REG_INTER<1>:ud ip:ud 1+skipInst*INST_SIZE \n\ + jmpi (1) subFunc +#define RETURN_INTER mov (1) ip:ud RETURN_REG_INTER<0;1,0>:ud // Return to calling module + + +// End of inter_header.inc + +#endif // !defined(__INTER_HEADER__) + diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/interpolate_C_2x2.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/interpolate_C_2x2.asm --- libva-1.0.1/i965_drv_video/shaders/h264/mc/interpolate_C_2x2.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/interpolate_C_2x2.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,57 @@ +/* + * Interpolation kernel for chrominance 2x2 motion compensation + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Kernel name: Interpolate_C_2x2.asm +// +// Interpolation kernel for chrominance 2x2 motion compensation +// +// $Revision: 8 $ +// $Date: 10/09/06 4:00p $ +// + + +//#if !defined(__Interpolate_C_2x2__) // Make sure this is only included once +//#define __Interpolate_C_2x2__ + + + // (8-xFrac) and (8-yFrac) + add (2) gW0<1>:w gMVX_FRACC<2;2,1>:w -0x08:w + + // Compute the GRF address of the starting position of the reference area + mov (1) pREF0:w nOFFSET_REFC:w {NoDDClr} + mov (1) pRESULT:uw gpINTPC:uw {NoDDChk} + + // gCOEFA = (8-xFrac)*(8-yFrac) + // gCOEFB = xFrac*(8-yFrac) + // gCOEFC = (8-xFrac)*yFrac + // gCOEFD = xFrac*yFrac + mul (1) gCOEFD:w gMVX_FRACC:w gMVY_FRACC:w {NoDDClr} + mul (1) gCOEFA:w -gW0:w -gW1:uw {NoDDClr,NoDDChk} + mul (1) gCOEFB:w gMVX_FRACC:w -gW1:uw {NoDDClr,NoDDChk} + mul (1) gCOEFC:w -gW0:w gMVY_FRACC:w {NoDDChk} + + // (8-xFrac)*(8-yFrac)*A + // --------------------- + mul (8) acc0<1>:uw r[pREF0,0]<8;4,1>:ub gCOEFA:uw + + // xFrac*(8-yFrac)*B + // ------------------- + mac (8) acc0<1>:uw r[pREF0,2]<8;4,1>:ub gCOEFB:uw + + // (8-xFrac)*yFrac*C + // ------------------- + mac (8) acc0<1>:uw r[pREF0,8]<8;4,1>:ub gCOEFC:uw + + // xFrac*yFrac*D + // ----------------- + mac (8) gwINTERIM_BUF2(0)<1> r[pREF0,10]<8;4,1>:ub gCOEFD:uw + mov (4) r[pRESULT]<1>:uw gwINTERIM_BUF2(0)<4;4,1> {NoDDClr} + mov (4) r[pRESULT,16]<1>:uw gwINTERIM_BUF2(0,4)<4;4,1> {NoDDChk} + +//#endif // !defined(__Interpolate_C_2x2__) diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/interpolate_C_4x4.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/interpolate_C_4x4.asm --- libva-1.0.1/i965_drv_video/shaders/h264/mc/interpolate_C_4x4.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/interpolate_C_4x4.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,67 @@ +/* + * Interpolation kernel for chrominance 4x4 motion compensation + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Kernel name: Interpolate_C_4x4_Func.asm +// +// Interpolation kernel for chrominance 4x4 motion compensation +// +// $Revision: 8 $ +// $Date: 10/09/06 4:00p $ +// + + +//#if !defined(__Interpolate_C_4x4_Func__) // Make sure this is only included once +//#define __Interpolate_C_4x4_Func__ + + +INTERLABEL(Interpolate_C_4x4_Func): + + + // (8-xFrac) and (8-yFrac) + add (2) gW0<1>:w gMVX_FRACC<2;2,1>:w -0x08:w + + // Compute the GRF address of the starting position of the reference area + mov (1) pREF0:w nOFFSET_REFC:w {NoDDClr} + mov (1) pREF1:uw nOFFSET_REFC+16:w {NoDDChk,NoDDClr} + mov (1) pRESULT:uw gpINTPC:uw {NoDDChk} + + // gCOEFA = (8-xFrac)*(8-yFrac) + // gCOEFB = xFrac*(8-yFrac) + // gCOEFC = (8-xFrac)*yFrac + // gCOEFD = xFrac*yFrac + mul (1) gCOEFD:w gMVX_FRACC:w gMVY_FRACC:w {NoDDClr} + mul (1) gCOEFA:w -gW0:w -gW1:uw {NoDDClr,NoDDChk} + mul (1) gCOEFB:w gMVX_FRACC:w -gW1:uw {NoDDClr,NoDDChk} + mul (1) gCOEFC:w -gW0:w gMVY_FRACC:w {NoDDChk} + + add (2) gW0<1>:uw pREF0<2;2,1>:uw 16:w + + // (8-xFrac)*(8-yFrac)*A + // --------------------- + mul (16) acc0<1>:uw r[pREF0,0]<16;8,1>:ub gCOEFA:uw + mul (16) acc1<1>:uw r[pREF0,nGRFWIB]<16;8,1>:ub gCOEFA:uw + + // xFrac*(8-yFrac)*B + // ------------------- + mac (16) acc0<1>:uw r[pREF0,2]<16;8,1>:ub gCOEFB:uw + mac (16) acc1<1>:uw r[pREF0,nGRFWIB+2]<16;8,1>:ub gCOEFB:uw + + // (8-xFrac)*yFrac*C + // ------------------- + mov (2) pREF0<1>:uw gW0<2;2,1>:uw + mac (16) acc0<1>:uw r[pREF0,0]<8,1>:ub gCOEFC:uw + mac (16) acc1<1>:uw r[pREF0,nGRFWIB]<8,1>:ub gCOEFC:uw + + // xFrac*yFrac*D + // ----------------- + mac (16) r[pRESULT]<1>:uw r[pREF0,2]<8,1>:ub gCOEFD:uw + mac (16) r[pRESULT,GRFWIB]<1>:uw r[pREF0,nGRFWIB+2]<8,1>:ub gCOEFD:uw {SecHalf} + + +//#endif // !defined(__Interpolate_C_4x4_Func__) diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/interpolate_Y_4x4.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/interpolate_Y_4x4.asm --- libva-1.0.1/i965_drv_video/shaders/h264/mc/interpolate_Y_4x4.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/interpolate_Y_4x4.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,217 @@ +/* + * Interpolation kernel for luminance motion compensation + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Kernel name: Interpolate_Y_4x4.asm +// +// Interpolation kernel for luminance motion compensation +// +// $Revision: 10 $ +// $Date: 10/09/06 4:00p $ +// + + + // Compute the GRF address of the starting position of the reference area +#if 1 + (-f0.1) mov (1) pREF:w nOFFSET_REF+2+nGRFWIB:w + (f0.1) mov (1) pREF:w nOFFSET_REF+2:w + mov (1) pRESULT:uw gpINTPY:uw +#else + mov (1) pREF:w nOFFSET_REF+2+nGRFWIB:w {NoDDClr} + mov (1) pRESULT:uw gpINTPY:uw {NoDDChk} +#endif + + /* + * | | + * - - 0 1 2 3 + - + * 4 5 6 7 + * 8 9 A B + * C D E F + * - - + - - - + - + * | | + */ + + // Case 0 + or.z.f0.1 (16) null:w gMVY_FRAC<0;1,0>:w gMVX_FRAC<0;1,0>:w + (f0.1) mov (4) r[pRESULT]<1>:uw r[pREF0]<4;4,1>:ub + (f0.1) mov (4) r[pRESULT,16]<1>:uw r[pREF0,16]<4;4,1>:ub + (f0.1) mov (4) r[pRESULT,32]<1>:uw r[pREF0,32]<4;4,1>:ub + (f0.1) mov (4) r[pRESULT,48]<1>:uw r[pREF0,48]<4;4,1>:ub + (f0.1) jmpi INTERLABEL(Exit_Interpolate_Y_4x4) + + // Store all address registers + mov (8) gpADDR<1>:w a0<8;8,1>:w + + mul.z.f0.0 (1) gW4:w gMVY_FRAC:w gMVX_FRAC:w + and.nz.f0.1 (1) null gW4:w 1:w + + add (1) pREF1:uw pREF0:uw nGRFWIB/2:uw + add (2) pREF2<1>:uw pREF0<2;2,1>:uw nGRFWIB:uw + mov (4) gW0<1>:uw pREF0<4;4,1>:uw + + (f0.0) jmpi INTERLABEL(Interpolate_Y_H_4x4) + (f0.1) jmpi INTERLABEL(Interpolate_Y_H_4x4) + + //----------------------------------------------------------------------- + // CASE: A69BE (H/V interpolation) + //----------------------------------------------------------------------- + + // Compute interim horizontal intepolation + add (1) pREF0<1>:uw pREF0<0;1,0>:uw -34:w + add (1) pREF1<1>:uw pREF1<0;1,0>:uw -18:w {NoDDClr} + mov (1) pRESD:ud nOFFSET_INTERIM4x4_5:ud {NoDDChk} // Case 69be + + // Check whether this position is 'A' + cmp.e.f0.0 (1) null gW4:w 4:w + + $for(0;<2;1) { + add (16) acc0<1>:w r[pREF0,nGRFWIB*2*%1]<16;4,1>:ub r[pREF0,nGRFWIB*2*%1+5]<16;4,1>:ub {Compr} + mac (16) acc0<1>:w r[pREF0,nGRFWIB*2*%1+1]<16;4,1>:ub -5:w {Compr} + mac (16) acc0<1>:w r[pREF0,nGRFWIB*2*%1+2]<16;4,1>:ub 20:w {Compr} + mac (16) acc0<1>:w r[pREF0,nGRFWIB*2*%1+3]<16;4,1>:ub 20:w {Compr} + mac (16) r[pRES,nGRFWIB*%1]<1>:w r[pREF0,nGRFWIB*2*%1+4]<16;4,1>:ub -5:w {Compr} + } + // last line + add (4) acc0<1>:w r[pREF0,nGRFWIB*2*2]<4;4,1>:ub r[pREF0,nGRFWIB*2*2+5]<4;4,1>:ub + mac (4) acc0<1>:w r[pREF0,nGRFWIB*2*2+1]<4;4,1>:ub -5:w + mac (4) acc0<1>:w r[pREF0,nGRFWIB*2*2+2]<4;4,1>:ub 20:w + mac (4) acc0<1>:w r[pREF0,nGRFWIB*2*2+3]<4;4,1>:ub 20:w + mac (4) r[pRES,nGRFWIB*2]<1>:w r[pREF0,nGRFWIB*2*2+4]<4;4,1>:ub -5:w + + // Compute interim/output vertical interpolation + mov (1) pREF6D:ud nOFFSET_INTERIM4x4_4:ud {NoDDClr} + mov (1) pREF0D:ud nOFFSET_INTERIM4x4_7:ud {NoDDChk,NoDDClr} + mov (1) pREF2D:ud nOFFSET_INTERIM4x4_8:ud {NoDDChk,NoDDClr} + mov (1) pREF4D:ud nOFFSET_INTERIM4x4_9:ud {NoDDChk} + + add (16) acc0<1>:w gwINTERIM4x4_BUF(0)<16;16,1> 512:w + mac (16) acc0<1>:w gwINTERIM4x4_BUF(1)<16;16,1> -5:w + mac (16) acc0<1>:w r[pREF6,0]<8,1>:w 20:w + + (f0.0) mov (1) pRES:uw nOFFSET_RES:uw // Case a + (-f0.0) mov (1) pRES:uw nOFFSET_INTERIM4x4:uw // Case 69be + + mac (16) acc0<1>:w r[pREF0,0]<4,1>:w -5:w + mac (16) acc0<1>:w r[pREF0,nGRFWIB]<4,1>:w 1:w + mac (16) acc0<1>:w r[pREF2,0]<4,1>:w 20:w + asr.sat (16) r[pRES]<2>:ub acc0<16;16,1>:w 10:w + + (f0.0) jmpi INTERLABEL(Return_Interpolate_Y_4x4) + +INTERLABEL(Interpolate_Y_H_4x4): + + cmp.e.f0.0 (1) null gMVX_FRAC:w 0:w + cmp.e.f0.1 (1) null gMVY_FRAC:w 2:w + (f0.0) jmpi INTERLABEL(Interpolate_Y_V_4x4) + (f0.1) jmpi INTERLABEL(Interpolate_Y_V_4x4) + + //----------------------------------------------------------------------- + // CASE: 123567DEF (H interpolation) + //----------------------------------------------------------------------- + + add (4) pREF0<1>:uw gW0<4;4,1>:uw -2:w + cmp.g.f0.0 (4) null:w gMVY_FRAC<0;1,0>:w 2:w + cmp.e.f0.1 (1) null gMVX_FRAC:w 2:w + (f0.0) add (4) pREF0<1>:uw pREF0<4;4,1>:uw nGRFWIB/2:uw + + cmp.e.f0.0 (1) null:w gMVY_FRAC<0;1,0>:w 0:w + + (f0.1) mov (1) pRESULT:uw nOFFSET_RES:uw // Case 26E + (-f0.1) mov (1) pRESULT:uw nOFFSET_INTERIM4x4:uw // Case 1357DF + + // Compute interim/output horizontal interpolation + add (16) acc0<1>:w r[pREF0]<4,1>:ub 16:w + mac (16) acc0<1>:w r[pREF0,1]<4,1>:ub -5:w + mac (16) acc0<1>:w r[pREF0,2]<4,1>:ub 20:w + mac (16) acc0<1>:w r[pREF0,3]<4,1>:ub 20:w + mac (16) acc0<1>:w r[pREF0,4]<4,1>:ub -5:w + mac (16) acc0<1>:w r[pREF0,5]<4,1>:ub 1:w + asr.sat (16) r[pRESULT]<2>:ub acc0<16;16,1>:w 5:w + + (-f0.1) jmpi INTERLABEL(Interpolate_Y_V_4x4) + (-f0.0) jmpi INTERLABEL(Average_4x4) + + jmpi INTERLABEL(Return_Interpolate_Y_4x4) + +INTERLABEL(Interpolate_Y_V_4x4): + + cmp.e.f0.0 (1) null gMVY_FRAC:w 0:w + (f0.0) jmpi INTERLABEL(Interpolate_Y_I_4x4) + + //----------------------------------------------------------------------- + // CASE: 48C59D7BF (V interpolation) + //----------------------------------------------------------------------- + + cmp.g.f0.1 (8) null:w gMVX_FRAC<0;1,0>:w 2:w + + mov (4) pREF0<1>:uw gW0<4;4,1>:uw {NoDDClr} + add (4) pREF4<1>:w gW0<4;4,1>:uw 16:w {NoDDChk} + + (f0.1) add (8) pREF0<1>:uw pREF0<4;4,1>:uw 1:uw + + cmp.e.f0.0 (1) null:w gMVX_FRAC<0;1,0>:w 0:w + cmp.e.f0.1 (1) null gMVY_FRAC:w 2:w + + // Compute interim/output vertical interpolation + add (16) acc0<1>:w r[pREF0,-nGRFWIB]<4,1>:ub 16:w + mac (16) acc0<1>:w r[pREF0]<4,1>:ub 20:w + mac (16) acc0<1>:w r[pREF0,nGRFWIB]<4,1>:ub -5:w + mac (16) acc0<1>:w r[pREF4,-nGRFWIB]<4,1>:ub -5:w + mac (16) acc0<1>:w r[pREF4]<4,1>:ub 20:w + mac (16) acc0<1>:w r[pREF4,nGRFWIB]<4,1>:ub 1:w + + mov (1) pRESULT:uw nOFFSET_RES:uw + (-f0.0) jmpi INTERLABEL(VFILTER_4x4) + (-f0.1) mov (1) pRESULT:uw nOFFSET_INTERIM4x4:uw + + INTERLABEL(VFILTER_4x4): + + asr.sat (16) r[pRESULT]<2>:ub acc0<16;16,1>:w 5:w + + (-f0.0) jmpi INTERLABEL(Average_4x4) + (f0.1) jmpi INTERLABEL(Return_Interpolate_Y_4x4 ) + +INTERLABEL(Interpolate_Y_I_4x4): + + //----------------------------------------------------------------------- + // CASE: 134C (Integer position) + //----------------------------------------------------------------------- + + mov (4) pREF0<1>:uw gW0<4;4,1>:uw + + cmp.e.f0.0 (4) null:w gMVX_FRAC<0;1,0>:w 3:w + cmp.e.f0.1 (4) null:w gMVY_FRAC<0;1,0>:w 3:w + (f0.0) add (4) pREF0<1>:uw pREF0<4;4,1>:uw 1:uw + (f0.1) add (4) pREF0<1>:uw pREF0<4;4,1>:uw nGRFWIB/2:uw + + mov (16) guwINTERIM_BUF2(0)<1> r[pREF0]<4,1>:ub + +INTERLABEL(Average_4x4): + + //----------------------------------------------------------------------- + // CASE: 13456789BCDEF (Average) + //----------------------------------------------------------------------- + + // Average two interim results + avg.sat (16) gubINTERIM_BUF2(0)<2> gubINTERIM_BUF2(0)<32;16,2> gINTERIM4x4<32;16,2>:ub + +INTERLABEL(Return_Interpolate_Y_4x4): + // Move result + mov (1) pRES:uw gpINTPY:uw + mov (4) r[pRES,0]<2>:ub gubINTERIM_BUF2(0,0) + mov (4) r[pRES,16]<2>:ub gubINTERIM_BUF2(0,8) + mov (4) r[pRES,32]<2>:ub gubINTERIM_BUF2(0,16) + mov (4) r[pRES,48]<2>:ub gubINTERIM_BUF2(0,24) + + // Restore all address registers + mov (8) a0<1>:w gpADDR<8;8,1>:w + +INTERLABEL(Exit_Interpolate_Y_4x4): + + +// end of file diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/interpolate_Y_8x8.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/interpolate_Y_8x8.asm --- libva-1.0.1/i965_drv_video/shaders/h264/mc/interpolate_Y_8x8.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/interpolate_Y_8x8.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,262 @@ +/* + * Interpolation kernel for luminance motion compensation + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Kernel name: Interpolate_Y_8x8.asm +// +// Interpolation kernel for luminance motion compensation +// +// $Revision: 13 $ +// $Date: 10/09/06 4:00p $ +// + + +//--------------------------------------------------------------- +// In: pMV => Source address of MV +// In: gMVX_FRAC<2;2,1>:w => MV fractional components +// In: f0.1 (1) => If 1, vertical MV is integer +// In: gpINTPY:uw => Destination address for interpolated result +// In: Reference area staring from R43 +// If horizontal/vertical MVs are all integer, 8x8 pixels are on R43~R44 (2 GRFs) +// If only horz MV is integer, 8x13 pixels are on R43~R46 (4 GRFs) +// If only vert MV is integer, 13x8 pixels are on R43~R46 (4 GRFs) +// If no MVs are integer, 13x13 pixels are on R43~R49 (7 GRFs) +//--------------------------------------------------------------- + + +INTERLABEL(Interpolate_Y_8x8_Func): + + + + // Check whether MVX is integer MV + and.z.f0.0 (1) null:w r[pMV,0]<0;1,0>:w 0x3:w + (-f0.0) jmpi (1) INTERLABEL(Interpolate_Y_8x8_Func2) + + // TODO: remove this back-to-back read - huge latency.. + mov (8) gubREF(6,2)<1> gubREF(3,0)<8;8,1> + mov (8) gubREF(5,18)<1> gubREF(2,24)<8;8,1> {NoDDClr} + mov (8) gubREF(5,2)<1> gubREF(2,16)<8;8,1> {NoDDChk} + mov (8) gubREF(4,18)<1> gubREF(2,8)<8;8,1> {NoDDClr} + mov (8) gubREF(4,2)<1> gubREF(2,0)<8;8,1> {NoDDChk} + mov (8) gubREF(3,18)<1> gubREF(1,24)<8;8,1> {NoDDClr} + mov (8) gubREF(3,2)<1> gubREF(1,16)<8;8,1> {NoDDChk} + mov (8) gubREF(2,18)<1> gubREF(1,8)<8;8,1> {NoDDClr} + mov (8) gubREF(2,2)<1> gubREF(1,0)<8;8,1> {NoDDChk} + mov (8) gubREF(1,18)<1> gubREF(0,24)<8;8,1> {NoDDClr} + mov (8) gubREF(1,2)<1> gubREF(0,16)<8;8,1> {NoDDChk} + mov (8) gubREF(0,18)<1> gubREF(0,8)<8;8,1> + mov (8) gubREF(0,2)<1> gubREF(0,0)<8;8,1> + +INTERLABEL(Interpolate_Y_8x8_Func2): + + // Compute the GRF address of the starting position of the reference area + (-f0.1) mov (1) pREF:w nOFFSET_REF+2+nGRFWIB:w + (f0.1) mov (1) pREF:w nOFFSET_REF+2:w + mov (1) pRESULT:uw gpINTPY:uw + + /* + * | | + * - - 0 1 2 3 + - + * 4 5 6 7 + * 8 9 A B + * C D E F + * - - + - - - + - + * | | + */ + + // Case 0 + or.z.f0.1 (16) null:w gMVY_FRAC<0;1,0>:w gMVX_FRAC<0;1,0>:w + (f0.1) mov (16) r[pRESULT]<1>:uw r[pREF]<16;8,1>:ub + (f0.1) mov (16) r[pRESULT,nGRFWIB]<1>:uw r[pREF,nGRFWIB]<16;8,1>:ub + (f0.1) mov (16) r[pRESULT,nGRFWIB*2]<1>:uw r[pREF,nGRFWIB*2]<16;8,1>:ub + (f0.1) mov (16) r[pRESULT,nGRFWIB*3]<1>:uw r[pREF,nGRFWIB*3]<16;8,1>:ub + (f0.1) jmpi INTERLABEL(Exit_Interpolate_Y_8x8) + + // Store all address registers + mov (8) gpADDR<1>:w a0<8;8,1>:w + + mul.z.f0.0 (1) gW4:w gMVY_FRAC:w gMVX_FRAC:w + add (1) pREF1:uw pREF0:uw nGRFWIB/2:uw + and.nz.f0.1 (1) null gW4:w 1:w + add (2) pREF2<1>:uw pREF0<2;2,1>:uw nGRFWIB:uw + mov (4) gW0<1>:uw pREF0<4;4,1>:uw + + (f0.0) jmpi INTERLABEL(Interpolate_Y_H_8x8) + (f0.1) jmpi INTERLABEL(Interpolate_Y_H_8x8) + + //----------------------------------------------------------------------- + // CASE: A69BE (H/V interpolation) + //----------------------------------------------------------------------- + + // Compute interim horizontal intepolation of 12 lines (not 9 lines) +// add (1) pREF0<1>:ud pREF0<0;1,0>:ud 0xffeeffde:ud // (-18<<16)|(-34) + add (1) pREF0<1>:uw pREF0<0;1,0>:uw -34:w + add (1) pREF1<1>:uw pREF1<0;1,0>:uw -18:w {NoDDClr} + mov (1) pRESD:ud nOFFSET_INTERIM3:ud {NoDDChk} + + // Check whether this position is 'A' + cmp.e.f0.0 (1) null gW4:w 4:w + + $for(0;<6;2) { + add (32) acc0<1>:w r[pREF,nGRFWIB*%1]<16;8,1>:ub r[pREF0,nGRFWIB*%1+5]<16;8,1>:ub {Compr} + mac (32) acc0<1>:w r[pREF,nGRFWIB*%1+1]<16;8,1>:ub -5:w {Compr} + mac (32) acc0<1>:w r[pREF,nGRFWIB*%1+2]<16;8,1>:ub 20:w {Compr} + mac (32) acc0<1>:w r[pREF,nGRFWIB*%1+3]<16;8,1>:ub 20:w {Compr} + mac (32) r[pRES,nGRFWIB*%1]<1>:w r[pREF,nGRFWIB*%1+4]<16;8,1>:ub -5:w {Compr} + } + // last line + add (8) acc0<1>:w r[pREF,nGRFWIB*6]<8;8,1>:ub r[pREF,nGRFWIB*6+5]<8;8,1>:ub + mac (8) acc0<1>:w r[pREF,nGRFWIB*6+1]<8;8,1>:ub -5:w + mac (8) acc0<1>:w r[pREF,nGRFWIB*6+2]<8;8,1>:ub 20:w + mac (8) acc0<1>:w r[pREF,nGRFWIB*6+3]<8;8,1>:ub 20:w + mac (8) r[pRES,nGRFWIB*6]<1>:w r[pREF,nGRFWIB*6+4]<8;8,1>:ub -5:w + + // Compute interim/output vertical interpolation + mov (1) pREF0:ud nOFFSET_INTERIM2:ud {NoDDClr} // set pREF0 and pREF1 at the same time + mov (1) pREF2D:ud nOFFSET_INTERIM4:ud {NoDDChk,NoDDClr} // set pREF2 and pREF3 at the same time + (f0.0) sel (1) pRES:uw gpINTPY:uw nOFFSET_INTERIM:uw {NoDDChk} // Case A vs. 69BE + + $for(0;<4;2) { + add (32) acc0<1>:w r[pREF0,nGRFWIB*%1]<16;16,1>:w 512:w {Compr} + mac (16) acc0<1>:w r[pREF2,nGRFWIB*%1]<8,1>:w -5:w + mac (16) acc1<1>:w r[pREF2,nGRFWIB*%1+nGRFWIB]<8,1>:w -5:w + mac (32) acc0<1>:w r[pREF0,nGRFWIB*%1+nGRFWIB]<16;16,1>:w 20:w {Compr} + mac (16) acc0<1>:w r[pREF2,nGRFWIB*%1+nGRFWIB]<8,1>:w 20:w + mac (16) acc1<1>:w r[pREF2,nGRFWIB*%1+nGRFWIB+nGRFWIB]<8,1>:w 20:w + mac (32) acc0<1>:w r[pREF0,(2+%1)*nGRFWIB]<16;16,1>:w -5:w {Compr} + mac (16) acc0<1>:w r[pREF2,(2+%1)*nGRFWIB]<8,1>:w 1:w + mac (16) acc1<1>:w r[pREF2,(2+%1)*nGRFWIB+nGRFWIB]<8,1>:w 1:w + asr.sat (16) r[pRES,nGRFWIB*%1]<2>:ub acc0<16;16,1>:w 10:w + asr.sat (16) r[pRES,nGRFWIB*%1+nGRFWIB]<2>:ub acc1<16;16,1>:w 10:w {SecHalf} + } + + (f0.0) jmpi INTERLABEL(Return_Interpolate_Y_8x8) + +INTERLABEL(Interpolate_Y_H_8x8): + + cmp.e.f0.0 (1) null gMVX_FRAC:w 0:w + cmp.e.f0.1 (1) null gMVY_FRAC:w 2:w + (f0.0) jmpi INTERLABEL(Interpolate_Y_V_8x8) + (f0.1) jmpi INTERLABEL(Interpolate_Y_V_8x8) + + //----------------------------------------------------------------------- + // CASE: 123567DEF (H interpolation) + //----------------------------------------------------------------------- + + add (4) pREF0<1>:uw gW0<4;4,1>:uw -2:w + cmp.g.f0.0 (4) null:w gMVY_FRAC<0;1,0>:w 2:w + cmp.e.f0.1 (1) null gMVX_FRAC:w 2:w + (f0.0) add (4) pREF0<1>:uw pREF0<4;4,1>:uw nGRFWIB/2:uw + + cmp.e.f0.0 (1) null:w gMVY_FRAC<0;1,0>:w 0:w + + (f0.1) sel (1) pRES:uw gpINTPY:uw nOFFSET_INTERIM:uw // Case 26E vs. 1357DF + + // Compute interim/output horizontal interpolation + $for(0;<4;2) { + add (16) acc0<1>:w r[pREF0,nGRFWIB*%1]<8,1>:ub 16:w + add (16) acc1<1>:w r[pREF0,nGRFWIB*%1+nGRFWIB]<8,1>:ub 16:w + mac (16) acc0<1>:w r[pREF0,nGRFWIB*%1+1]<8,1>:ub -5:w + mac (16) acc1<1>:w r[pREF0,nGRFWIB*%1+1+nGRFWIB]<8,1>:ub -5:w + mac (16) acc0<1>:w r[pREF0,nGRFWIB*%1+2]<8,1>:ub 20:w + mac (16) acc1<1>:w r[pREF0,nGRFWIB*%1+2+nGRFWIB]<8,1>:ub 20:w + mac (16) acc0<1>:w r[pREF0,nGRFWIB*%1+3]<8,1>:ub 20:w + mac (16) acc1<1>:w r[pREF0,nGRFWIB*%1+3+nGRFWIB]<8,1>:ub 20:w + mac (16) acc0<1>:w r[pREF0,nGRFWIB*%1+4]<8,1>:ub -5:w + mac (16) acc1<1>:w r[pREF0,nGRFWIB*%1+4+nGRFWIB]<8,1>:ub -5:w + mac (16) acc0<1>:w r[pREF0,nGRFWIB*%1+5]<8,1>:ub 1:w + mac (16) acc1<1>:w r[pREF0,nGRFWIB*%1+5+nGRFWIB]<8,1>:ub 1:w + asr.sat (16) r[pRES,nGRFWIB*%1]<2>:ub acc0<16;16,1>:w 5:w + asr.sat (16) r[pRES,nGRFWIB*%1+nGRFWIB]<2>:ub acc1<16;16,1>:w 5:w {SecHalf} + } + + (-f0.1) jmpi INTERLABEL(Interpolate_Y_V_8x8) + (-f0.0) jmpi INTERLABEL(Average_8x8) + + jmpi INTERLABEL(Return_Interpolate_Y_8x8) + +INTERLABEL(Interpolate_Y_V_8x8): + + cmp.e.f0.0 (1) null gMVY_FRAC:w 0:w + (f0.0) jmpi INTERLABEL(Interpolate_Y_I_8x8) + + //----------------------------------------------------------------------- + // CASE: 48C59D7BF (V interpolation) + //----------------------------------------------------------------------- + + mov (2) pREF0<1>:uw gW0<4;2,2>:uw {NoDDClr} + mov (2) pREF2<1>:uw gW1<2;2,1>:uw {NoDDChk,NoDDClr} + mov (1) pRES:uw gpINTPY:uw {NoDDChk} + + cmp.g.f0.1 (4) null:w gMVX_FRAC<0;1,0>:w 2:w + cmp.e.f0.0 (1) null:w gMVX_FRAC<0;1,0>:w 0:w + (f0.1) add (4) pREF0<1>:uw pREF0<4;4,1>:uw 1:uw + + cmp.e.f0.1 (1) null gMVY_FRAC:w 2:w + (-f0.0) jmpi INTERLABEL(VFILTER_8x8) + (-f0.1) mov (1) pRES:uw nOFFSET_INTERIM:uw + + INTERLABEL(VFILTER_8x8): + + // Compute interim/output vertical interpolation + $for(0;<4;2) { + add (32) acc0<1>:w r[pREF0,nGRFWIB*%1-nGRFWIB]<16;8,1>:ub 16:w {Compr} + mac (16) acc0<1>:w r[pREF2,nGRFWIB*%1-nGRFWIB]<8,1>:ub -5:w + mac (16) acc1<1>:w r[pREF2,nGRFWIB*%1]<8,1>:ub -5:w + mac (32) acc0<1>:w r[pREF0,nGRFWIB*%1]<16;8,1>:ub 20:w {Compr} + mac (16) acc0<1>:w r[pREF2,nGRFWIB*%1]<8,1>:ub 20:w + mac (16) acc1<1>:w r[pREF2,nGRFWIB*%1+nGRFWIB]<8,1>:ub 20:w + mac (32) acc0<1>:w r[pREF0,nGRFWIB*%1+nGRFWIB]<16;8,1>:ub -5:w {Compr} + mac (16) acc0<1>:w r[pREF2,nGRFWIB*%1+nGRFWIB]<8,1>:ub 1:w + mac (16) acc1<1>:w r[pREF2,nGRFWIB*%1+nGRFWIB+nGRFWIB]<8,1>:ub 1:w + asr.sat (16) r[pRES,nGRFWIB*%1]<2>:ub acc0<16;16,1>:w 5:w + asr.sat (16) r[pRES,nGRFWIB*%1+nGRFWIB]<2>:ub acc1<16;16,1>:w 5:w {SecHalf} + } + + (-f0.0) jmpi INTERLABEL(Average_8x8) + (f0.1) jmpi INTERLABEL(Return_Interpolate_Y_8x8) + +INTERLABEL(Interpolate_Y_I_8x8): + + //----------------------------------------------------------------------- + // CASE: 134C (Integer position) + //----------------------------------------------------------------------- + + mov (2) pREF0<1>:uw gW0<2;2,1>:uw {NoDDClr} + + mov (1) pRES:uw gpINTPY:uw {NoDDChk} + + cmp.e.f0.0 (2) null:w gMVX_FRAC<0;1,0>:w 3:w + cmp.e.f0.1 (2) null:w gMVY_FRAC<0;1,0>:w 3:w + (f0.0) add (2) pREF0<1>:uw pREF0<2;2,1>:uw 1:uw + (f0.1) add (2) pREF0<1>:uw pREF0<2;2,1>:uw nGRFWIB/2:uw + + mov (16) r[pRES]<1>:uw r[pREF0]<8,1>:ub + mov (16) r[pRES,nGRFWIB]<1>:uw r[pREF0,nGRFWIB]<8,1>:ub + mov (16) r[pRES,nGRFWIB*2]<1>:uw r[pREF0,nGRFWIB*2]<8,1>:ub + mov (16) r[pRES,nGRFWIB*3]<1>:uw r[pREF0,nGRFWIB*3]<8,1>:ub + +INTERLABEL(Average_8x8): + + //----------------------------------------------------------------------- + // CASE: 13456789BCDEF (Average) + //----------------------------------------------------------------------- + + // Average two interim results + avg.sat (16) r[pRES,0]<2>:ub r[pRES,0]<32;16,2>:ub gubINTERIM_BUF(0) + avg.sat (16) r[pRES,nGRFWIB]<2>:ub r[pRES,nGRFWIB]<32;16,2>:ub gubINTERIM_BUF(1) + avg.sat (16) r[pRES,nGRFWIB*2]<2>:ub r[pRES,nGRFWIB*2]<32;16,2>:ub gubINTERIM_BUF(2) + avg.sat (16) r[pRES,nGRFWIB*3]<2>:ub r[pRES,nGRFWIB*3]<32;16,2>:ub gubINTERIM_BUF(3) + +INTERLABEL(Return_Interpolate_Y_8x8): + // Restore all address registers + mov (8) a0<1>:w gpADDR<8;8,1>:w + +INTERLABEL(Exit_Interpolate_Y_8x8): + +// end of file diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/Intra_16x16.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/Intra_16x16.asm --- libva-1.0.1/i965_drv_video/shaders/h264/mc/Intra_16x16.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/Intra_16x16.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,71 @@ +/* + * Decode Intra_16x16 macroblock + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Kernel name: Intra_16x16.asm +// +// Decoding of Intra_16x16 macroblock +// +// $Revision: 8 $ +// $Date: 10/18/06 4:10p $ +// + +// ---------------------------------------------------- +// Main: Intra_16x16 +// ---------------------------------------------------- + +#define INTRA_16X16 + +.kernel Intra_16x16 +INTRA_16x16: + +#ifdef _DEBUG +// WA for FULSIM so we'll know which kernel is being debugged +mov (1) acc0:ud 0x00aa55a5:ud +#endif + +#include "SetupForHWMC.asm" + +#ifdef SW_SCOREBOARD + CALL(scoreboard_start_intra,1) +#endif + +#ifdef SW_SCOREBOARD + wait n0:ud // Now wait for scoreboard to response +#endif + +// +// Decode Y blocks +// +// Load reference data from neighboring macroblocks + CALL(load_Intra_Ref_Y,1) + +// Intra predict Intra_16x16 luma block + #include "intra_pred_16x16_Y.asm" + +// Add error data to predicted intra data + #include "add_Error_16x16_Y.asm" + +// Save decoded Y picture + CALL(save_16x16_Y,1) +// +// Decode U/V blocks +// +// Note: The decoding for chroma blocks will be the same for all intra prediction mode +// + CALL(decode_Chroma_Intra,1) + +#ifdef SW_SCOREBOARD + #include "scoreboard_update.asm" +#endif + +// Terminate the thread +// + #include "EndIntraThread.asm" + +// End of Intra_16x16 diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/Intra_4x4.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/Intra_4x4.asm --- libva-1.0.1/i965_drv_video/shaders/h264/mc/Intra_4x4.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/Intra_4x4.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,175 @@ +/* + * Decode Intra_4x4 macroblock + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Kernel name: Intra_4x4.asm +// +// Decoding of Intra_4x4 macroblock +// +// $Revision: 12 $ +// $Date: 10/18/06 4:10p $ +// + +// ---------------------------------------------------- +// Main: Intra_4x4 +// ---------------------------------------------------- + +#define INTRA_4X4 + +.kernel Intra_4x4 +INTRA_4x4: + +#ifdef _DEBUG +// WA for FULSIM so we'll know which kernel is being debugged +mov (1) acc0:ud 0x02aa55a5:ud +#endif + +#include "SetupForHWMC.asm" + +#undef PPREDBUF_Y +#define PPREDBUF_Y a0.3 // Pointer to predicted Y picture + +#define REG_INTRA_PRED_AVAIL REG_INTRA_TEMP_4 +#define REG_INTRA_4X4_PRED REG_INTRA_TEMP_7 // Store predicted Intra_4x4 data + +// Offset where 4x4 predicted data blocks are stored +#define PREDSUBBLK0 0*GRFWIB +#define PREDSUBBLK1 1*GRFWIB +#define PREDSUBBLK2 2*GRFWIB +#define PREDSUBBLK3 3*GRFWIB +#define PREDSUBBLK4 4*GRFWIB +#define PREDSUBBLK5 5*GRFWIB +#define PREDSUBBLK6 6*GRFWIB +#define PREDSUBBLK7 7*GRFWIB +#define PREDSUBBLK8 8*GRFWIB +#define PREDSUBBLK9 9*GRFWIB +#define PREDSUBBLK10 10*GRFWIB +#define PREDSUBBLK11 11*GRFWIB +#define PREDSUBBLK12 12*GRFWIB +#define PREDSUBBLK13 13*GRFWIB +#define PREDSUBBLK14 14*GRFWIB +#define PREDSUBBLK15 15*GRFWIB + +// 4x4 error block byte offset within the 8x8 error block +#define ERRBLK0 0 +#define ERRBLK1 8 +#define ERRBLK2 64 +#define ERRBLK3 72 + +#ifdef SW_SCOREBOARD + CALL(scoreboard_start_intra,1) +#endif + +#ifdef SW_SCOREBOARD + wait n0:ud // Now wait for scoreboard to response +#endif + +// +// Decode Y blocks +// +// Load reference data from neighboring macroblocks + CALL(load_Intra_Ref_Y,1) + + mov (1) PERROR<1>:w ERRBUF*GRFWIB:w // Pointer to macroblock error data + mov (1) PPREDBUF_Y<1>:w PREDBUF*GRFWIB:w // Pointer to predicted data + shr (2) REG_INTRA_PRED_AVAIL<1>:w REG_INTRA_PRED_AVAIL_FLAG_BYTE<0;1,0>:ub 0x40:v + and.nz.f0.0 (8) NULLREG REG_INTRA_PRED_AVAIL_FLAG_BYTE<0;1,0>:ub 4:w // Top-right macroblock available for intra prediction? + (-f0.0.any8h) mov (8) INTRA_REF_TOP(0,16)<1> INTRA_REF_TOP(0,15)REGION(1,0) // Extend right boundary of MB B to C + +// Intra predict Intra_4x4 luma blocks +// +// Sub-macroblock 0 ***************** + mov (16) REF_TOP0(0)<1> INTRA_REF_TOP0(0) // Top reference data + mov (8) REF_LEFT(0)<1> INTRA_REF_LEFT(0)REGION(8,4) // Left reference data + shr (4) PRED_MODE<1>:w INTRA_PRED_MODE(0)<1;2,0> 0x4040:v // Expand IntraPredMode to 1 byte/block + CALL(intra_Pred_4x4_Y_4,1) + add (1) PERROR<1>:w PERROR<0;1,0>:w 0x0080:w // Pointers to next error block + + or (1) REG_INTRA_PRED_AVAIL<1>:w REG_INTRA_PRED_AVAIL<0;1,0>:w 0x1:w // Left neighbor is available now + +// Sub-macroblock 1 ***************** + + mov (16) REF_TOP0(0)<1> INTRA_REF_TOP0(0,8) // Top reference data + mov (4) REF_LEFT(0)<1> r[PPREDBUF_Y,PREDSUBBLK1+6]<8;1,0>:ub // Left reference data (top half) + mov (4) REF_LEFT(0,4)<1> r[PPREDBUF_Y,PREDSUBBLK3+6]<8;1,0>:ub // Left reference data (bottom half) + shr (4) PRED_MODE<1>:w INTRA_PRED_MODE(0,2)<1;2,0> 0x4040:v // Expand IntraPredMode to 1 byte/block + add (1) PPREDBUF_Y<1>:w PPREDBUF_Y<0;1,0>:w 4*GRFWIB:w // Pointer to predicted sub-macroblock 1 + CALL(intra_Pred_4x4_Y_4,1) + add (1) PERROR<1>:w PERROR<0;1,0>:w 0x0080:w // Pointers to next error block + + or (1) REG_INTRA_PRED_AVAIL<1>:w REG_INTRA_PRED_AVAIL.1<0;1,0>:w 0x2:w // Top neighbor is available now + +// Pack constructed data from word-aligned to byte-aligned format +// to speed up save_4x4_Y module later +// PPREDBUF_Y now points to sub-block #4 + mov (16) r[PPREDBUF_Y,-PREDSUBBLK4]<1>:ub r[PPREDBUF_Y,-PREDSUBBLK4]<32;16,2>:ub // Sub-block 0 + mov (16) r[PPREDBUF_Y,0-PREDSUBBLK4+16]<1>:ub r[PPREDBUF_Y,-PREDSUBBLK3]<32;16,2>:ub // Sub-block 1 + mov (16) r[PPREDBUF_Y,-PREDSUBBLK2]<1>:ub r[PPREDBUF_Y,-PREDSUBBLK2]<32;16,2>:ub // Sub-block 2 + mov (16) r[PPREDBUF_Y,0-PREDSUBBLK2+16]<1>:ub r[PPREDBUF_Y,-PREDSUBBLK1]<32;16,2>:ub // Sub-block 3 + + mov (16) r[PPREDBUF_Y,-PREDSUBBLK3]<1>:ub r[PPREDBUF_Y]<32;16,2>:ub // Sub-block 4 + mov (16) r[PPREDBUF_Y,0-PREDSUBBLK3+16]<1>:ub r[PPREDBUF_Y,PREDSUBBLK1]<32;16,2>:ub // Sub-block 5 + mov (16) r[PPREDBUF_Y,-PREDSUBBLK1]<1>:ub r[PPREDBUF_Y,PREDSUBBLK2]<32;16,2>:ub // Sub-block 6 + mov (16) r[PPREDBUF_Y,0-PREDSUBBLK1+16]<1>:ub r[PPREDBUF_Y,PREDSUBBLK3]<32;16,2>:ub // Sub-block 7 + +// Sub-macroblock 2 ***************** + + mov (4) REF_TOP0(0)<1> INTRA_REF_LEFT0(0,28)REGION(4,1) // Top-left reference data + mov (8) REF_TOP0(0,4)<1> r[PPREDBUF_Y,0-2*GRFWIB+12]<16;4,1>:ub // Top reference data from SB 2,3 + mov (8) REF_TOP0(0,12)<1> r[PPREDBUF_Y,0-GRFWIB+12]<16;4,1>:ub // Top reference data from SB 6,7 + mov (8) REF_TOP0(0,20)<1> r[PPREDBUF_Y,0-GRFWIB+31]<0;1,0>:ub // Top-right reference data + mov (16) REG_INTRA_REF_TOP<1>:w REF_TOP_W(0) // Store top reference data for SubMB #2 and #3. + mov (8) REF_LEFT(0)<1> INTRA_REF_LEFT(1)REGION(8,4) // Left reference data + shr (4) PRED_MODE<1>:w INTRA_PRED_MODE(0,4)<1;2,0> 0x4040:v // Expand IntraPredMode to 1 byte/block + CALL(intra_Pred_4x4_Y_4,1) + add (1) PERROR<1>:w PERROR<0;1,0>:w 0x0080:w // Pointers to next error block + + or (1) REG_INTRA_PRED_AVAIL<1>:w REG_INTRA_PRED_AVAIL<0;1,0>:w 0x1:w // Left neighbor is available now + +// Sub-macroblock 3 ***************** + + mov (16) REF_TOP0(0)<1> INTRA_REF_TOP0(0,8) // Top reference data + mov (8) REF_TOP0(0,16)<1> INTRA_REF_TOP0(0,24)REGION(8,1) // Top reference data + mov (4) REF_LEFT(0)<1> r[PPREDBUF_Y,PREDSUBBLK1+6]<8;1,0>:ub // Left reference data (top half) + mov (4) REF_LEFT(0,4)<1> r[PPREDBUF_Y,PREDSUBBLK3+6]<8;1,0>:ub // Left reference data (bottom half) + shr (4) PRED_MODE<1>:w INTRA_PRED_MODE(0,6)<1;2,0> 0x4040:v // Expand IntraPredMode to 1 byte/block + add (1) PPREDBUF_Y<1>:w PPREDBUF_Y<0;1,0>:w 4*GRFWIB:w // Pointer to predicted sub-macroblock 3 + CALL(intra_Pred_4x4_Y_4,1) + +// Pack constructed data from word-aligned to byte-aligned format +// to speed up save_4x4_Y module later +// PPREDBUF_Y now points to sub-block #12 + mov (16) r[PPREDBUF_Y,-PREDSUBBLK4]<1>:ub r[PPREDBUF_Y,-PREDSUBBLK4]<32;16,2>:ub // Sub-block 8 + mov (16) r[PPREDBUF_Y,0-PREDSUBBLK4+16]<1>:ub r[PPREDBUF_Y,-PREDSUBBLK3]<32;16,2>:ub // Sub-block 9 + mov (16) r[PPREDBUF_Y,-PREDSUBBLK2]<1>:ub r[PPREDBUF_Y,-PREDSUBBLK2]<32;16,2>:ub // Sub-block 10 + mov (16) r[PPREDBUF_Y,0-PREDSUBBLK2+16]<1>:ub r[PPREDBUF_Y,-PREDSUBBLK1]<32;16,2>:ub // Sub-block 11 + + mov (16) r[PPREDBUF_Y,-PREDSUBBLK3]<1>:ub r[PPREDBUF_Y]<32;16,2>:ub // Sub-block 12 + mov (16) r[PPREDBUF_Y,0-PREDSUBBLK3+16]<1>:ub r[PPREDBUF_Y,PREDSUBBLK1]<32;16,2>:ub // Sub-block 13 + mov (16) r[PPREDBUF_Y,-PREDSUBBLK1]<1>:ub r[PPREDBUF_Y,PREDSUBBLK2]<32;16,2>:ub // Sub-block 14 + mov (16) r[PPREDBUF_Y,0-PREDSUBBLK1+16]<1>:ub r[PPREDBUF_Y,PREDSUBBLK3]<32;16,2>:ub // Sub-block 15 + +// All 4 sub-macroblock (containing 4 intra_4x4 blocks) have be constructed +// Save constructed Y picture + CALL(save_4x4_Y,1) // Save Intra_4x4 predicted luma data. +// +// Decode U/V blocks +// +// Note: The decoding for chroma blocks will be the same for all intra prediction mode +// + CALL(decode_Chroma_Intra,1) + +#ifdef SW_SCOREBOARD + #include "scoreboard_update.asm" +#endif + +// Terminate the thread +// + #include "EndIntraThread.asm" + +// End of Intra_4x4 diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/Intra_8x8.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/Intra_8x8.asm --- libva-1.0.1/i965_drv_video/shaders/h264/mc/Intra_8x8.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/Intra_8x8.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,192 @@ +/* + * Decode Intra_8x8 macroblock + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Kernel name: Intra_8x8.asm +// +// Decoding of Intra_8x8 macroblock +// +// $Revision: 12 $ +// $Date: 10/18/06 4:10p $ +// + +// ---------------------------------------------------- +// Main: Intra_8x8 +// ---------------------------------------------------- + +#define INTRA_8X8 + +.kernel Intra_8x8 +INTRA_8x8: + +#ifdef _DEBUG +// WA for FULSIM so we'll know which kernel is being debugged +mov (1) acc0:ud 0x01aa55a5:ud +#endif + +#include "SetupForHWMC.asm" + +#define REG_INTRA_PRED_AVAIL REG_INTRA_TEMP_4 +#define INTRA_PRED_AVAIL REG_INTRA_TEMP_4.4 + +// Offset where 8x8 predicted data blocks are stored +#define PREDBLK0 0*GRFWIB +#define PREDBLK1 4*GRFWIB +#define PREDBLK2 8*GRFWIB +#define PREDBLK3 12*GRFWIB + +#ifdef SW_SCOREBOARD + +// Update "E" flag with "F" flag information + mov (1) REG_INTRA_TEMP_0<1>:w REG_INTRA_PRED_AVAIL_FLAG_WORD<0;1,0>:w // Store original Intra_Pred_Avail_Flag + and.nz.f0.0 (1) NULLREG REG_MBAFF_PIC MBAFF_PIC // Is current MBAFF picture + and.z.f0.1 (1) NULLREG REG_INTRA_PRED_AVAIL_FLAG INTRA_PRED_LEFT_TH_AVAIL_FLAG // Is "A" not available? + (f0.0) and.z.f0.0 (1) NULLREG REG_FIELD_MACROBLOCK_FLAG FIELD_MACROBLOCK_FLAG // Is current frame MB? + (f0.1) and.nz.f0.1 (1) NULLREG REG_INTRA_PRED_8X8_BLK2_AVAIL_FLAG INTRA_PRED_8X8_BLK2_AVAIL_FLAG // Is "F" flag set? + (f0.0.allv) or (1) REG_INTRA_PRED_AVAIL_FLAG_WORD<1>:w REG_INTRA_PRED_AVAIL_FLAG_WORD<0;1,0>:w INTRA_PRED_LEFT_BH_AVAIL_FLAG // Set "E" to 1 if all conditions meet + + CALL(scoreboard_start_intra,1) + mov (1) REG_INTRA_PRED_AVAIL_FLAG_WORD<1>:w REG_INTRA_TEMP_0<0;1,0>:w // Restore original Intra_Pred_Avail_Flag +#endif + +#ifdef SW_SCOREBOARD + wait n0:ud // Now wait for scoreboard to response +#endif + +// +// Decode Y blocks +// +// Load reference data from neighboring macroblocks + CALL(load_Intra_Ref_Y,1) + + mov (1) PERROR<1>:w ERRBUF*GRFWIB:w // Pointer to macroblock error data + mov (1) PDECBUF_UD<1>:ud 0x00010001*PREDBUF*GRFWIB+0x00100000:ud // Pointers to predicted data + shr (2) REG_INTRA_PRED_AVAIL<1>:w REG_INTRA_PRED_AVAIL_FLAG_BYTE<0;1,0>:ub 0x40:v + +#if 1 + mov (4) REF_LEFT_D(0,0)<1> 0:ud // This is to make validation easier. Without it, DRAM mismatch occurs. +#endif + +// Intra predict Intra_8x8 luma blocks +// +// Sub-macroblock 0 ***************** + mov (16) REF_TOP_W(0)<1> REG_INTRA_REF_TOP<16;16,1>:w // Copy entire top reference data + and.nz.f0.0 (8) NULLREG REG_INTRA_PRED_AVAIL_FLAG INTRA_PRED_UP_LEFT_AVAIL_FLAG // Is "D" available? + (-f0.0) mov (1) REF_TOP(0,-1)<1> INTRA_REF_TOP(0)REGION(1,0) // p[-1,-1] = p[0,-1] + + mov (8) REF_LEFT(0,2)<1> INTRA_REF_LEFT(0) // Left reference data, (leave 2 for reference filtering) + (-f0.0) mov (1) REF_LEFT(0,1)<1> INTRA_REF_LEFT(0)REGION(1,0) // p[-1,-1]=p[-1,0] + (f0.0.any2h) mov (2) REF_LEFT(0,0)<1> INTRA_REF_TOP(0,-1)REGION(1,0) // p'[-1,y] (y=0,1) = p[-1,-1] + and.nz.f0.1 (1) NULLREG REG_INTRA_PRED_AVAIL_FLAG INTRA_PRED_UP_AVAIL_FLAG // Is "B" available? + (f0.1) mov (1) REF_LEFT(0,0)<1> INTRA_REF_TOP(0,0)REGION(1,0) // p[0,-1] for left filtering + and.nz.f0.1 (1) NULLREG REG_INTRA_PRED_AVAIL_FLAG INTRA_PRED_LEFT_TH_AVAIL_FLAG // Is "A" available? + (-f0.1) mov (1) REF_LEFT(0,2)<1> INTRA_REF_TOP(0,-1)REGION(1,0) // p'[-1,2] = p[-1,-1] + + and (1) PRED_MODE<1>:w INTRA_PRED_MODE(0)REGION(1,0) 0x0F:w // Intra pred mode for current block + mov (1) INTRA_PRED_AVAIL<1>:w REG_INTRA_PRED_AVAIL<0;1,0>:w // Top/Left neighbor available flags + CALL(intra_Pred_8x8_Y,1) + add (1) PERROR<1>:w PERROR<0;1,0>:w 0x0080:w // Pointers to next error block + +// Sub-macroblock 1 ***************** + mov (16) REF_TOP0(0)<1> INTRA_REF_TOP(0,4) // Top reference data + and.nz.f0.1 (8) NULLREG REG_INTRA_PRED_AVAIL_FLAG INTRA_PRED_UP_RIGHT_AVAIL_FLAG // Is "C" available? + (f0.1.any8h) mov (8) REF_TOP(0,8)<1> INTRA_REF_TOP(0,16)<8;8,1> // Take data from "C" + (-f0.1.any8h) mov (8) REF_TOP(0,8)<1> INTRA_REF_TOP(0,15)REGION(1,0) // Repeat last pixel from "B" + + mov (4) REF_LEFT(0,2)<1> DEC_Y(0,14)<16;1,0> // Left reference data (top half) (leave 2 for reference filtering) + mov (4) REF_LEFT(0,6)<1> DEC_Y(2,14)<16;1,0> // Left reference data (bottom half) + mov (2) REF_LEFT(0,0)<1> INTRA_REF_TOP(0,7)REGION(1,0) // p'[-1,y] (y=0,1) = p[-1,-1] + and.nz.f0.1 (1) NULLREG REG_INTRA_PRED_AVAIL_FLAG INTRA_PRED_UP_AVAIL_FLAG // Is "B" available? + (f0.1) mov (1) REF_LEFT(0,0)<1> INTRA_REF_TOP(0,8)REGION(1,0) // p[-1,-1] for left filtering + (-f0.1) mov (1) REF_LEFT(0,1)<1> DEC_Y(0,14)REGION(1,0) // p[-1,-1] = p[-1,0] + + shr (1) PRED_MODE<1>:w INTRA_PRED_MODE(0)REGION(1,0) 4:w // Intra pred mode for current block + add (2) PPREDBUF_Y<1>:w PPREDBUF_Y<2;2,1>:w 4*GRFWIB:w // Pointer to predicted sub-macroblock 1 + or (1) INTRA_PRED_AVAIL<1>:w REG_INTRA_PRED_AVAIL<0;1,0>:w 1:w // Left neighbor is available + CALL(intra_Pred_8x8_Y,1) + add (1) PERROR<1>:w PERROR<0;1,0>:w 0x0080:w // Pointers to next error block + +// Pack constructed data from word-aligned to byte-aligned format and interlace Y0 and Y1(every two Y rows) +// to speed up save_8x8_Y module later +// PPREDBUF_Y now points to sub-macroblock Y1 + mov (32) r[PPREDBUF_Y,-PREDBLK1]<1>:ub DEC_Y(0)<32;16,2> {Compr} // First 4 Y0 rows + mov (32) r[PPREDBUF_Y,0-PREDBLK1+32]<1>:ub DEC_Y(4)<32;16,2> {Compr} // First 4 Y1 rows + mov (32) r[PPREDBUF_Y,0-PREDBLK1+64]<1>:ub DEC_Y(2)<32;16,2> {Compr} // Second 4 Y0 rows + mov (32) r[PPREDBUF_Y,0-PREDBLK1+96]<1>:ub DEC_Y(6)<32;16,2> {Compr} // Second 4 Y1 rows + +// Sub-macroblock 2 ***************** +// Intra_8x8 special available flag handling + and.nz.f0.0 (1) NULLREG REG_MBAFF_PIC MBAFF_PIC // Is current MBAFF picture + and.z.f0.1 (1) NULLREG REG_INTRA_PRED_AVAIL_FLAG INTRA_PRED_LEFT_TH_AVAIL_FLAG // Is "A" not available? + (f0.0) and.z.f0.0 (1) NULLREG REG_FIELD_MACROBLOCK_FLAG FIELD_MACROBLOCK_FLAG // Is current frame MB? + (f0.1) and.nz.f0.1 (1) NULLREG REG_INTRA_PRED_8X8_BLK2_AVAIL_FLAG INTRA_PRED_8X8_BLK2_AVAIL_FLAG // Is special intra_8x8 available flag set? + (f0.0.allv) mov (1) REF_TOP(0,-1)<1> INTRA_REF_LEFT0(0,31)REGION(1,0) // Top-left reference data + (f0.0.allv) jmpi (1) INTRA_8x8_BLK2 +// Done intra_8x8 special available flag handling + + and.nz.f0.0 (8) NULLREG REG_INTRA_PRED_AVAIL_FLAG INTRA_PRED_LEFT_TH_AVAIL_FLAG // Is top-half "A" available? + (f0.0.any4h) mov (4) REF_TOP0(0)<1> INTRA_REF_LEFT0(0,28)REGION(4,1) // Top-left reference data + (-f0.0) mov (1) REF_TOP(0,-1)<1> DEC_Y(2,24)REGION(1,0) // p[-1,-1] = p[0,-1] +INTRA_8x8_BLK2: + mov (8) REF_TOP(0)<1> DEC_Y(2,24)REGION(8,1) // Top reference data + mov (8) REF_TOP(0,8)<1> DEC_Y(3,24)REGION(8,1) // Top reference data + + mov (8) REF_LEFT(0,2)<1> INTRA_REF_LEFT(1) // Left reference data, (leave 2 for reference filtering) + mov (1) REF_LEFT(0,0)<1> DEC_Y(2,24)REGION(1,0) // p'[-1,0] = p[0,-1] since "B" is always available + (f0.0) mov (1) REF_LEFT(0,1)<1> INTRA_REF_LEFT(0,28)REGION(1,0) // p[-1,1] = p[-1,-1] if top-half "A" available + (-f0.0) mov (1) REF_LEFT(0,1)<1> INTRA_REF_LEFT(1)REGION(1,0) // p[-1,1] = p[-1,0] + and.nz.f0.1 (1) NULLREG REG_INTRA_PRED_AVAIL_FLAG INTRA_PRED_LEFT_BH_AVAIL_FLAG // Is bottom-half "A" available? + (-f0.1) mov (1) REF_LEFT(0,2)<1> INTRA_REF_LEFT(0,28)REGION(1,0) // p'[-1,2] = p[-1,-1] + + and (1) PRED_MODE<1>:w INTRA_PRED_MODE(0,1)REGION(1,0) 0x0F:w // Intra pred mode for current block + or (1) INTRA_PRED_AVAIL<1>:w REG_INTRA_PRED_AVAIL.1<0;1,0>:w 2:w // Top neighbor is available + CALL(intra_Pred_8x8_Y,1) + add (1) PERROR<1>:w PERROR<0;1,0>:w 0x0080:w // Pointers to next error block + +// Sub-macroblock 3 ***************** + mov (4) REF_TOP0(0)<1> DEC_Y(2,28)REGION(4,1) // Top-left reference data + mov (8) REF_TOP(0)<1> DEC_Y(3,24)REGION(8,1) // Top reference data + mov (16) REF_TOP(0,8)<1> DEC_Y(3,31)REGION(1,0) // Top-right reference data + + mov (4) REF_LEFT(0,2)<1> DEC_Y(4,14)<16;1,0> // Left reference data (top half) (leave 2 for reference filtering) + mov (4) REF_LEFT(0,6)<1> DEC_Y(6,14)<16;1,0> // Left reference data (bottom half) + mov (1) REF_LEFT(0,0)<1> DEC_Y(3,24)REGION(1,0) // p[-1,0] = p[0,-1] + mov (1) REF_LEFT(0,1)<1> DEC_Y(2,31)REGION(1,0) // p[-1,1] = p[-1,-1] + + shr (1) PRED_MODE<1>:w INTRA_PRED_MODE(0,1)REGION(1,0) 4:w // Intra pred mode for current block + add (2) PPREDBUF_Y<1>:w PPREDBUF_Y<2;2,1>:w 4*GRFWIB:w // Pointer to predicted sub-macroblock 3 + or (1) INTRA_PRED_AVAIL<1>:w REG_INTRA_PRED_AVAIL<0;1,0>:w 3:w // Top and Left neighbor are available + CALL(intra_Pred_8x8_Y,1) + +// Pack constructed data from word-aligned to byte-aligned format +// to speed up save_8x8_Y module later +// PPREDBUF_Y now points to sub-macroblock Y1 + mov (32) r[PPREDBUF_Y,-PREDBLK1]<1>:ub DEC_Y(4)<32;16,2> {Compr} // First 4 Y2 rows + mov (32) r[PPREDBUF_Y,0-PREDBLK1+32]<1>:ub DEC_Y(8)<32;16,2> {Compr} // First 4 Y3 rows + mov (32) r[PPREDBUF_Y,0-PREDBLK1+64]<1>:ub DEC_Y(6)<32;16,2> {Compr} // Second 4 Y2 rows + mov (32) r[PPREDBUF_Y,0-PREDBLK1+96]<1>:ub DEC_Y(10)<32;16,2> {Compr} // Second 4 Y3 rows + +// All 4 sub-macroblock (containing 4 intra_8x8 blocks) have be constructed +// Save constructed Y picture + CALL(save_8x8_Y,1) // Save Intra_8x8 predicted luma data. +// +// Decode U/V blocks +// +// Note: The decoding for chroma blocks will be the same for all intra prediction mode +// + CALL(decode_Chroma_Intra,1) + +#ifdef SW_SCOREBOARD + #include "scoreboard_update.asm" +#endif + +// Terminate the thread +// + #include "EndIntraThread.asm" + +// End of Intra_8x8 diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/Intra_funcLib.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/Intra_funcLib.asm --- libva-1.0.1/i965_drv_video/shaders/h264/mc/Intra_funcLib.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/Intra_funcLib.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,42 @@ +/* + * Library of common modules shared among different intra prediction kernels + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Module name: Intra_funcLib.asm +// +// Library of common modules shared among different intra prediction kernels +// +// Note: Any sub-modules, if they are #included in more than one kernel, +// should be moved to this module. +// +#if defined(INTRA_16X16) +#undef INTRA_16X16 + #include "load_Intra_Ref_Y.asm" // Load intra Y reference data + #include "Decode_Chroma_Intra.asm" // Decode chroma blocks + #include "save_16x16_Y.asm" // Save to destination Y frame surface +#elif defined(INTRA_8X8) +#undef INTRA_8X8 + #include "load_Intra_Ref_Y.asm" // Load intra Y reference data + #include "Decode_Chroma_Intra.asm" // Decode chroma blocks + #include "intra_Pred_8x8_Y.asm" // Intra predict Intra_4x4 blocks + #include "save_8x8_Y.asm" // Save to destination Y frame surface +#elif defined(INTRA_4X4) +#undef INTRA_4X4 + #include "load_Intra_Ref_Y.asm" // Load intra Y reference data + #include "Decode_Chroma_Intra.asm" // Decode chroma blocks + #include "intra_Pred_4x4_Y_4.asm" // Intra predict Intra_4x4 blocks + #include "save_4x4_Y.asm" // Save to destination Y frame surface +#else // For all merged kernels +#endif + +#ifdef SW_SCOREBOARD + #include "scoreboard_start_intra.asm" // scorboard intra start function + #include "scoreboard_start_inter.asm" // scorboard inter start function +#endif // SW_SCOREBOARD + +// End of Intra_funcLib diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/intra_Header.inc libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/intra_Header.inc --- libva-1.0.1/i965_drv_video/shaders/h264/mc/intra_Header.inc 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/intra_Header.inc 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,276 @@ +/* + * Header file for all AVC intra prediction kernels + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +#if !defined(__INTRA_HEADER__) // Make sure this file is only included once +#define __INTRA_HEADER__ + +// Module name: intra_header.inc +// +// Header file for all AVC intra prediction kernels +// +// This header file defines everything that's specific to intra macroblock kernels + + +// ----------- Various data buffers and pointers ------------ +// +// I_PCM data buffer +// +#define I_PCM_BUF_Y 4 +#define I_PCM_BUF_UV 12 + +#define REG_I_PCM_BUF_Y r4 +#define REG_I_PCM_BUF_UV r12 + +.declare I_PCM_Y Base=REG_I_PCM_BUF_Y ElementSize=1 SrcRegion=REGION(16,1) Type=ub // 8-bit I_PCM Y data +.declare I_PCM_UV Base=REG_I_PCM_BUF_UV ElementSize=1 SrcRegion=REGION(16,1) Type=ub // 8-bit I_PCM U/V data + +// Intra macroblock error data blocks +// +#define ERRBUF 4 // Starting GRF index for error data +#define REG_ERRBUF r4 +.declare MBBLOCKW Base=REG_ERRBUF ElementSize=2 SrcRegion=REGION(16,1) Type=w // For 16-bit inter MB +.declare MBBLOCKD Base=REG_ERRBUF ElementSize=2 SrcRegion=REGION(16,1) Type=uw // For use in "send" command + +#define PERROR a0.2 // Pointer to macroblock error data +#define PERROR1 a0.3 // Pointer to macroblock error data used by instruction compression +#define PERROR_UD a0.1 // Pointer to macroblock error data in DWORD unit + +// Intra macroblock reference data +// +#define REG_INTRA_REF_TOP r49 // Must be an odd numbered GRF register +.declare INTRA_REF_TOP0 Base=REG_INTRA_REF_TOP ElementSize=1 SrcRegion=REGION(16,1) Type=ub +.declare INTRA_REF_TOP Base=REG_INTRA_REF_TOP.4 ElementSize=1 SrcRegion=REGION(16,1) Type=ub + // Actual top row reference data start at offset 4 in BYTE +.declare INTRA_REF_TOP_W Base=REG_INTRA_REF_TOP.2 ElementSize=2 SrcRegion=REGION(16,1) Type=uw + // Actual top row reference data start at offset 2 in WORD +.declare INTRA_REF_TOP_D Base=REG_INTRA_REF_TOP ElementSize=4 DstRegion=<1> Type=ud // Only used in "send" instruction + +#define INTRA_REF_LEFT_ID 50 +#define REG_INTRA_REF_LEFT r50 +.declare INTRA_REF_LEFT0 Base=REG_INTRA_REF_LEFT ElementSize=1 SrcRegion=REGION(8,4) Type=ub +.declare INTRA_REF_LEFT Base=REG_INTRA_REF_LEFT.3 ElementSize=1 SrcRegion=REGION(8,4) Type=ub + // Actual left column reference data are located at offset 3 in BYTE +.declare INTRA_REF_LEFT_UV Base=REG_INTRA_REF_LEFT.2 ElementSize=1 SrcRegion=REGION(8,4) Type=ub + // Actual left column U/V reference data are located at offset 2 in BYTE +.declare INTRA_REF_LEFT_W Base=REG_INTRA_REF_LEFT.1 ElementSize=2 SrcRegion=REGION(8,2) Type=uw + // Actual left column reference data are located at offset 1 in WORD +.declare INTRA_REF_LEFT_D Base=REG_INTRA_REF_LEFT ElementSize=4 DstRegion=<1> Type=ud // Only used in "send" instruction + +#define PREF_LEFT a0.4 // Pointer to left reference data +#define PREF_LEFT_UD a0.2 // Pointer in DWORD to left reference data + +#define INTRA_TEMP_0 52 +#define INTRA_TEMP_1 53 +#define INTRA_TEMP_2 54 +#define INTRA_TEMP_3 55 +#define INTRA_TEMP_4 56 +#define INTRA_TEMP_5 57 +#define INTRA_TEMP_6 58 + +#define REG_INTRA_TEMP_0 r52 +#define REG_INTRA_TEMP_1 r53 +#define REG_INTRA_TEMP_2 r54 +#define REG_INTRA_TEMP_3 r55 +#define REG_INTRA_TEMP_4 r56 +#define REG_INTRA_TEMP_5 r57 +#define REG_INTRA_TEMP_6 r58 +#define REG_INTRA_TEMP_7 r59 +#define REG_INTRA_TEMP_8 r60 + +// Destination registers for write commit +#define REG_WRITE_COMMIT_Y r60.0 +#define REG_WRITE_COMMIT_UV r61.0 + +// ----------- Various data buffers and pointers ------------ +// R32 - R47 for predicted picture buffer (for both Y and U/V blocks) +// +#define PREDBUF 32 // Starting GRF index for predicted buffer +#define REG_PREDBUF r32 + +.declare PRED_Y Base=REG_PREDBUF ElementSize=1 SrcRegion=REGION(16,1) Type=ub // Predicted Y picture +.declare PRED_YW Base=REG_PREDBUF ElementSize=2 SrcRegion=REGION(16,1) Type=uw // Predicted Y picture stored in WORD +.declare PRED_Y_FM Base=REG_PREDBUF ElementSize=1 SrcRegion=REGION(16,1) Type=ub // Predicted Y picture frame +.declare PRED_Y_TF Base=REG_PREDBUF ElementSize=1 SrcRegion=REGION(16,1) Type=ub // Predicted Y picture Top field + +.declare PRED_UV Base=REG_PREDBUF ElementSize=1 SrcRegion=REGION(16,1) Type=ub // Predicted U/V picture +.declare PRED_UVW Base=REG_PREDBUF ElementSize=2 SrcRegion=REGION(16,1) Type=uw // Predicted U/V picture stored in WORD +.declare PRED_UV_FM Base=REG_PREDBUF ElementSize=1 SrcRegion=REGION(16,1) Type=ub // Predicted U/V picture frame +.declare PRED_UV_TF Base=REG_PREDBUF ElementSize=1 SrcRegion=REGION(16,1) Type=ub // Predicted U/V picture top field +.declare PRED_UV_BF Base=REG_PREDBUF.16 ElementSize=1 SrcRegion=REGION(16,1) Type=ub // Predicted U/V picture bottom field + +// The same region will also be used as finally decoded Y blocks shared with U/V blocks +// +#define DECBUF 32 +#define REG_DECBUF r32 +.declare DEC_Y Base=REG_DECBUF ElementSize=1 SrcRegion=REGION(16,1) Type=ub // Decoded Y picture +.declare DEC_UV Base=REG_DECBUF ElementSize=1 SrcRegion=REGION(16,1) Type=ub // Decoded U/V P-/B-picture +.declare DEC_UD Base=REG_DECBUF ElementSize=4 SrcRegion=REGION(8,1) Type=ud // Decoded buffer in UD type + +// Reference buffer for intra_NxN prediction +// +#define PRED_MODE REG_INTRA_TEMP_0 +.declare REF_TOP0 Base=REG_INTRA_TEMP_5 ElementSize=1 SrcRegion=REGION(16,1) Type=ub +.declare REF_TOP Base=REG_INTRA_TEMP_5.4 ElementSize=1 SrcRegion=REGION(16,1) Type=ub + // Actual top reference data start from offset 3,i.e. p[-1,-1] +.declare REF_TOP_W Base=REG_INTRA_TEMP_5 ElementSize=2 SrcRegion=REGION(16,1) Type=uw +.declare REF_TOP_D Base=REG_INTRA_TEMP_5 ElementSize=4 SrcRegion=REGION(8,1) Type=ud +.declare REF_LEFT Base=REG_INTRA_TEMP_6 ElementSize=1 SrcRegion=REGION(16,1) Type=ub +.declare REF_LEFT_D Base=REG_INTRA_TEMP_6 ElementSize=4 SrcRegion=REGION(8,1) Type=ud + +// For intra prediction plane mode +// +.declare H1 Base=REG_INTRA_TEMP_0 ElementSize=2 SrcRegion=REGION(8,1) Type=w // Make sure it's an even GRF +.declare H2 Base=REG_INTRA_TEMP_0.8 ElementSize=2 SrcRegion=REGION(8,1) Type=w +.declare V1 Base=REG_INTRA_TEMP_1 ElementSize=2 SrcRegion=REGION(8,1) Type=w // Make sure it's the following odd GRF +.declare V2 Base=REG_INTRA_TEMP_1.8 ElementSize=2 SrcRegion=REGION(8,1) Type=w + +.declare CP Base=REG_INTRA_TEMP_2 ElementSize=2 SrcRegion=REGION(16,1) Type=w + +#define PINTRAPRED_Y a0.7 // Used as luma intra prediction mode pointer +#define PINTRAPRED_UV a0.7 // Used as chroma intra prediction mode pointer +#define PINTRA4X4_Y a0.4 // Used as luma intra_4x4 prediction mode pointer + +#define PBWDCOPY_4 a0.4 // a0.4 - a0.7 used in intra_4x4 prediction for moving data backward +#define PBWDCOPY_8 a0.6 // a0.6 - a0.7 used in intra_8x8 prediction for moving data backward + +// For Intra_4x4 prediction mode +// +.declare INTRA_4X4_MODE Base=REG_INTRA_TEMP_1 ElementSize=4 SrcRegion=REGION(1,0) DstRegion=<1> Type=d // Actually only need 1 DWORD + +// ----------- Intra CURBE constants ------------ +// +#define REG_CURBE1 r1 +#define REG_CURBE2 r2 +#define INTRA_4X4_OFFSET 1*GRFWIB // 9 Bytes +#define INTRA_8X8_OFFSET 1*GRFWIB+12 // 9 Bytes starting sub-register r1.3:ud +#define INTRA_16X16_OFFSET 1*GRFWIB+24 // 4 Bytes starting sub-register r1.6:ud +#define INTRA_CHROMA_OFFSET 1*GRFWIB+28 // 4 Bytes starting sub-register r1.7:ud + +#define TOP_REF_OFFSET REG_CURBE1.10 // r1.5:w + +// Constants used in plane intra prediction mode +#define XY_3 REG_CURBE2.4 // Stored BYTE constants x-3 for x=0...7, i.e. -3,-2,...3,4 for U/V, need duplicate to every other byte +#define XY_3_1 REG_CURBE2.5 // Stored BYTE constants x-3 for x=0...7, i.e. -3,-2,...3,4 for 2nd instruction in {Comp} +#define XY_7 REG_CURBE2.0 // Stored BYTE constants x-7 for x=0...15, i.e. -7,-6,...7,8 for Y +#define XY_7_1 REG_CURBE2.1 // Stored BYTE constants x-7 for x=0...15, i.e. -7,-6,...7,8 for 2nd instruction in {Comp} + +#define INV_SHIFT REG_CURBE2.16 + +#define INV_TRANS4 REG_CURBE2.20 // For reverse data transfer for intra_4x4 (0x00020406) +#define INV_TRANS48 REG_CURBE2.22 // For reverse data transfer for intra_4x4 (0x0002) +#define INV_TRANS8 REG_CURBE1.22 // For reverse data transfer for intra_8x8 (0x0001) + +#define INTRA_MODE REG_CURBE2.24 // Offset to intra_Pred_4x4_Y from each sub-block + +// ----------- In-line parameters ------------ +// +#define REG_INLINE r3 + +#define INLINE_DW0 REG_INLINE.0<0;1,0>:ud +#define INLINE_DW1 REG_INLINE.1<0;1,0>:ud +#define INLINE_DW2 REG_INLINE.2<0;1,0>:ud +#define INLINE_DW3 REG_INLINE.3<0;1,0>:ud +#define INLINE_DW4 REG_INLINE.4<0;1,0>:ud +#define INLINE_DW5 REG_INLINE.5<0;1,0>:ud +#define INLINE_DW6 REG_INLINE.6<0;1,0>:ud +#define INLINE_DW7 REG_INLINE.7<0;1,0>:ud + +// Intra macroblock in-line data +// +// In-line DWORD 0 +#define REG_MBAFF_FIELD REG_INLINE.1 // :uw, can be added directly to lower-word of MSGDSC +#define MBAFF_FIELD BIT26+BIT25 // Bits 26:25 - MBAFF field macroblock flag + // 00 = Current macroblock is not an MBAFF field macroblock + // 11 = Current macroblock is an MBAFF field macroblock + +#define REG_FIELD_PARITY INLINE_DW0 +#define FIELD_PARITY BIT24 // Bit 24 - Macroblock field parity flag + // 0 = Current field is a top field + // 1 = Current field is a bottom field + +#define REG_FIELD_MACROBLOCK_FLAG INLINE_DW0 +#define FIELD_MACROBLOCK_FLAG BIT14 // Bit 14 - Field macroblock flag + // 0 = Current macroblock is not a field macroblock + // 1 = Current macroblock is a field macroblock +#define REG_MACROBLOCK_TYPE INLINE_DW0 +#define MACROBLOCK_TYPE BIT12+BIT11+BIT10+BIT9+BIT8 // Bit 12:8 - Intra macroblock flag + +#define REG_CHROMA_FORMAT_IDC INLINE_DW0 +#define CHROMA_FORMAT_IDC BIT3+BIT2 // Bit 3:2 - Chroma format + // 00 = Luma only (Monochrome) + // 01 = YUV420 + // 10 = YUV422 + // 11 = YUV444 +#define REG_MBAFF_PIC INLINE_DW0 +#define MBAFF_PIC BIT1 // Bit 1 - MBAFF Frame picture + // 0 = Not an MBAFF frame picture + // 1 = An MBAFF frame picture +#define REG_INTRA_PRED_8X8_BLK2_AVAIL_FLAG INLINE_DW0 +#define INTRA_PRED_8X8_BLK2_AVAIL_FLAG BIT4 // Bit 4: Pixel available for block 2 in an intra_8x8 MB. + +// In-line DWORD 1 +#define ORIX REG_INLINE.4 // :ub, H. origin of the macroblock in macroblock unit +#define ORIY REG_INLINE.5 // :ub, V. origin of the macroblock in macroblock unit + +// In-line DWORD 2 +#define REG_CBPCYB REG_INLINE.9 // :ub, Coded block pattern +#define REG_CBPCY INLINE_DW2 // Bits 13:8 - Coded block pattern + // reflect Y0, Y1, Y2, Y3, Cb4, Cr5 + // Bit 13 - Y0 + // Bit 12 - Y1 + // Bit 11 - Y2 + // Bit 10 - Y3 + // Bit 9 - U4 + // Bit 8 - V5 +#define CBP_MASK 0x3F00:ud // Bit mask for all CBP bits +#define CBP_Y_MASK 0x3C00:ud // Bit mask for CBP Y bits +#define CBP_UV_MASK 0x0300:ud // Bit mask for CBP U/V bits + +#define CBP_Y0_MASK BIT13:ud // Bit mask for CBP Y0 bit +#define CBP_Y1_MASK BIT12:ud // Bit mask for CBP Y1 bit +#define CBP_Y2_MASK BIT11:ud // Bit mask for CBP Y2 bit +#define CBP_Y3_MASK BIT10:ud // Bit mask for CBP Y3 bit +#define CBP_U_MASK BIT9:ud // Bit mask for CBP U bit +#define CBP_V_MASK BIT8:ud // Bit mask for CBP V bit + +// In-line DWORD 3 +#define REG_INTRA_CHROMA_PRED_MODE REG_INLINE.12 // :ub - Intra chroma prediction mode +#define INTRA_CHROMA_PRED_MODE BIT7+BIT6 // Bit 7:6 - Intra chroma prediction mode + // 00 = Intra DC prediction + // 01 = Intra horizontal prediction + // 10 = Intra vertical prediction + // 11 = Intra plane prediction +#define INTRA_CHROMA_PRED_MODE_SHIFT 6 // Intra chroma prediction mode shift + +#define REG_INTRA_PRED_AVAIL_FLAG INLINE_DW3 +#define INTRA_PRED_AVAIL_FLAG BIT4+BIT3+BIT2+BIT1+BIT0 // Bits 4:0 - Intra prediction available flag + // Bit 0: Macroblock A (the left neighbor) entire or top half + // Bit 1: Macroblock B (the upper neighbor) + // Bit 2: Macroblock C (the above-right neighbor) + // Bit 3: Macroblock D (the above-left neighbor) + // Bit 4: Macroblock A (the left neighbor) bottom half + // Each bit is defined below + // 0 = The macroblock is not available for intra prediction + // 1 = The macroblock is available for intra prediction +#define INTRA_PRED_LEFT_TH_AVAIL_FLAG BIT0 // Bit 0: Macroblock A (the left neighbor) entire or top half +#define INTRA_PRED_UP_AVAIL_FLAG BIT1 // Bit 1: Macroblock B (the upper neighbor) +#define INTRA_PRED_UP_RIGHT_AVAIL_FLAG BIT2 // Bit 2: Macroblock C (the above-right neighbor) +#define INTRA_PRED_UP_LEFT_AVAIL_FLAG BIT3 // Bit 3: Macroblock D (the above-left neighbor) +#define INTRA_PRED_LEFT_BH_AVAIL_FLAG BIT4 // Bit 4: Macroblock A (the left neighbor) bottom half +//#define INTRA_PRED_8X8_BLK2_AVAIL_FLAG BIT5 // Bit 5: Pixel available for block 2 in an intra_8x8 MB. +#define REG_INTRA_PRED_AVAIL_FLAG_BYTE REG_INLINE.12 // Byte location of Intra_Pred_Avail_Flag +#define REG_INTRA_PRED_AVAIL_FLAG_WORD REG_INLINE.6 // Word location of Intra_Pred_Avail_Flag + + +.declare INTRA_PRED_MODE Base=REG_INLINE.16 ElementSize=1 SrcRegion=REGION(16,1) Type=ub // Intra prediction mode + +// End of intra_header.inc + +#endif // !defined(__INTRA_HEADER__) + diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/Intra_PCM.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/Intra_PCM.asm --- libva-1.0.1/i965_drv_video/shaders/h264/mc/Intra_PCM.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/Intra_PCM.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,56 @@ +/* + * Decode Intra_PCM macroblock + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Kernel name: Intra_PCM.asm +// +// Decoding of I_PCM macroblock +// +// $Revision: 8 $ +// $Date: 10/18/06 4:10p $ +// + +// ---------------------------------------------------- +// Main: Intra_PCM +// ---------------------------------------------------- + +.kernel Intra_PCM +INTRA_PCM: + +#ifdef _DEBUG +// WA for FULSIM so we'll know which kernel is being debugged +mov (1) acc0:ud 0x03aa55a5:ud +#endif + +#include "SetupForHWMC.asm" + +// Not actually needed here but just want to slow down the Intra-PCM to avoid race condition +// +#ifdef SW_SCOREBOARD + and (1) REG_INTRA_PRED_AVAIL_FLAG_WORD<1>:w REG_INTRA_PRED_AVAIL_FLAG_WORD<0;1,0>:w 0xffe0:w // Ensure all neighbor avail flags are "0" + CALL(scoreboard_start_intra,1) + wait n0:ud // Now wait for scoreboard to response +#endif + +// +// Decoding Y blocks +// +// In I_PCM mode, the samples are already arranged in raster scan order within the macroblock. +// We just need to save them to picture buffers +// + #include "save_I_PCM.asm" // Save to destination picture buffers + +#ifdef SW_SCOREBOARD + #include "scoreboard_update.asm" +#endif + +// Terminate the thread +// + #include "EndIntraThread.asm" + +// End of Intra_PCM diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/intra_pred_16x16_Y.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/intra_pred_16x16_Y.asm --- libva-1.0.1/i965_drv_video/shaders/h264/mc/intra_pred_16x16_Y.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/intra_pred_16x16_Y.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,111 @@ +/* + * Intra predict 16x16 luma block + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Module name: intra_Pred_16x16_Y.asm +// +// Intra predict 16x16 luma block +// + and (1) PINTRAPRED_Y<1>:w INTRA_PRED_MODE(0)REGION(1,0) 0x0F:w + // WA for "jmpi" restriction + mov (1) REG_INTRA_TEMP_1<1>:ud r[PINTRAPRED_Y, INTRA_16X16_OFFSET]:ub + jmpi (1) REG_INTRA_TEMP_1<0;1,0>:d + +// Mode 0 +INTRA_16x16_VERTICAL: + $for(0; <16; 2) { + mov (32) PRED_YW(%1)<1> INTRA_REF_TOP(0) {Compr} + } + jmpi (1) End_intra_Pred_16x16_Y + +// Mode 1 +INTRA_16x16_HORIZONTAL: + mov (1) PREF_LEFT_UD<1>:ud INTRA_REF_LEFT_ID*GRFWIB*0x00010001+0x00040000:ud // Set address registers for instruction compression + $for(0,0; <16; 2,8) { + mov (32) PRED_YW(%1)<1> r[PREF_LEFT,%2+3]<0;1,0>:ub {Compr} // Actual left column reference data start at offset 3 + } + jmpi (1) End_intra_Pred_16x16_Y + +// Mode 2 +INTRA_16x16_DC: + and.nz.f0.0 (8) NULLREG REG_INTRA_PRED_AVAIL_FLAG INTRA_PRED_UP_AVAIL_FLAG:ud // Top macroblock available for intra prediction? + and (8) acc0<1>:ud REG_INTRA_PRED_AVAIL_FLAG INTRA_PRED_LEFT_TH_AVAIL_FLAG+INTRA_PRED_LEFT_BH_AVAIL_FLAG:ud // Left macroblock available for intra prediction? + xor.z.f0.1 (8) NULLREG acc0:ud INTRA_PRED_LEFT_TH_AVAIL_FLAG+INTRA_PRED_LEFT_BH_AVAIL_FLAG:ud // Left macroblock available for intra prediction? +// Rearrange reference samples for unified DC prediction code +// + (-f0.0.any8h) mov (8) INTRA_REF_TOP_W(0)<1> 0x8080:uw + (-f0.1.any8h) mov (8) INTRA_REF_LEFT(0)<4> INTRA_REF_TOP(0)REGION(8,1) + (-f0.1.any8h) mov (8) INTRA_REF_LEFT(1)<4> INTRA_REF_TOP(0,8)REGION(8,1) + (-f0.0.any8h) mov (8) INTRA_REF_TOP(0)<1> INTRA_REF_LEFT(0)REGION(8,4) + (-f0.0.any8h) mov (8) INTRA_REF_TOP(0,8)<1> INTRA_REF_LEFT(1)REGION(8,4) // Split due to HW limitation +// Perform DC prediction +// + add (16) PRED_YW(15)<1> INTRA_REF_LEFT(0)REGION(8,4) INTRA_REF_TOP(0)REGION(16,1) + add (8) PRED_YW(15)<1> PRED_YW(15)REGION(8,1) PRED_YW(15,8)REGION(8,1) + add (4) PRED_YW(15)<1> PRED_YW(15)REGION(4,1) PRED_YW(15,4)REGION(4,1) + add (2) PRED_YW(15)<1> PRED_YW(15)REGION(2,1) PRED_YW(15,2)REGION(2,1) + add (32) acc0<1>:w PRED_YW(15)REGION(1,0) PRED_YW(15,1)REGION(1,0) {Compr} // Set up both acc0 and acc1 + add (32) acc0<1>:w acc0:w 16:w {Compr} + + $for(0; <16; 2) { + shr (32) PRED_YW(%1)<1> acc0:w 5:w {Compr} + } + jmpi (1) End_intra_Pred_16x16_Y + +// Mode 3 +INTRA_16x16_PLANE: +// Refer to H.264/AVC spec Section 8.3.3.4 + +#define A REG_INTRA_TEMP_2.0 // All are WORD type +#define B REG_INTRA_TEMP_3.0 +#define C REG_INTRA_TEMP_3.1 +#define YP REG_INTRA_TEMP_0 // Store intermediate results of c*(y-7). Make sure it's an even GRF +#define YP1 REG_INTRA_TEMP_1 // Store intermediate results of c*(y-7). Make sure it's an odd GRF, used in {Comp} +#define XP REG_INTRA_TEMP_5 // Store intermediate results of a+b*(x-7)+16. Make sure it's an odd GRF + +// First Calculate constants H and V +// H1 = sum((-x'-1)*p[8+x',-1]), x'=0,1,...7 +// H2 = sum((-x'-1)*p[6-x',-1]), x'=7,6,...0 +// H = -H1 + H2 +// The same calculation holds for V +// + mul (8) H1(0)<1> INTRA_REF_TOP(0,8)REGION(8,1) 0x89ABCDEF:v + mul (8) H2(0)<1> INTRA_REF_TOP(0,-1)REGION(8,1) 0xFEDCBA98:v + + mul (8) V1(0)<1> INTRA_REF_LEFT(0,8*4)REGION(8,4) 0x89ABCDEF:v + mul (8) V2(0)<1> INTRA_REF_LEFT(0)REGION(8,4) 0x0FEDCBA9:v + mul (1) V2(0,7)<1> INTRA_REF_TOP(0,-1)<0;1,0> -8:w // Replace 0*p[-1,7] with -8*p[-1,-1] + // Now, REG_INTRA_TEMP_0 holds [H2, -H1] and REG_INTRA_TEMP_1 holds [V2, -V1] + + // Sum up [H2, -H1] and [V2, -V1] using instruction compression + // ExecSize = 16 is restricted by B-spec for instruction compression + // Actual intermediate results are in lower sub-registers after each summing step + add (16) H1(0)<1> -H1(0) H2(0) {Compr} // Results in lower 8 WORDs + add (16) H1(0)<1> H1(0) H1(0,4) {Compr} // Results in lower 4 WORDs + add (16) H1(0)<1> H1(0) H1(0,2) {Compr} // Results in lower 2 WORDs + add (16) H1(0)<1> H1(0) H1(0,1) {Compr} // Results in lower 1 WORD + +// Calculate a, b, c and further derivations + mov (16) acc0<1>:w 32:w + mac (2) acc0<1>:w H1(0)<16;1,0> 5:w + shr (2) B<1>:w acc0:w 6:w // Done b,c + mov (16) acc0<1>:w 16:w + mac (16) acc0<1>:w INTRA_REF_TOP(0,15)<0;1,0> 16:w + mac (16) A<1>:w INTRA_REF_LEFT(0,15*4)<0;1,0> 16:w // A = a+16 + mac (16) XP<1>:w B<0;1,0>:w XY_7<16;16,1>:b // XP = A+b*(x-7) + mul (8) YP<1>:w C<0;1,0>:w XY_7<16;8,2>:b // YP = c*(y-7), even portion + mul (8) YP1<1>:w C<0;1,0>:w XY_7_1<16;8,2>:b // YP = c*(y-7), odd portion + +// Finally the intra_16x16 plane prediction + $for(0,0; <16; 2,1) { + add (32) acc0<1>:w XP<16;16,1>:w YP.%2<16;16,0>:w {Compr} // Set Width!= 1 to trick EU to use YP_1.%2 for 2nd instruction + shr.sat (32) PRED_Y(%1)<2> acc0<16;16,1>:w 5:w {Compr} + } + +End_intra_Pred_16x16_Y: +// End of intra_Pred_16x16_Y diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/intra_Pred_4x4_Y_4.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/intra_Pred_4x4_Y_4.asm --- libva-1.0.1/i965_drv_video/shaders/h264/mc/intra_Pred_4x4_Y_4.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/intra_Pred_4x4_Y_4.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,240 @@ +/* + * Intra predict 4 Intra_4x4 luma blocks + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +#if !defined(__INTRA_PRED_4X4_Y_4__) // Make sure this is only included once +#define __INTRA_PRED_4X4_Y_4__ + +// Module name: intra_Pred_4x4_Y_4.asm +// +// Intra predict 4 Intra_4x4 luma blocks +// +//-------------------------------------------------------------------------- +// Input data: +// +// REF_TOP: Top reference data stored in BYTE with p[-1,-1] at REF_TOP(0,-1) +// REF_LEFT: Left reference data stored in BYTE with p[-1,0] at REF_LEFT(0,0) +// PRED_MODE: Intra prediction mode stored in 4 words (4 LSB) +// REG_INTRA_PRED_AVAIL: Top/Left available flag, (Bit0: Left, Bit1: Top) +// +//-------------------------------------------------------------------------- + +#undef INTRA_PRED_AVAIL +#undef INTRA_REF +#undef REF_LEFT_BACK +#undef REF_TMP +#undef REF_TMP1 + +#define INTRA_PRED_AVAIL REG_INTRA_TEMP_2.8 +#define INTRA_REF REG_INTRA_TEMP_2 +#define REF_LEFT_BACK REG_INTRA_TEMP_8 +#define REF_TMP REG_INTRA_TEMP_3 +#define REF_TMP1 REG_INTRA_TEMP_4 + +intra_Pred_4x4_Y_4: + + mov (8) REF_LEFT_BACK<1>:ub REF_LEFT(0)REGION(8,1) // Store left referece data +// Set up pointers to each intra_4x4 prediction mode +// + and (4) PINTRA4X4_Y<1>:w PRED_MODE<4;4,1>:w 0x0F:w + add (4) INTRA_4X4_MODE(0) r[PINTRA4X4_Y, INTRA_4X4_OFFSET]<1,0>:ub INTRA_MODE<4;4,1>:ub + +// Sub-block 0 ***************** + mov (1) INTRA_PRED_AVAIL<1>:w REG_INTRA_PRED_AVAIL<0;1,0>:w // Top/Left neighbor available flags + CALL_1(INTRA_4X4_MODE(0),1) + +// Add error data to predicted intra data +ADD_ERROR_SB0: + add.sat (8) r[PPREDBUF_Y,PREDSUBBLK0]<2>:ub r[PERROR,ERRBLK0]<8;4,1>:w REG_INTRA_4X4_PRED<8;8,1>:w // Too bad indexed src can't + add.sat (8) r[PPREDBUF_Y,PREDSUBBLK0+16]<2>:ub r[PERROR,ERRBLK0+32]<8;4,1>:w REG_INTRA_4X4_PRED.8<8;8,1>:w // cross 2 GRFs + +// Sub-block 1 ***************** + mov (16) REF_TOP0(0)<1> REF_TOP0(0,4)REGION(8,1) // Top reference data + mov (4) REF_LEFT(0)<1> r[PPREDBUF_Y,PREDSUBBLK0+6]<8;1,0>:ub // New left referece data from sub-block 0 + or (1) INTRA_PRED_AVAIL<1>:w REG_INTRA_PRED_AVAIL<0;1,0>:w 1:w // Left neighbor is available + CALL_1(INTRA_4X4_MODE(0,1),1) + +// Add error data to predicted intra data +ADD_ERROR_SB1: + add.sat (8) r[PPREDBUF_Y,PREDSUBBLK1]<2>:ub r[PERROR,ERRBLK1]<8;4,1>:w REG_INTRA_4X4_PRED<8;8,1>:w // Too bad indexed src can't + add.sat (8) r[PPREDBUF_Y,PREDSUBBLK1+16]<2>:ub r[PERROR,ERRBLK1+32]<8;4,1>:w REG_INTRA_4X4_PRED.8<8;8,1>:w // cross 2 GRFs + +// Sub-block 2 ***************** + mov (1) REF_TOP0(0,3)<1> REF_LEFT_BACK.3<0;1,0>:ub // Top-left reference data from stored left referece data + mov (4) REF_TOP0(0,4)<1> r[PPREDBUF_Y,PREDSUBBLK0+24]REGION(4,2):ub // Top reference data + mov (4) REF_TOP0(0,8)<1> r[PPREDBUF_Y,PREDSUBBLK0+24+32]REGION(4,2):ub // Too bad indexed src can't cross 2 GRFs + mov (4) REF_TOP0(0,12)<1> r[PPREDBUF_Y,PREDSUBBLK0+30+32]REGION(1,0):ub // Extended top-right reference data + mov (4) REF_LEFT(0)<1> REF_LEFT_BACK.4<4;4,1>:ub // From stored left referece data + or (1) INTRA_PRED_AVAIL<1>:w REG_INTRA_PRED_AVAIL<0;1,0>:w 2:w // Top neighbor is available + CALL_1(INTRA_4X4_MODE(0,2),1) + +// Add error data to predicted intra data +ADD_ERROR_SB2: + add.sat (8) r[PPREDBUF_Y,PREDSUBBLK2]<2>:ub r[PERROR,ERRBLK2]<8;4,1>:w REG_INTRA_4X4_PRED<8;8,1>:w // Too bad indexed src can't + add.sat (8) r[PPREDBUF_Y,PREDSUBBLK2+16]<2>:ub r[PERROR,ERRBLK2+32]<8;4,1>:w REG_INTRA_4X4_PRED.8<8;8,1>:w // cross 2 GRFs + +// Sub-block 3 ***************** + mov (16) REF_TOP0(0)<1> REF_TOP0(0,4)REGION(8,1) // Top reference data + mov (8) REF_TOP0(0,8)<1> REF_TOP0(0,7)<0;1,0> // Extended top-right reference data + mov (4) REF_LEFT(0)<1> r[PPREDBUF_Y,PREDSUBBLK2+6]<8;1,0>:ub // Left referece data from sub-block 0 + or (1) INTRA_PRED_AVAIL<1>:w REG_INTRA_PRED_AVAIL<0;1,0>:w 3:w // Top/Left neighbor are available + CALL_1(INTRA_4X4_MODE(0,3),1) + +// Add error data to predicted intra data +ADD_ERROR_SB3: + add.sat (8) r[PPREDBUF_Y,PREDSUBBLK3]<2>:ub r[PERROR,ERRBLK3]<8;4,1>:w REG_INTRA_4X4_PRED<8;8,1>:w // Too bad indexed src can't + add.sat (8) r[PPREDBUF_Y,PREDSUBBLK3+16]<2>:ub r[PERROR,ERRBLK3+32]<8;4,1>:w REG_INTRA_4X4_PRED.8<8;8,1>:w // cross 2 GRFs + + RETURN + +//-------------------------------------------------------------------------- +// Actual module that performs Intra_4x4 prediction and construction +// +// REF_TOP: Top reference data stored in BYTE with p[-1,-1] at REF_TOP(0,-1) +// REF_LEFT: Left reference data stored in BYTE with p[-1,0] at REF_LEFT(0,0) +// PINTRA4X4_Y: Intra prediction mode +// INTRA_PRED_AVAIL: Top/Left available flag, (Bit0: Left, Bit1: Top) +// +// Output data: +// +// REG_INTRA_4X4_PRED: Predicted 4x4 block data stored in 1 GRF register +//-------------------------------------------------------------------------- +intra_Pred_4x4_Y: +// Mode 0 +INTRA_4X4_VERTICAL: + mov (16) REG_INTRA_4X4_PRED<1>:w REF_TOP(0)<0;4,1> + RETURN_1 + +// Mode 1 +INTRA_4X4_HORIZONTAL: + mov (16) REG_INTRA_4X4_PRED<1>:w REF_LEFT(0)<1;4,0> + RETURN_1 + +// Mode 2 +INTRA_4X4_DC: +// Rearrange reference samples for unified DC prediction code +// + and.nz.f0.0 (16) NULLREG INTRA_PRED_AVAIL<0;1,0>:w 2:w {Compr} + and.nz.f0.1 (16) NULLREG INTRA_PRED_AVAIL<0;1,0>:w 1:w {Compr} + (-f0.0.any16h) mov (16) REF_TOP_W(0)<1> 0x8080:uw // Top macroblock not available for intra prediction + (-f0.1.any8h) mov (8) REF_LEFT(0)<1> REF_TOP(0)REGION(8,1) // Left macroblock not available for intra prediction + (-f0.0.any8h) mov (8) REF_TOP(0)<1> REF_LEFT(0)REGION(8,1) // Top macroblock not available for intra prediction +// Perform DC prediction +// + add (4) PRED_YW(15)<1> REF_TOP(0)REGION(4,1) REF_LEFT(0)REGION(4,1) + add (2) PRED_YW(15)<1> PRED_YW(15)REGION(2,1) PRED_YW(15,2)REGION(2,1) + add (16) acc0<1>:w PRED_YW(15)REGION(1,0) PRED_YW(15,1)REGION(1,0) + add (16) acc0<1>:w acc0:w 4:w + shr (16) REG_INTRA_4X4_PRED<1>:w acc0:w 3:w + RETURN_1 + +// Mode 3 +INTRA_4X4_DIAG_DOWN_LEFT: + mov (8) INTRA_REF<1>:ub REF_TOP(0)REGION(8,1) // Keep REF_TOP untouched for future use + mov (4) INTRA_REF.8<1>:ub REF_TOP(0,7)REGION(4,1) // p[8,-1] = p[7,-1] + add (8) acc0<1>:w INTRA_REF.2<8;8,1> 2:w // p[x+2]+2 + mac (8) acc0<1>:w INTRA_REF.1<8;8,1> 2:w // 2*p[x+1]+p[x+2]+2 + mac (8) PRED_YW(15)<1> INTRA_REF.0<8;8,1> 1:w // p[x]+2*p[x+1]+p[x+2]+2 + + shr (16) REG_INTRA_4X4_PRED<1>:w PRED_YW(15)<1;4,1> 2:w // (p[x]+2*p[x+1]+p[x+2]+2)>>2 + RETURN_1 + +// Mode 4 +INTRA_4X4_DIAG_DOWN_RIGHT: + +// Set inverse shift count + shl (4) REF_TMP<1>:ud REF_LEFT_D(0)REGION(1,0) INV_SHIFT<4;4,1>:b + mov (8) INTRA_REF.4<1>:ub REF_TOP(0,-1)REGION(8,1) // INTRA_REF holds all reference data + mov (4) INTRA_REF<1>:ub REF_TMP.3<16;4,4>:ub + + add (8) acc0<1>:w INTRA_REF.2<8;8,1>:ub 2:w // p[x+2]+2 + mac (8) acc0<1>:w INTRA_REF.1<8;8,1>:ub 2:w // 2*p[x+1]+p[x+2]+2 + mac (8) INTRA_REF<1>:w INTRA_REF<8;8,1>:ub 1:w // p[x]+2*p[x+1]+p[x+2]+2 + +// Store data in reversed order + add (4) PBWDCOPY_4<1>:w INV_TRANS4<4;4,1>:b INTRA_TEMP_2*GRFWIB:w // Must match with INTRA_REF + shr (16) REG_INTRA_4X4_PRED<1>:w r[PBWDCOPY_4]<4,1>:w 2:w + RETURN_1 + +// Mode 5 +INTRA_4X4_VERT_RIGHT: + +// Set inverse shift count + shl (4) REF_TMP<1>:ud REF_LEFT_D(0)REGION(1,0) INV_SHIFT<4;4,1>:b + mov (8) INTRA_REF.4<1>:ub REF_TOP(0,-1)REGION(8,1) // INTRA_REF holds all reference data + mov (4) INTRA_REF<1>:ub REF_TMP.3<16;4,4>:ub + + // Even rows + avg (8) PRED_YW(14)<1> INTRA_REF.4<8;8,1> INTRA_REF.5<8;8,1> // avg(p[x-1],p[x]) + // Odd rows + add (8) acc0<1>:w INTRA_REF.3<8;8,1>:ub 2:w // p[x]+2 + mac (8) acc0<1>:w INTRA_REF.2<8;8,1>:ub 2:w // 2*p[x-1]+p[x]+2 + mac (8) acc0<1>:w INTRA_REF.1<8;8,1>:ub 1:w // p[x-2]+2*p[x-1]+p[x]+2 + shr (8) INTRA_REF<1>:w acc0:w 2:w // (p[x-2]+2*p[x-1]+p[x]+2)>>2 + + mov (4) INTRA_REF.2<2>:w INTRA_REF.2<4;4,1>:w // Keep zVR = -2,-3 unchanged + mov (4) INTRA_REF.3<2>:w PRED_YW(14)REGION(4,1) // Combining even rows + + add (4) PBWDCOPY_4<1>:w INV_TRANS4<4;4,1>:b INTRA_TEMP_2*GRFWIB:w // Must match with INTRA_REF + mov (16) REG_INTRA_4X4_PRED<1>:w r[PBWDCOPY_4]<4,2>:w + RETURN_1 + +// Mode 6 +INTRA_4X4_HOR_DOWN: +// Set inverse shift count + shl (4) REF_TMP<1>:ud REF_LEFT_D(0)REGION(1,0) INV_SHIFT<4;4,1>:b + mov (8) INTRA_REF.4<1>:ub REF_TOP(0,-1)REGION(8,1) // INTRA_REF holds all reference data + mov (4) INTRA_REF<1>:ub REF_TMP.3<16;4,4>:ub + + // Even pixels + avg (8) PRED_YW(14)<1> INTRA_REF<8;8,1> INTRA_REF.1<8;8,1> // avg(p[y-1],p[y]) + // Odd pixels + add (8) acc0<1>:w INTRA_REF.2<8;8,1>:ub 2:w // p[y]+2 + mac (8) acc0<1>:w INTRA_REF.1<8;8,1>:ub 2:w // 2*p[y-1]+p[y]+2 + mac (8) REF_TMP<1>:w INTRA_REF.0<8;8,1>:ub 1:w // p[y-2]+2*p[y-1]+p[y]+2 + shr (4) INTRA_REF.1<2>:w REF_TMP<4;4,1>:w 2:w // (p[y-2]+2*p[y-1]+p[y]+2)>>2 + + shr (2) INTRA_REF.8<1>:w REF_TMP.4<2;2,1>:w 2:w // Keep zVR = -2,-3 unchanged + mov (4) INTRA_REF.0<2>:w PRED_YW(14)REGION(4,1) // Combining even pixels + + shl (4) PBWDCOPY_4<1>:w INV_TRANS4<4;4,1>:b 1:w // Convert to WORD offset + add (4) PBWDCOPY_4<1>:w PBWDCOPY_4<4;4,1>:w INTRA_TEMP_2*GRFWIB:w // Must match with INTRA_REF + mov (16) REG_INTRA_4X4_PRED<1>:w r[PBWDCOPY_4]<4,1>:w + RETURN_1 + +// Mode 7 +INTRA_4X4_VERT_LEFT: + // Even rows + avg (8) PRED_YW(14)<2> REF_TOP(0)REGION(8,1) REF_TOP(0,1)REGION(8,1) // avg(p[x],p[x+1]) + // Odd rows + add (8) acc0<1>:w REF_TOP(0,2)REGION(8,1) 2:w // p[x+2]+2 + mac (8) acc0<1>:w REF_TOP(0,1)REGION(8,1) 2:w // 2*p[x+1]+p[x+2]+2 + mac (8) PRED_YW(15)<1> REF_TOP(0)REGION(8,1) 1:w // p[x]+2*p[x+1]+p[x+2]+2 + shr (8) PRED_YW(14,1)<2> PRED_YW(15)REGION(8,1) 2:w + + mov (16) REG_INTRA_4X4_PRED<1>:w PRED_YW(14)<1;4,2> + RETURN_1 + +// Mode 8 +INTRA_4X4_HOR_UP: +// Set extra left reference pixels for unified prediction + mov (8) REF_LEFT(0,4)<1> REF_LEFT(0,3)REGION(1,0) // Copy p[-1,3] to p[-1,y],y=4...7 + // Even pixels + avg (8) PRED_YW(14)<2> REF_LEFT(0)REGION(8,1) REF_LEFT(0,1)REGION(8,1) // avg(p[y],p[y+1]) + // Odd pixels + add (8) acc0<1>:w REF_LEFT(0,2)REGION(8,1) 2:w // p[y+2]+2 + mac (8) acc0<1>:w REF_LEFT(0,1)REGION(8,1) 2:w // 2*p[y+1]+p[y+2]+2 + mac (8) PRED_YW(15)<1> REF_LEFT(0)REGION(8,1) 1:w // p[y]+2*p[y+1]+p[y+2]+2 + shr (8) PRED_YW(14,1)<2> PRED_YW(15)REGION(8,1) 2:w // (p[y]+2*p[y+1]+p[y+2]+2)>>2 + + mov (16) REG_INTRA_4X4_PRED<1>:w PRED_YW(14)<2;4,1> + RETURN_1 + +// End of intra_Pred_4x4_Y_4 + +#endif // !defined(__INTRA_PRED_4X4_Y_4__) diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/intra_Pred_8x8_Y.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/intra_Pred_8x8_Y.asm --- libva-1.0.1/i965_drv_video/shaders/h264/mc/intra_Pred_8x8_Y.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/intra_Pred_8x8_Y.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,246 @@ +/* + * Intra predict 8X8 luma block + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +#if !defined(__INTRA_PRED_8X8_Y__) // Make sure this is only included once +#define __INTRA_PRED_8X8_Y__ + +// Module name: intra_Pred_8X8_Y.asm +// +// Intra predict 8X8 luma block +// +//-------------------------------------------------------------------------- +// Input data: +// +// REF_TOP: Top reference data stored in BYTE with p[-1,-1] at REF_TOP(0,-1), p[-1,-1] and [15,-1] adjusted +// REF_LEFT: Left reference data stored in BYTE with p[-1,0] at REF_LEFT(0,2), REF_LEFT(0,1) (p[-1,-1]) adjusted +// PRED_MODE: Intra prediction mode stored in 4 LSBs +// INTRA_PRED_AVAIL: Top/Left available flag, (Bit0: Left, Bit1: Top) +// +// Output data: +// +// REG_INTRA_8X8_PRED: Predicted 8X8 block data +//-------------------------------------------------------------------------- + +#define INTRA_REF REG_INTRA_TEMP_1 +#define REF_TMP REG_INTRA_TEMP_2 + +intra_Pred_8x8_Y: + +// Reference sample filtering +// + // Set up boundary pixels for unified filtering + mov (1) REF_TOP(0,16)<1> REF_TOP(0,15)REGION(1,0) // p[16,-1] = p[15,-1] + mov (8) REF_LEFT(0,2+8)<1> REF_LEFT(0,2+7)REGION(1,0) // p[-1,8] = p[-1,7] + + // Top reference sample filtering (!!Consider instruction compression later) + add (16) acc0<1>:w REF_TOP(0,-1)REGION(16,1) 2:w // p[x-1,-1]+2 + mac (16) acc0<1>:w REF_TOP(0)REGION(16,1) 2:w // p[x-1,-1]+2*p[x,-1]+2 + mac (16) acc0<1>:w REF_TOP(0,1)REGION(16,1) 1:w // p[x-1,-1]+2*p[x,-1]+p[x+1,-1]+2 + shr (16) REF_TMP<1>:w acc0:w 2:w // (p[x-1,-1]+2*p[x,-1]+p[x+1,-1]+2)>>2 + + // Left reference sample filtering + add (16) acc0<1>:w REF_LEFT(0)REGION(16,1) 2:w // p[-1,y-1]+2 + mac (16) acc0<1>:w REF_LEFT(0,1)REGION(16,1) 2:w // p[-1,y-1]+2*p[-1,y]+2 + mac (16) acc0<1>:w REF_LEFT(0,2)REGION(16,1) 1:w // p[-1,y-1]+2*p[-1,y]+p[-1,y+1]+2 + shr (16) INTRA_REF<1>:w acc0:w 2:w // (p[-1,y-1]+2*p[-1,y]+p[-1,y+1]+2)>>2 + + // Re-assign filtered reference samples + mov (16) REF_TOP(0)<1> REF_TMP<32;16,2>:ub // p'[x,-1], x=0...15 + mov (8) REF_LEFT(0)<1> INTRA_REF.2<16;8,2>:ub // p'[-1,y], y=0...7 + mov (1) REF_TOP(0,-1)<1> INTRA_REF<0;1,0>:ub // p'[-1,-1] + +// Select intra_8x8 prediction mode +// + and (1) PINTRAPRED_Y<1>:w PRED_MODE<0;1,0>:w 0x0F:w + // WA for "jmpi" restriction + mov (1) REG_INTRA_TEMP_1<1>:ud r[PINTRAPRED_Y, INTRA_8X8_OFFSET]:ub + jmpi (1) REG_INTRA_TEMP_1<0;1,0>:d + +// Mode 0 +#define PTMP a0.6 +#define PTMP_D a0.3 +INTRA_8X8_VERTICAL: + $for(0,0; <4; 1,32) { + add.sat (16) r[PPREDBUF_Y,%2]<2>:ub r[PERROR,%2]<16;16,1>:w REF_TOP(0)<0;8,1> + } + RETURN + +// Mode 1 +INTRA_8X8_HORIZONTAL: + $for(0,0; <8; 2,32) { + add.sat (16) r[PPREDBUF_Y,%2]<2>:ub r[PERROR,%2]<16;16,1>:w REF_LEFT(0,%1)<1;8,0> + } + RETURN + +// Mode 2 +INTRA_8X8_DC: +// Rearrange reference samples for unified DC prediction code +// + and.nz.f0.0 (16) NULLREG INTRA_PRED_AVAIL<0;1,0>:w 2:w // Top macroblock available for intra prediction? + and.nz.f0.1 (8) NULLREG INTRA_PRED_AVAIL<0;1,0>:w 1:w // Left macroblock available for intra prediction? + (-f0.0.any16h) mov (16) REF_TOP_W(0)<1> 0x8080:uw + (-f0.1.any8h) mov (8) REF_LEFT(0)<1> REF_TOP(0)REGION(8,1) + (-f0.0.any8h) mov (8) REF_TOP(0)<1> REF_LEFT(0)REGION(8,1) + +// Perform DC prediction +// + add (8) PRED_YW(15)<1> REF_TOP(0)REGION(8,1) REF_LEFT(0)REGION(8,1) + add (4) PRED_YW(15)<1> PRED_YW(15)REGION(4,1) PRED_YW(15,4)REGION(4,1) + add (2) PRED_YW(15)<1> PRED_YW(15)REGION(2,1) PRED_YW(15,2)REGION(2,1) + add (16) acc0<1>:w PRED_YW(15)REGION(1,0) PRED_YW(15,1)REGION(1,0) + add (16) acc0<1>:w acc0:w 8:w + shr (16) REG_INTRA_TEMP_0<1>:w acc0:w 4:w + + // Add error block + $for(0,0; <4; 1,32) { + add.sat (16) r[PPREDBUF_Y,%2]<2>:ub r[PERROR,%2]<16;16,1>:w REG_INTRA_TEMP_0<16;16,1>:w + } + RETURN + +// Mode 3 +INTRA_8X8_DIAG_DOWN_LEFT: + mov (8) REF_TOP(0,16)<1> REF_TOP(0,15)REGION(8,1) // p[16,-1] = p[15,-1] + add (16) acc0<1>:w REF_TOP(0,2)REGION(16,1) 2:w // p[x+2]+2 + mac (16) acc0<1>:w REF_TOP(0,1)REGION(16,1) 2:w // 2*p[x+1]+p[x+2]+2 + mac (16) acc0<1>:w REF_TOP(0)REGION(16,1) 1:w // p[x]+2*p[x+1]+p[x+2]+2 + shr (16) REG_INTRA_TEMP_0<1>:w acc0<16;16,1>:w 2:w // (p[x]+2*p[x+1]+p[x+2]+2)>>2 + + // Add error block + $for(0,0; <8; 2,32) { + add.sat (16) r[PPREDBUF_Y,%2]<2>:ub r[PERROR,%2]<16;16,1>:w REG_INTRA_TEMP_0.%1<1;8,1>:w + } + RETURN + +// Mode 4 +INTRA_8X8_DIAG_DOWN_RIGHT: +#define INTRA_REF REG_INTRA_TEMP_1 +#define REF_TMP REG_INTRA_TEMP_2 + +// Set inverse shift count + shl (4) REF_TMP<1>:ud REF_LEFT_D(0,1)REGION(1,0) INV_SHIFT<4;4,1>:b // Reverse order bottom 4 pixels of left ref. + shl (4) REF_TMP.4<1>:ud REF_LEFT_D(0)REGION(1,0) INV_SHIFT<4;4,1>:b // Reverse order top 4 pixels of left ref. + mov (8) INTRA_REF<1>:ub REF_TMP.3<32;8,4>:ub + mov (16) INTRA_REF.8<1>:ub REF_TOP(0,-1)REGION(16,1) // INTRA_REF holds all reference data + + add (16) acc0<1>:w INTRA_REF.2<16;16,1>:ub 2:w // p[x+2]+2 + mac (16) acc0<1>:w INTRA_REF.1<16;16,1>:ub 2:w // 2*p[x+1]+p[x+2]+2 + mac (16) acc0<1>:w INTRA_REF<16;16,1>:ub 1:w // p[x]+2*p[x+1]+p[x+2]+2 + shr (16) INTRA_REF<1>:w acc0<16;16,1>:w 2:w // (p[x]+2*p[x+1]+p[x+2]+2)>>2 + +// Store data in reversed order + add (2) PBWDCOPY_8<1>:w INV_TRANS48<2;2,1>:b INTRA_TEMP_1*GRFWIB:w // Must match with INTRA_REF + + // Add error block + $for(0,96; <8; 2,-32) { + add.sat (16) r[PPREDBUF_Y,%2]<2>:ub r[PBWDCOPY_8,%1*2]<8,1>:w r[PERROR,%2]<16;16,1>:w + } + RETURN + +// Mode 5 +INTRA_8X8_VERT_RIGHT: +#define INTRA_REF REG_INTRA_TEMP_1 +#define REF_TMP REG_INTRA_TEMP_2 +#define REF_TMP1 REG_INTRA_TEMP_3 + +// Set inverse shift count + shl (4) REF_TMP<1>:ud REF_LEFT_D(0,1)REGION(1,0) INV_SHIFT<4;4,1>:b // Reverse order bottom 4 pixels of left ref. + shl (4) REF_TMP.4<1>:ud REF_LEFT_D(0)REGION(1,0) INV_SHIFT<4;4,1>:b // Reverse order top 4 pixels of left ref. + mov (8) INTRA_REF<1>:ub REF_TMP.3<32;8,4>:ub + mov (16) INTRA_REF.8<1>:ub REF_TOP(0,-1)REGION(16,1) // INTRA_REF holds all reference data + + // Even rows + avg (16) PRED_YW(14)<1> INTRA_REF.8<16;16,1> INTRA_REF.9<16;16,1> // avg(p[x-1],p[x]) + // Odd rows + add (16) acc0<1>:w INTRA_REF.3<16;16,1>:ub 2:w // p[x]+2 + mac (16) acc0<1>:w INTRA_REF.2<16;16,1>:ub 2:w // 2*p[x-1]+p[x]+2 + mac (16) acc0<1>:w INTRA_REF.1<16;16,1>:ub 1:w // p[x-2]+2*p[x-1]+p[x]+2 + shr (16) REF_TMP<1>:w acc0:w 2:w // (p[x-2]+2*p[x-1]+p[x]+2)>>2 + + mov (8) INTRA_REF<1>:ub REF_TMP<16;8,2>:ub // Keep zVR = -1,-2,-3,-4,-5,-6,-7 sequencially + mov (8) INTRA_REF.6<2>:ub REF_TMP.12<16;8,2>:ub // Keep zVR = -1,1,3,5,7,9,11,13 at even byte + mov (8) INTRA_REF.7<2>:ub PRED_Y(14)REGION(8,2) // Combining zVR = 0,2,4,6,8,10,12,14 at odd byte + + add (2) PBWDCOPY_8<1>:w INV_TRANS8<2;2,1>:b INTRA_TEMP_1*GRFWIB:w // Must match with INTRA_REF + + // Add error block + $for(0,96; <8; 2,-32) { + add.sat (16) r[PPREDBUF_Y,%2]<2>:ub r[PBWDCOPY_8,%1]<8,2>:ub r[PERROR,%2]<16;16,1>:w + } + RETURN + +// Mode 6 +INTRA_8X8_HOR_DOWN: +// Set inverse shift count + shl (4) REF_TMP<1>:ud REF_LEFT_D(0,1)REGION(1,0) INV_SHIFT<4;4,1>:b // Reverse order bottom 4 pixels of left ref. + shl (4) REF_TMP.4<1>:ud REF_LEFT_D(0)REGION(1,0) INV_SHIFT<4;4,1>:b // Reverse order top 4 pixels of left ref. + mov (8) INTRA_REF<1>:ub REF_TMP.3<16;4,4>:ub + mov (16) INTRA_REF.8<1>:ub REF_TOP(0,-1)REGION(16,1) // INTRA_REF holds all reference data + + // Odd pixels + add (16) acc0<1>:w INTRA_REF.2<16;16,1>:ub 2:w // p[y]+2 + mac (16) acc0<1>:w INTRA_REF.1<16;16,1>:ub 2:w // 2*p[y-1]+p[y]+2 + mac (16) acc0<1>:w INTRA_REF.0<16;16,1>:ub 1:w // p[y-2]+2*p[y-1]+p[y]+2 + shr (16) PRED_YW(14)<1> acc0:w 2:w // (p[y-2]+2*p[y-1]+p[y]+2)>>2 + // Even pixels + avg (16) INTRA_REF<1>:w INTRA_REF<16;16,1>:ub INTRA_REF.1<16;16,1>:ub // avg(p[y-1],p[y]) + + mov (8) INTRA_REF.1<2>:ub PRED_Y(14)REGION(8,2) // Combining odd pixels to form byte type + mov (8) INTRA_REF.16<1>:ub PRED_Y(14,16)REGION(8,2) // Keep zVR = -2,-3,-4,-5,-6,-7 unchanged + // Now INTRA_REF.0 - INTRA_REF.21 contain predicted data + + add (2) PBWDCOPY_8<1>:w INV_TRANS48<2;2,1>:b INTRA_TEMP_1*GRFWIB:w // Must match with INTRA_REF + + // Add error block + $for(0,96; <13; 4,-32) { + add.sat (16) r[PPREDBUF_Y,%2]<2>:ub r[PBWDCOPY_8,%1]<8,1>:ub r[PERROR,%2]<16;16,1>:w + } + RETURN + +// Mode 7 +INTRA_8X8_VERT_LEFT: + // Even rows + avg (16) PRED_YW(14)<1> REF_TOP(0)REGION(16,1) REF_TOP(0,1)REGION(16,1) // avg(p[x],p[x+1]) + // Odd rows + add (16) acc0<1>:w REF_TOP(0,2)REGION(16,1) 2:w // p[x+2]+2 + mac (16) acc0<1>:w REF_TOP(0,1)REGION(16,1) 2:w // 2*p[x+1]+p[x+2]+2 + mac (16) acc0<1>:w REF_TOP(0)REGION(16,1) 1:w // p[x]+2*p[x+1]+p[x+2]+2 + shr (16) PRED_YW(15)<1> acc0<1;8,1>:w 2:w // (p[x]+2*p[x+1]+p[x+2]+2)>>2 + + // Add error block + $for(0,0; <4; 1,32) { + add.sat (16) r[PPREDBUF_Y,%2]<2>:ub PRED_YW(14,%1)<16;8,1> r[PERROR,%2]<16;16,1>:w + } + RETURN + +// Mode 8 +INTRA_8X8_HOR_UP: +// Set extra left reference pixels for unified prediction + mov (8) REF_LEFT(0,8)<1> REF_LEFT(0,7)REGION(1,0) // Copy p[-1,7] to p[-1,y],y=8...15 + + // Even pixels + avg (16) PRED_YW(14)<1> REF_LEFT(0)REGION(16,1) REF_LEFT(0,1)REGION(16,1) // avg(p[y],p[y+1]) + // Odd pixels + add (16) acc0<1>:w REF_LEFT(0,2)REGION(16,1) 2:w // p[y+2]+2 + mac (16) acc0<1>:w REF_LEFT(0,1)REGION(16,1) 2:w // 2*p[y+1]+p[y+2]+2 + mac (16) acc0<1>:w REF_LEFT(0)REGION(16,1) 1:w // p[y]+2*p[y+1]+p[y+2]+2 + shr (16) PRED_YW(15)<1> acc0<1;8,1>:w 2:w // (p[y]+2*p[y+1]+p[y+2]+2)>>2 + + // Merge even/odd pixels + // The predicted data need to be stored in byte type (22 bytes are required) + mov (16) PRED_Y(14,1)<2> PRED_Y(15)REGION(16,2) + + // Add error block + $for(0,0; <4; 1,32) { + add.sat (16) r[PPREDBUF_Y,%2]<2>:ub PRED_Y(14,%1*4)<2;8,1> r[PERROR,%2]<16;16,1>:w + } + RETURN + +// End of intra_Pred_8X8_Y + +#endif // !defined(__INTRA_PRED_8X8_Y__) diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/intra_Pred_Chroma.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/intra_Pred_Chroma.asm --- libva-1.0.1/i965_drv_video/shaders/h264/mc/intra_Pred_Chroma.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/intra_Pred_Chroma.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,155 @@ +/* + * Intra predict 8x8 chroma block + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +#if !defined(__INTRA_PRED_CHROMA__) // Make sure this is only included once +#define __INTRA_PRED_CHROMA__ + +// Module name: intra_Pred_Chroma.asm +// +// Intra predict 8x8 chroma block +// + + shr (1) PINTRAPRED_UV<1>:w REG_INTRA_CHROMA_PRED_MODE<0;1,0>:ub INTRA_CHROMA_PRED_MODE_SHIFT:w // Bits 1:0 = intra chroma pred mode + // WA for "jmpi" restriction + mov (1) REG_INTRA_TEMP_1<1>:d r[PINTRAPRED_UV, INTRA_CHROMA_OFFSET]:b + jmpi (1) REG_INTRA_TEMP_1<0;1,0>:d + +// Mode 0 +INTRA_CHROMA_DC: + and.nz.f0.0 (8) NULLREG REG_INTRA_PRED_AVAIL_FLAG INTRA_PRED_UP_AVAIL_FLAG:ud // Top macroblock available for intra prediction? + +// Calculate DC values for sub-block 0 and 3 +// +// Rearrange reference samples for unified DC prediction code +// Need to check INTRA_PRED_LEFT_TH_AVAIL_FLAG for blk0 and INTRA_PRED_LEFT_BH_AVAIL_FLAG for blk3 +// + (-f0.0.any8h) mov (8) INTRA_REF_TOP_W(0)<1> 0x8080:uw // Up not available + + and.nz.f0.1 (4) NULLREG REG_INTRA_PRED_AVAIL_FLAG INTRA_PRED_LEFT_TH_AVAIL_FLAG:ud + (-f0.1.any4h) mov (4) INTRA_REF_LEFT_W(0)<2> INTRA_REF_TOP_W(0)REGION(4,1) // Left top half macroblock not available for intra prediction + and.nz.f0.1 (4) NULLREG REG_INTRA_PRED_AVAIL_FLAG INTRA_PRED_LEFT_BH_AVAIL_FLAG:ud + (-f0.1.any4h) mov (4) INTRA_REF_LEFT_W(0,8)<2> INTRA_REF_TOP_W(0,4)REGION(4,1) // Left bottom half macroblock not available for intra prediction + + (-f0.0.any8h) mov (8) INTRA_REF_TOP_W(0)<1> INTRA_REF_LEFT_W(0)REGION(8,2) // Up not available +// Calculate DC prediction +// + add (16) PRED_UVW(0)<1> INTRA_REF_TOP(0)REGION(16,1) INTRA_REF_LEFT_UV(0)<4;2,1> // Sum of top and left reference + add (8) PRED_UVW(0)<1> PRED_UVW(0)<4;2,1> PRED_UVW(0,2)<4;2,1> // Sum of first half (blk #0) and second half (blk #3) + + add (8) PRED_UVW(9)<1> PRED_UVW(0)<0;2,1> PRED_UVW(0,2)<0;2,1> // Sum of blk #0 + add (8) PRED_UVW(11,8)<1> PRED_UVW(0,4)<0;2,1> PRED_UVW(0,6)<0;2,1> // Sum of blk #3 + +// Calculate DC values for sub-block 1 and 2 +// +// Rearrange reference samples for unified DC prediction code +// + // Blk #2 + (-f0.0.any4h) mov (4) INTRA_REF_TOP_W(0)<1> 0x8080:uw + (f0.1.any4h) mov (4) INTRA_REF_TOP_W(0)<1> INTRA_REF_LEFT_W(0,8)REGION(4,2) // Always use available left reference + (-f0.1.any4h) mov (4) INTRA_REF_LEFT_W(0,8)<2> INTRA_REF_TOP_W(0)REGION(4,1) + + // Blk #1 + and.nz.f0.1 (4) NULLREG REG_INTRA_PRED_AVAIL_FLAG INTRA_PRED_LEFT_TH_AVAIL_FLAG:ud + (-f0.1.any4h) mov (4) INTRA_REF_LEFT_W(0)<2> 0x8080:uw + (f0.0.any4h) mov (4) INTRA_REF_LEFT_W(0)<2> INTRA_REF_TOP_W(0,4)REGION(4,1) // Always use available top reference + (-f0.0.any4h) mov (4) INTRA_REF_TOP_W(0,4)<1> INTRA_REF_LEFT_W(0)REGION(4,2) + +// Calculate DC prediction +// + add (8) PRED_UVW(0)<1> INTRA_REF_TOP(0)REGION(8,1) INTRA_REF_LEFT_UV(0,16)<4;2,1> // Sum of top and left reference for blk #2 + add (8) PRED_UVW(0,8)<1> INTRA_REF_LEFT_UV(0)<4;2,1> INTRA_REF_TOP(0,8)REGION(8,1) // Sum of top and left reference for blk #1 + add (8) PRED_UVW(0)<1> PRED_UVW(0)<4;2,1> PRED_UVW(0,2)<4;2,1> // Sum of first half (blk #2) and second half (blk #1) + + add (8) PRED_UVW(9,8)<1> PRED_UVW(0,4)<0;2,1> PRED_UVW(0,6)<0;2,1> // Sum of blk #1 + add (8) PRED_UVW(11)<1> PRED_UVW(0)<0;2,1> PRED_UVW(0,2)<0;2,1> // Sum of blk #2 + +// Now, PRED_UVW(9) holds sums for blks #0 and #1 and PRED_UVW(11) holds sums for blks #2 and #3 +// + add (32) acc0<1>:w PRED_UVW(9)REGION(16,1) 4:w {Compr} // Add rounder + $for(0; <4; 2) { + shr (32) PRED_UVW(%1)<1> acc0:w 3:w {Compr} + } + + add (32) acc0<1>:w PRED_UVW(11)REGION(16,1) 4:w {Compr} // Add rounder + $for(4; <8; 2) { + shr (32) PRED_UVW(%1)<1> acc0:w 3:w {Compr} + } + jmpi (1) End_of_intra_Pred_Chroma + +// Mode 1 +INTRA_CHROMA_HORIZONTAL: + mov (1) PREF_LEFT_UD<1>:ud INTRA_REF_LEFT_ID*GRFWIB*0x00010001+0x00040000:ud // Set address registers for instruction compression + $for(0,0; <8; 2,8) { + mov (32) PRED_UVW(%1)<1> r[PREF_LEFT,%2+2]<0;2,1>:ub {Compr} // Actual left column reference data start at offset 2 + } + jmpi (1) End_of_intra_Pred_Chroma + +// Mode 2 +INTRA_CHROMA_VERTICAL: + $for(0; <8; 2) { + mov (32) PRED_UVW(%1)<1> INTRA_REF_TOP(0) {Compr} + } + jmpi (1) End_of_intra_Pred_Chroma + +// Mode 3 +INTRA_Chroma_PLANE: +// Refer to H.264/AVC spec Section 8.3.4.4 + +#undef C + +#define A REG_INTRA_TEMP_2.0 // All are WORD type +#define B REG_INTRA_TEMP_3.0 // B[U] & B[V] +#define C REG_INTRA_TEMP_3.2 // C[U] & C[V] +#define YP REG_INTRA_TEMP_0 // Store intermediate results of c*(y-3). Make sure it's an even GRF +#define YP1 REG_INTRA_TEMP_1 // Store intermediate results of c*(y-3). Make sure it's an odd GRF +#define XP REG_INTRA_TEMP_5 // Store intermediate results of a+b*(x-3)+16. Make sure it's an odd GRF + +// First Calculate constants H and V +// H1 = sum((x'+1)*p[4+x',-1]), x'=0,1,2,3 +// H2 = sum((-x'-1)*p[2-x',-1]), x'=3,2,1,0 +// H = H1 + H2 +// The same calculation holds for V +// + mul (8) H1(0)<1> INTRA_REF_TOP(0,8)REGION(8,1) 0x44332211:v + mul (8) H2(0)<1> INTRA_REF_TOP(0,-2)REGION(8,1) 0xFFEEDDCC:v + + mul (8) V1(0)<1> INTRA_REF_LEFT_UV(0,4*4)<4;2,1> 0x44332211:v + mul (8) V2(0)<1> INTRA_REF_LEFT_UV(0)<4;2,1> 0x00FFEEDD:v + mul (2) V2(0,6)<1> INTRA_REF_TOP(0,-2)REGION(2,1) -4:w // Replace 0*p[-1,3] with -4*p[-1,-1] + // Now, REG_INTRA_TEMP_0 holds [H2, H1] and REG_INTRA_TEMP_1 holds [V2, V1] + + // Sum up [H2, H1] and [V2, V1] using instruction compression + // ExecSize = 16 is restricted by B-spec for instruction compression + // Actual intermediate results are in lower sub-registers after each summing step + add (16) H1(0)<1> H1(0) H2(0) {Compr} // Results in lower 8 WORDs + add (16) H1(0)<1> H1(0) H1(0,4) {Compr} // Results in lower 4 WORDs + add (16) H1(0)<1> H1(0) H1(0,2) {Compr} // Results in lower 2 WORDs + +// Calculate a, b, c and further derivations + mov (16) acc0<1>:w 32:w + mac (4) acc0<1>:w H1(0)<16;2,1> 34:w + shr (4) B<1>:w acc0:w 6:w // Done b,c + mov (16) acc0<1>:w 16:w + mac (16) acc0<1>:w INTRA_REF_TOP(0,7*2)<0;2,1> 16:w + mac (16) A<1>:w INTRA_REF_LEFT_UV(0,7*4)<0;2,1> 16:w // A = a+16 + mac (16) XP<1>:w B<0;2,1>:w XY_3<1;2,0>:b // XP = A+b*(x-3) + mul (8) YP<1>:w C<0;2,1>:w XY_3<2;2,0>:b // YP = c*(y-3), Even portion + mul (8) YP1<1>:w C<0;2,1>:w XY_3_1<2;2,0>:b // YP = c*(y-3), Odd portion + +// Finally the intra_Chroma plane prediction + $for(0; <8; 2) { + add (32) acc0<1>:w XP<16;16,1>:w YP.%1<0;2,1>:w {Compr} + shr.sat (32) PRED_UV(%1)<2> acc0<16;16,1>:w 5:w {Compr} + } + +End_of_intra_Pred_Chroma: + +// End of intra_Pred_Chroma + +#endif // !defined(__INTRA_PRED_CHROMA__) diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/load_Intra_Ref_UV.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/load_Intra_Ref_UV.asm --- libva-1.0.1/i965_drv_video/shaders/h264/mc/load_Intra_Ref_UV.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/load_Intra_Ref_UV.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,44 @@ +/* + * Load all reference U/V samples from neighboring macroblocks + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +#if !defined(__LOAD_INTRA_REF_UV__) // Make sure this is only included once +#define __LOAD_INTRA_REF_UV__ + +// Module name: load_Intra_Ref_UV.asm +// +// Load all reference U/V samples from neighboring macroblocks +// +// Note: Since loading of U/V data always follows writing of Y, the message descriptor is manipulated +// to avoid recalculating due to frame/field variztions. + +// First load top 20x1 row U/V reference samples +// 4 from macroblock D (actually use 2), 16 from macroblock B +// + shr (1) I_ORIY<1>:w I_ORIY<0;1,0>:w 1:w // Adjust I_ORIY for NV12 format + add (2) MSGSRC.0<1>:d I_ORIX<2;2,1>:w TOP_REF_OFFSET<2;2,1>:b {NoDDClr} // Reference samples positioned at (-4, -1) + mov (1) MSGSRC.2:ud 0x00000013:ud {NoDDChk} // Block width and height (20x1) + +// Update message descriptor based on previous Y block write +// +#ifdef DEV_ILK + add (1) MSGDSC MSGDSC RESP_LEN(1)+DWBRMSGDSC_RC+DESTUV-DWBWMSGDSC_WC-0x10000000-DESTY:ud // Set message descriptor +#else + add (1) MSGDSC MSGDSC RESP_LEN(1)+DWBRMSGDSC_RC+DESTUV-DWBWMSGDSC_WC-0x00800000-DESTY:ud // Set message descriptor +#endif // DEV_ILK + + send (8) INTRA_REF_TOP_D(0) MSGHDR MSGSRC<8;8,1>:ud DAPREAD MSGDSC + +// Then load left 4x8 reference samples (actually use 1x8 column) +// + add (1) MSGSRC.1<1>:d MSGSRC.1<0;1,0>:d 1:w {NoDDClr} // Reference samples positioned next row + mov (1) MSGSRC.2:ud 0x00070003:ud {NoDDChk} // Block width and height (4x8) + send (8) INTRA_REF_LEFT_D(0) MSGHDRUV MSGSRC<8;8,1>:ud DAPREAD MSGDSC + +// End of load_Intra_Ref_UV +#endif // !defined(__LOAD_INTRA_REF_UV__) diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/load_Intra_Ref_Y.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/load_Intra_Ref_Y.asm --- libva-1.0.1/i965_drv_video/shaders/h264/mc/load_Intra_Ref_Y.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/load_Intra_Ref_Y.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,37 @@ +/* + * Load all reference Y samples from neighboring macroblocks + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +#if !defined(__LOAD_INTRA_REF_Y__) // Make sure this is only included once +#define __LOAD_INTRA_REF_Y__ + +// Module name: load_Intra_Ref_Y.asm +// +// Load all reference Y samples from neighboring macroblocks +// +load_Intra_Ref_Y: +// shl (2) I_ORIX<1>:uw ORIX<2;2,1>:ub 4:w // Convert MB origin to pixel unit + +// First load top 28x1 row reference samples +// 4 from macroblock D (actually use 1), 16 from macroblock B, and 8 from macroblock C +// + add (2) MSGSRC.0<1>:d I_ORIX<2;2,1>:w TOP_REF_OFFSET<2;2,1>:b {NoDDClr} // Reference samples positioned at (-4, -1) + mov (1) MSGSRC.2:ud 0x0000001B:ud {NoDDChk} // Block width and height (28x1) + add (1) MSGDSC REG_MBAFF_FIELD<0;1,0>:uw RESP_LEN(1)+DWBRMSGDSC_RC+DESTY:ud // Set message descriptor + send (8) INTRA_REF_TOP_D(0) MSGHDRY0 MSGSRC<8;8,1>:ud DAPREAD MSGDSC + +// Then load left 4x16 reference samples (actually use 1x16 column) +// + add (1) MSGSRC.1<1>:d MSGSRC.1<0;1,0>:d 1:w {NoDDClr} // Reference samples positioned next row + mov (1) MSGSRC.2:ud 0x00F0003:ud {NoDDChk} // Block width and height (4x16) + add (1) MSGDSC MSGDSC RESP_LEN(1):ud // Need to read 1 more GRF register + send (8) INTRA_REF_LEFT_D(0) MSGHDRY1 MSGSRC<8;8,1>:ud DAPREAD MSGDSC + + RETURN +// End of load_Intra_Ref_Y +#endif // !defined(__LOAD_INTRA_REF_Y__) diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/loadRef_C_10x5.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/loadRef_C_10x5.asm --- libva-1.0.1/i965_drv_video/shaders/h264/mc/loadRef_C_10x5.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/loadRef_C_10x5.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,57 @@ +/* + * Load reference 10x5 area for chroma NV12 4x4 MC + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Kernel name: LoadRef_C_10x5.asm +// +// Load reference 10x5 area for chroma NV12 4x4 MC + + +//#if !defined(__LOADREF_C_10x5__) // Make sure this is only included once +//#define __LOADREF_C_10x5__ + + +#if 1 + + // Compute integer and fractional components of MV + asr (2) gMVX_INT<1>:w r[pMV,0]<2;2,1>:w 0x03:w {NoDDClr} + and (2) gMVX_FRACC<1>:w r[pMV,0]<2;2,1>:w 0x07:w {NoDDChk} + + // Check whether MVY is integer + or.z.f0.0 (8) null:w gMVY_FRACC<0;1,0>:w 0:w + + // Compute top-left corner position to be loaded + mov (2) gMSGSRC.0<1>:d gMVX_INT<2;2,1>:w + shl (1) gMSGSRC.0:d gMSGSRC.0:d 1:w + + (f0.0) add (1) pMSGDSC:ud gMSGDSC_R:ud RESP_LEN(2)+nBI_LC_DIFF:ud + (-f0.0) add (1) pMSGDSC:ud gMSGDSC_R:ud RESP_LEN(3)+nBI_LC_DIFF:ud + + // Read 16x5 pixels - TODO: Reading 12x5 instead of 16x5 took more time on CL. Why? + (f0.0) mov (1) gMSGSRC.2:ud 0x00030009:ud //{NoDDChk} + (-f0.0) mov (1) gMSGSRC.2:ud 0x00040009:ud //{NoDDChk} + send (8) gudREFC(0)<1> mMSGHDRC gMSGSRC<8;8,1>:ud DAPREAD pMSGDSC:ud + +#else + + add (1) pMSGDSC:ud gMSGDSC_R:ud RESP_LEN(3)+nBI_LC_DIFF:ud + + // Compute integer and fractional components of MV + asr (2) gMVX_INT<1>:w r[pMV,0]<2;2,1>:w 0x03:w {NoDDClr} + and (2) gMVX_FRACC<1>:w r[pMV,0]<2;2,1>:w 0x07:w {NoDDChk} + + // Compute top-left corner position to be loaded + mov (2) gMSGSRC.0<1>:d gMVX_INT<2;2,1>:w + shl (1) gMSGSRC.0:d gMSGSRC.0:d 1:w + + // Read 16x5 pixels + mov (1) gMSGSRC.2:ud 0x00040009:ud {NoDDChk} + send (8) gudREFC(0)<1> mMSGHDRC gMSGSRC<8;8,1>:ud DAPREAD pMSGDSC:ud +#endif + +//#endif // !defined(__LOADREF_C_10x5__) diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/loadRef_C_6x3.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/loadRef_C_6x3.asm --- libva-1.0.1/i965_drv_video/shaders/h264/mc/loadRef_C_6x3.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/loadRef_C_6x3.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,38 @@ +/* + * Load reference 6x3 area for chroma NV12 4x4 MC + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Kernel name: LoadRef_C_6x3.asm +// +// Load reference 6x3 area for chroma NV12 4x4 MC + + +//#if !defined(__LOADREF_C_6x3__) // Make sure this is only included once +//#define __LOADREF_C_6x3__ + + +#ifdef DEV_ILK + add (1) pMSGDSC:ud gMSGDSC_R:ud 0x00100010:ud +#else + add (1) pMSGDSC:ud gMSGDSC_R:ud 0x00010010:ud +#endif // DEV_ILK + + // Compute integer and fractional components of MV + asr (2) gMVX_INT<1>:w r[pMV,0]<2;2,1>:w 0x03:w {NoDDClr} + and (2) gMVX_FRACC<1>:w r[pMV,0]<2;2,1>:w 0x07:w {NoDDChk} + + // Compute top-left corner position to be loaded + mov (2) gMSGSRC.0<1>:d gMVX_INT<2;2,1>:w + shl (1) gMSGSRC.0:d gMSGSRC.0:d 1:w + + // Read 8x3 pixels + mov (1) gMSGSRC.2:ud 0x00020005:ud + send (8) gudREFC(0)<1> mMSGHDRC gMSGSRC<8;8,1>:ud DAPREAD pMSGDSC:ud + + +//#endif // !defined(__LOADREF_C_6x3__) diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/loadRef_Y_16x13.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/loadRef_Y_16x13.asm --- libva-1.0.1/i965_drv_video/shaders/h264/mc/loadRef_Y_16x13.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/loadRef_Y_16x13.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,127 @@ +/* + * Load reference 16x13 area for luma 8x8 MC + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Kernel name: LoadRef_Y_16x13.asm +// +// Load reference 16x13 area for luma 8x8 MC + + +//#if !defined(__LOADREF_Y_16x13__) // Make sure this is only included once +//#define __LOADREF_Y_16x13__ + +#if 1 + +#if 1 + + // Check whether MVX is integer MV + and.z.f0.0 (1) null:w r[pMV,0]<0;1,0>:w 0x3:w + + // Compute integer and fractional components of MV + and (2) gMVX_FRAC<1>:w r[pMV,0]<2;2,1>:w 0x03:w //{NoDDClr} + asr (2) gMVX_INT<1>:w r[pMV,0]<2;2,1>:w 0x02:w //{NoDDChk} + + // Check whether MVY is integer + or.z.f0.1 (8) null:w gMVY_FRAC<0;1,0>:w 0:w + + // If MVX is a multiple of 4 (..., -4, 0, 4, ...) integer MV, do special handling + (f0.0) jmpi (1) INTERLABEL(LOADREF_MVXZERO) + + // Set message descriptor + (f0.1) add (1) pMSGDSC:ud gMSGDSC_R:ud RESP_LEN(4):ud + (-f0.1) add (1) pMSGDSC:ud gMSGDSC_R:ud RESP_LEN(7):ud + + // Compute top-left corner position to be loaded + // TODO: sel + (-f0.1) add (2) gMSGSRC.0<1>:d gMVX_INT<2;2,1>:w -0x02:d //{NoDDClr} + (-f0.1) mov (1) gMSGSRC.2:ud 0x000c000c:ud //{NoDDChk} + (f0.1) add (1) gMSGSRC.0<1>:d gMVX_INT<0;1,0>:w -0x02:d //{NoDDClr} + (f0.1) mov (1) gMSGSRC.1<1>:d gMVY_INT<0;1,0>:w //{NoDDChk,NoDDClr} + (f0.1) mov (1) gMSGSRC.2:ud 0x0007000c:ud //{NoDDChk} + + // Read 16x13 pixels + send (8) gudREF(0)<1> mMSGHDRY gMSGSRC<8;8,1>:ud DAPREAD pMSGDSC:ud + + jmpi INTERLABEL(EXIT_LOADREF_Y_16x13) + +INTERLABEL(LOADREF_MVXZERO): + + // Set message descriptor +#ifdef DEV_ILK + (f0.1) add (1) pMSGDSC:ud gMSGDSC_R:ud 0x00200000:ud + (-f0.1) add (1) pMSGDSC:ud gMSGDSC_R:ud 0x00400000:ud +#else + (f0.1) add (1) pMSGDSC:ud gMSGDSC_R:ud 0x00020000:ud + (-f0.1) add (1) pMSGDSC:ud gMSGDSC_R:ud 0x00040000:ud +#endif + + // Compute top-left corner position to be loaded + // TODO: sel + mov (2) gMSGSRC.0<1>:d gMVX_INT<2;2,1>:w + (-f0.1) add (1) gMSGSRC.1<1>:d gMVY_INT<0;1,0>:w -0x02:d + (-f0.1) mov (1) gMSGSRC.2:ud 0x000c0007:ud //{NoDDChk} + (f0.1) mov (1) gMSGSRC.2:ud 0x00070007:ud //{NoDDChk} + + // Read 16x13 pixels + send (8) gudREF(0)<1> mMSGHDRY gMSGSRC<8;8,1>:ud DAPREAD pMSGDSC:ud + + +#else + // Compute integer and fractional components of MV + and (2) gMVX_FRAC<1>:w r[pMV,0]<2;2,1>:w 0x03:w //{NoDDClr} + asr (2) gMVX_INT<1>:w r[pMV,0]<2;2,1>:w 0x02:w //{NoDDChk} + + // Check whether MVY is integer + or.z.f0.1 (8) null:w gMVY_FRAC<0;1,0>:w 0:w + + // Set message descriptor +#ifdef DEV_ILK + (f0.1) add (1) pMSGDSC:ud gMSGDSC_R:ud 0x00400000:ud + (-f0.1) add (1) pMSGDSC:ud gMSGDSC_R:ud 0x00700000:ud +#else + (f0.1) add (1) pMSGDSC:ud gMSGDSC_R:ud 0x00040000:ud + (-f0.1) add (1) pMSGDSC:ud gMSGDSC_R:ud 0x00070000:ud +#endif + + // Compute top-left corner position to be loaded + // TODO: sel + (-f0.1) add (2) gMSGSRC.0<1>:d gMVX_INT<2;2,1>:w -0x02:d //{NoDDClr} + (-f0.1) mov (1) gMSGSRC.2:ud 0x000c000c:ud //{NoDDChk} + (f0.1) add (1) gMSGSRC.0<1>:d gMVX_INT<0;1,0>:w -0x02:d //{NoDDClr} + (f0.1) mov (1) gMSGSRC.1<1>:d gMVY_INT<0;1,0>:w //{NoDDChk,NoDDClr} + (f0.1) mov (1) gMSGSRC.2:ud 0x0007000c:ud //{NoDDChk} + + // Read 16x13 pixels + send (8) gudREF(0)<1> mMSGHDRY gMSGSRC<8;8,1>:ud DAPREAD pMSGDSC:ud +#endif + +#else + + // Compute integer and fractional components of MV + and (2) gMVX_FRAC<1>:w r[pMV,0]<2;2,1>:w 0x03:w {NoDDClr} // + asr (2) gMVX_INT<1>:w r[pMV,0]<2;2,1>:w 0x02:w {NoDDChk} // + + // Set message descriptor +#ifdef DEV_ILK + add (1) pMSGDSC:ud gMSGDSC_R:ud 0x00700000:ud +#else + add (1) pMSGDSC:ud gMSGDSC_R:ud 0x00070000:ud +#endif // DEV_ILK + + // Compute top-left corner position to be loaded + add (2) gMSGSRC.0<1>:d gMVX_INT<2;2,1>:w -0x02:d {NoDDClr} // + mov (1) gMSGSRC.2:ud 0x000c000c:ud {NoDDChk} // + + // Read 16x13 pixels + send (8) gudREF(0)<1> mMSGHDRY gMSGSRC<8;8,1>:ud DAPREAD pMSGDSC:ud + +#endif + +INTERLABEL(EXIT_LOADREF_Y_16x13): + +//#endif // !defined(__LOADREF_Y_16x13__) diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/loadRef_Y_16x9.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/loadRef_Y_16x9.asm --- libva-1.0.1/i965_drv_video/shaders/h264/mc/loadRef_Y_16x9.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/loadRef_Y_16x9.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,61 @@ +/* + * Load reference 16x9 area for luma 4x4 MC + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Kernel name: LoadRef_Y_16x9.asm +// +// Load reference 16x9 area for luma 4x4 MC + + +//#if !defined(__LOADREF_Y_16x9__) // Make sure this is only included once +//#define __LOADREF_Y_16x9__ + +#if 1 + + // Compute integer and fractional components of MV + and (2) gMVX_FRAC<1>:w r[pMV,0]<2;2,1>:w 0x03:w //{NoDDClr} + asr (2) gMVX_INT<1>:w r[pMV,0]<2;2,1>:w 0x02:w //{NoDDChk} + + // Check whether MVY is integer + or.z.f0.1 (8) null:w gMVY_FRAC<0;1,0>:w 0:w + + // Set message descriptor + (f0.1) add (1) pMSGDSC:ud gMSGDSC_R:ud RESP_LEN(2):ud + (-f0.1) add (1) pMSGDSC:ud gMSGDSC_R:ud RESP_LEN(5):ud + + // Compute top-left corner position to be loaded + // TODO: sel + (-f0.1) add (2) gMSGSRC.0<1>:d gMVX_INT<2;2,1>:w -0x02:d //{NoDDClr} + (-f0.1) mov (1) gMSGSRC.2:ud 0x00080008:ud //{NoDDChk} + (f0.1) add (1) gMSGSRC.0<1>:d gMVX_INT<0;1,0>:w -0x02:d //{NoDDClr} + (f0.1) mov (1) gMSGSRC.1<1>:d gMVY_INT<0;1,0>:w //{NoDDChk,NoDDClr} + (f0.1) mov (1) gMSGSRC.2:ud 0x00030008:ud //{NoDDChk} + + // Read 16x9 pixels + send (8) gudREF(0)<1> mMSGHDRY gMSGSRC<8;8,1>:ud DAPREAD pMSGDSC:ud + +#else + + // Compute integer and fractional components of MV + and (2) gMVX_FRAC<1>:w r[pMV,0]<2;2,1>:w 0x03:w {NoDDClr} // + asr (2) gMVX_INT<1>:w r[pMV,0]<2;2,1>:w 0x02:w {NoDDChk} // + + // Set message descriptor + add (1) pMSGDSC:ud gMSGDSC_R:ud RESP_LEN(5):ud + + // Compute top-left corner position to be loaded + add (2) gMSGSRC.0<1>:d gMVX_INT<2;2,1>:w -0x02:d {NoDDClr} // + mov (1) gMSGSRC.2:ud 0x00080008:ud {NoDDChk} // + + // Read 16x9 pixels + send (8) gudREF(0)<1> mMSGHDRY gMSGSRC<8;8,1>:ud DAPREAD pMSGDSC:ud + +#endif + + +//#endif // !defined(__LOADREF_Y_16x9__) diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/Makefile.am libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/Makefile.am --- libva-1.0.1/i965_drv_video/shaders/h264/mc/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/Makefile.am 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,28 @@ + +INTEL_G4I = + +INTEL_G4A = null.g4a + +INTEL_G4B = null.g4b + +INTEL_G4B_GEN5 = null.g4b.gen5 + +EXTRA_DIST = $(INTEL_G4I) \ + $(INTEL_G4A) \ + $(INTEL_G4B) \ + $(INTEL_G4B_GEN5) + +if HAVE_GEN4ASM + +SUFFIXES = .g4a .g4b +.g4a.g4b: + m4 $*.g4a > $*.g4m && intel-gen4asm -o $@ $*.g4m && intel-gen4asm -g 5 -o $@.gen5 $*.g4m && rm $*.g4m + +$(INTEL_G4B): $(INTEL_G4I) + +BUILT_SOURCES= $(INTEL_G4B) + +clean-local: + -rm -f $(INTEL_G4B) + -rm -f $(INTEL_G4B_GEN5) +endif diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/null.g4a libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/null.g4a --- libva-1.0.1/i965_drv_video/shaders/h264/mc/null.g4a 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/null.g4a 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,43 @@ +/* + * Copyright © 2009 Intel Corporation + * + * 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 (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Author: + * Zou Nan hai + * Xiang Haihao + * + */ +define(`YUV_color',`0xFFFFFFFFUD') +shl(2) g62.0<1>UD g3.4<2,2,1>UB 4UW {align1}; +mov(1) g62.8<1>UD 0x000f000fUD {align1}; +mov(16) m1<1>UD YUV_color {align1 compr}; +mov(16) m3<1>UD YUV_color {align1 compr}; +mov(16) m5<1>UD YUV_color {align1 compr}; +mov(16) m7<1>UD YUV_color {align1 compr}; +send(16) 0 acc0<1>UW g62<8,8,1>UW write(0, 0, 2, 0) mlen 9 rlen 0 {align1}; + +shr(1) g62.4<1>UD g62.4<1,1,1>UD 1UW {align1}; +mov(1) g62.8<1>UD 0x0007000fUD {align1}; +mov(16) m1<1>UD YUV_color {align1 compr}; +mov(16) m3<1>UD YUV_color {align1 compr}; +send(16) 0 acc0<1>UW g62<8,8,1>UW write(1, 0, 2, 0) mlen 5 rlen 0 {align1}; + +send(16) 0 acc0<1>UW g0<8,8,1>UW thread_spawner(0, 0, 0) mlen 1 rlen 0 {align1 EOT}; diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/null.g4b libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/null.g4b --- libva-1.0.1/i965_drv_video/shaders/h264/mc/null.g4b 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/null.g4b 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,13 @@ + { 0x00200009, 0x27c02e21, 0x00450064, 0x00040004 }, + { 0x00000001, 0x27c80061, 0x00000000, 0x000f000f }, + { 0x00802001, 0x20200062, 0x00000000, 0xffffffff }, + { 0x00802001, 0x20600062, 0x00000000, 0xffffffff }, + { 0x00802001, 0x20a00062, 0x00000000, 0xffffffff }, + { 0x00802001, 0x20e00062, 0x00000000, 0xffffffff }, + { 0x00800031, 0x24001d28, 0x008d07c0, 0x05902000 }, + { 0x00000008, 0x27c42c21, 0x002107c4, 0x00010001 }, + { 0x00000001, 0x27c80061, 0x00000000, 0x0007000f }, + { 0x00802001, 0x20200062, 0x00000000, 0xffffffff }, + { 0x00802001, 0x20600062, 0x00000000, 0xffffffff }, + { 0x00800031, 0x24001d28, 0x008d07c0, 0x05502001 }, + { 0x00800031, 0x24001d28, 0x008d0000, 0x87100000 }, diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/null.g4b.gen5 libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/null.g4b.gen5 --- libva-1.0.1/i965_drv_video/shaders/h264/mc/null.g4b.gen5 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/null.g4b.gen5 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,13 @@ + { 0x00200009, 0x27c02e21, 0x00450064, 0x00040004 }, + { 0x00000001, 0x27c80061, 0x00000000, 0x000f000f }, + { 0x00802001, 0x20200062, 0x00000000, 0xffffffff }, + { 0x00802001, 0x20600062, 0x00000000, 0xffffffff }, + { 0x00802001, 0x20a00062, 0x00000000, 0xffffffff }, + { 0x00802001, 0x20e00062, 0x00000000, 0xffffffff }, + { 0x00800031, 0x24001d28, 0x508d07c0, 0x12082000 }, + { 0x00000008, 0x27c42c21, 0x002107c4, 0x00010001 }, + { 0x00000001, 0x27c80061, 0x00000000, 0x0007000f }, + { 0x00802001, 0x20200062, 0x00000000, 0xffffffff }, + { 0x00802001, 0x20600062, 0x00000000, 0xffffffff }, + { 0x00800031, 0x24001d28, 0x508d07c0, 0x0a082001 }, + { 0x00800031, 0x24001d28, 0x748d0000, 0x82000000 }, diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/recon_C_4x4.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/recon_C_4x4.asm --- libva-1.0.1/i965_drv_video/shaders/h264/mc/recon_C_4x4.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/recon_C_4x4.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,37 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Kernel name: Recon_C_4x4.asm +// +// $Revision: 11 $ +// $Date: 10/03/06 5:28p $ +// + + +//#if !defined(__RECON_C_4x4__) // Make sure this is only included once +//#define __RECON_C_4x4__ + + + // TODO: Use instruction compression + add.sat (4) r[pERRORC,0]<2>:ub r[pERRORC,0]<4;4,1>:w gubCPRED(0)<16;4,4> + add.sat (4) r[pERRORC,128]<2>:ub r[pERRORC,128]<4;4,1>:w gubCPRED(0,2)<16;4,4> + add.sat (4) r[pERRORC,32]<2>:ub r[pERRORC,32]<4;4,1>:w gubCPRED(1)<16;4,4> + add.sat (4) r[pERRORC,128+32]<2>:ub r[pERRORC,128+32]<4;4,1>:w gubCPRED(1,2)<16;4,4> + + add.sat (4) r[pERRORC,16]<2>:ub r[pERRORC,16]<4;4,1>:w gubCPRED(0,16)<16;4,4> + add.sat (4) r[pERRORC,128+16]<2>:ub r[pERRORC,128+16]<4;4,1>:w gubCPRED(0,18)<16;4,4> + add.sat (4) r[pERRORC,48]<2>:ub r[pERRORC,48]<4;4,1>:w gubCPRED(1,16)<16;4,4> + add.sat (4) r[pERRORC,128+48]<2>:ub r[pERRORC,128+48]<4;4,1>:w gubCPRED(1,18)<16;4,4> + + // Increase chroma error block offset +#ifndef MONO + add (1) pERRORC:w pERRORC:w 8:w +#endif + + +//#endif // !defined(__RECON_C_4x4__) diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/recon_Y_8x8.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/recon_Y_8x8.asm --- libva-1.0.1/i965_drv_video/shaders/h264/mc/recon_Y_8x8.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/recon_Y_8x8.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,27 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Kernel name: Recon_Y_8x8.asm +// +// $Revision: 10 $ +// $Date: 9/22/06 2:50p $ +// + + +//#if !defined(__RECON_Y_8x8__) // Make sure this is only included once +//#define __RECON_Y_8x8__ + + + add.sat (16) r[pERRORY,0]<2>:ub r[pERRORY,0]<16;16,1>:w gubYPRED(0) + add.sat (16) r[pERRORY,nGRFWIB]<2>:ub r[pERRORY,nGRFWIB]<16;16,1>:w gubYPRED(1) + add.sat (16) r[pERRORY,nGRFWIB*2]<2>:ub r[pERRORY,nGRFWIB*2]<16;16,1>:w gubYPRED(2) + add.sat (16) r[pERRORY,nGRFWIB*3]<2>:ub r[pERRORY,nGRFWIB*3]<16;16,1>:w gubYPRED(3) + + add (1) pERRORY:w pERRORY:w 128:w + +//#endif // !defined(__RECON_Y_8x8__) diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/roundShift_C_4x4.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/roundShift_C_4x4.asm --- libva-1.0.1/i965_drv_video/shaders/h264/mc/roundShift_C_4x4.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/roundShift_C_4x4.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,26 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Kernel name: RoundShift_C_4x4.asm +// +// Do (...+32)>>6 to 4x4 (NV12 8x4) interpolated chrominance data +// + + +//#if !defined(__RoundShift_C_4x4__) // Make sure this is only included once +//#define __RoundShift_C_4x4__ + + + // TODO: Optimize using instruction compression + add (16) acc0<1>:w r[pRESULT,0]<16;16,1>:w 32:w + add (16) acc1<1>:w r[pRESULT,nGRFWIB]<16;16,1>:w 32:w + asr.sat (16) r[pRESULT,0]<2>:ub acc0<16;16,1>:w 6:w + asr.sat (16) r[pRESULT,nGRFWIB]<2>:ub acc1<16;16,1>:w 6:w + + +//#endif // !defined(__RoundShift_C_4x4__) diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/save_16x16_Y.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/save_16x16_Y.asm --- libva-1.0.1/i965_drv_video/shaders/h264/mc/save_16x16_Y.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/save_16x16_Y.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,42 @@ +/* + * Save decoded Y picture data to frame buffer + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +#if !defined(__SAVE_16X16_Y__) // Make sure this is only included once +#define __SAVE_16X16_Y__ + +// Module name: save_16x16_Y.asm +// +// Save decoded Y picture data to frame buffer +// + +save_16x16_Y: + + mov (1) MSGSRC.2:ud 0x000F000F:ud {NoDDClr} // Block width and height (16x16) + mov (2) MSGSRC.0:ud I_ORIX<2;2,1>:w {NoDDChk} // X, Y offset +#ifdef DEV_ILK + add (1) MSGDSC MSGDSC MSG_LEN(8)+DWBWMSGDSC_WC-DWBRMSGDSC_RC-0x00200000:ud // Set message descriptor +#else + add (1) MSGDSC MSGDSC MSG_LEN(8)+DWBWMSGDSC_WC-DWBRMSGDSC_RC-0x00020000:ud // Set message descriptor +#endif // DEV_ILK + + mov (1) PDECBUF_UD<1>:ud 0x10001*DECBUF*GRFWIB+0x00400000:ud // Pointers to row 0 and 2 of decoded data + + $for(0,0; <8; 2,4) { + mov (32) MSGPAYLOAD(%1)<1> r[PDECBUF, %2*GRFWIB]REGION(16,2) {Compr} // Block Y0/Y2 + mov (32) MSGPAYLOAD(%1,16)<1> r[PDECBUF, (1+%2)*GRFWIB]REGION(16,2) {Compr} // Block Y1/Y3 + } + +// Update message descriptor based on previous read setup +// + send (8) REG_WRITE_COMMIT_Y<1>:ud MSGHDR MSGSRC<8;8,1>:ud DAPWRITE MSGDSC + + RETURN +// End of save_16x16_Y + +#endif // !defined(__SAVE_16X16_Y__) diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/save_4x4_Y.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/save_4x4_Y.asm --- libva-1.0.1/i965_drv_video/shaders/h264/mc/save_4x4_Y.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/save_4x4_Y.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,43 @@ +/* + * Save Intra_4x4 decoded Y picture data to frame buffer + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +#if !defined(__SAVE_4X4_Y__) // Make sure this is only included once +#define __SAVE_4X4_Y__ + +// Module name: save_4x4_Y.asm +// +// Save Intra_4x4 decoded Y picture data to frame buffer +// Note: Each 4x4 block is stored in 1 GRF register in the order of block raster scan order, +// i.e. 0, 1, 4, 5, 2, 3, 6, 7, 8, 9, 12, 13, 10, 11, 14, 15 + +save_4x4_Y: + + mov (1) MSGSRC.2:ud 0x000F000F:ud {NoDDClr} // Block width and height (16x16) + mov (2) MSGSRC.0:ud I_ORIX<2;2,1>:w {NoDDChk} // X, Y offset +#ifdef DEV_ILK + add (1) MSGDSC MSGDSC MSG_LEN(8)+DWBWMSGDSC_WC-DWBRMSGDSC_RC-0x00200000:ud // Set message descriptor +#else + add (1) MSGDSC MSGDSC MSG_LEN(8)+DWBWMSGDSC_WC-DWBRMSGDSC_RC-0x00020000:ud // Set message descriptor +#endif // DEV_ILK + + $for(0; <8; 2) { + mov (16) MSGPAYLOAD(%1)<1> DEC_Y(%1)<16;4,1> + mov (16) MSGPAYLOAD(%1,16)<1> DEC_Y(%1,4)<16;4,1> + mov (16) MSGPAYLOAD(%1+1)<1> DEC_Y(%1,8)<16;4,1> + mov (16) MSGPAYLOAD(%1+1,16)<1> DEC_Y(%1,12)<16;4,1> + } + +// Update message descriptor based on previous read setup +// + send (8) REG_WRITE_COMMIT_Y<1>:ud MSGHDR MSGSRC<8;8,1>:ud DAPWRITE MSGDSC + + RETURN +// End of save_4x4_Y + +#endif // !defined(__SAVE_4X4_Y__) diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/save_8x8_UV.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/save_8x8_UV.asm --- libva-1.0.1/i965_drv_video/shaders/h264/mc/save_8x8_UV.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/save_8x8_UV.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,51 @@ +/* + * Save decoded U/V picture data to frame buffer + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +#if !defined(__SAVE_8x8_UV__) // Make sure this is only included once +#define __SAVE_8x8_UV__ + +// Module name: save_8x8_UV.asm +// +// Save decoded U/V picture data to frame buffer +// + + mov (1) MSGSRC.2:ud 0x0007000F:ud {NoDDClr} // Block width and height (16x8) + mov (2) MSGSRC.0<1>:ud I_ORIX<2;2,1>:w {NoDDChk} // I_ORIX has already been adjusted for NV12 + +// Update message descriptor based on previous read setup +// +#ifdef DEV_ILK + add (1) MSGDSC MSGDSC MSG_LEN(4)+DWBWMSGDSC_WC-DWBRMSGDSC_RC-0x00100000:ud // Set message descriptor +#else + add (1) MSGDSC MSGDSC MSG_LEN(4)+DWBWMSGDSC_WC-DWBRMSGDSC_RC-0x00010000:ud // Set message descriptor +#endif // DEV_ILK + +// Write U/V picture data +// +#ifndef MONO + mov MSGPAYLOAD(0,0)<1> DEC_UV(0)REGION(16,2) // U/V row 0 + mov MSGPAYLOAD(0,16)<1> DEC_UV(1)REGION(16,2) // U/V row 1 + mov MSGPAYLOAD(1,0)<1> DEC_UV(2)REGION(16,2) // U/V row 2 + mov MSGPAYLOAD(1,16)<1> DEC_UV(3)REGION(16,2) // U/V row 3 + mov MSGPAYLOAD(2,0)<1> DEC_UV(4)REGION(16,2) // U/V row 4 + mov MSGPAYLOAD(2,16)<1> DEC_UV(5)REGION(16,2) // U/V row 5 + mov MSGPAYLOAD(3,0)<1> DEC_UV(6)REGION(16,2) // U/V row 6 + mov MSGPAYLOAD(3,16)<1> DEC_UV(7)REGION(16,2) // U/V row 7 +#else // defined(MONO) + $for(0; <4; 2) { + mov (16) MSGPAYLOADD(%1)<1> 0x80808080:ud {Compr} + } + +#endif // !defined(MONO) + + send (8) REG_WRITE_COMMIT_UV<1>:ud MSGHDR MSGSRC<8;8,1>:ud DAPWRITE MSGDSC + +// End of save_8x8_UV + +#endif // !defined(__SAVE_8x8_UV__) diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/save_8x8_Y.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/save_8x8_Y.asm --- libva-1.0.1/i965_drv_video/shaders/h264/mc/save_8x8_Y.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/save_8x8_Y.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,56 @@ +/* + * Save Intra_8x8 decoded Y picture data to frame buffer + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +#if !defined(__SAVE_8X8_Y__) // Make sure this is only included once +#define __SAVE_8X8_Y__ + +// Module name: save_8x8_Y.asm +// +// Save Intra_8x8 decoded Y picture data to frame buffer +// NotE: Every 4 rows of Y data are interleaved with the horizontal neighboring blcok +// +save_8x8_Y: + + mov (1) MSGSRC.2:ud 0x000F000F:ud {NoDDClr} // Block width and height (16x16) + mov (2) MSGSRC.0:ud I_ORIX<2;2,1>:w {NoDDChk} // X, Y offset + +// Update message descriptor based on previous read setup +// +#ifdef DEV_ILK + add (1) MSGDSC MSGDSC MSG_LEN(8)+DWBWMSGDSC_WC-DWBRMSGDSC_RC-0x00200000:ud // Set message descriptor +#else + add (1) MSGDSC MSGDSC MSG_LEN(8)+DWBWMSGDSC_WC-DWBRMSGDSC_RC-0x00020000:ud // Set message descriptor +#endif // DEV_ILK + + mov (16) MSGPAYLOAD(0)<1> DEC_Y(0)<32;8,1> + mov (16) MSGPAYLOAD(0,16)<1> DEC_Y(0,8)<32;8,1> + mov (16) MSGPAYLOAD(1,0)<1> DEC_Y(0,16)<32;8,1> + mov (16) MSGPAYLOAD(1,16)<1> DEC_Y(0,24)<32;8,1> + + mov (16) MSGPAYLOAD(2)<1> DEC_Y(2)<32;8,1> + mov (16) MSGPAYLOAD(2,16)<1> DEC_Y(2,8)<32;8,1> + mov (16) MSGPAYLOAD(3,0)<1> DEC_Y(2,16)<32;8,1> + mov (16) MSGPAYLOAD(3,16)<1> DEC_Y(2,24)<32;8,1> + + mov (16) MSGPAYLOAD(4)<1> DEC_Y(4)<32;8,1> + mov (16) MSGPAYLOAD(4,16)<1> DEC_Y(4,8)<32;8,1> + mov (16) MSGPAYLOAD(5,0)<1> DEC_Y(4,16)<32;8,1> + mov (16) MSGPAYLOAD(5,16)<1> DEC_Y(4,24)<32;8,1> + + mov (16) MSGPAYLOAD(6)<1> DEC_Y(6)<32;8,1> + mov (16) MSGPAYLOAD(6,16)<1> DEC_Y(6,8)<32;8,1> + mov (16) MSGPAYLOAD(7,0)<1> DEC_Y(6,16)<32;8,1> + mov (16) MSGPAYLOAD(7,16)<1> DEC_Y(6,24)<32;8,1> + + send (8) REG_WRITE_COMMIT_Y<1>:ud MSGHDR MSGSRC<8;8,1>:ud DAPWRITE MSGDSC + + RETURN +// End of save_8x8_Y + +#endif // !defined(__SAVE_8X8_Y__) diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/save_I_PCM.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/save_I_PCM.asm --- libva-1.0.1/i965_drv_video/shaders/h264/mc/save_I_PCM.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/save_I_PCM.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,56 @@ +/* + * Save I_PCM Y samples to Y picture buffer + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Module name: save_I_PCM.asm +// +// First save I_PCM Y samples to Y picture buffer +// + mov (1) MSGSRC.2:ud 0x000F000F:ud {NoDDClr} // Block width and height (16x16) + shl (2) MSGSRC.0:ud ORIX<2;2,1>:ub 4:w {NoDDChk} // Convert MB origin in pixel unit + + add (1) MSGDSC REG_MBAFF_FIELD<0;1,0>:uw MSG_LEN(8)+DWBWMSGDSC_WC+DESTY:ud // Set message descriptor + + $for(0; <8; 2) { + mov (32) MSGPAYLOAD(%1)<1> I_PCM_Y(%1)REGION(16,1) {Compr,NoDDClr} + mov (32) MSGPAYLOAD(%1,16)<1> I_PCM_Y(%1,16)REGION(16,1) {Compr,NoDDChk} + } + + send (8) REG_WRITE_COMMIT_Y<1>:ud MSGHDR MSGSRC<8;8,1>:ud DAPWRITE MSGDSC + +// Then save I_PCM U/V samples to U/V picture buffer +// + mov (1) MSGHDR.2:ud 0x0007000F:ud {NoDDClr} // Block width and height (16x8) + asr (1) MSGHDR.1:ud MSGSRC.1<0;1,0>:ud 1:w {NoDDChk} // Y offset should be halved + add (1) MSGDSC MSGDSC 0x0-MSG_LEN(4)+0x1:d // Set message descriptor for U/V + +#if 0 + and.z.f0.0 (1) NULLREG REG_CHROMA_FORMAT_IDC CHROMA_FORMAT_IDC:ud + (f0.0) jmpi (1) MONOCHROME_I_PCM +#endif + +#ifndef MONO +// Non-monochrome picture +// + $for(0,0; <4; 2,1) { + mov (16) MSGPAYLOAD(%1)<2> I_PCM_UV(%2)REGION(16,1) // U data + mov (16) MSGPAYLOAD(%1,1)<2> I_PCM_UV(%2+2)REGION(16,1) // V data + mov (16) MSGPAYLOAD(%1+1)<2> I_PCM_UV(%2,16)REGION(16,1) // U data + mov (16) MSGPAYLOAD(%1+1,1)<2> I_PCM_UV(%2+2,16)REGION(16,1) // V data + } +#else // defined(MONO) +MONOCHROME_I_PCM: + $for(0; <4; 2) { + mov (16) MSGPAYLOADD(%1)<1> 0x80808080:ud {Compr} + } + +#endif // !defined(MONO) + + send (8) REG_WRITE_COMMIT_UV<1>:ud MSGHDR null:ud DAPWRITE MSGDSC + +// End of save_I_PCM diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/scoreboard.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/scoreboard.asm --- libva-1.0.1/i965_drv_video/shaders/h264/mc/scoreboard.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/scoreboard.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,282 @@ +/* + * Dependency control scoreboard kernel + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Kernel name: scoreboard.asm +// +// Dependency control scoreboard kernel +// +// $Revision: 16 $ +// $Date: 10/18/06 4:10p $ +// + +// ---------------------------------------------------- +// Main: scoreboard +// ---------------------------------------------------- +// ---------------------------------------------------- +// Scoreboard structure +// ---------------------------------------------------- +// +// 1 DWORD per thread +// +// Bit 31: "Checking" thread, i.e. an intra MB that sends "check dependency" message +// Bit 30: "Completed" thread. This bit set by an "update" message from intra/inter MB. +// Bits 29:28: Must set to 0 +// Bits 27:24: EUID +// Bits 23:18: Reserved +// Bits 17:16: TID +// Bits 15:8: X offset of current MB +// Bits 15:5: Reserved +// Bits 4:0: 5 bits of available neighbor MB flags + +.kernel scoreboard +SCOREBOARD: + +#ifdef _DEBUG +// WA for FULSIM so we'll know which kernel is being debugged +mov (1) acc0:ud 0xf0aa55a5:ud +#endif + +#include "header.inc" +#include "scoreboard_header.inc" + +// +// Now, begin source code.... +// + +.code + +#ifdef AS_ENABLED + and.z.f0.1 (1) NULLREG r0.2<0;1,0>:ud TH_RES // Is this a restarted thread previously interrupted? + (f0.1) jmpi (1) Scoreboard_Init + + #include "scoreboard_restore_AS.asm" + + jmpi (1) Scoreboard_OpenGW +Scoreboard_Init: +#endif // End AS_ENABLED + +// Scoreboard must be initialized to 0xc000ffff, meaning all "completed" +// And it also avoids message mis-handling for the first MB + $for(0; <32; 2) { + mov (16) CMD_SB(%1)<1> 0xc000ffff:ud {Compr} + } +#ifdef DOUBLE_SB // Scoreboard size needs to be doubled + $for(32; <64; 2) { + mov (16) CMD_SB(%1)<1> 0xc000ffff:ud {Compr} + } +#endif // DOUBLE_SB + +//---------------------------------------------------------- +// Open message gateway for the scoreboard thread +// +// RegBase = r4 (0x04) +// Gateway Size = 64 GRF registers (0x6) +// Dispatch ID = r0.20:ub +// Scoreboard Thread Key = 0 +//---------------------------------------------------------- +Scoreboard_OpenGW: + mov (8) MSGHDRY0<1>:ud 0x00000000:ud // Initialize message header payload with 0 + + // Send a message with register base RegBase=0x04(r4) and Gateway size = 0x6 = 64 GRF reg and Key = 0 + // 000 00000100 00000 00000 110 00000000 ==> 0000 0000 1000 0000 0000 0110 0000 0000 +#ifdef AS_ENABLED + add (1) MSGHDRY0.5<1>:ud r0.20:ub 0x00800700:ud // Allocate 128 GRFs for message gateway - for SIP to send notification MSG +#else + #ifdef DOUBLE_SB + add (1) MSGHDRY0.5<1>:ud r0.20:ub 0x00800600:ud // 64 GRF's for CTG-B + #else + add (1) MSGHDRY0.5<1>:ud r0.20:ub 0x00800500:ud // 32 GRF's for CTG-A + #endif // DOUBLE_SB +#endif + send (8) NULLREG MSGHDRY0 null:ud MSG_GW OGWMSGDSC + +//------------------------------------------------------------------------ +// Send Thread Spawning Message to start dispatching macroblock threads +// +//------------------------------------------------------------------------ +#ifdef AS_ENABLED + mov (8) acc0<1>:ud CMD_SB(31)<8;8,1> // Ensure scoreboard data have been completely restored +#endif // End AS_ENABLED + mov (8) MSGHDRY1<1>:ud r0<8;8,1>:ud // Initialize message header payload with R0 + mov (1) MSGHDRY1.4<1>:ud 0x00000400:ud // Dispatch URB length = 1 + + send (8) NULLREG MSGHDRY1 null:ud TS TSMSGDSC + + mov (8) MSGHDRY0<1>:ud 0x00000000:ud // Initialize message header payload with 0 + +//------------------------------------------------------------------------ +// Scoreboard control data initialization +//------------------------------------------------------------------------ +#ifdef AS_ENABLED + or (1) cr0.1:ud cr0.1:ud AS_INT_EN // Enable interrupt + (f0.1) jmpi (1) Scoreboard_State_Init // Jump if not restarted thread + + // Restore scoreboard kernel control data to r1 - r3 + mov (1) m4.1:ud 64:ud // Starting r1 + mov (1) m4.2:ud 0x0002001f:ud // for 3 registers + send (8) r1.0<1>:ud m4 null:ud DWBRMSGDSC_SC+0x00030000+AS_SAVE // Restore r1 - r3 + mov (8) a0.0<1>:uw AR_SAVE<8;8,1>:uw // Restore all address registers + +// Check whether all MBs have been decoded + cmp.e.f0.0 (1) NULLREG TotalMB<0;1,0>:w 0:w // Set "Last MB" flag + (-f0.0) jmpi (1) Before_First_MB + END_THREAD + +// Check whether it is before the first MB +Before_First_MB: + cmp.e.f0.0 (1) NULLREG AVAILFLAGD<1>:ud 0x08020401:ud // in ACBD order + (f0.0) jmpi (1) Wavefront_Walk + +Scoreboard_State_Init: +#endif // End AS_ENABLED + mov (2) WFLen_B<2>:w HEIGHTINMB_1<0;1,0>:w + mov (1) AVAILFLAGD<1>:ud 0x08020401:ud // in ACBD order + mov (1) CASE00PTR<1>:ud Notify_MSG_IP-No_Message_IP:ud // Inter kernel starts + mov (1) CASE10PTR<1>:ud Dependency_Check_IP-No_Message_IP:ud // Intra kernel starts +#ifdef AS_ENABLED + mov (1) CASE11PTR<1>:ud 0:ud // No message +#else + mov (1) CASE11PTR<1>:ud MB_Loop_IP-No_Message_IP:ud // No message +#endif // End AS_ENABLED + mov (1) StartXD<1>:ud 0:ud + mov (1) NewWFOffsetD<1>:ud 0x01ffff00:ud + + mov (4) WFStart(0)<1> 0xffff:w + mov (1) WFStart(0)<1> 0:w + + mov (8) a0.0<1>:uw 0x0:uw // Initialize all pointers to 0 + +//------------------------------------------------------------------------ +// Scoreboard message handling loop +//------------------------------------------------------------------------ +// +Scoreboard_Loop: + // Calculate current wavefront length + add.ge.f0.1 (16) acc0<1>:w StartX<0;1,0>:w 0:w // Used for x>2*y check + mac.g.f0.0 (16) NULLREGW WFLenY<0;1,0>:w -2:w // X - 2*Y > 0 ?? + (f0.0) mov (1) WFLen<1>:w WFLenY<0;1,0>:w // Use smaller vertical wavefront length + (-f0.0) asr.sat (1) WFLen<1>:uw StartX<0;1,0>:w 1:w // Horizontal wavefront length is smaller + + // Initialize 5-MB group +#ifdef ONE_MB_WA + mov (2) MBINDEX(0)<1> WFStart(0)<2;2,1> + (f0.1) add (4) MBINDEX(0,2)<1> WFStart(0,1)<4;4,1> -1:w + (-f0.1) add (4) MBINDEX(0,2)<1> WFStart(0,0)<4;4,1> -1:w + (-f0.1) mov (1) StartX<1>:w 0:w // WA for 1-MB wide pictures +#else + mov (2) MBINDEX(0)<1> WFStart(0)<2;2,1> {NoDDClr} + add (4) MBINDEX(0,2)<1> WFStart(0,1)<4;4,1> -1:w {NoDDChk} +#endif + + // Update WFStart + mov (8) acc0<1>:w WFStart(0)<0;1,0> // Move WFStart(0) to acc0 to remove dependency later + mov (4) WFStart(0,1)<1> WFStart(0)<4;4,1> {NoDDClr} // Shift WFStart(0:2) to WFStart(1:3) + add (1) WFStart(0)<1> acc0.0<0;1,0>:w WFLen<0;1,0>:w {NoDDChk} // WFStart(0) = WFStart(0) + WFLen + + mul (8) MBINDEX(0)<1> MBINDEX(0)<8;8,1> 4:w // Adjust MB order # to be DWORD aligned + and (1) DEPPTR<1>:uw acc0<0;1,0>:w SB_MASK*4:uw {NoDDClr} // Wrap around scoreboard entries for current MB + and (4) DEPPTRL<1>:uw acc0.1<4;4,1>:w SB_MASK*4:uw {NoDDChk} // Wrap around scoreboard entries for neighbor MBs + +Wavefront_Walk: + wait n0:ud +// Check for combined "checking" or "completed" threads in forwarded message +// 2 MSB of scoreboard message indicate: +// 0b00 = "inter start" message +// 0b10 = "intra start" message +// 0b11 = "No Message" or "inter complete" message +// 0b01 = Reserved (should never occur) +// +MB_Loop: + shr (1) PMSGSEL<1>:uw r[CMDPTR,CMD_SB_REG_OFF*GRFWIB+2]<0;1,0>:uw 12:w // DWORD aligned pointer to message handler + and.nz.f0.1 (4) NULLREG r[CMDPTR,CMD_SB_REG_OFF*GRFWIB]<0;1,0>:ub AVAILFLAG<4;4,1>:ub // f0.1 4 LSB will have the available flags in ACBD order + mov (1) MSGHDRY0.4<1>:ud r[CMDPTR,CMD_SB_REG_OFF*GRFWIB]<0;1,0>:ud // Copy MB thread info from scoreboard + jmpi (1) r[PMSGSEL, INLINE_REG_OFF*GRFWIB+16]<0;1,0>:d + +// Now determine whether this is "inter done" or "no message" +// through checking debug_counter +// +No_Message: +#ifdef AS_ENABLED + cmp.z.f0.1 (1) NULLREG n0:ud 0 // Are all messages handled? + and.z.f0.0 (1) NULLREG cr0.1:ud AS_INT // Poll interrupt bit + (-f0.1) jmpi (1) MB_Loop // Continue polling the remaining message from current thread + +// All messages have been handled + (f0.0) jmpi (1) Wavefront_Walk // No interrupt occurs. Wait for next one + +// Interrupt has been detected +// Save all contents and terminate the scoreboard +// + #include "scoreboard_save_AS.asm" + + // Save scoreboard control data as well + // + mov (8) AR_SAVE<1>:uw a0.0<8;8,1>:uw // All address registers needs to be saved + mov (1) MSGHDR.1:ud 64:ud + mov (1) MSGHDR.2:ud 0x0002001f:ud // for 3 registers + $for(0; <3; 1) { + mov (8) MSGPAYLOADD(%1)<1> CMD_SB(%1-3)REGION(8,1) + } + send (8) NULLREG MSGHDR null:ud DWBWMSGDSC+0x00300000+AS_SAVE // Save r1 - r3 + + send (8) NULLREG MSGHDR r0:ud EOTMSGDSC+TH_INT // Terminate with "Thread Interrupted" bit set +#endif // End AS_ENABLED + +Dependency_Check: +// Current thread is "checking" but not "completed" (0b10 case). +// Check for dependency clear using all availability bits +// + (f0.1) and.z.f0.1 (4) NULLREG r[DEPPTRL,CMD_SB_REG_OFF*GRFWIB+3]<1,0>:ub DONEFLAG:uw // f0.1 4 LSB contains dependency clear + (f0.1.any4h) jmpi (1) Dependency_Check // Dependency not clear, keep polling.. + +// "Checking" thread and dependency cleared, send a message to let the thread go +// +Notify_MSG: + send (8) NULLREG MSGHDRY0 null:ud MSG_GW FWDMSGDSC+NOTIFYMSG + +// Current macroblock has been serviced. Update to next macroblock in special zig-zag order +// +Update_CurMB: +#if 0 + add.ge.f0.0 (1) WFLen<1>:w WFLen<0;1,0>:w -1:w // Set "End of wavefront" flag + add (1) TotalMB<1>:w TotalMB<0;1,0>:w -1:w // Decrement "TotalMB" +#else + add.ge.f0.0 (2) TotalMB<2>:w TotalMB<4;2,2>:w -1:w // Set "End of wavefront" flag and decrement "TotalMB" +#endif + add (8) MBINDEX(0)<1> MBINDEX(0)<8;8,1> 4:w // Increment MB indices + and (1) DEPPTR<1>:uw acc0<0;1,0>:w SB_MASK*4:uw {NoDDClr} // Wrap around 256 scoreboard entries for current MB + and (4) DEPPTRL<1>:uw acc0.1<4;4,1>:w SB_MASK*4:uw {NoDDChk} // Wrap around 256 scoreboard entries for neighbor MBs + cmp.e.f0.1 (16) NULLREGW StartX<0;1,0>:uw WIDTHINMB_1<0;1,0>:uw // Set "on picture right boundary" flag +#if 0 + (f0.0) jmpi (1) Wavefront_Walk // Continue wavefront walking +#else + (f0.0.all2h) jmpi (1) Wavefront_Walk // Continue wavefront walking +#endif + +// Start new wavefront +// + cmp.e.f0.0 (1) NULLREG TotalMB<0;1,0>:w 0:w // Set "Last MB" flag + (f0.1) add (4) WFLen<1>:w WFLen<4;4,1>:w NewWFOffset<4;4,1>:b + (f0.1) add (4) WFStart(0)<1> WFStart(0)<4;4,1> 1:w + (-f0.1) add (1) StartX<1>:w StartX<0;1,0>:w 1:w // Move to right MB + (-f0.1) add (1) WFStart(0)<1> WFStart(0)<0;1,0> 1:w + + (-f0.0) jmpi (1) Scoreboard_Loop // Not last MB, start new wavefront walking + +// All MBs have decoded. Terminate the thread now +// + END_THREAD + +#if !defined(COMBINED_KERNEL) // For standalone kernel only +.end_code + +.end_kernel +#endif + +// End of scoreboard diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/Scoreboard_header.inc libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/Scoreboard_header.inc --- libva-1.0.1/i965_drv_video/shaders/h264/mc/Scoreboard_header.inc 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/Scoreboard_header.inc 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,85 @@ +/* + * Common header file for both scoreboard and scoreboard_MBAFF kernels + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +#if !defined(__SCOREBOARD_HEADER__) // Make sure this file is only included once +#define __SCOREBOARD_HEADER__ + +// Module name: scoreboard_header.inc +// +// Common header file for both scoreboard and scoreboard_MBAFF kernels +// + +#define ONE_MB_WA // Enable WA for 1-MB wide pictures. To disable WA, simply comment out this line. + +#define INLINE_REG_OFF 1 +#define INLINE_REG r1 +#define INLINE_REG1 r2 + +#define DONEFLAG 0x40 // Bit mask of "completed" thread flag + +// GRF r1 map +// +#define WIDTHINMB_1 INLINE_REG.0 // :uw type. Picture width in MB - 1 +#define HEIGHTINMB_1 INLINE_REG.1 // :uw type. Picture height in MB - 1 +#define TotalMB INLINE_REG.2 // :uw type. Total number of macroblocks +#define WFLen_B INLINE_REG.3 // :uw type. Bottom MB Wavefront length (Reserved for MBAFF scoreboard) +#define WFLen INLINE_REG.4 // :uw type. Wavefront length (used as loop counter) +#define WFLenY INLINE_REG.5 // :uw type. Wavefront length (vertical component) +#define StartX INLINE_REG.6 // :uw type. Start X of current wavefront +#define StartY INLINE_REG.7 // :uw type. Start Y of current wavefront +#define StartXD INLINE_REG.3 // :ud type. Start (X,Y) of current wavefront +#define CASE00PTR INLINE_REG.4 // :ud type. Pointer to "inter start" handler +#define WFLen_Save INLINE_REG.10 // :uw type. Saved Wavefront length (Reserved for MBAFF scoreboard) +#define CASE10PTR INLINE_REG.6 // :ud type. Pointer to "intra start" handler +#define CASE11PTR INLINE_REG.7 // :ud type. Pointer to "inter complete" handler + +// GRF r2 map +// +.declare WFStart Base=GRF(2) ElementSize=2 SrcRegion=REGION(4,1) Type=w // Start MB of recent 4 wavefronts, actually use 5 WORDs +.declare WFStart_T Base=GRF(2) ElementSize=2 SrcRegion=REGION(4,1) Type=w // Start MB of recent 4 wavefronts +.declare WFStart_B Base=GRF(2).4 ElementSize=2 SrcRegion=REGION(4,1) Type=w // Start MB of recent 4 wavefronts + +#define NewWFOffsetD INLINE_REG1.5 // :d type. Offsets used for new wavefront = 0x01ffff00 (0, -1, -1, 1) +#define NewWFOffset INLINE_REG1.20 // :b type. Offsets used for new wavefront = 0x01ffff00 (0, -1, -1, 1) + +#define AVAILFLAGD INLINE_REG1.6 // :ud type. Neighbor available flags = 0x08020401 (in ACBD order) +#define AVAILFLAG INLINE_REG1.24 // :ub type. Neighbor available flags as above +#define AVAILFLAG1D INLINE_REG1.7 // :ud type. Top-half neighbor available flags = 0x80402010 (in A_Bxxx order) + +.declare MBINDEX Base=GRF(3) ElementSize=2 SrcRegion=REGION(16,1) Type=w // MB order # of current MB group (Cur, ACBD and AC_B_D_) +#define AR_SAVE r3.8 // :uw type. Saved Address Register information + +#define CMDPTR a0.0 // :uw type. DWORD Pointer to the scoreboard +#define DEPPTR a0.0 // :uw type. Pointer to the dependency scoreboard - Current MB +#define DEPPTRL a0.1 // :uw type. Pointer to the dependency scoreboard - Left MB +#define DEPPTRTR a0.2 // :uw type. Pointer to the dependency scoreboard - Top right MB +#define DEPPTRT a0.3 // :uw type. Pointer to the dependency scoreboard - Top MB +#define DEPPTRTL a0.4 // :uw type. Pointer to the dependency scoreboard - Top left MB +#define DEPPTRLB a0.5 // :uw type. Pointer to the dependency scoreboard - Left bottom-half MB + +#define PMSGSEL a0.7 // :uw type. Pointer to current message in message handling table + +#define CMD_SB_REG_OFF 4 +.declare CMD_SB Base=GRF(4) ElementSize=4 SrcRegion=REGION(8,1) Type=ud // Command scoreboard (64 GRF) + +#ifdef AS_ENABLED +// Definitions for Advanced Scheduler support +#define AS_INT BIT23 // "Preemption Exception Status" bit in cr0.1:ud control register +#define AS_INT_EN BIT10 // "Preemption Exception Enable" bit in cr0.1:ud control register +#define TH_INT BIT2 // "Thread Interrupted" bit in message descriptor +#define TH_RES BIT0 // "Thread Restart Enable" bit in R0 header r0.2 + +#define AS_SAVE 34 // Surface state for saving scoreboard contents + // Ensure not to conflict with existing binding table entries +#endif // End AS_ENABLED + +// End of scoreboard_header + +#endif // !defined(__SCOREBOARD_HEADER__) + diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/scoreboard_MBAFF.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/scoreboard_MBAFF.asm --- libva-1.0.1/i965_drv_video/shaders/h264/mc/scoreboard_MBAFF.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/scoreboard_MBAFF.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,299 @@ +/* + * Dependency control scoreboard kernel for MBAFF frame + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Kernel name: scoreboard_MBAFF.asm +// +// Dependency control scoreboard kernel for MBAFF frame +// +// $Revision: 16 $ +// $Date: 10/18/06 4:10p $ +// + +// ---------------------------------------------------- +// Main: scoreboard_MBAFF +// ---------------------------------------------------- +// ---------------------------------------------------- +// Scoreboard structure +// ---------------------------------------------------- +// +// 1 DWORD per thread +// +// Bit 31: "Checking" thread, i.e. an intra MB that sends "check dependency" message +// Bit 30: "Completed" thread. This bit set by an "update" message from intra/inter MB. +// Bits 29:28: Must set to 0 +// Bits 27:24: EUID +// Bits 23:18: Reserved +// Bits 17:16: TID +// Bits 15:8: X offset of current MB +// Bits 15:5: Reserved +// Bits 4:0: 5 bits of available neighbor MB flags + +.kernel scoreboard_MBAFF +SCOREBOARD_MBAFF: + +#ifdef _DEBUG +// WA for FULSIM so we'll know which kernel is being debugged +mov (1) acc0:ud 0xffaa55a5:ud +#endif + +#include "header.inc" +#include "scoreboard_header.inc" + +// +// Now, begin source code.... +// + +.code + +#ifdef AS_ENABLED + and.z.f0.1 (1) NULLREG r0.2<0;1,0>:ud TH_RES // Is this a restarted thread previously interrupted? + (f0.1) jmpi (1) MBAFF_Scoreboard_Init + + #include "scoreboard_restore_AS.asm" + + jmpi (1) MBAFF_Scoreboard_OpenGW +MBAFF_Scoreboard_Init: +#endif // End AS_ENABLED + +// Scoreboard must be initialized to 0xc000ffff, meaning all "completed" +// And it also avoids message mis-handling for the first MB + $for(0; <32; 2) { + mov (16) CMD_SB(%1)<1> 0xc000ffff:ud {Compr} + } +#ifdef DOUBLE_SB // Scoreboard size needs to be doubled + $for(32; <64; 2) { + mov (16) CMD_SB(%1)<1> 0xc000ffff:ud {Compr} + } +#endif // DOUBLE_SB + +//---------------------------------------------------------- +// Open message gateway for the scoreboard thread +// +// RegBase = r4 (0x04) +// Gateway Size = 64 GRF registers (0x6) +// Dispatch ID = r0.20:ub +// Scoreboard Thread Key = 0 +//---------------------------------------------------------- +MBAFF_Scoreboard_OpenGW: + mov (8) MSGHDRY0<1>:ud 0x00000000:ud // Initialize message header payload with 0 + + // Send a message with register base RegBase=0x04(r4) and Gateway size = 0x6 = 64 GRF reg and Key = 0 + // 000 00000100 00000 00000 110 00000000 ==> 0000 0000 1000 0000 0000 0110 0000 0000 +#ifdef AS_ENABLED + add (1) MSGHDRY0.5<1>:ud r0.20:ub 0x00800700:ud // Allocate 128 GRFs for message gateway - for SIP to send notification MSG +#else + #ifdef DOUBLE_SB + add (1) MSGHDRY0.5<1>:ud r0.20:ub 0x00800600:ud // 64 GRF's for CTG-B + #else + add (1) MSGHDRY0.5<1>:ud r0.20:ub 0x00800500:ud // 32 GRF's for CTG-A + #endif // DOUBLE_SB +#endif + + send (8) NULLREG MSGHDRY0 null:ud MSG_GW OGWMSGDSC + +//------------------------------------------------------------------------ +// Send Thread Spawning Message to start dispatching macroblock threads +// +//------------------------------------------------------------------------ +#ifdef AS_ENABLED + mov (8) acc0<1>:ud CMD_SB(31)<8;8,1> // Ensure scoreboard data have been completely restored +#endif // End AS_ENABLED + mov (8) MSGHDRY1<1>:ud r0<8;8,1>:ud // Initialize message header payload with R0 + mov (1) MSGHDRY1.4<1>:ud 0x00000400:ud // Dispatch URB length = 1 + + send (8) NULLREG MSGHDRY1 null:ud TS TSMSGDSC + + mov (8) MSGHDRY0<1>:ud 0x00000000:ud // Initialize message header payload with 0 + +//------------------------------------------------------------------------ +// Scoreboard control data initialization +//------------------------------------------------------------------------ +#ifdef AS_ENABLED + or (1) cr0.1:ud cr0.1:ud AS_INT_EN // Enable interrupt + (f0.1) jmpi (1) MBAFF_Scoreboard_State_Init // Jump if not restarted thread + + // Restore scoreboard kernel control data to r1 - r3 + mov (1) m4.1:ud 64:ud // Starting r1 + mov (1) m4.2:ud 0x0002001f:ud // for 3 registers + send (8) r1.0<1>:ud m4 null:ud DWBRMSGDSC_SC+0x00030000+AS_SAVE // Restore r1 - r3 + and (1) CMDPTR<1>:uw MBINDEX(0)<0;1,0> SB_MASK*4:uw // Restore scoreboard entries for current MB + +// EOT if all MBs have been decoded + cmp.e.f0.0 (1) NULLREG TotalMB<0;1,0>:w 0:w // Set "Last MB" flag + (-f0.0) jmpi (1) MBAFF_Before_First_MB + END_THREAD + +// Check whether it is before the first MB +MBAFF_Before_First_MB: + cmp.e.f0.0 (1) NULLREG AVAILFLAGD<1>:ud 0x08020401:ud // in ACBD order + (f0.0) jmpi (1) MBAFF_Wavefront_Walk + +MBAFF_Scoreboard_State_Init: +#endif // End AS_ENABLED + mov (2) WFLen_B<2>:w HEIGHTINMB_1<0;1,0>:w + mov (1) AVAILFLAGD<1>:ud 0x08020401:ud // in ACBD order + mov (1) AVAILFLAG1D<1>:ud 0x08020410:ud // in A_C_B_D_ order + mov (1) CASE00PTR<1>:ud MBAFF_Notify_MSG_IP-MBAFF_No_Message_IP:ud // Inter kernel starts + mov (1) CASE10PTR<1>:ud MBAFF_Dependency_Check_IP-MBAFF_No_Message_IP:ud // Intra kernel starts +#ifdef AS_ENABLED + mov (1) CASE11PTR<1>:ud 0:ud // No message +#else + mov (1) CASE11PTR<1>:ud MBAFF_MB_Loop_IP-MBAFF_No_Message_IP:ud // No message +#endif // End AS_ENABLED + mov (1) StartXD<1>:ud 0:ud + mov (1) NewWFOffsetD<1>:ud 0x01ffff00:ud + + mov (8) WFStart_T(0)<1> 0xffff:w + mov (1) WFStart_T(0)<1> 0:w + + mov (8) a0.0<1>:uw 0x0:uw // Initialize all pointers to 0 + +//------------------------------------------------------------------------ +// Scoreboard message handling loop +//------------------------------------------------------------------------ +// +MBAFF_Scoreboard_Loop: +// Calculate current wavefront length (same for top and bottom MB wavefronts) + add.ge.f0.1 (16) acc0<1>:w StartX<0;1,0>:w 0:w // Used for x>2*y check + mac.g.f0.0 (16) NULLREGW WFLenY<0;1,0>:w -2:w // X - 2*Y > 0 ?? + (f0.0) mov (2) WFLen_B<1>:w WFLenY<0;1,0>:w // Use smaller vertical wavefront length + (f0.0) mov (1) WFLen_Save<1>:w WFLenY<0;1,0>:w // Save current wave front length + (-f0.0) asr.sat (2) WFLen_B<1>:uw StartX<0;1,0>:w 1:w // Horizontal wavefront length is smaller + (-f0.0) asr.sat (1) WFLen_Save<1>:uw StartX<0;1,0>:w 1:w // Save current wave front length + +// Initialize 9-MB group for top macroblock wavefront +#ifdef ONE_MB_WA_MBAFF + mov (2) MBINDEX(0)<1> WFStart_T(0)<2;2,1> + (f0.1) add (4) MBINDEX(0,2)<1> WFStart_B(0,1)<4;4,1> -1:w + (-f0.1) add (4) MBINDEX(0,2)<1> WFStart_B(0,0)<4;4,1> -1:w + mov (1) MBINDEX(0,5)<1> WFStart_B(0,1)<0;1,0> + (-f0.1) mov (1) StartX<1>:w 0:w // WA for 1-MB wide pictures +#else + mov (2) MBINDEX(0)<1> WFStart_T(0)<2;2,1> {NoDDClr} + add (4) MBINDEX(0,2)<1> WFStart_B(0,1)<4;4,1> -1:w {NoDDChk,NoDDClr} + mov (1) MBINDEX(0,5)<1> WFStart_B(0,1)<0;1,0> {NoDDChk,NoDDClr} + add (4) MBINDEX(0,6)<1> WFStart_T(0,1)<4;4,1> -1:w {NoDDChk} // Upper MB group (C_B_D_x) +#endif + +// Update WFStart_B[0] + add (8) acc0<1>:w WFLen<0;1,0>:w 1:w // WFLen + 1 + add (1) WFStart_B(0,0)<1> acc0<0;1,0>:w WFStart_T(0,0)<0;1,0> // WFStart_T[0] + WFLen + 1 + +MBAFF_Start_Wavefront: + mul (16) MBINDEX(0)<1> MBINDEX(0)REGION(16,1) 4:w // Adjust MB order # to be DWORD aligned + and (1) CMDPTR<1>:uw acc0<0;1,0>:w SB_MASK*4:uw // Wrap around scoreboard entries for current MB + +MBAFF_Wavefront_Walk: + wait n0:ud + +// Check for combined "checking" or "completed" threads in forwarded message +// 2 MSB of scoreboard message indicate: +// 0b00 = "inter start" message +// 0b10 = "intra start" message +// 0b11 = "No Message" or "inter complete" message +// 0b01 = Reserved (should never occur) +// +MBAFF_MB_Loop: + shr (1) PMSGSEL<1>:uw r[CMDPTR,CMD_SB_REG_OFF*GRFWIB+2]<0;1,0>:uw 12:w // DWORD aligned pointer to message handler + and.nz.f0.1 (8) NULLREG r[CMDPTR,CMD_SB_REG_OFF*GRFWIB]<0;1,0>:ub AVAILFLAG<8;8,1>:ub // f0.1 8 LSB will have the available flags in ACBDA_C_B_D_ order + mov (1) MSGHDRY0.4<1>:ud r[CMDPTR,CMD_SB_REG_OFF*GRFWIB]<0;1,0>:ud // Copy MB thread info from scoreboard + jmpi (1) r[PMSGSEL, INLINE_REG_OFF*GRFWIB+16]<0;1,0>:d + +// Now determine whether this is "inter done" or "no message" +// through checking debug_counter +// +MBAFF_No_Message: +#ifdef AS_ENABLED + cmp.z.f0.1 (1) NULLREG n0:ud 0 // Are all messages handled? + and.z.f0.0 (1) NULLREG cr0.1:ud AS_INT // Poll interrupt bit + (-f0.1) jmpi (1) MBAFF_MB_Loop // Continue polling the remaining message from current thread + +// All messages have been handled + (f0.0) jmpi (1) MBAFF_Wavefront_Walk // No interrupt occurs. Wait for next one + +// Interrupt has been detected +// Save all contents and terminate the scoreboard +// + #include "scoreboard_save_AS.asm" + + // Save scoreboard control data as well + // + mov (1) MSGHDR.1:ud 64:ud + mov (1) MSGHDR.2:ud 0x0002001f:ud // for 3 registers + $for(0; <3; 1) { + mov (8) MSGPAYLOADD(%1)<1> CMD_SB(%1-3)REGION(8,1) + } + send (8) NULLREG MSGHDR null:ud DWBWMSGDSC+0x00300000+AS_SAVE // Save r1 - r3 + + send (8) NULLREG MSGHDR r0:ud EOTMSGDSC+TH_INT // Terminate with "Thread Interrupted" bit set +#endif // End AS_ENABLED + +MBAFF_Dependency_Check: +// Current thread is "checking" but not "completed" (0b10 case). +// Check for dependency clear using all availability bits +// + and (8) DEPPTR<1>:uw MBINDEX(0,1)REGION(8,1) SB_MASK*4:uw // Wrap around scoreboard entries for current MB +MBAFF_Dependency_Polling: + (f0.1) and.z.f0.1 (8) NULLREG r[DEPPTR,CMD_SB_REG_OFF*GRFWIB+3]<1,0>:ub DONEFLAG:uw // f0.1 8 LSB contains dependency clear + (f0.1.any8h) jmpi (1) MBAFF_Dependency_Polling // Dependency not clear, keep polling.. + +// "Checking" thread and dependency cleared, send a message to let the thread go +// +MBAFF_Notify_MSG: + send (8) NULLREG MSGHDRY0 null:ud MSG_GW FWDMSGDSC+NOTIFYMSG + +// Current macroblock has been serviced. Update to next macroblock in special zig-zag order +// +MBAFF_Update_CurMB: + add.ge.f0.0 (2) TotalMB<2>:w TotalMB<4;2,2>:w -1:w // Set "End of wavefront" flag and decrement "TotalMB" + add (16) MBINDEX(0)<1> MBINDEX(0)REGION(16,1) 4:w // Increment MB indices + and (1) CMDPTR<1>:uw acc0<0;1,0>:w SB_MASK*4:uw // Wrap around scoreboard entries for current MB + (f0.0.all2h) jmpi (1) MBAFF_Wavefront_Walk // Continue wavefront walking + +// Top macroblock wavefront walk done, start bottom MB wavefront + add.ge.f0.0 (1) WFLen<1>:w WFLen_B<0;1,0>:w 0:w {NoDDClr} // Set bottom MB wavefront length + mov (1) WFLen_B<1>:w -1:w {NoDDChk} // Reset bottom MB wavefront length + +// Initialize 9-MB group for bottom macroblock wavefront + mov (8) MBINDEX(0)<1> WFStart_B(0)<1;4,0> {NoDDClr} // Initialize with WFStart_B[0] and WFStart_B[1] + mov (4) MBINDEX(0,1)<1> WFStart_T(0,1)<0;1,0> {NoDDChk,NoDDClr} // Initialize with WFStart_T[1] + mov (2) MBINDEX(0,2)<1> WFStart_T(0)<0;1,0> {NoDDChk,NoDDClr} // Initialize with WFStart_T[0] + add (4) MBINDEX(0,6)<1> WFStart_B(0,1)<4;4,1> -1:w {NoDDChk} // Upper MB group (C_B_D_x) + + (f0.0) jmpi (1) MBAFF_Start_Wavefront // Start bottom MB wavefront walk + +// Start new wavefront +// + cmp.e.f0.1 (16) NULLREGW StartX<0;1,0>:uw WIDTHINMB_1<0;1,0>:uw // Set "on picture right boundary" flag + + // Update WFStart_T and WFStart_B + add (8) acc0<1>:w WFStart_T(0)REGION(1,0) 1:w // Move WFStart_T[0]+1 to acc0 to remove dependency later + mov (8) WFStart_T(0,1)<1> WFStart_T(0)<8;8,1> {NoDDClr} // Shift WFStart_T(B)[0:2] to WFStart_T(B)[1:3] + mac (1) WFStart_T(0,0)<1> WFLen_Save<0;1,0>:w 2:w {NoDDChk} // WFStart_T[0] = WFStart_T[0] + 2*WFLen + + cmp.e.f0.0 (1) NULLREG TotalMB<0;1,0>:w 0:w // Set "Last MB" flag + + (f0.1) add (4) WFLen<1>:w WFLen<4;4,1>:w NewWFOffset<4;4,1>:b // + (0, -1, -1, 1) + (f0.1) add (8) WFStart_T(0)<1> WFStart_T(0)REGION(4,1) 1:w + (-f0.1) add (1) StartX<1>:w StartX<0;1,0>:w 1:w // Move to right MB + (-f0.1) add (1) WFStart_T(0)<1> WFStart_T(0)REGION(1,0) 1:w + + (-f0.0) jmpi (1) MBAFF_Scoreboard_Loop // Not last MB, start new wavefront walking + +// All MBs have decoded. Terminate the thread now +// + END_THREAD + +#if !defined(COMBINED_KERNEL) // For standalone kernel only +.end_code + +.end_kernel +#endif + +// End of scoreboard_MBAFF diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/scoreboard_restore_AS.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/scoreboard_restore_AS.asm --- libva-1.0.1/i965_drv_video/shaders/h264/mc/scoreboard_restore_AS.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/scoreboard_restore_AS.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,54 @@ +/* + * Restore previously stored scoreboard data after content switching back + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Module name: scoreboard_restore_AS.asm +// +// Restore previously stored scoreboard data after content switching back +// +// + // Restore scoreboard data to r4 - r67 + // They are saved in a 2D surface with width of 32 and height of 80. + // Each row corresponds to one GRF register in the following order + // r4 - r67 : Scoreboard message + // + mov (8) MSGSRC<1>:ud r0.0<8;8,1>:ud {NoDDClr} // Initialize message header payload with r0 + + mov (2) MSGSRC.0:ud 0:ud {NoDDClr, NoDDChk} // Starting r4 + mov (1) MSGSRC.2:ud 0x0007001f:ud {NoDDChk} // for 8 registers + send (8) CMD_SB(0)<1> m1 MSGSRC<8;8,1>:ud DWBRMSGDSC_SC+0x00080000+AS_SAVE // Restore r4 - r11 + + mov (8) m2:ud MSGSRC<8;8,1>:ud + mov (1) m2.1:ud 8:ud + send (8) CMD_SB(8)<1> m2 null:ud DWBRMSGDSC_SC+0x00080000+AS_SAVE // Restore r12 - r19 + + mov (8) m3:ud MSGSRC<8;8,1>:ud + mov (1) m3.1:ud 16:ud + send (8) CMD_SB(16)<1> m3 null:ud DWBRMSGDSC_SC+0x00080000+AS_SAVE // Restore r20 - r27 + + mov (8) m4:ud MSGSRC<8;8,1>:ud + mov (1) m4.1:ud 24:ud + send (8) CMD_SB(24)<1> m4 null:ud DWBRMSGDSC_SC+0x00080000+AS_SAVE // Restore r28 - r35 + + mov (8) m5:ud MSGSRC<8;8,1>:ud + mov (1) m5.1:ud 32:ud + send (8) CMD_SB(32)<1> m5 null:ud DWBRMSGDSC_SC+0x00080000+AS_SAVE // Restore r36 - r43 + + mov (8) m6:ud MSGSRC<8;8,1>:ud + mov (1) m6.1:ud 40:ud + send (8) CMD_SB(40)<1> m6 null:ud DWBRMSGDSC_SC+0x00080000+AS_SAVE // Restore r44 - r51 + + mov (8) m7:ud MSGSRC<8;8,1>:ud + mov (1) m7.1:ud 48:ud + send (8) CMD_SB(48)<1> m7 null:ud DWBRMSGDSC_SC+0x00080000+AS_SAVE // Restore r52 - r59 + + mov (8) m8:ud MSGSRC<8;8,1>:ud + mov (1) m8.1:ud 56:ud + send (8) CMD_SB(56)<1> m8 null:ud DWBRMSGDSC_SC+0x00080000+AS_SAVE // Restore r60 - r67 + +// End of scoreboard_restore_AS diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/scoreboard_save_AS.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/scoreboard_save_AS.asm --- libva-1.0.1/i965_drv_video/shaders/h264/mc/scoreboard_save_AS.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/scoreboard_save_AS.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,72 @@ +/* + * Save scoreboard data before content switching + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Module name: scoreboard_save_AS.asm +// +// Save scoreboard data before content switching +// +// + // r1 - r35 need to be saved + // They are saved in a 2D surface with width of 32 and height of 64. + // Each row corresponds to one GRF register in the following order + // r4 - r35 : Scoreboard message + // r1 - r3 : Scoreboard kernel control data + + mov (8) MSGHDR<1>:ud r0.0<8;8,1>:ud // Initialize message header payload with r0 + mov (1) MSGHDR.2:ud 0x0007001f:ud // for 8 registers + + mov (2) MSGHDR.0:ud 0:ud + $for(0; <8; 2) { + mov (16) MSGPAYLOADD(%1)<1> CMD_SB(%1)REGION(8,1) {Compr} + } + send (8) NULLREG MSGHDR null:ud DWBWMSGDSC+0x00800000+AS_SAVE // Save r4 - r11 + + mov (1) MSGHDR.1:ud 8:ud + $for(0; <8; 2) { + mov (16) MSGPAYLOADD(%1)<1> CMD_SB(%1+8)REGION(8,1) {Compr} + } + send (8) NULLREG MSGHDR null:ud DWBWMSGDSC+0x00800000+AS_SAVE // Save r12 - r19 + + mov (1) MSGHDR.1:ud 16:ud + $for(0; <8; 2) { + mov (16) MSGPAYLOADD(%1)<1> CMD_SB(%1+16)REGION(8,1) {Compr} + } + send (8) NULLREG MSGHDR null:ud DWBWMSGDSC+0x00800000+AS_SAVE // Save r20 - r27 + + mov (1) MSGHDR.1:ud 24:ud + $for(0; <8; 2) { + mov (16) MSGPAYLOADD(%1)<1> CMD_SB(%1+24)REGION(8,1) {Compr} + } + send (8) NULLREG MSGHDR null:ud DWBWMSGDSC+0x00800000+AS_SAVE // Save r28 - r35 + + mov (1) MSGHDR.1:ud 32:ud + $for(0; <8; 2) { + mov (16) MSGPAYLOADD(%1)<1> CMD_SB(%1+32)REGION(8,1) {Compr} + } + send (8) NULLREG MSGHDR null:ud DWBWMSGDSC+0x00800000+AS_SAVE // Save r36 - r43 + + mov (1) MSGHDR.1:ud 40:ud + $for(0; <8; 2) { + mov (16) MSGPAYLOADD(%1)<1> CMD_SB(%1+40)REGION(8,1) {Compr} + } + send (8) NULLREG MSGHDR null:ud DWBWMSGDSC+0x00800000+AS_SAVE // Save r44 - r51 + + mov (1) MSGHDR.1:ud 48:ud + $for(0; <8; 2) { + mov (16) MSGPAYLOADD(%1)<1> CMD_SB(%1+48)REGION(8,1) {Compr} + } + send (8) NULLREG MSGHDR null:ud DWBWMSGDSC+0x00800000+AS_SAVE // Save r52 - r59 + + mov (1) MSGHDR.1:ud 56:ud + $for(0; <8; 2) { + mov (16) MSGPAYLOADD(%1)<1> CMD_SB(%1+56)REGION(8,1) {Compr} + } + send (8) NULLREG MSGHDR null:ud DWBWMSGDSC+0x00800000+AS_SAVE // Save r60 - r67 + +// End of scoreboard_save_AS diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/scoreboard_sip.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/scoreboard_sip.asm --- libva-1.0.1/i965_drv_video/shaders/h264/mc/scoreboard_sip.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/scoreboard_sip.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,34 @@ +/* + * Scoreboard interrupt handler + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Kernel name: scoreboard_sip.asm +// +// scoreboard interrupt handler +// +// Simply send a notification message to scoreboard thread + + mov (8) m0<1>:ud 0x00000000:ud // Initialize message header payload with 0 +#ifdef DOUBLE_SB + mov (1) m0.5<1>:ud 0x08000200:ud // Message length = 1 DWORD, sent to GRF offset 64 registers +#else + mov (1) m0.5<1>:ud 0x04000200:ud // Message length = 1 DWORD, sent to GRF offset 32 registers +#endif + send (8) null<1>:ud m0 null:ud 0x03108002 // Send notification message to scoreboard kernel + + and (1) cr0.1:ud cr0.1:ud 0x00800000 // Clear preempt exception bit + and (1) cr0.0:ud cr0.0:ud 0x7fffffff:ud // Exit SIP routine + nop // Required by B-spec + +.end_code + + + + + + diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/scoreboard_start_inter.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/scoreboard_start_inter.asm --- libva-1.0.1/i965_drv_video/shaders/h264/mc/scoreboard_start_inter.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/scoreboard_start_inter.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,47 @@ +/* + * Scoreboard function for starting inter prediction kernels + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +#if !defined(__SCOREBOARD_START_INTER__) +#define __SCOREBOARD_START_INTER__ +// +// Module name: scoreboard_start_inter.asm +// +// Scoreboard function for starting inter prediction kernels +// This function is only used by inter prediction kernels to send message to +// scoreboard in order to announce the inter kernel has started +// +// $Revision: 5 $ +// $Date: 10/18/06 4:11p $ +// +scoreboard_start_inter: + +// First open message gateway since intra kernels need wake-up message to resume +// + mov (8) MSGHDRY0<1>:ud 0x00000000:ud // Initialize message header payload with 0 + + // Send a message with register base RegBase = r0 (0x0) and Size = 0x0 + // 000 00000000 00000 00000 000 00000000 ==> 0000 0000 0000 0000 0000 0000 0000 0000 + // --------------------------------------------------------------------------------- + send (8) NULLREG MSGHDRY0 null:ud MSG_GW OGWMSGDSC + +// Derive the scoreboard location where the inter thread writes to +// + mov (8) MSGHDRY1<1>:ud 0x00000000:ud // Initialize message header payload with 0 + + // Compose M0.5:ud + #include "set_SB_offset.asm" + + // Compose M0.0:ud, i.e. message payload + or (1) MSGHDRY1.1<1>:uw sr0.0<0;1,0>:uw 0x0000:uw // Set EUID/TID bits + inter start bit + + send (8) NULLREG MSGHDRY1 null:ud MSG_GW FWDMSGDSC+NOTIFYMSG // Send "Inter start" message to scoreboard kernel + + RETURN + +#endif // !defined(__SCOREBOARD_START_INTER__) diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/scoreboard_start_intra.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/scoreboard_start_intra.asm --- libva-1.0.1/i965_drv_video/shaders/h264/mc/scoreboard_start_intra.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/scoreboard_start_intra.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,52 @@ +/* + * Scoreboard function for starting intra prediction kernels + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +#if !defined(__SCOREBOARD_START_INTRA__) +#define __SCOREBOARD_START_INTRA__ +// +// Module name: scoreboard_start_intra.asm +// +// Scoreboard function for starting intra prediction kernels +// This function is only used by intra prediction kernels to send message to +// scoreboard in order to check dependency clearance +// +// $Revision: 5 $ +// $Date: 10/18/06 4:11p $ +// +scoreboard_start_intra: + +// First open message gateway since intra kernels need wake-up message to resume +// + mov (8) MSGHDRY0<1>:ud 0x00000000:ud // Initialize message header payload with 0 + + // Send a message with register base RegBase = r0 (0x0) and Size = 0x0 + // 000 00000000 00000 00000 000 00000000 ==> 0000 0000 0000 0000 0000 0000 0000 0000 + // --------------------------------------------------------------------------------- + and (1) MSGHDRY0.8<1>:uw REG_INTRA_PRED_AVAIL_FLAG_BYTE<0;1,0>:ub 0x1f:uw // Set lower word of key + send (8) NULLREG MSGHDRY0 null:ud MSG_GW OGWMSGDSC + +// Send "check dependency" message to scoreboard thread +// -------------------------- + +// Derive the scoreboard location where the intra thread writes to +// + mov (8) MSGHDRY1<1>:ud 0x00000000:ud // Initialize message header payload with 0 + + // Compose M0.5:ud + #include "set_SB_offset.asm" + + // Compose M0.0:ud, i.e. message payload + and (1) MSGHDRY1.0<1>:uw REG_INTRA_PRED_AVAIL_FLAG_BYTE<0;1,0>:ub 0x1f:uw // Set lower word of message + or (1) MSGHDRY1.1<1>:uw sr0.0<0;1,0>:uw 0x8000:uw // Set EUID/TID bits + intra start bit + + send (8) NULLREG MSGHDRY1 null:ud MSG_GW FWDMSGDSC+NOTIFYMSG // Send "Intra start" message to scoreboard kernel + + RETURN + +#endif // !defined(__SCOREBOARD_START_INTRA__) diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/scoreboard_update.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/scoreboard_update.asm --- libva-1.0.1/i965_drv_video/shaders/h264/mc/scoreboard_update.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/scoreboard_update.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,41 @@ +/* + * Scoreboard update function for decoding kernels + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// +// Module name: scoreboard_update.asm +// +// Scoreboard update function for decoding kernels +// +// This module is used by decoding kernels to send message to scoreboard to update the +// "complete" status, thus the dependency of the MB can be cleared. +// +// $Revision: 6 $ +// $Date: 10/16/06 5:19p $ +// + mov (8) MSGHDRY1<1>:ud 0x00000000:ud // Initialize message header payload with 0 + + // Compose M0.5:ud information + add (1) MSGHDRY1.10<1>:uw r0.20:ub 0x0200:uw // Message length = 1 DWORD + and (1) MSGHDRY1.11<1>:uw M05_STORE<0;1,0>:uw SB_MASK*4:uw // Retrieve stored value and wrap around scoreboard + + or (1) MSGHDRY1.0<1>:ud M05_STORE<0;1,0>:uw 0xc0000000:ud // Set "Completed" bits + +#ifndef BSDRESET_ENABLE +#ifdef INTER_KERNEL + mov (1) gREG_WRITE_COMMIT_Y<1>:ud gREG_WRITE_COMMIT_Y<0;1,0>:ud // Make sure Y write is committed + mov (1) gREG_WRITE_COMMIT_UV<1>:ud gREG_WRITE_COMMIT_UV<0;1,0>:ud // Make sure U/V write is committed +#else + mov (1) REG_WRITE_COMMIT_Y<1>:ud REG_WRITE_COMMIT_Y<0;1,0>:ud // Make sure Y write is committed + mov (1) REG_WRITE_COMMIT_UV<1>:ud REG_WRITE_COMMIT_UV<0;1,0>:ud // Make sure U/V write is committed +#endif // INTER_KERNEL +#endif // BSDRESET_ENABLE + + send (8) NULLREG MSGHDRY1 null:ud MSG_GW FWDMSGDSC + +// End of scoreboard_update diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/SetHWScoreboard.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/SetHWScoreboard.asm --- libva-1.0.1/i965_drv_video/shaders/h264/mc/SetHWScoreboard.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/SetHWScoreboard.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,209 @@ +/* + * Set dependency control HW scoreboard kernel + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Kernel name: SetHWScoreboard.asm +// +// Set dependency control HW scoreboard kernel +// + +// ---------------------------------------------------- +// Main: SetHWScoreboard +// ---------------------------------------------------- + +.kernel SetHWScoreboard + +SETHWSCOREBOARD: + +#ifdef _DEBUG +// WA for FULSIM so we'll know which kernel is being debugged +mov (1) acc0:ud 0xf0aa55a5:ud +#endif + +#include "header.inc" +#include "SetHWScoreboard_header.inc" + +// +// Now, begin source code.... +// + +.code + +// Separate the TotalMB so TotalMB will be multiple of 8 +// and RemainderMB will hold the TotalMB%8 +// + and.z.f0.1 (1) RemainderMB<1>:uw TotalMB<0;1,0>:uw 0x0007:uw // number of %8 commands + and.z.f0.0 (1) TotalMB<1>:uw TotalMB<0;1,0>:uw 0xfff8:uw // Number of 8-command blocks + + mov (1) MB_SHIFT_MASK_W<1>:uw 0x100*16+12:w // Set up shift values (12, 16) + +// Initialize common DAP read header +// + mov (8) MRF_READ_HEADER_SRC<1>:ud r0.0<8;8,1>:ud + shl (1) MRF_READ_HEADER_SRC.2<1>:ud StartingMB<0;1,0>:uw 6:uw // Byte-aligned offset being read + +// Initialize Inter DAP write header + mov (8) MRF_INTER_WRITE_HEADER<1>:ud r0.0<8;8,1>:ud + + (f0.0) jmpi (1) SetHWScoreboard_Remainder // Jump if TotalMB < 8 + +//------------------------------------------------------------------------ +// Command buffer parsing loop +// Each loop will handle 8 commands +//------------------------------------------------------------------------ +// +SetHWScoreboard_Loop: +// Load block 0 (Commands 0/1) + mov (8) MRF_READ_HEADER0.0<1>:ud MRF_READ_HEADER_SRC.0<8;8,1>:ud + send (16) CMD_BUFFER_W(0)<1> MRF_READ_HEADER0 null:uw DAPREAD RESP_LEN(4)+OWBRMSGDSC_SC+OWORD_8+BI_CMD_BUFFER + +// Load block 1 (Commands 2/3) + mov (8) MRF_READ_HEADER1.0<1>:ud MRF_READ_HEADER_SRC.0<8;8,1>:ud + add (1) MRF_READ_HEADER1.2<1>:ud MRF_READ_HEADER_SRC.2<0;1,0>:ud 128:ud // Point to next 2-command block + send (16) CMD_BUFFER_W(4)<1> MRF_READ_HEADER1 null:uw DAPREAD RESP_LEN(4)+OWBRMSGDSC_SC+OWORD_8+BI_CMD_BUFFER + +// Load block 2 (Commands 4/5) + mov (8) MRF_READ_HEADER2.0<1>:ud MRF_READ_HEADER_SRC.0<8;8,1>:ud + add (1) MRF_READ_HEADER2.2<1>:ud MRF_READ_HEADER_SRC.2<0;1,0>:ud 256:ud // Point to next 2-command block + send (16) CMD_BUFFER_W(8)<1> MRF_READ_HEADER2 null:uw DAPREAD RESP_LEN(4)+OWBRMSGDSC_SC+OWORD_8+BI_CMD_BUFFER + +// Load block 3 (Commands 6/7) + mov (8) MRF_READ_HEADER3.0<1>:ud MRF_READ_HEADER_SRC.0<8;8,1>:ud + add (1) MRF_READ_HEADER3.2<1>:ud MRF_READ_HEADER_SRC.2<0;1,0>:ud 384:ud // Point to next 2-command block + send (16) CMD_BUFFER_W(12)<1> MRF_READ_HEADER3 null:uw DAPREAD RESP_LEN(4)+OWBRMSGDSC_SC+OWORD_8+BI_CMD_BUFFER + +// Start parsing commands + $for(0; <16; 2) { + and.nz.f0.1 (8) NULLREG CMD_BUFFER_D(%1,4)<0;1,0> IS_INTRA_MB:ud // Is it an "Intra" MB? + or (1) CMD_BUFFER_D(%1,2)<1> CMD_BUFFER_D(%1,2)<0;1,0> BIT21:ud // Set "Use Scoreboard" for every MB + shl (2) CMD_BUFFER_W(%1,2)<1> CMD_BUFFER_W(%1,14)<0;1,0> MB_SHIFT_MASK_B<2;2,1>:b // Set HW SB masks + mov (2) CMD_BUFFER_B(%1,4)<2> CMD_BUFFER_B(%1,20)<2;2,1> // Set scoreboard (X,Y) for intra MB + (-f0.1) mov (2) CMD_BUFFER_W(%1,2)<1> CMD_BUFFER_B(%1,20)<2;2,1> // Set scoreboard (X,Y) for inter MB + (f0.1) jmpi (1) Parse_8_Loop_%1 + +// Inter Macroblock +// Output MEDIA_OBJECT command in raster scan order + mul (16) acc0<1>:uw CMD_BUFFER_B(%1,21)<0;1,0> PicWidthMB<0;1,0>:uw // MB offset = Y*W + add (16) acc0<1>:uw acc0<8;8,1>:uw CMD_BUFFER_B(%1,20)<0;1,0> // MB offset = Y*W+X + shl (1) MRF_INTER_WRITE_HEADER.2<1>:ud acc0.2<0;1,0>:uw 6:uw // Byte-aligned MB offset + mov (16) MRF_INTER_WRITE_DATA0<1>:ud CMD_BUFFER_D(%1)<8;8,1> {Compr} // Copy entire command to inter buffer + mov (16) CMD_BUFFER_D(%1)<1> 0:ud {Compr} // Clear original command + send (16) NULLREGW MRF_INTER_WRITE_HEADER null:uw DAPWRITE MSG_LEN(2)+OWBWMSGDSC+OWORD_4+BI_CMD_BUFFER + +Parse_8_Loop_%1: + } + + add.z.f0.0 (1) TotalMB<1>:w TotalMB<0;1,0>:w -8:w // Update remaining number of 8-command blocks + +// Output modified intra commands +// Write block 0 + mov (8) MRF_INTRA_WRITE_HEADER.0<1>:ud MRF_READ_HEADER_SRC.0<8;8,1>:ud + $for(0; <4; 2) { + mov (16) MRF_CMD_BUF_D(%1)<1> CMD_BUFFER_D(%1)<8;8,1> {Compr} + } + send (16) NULLREGW MRF_INTRA_WRITE_HEADER null:uw DAPWRITE MSG_LEN(4)+OWBWMSGDSC+OWORD_8+BI_CMD_BUFFER + +// Write block 1 + mov (8) m1.0<1>:ud MRF_READ_HEADER_SRC.0<8;8,1>:ud + add (1) m1.2<1>:ud MRF_READ_HEADER_SRC.2<0;1,0>:ud 128:ud // Point to next 2-command block + mov (16) m2<1>:ud CMD_BUFFER_D(4)<8;8,1> {Compr} + mov (16) m4<1>:ud CMD_BUFFER_D(6)<8;8,1> {Compr} + send (16) NULLREGW m1 null:uw DAPWRITE MSG_LEN(4)+OWBWMSGDSC+OWORD_8+BI_CMD_BUFFER + +// Write block 2 + add (1) MRF_INTRA_WRITE_HEADER.2<1>:ud MRF_READ_HEADER_SRC.2<0;1,0>:ud 256:ud // Point to next 2-command block + $for(0; <4; 2) { + mov (16) MRF_CMD_BUF_D(%1)<1> CMD_BUFFER_D(%1+8)<8;8,1> {Compr} + } + send (16) NULLREGW MRF_INTRA_WRITE_HEADER null:uw DAPWRITE MSG_LEN(4)+OWBWMSGDSC+OWORD_8+BI_CMD_BUFFER + +// Write block 3 + add (1) m1.2<1>:ud MRF_READ_HEADER_SRC.2<0;1,0>:ud 384:ud // Point to next 2-command block + mov (16) m2<1>:ud CMD_BUFFER_D(12)<8;8,1> {Compr} + mov (16) m4<1>:ud CMD_BUFFER_D(14)<8;8,1> {Compr} + send (16) NULLREGW m1 null:uw DAPWRITE MSG_LEN(4)+OWBWMSGDSC+OWORD_8+BI_CMD_BUFFER + +// Update message header for next DAP read + add (1) MRF_READ_HEADER_SRC.2<1>:ud MRF_READ_HEADER_SRC.2<0;1,0>:ud 512:ud // Point to next block of 8-commands + + cmp.z.f0.1 (1) NULLREG RemainderMB<0;1,0>:w 0:uw // Check if remainder MB = 0 + (-f0.0) jmpi (1) SetHWScoreboard_Loop // Continue if more command blocks remain + +SetHWScoreboard_Remainder: +// f0.1 should have been set to indicate if RemainderMB = 0 +// + (f0.1) jmpi (1) SetHWScoreboard_Done // Stop if all commands have been updated + +// Blindly load next 8 commands anyway +// +// Load block 0 (Commands 0/1) + mov (8) MRF_READ_HEADER0.0<1>:ud MRF_READ_HEADER_SRC.0<8;8,1>:ud + send (16) CMD_BUFFER_W(0)<1> MRF_READ_HEADER0 null:uw DAPREAD RESP_LEN(4)+OWBRMSGDSC_SC+OWORD_8+BI_CMD_BUFFER + +// Load block 1 (Commands 2/3) + mov (8) MRF_READ_HEADER1.0<1>:ud MRF_READ_HEADER_SRC.0<8;8,1>:ud + add (1) MRF_READ_HEADER1.2<1>:ud MRF_READ_HEADER_SRC.2<0;1,0>:ud 128:ud // Point to next 2-command block + send (16) CMD_BUFFER_W(4)<1> MRF_READ_HEADER1 null:uw DAPREAD RESP_LEN(4)+OWBRMSGDSC_SC+OWORD_8+BI_CMD_BUFFER + +// Load block 2 (Commands 4/5) + mov (8) MRF_READ_HEADER2.0<1>:ud MRF_READ_HEADER_SRC.0<8;8,1>:ud + add (1) MRF_READ_HEADER2.2<1>:ud MRF_READ_HEADER_SRC.2<0;1,0>:ud 256:ud // Point to next 2-command block + send (16) CMD_BUFFER_W(8)<1> MRF_READ_HEADER2 null:uw DAPREAD RESP_LEN(4)+OWBRMSGDSC_SC+OWORD_8+BI_CMD_BUFFER + +// Load block 3 (Commands 6/7) + mov (8) MRF_READ_HEADER3.0<1>:ud MRF_READ_HEADER_SRC.0<8;8,1>:ud + add (1) MRF_READ_HEADER3.2<1>:ud MRF_READ_HEADER_SRC.2<0;1,0>:ud 384:ud // Point to next 2-command block + send (16) CMD_BUFFER_W(12)<1> MRF_READ_HEADER3 null:uw DAPREAD RESP_LEN(4)+OWBRMSGDSC_SC+OWORD_8+BI_CMD_BUFFER + +// Initialize necessary pointers + mov (1) a0.1<1>:ud ((CMD_BUFFER_REG_OFF+1)*0x10000+CMD_BUFFER_REG_OFF)*32 // a0.2:w points to command buffer (first half) + // a0.3:w points to command buffer (second half) +// Initialize Inter DAP write header + mov (8) MRF_INTER_WRITE_HEADER<1>:ud r0.0<8;8,1>:ud + +SetHWScoreboard_Remainder_Loop: + and.nz.f0.1 (8) NULLREG r[a0.2,4*4]<0;1,0>:ud IS_INTRA_MB:ud // Is it an "Intra" MB? + add.z.f0.0 (1) RemainderMB<1>:w RemainderMB<0;1,0>:w -1:w // Decrement MB # + or (1) r[a0.2,2*4]<1>:ud r[a0.2,2*4]<0;1,0>:ud BIT21:ud // Set "Use Scoreboard" for every MB + shl (2) r[a0.2,2*2]<1>:uw r[a0.2,14*2]<0;1,0>:uw MB_SHIFT_MASK_B<2;2,1>:b // Set HW SB masks + mov (2) r[a0.2,4*1]<2>:ub r[a0.2,5*4]<2;2,1>:ub // Set scoreboard (X,Y) for intra MB + + (-f0.1) mov (2) r[a0.2,4*1]<1>:uw r[a0.2,5*4]<2;2,1>:ub // Set scoreboard (X,Y) for inter MB + (f0.1) jmpi (1) Output_Remainder_Intra + +// Inter Macroblock +// Output MEDIA_OBJECT command in raster scan order + mul (16) acc0<1>:uw r[a0.2,21]<0;1,0>:ub PicWidthMB<0;1,0>:uw // MB offset = Y*W + add (16) acc0<1>:uw acc0<8;8,1>:uw r[a0.2,20]<0;1,0>:ub // MB offset = Y*W+X + shl (1) MRF_INTER_WRITE_HEADER.2<1>:ud acc0.2<0;1,0>:uw 6:uw // Byte-aligned MB offset + mov (16) MRF_INTER_WRITE_DATA0<1>:ud r[a0.2]<8;8,1>:ud {Compr} // Copy entire command to inter buffer + mov (16) r[a0.2]<1>:ud 0:ud {Compr} // Clear original command + send (16) NULLREGW MRF_INTER_WRITE_HEADER null:uw DAPWRITE MSG_LEN(2)+OWBWMSGDSC+OWORD_4+BI_CMD_BUFFER + +Output_Remainder_Intra: +// Intra MB command always output + mov (8) MRF_INTRA_WRITE_HEADER.0<1>:ud MRF_READ_HEADER_SRC.0<8;8,1>:ud + mov (16) MRF_CMD_BUF_D(0)<1> r[a0.2]<8;8,1>:ud {Compr} // Copy entire command to intra buffer + send (16) NULLREGW MRF_INTRA_WRITE_HEADER null:uw DAPWRITE MSG_LEN(2)+OWBWMSGDSC+OWORD_4+BI_CMD_BUFFER + + add (1) MRF_READ_HEADER_SRC.2<1>:ud MRF_READ_HEADER_SRC.2<0;1,0>:ud 64:ud // Point to next command + add (1) a0.1<1>:ud a0.1<0;1,0>:ud 0x00400040:ud // Update pointers + (-f0.0) jmpi (1) SetHWScoreboard_Remainder_Loop + +// All MBs have been decoded. Terminate the thread now +// +SetHWScoreboard_Done: + END_THREAD + +#if !defined(COMBINED_KERNEL) // For standalone kernel only +.end_code + +.end_kernel +#endif + +// End of SetHWScoreboard diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/SetHWScoreboard_header.inc libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/SetHWScoreboard_header.inc --- libva-1.0.1/i965_drv_video/shaders/h264/mc/SetHWScoreboard_header.inc 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/SetHWScoreboard_header.inc 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,134 @@ +/* + * Common header file for both SetHWScoreboard and SetHWScoreboard_MBAFF kernels + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +#if !defined(__SETHWSCOREBOARD_HEADER__) // Make sure this file is only included once +#define __SETHWSCOREBOARD_HEADER__ + +// Module name: SetHWScoreboard_header.inc +// +// Common header file for both SetHWScoreboard and SetHWScoreboard_MBAFF kernels +// + +#define BI_CMD_BUF 0 // Binding table index for command buffer + +// GRF r1 map +// +// For use by setting HW scoreboard kernel for MBAFF picture +// +// CURBE data +#define TOP_FM_MASK1_D r1.0 // Bit mask for first half of top frame MB SB mask +#define TOP_FM_MASK1_B r1.0 // Bit mask for first half of top frame MB SB mask +#define TOP_FM_MASK2_D r1.1 // Bit mask for second half of top frame MB SB mask +#define TOP_FM_MASK2_B r1.4 // Bit mask for second half of top frame MB SB mask +#define BOT_FM_MASK1_D r1.2 // Bit mask for first half of bottom frame MB SB mask +#define BOT_FM_MASK1_B r1.8 // Bit mask for first half of bottom frame MB SB mask +#define BOT_FM_MASK2_D r1.3 // Bit mask for second half of bottom frame MB SB mask +#define BOT_FM_MASK2_B r1.12 // Bit mask for second half of bottom frame MB SB mask +#define TOP_FD_MASK1_D r1.4 // Bit mask for first half of top field MB SB mask +#define TOP_FD_MASK1_B r1.16 // Bit mask for first half of top field MB SB mask +#define TOP_FD_MASK2_D r1.5 // Bit mask for second half of top field MB SB mask +#define TOP_FD_MASK2_B r1.20 // Bit mask for second half of top field MB SB mask +#define BOT_FD_MASK1_D r1.6 // Bit mask for first half of bottom field MB SB mask +#define BOT_FD_MASK1_B r1.24 // Bit mask for first half of bottom field MB SB mask +#define BOT_FD_MASK2_D r1.7 // Bit mask for second half of bottom field MB SB mask +#define BOT_FD_MASK2_B r1.28 // Bit mask for second half of bottom field MB SB mask + +// For use by setting HW scoreboard kernel for non-MBAFF picture +#define MB_SHIFT_MASK_W r1.0 // :w type. Shift values for two parts of the MB SB mask +#define MB_SHIFT_MASK_B r1.0 // :b type. Shift values for two parts of the MB SB mask + +// GRF r2 map +// +// In-line data +// +#define INLINE_REG_OFFSET 1 +#define INLINE_REG r2 + +#define StartingMB INLINE_REG.0 // :uw type. Starting MB number +#define TotalMB INLINE_REG.1 // :uw type. Total number of MB to be processed +#define PicWidthMB INLINE_REG.2 // :uw type. Picture width in MB + +// GRF r3 map +// +// Temporary variables +// +#define RemainderMB r3.0 // :uw type. Remainder of MB (<16) to be processed + +#define TEMP_FD_X_W r3.2 // :w type. Temporary variable for field MB X origin in MBAFF picture +#define TEMP_FD_X_B r3.4 // :b type. Temporary variable for field MB X origin in MBAFF picture +#define TEMP_FD_Y_W r3.3 // :w type. Temporary variable for field MB Y origin in MBAFF picture +#define TEMP_FD_Y_B r3.6 // :b type. Temporary variable for field MB Y origin in MBAFF picture + +#define TEMP_INTRA_FLAG_W r3.4 // :uw type. Temporary intra available flag + +#define MB_MASK_D r3.4 // :ud type. Bit masks for MBAFF MB +#define MB_MASK_B r3.16 // :ub type. Bit masks for MBAFF MB + +#define MRF_READ_HEADER_SRC r63 + +// MEDIA_OBJECT_EX Command map +// +// In DW1 of each MEDIA_OBJECT_EX command (VFE DWORD) +#define CUR_X 0 // Byte 0 +#define CUR_Y 0 // Byte 2 + +// In DW2 of each MEDIA_OBJECT_EX command +#define USE_SCOREBOARD BIT21 + +// In DW4 of each MEDIA_OBJECT_EX command +#define F_FLAG BIT4 +#define IS_INTRA_MB BIT13 +#define IS_FIELD_MB BIT14 +#define IS_INTRA8X8 BIT15 +#define IS_BOT_FD BIT24 + +// In DW7 of each MEDIA_OBJECT_EX command +#define A_FLAG BIT0 +#define B_FLAG BIT1 +#define C_FLAG BIT2 +#define D_FLAG BIT3 +#define E_FLAG BIT4 + +#define CMD_BUFFER_REG_OFF 4 +.declare CMD_BUFFER_D Base=GRF(4) ElementSize=4 SrcRegion=REGION(8,1) Type=ud // Command buffer (32 GRF) +.declare CMD_BUFFER_W Base=GRF(4) ElementSize=2 SrcRegion=REGION(16,1) Type=uw // Command buffer (32 GRF) +.declare CMD_BUFFER_B Base=GRF(4) ElementSize=1 SrcRegion=REGION(16,1) Type=ub // Command buffer (32 GRF) + +#define MRF_READ_HEADER m1 +#define MRF_READ_HEADER0 m1 +#define MRF_READ_HEADER1 m2 +#define MRF_READ_HEADER2 m3 +#define MRF_READ_HEADER3 m4 + +#define MRF_INTER_WRITE_HEADER m5 +#define MRF_INTER_WRITE_DATA0 m6 +#define MRF_INTER_WRITE_DATA1 m7 + +#define MRF_WRITE_HEADER m11 +#define MRF_INTRA_WRITE_HEADER m11 + +#define MRF_CMD_BUF_REG_OFF 12 +.declare MRF_CMD_BUF_D Base=m12 ElementSize=4 SrcRegion=REGION(8,1) Type=ud // Command buffer stored in MRF +.declare MRF_CMD_BUF_W Base=m12 ElementSize=2 SrcRegion=REGION(16,1) Type=uw // Command buffer stored in MRF +.declare MRF_CMD_BUF_B Base=m12 ElementSize=1 SrcRegion=REGION(16,1) Type=ub // Command buffer stored in MRF + +#define BI_CMD_BUFFER 0 + +#define OWBRMSGDSC_SC 0x02088000 // OWORD Block Read Message Descriptor, reading from sampler cache = A. +#define OWBWMSGDSC 0x02080000 // OWORD Block Write Message Descriptor + +#define OWORD_1 0x000 +#define OWORD_2 0x200 +#define OWORD_4 0x300 +#define OWORD_8 0x400 + +// End of SETHWSCOREBOARD_HEADER + +#endif // !defined(__SETHWSCOREBOARD_HEADER__) + diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/SetHWScoreboard_MBAFF.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/SetHWScoreboard_MBAFF.asm --- libva-1.0.1/i965_drv_video/shaders/h264/mc/SetHWScoreboard_MBAFF.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/SetHWScoreboard_MBAFF.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,279 @@ +/* + * Set dependency control HW scoreboard kernel for MBAFF picture + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Kernel name: SetHWScoreboard_MBAFF.asm +// +// Set dependency control HW scoreboard kernel for MBAFF picture +// + +// ---------------------------------------------------- +// Main: SetHWScoreboard_MBAFF +// ---------------------------------------------------- + +.kernel SetHWScoreboard_MBAFF + +SETHWSCOREBOARD_MBAFF: + +#ifdef _DEBUG +// WA for FULSIM so we'll know which kernel is being debugged +mov (1) acc0:ud 0xf1aa55a5:ud +#endif + +#include "header.inc" +#include "SetHWScoreboard_header.inc" + +// +// Now, begin source code.... +// + +.code + +// Separate the TotalMB so TotalMB will be multiple of 8 +// and RemainderMB will hold the TotalMB%8 +// + and.z.f0.1 (1) RemainderMB<1>:uw TotalMB<0;1,0>:uw 0x0007:uw // number of %8 commands + and.z.f0.0 (1) TotalMB<1>:uw TotalMB<0;1,0>:uw 0xfff8:uw // Number of 8-command blocks + +// Initialize common DAP read header +// + mov (8) MRF_READ_HEADER_SRC<1>:ud r0.0<8;8,1>:ud + shl (1) MRF_READ_HEADER_SRC.2<1>:ud StartingMB<0;1,0>:uw 6:uw // Byte-aligned offset being read + +// Initialize Inter DAP write header + mov (8) MRF_INTER_WRITE_HEADER<1>:ud r0.0<8;8,1>:ud + + (f0.0) jmpi (1) SetHWScoreboard_MBAFF_Remainder // Jump if TatalMB < 8 + +//------------------------------------------------------------------------ +// Command buffer parsing loop +// Each loop will handle 8 commands +//------------------------------------------------------------------------ +// +SetHWScoreboard_MBAFF_Loop: +// Load block 0 (Commands 0/1) + mov (8) MRF_READ_HEADER0.0<1>:ud MRF_READ_HEADER_SRC.0<8;8,1>:ud + send (16) CMD_BUFFER_W(0)<1> MRF_READ_HEADER0 null:uw DAPREAD RESP_LEN(4)+OWBRMSGDSC_SC+OWORD_8+BI_CMD_BUFFER + +// Load block 1 (Commands 2/3) + mov (8) MRF_READ_HEADER1.0<1>:ud MRF_READ_HEADER_SRC.0<8;8,1>:ud + add (1) MRF_READ_HEADER1.2<1>:ud MRF_READ_HEADER_SRC.2<0;1,0>:ud 128:ud // Point to next 2-command block + send (16) CMD_BUFFER_W(4)<1> MRF_READ_HEADER1 null:uw DAPREAD RESP_LEN(4)+OWBRMSGDSC_SC+OWORD_8+BI_CMD_BUFFER + +// Load block 2 (Commands 4/5) + mov (8) MRF_READ_HEADER2.0<1>:ud MRF_READ_HEADER_SRC.0<8;8,1>:ud + add (1) MRF_READ_HEADER2.2<1>:ud MRF_READ_HEADER_SRC.2<0;1,0>:ud 256:ud // Point to next 2-command block + send (16) CMD_BUFFER_W(8)<1> MRF_READ_HEADER2 null:uw DAPREAD RESP_LEN(4)+OWBRMSGDSC_SC+OWORD_8+BI_CMD_BUFFER + +// Load block 3 (Commands 6/7) + mov (8) MRF_READ_HEADER3.0<1>:ud MRF_READ_HEADER_SRC.0<8;8,1>:ud + add (1) MRF_READ_HEADER3.2<1>:ud MRF_READ_HEADER_SRC.2<0;1,0>:ud 384:ud // Point to next 2-command block + send (16) CMD_BUFFER_W(12)<1> MRF_READ_HEADER3 null:uw DAPREAD RESP_LEN(4)+OWBRMSGDSC_SC+OWORD_8+BI_CMD_BUFFER + +// Start parsing commands + $for(0; <16; 2) { +// Adjust MB Y origin for field MBs +// + mov (2) TEMP_FD_X_W<1>:uw CMD_BUFFER_B(%1,20)<2;2,1> // Initialize temp (X,Y) location + and.nz.f0.1 (8) NULLREG CMD_BUFFER_D(%1,4)<0;1,0> IS_BOT_FD:ud // Is it a "Bottom Field MB"? + and.nz.f0.0 (8) NULLREG CMD_BUFFER_D(%1,4)<0;1,0> IS_FIELD_MB:ud // Is it a "Field MB"? + mul (8) acc0<1>:w CMD_BUFFER_B(%1,21)<0;1,0> 2:w + (-f0.1) mov (1) TEMP_FD_Y_W<1>:w acc0<0;1,0>:w + (f0.1) add (1) TEMP_FD_Y_W<1>:w acc0<0;1,0>:w 1:w + (-f0.0) mov (1) TEMP_FD_Y_W<1>:w CMD_BUFFER_B(%1,21)<0;1,0> // Discard field MB Y origin handling + + and.nz.f0.0 (8) NULLREG CMD_BUFFER_D(%1,4)<0;1,0> IS_INTRA_MB:ud // Is it an "Intra" MB? + and.nz.f0.1 (8) NULLREG TEMP_FD_Y_W<0;1,0>:uw BIT0 // Is it "Bottom MB"? + or (1) CMD_BUFFER_D(%1,2)<1> CMD_BUFFER_D(%1,2)<0;1,0> BIT21 // Set "Use Scoreboard" + mov (2) CMD_BUFFER_W(%1,2)<1> TEMP_FD_X_W<2;2,1>:uw // Set scoreboard (X,Y) for inter MB + (f0.0) jmpi (1) SET_SB_MBAFF_INTRA_%1 // Jump if intra MB. + +// Inter Macroblock +// Output MEDIA_OBJECT command in raster scan order + mul (16) acc0<1>:uw TEMP_FD_Y_W<0;1,0>:uw PicWidthMB<0;1,0>:uw // MB offset = Y*W + add (16) acc0<1>:uw acc0<8;8,1>:uw TEMP_FD_X_W<0;1,0>:uw // MB offset = Y*W+X + shl (1) MRF_INTER_WRITE_HEADER.2<1>:ud acc0.2<0;1,0>:uw 6:uw // Byte-aligned MB offset + mov (16) MRF_INTER_WRITE_DATA0<1>:ud CMD_BUFFER_D(%1)<8;8,1> {Compr} // Copy entire command to inter buffer + mov (16) CMD_BUFFER_D(%1)<1> 0:ud {Compr} // Clear original command + send (16) NULLREGW MRF_INTER_WRITE_HEADER null:uw DAPWRITE MSG_LEN(2)+OWBWMSGDSC+OWORD_4+BI_CMD_BUFFER + jmpi (1) NEXT_MB_MBAFF_%1 // Done for inter MB. Move to next MB. + +SET_SB_MBAFF_INTRA_%1: +// Intra MB +// + and.nz.f0.0 (8) NULLREG CMD_BUFFER_D(%1,4)<0;1,0> IS_FIELD_MB:ud // Is it an "Field" MB? + (f0.1) sel (2) MB_MASK_D<1>:ud BOT_FD_MASK1_D<2;2,1>:ud TOP_FD_MASK1_D<2;2,1>:ud // Assume field MB + mov (1) TEMP_INTRA_FLAG_W<1>:uw CMD_BUFFER_W(%1,14)<0;1,0> // Don't want to alter original in-line data + (f0.0) jmpi (1) SET_SB_MBAFF_%1 // Jump if it's really field MB + +// Frame MB +// +// Derive E' + and.nz.f0.0 (8) NULLREG CMD_BUFFER_W(%1,14)<0;1,0> E_FLAG // Is "E" = 1 + (f0.1) sel (2) MB_MASK_D<1>:ud BOT_FM_MASK1_D<2;2,1>:ud TOP_FM_MASK1_D<2;2,1>:ud + and.z.f0.1 (8) NULLREG CMD_BUFFER_W(%1,14)<0;1,0> A_FLAG // "A" = 0? + (f0.0) jmpi (1) SET_SB_MBAFF_%1 // If "E" flag = 1, skip the rest of derivation + (f0.1) and.nz.f0.1 (8) NULLREG CMD_BUFFER_D(%1,4)<0;1,0> IS_INTRA8X8 + (f0.1) and.nz.f0.1 (8) NULLREG CMD_BUFFER_W(%1,14)<0;1,0> F_FLAG + (f0.1) or (1) TEMP_INTRA_FLAG_W<1>:uw CMD_BUFFER_W(%1,14)<0;1,0> E_FLAG + +SET_SB_MBAFF_%1: + and.nz.f0.1 (16) NULLREGW TEMP_INTRA_FLAG_W<0;1,0>:uw MB_MASK_B<0;8,1>:ub + shl (1) CMD_BUFFER_W(%1,2)<1> f0.1<0;1,0>:uw 12:w // Masks 0-3 + and (1) CMD_BUFFER_W(%1,3)<1> f0.1<0;1,0>:uw 0xf000:uw // Masks 4-7 + + mov (2) CMD_BUFFER_B(%1,4)<2> TEMP_FD_X_B<4;2,2>:ub // Set scoreboard (X,Y) for intra MB + +NEXT_MB_MBAFF_%1: + } + + add.z.f0.0 (1) TotalMB<1>:w TotalMB<0;1,0>:w -8:w // Update remaining number of 8-command blocks + +// Output modified intra commands +// Write block 0 + mov (8) MRF_INTRA_WRITE_HEADER.0<1>:ud MRF_READ_HEADER_SRC.0<8;8,1>:ud + $for(0; <4; 2) { + mov (16) MRF_CMD_BUF_D(%1)<1> CMD_BUFFER_D(%1)<8;8,1> {Compr} + } + send (16) NULLREGW MRF_INTRA_WRITE_HEADER null:uw DAPWRITE MSG_LEN(4)+OWBWMSGDSC+OWORD_8+BI_CMD_BUFFER + +// Write block 1 + mov (8) m1.0<1>:ud MRF_READ_HEADER_SRC.0<8;8,1>:ud + add (1) m1.2<1>:ud MRF_READ_HEADER_SRC.2<0;1,0>:ud 128:ud // Point to next 2-command block + mov (16) m2<1>:ud CMD_BUFFER_D(4)<8;8,1> {Compr} + mov (16) m4<1>:ud CMD_BUFFER_D(6)<8;8,1> {Compr} + send (16) NULLREGW m1 null:uw DAPWRITE MSG_LEN(4)+OWBWMSGDSC+OWORD_8+BI_CMD_BUFFER + +// Write block 2 + add (1) MRF_INTRA_WRITE_HEADER.2<1>:ud MRF_READ_HEADER_SRC.2<0;1,0>:ud 256:ud // Point to next 2-command block + $for(0; <4; 2) { + mov (16) MRF_CMD_BUF_D(%1)<1> CMD_BUFFER_D(%1+8)<8;8,1> {Compr} + } + send (16) NULLREGW MRF_INTRA_WRITE_HEADER null:uw DAPWRITE MSG_LEN(4)+OWBWMSGDSC+OWORD_8+BI_CMD_BUFFER + +// Write block 3 + add (1) m1.2<1>:ud MRF_READ_HEADER_SRC.2<0;1,0>:ud 384:ud // Point to next 2-command block + mov (16) m2<1>:ud CMD_BUFFER_D(12)<8;8,1> {Compr} + mov (16) m4<1>:ud CMD_BUFFER_D(14)<8;8,1> {Compr} + send (16) NULLREGW m1 null:uw DAPWRITE MSG_LEN(4)+OWBWMSGDSC+OWORD_8+BI_CMD_BUFFER + +// Update message header for next DAP read + add (1) MRF_READ_HEADER_SRC.2<1>:ud MRF_READ_HEADER_SRC.2<0;1,0>:ud 512:ud // Point to next block of 8-commands + + cmp.z.f0.1 (1) NULLREG RemainderMB<0;1,0>:w 0:uw // Check if remaining MB = 0 + (-f0.0) jmpi (1) SetHWScoreboard_MBAFF_Loop // Continue if more command blocks remain + +SetHWScoreboard_MBAFF_Remainder: +// f0.1 should have been set to indicate if RemainderMB = 0 +// + (f0.1) jmpi (1) SetHWScoreboard_MBAFF_Done // Stop if all commands have been updated + +// Blindly load next 8 commands anyway +// +// Load block 0 (Commands 0/1) + mov (8) MRF_READ_HEADER0.0<1>:ud MRF_READ_HEADER_SRC.0<8;8,1>:ud + send (16) CMD_BUFFER_W(0)<1> MRF_READ_HEADER0 null:uw DAPREAD RESP_LEN(4)+OWBRMSGDSC_SC+OWORD_8+BI_CMD_BUFFER + +// Load block 1 (Commands 2/3) + mov (8) MRF_READ_HEADER1.0<1>:ud MRF_READ_HEADER_SRC.0<8;8,1>:ud + add (1) MRF_READ_HEADER1.2<1>:ud MRF_READ_HEADER_SRC.2<0;1,0>:ud 128:ud // Point to next 2-command block + send (16) CMD_BUFFER_W(4)<1> MRF_READ_HEADER1 null:uw DAPREAD RESP_LEN(4)+OWBRMSGDSC_SC+OWORD_8+BI_CMD_BUFFER + +// Load block 2 (Commands 4/5) + mov (8) MRF_READ_HEADER2.0<1>:ud MRF_READ_HEADER_SRC.0<8;8,1>:ud + add (1) MRF_READ_HEADER2.2<1>:ud MRF_READ_HEADER_SRC.2<0;1,0>:ud 256:ud // Point to next 2-command block + send (16) CMD_BUFFER_W(8)<1> MRF_READ_HEADER2 null:uw DAPREAD RESP_LEN(4)+OWBRMSGDSC_SC+OWORD_8+BI_CMD_BUFFER + +// Load block 3 (Commands 6/7) + mov (8) MRF_READ_HEADER3.0<1>:ud MRF_READ_HEADER_SRC.0<8;8,1>:ud + add (1) MRF_READ_HEADER3.2<1>:ud MRF_READ_HEADER_SRC.2<0;1,0>:ud 384:ud // Point to next 2-command block + send (16) CMD_BUFFER_W(12)<1> MRF_READ_HEADER3 null:uw DAPREAD RESP_LEN(4)+OWBRMSGDSC_SC+OWORD_8+BI_CMD_BUFFER + +// Initialize necessary pointers + mov (1) a0.1<1>:ud ((CMD_BUFFER_REG_OFF+1)*0x10000+CMD_BUFFER_REG_OFF)*32 // a0.2:w points to command buffer (first half) + // a0.3:w points to command buffer (second half) +// Initialize Inter DAP write header + mov (8) MRF_INTER_WRITE_HEADER<1>:ud r0.0<8;8,1>:ud + +SetHWScoreboard_MBAFF_Remainder_Loop: +// Adjust MB Y origin for field MBs +// + mov (2) TEMP_FD_X_W<1>:uw r[a0.2,5*4]<2;2,1>:ub // Initialize temp (X,Y) location + and.nz.f0.1 (8) NULLREG r[a0.2,4*4]<0;1,0>:ud IS_BOT_FD:ud // Is it a "Bottom Field MB"? + and.nz.f0.0 (8) NULLREG r[a0.2,4*4]<0;1,0>:ud IS_FIELD_MB:ud // Is it a "Field MB"? + mul (8) acc0<1>:w r[a0.2,21]<0;1,0>:ub 2:w + (-f0.1) mov (1) TEMP_FD_Y_W<1>:w acc0<0;1,0>:w + (f0.1) add (1) TEMP_FD_Y_W<1>:w acc0<0;1,0>:w 1:w + (-f0.0) mov (1) TEMP_FD_Y_W<1>:w r[a0.2,5*4+1]<0;1,0>:ub // Discard field MB Y origin handling + + and.nz.f0.0 (8) NULLREG r[a0.2,4*4]<0;1,0>:ud IS_INTRA_MB:ud // Is it an "Intra" MB? + add.z.f0.1 (1) RemainderMB<1>:w RemainderMB<0;1,0>:w -1:w // Decrement MB # + or (1) r[a0.2,2*4]<1>:ud r[a0.2,2*4]<0;1,0>:ud BIT21:ud // Set "Use Scoreboard" + mov (2) r[a0.2,2*2]<1>:uw TEMP_FD_X_W<2;2,1>:uw // Set scoreboard (X,Y) for inter MB + (f0.0) jmpi (1) SET_SB_MBAFF_REM_INTRA // Jump if intra MB. + +// Inter Macroblock +// Output MEDIA_OBJECT command in raster scan order + mul (16) acc0<1>:uw TEMP_FD_Y_W<0;1,0>:uw PicWidthMB<0;1,0>:uw // MB offset = Y*W + add (16) acc0<1>:uw acc0<8;8,1>:uw TEMP_FD_X_W<0;1,0>:uw // MB offset = Y*W+X + shl (1) MRF_INTER_WRITE_HEADER.2<1>:ud acc0.2<0;1,0>:uw 6:uw // Byte-aligned MB offset + mov (16) MRF_INTER_WRITE_DATA0<1>:ud r[a0.2]<8;8,1>:ud {Compr} // Copy entire command to inter buffer + mov (16) r[a0.2]<1>:ud 0:ud {Compr} // Clear original command + send (16) NULLREGW MRF_INTER_WRITE_HEADER null:uw DAPWRITE MSG_LEN(2)+OWBWMSGDSC+OWORD_4+BI_CMD_BUFFER + jmpi (1) Output_MBAFF_Remainder_Intra // Done for inter MB. Move to dump intra MB. + +SET_SB_MBAFF_REM_INTRA: +// Intra MB +// + and.nz.f0.1 (8) NULLREG TEMP_FD_Y_W<0;1,0>:uw BIT0:ud // Is it "Bottom MB"? + and.nz.f0.0 (8) NULLREG r[a0.2,4*4]<0;1,0>:ud IS_FIELD_MB:ud // Is it "Field MB"? + mov (1) TEMP_INTRA_FLAG_W<1>:uw r[a0.2,14*2]<0;1,0>:uw // Don't want to alter original in-line data + (f0.1) sel (2) MB_MASK_D<1>:ud BOT_FD_MASK1_D<2;2,1>:ud TOP_FD_MASK1_D<2;2,1>:ud // Assume field MB + (f0.0) jmpi (1) SET_SB_MBAFF_REM // Jump if it's really field MB + +// Frame MB +// +// Derive E' + and.nz.f0.0 (8) NULLREG r[a0.2,14*2]<0;1,0>:uw E_FLAG // Is "E" = 1 + (f0.1) sel (2) MB_MASK_D<1>:ud BOT_FM_MASK1_D<2;2,1>:ud TOP_FM_MASK1_D<2;2,1>:ud + and.z.f0.1 (8) NULLREG r[a0.2,14*2]<0;1,0>:uw A_FLAG // "A" = 0? + (f0.0) jmpi (1) SET_SB_MBAFF_REM // If "E" flag = 1, skip the rest of derivation + (f0.1) and.nz.f0.1 (8) NULLREG r[a0.2,4*4]<0;1,0>:ud IS_INTRA8X8 + (f0.1) and.nz.f0.1 (8) NULLREG r[a0.2,14*2]<0;1,0>:uw F_FLAG + (f0.1) or (1) TEMP_INTRA_FLAG_W<1>:uw r[a0.2,14*2]<0;1,0>:uw E_FLAG + +SET_SB_MBAFF_REM: + and.nz.f0.0 (16) NULLREGW TEMP_INTRA_FLAG_W<0;1,0>:uw MB_MASK_B<0;8,1>:ub + add.z.f0.1 (1) RemainderMB<1>:w RemainderMB<0;1,0>:w 0:w // Check remaining MB # + shl (1) r[a0.2,2*2]<1>:uw f0.0<0;1,0>:uw 12:w // Masks 0-3 + and (1) r[a0.2,3*2]<1>:uw f0.0<0;1,0>:uw 0xf000:uw // Masks 4-7 + + mov (2) r[a0.2,4*1]<2>:ub TEMP_FD_X_B<4;2,2>:ub // Set scoreboard (X,Y) for intra MB + +Output_MBAFF_Remainder_Intra: +// Intra MB command always output + mov (8) MRF_INTRA_WRITE_HEADER.0<1>:ud MRF_READ_HEADER_SRC.0<8;8,1>:ud + mov (16) MRF_CMD_BUF_D(0)<1> r[a0.2]<8;8,1>:ud {Compr} // Copy entire command to intra buffer + send (16) NULLREGW MRF_INTRA_WRITE_HEADER null:uw DAPWRITE MSG_LEN(2)+OWBWMSGDSC+OWORD_4+BI_CMD_BUFFER + + add (1) MRF_READ_HEADER_SRC.2<1>:ud MRF_READ_HEADER_SRC.2<0;1,0>:ud 64:ud // Point to next command + add (1) a0.1<1>:ud a0.1<0;1,0>:ud 0x00400040:ud // Update pointers + (-f0.1) jmpi (1) SetHWScoreboard_MBAFF_Remainder_Loop + +// All MBs have been decoded. Terminate the thread now +// +SetHWScoreboard_MBAFF_Done: + END_THREAD + +#if !defined(COMBINED_KERNEL) // For standalone kernel only +.end_code + +.end_kernel +#endif + +// End of SetHWScoreboard_MBAFF diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/set_SB_offset.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/set_SB_offset.asm --- libva-1.0.1/i965_drv_video/shaders/h264/mc/set_SB_offset.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/set_SB_offset.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,26 @@ +/* + * Common module to set offset into the scoreboard + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// +// Module name: set_SB_offset.asm +// +// Common module to set offset into the scoreboard +// Note: This is to encapsulate the way M0.5:ud in ForwardMsg is filled. +// +// $Revision: 2 $ +// $Date: 10/16/06 5:19p $ +// + add (1) MSGHDRY1.10<1>:uw r0.20:ub 0x0200:uw // Message length = 1 DWORD + + add (16) acc0<1>:w r0.12<0;1,0>:uw -LEADING_THREAD:w // 0-based thread count derived from r0.6:ud + shl (1) M05_STORE<1>:uw acc0<0;1,0>:uw 0x2:uw // Store for future "update" use, in DWORD unit + and (16) acc0<1>:w acc0<16;16,1>:uw SB_MASK:uw // Wrap around scoreboard + shl (1) MSGHDRY1.11<1>:uw acc0<0;1,0>:uw 0x2:uw // Convert to DWORD offset + +// End of set_SB_offset \ No newline at end of file diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/SetupForHWMC.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/SetupForHWMC.asm --- libva-1.0.1/i965_drv_video/shaders/h264/mc/SetupForHWMC.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/SetupForHWMC.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,33 @@ +/* + * Initial setup for running HWMC kernels in HWMC-Only decoding mode + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Kernel name: SetupForHWMC.asm +// +// Initial setup for running HWMC kernels in HWMC-Only decoding mode +// +#include "header.inc" +#include "intra_Header.inc" + +#if !defined(__SETUPFORHWMC__) // Make sure the following are only included once +#define __SETUPFORHWMC__ + +.reg_count_total 64 +.reg_count_payload 2 + +// +// Now, begin source code.... +// + +.code +#endif // !defined(__SETUPFORHWMC__) + + mov (8) MSGSRC<1>:ud r0.0<8;8,1>:ud // Initialize message header payload with R0 + shl (2) I_ORIX<1>:uw ORIX<2;2,1>:ub 4:w // Convert MB origin to pixel unit + +// End of SetupForHWMC diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/weightedPred.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/weightedPred.asm --- libva-1.0.1/i965_drv_video/shaders/h264/mc/weightedPred.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/weightedPred.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,140 @@ +/* + * Weighted prediction of luminance and chrominance + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Kernel name: WeightedPred.asm +// +// Weighted prediction of luminance and chrominance +// + + +//#if !defined(__WeightedPred__) // Make sure this is only included once +//#define __WeightedPred__ + + + and.z.f0.0 (1) gWEIGHTFLAG:w gWPREDFLAG:ub nWBIDIR_MASK:w + cmp.e.f0.1 (1) null:w gPREDFLAG:w 2:w + (-f0.0) jmpi INTERLABEL(WeightedPred) + (f0.1) jmpi INTERLABEL(DefaultWeightedPred_BiPred) + +INTERLABEL(DefaultWeightedPred_UniPred): + + cmp.e.f0.0 (1) null:w gPREDFLAG:w 0:w + (f0.0) jmpi INTERLABEL(Return_WeightedPred) + + // luma + mov (32) gubYPRED(0)<2> gubINTPY1(0) {Compr} + mov (32) gubYPRED(2)<2> gubINTPY1(2) {Compr} + +#ifndef MONO + // chroma + mov (32) gubCPRED(0)<2> gubINTPC1(0) {Compr} +#endif + + jmpi INTERLABEL(Return_WeightedPred) + +INTERLABEL(DefaultWeightedPred_BiPred): + + // luma + avg.sat (32) gubYPRED(0)<2> gubINTPY0(0) gubINTPY1(0) {Compr} + avg.sat (32) gubYPRED(2)<2> gubINTPY0(2) gubINTPY1(2) {Compr} + +#ifndef MONO + // chroma + avg.sat (32) gubCPRED(0)<2> gubINTPC0(0) gubINTPC1(0) {Compr} +#endif + + jmpi INTERLABEL(Return_WeightedPred) + +INTERLABEL(WeightedPred): + cmp.e.f0.1 (1) null:w gWEIGHTFLAG:w 0x80:w + (-f0.1) jmpi INTERLABEL(WeightedPred_Explicit) + + cmp.e.f0.0 (1) null:w gPREDFLAG:w 2:w + (-f0.0) jmpi INTERLABEL(DefaultWeightedPred_UniPred) + + mov (2) gYADD<1>:w 32:w {NoDDClr} + mov (2) gYSHIFT<1>:w 6:w {NoDDChk} + mov (4) gOFFSET<1>:w 0:w + mov (8) gWT0<2>:w r[pWGT,0]<0;2,1>:w + + jmpi INTERLABEL(WeightedPred_LOOP) + + // Explicit Prediction +INTERLABEL(WeightedPred_Explicit): + + // WA for weighted prediction - 2007/09/06 +#ifdef SW_W_128 // CTG SW WA + cmp.e.f0.1 (8) null:ud r[pWGT,0]<8;8,1>:uw gudW128(0)<0;1,0> +#else // ILK HW solution + and.ne.f0.1 (8) null:uw r[pWGT,12]<0;1,0>:ub 0x88848421:v // Expand W=128 flag to all components. 2 MSB are don't care +#endif + asr.nz.f0.0 (2) gBIPRED<1>:w gPREDFLAG<0;1,0>:w 1:w + asr (1) gWEIGHTFLAG:w gWEIGHTFLAG:w 6:w + (-f0.0) mov (2) gPREDFLAG1<1>:w gPREDFLAG<0;1,0>:w + (f0.0) mov (2) gPREDFLAG0<1>:ud 0x00010001:ud + (-f0.0) add (2) gPREDFLAG0<1>:w -gPREDFLAG1<2;2,1>:w 1:w + + // WA for weighted prediction - 2007/09/06 + (f0.1) mov (8) gWT0<1>:ud 0x00000080:ud + (-f0.1) mov (8) gWT0<2>:w r[pWGT,0]<16;8,2>:b + (-f0.1) mov (8) gO0<2>:w r[pWGT,1]<16;8,2>:b + mul (16) gWT0<1>:w gWT0<16;16,1>:w gPREDFLAG0<0;4,1>:w + + // Compute addition + cmp.e.f0.1 (2) null<1>:w gYWDENOM<2;2,1>:ub 0:w + (-f0.1) shl (2) gW0<1>:w gWEIGHTFLAG<0;1,0>:w gYWDENOM<2;2,1>:ub + (f0.1) mov (2) gW0<1>:w 0:w + (-f0.1) asr (2) gW0<1>:w gW0<2;2,1>:w 1:w + shl (2) gYADD<1>:w gW0<2;2,1>:w gBIPRED<0;1,0>:w + (f0.1) add (2) gYADD<1>:w gYADD<2;2,1>:w gBIPRED<0;1,0>:w + + // Compute shift + add (2) gYSHIFT<1>:w gYWDENOM<2;2,1>:ub gBIPRED<0;1,0>:w + + // Compute offset + add (4) acc0<1>:w gO0<16;4,4>:w gO1<16;4,4>:w + add (4) acc0<1>:w acc0<4;4,1>:w gBIPRED<0;1,0>:w + asr (4) gOFFSET<1>:w acc0<4;4,1>:w gBIPRED<0;1,0>:w + +INTERLABEL(WeightedPred_LOOP): + // luma + $for(0;<4;2) { + mul (16) acc0<1>:w gubINTPY0(%1) gWT0<0;1,0>:w + mul (16) acc1<1>:w gubINTPY0(%1+1) gWT0<0;1,0>:w + mac (16) acc0<1>:w gubINTPY1(%1) gWT1<0;1,0>:w + mac (16) acc1<1>:w gubINTPY1(%1+1) gWT1<0;1,0>:w + add (16) acc0<1>:w acc0<16;16,1>:w gYADD:w + add (16) acc1<1>:w acc1<16;16,1>:w gYADD:w + // Accumulator cannot be used as destination for ASR + asr (16) gwINTERIM_BUF3(0)<1> acc0<16;16,1>:w gYSHIFT:w + asr (16) gwINTERIM_BUF3(1)<1> acc1<16;16,1>:w gYSHIFT:w + add.sat (16) gubYPRED(%1)<2> gwINTERIM_BUF3(0) gOFFSET:w + add.sat (16) gubYPRED(%1+1)<2> gwINTERIM_BUF3(1) gOFFSET:w + } + +#ifndef MONO + // chroma + mul (16) acc0<1>:w gubINTPC0(0) gUW0<0;2,4>:w + mul (16) acc1<1>:w gubINTPC0(1) gUW0<0;2,4>:w + mac (16) acc0<1>:w gubINTPC1(0) gUW1<0;2,4>:w + mac (16) acc1<1>:w gubINTPC1(1) gUW1<0;2,4>:w + add (16) acc0<1>:w acc0<16;16,1>:w gCADD:w + add (16) acc1<1>:w acc1<16;16,1>:w gCADD:w + // Accumulator cannot be used as destination for ASR + asr (16) gwINTERIM_BUF3(0)<1> acc0<16;16,1>:w gCSHIFT:w + asr (16) gwINTERIM_BUF3(1)<1> acc1<16;16,1>:w gCSHIFT:w + add.sat (16) gubCPRED(0)<2> gwINTERIM_BUF3(0) gUOFFSET<0;2,1>:w + add.sat (16) gubCPRED(1)<2> gwINTERIM_BUF3(1) gUOFFSET<0;2,1>:w +#endif + + +INTERLABEL(Return_WeightedPred): + + +//#endif // !defined(__WeightedPred__) diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/writeRecon_C_8x4.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/writeRecon_C_8x4.asm --- libva-1.0.1/i965_drv_video/shaders/h264/mc/writeRecon_C_8x4.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/writeRecon_C_8x4.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,46 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Kernel name: WriteRecon_C_8x4.asm +// +// $Revision: 10 $ +// $Date: 10/03/06 5:28p $ +// + + +//#if !defined(__WRITERECON_C_8x4__) // Make sure this is only included once +//#define __WRITERECON_C_8x4__ + + + // TODO: Why did I use p0? +#ifndef MONO + add (1) p0:w pERRORC:w -16:w + mov (16) mbMSGPAYLOADC(0,0)<2> r[p0,0]<32;16,2>:ub {NoDDClr} + mov (16) mbMSGPAYLOADC(0,1)<2> r[p0,128]<32;16,2>:ub {NoDDChk} + mov (16) mbMSGPAYLOADC(1,0)<2> r[p0,32]<32;16,2>:ub {NoDDClr} + mov (16) mbMSGPAYLOADC(1,1)<2> r[p0,128+32]<32;16,2>:ub {NoDDChk} +#else // defined(MONO) + mov (16) mbMSGPAYLOADC(0)<1> 0x80808080:ud {Compr} +#endif // !defined(MONO) + + #if defined(MBAFF) + add (1) pMSGDSC:ud gFIELDFLAGS:uw MSG_LEN(2)+nDWBWMSGDSC+nBDIX_DESTC+ENWRCOM:ud + #elif defined(FIELD) + add (1) pMSGDSC:ud gFIELDFLAGS:uw MSG_LEN(2)+nDWBWMSGDSC_TF+nBDIX_DESTC+ENWRCOM:ud + #endif + + asr (1) gMSGSRC.1:d gMSGSRC.1:d 1:w {NoDDClr} + mov (1) gMSGSRC.2:ud 0x0003000f:ud {NoDDChk} // NV12 (16x4) + +#if defined(FRAME) + send (8) gREG_WRITE_COMMIT_UV<1>:ud mMSGHDRCW gMSGSRC<8;8,1>:ud DAPWRITE MSG_LEN(2)+nDWBWMSGDSC+nBDIX_DESTC+ENWRCOM +#else + send (8) gREG_WRITE_COMMIT_UV<1>:ud mMSGHDRCW gMSGSRC<8;8,1>:ud DAPWRITE pMSGDSC:ud +#endif // defined(FRAME) + +//#endif // !defined(__WRITERECON_C_8x4__) diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/writeRecon_Y_16x8.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/writeRecon_Y_16x8.asm --- libva-1.0.1/i965_drv_video/shaders/h264/mc/writeRecon_Y_16x8.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/writeRecon_Y_16x8.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,43 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Kernel name: WriteRecon_Y_16x8.asm +// +// $Revision: 10 $ +// $Date: 10/03/06 5:28p $ +// + + +//#if !defined(__WRITERECON_Y_16x8__) // Make sure this is only included once +//#define __WRITERECON_Y_16x8__ + + + add (1) p0:w pERRORY:w -256:w + add (1) p1:w pERRORY:w -128:w + + $for(0; <4; 1) { + mov (16) mbMSGPAYLOADY(%1,0)<1> r[p0,%1*32+0]<8,2>:ub {NoDDClr} + mov (16) mbMSGPAYLOADY(%1,16)<1> r[p0,%1*32+16]<8,2>:ub {NoDDChk} + } + + #if defined(MBAFF) + add (1) pMSGDSC:ud gFIELDFLAGS:uw MSG_LEN(4)+nDWBWMSGDSC+nBDIX_DESTY+ENWRCOM:ud + #elif defined(FIELD) + add (1) pMSGDSC:ud gFIELDFLAGS:uw MSG_LEN(4)+nDWBWMSGDSC_TF+nBDIX_DESTY+ENWRCOM:ud + #endif + + mov (2) gMSGSRC.0<1>:d gX<2;2,1>:w {NoDDClr} + mov (1) gMSGSRC.2:ud 0x0007000f:ud {NoDDChk} + +#if defined(FRAME) + send (8) gREG_WRITE_COMMIT_Y<1>:ud mMSGHDRYW gMSGSRC<8;8,1>:ud DAPWRITE MSG_LEN(4)+nDWBWMSGDSC+nBDIX_DESTY+ENWRCOM +#else + send (8) gREG_WRITE_COMMIT_Y<1>:ud mMSGHDRYW gMSGSRC<8;8,1>:ud DAPWRITE pMSGDSC:ud +#endif + +//#endif // !defined(__WRITERECON_Y_16x8__) diff -Nru libva-1.0.1/i965_drv_video/shaders/h264/mc/writeRecon_YC.asm libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/writeRecon_YC.asm --- libva-1.0.1/i965_drv_video/shaders/h264/mc/writeRecon_YC.asm 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/h264/mc/writeRecon_YC.asm 2010-07-07 12:20:29.000000000 +0000 @@ -0,0 +1,79 @@ +/* + * Copyright © <2010>, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at + * http://www.opensource.org/licenses/eclipse-1.0.php. + * + */ +// Kernel name: WriteRecon_YC.asm +// +// $Revision: 10 $ +// $Date: 10/03/06 5:28p $ +// + + +//#if !defined(__WRITERECON_YC__) // Make sure this is only included once +//#define __WRITERECON_YC__ + + // TODO: Merge two inst to one. + mov (1) p0:w nOFFSET_ERRORY:w + mov (1) p1:w nOFFSET_ERRORY+128:w + + $for(0; <4; 1) { + mov (16) mbMSGPAYLOADY(%1,0)<1> r[p0,%1*32+0]<8,2>:ub {NoDDClr} + mov (16) mbMSGPAYLOADY(%1,16)<1> r[p0,%1*32+16]<8,2>:ub {NoDDChk} + } + $for(0; <4; 1) { + mov (16) mbMSGPAYLOADY(%1+4,0)<1> r[p0,%1*32+256]<8,2>:ub {NoDDClr} + mov (16) mbMSGPAYLOADY(%1+4,16)<1> r[p0,%1*32+16+256]<8,2>:ub {NoDDChk} + } + + + #if defined(MBAFF) + add (1) pMSGDSC:ud gFIELDFLAGS:uw MSG_LEN(8)+nDWBWMSGDSC+nBDIX_DESTY+ENWRCOM:ud + #elif defined(FIELD) + add (1) pMSGDSC:ud gFIELDFLAGS:uw MSG_LEN(8)+nDWBWMSGDSC_TF+nBDIX_DESTY+ENWRCOM:ud + #endif + + mov (2) gMSGSRC.0<1>:d gX<2;2,1>:w {NoDDClr} + mov (1) gMSGSRC.2:ud 0x000f000f:ud {NoDDChk} + +#if defined(FRAME) + send (8) gREG_WRITE_COMMIT_Y<1>:ud mMSGHDRYW gMSGSRC<8;8,1>:ud DAPWRITE MSG_LEN(8)+nDWBWMSGDSC+nBDIX_DESTY+ENWRCOM +#else + send (8) gREG_WRITE_COMMIT_Y<1>:ud mMSGHDRYW gMSGSRC<8;8,1>:ud DAPWRITE pMSGDSC:ud +#endif + +#ifndef MONO + // TODO: Why did I use p0? + mov (1) p0:w nOFFSET_ERRORC:w + mov (16) mbMSGPAYLOADC(0,0)<2> r[p0,0]<32;16,2>:ub {NoDDClr} + mov (16) mbMSGPAYLOADC(0,1)<2> r[p0,128]<32;16,2>:ub {NoDDChk} + mov (16) mbMSGPAYLOADC(1,0)<2> r[p0,32]<32;16,2>:ub {NoDDClr} + mov (16) mbMSGPAYLOADC(1,1)<2> r[p0,128+32]<32;16,2>:ub {NoDDChk} + mov (16) mbMSGPAYLOADC(2,0)<2> r[p0,64]<32;16,2>:ub {NoDDClr} + mov (16) mbMSGPAYLOADC(2,1)<2> r[p0,128+64]<32;16,2>:ub {NoDDChk} + mov (16) mbMSGPAYLOADC(3,0)<2> r[p0,96]<32;16,2>:ub {NoDDClr} + mov (16) mbMSGPAYLOADC(3,1)<2> r[p0,128+96]<32;16,2>:ub {NoDDChk} + + + #if defined(MBAFF) + add (1) pMSGDSC:ud gFIELDFLAGS:uw MSG_LEN(4)+nDWBWMSGDSC+nBDIX_DESTC+ENWRCOM:ud + #elif defined(FIELD) + add (1) pMSGDSC:ud gFIELDFLAGS:uw MSG_LEN(4)+nDWBWMSGDSC_TF+nBDIX_DESTC+ENWRCOM:ud + #endif + + asr (1) gMSGSRC.1:d gMSGSRC.1:d 1:w {NoDDClr} + mov (1) gMSGSRC.2:ud 0x0007000f:ud {NoDDChk} // NV12 (16x4) + +#if defined(FRAME) + send (8) gREG_WRITE_COMMIT_UV<1>:ud mMSGHDRCW gMSGSRC<8;8,1>:ud DAPWRITE MSG_LEN(4)+nDWBWMSGDSC+nBDIX_DESTC+ENWRCOM +#else + send (8) gREG_WRITE_COMMIT_UV<1>:ud mMSGHDRCW gMSGSRC<8;8,1>:ud DAPWRITE pMSGDSC:ud +#endif // defined(FRAME) + +#endif // !defined(MONO) + + +//#endif // !defined(__WRITERECON_YC__) diff -Nru libva-1.0.1/i965_drv_video/shaders/Makefile.am libva-1.0.1-3+0.31.1/i965_drv_video/shaders/Makefile.am --- libva-1.0.1/i965_drv_video/shaders/Makefile.am 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/Makefile.am 2010-07-07 12:20:29.000000000 +0000 @@ -1 +1 @@ -SUBDIRS = mpeg2 render +SUBDIRS = h264 mpeg2 render diff -Nru libva-1.0.1/i965_drv_video/shaders/Makefile.in libva-1.0.1-3+0.31.1/i965_drv_video/shaders/Makefile.in --- libva-1.0.1/i965_drv_video/shaders/Makefile.in 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/Makefile.in 2010-04-06 06:06:26.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.10.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008 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. @@ -16,9 +15,8 @@ @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c @@ -42,7 +40,6 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ @@ -54,38 +51,10 @@ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ - distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -am__relativize = \ - dir0=`pwd`; \ - sed_first='s,^\([^/]*\)/.*$$,\1,'; \ - sed_rest='s,^[^/]*/*,,'; \ - sed_last='s,^.*/\([^/]*\)$$,\1,'; \ - sed_butlast='s,/*[^/]*$$,,'; \ - while test -n "$$dir1"; do \ - first=`echo "$$dir1" | sed -e "$$sed_first"`; \ - if test "$$first" != "."; then \ - if test "$$first" = ".."; then \ - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ - else \ - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ - if test "$$first2" = "$$first"; then \ - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ - else \ - dir2="../$$dir2"; \ - fi; \ - dir0="$$dir0"/"$$first"; \ - fi; \ - fi; \ - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ - done; \ - reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ @@ -98,30 +67,32 @@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DRM_CFLAGS = @DRM_CFLAGS@ DRM_LIBS = @DRM_LIBS@ DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ +ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -FGREP = @FGREP@ +F77 = @F77@ +FFLAGS = @FFLAGS@ GEN4ASM_CFLAGS = @GEN4ASM_CFLAGS@ GEN4ASM_LIBS = @GEN4ASM_LIBS@ -GL_DEPS_CFLAGS = @GL_DEPS_CFLAGS@ -GL_DEPS_LIBS = @GL_DEPS_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ @@ -134,25 +105,18 @@ LIBVA_MAJOR_VERSION = @LIBVA_MAJOR_VERSION@ LIBVA_MICRO_VERSION = @LIBVA_MICRO_VERSION@ LIBVA_MINOR_VERSION = @LIBVA_MINOR_VERSION@ -LIBVA_SDS_VERSION = @LIBVA_SDS_VERSION@ LIBVA_VERSION = @LIBVA_VERSION@ -LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ -NM = @NM@ NMEDIT = @NMEDIT@ -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@ @@ -173,7 +137,8 @@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -206,7 +171,6 @@ libvacorelib = @libvacorelib@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -220,7 +184,6 @@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = mpeg2 render @@ -231,14 +194,14 @@ @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign i965_drv_video/shaders/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign i965_drv_video/shaders/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu i965_drv_video/shaders/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu i965_drv_video/shaders/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -256,7 +219,6 @@ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo @@ -271,7 +233,7 @@ # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): - @fail= failcom='exit 1'; \ + @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ @@ -288,7 +250,7 @@ else \ local_target="$$target"; \ fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ @@ -296,7 +258,7 @@ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ + @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ @@ -322,16 +284,16 @@ else \ local_target="$$target"; \ fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) @@ -339,14 +301,14 @@ 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; } \ + $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - set x; \ + tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ @@ -358,7 +320,7 @@ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ - set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ @@ -367,34 +329,29 @@ 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 \ + if test -z "$(ETAGS_ARGS)$$tags$$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; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) + tags=; \ 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" \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique + $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -415,44 +372,29 @@ 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 {} \;; \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ - $(am__relativize); \ - new_distdir=$$reldir; \ - dir1=$$subdir; dir2="$(top_distdir)"; \ - $(am__relativize); \ - new_top_distdir=$$reldir; \ - echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ - echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ - ($(am__cd) $$subdir && \ + distdir=`$(am__cd) $(distdir) && pwd`; \ + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ + (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$new_top_distdir" \ - distdir="$$new_distdir" \ + top_distdir="$$top_distdir" \ + distdir="$$distdir/$$subdir" \ am__remove_distdir=: \ am__skip_length_check=: \ - am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ @@ -482,7 +424,6 @@ 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) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -501,8 +442,6 @@ html: html-recursive -html-am: - info: info-recursive info-am: @@ -511,28 +450,18 @@ install-dvi: install-dvi-recursive -install-dvi-am: - install-exec-am: install-html: install-html-recursive -install-html-am: - install-info: install-info-recursive -install-info-am: - install-man: install-pdf: install-pdf-recursive -install-pdf-am: - install-ps: install-ps-recursive -install-ps-am: - installcheck-am: maintainer-clean: maintainer-clean-recursive @@ -553,8 +482,8 @@ uninstall-am: -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ - install-am install-strip tags-recursive +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ + install-strip .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ @@ -570,7 +499,6 @@ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am - # 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: diff -Nru libva-1.0.1/i965_drv_video/shaders/mpeg2/Makefile.in libva-1.0.1-3+0.31.1/i965_drv_video/shaders/mpeg2/Makefile.in --- libva-1.0.1/i965_drv_video/shaders/mpeg2/Makefile.in 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/mpeg2/Makefile.in 2010-04-06 06:06:26.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.10.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008 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. @@ -16,9 +15,8 @@ @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c @@ -42,7 +40,6 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ @@ -54,38 +51,10 @@ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ - distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -am__relativize = \ - dir0=`pwd`; \ - sed_first='s,^\([^/]*\)/.*$$,\1,'; \ - sed_rest='s,^[^/]*/*,,'; \ - sed_last='s,^.*/\([^/]*\)$$,\1,'; \ - sed_butlast='s,/*[^/]*$$,,'; \ - while test -n "$$dir1"; do \ - first=`echo "$$dir1" | sed -e "$$sed_first"`; \ - if test "$$first" != "."; then \ - if test "$$first" = ".."; then \ - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ - else \ - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ - if test "$$first2" = "$$first"; then \ - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ - else \ - dir2="../$$dir2"; \ - fi; \ - dir0="$$dir0"/"$$first"; \ - fi; \ - fi; \ - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ - done; \ - reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ @@ -98,30 +67,32 @@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DRM_CFLAGS = @DRM_CFLAGS@ DRM_LIBS = @DRM_LIBS@ DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ +ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -FGREP = @FGREP@ +F77 = @F77@ +FFLAGS = @FFLAGS@ GEN4ASM_CFLAGS = @GEN4ASM_CFLAGS@ GEN4ASM_LIBS = @GEN4ASM_LIBS@ -GL_DEPS_CFLAGS = @GL_DEPS_CFLAGS@ -GL_DEPS_LIBS = @GL_DEPS_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ @@ -134,25 +105,18 @@ LIBVA_MAJOR_VERSION = @LIBVA_MAJOR_VERSION@ LIBVA_MICRO_VERSION = @LIBVA_MICRO_VERSION@ LIBVA_MINOR_VERSION = @LIBVA_MINOR_VERSION@ -LIBVA_SDS_VERSION = @LIBVA_SDS_VERSION@ LIBVA_VERSION = @LIBVA_VERSION@ -LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ -NM = @NM@ NMEDIT = @NMEDIT@ -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@ @@ -173,7 +137,8 @@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -206,7 +171,6 @@ libvacorelib = @libvacorelib@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -220,7 +184,6 @@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = vld @@ -231,14 +194,14 @@ @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign i965_drv_video/shaders/mpeg2/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign i965_drv_video/shaders/mpeg2/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu i965_drv_video/shaders/mpeg2/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu i965_drv_video/shaders/mpeg2/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -256,7 +219,6 @@ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo @@ -271,7 +233,7 @@ # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): - @fail= failcom='exit 1'; \ + @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ @@ -288,7 +250,7 @@ else \ local_target="$$target"; \ fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ @@ -296,7 +258,7 @@ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ + @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ @@ -322,16 +284,16 @@ else \ local_target="$$target"; \ fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) @@ -339,14 +301,14 @@ 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; } \ + $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - set x; \ + tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ @@ -358,7 +320,7 @@ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ - set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ @@ -367,34 +329,29 @@ 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 \ + if test -z "$(ETAGS_ARGS)$$tags$$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; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) + tags=; \ 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" \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique + $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -415,44 +372,29 @@ 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 {} \;; \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ - $(am__relativize); \ - new_distdir=$$reldir; \ - dir1=$$subdir; dir2="$(top_distdir)"; \ - $(am__relativize); \ - new_top_distdir=$$reldir; \ - echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ - echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ - ($(am__cd) $$subdir && \ + distdir=`$(am__cd) $(distdir) && pwd`; \ + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ + (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$new_top_distdir" \ - distdir="$$new_distdir" \ + top_distdir="$$top_distdir" \ + distdir="$$distdir/$$subdir" \ am__remove_distdir=: \ am__skip_length_check=: \ - am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ @@ -482,7 +424,6 @@ 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) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -501,8 +442,6 @@ html: html-recursive -html-am: - info: info-recursive info-am: @@ -511,28 +450,18 @@ install-dvi: install-dvi-recursive -install-dvi-am: - install-exec-am: install-html: install-html-recursive -install-html-am: - install-info: install-info-recursive -install-info-am: - install-man: install-pdf: install-pdf-recursive -install-pdf-am: - install-ps: install-ps-recursive -install-ps-am: - installcheck-am: maintainer-clean: maintainer-clean-recursive @@ -553,8 +482,8 @@ uninstall-am: -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ - install-am install-strip tags-recursive +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ + install-strip .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ @@ -570,7 +499,6 @@ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am - # 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: diff -Nru libva-1.0.1/i965_drv_video/shaders/mpeg2/vld/Makefile.in libva-1.0.1-3+0.31.1/i965_drv_video/shaders/mpeg2/vld/Makefile.in --- libva-1.0.1/i965_drv_video/shaders/mpeg2/vld/Makefile.in 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/mpeg2/vld/Makefile.in 2010-04-06 06:06:26.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.10.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008 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. @@ -16,9 +15,8 @@ @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c @@ -42,7 +40,6 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -58,30 +55,32 @@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DRM_CFLAGS = @DRM_CFLAGS@ DRM_LIBS = @DRM_LIBS@ DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ +ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -FGREP = @FGREP@ +F77 = @F77@ +FFLAGS = @FFLAGS@ GEN4ASM_CFLAGS = @GEN4ASM_CFLAGS@ GEN4ASM_LIBS = @GEN4ASM_LIBS@ -GL_DEPS_CFLAGS = @GL_DEPS_CFLAGS@ -GL_DEPS_LIBS = @GL_DEPS_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ @@ -94,25 +93,18 @@ LIBVA_MAJOR_VERSION = @LIBVA_MAJOR_VERSION@ LIBVA_MICRO_VERSION = @LIBVA_MICRO_VERSION@ LIBVA_MINOR_VERSION = @LIBVA_MINOR_VERSION@ -LIBVA_SDS_VERSION = @LIBVA_SDS_VERSION@ LIBVA_VERSION = @LIBVA_VERSION@ -LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ -NM = @NM@ NMEDIT = @NMEDIT@ -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@ @@ -133,7 +125,8 @@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -166,7 +159,6 @@ libvacorelib = @libvacorelib@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -180,7 +172,6 @@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ INTEL_G4I = addidct.g4i \ @@ -269,14 +260,14 @@ @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign i965_drv_video/shaders/mpeg2/vld/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign i965_drv_video/shaders/mpeg2/vld/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu i965_drv_video/shaders/mpeg2/vld/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu i965_drv_video/shaders/mpeg2/vld/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -294,7 +285,6 @@ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo @@ -324,17 +314,13 @@ 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 {} \;; \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done @@ -364,7 +350,6 @@ 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) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -385,8 +370,6 @@ html: html-am -html-am: - info: info-am info-am: @@ -395,28 +378,18 @@ install-dvi: install-dvi-am -install-dvi-am: - install-exec-am: 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 @@ -437,7 +410,7 @@ uninstall-am: -.MAKE: all check install install-am install-strip +.MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ clean-local distclean distclean-generic distclean-libtool \ @@ -459,7 +432,6 @@ @HAVE_GEN4ASM_TRUE@clean-local: @HAVE_GEN4ASM_TRUE@ -rm -f $(INTEL_G4B) @HAVE_GEN4ASM_TRUE@ -rm -f $(INTEL_G4B_GEN5) - # 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: diff -Nru libva-1.0.1/i965_drv_video/shaders/render/exa_wm.g4i libva-1.0.1-3+0.31.1/i965_drv_video/shaders/render/exa_wm.g4i --- libva-1.0.1/i965_drv_video/shaders/render/exa_wm.g4i 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/render/exa_wm.g4i 2010-07-07 12:20:29.000000000 +0000 @@ -35,6 +35,9 @@ define(`screen_x0', `g1.0<0,1,0>F') define(`screen_y0', `g1.4<0,1,0>F') +/* UV flag */ +define(`interleaved_uv', `g2.0<0,1,0>UW') + /* Source transformation parameters */ define(`src_du_dx', `g3.0<0,1,0>F') define(`src_du_dy', `g3.4<0,1,0>F') diff -Nru libva-1.0.1/i965_drv_video/shaders/render/exa_wm_src_sample_planar.g4a libva-1.0.1-3+0.31.1/i965_drv_video/shaders/render/exa_wm_src_sample_planar.g4a --- libva-1.0.1/i965_drv_video/shaders/render/exa_wm_src_sample_planar.g4a 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/render/exa_wm_src_sample_planar.g4a 2010-07-07 12:20:29.000000000 +0000 @@ -34,23 +34,18 @@ /* use simd16 sampler, param 0 is u, param 1 is v. */ /* 'payload' loading, assuming tex coord start from g4 */ +and.nz (1) null interleaved_uv 0x01UW {align1}; +(f0) jmpi INTERLEAVED_UV; + /* load r */ mov (1) g0.8<1>UD 0x0000e000UD { align1 mask_disable }; /* src_msg will be copied with g0, as it contains send desc */ /* emit sampler 'send' cmd */ -/* sample Y */ -send (16) src_msg_ind /* msg reg index */ - src_sample_g<1>UW /* readback */ - g0<8,8,1>UW /* copy to msg start reg*/ - sampler (1,0,F) /* sampler message description, (binding_table,sampler_index,datatype) - /* here(src->dst) we should use src_sampler and src_surface */ - mlen 5 rlen 2 { align1 }; /* required message len 5, readback len 8 */ - /* sample U (Cr) */ send (16) src_msg_ind /* msg reg index */ - src_sample_r<1>UW /* readback */ + src_sample_g<1>UW /* readback */ g0<8,8,1>UW /* copy to msg start reg*/ sampler (3,2,F) /* sampler message description, (binding_table,sampler_index,datatype) /* here(src->dst) we should use src_sampler and src_surface */ @@ -63,3 +58,30 @@ sampler (5,4,F) /* sampler message description, (binding_table,sampler_index,datatype) /* here(src->dst) we should use src_sampler and src_surface */ mlen 5 rlen 2 { align1 }; /* required message len 5, readback len 8 */ + +jmpi SAMPLE_Y; + +INTERLEAVED_UV: +/* load r */ +mov (1) g0.8<1>UD 0x0000c000UD { align1 mask_disable }; + +/* sample UV (CrCb) */ +send (16) src_msg_ind /* msg reg index */ + src_sample_g<1>UW /* readback */ + g0<8,8,1>UW /* copy to msg start reg*/ + sampler (3,2,F) /* sampler message description, (binding_table,sampler_index,datatype) + /* here(src->dst) we should use src_sampler and src_surface */ + mlen 5 rlen 4 { align1 }; /* required message len 5, readback len 8 */ + +/* load r */ +mov (1) g0.8<1>UD 0x0000e000UD { align1 mask_disable }; + +SAMPLE_Y: +/* sample Y */ +send (16) src_msg_ind /* msg reg index */ + src_sample_r<1>UW /* readback */ + g0<8,8,1>UW /* copy to msg start reg*/ + sampler (1,0,F) /* sampler message description, (binding_table,sampler_index,datatype) + /* here(src->dst) we should use src_sampler and src_surface */ + mlen 5 rlen 2 { align1 }; /* required message len 5, readback len 8 */ + diff -Nru libva-1.0.1/i965_drv_video/shaders/render/exa_wm_src_sample_planar.g4b libva-1.0.1-3+0.31.1/i965_drv_video/shaders/render/exa_wm_src_sample_planar.g4b --- libva-1.0.1/i965_drv_video/shaders/render/exa_wm_src_sample_planar.g4b 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/render/exa_wm_src_sample_planar.g4b 2010-07-07 12:20:29.000000000 +0000 @@ -1,4 +1,10 @@ + { 0x02000005, 0x20002d3c, 0x00000040, 0x00010001 }, + { 0x00010020, 0x34001c00, 0x00001400, 0x00000004 }, { 0x00000201, 0x20080061, 0x00000000, 0x0000e000 }, - { 0x01800031, 0x22001d29, 0x008d0000, 0x02520001 }, - { 0x01800031, 0x21c01d29, 0x008d0000, 0x02520203 }, + { 0x01800031, 0x22001d29, 0x008d0000, 0x02520203 }, { 0x01800031, 0x22401d29, 0x008d0000, 0x02520405 }, + { 0x00000020, 0x34001c00, 0x00001400, 0x00000003 }, + { 0x00000201, 0x20080061, 0x00000000, 0x0000c000 }, + { 0x01800031, 0x22001d29, 0x008d0000, 0x02540203 }, + { 0x00000201, 0x20080061, 0x00000000, 0x0000e000 }, + { 0x01800031, 0x21c01d29, 0x008d0000, 0x02520001 }, diff -Nru libva-1.0.1/i965_drv_video/shaders/render/exa_wm_src_sample_planar.g4b.gen5 libva-1.0.1-3+0.31.1/i965_drv_video/shaders/render/exa_wm_src_sample_planar.g4b.gen5 --- libva-1.0.1/i965_drv_video/shaders/render/exa_wm_src_sample_planar.g4b.gen5 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/render/exa_wm_src_sample_planar.g4b.gen5 2010-07-07 12:20:29.000000000 +0000 @@ -1,4 +1,10 @@ + { 0x02000005, 0x20002d3c, 0x00000040, 0x00010001 }, + { 0x00010020, 0x34001c00, 0x00001400, 0x00000008 }, { 0x00000201, 0x20080061, 0x00000000, 0x0000e000 }, - { 0x01800031, 0x22001d29, 0x208d0000, 0x0a2a0001 }, - { 0x01800031, 0x21c01d29, 0x208d0000, 0x0a2a0203 }, + { 0x01800031, 0x22001d29, 0x208d0000, 0x0a2a0203 }, { 0x01800031, 0x22401d29, 0x208d0000, 0x0a2a0405 }, + { 0x00000020, 0x34001c00, 0x00001400, 0x00000006 }, + { 0x00000201, 0x20080061, 0x00000000, 0x0000c000 }, + { 0x01800031, 0x22001d29, 0x208d0000, 0x0a4a0203 }, + { 0x00000201, 0x20080061, 0x00000000, 0x0000e000 }, + { 0x01800031, 0x21c01d29, 0x208d0000, 0x0a2a0001 }, diff -Nru libva-1.0.1/i965_drv_video/shaders/render/exa_wm_yuv_rgb.g4a libva-1.0.1-3+0.31.1/i965_drv_video/shaders/render/exa_wm_yuv_rgb.g4a --- libva-1.0.1/i965_drv_video/shaders/render/exa_wm_yuv_rgb.g4a 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/render/exa_wm_yuv_rgb.g4a 2010-07-07 12:20:29.000000000 +0000 @@ -30,25 +30,25 @@ define(`YCbCr_base', `src_sample_base') -define(`Cr', `src_sample_r') -define(`Cr_01', `src_sample_r_01') -define(`Cr_23', `src_sample_r_23') - -define(`Y', `src_sample_g') -define(`Y_01', `src_sample_g_01') -define(`Y_23', `src_sample_g_23') - -define(`Cb', `src_sample_b') -define(`Cb_01', `src_sample_b_01') -define(`Cb_23', `src_sample_b_23') - -define(`Crn', `mask_sample_r') -define(`Crn_01', `mask_sample_r_01') -define(`Crn_23', `mask_sample_r_23') - -define(`Yn', `mask_sample_g') -define(`Yn_01', `mask_sample_g_01') -define(`Yn_23', `mask_sample_g_23') +define(`Cr', `src_sample_b') +define(`Cr_01', `src_sample_b_01') +define(`Cr_23', `src_sample_b_23') + +define(`Y', `src_sample_r') +define(`Y_01', `src_sample_r_01') +define(`Y_23', `src_sample_r_23') + +define(`Cb', `src_sample_g') +define(`Cb_01', `src_sample_g_01') +define(`Cb_23', `src_sample_g_23') + +define(`Crn', `mask_sample_g') +define(`Crn_01', `mask_sample_g_01') +define(`Crn_23', `mask_sample_g_23') + +define(`Yn', `mask_sample_r') +define(`Yn_01', `mask_sample_r_01') +define(`Yn_23', `mask_sample_r_23') define(`Cbn', `mask_sample_b') define(`Cbn_01', `mask_sample_b_01') diff -Nru libva-1.0.1/i965_drv_video/shaders/render/exa_wm_yuv_rgb.g4b libva-1.0.1-3+0.31.1/i965_drv_video/shaders/render/exa_wm_yuv_rgb.g4b --- libva-1.0.1/i965_drv_video/shaders/render/exa_wm_yuv_rgb.g4b 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/render/exa_wm_yuv_rgb.g4b 2010-07-07 12:20:29.000000000 +0000 @@ -1,11 +1,11 @@ - { 0x00802040, 0x23007fbd, 0x008d0200, 0xbd808081 }, - { 0x00802041, 0x23007fbd, 0x008d0300, 0x3f94fdf4 }, - { 0x00802040, 0x22c07fbd, 0x008d01c0, 0xbf008084 }, - { 0x00802040, 0x23407fbd, 0x008d0240, 0xbf008084 }, - { 0x00802001, 0x240003bc, 0x008d0300, 0x00000000 }, - { 0x80802048, 0x21c07fbd, 0x008d02c0, 0x3fcc49ba }, - { 0x00802001, 0x240003bc, 0x008d0300, 0x00000000 }, - { 0x00802048, 0x24007fbc, 0x008d02c0, 0xbf5020c5 }, + { 0x00802040, 0x22c07fbd, 0x008d01c0, 0xbd808081 }, + { 0x00802041, 0x22c07fbd, 0x008d02c0, 0x3f94fdf4 }, + { 0x00802040, 0x23007fbd, 0x008d0240, 0xbf008084 }, + { 0x00802040, 0x23407fbd, 0x008d0200, 0xbf008084 }, + { 0x00802001, 0x240003bc, 0x008d02c0, 0x00000000 }, + { 0x80802048, 0x21c07fbd, 0x008d0300, 0x3fcc49ba }, + { 0x00802001, 0x240003bc, 0x008d02c0, 0x00000000 }, + { 0x00802048, 0x24007fbc, 0x008d0300, 0xbf5020c5 }, { 0x80802048, 0x22007fbd, 0x008d0340, 0xbec8b439 }, - { 0x00802001, 0x240003bc, 0x008d0300, 0x00000000 }, + { 0x00802001, 0x240003bc, 0x008d02c0, 0x00000000 }, { 0x80802048, 0x22407fbd, 0x008d0340, 0x40011687 }, diff -Nru libva-1.0.1/i965_drv_video/shaders/render/exa_wm_yuv_rgb.g4b.gen5 libva-1.0.1-3+0.31.1/i965_drv_video/shaders/render/exa_wm_yuv_rgb.g4b.gen5 --- libva-1.0.1/i965_drv_video/shaders/render/exa_wm_yuv_rgb.g4b.gen5 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/render/exa_wm_yuv_rgb.g4b.gen5 2010-07-07 12:20:29.000000000 +0000 @@ -1,11 +1,11 @@ - { 0x00802040, 0x23007fbd, 0x008d0200, 0xbd808081 }, - { 0x00802041, 0x23007fbd, 0x008d0300, 0x3f94fdf4 }, - { 0x00802040, 0x22c07fbd, 0x008d01c0, 0xbf008084 }, - { 0x00802040, 0x23407fbd, 0x008d0240, 0xbf008084 }, - { 0x00802001, 0x240003bc, 0x008d0300, 0x00000000 }, - { 0x80802048, 0x21c07fbd, 0x008d02c0, 0x3fcc49ba }, - { 0x00802001, 0x240003bc, 0x008d0300, 0x00000000 }, - { 0x00802048, 0x24007fbc, 0x008d02c0, 0xbf5020c5 }, + { 0x00802040, 0x22c07fbd, 0x008d01c0, 0xbd808081 }, + { 0x00802041, 0x22c07fbd, 0x008d02c0, 0x3f94fdf4 }, + { 0x00802040, 0x23007fbd, 0x008d0240, 0xbf008084 }, + { 0x00802040, 0x23407fbd, 0x008d0200, 0xbf008084 }, + { 0x00802001, 0x240003bc, 0x008d02c0, 0x00000000 }, + { 0x80802048, 0x21c07fbd, 0x008d0300, 0x3fcc49ba }, + { 0x00802001, 0x240003bc, 0x008d02c0, 0x00000000 }, + { 0x00802048, 0x24007fbc, 0x008d0300, 0xbf5020c5 }, { 0x80802048, 0x22007fbd, 0x008d0340, 0xbec8b439 }, - { 0x00802001, 0x240003bc, 0x008d0300, 0x00000000 }, + { 0x00802001, 0x240003bc, 0x008d02c0, 0x00000000 }, { 0x80802048, 0x22407fbd, 0x008d0340, 0x40011687 }, diff -Nru libva-1.0.1/i965_drv_video/shaders/render/Makefile.in libva-1.0.1-3+0.31.1/i965_drv_video/shaders/render/Makefile.in --- libva-1.0.1/i965_drv_video/shaders/render/Makefile.in 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/i965_drv_video/shaders/render/Makefile.in 2010-04-06 06:06:26.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.10.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008 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. @@ -16,9 +15,8 @@ @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c @@ -42,7 +40,6 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -58,30 +55,32 @@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DRM_CFLAGS = @DRM_CFLAGS@ DRM_LIBS = @DRM_LIBS@ DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ +ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -FGREP = @FGREP@ +F77 = @F77@ +FFLAGS = @FFLAGS@ GEN4ASM_CFLAGS = @GEN4ASM_CFLAGS@ GEN4ASM_LIBS = @GEN4ASM_LIBS@ -GL_DEPS_CFLAGS = @GL_DEPS_CFLAGS@ -GL_DEPS_LIBS = @GL_DEPS_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ @@ -94,25 +93,18 @@ LIBVA_MAJOR_VERSION = @LIBVA_MAJOR_VERSION@ LIBVA_MICRO_VERSION = @LIBVA_MICRO_VERSION@ LIBVA_MINOR_VERSION = @LIBVA_MINOR_VERSION@ -LIBVA_SDS_VERSION = @LIBVA_SDS_VERSION@ LIBVA_VERSION = @LIBVA_VERSION@ -LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ -NM = @NM@ NMEDIT = @NMEDIT@ -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@ @@ -133,7 +125,8 @@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -166,7 +159,6 @@ libvacorelib = @libvacorelib@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -180,7 +172,6 @@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ INTEL_G4I = \ @@ -230,14 +221,14 @@ @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign i965_drv_video/shaders/render/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign i965_drv_video/shaders/render/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu i965_drv_video/shaders/render/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu i965_drv_video/shaders/render/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -255,7 +246,6 @@ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo @@ -285,17 +275,13 @@ 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 {} \;; \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done @@ -325,7 +311,6 @@ 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) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -346,8 +331,6 @@ html: html-am -html-am: - info: info-am info-am: @@ -356,28 +339,18 @@ install-dvi: install-dvi-am -install-dvi-am: - install-exec-am: 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 @@ -398,7 +371,7 @@ uninstall-am: -.MAKE: all check install install-am install-strip +.MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ clean-local distclean distclean-generic distclean-libtool \ @@ -420,7 +393,6 @@ @HAVE_GEN4ASM_TRUE@clean-local: @HAVE_GEN4ASM_TRUE@ -rm -f $(INTEL_G4B) @HAVE_GEN4ASM_TRUE@ -rm -f $(INTEL_G4B_GEN5) - # 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: diff -Nru libva-1.0.1/install-sh libva-1.0.1-3+0.31.1/install-sh --- libva-1.0.1/install-sh 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/install-sh 2009-06-24 11:52:29.000000000 +0000 @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2009-04-28.21; # UTC +scriptversion=2006-12-25.00 # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -515,6 +515,5 @@ # 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" +# time-stamp-end: "$" # End: diff -Nru libva-1.0.1/libva-glx.pc.in libva-1.0.1-3+0.31.1/libva-glx.pc.in --- libva-1.0.1/libva-glx.pc.in 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/libva-glx.pc.in 2010-06-01 10:57:37.000000000 +0000 @@ -0,0 +1,12 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ +display=glx + +Name: libva-${display} +Description: Userspace Video Acceleration (VA) ${display} interface +Requires: libva +Version: @PACKAGE_VERSION@ +Libs: -L${libdir} -lva-${display} +Cflags: -I${includedir} diff -Nru libva-1.0.1/libva-x11.pc.in libva-1.0.1-3+0.31.1/libva-x11.pc.in --- libva-1.0.1/libva-x11.pc.in 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/libva-x11.pc.in 2010-06-02 09:03:43.000000000 +0000 @@ -6,6 +6,7 @@ Name: libva-${display} Description: Userspace Video Acceleration (VA) ${display} interface +Requires: libva Version: @PACKAGE_VERSION@ Libs: -L${libdir} -lva-${display} Cflags: -I${includedir} diff -Nru libva-1.0.1/ltmain.sh libva-1.0.1-3+0.31.1/ltmain.sh --- libva-1.0.1/ltmain.sh 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/ltmain.sh 2009-06-24 11:52:29.000000000 +0000 @@ -1,83 +1,52 @@ -# Generated from ltmain.m4sh. - -# ltmain.sh (GNU libtool) 2.2.6b -# Written by Gordon Matzigkeit , 1996 - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 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. - -# GNU Libtool is free software; you can redistribute it and/or modify +# ltmain.sh - Provide generalized library-building support services. +# NOTE: Changing this file will not affect anything until you rerun configure. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, +# 2007, 2008 Free Software Foundation, Inc. +# Originally by Gordon Matzigkeit , 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 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 +# 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 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. +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # -# --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 -# --tag=TAG use configuration variables from tag TAG -# -v, --verbose print informational messages (default) -# --version print version information -# -h, --help print short or long 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. -# 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.2.6b Debian-2.2.6b-2ubuntu1 -# automake: $automake_version -# autoconf: $autoconf_version -# -# Report bugs to . +# 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. + +basename="s,^.*/,,g" + +# 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" + +# The name of this program: +progname=`echo "$progpath" | $SED $basename` +modename="$progname" + +# Global variables: +EXIT_SUCCESS=0 +EXIT_FAILURE=1 PROGRAM=ltmain.sh PACKAGE=libtool -VERSION="2.2.6b Debian-2.2.6b-2ubuntu1" -TIMESTAMP="" -package_revision=1.3017 +VERSION="1.5.26 Debian 1.5.26-1ubuntu1" +TIMESTAMP=" (1.1220.2.493 2008/02/01 16:58:18)" -# Be Bourne compatible +# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: @@ -91,261 +60,104 @@ BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh -# NLS nuisances: We save the old values to restore during execute mode. +# Check that we have a working $echo. +if test "X$1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift +elif test "X$1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : +elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then + # Yippee, $echo works! + : +else + # Restart under the correct shell, and then maybe $echo will work. + exec $SHELL "$progpath" --no-reexec ${1+"$@"} +fi + +if test "X$1" = X--fallback-echo; then + # used as fallback echo + shift + cat <&2 -} - -# func_warning arg... -# Echo program name prefixed warning message to standard error. -func_warning () -{ - $opt_warning && $ECHO "$progname${mode+: }$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 "X$my_directory_path" | $Xsed -e "$dirname"` - done - my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e '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" +if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then + $echo "$modename: not configured to build any kind of library" 1>&2 + $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 + exit $EXIT_FAILURE +fi - # 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 -} +# Global variables. +mode=$default_mode +nonopt= +prev= +prevopt= +run= +show="$echo" +show_help= +execute_dlfiles= +duplicate_deps=no +preserve_args= +lo2o="s/\\.lo\$/.${objext}/" +o2lo="s/\\.${objext}\$/.lo/" +extracted_archives= +extracted_serial=0 +##################################### +# Shell function definitions: +# This seems to be the best place for them # func_mktempdir [string] # Make a temporary directory that won't clash with other running @@ -355,7 +167,7 @@ { my_template="${TMPDIR-/tmp}/${1-$progname}" - if test "$opt_dry_run" = ":"; then + if test "$run" = ":"; then # Return a directory name, but don't create it in dry-run mode my_tmpdir="${my_template}-$$" else @@ -364,784 +176,523 @@ 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}$$" + # 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 + 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'" + test -d "$my_tmpdir" || { + $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2 + exit $EXIT_FAILURE + } fi - $ECHO "X$my_tmpdir" | $Xsed + $echo "X$my_tmpdir" | $Xsed } -# 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 () +# 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. +func_win32_libid () { - case $1 in - *[\\\`\"\$]*) - func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$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" + 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 + if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ + $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then + win32_nmres=`eval $NM -f posix -A $1 | \ + $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_quote_for_expand arg -# Aesthetically quote ARG to be evaled later; same as above, -# but do not quote variable references. -func_quote_for_expand () +# 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 () { - case $1 in - *[\\\`\"]*) - my_arg=`$ECHO "X$1" | $Xsed \ - -e "$double_quote_subst" -e "$sed_double_backslash"` ;; + if test -n "$available_tags" && test -z "$tagname"; then + CC_quoted= + for arg in $CC; do + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + CC_quoted="$CC_quoted $arg" + done + 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 "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;; + # Blanks at the start of $base_compile will cause this to fail + # if we don't check for them as well. *) - 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" + 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. + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + CC_quoted="$CC_quoted $arg" + done + case "$@ " in + " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) + # 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 + $echo "$modename: unable to infer tagged configuration" + $echo "$modename: specify a tag with \`--tag'" 1>&2 + exit $EXIT_FAILURE +# else +# $echo "$modename: using $tagname tagged configuration" + fi + ;; + esac + fi } -# 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 () +# func_extract_an_archive dir oldlib +func_extract_an_archive () { - my_cmd="$1" - my_fail_exp="${2-:}" - - ${opt_silent-false} || { - func_quote_for_expand "$my_cmd" - eval "func_echo $func_quote_for_expand_result" - } + f_ex_an_ar_dir="$1"; shift + f_ex_an_ar_oldlib="$1" - 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 + $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)" + $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $? + if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then + : + else + $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2 + exit $EXIT_FAILURE 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 () +# func_extract_archives gentop oldlib ... +func_extract_archives () { - my_cmd="$1" - my_fail_exp="${2-:}" - - ${opt_silent-false} || { - func_quote_for_expand "$my_cmd" - eval "func_echo $func_quote_for_expand_result" - } + my_gentop="$1"; shift + my_oldlibs=${1+"$@"} + my_oldobjs="" + my_xlib="" + my_xabs="" + my_xdir="" + my_status="" - 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 + $show "${rm}r $my_gentop" + $run ${rm}r "$my_gentop" + $show "$mkdir $my_gentop" + $run $mkdir "$my_gentop" + my_status=$? + if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then + exit $my_status fi -} - - + 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 + my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` + my_xlib_u=$my_xlib + while :; do + case " $extracted_archives " in + *" $my_xlib_u "*) + extracted_serial=`expr $extracted_serial + 1` + 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_version -# Echo version message to standard output and exit. -func_version () -{ - $SED -n '/^# '$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 () -{ - $SED -n '/^# Usage:/,/# -h/ { - s/^# // - s/^# *$// - s/\$progname/'$progname'/ - p - }' < "$progpath" - $ECHO - $ECHO "run \`$progname --help | more' for full usage" - exit $? -} - -# func_help -# Echo long help message to standard output and exit. -func_help () -{ - $SED -n '/^# Usage:/,/# Report bugs to/ { - 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 - }' < "$progpath" - exit $? -} - -# func_missing_arg argname -# Echo program name prefixed message to standard error and set global -# exit_cmd. -func_missing_arg () -{ - func_error "missing argument for $1" - exit_cmd=exit + $show "${rm}r $my_xdir" + $run ${rm}r "$my_xdir" + $show "$mkdir $my_xdir" + $run $mkdir "$my_xdir" + exit_status=$? + if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then + exit $exit_status + fi + case $host in + *-darwin*) + $show "Extracting $my_xabs" + # Do not bother doing anything if just a dry run + if test -z "$run"; then + darwin_orig_dir=`pwd` + cd $my_xdir || exit $? + darwin_archive=$my_xabs + darwin_curdir=`pwd` + darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'` + darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null` + if test -n "$darwin_arches"; then + darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'` + darwin_arch= + $show "$darwin_base_archive has multiple architectures $darwin_arches" + for darwin_arch in $darwin_arches ; do + 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 have a bunch of thin objects, gotta fatten them up :) + darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP` + darwin_file= + darwin_files= + for darwin_file in $darwin_filelist; do + darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` + lipo -create -output "$darwin_file" $darwin_files + done # $darwin_filelist + ${rm}r unfat-$$ + cd "$darwin_orig_dir" + else + cd "$darwin_orig_dir" + func_extract_an_archive "$my_xdir" "$my_xabs" + fi # $darwin_arches + fi # $run + ;; + *) + func_extract_an_archive "$my_xdir" "$my_xabs" + ;; + esac + my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` + done + func_extract_archives_result="$my_oldobjs" } +# End of Shell function definitions +##################################### -exit_cmd=: - - - +# Darwin sucks +eval std_shrext=\"$shrext_cmds\" +disable_libs=no -# Check that we have a working $ECHO. -if test "X$1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X$1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then - # Yippee, $ECHO works! - : -else - # Restart under the correct shell, and then maybe $ECHO will work. - exec $SHELL "$progpath" --no-reexec ${1+"$@"} -fi - -if test "X$1" = X--fallback-echo; then - # used as fallback echo +# Parse our command line options once, thoroughly. +while test "$#" -gt 0 +do + arg="$1" shift - cat <&2 + exit $EXIT_FAILURE + ;; + esac -# 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." -} + case $tagname in + CC) + # Don't test for the "default" C tag, as we know, it's there, but + # not specially marked. + ;; + *) + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then + taglist="$taglist $tagname" + # Evaluate the configuration. + eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`" + else + $echo "$progname: ignoring unknown tag $tagname" 1>&2 + fi + ;; + esac + ;; + *) + eval "$prev=\$arg" + ;; + esac + prev= + prevopt= + continue + fi -# func_config -# Display the configuration for all the tags in this script. -func_config () -{ - re_begincf='^# ### BEGIN LIBTOOL' - re_endcf='^# ### END LIBTOOL' + # Have we seen a non-optional argument yet? + case $arg in + --help) + show_help=yes + ;; - # Default configuration. - $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" + --version) + echo "\ +$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP + +Copyright (C) 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." + exit $? + ;; + --config) + ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL 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" + ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath" done - exit $? -} + ;; -# func_features -# Display the features supported by this script. -func_features () -{ - $ECHO "host: $host" + --debug) + $echo "$progname: enabling shell trace mode" + set -x + preserve_args="$preserve_args $arg" + ;; + + --dry-run | -n) + run=: + ;; + + --features) + $echo "host: $host" if test "$build_libtool_libs" = yes; then - $ECHO "enable shared libraries" + $echo "enable shared libraries" else - $ECHO "disable shared libraries" + $echo "disable shared libraries" fi if test "$build_old_libs" = yes; then - $ECHO "enable static libraries" + $echo "enable static libraries" else - $ECHO "disable static libraries" + $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" + --finish) mode="finish" ;; - # 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 -} + --mode) prevopt="--mode" prev=mode ;; + --mode=*) mode="$optarg" ;; -# Parse options once, thoroughly. This comes as soon as possible in -# the script to make things like `libtool --version' happen quickly. -{ + --preserve-dup-deps) duplicate_deps="yes" ;; - # Shorthand for --mode=foo, only valid as the first argument - case $1 in - clean|clea|cle|cl) - shift; set dummy --mode clean ${1+"$@"}; shift + --quiet | --silent) + show=: + preserve_args="$preserve_args $arg" ;; - 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 + + --tag) + prevopt="--tag" + prev=tag + preserve_args="$preserve_args --tag" ;; - finish|finis|fini|fin|fi|f) - shift; set dummy --mode finish ${1+"$@"}; shift + --tag=*) + set tag "$optarg" ${1+"$@"} + shift + prev=tag + preserve_args="$preserve_args --tag" ;; - install|instal|insta|inst|ins|in|i) - shift; set dummy --mode install ${1+"$@"}; shift + + -dlopen) + prevopt="-dlopen" + prev=execute_dlfiles ;; - link|lin|li|l) - shift; set dummy --mode link ${1+"$@"}; shift + + -*) + $echo "$modename: unrecognized option \`$arg'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE ;; - uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) - shift; set dummy --mode uninstall ${1+"$@"}; shift + + *) + nonopt="$arg" + break ;; esac +done - # Parse non-mode specific arguments: - while test "$#" -gt 0; do - opt="$1" - shift - - case $opt in - --config) func_config ;; - - --debug) preserve_args="$preserve_args $opt" - func_echo "enabling shell trace mode" - opt_debug='set -x' - $opt_debug - ;; - - -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break - execute_dlfiles="$execute_dlfiles $1" - shift - ;; - - --dry-run | -n) opt_dry_run=: ;; - --features) func_features ;; - --finish) mode="finish" ;; - - --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break - case $1 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 - - mode="$1" - shift - ;; - - --preserve-dup-deps) - opt_duplicate_deps=: ;; - - --quiet|--silent) preserve_args="$preserve_args $opt" - opt_silent=: - ;; - - --verbose| -v) preserve_args="$preserve_args $opt" - opt_silent=false - ;; - - --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break - preserve_args="$preserve_args $opt $1" - func_enable_tag "$1" # tagname is set here - shift - ;; - - # Separate optargs to long options: - -dlopen=*|--mode=*|--tag=*) - func_opt_split "$opt" - set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"} - shift - ;; - - -\?|-h) func_usage ;; - --help) opt_help=: ;; - --version) func_version ;; +if test -n "$prevopt"; then + $echo "$modename: option \`$prevopt' requires an argument" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE +fi - -*) func_fatal_help "unrecognized option \`$opt'" ;; +case $disable_libs in +no) + ;; +shared) + build_libtool_libs=no + build_old_libs=yes + ;; +static) + build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` + ;; +esac - *) nonopt="$opt" - break - ;; - esac - done +# 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= +if test -z "$show_help"; then - case $host in - *cygwin* | *mingw* | *pw32* | *cegcc*) - # don't eliminate duplications in $postdeps and $predeps - opt_duplicate_compiler_generated_deps=: + # Infer the operation mode. + if test -z "$mode"; then + $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 + $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2 + case $nonopt in + *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*) + mode=link + for arg + do + case $arg in + -c) + mode=compile + break + ;; + esac + done ;; - *) - opt_duplicate_compiler_generated_deps=$opt_duplicate_deps + *db | *dbx | *strace | *truss) + mode=execute ;; - esac - - # Having warned about all mis-specified options, bail out if - # anything was wrong. - $exit_cmd $EXIT_FAILURE -} + *install*|cp|mv) + mode=install + ;; + *rm) + mode=uninstall + ;; + *) + # If we have no mode, but dlfiles were specified, then do execute mode. + test -n "$execute_dlfiles" && mode=execute -# 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 + # Just use the default operation mode. + if test -z "$mode"; then + if test -n "$nonopt"; then + $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 + else + $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 + fi 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 -} - - -## ----------- ## -## Main. ## -## ----------- ## - -$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" + ;; + esac fi - test -z "$mode" && func_fatal_error "error: you must specify a MODE." - - - # Darwin sucks - eval std_shrext=\"$shrext_cmds\" - - # Only execute mode is allowed to have -dlopen flags. if test -n "$execute_dlfiles" && test "$mode" != execute; then - func_error "unrecognized option \`-dlopen'" - $ECHO "$help" 1>&2 + $echo "$modename: unrecognized option \`-dlopen'" 1>&2 + $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=$mode' for more information." -} + help="Try \`$modename --help --mode=$mode' for more information." + # These modes are in order of execution frequency so that they run quickly. + case $mode in + # libtool compile mode + compile) + modename="$modename: compile" + # 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= -# 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 -} + for arg + do + case $arg_mode in + arg ) + # do not "continue". Instead, add this to base_compile + lastarg="$arg" + arg_mode=normal + ;; -# 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 -} + target ) + libobj="$arg" + arg_mode=normal + continue + ;; -# 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" -} + normal ) + # Accept any command-line options. + case $arg in + -o) + if test -n "$libobj" ; then + $echo "$modename: you cannot specify \`-o' more than once" 1>&2 + exit $EXIT_FAILURE + fi + arg_mode=target + continue + ;; -# 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_ltwrapper_scriptname_result="" - if func_ltwrapper_executable_p "$1"; then - func_dirname_and_basename "$1" "" "." - func_stripname '' '.exe' "$func_basename_result" - func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" - fi -} - -# 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_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_quote_for_eval "$arg" - CC_quoted="$CC_quoted $func_quote_for_eval_result" - done - 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 "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;; - # 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_quote_for_eval "$arg" - CC_quoted="$CC_quoted $func_quote_for_eval_result" - done - case "$@ " in - " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) - # 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 <\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + lastarg="$lastarg $arg" done IFS="$save_ifs" - func_stripname ' ' '' "$lastarg" - lastarg=$func_stripname_result + lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` # Add the arguments to base_compile. base_compile="$base_compile $lastarg" continue ;; - *) + * ) # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # @@ -1187,42 +744,66 @@ esac # case $arg_mode # Aesthetically quote the previous argument. - func_quote_for_eval "$lastarg" - base_compile="$base_compile $func_quote_for_eval_result" + lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` + + case $lastarg in + # Double-quote args containing other shell metacharacters. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, and some SunOS ksh mistreat backslash-escaping + # in scan sets (worked around with variable expansion), + # and furthermore cannot handle '|' '&' '(' ')' in scan sets + # at all, so we specify them separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + lastarg="\"$lastarg\"" + ;; + esac + + base_compile="$base_compile $lastarg" done # for arg case $arg_mode in arg) - func_fatal_error "you must specify an argument for -Xcompile" + $echo "$modename: you must specify an argument for -Xcompile" + exit $EXIT_FAILURE ;; target) - func_fatal_error "you must specify a target with \`-o'" + $echo "$modename: you must specify a target with \`-o'" 1>&2 + exit $EXIT_FAILURE ;; *) # Get the name of the library object. - test -z "$libobj" && { - func_basename "$srcfile" - libobj="$func_basename_result" - } + [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo + xform='[cCFSifmso]' case $libobj in - *.[cCFSifmso] | \ - *.ada | *.adb | *.ads | *.asm | \ - *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ - *.[fF][09]? | *.for | *.java | *.obj | *.sx) - func_xform "$libobj" - libobj=$func_xform_result - ;; + *.ada) xform=ada ;; + *.adb) xform=adb ;; + *.ads) xform=ads ;; + *.asm) xform=asm ;; + *.c++) xform=c++ ;; + *.cc) xform=cc ;; + *.ii) xform=ii ;; + *.class) xform=class ;; + *.cpp) xform=cpp ;; + *.cxx) xform=cxx ;; + *.[fF][09]?) xform=[fF][09]. ;; + *.for) xform=for ;; + *.java) xform=java ;; + *.obj) xform=obj ;; + *.sx) xform=sx ;; esac + libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` + case $libobj in - *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; + *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; *) - func_fatal_error "cannot determine name of library object from \`$libobj'" + $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 + exit $EXIT_FAILURE ;; esac @@ -1230,15 +811,7 @@ 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 ;; @@ -1255,17 +828,28 @@ 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" + qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"` + case $qlibobj in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + qlibobj="\"$qlibobj\"" ;; + esac + test "X$libobj" != "X$qlibobj" \ + && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \ + && $echo "$modename: libobj name \`$libobj' may not contain shell special characters." + objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` + xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$obj"; then + xdir= + else + xdir=$xdir/ + fi lobj=${xdir}$objdir/$objname - test -z "$base_compile" && \ - func_fatal_help "you must specify a compilation command" + if test -z "$base_compile"; then + $echo "$modename: you must specify a compilation command" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi # Delete any leftover library objects. if test "$build_old_libs" = yes; then @@ -1274,9 +858,12 @@ removelist="$lobj $libobj ${libobj}T" fi + $run $rm $removelist + trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 + # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in - cygwin* | mingw* | pw32* | os2* | cegcc*) + cygwin* | mingw* | pw32* | os2*) pic_mode=default ;; esac @@ -1288,8 +875,10 @@ # 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 "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} + output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" + removelist="$removelist $output_obj $lockfile" + trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 else output_obj= need_locks=no @@ -1299,13 +888,13 @@ # 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" + until $run ln "$progpath" "$lockfile" 2>/dev/null; do + $show "Waiting for $lockfile to be removed" sleep 2 done elif test "$need_locks" = warn; then if test -f "$lockfile"; then - $ECHO "\ + $echo "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` @@ -1316,22 +905,34 @@ avoid parallel builds (make -j) in this platform, or get a better compiler." - $opt_dry_run || $RM $removelist + $run $rm $removelist exit $EXIT_FAILURE fi - removelist="$removelist $output_obj" - $ECHO "$srcfile" > "$lockfile" + $echo "$srcfile" > "$lockfile" fi - $opt_dry_run || $RM $removelist - removelist="$removelist $lockfile" - trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 - if test -n "$fix_srcfile_path"; then eval srcfile=\"$fix_srcfile_path\" fi - func_quote_for_eval "$srcfile" - qsrcfile=$func_quote_for_eval_result + qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"` + case $qsrcfile in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + qsrcfile="\"$qsrcfile\"" ;; + esac + + $run $rm "$libobj" "${libobj}T" + + # Create a libtool object file (analogous to a ".la" file), + # but don't create it if we're doing a dry run. + test -z "$run" && cat > ${libobj}T </dev/null`" != "X$srcfile"; then - $ECHO "\ + $echo "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` @@ -1371,27 +985,45 @@ avoid parallel builds (make -j) in this platform, or get a better compiler." - $opt_dry_run || $RM $removelist + $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' + $show "$mv $output_obj $lobj" + if $run $mv $output_obj $lobj; then : + else + error=$? + $run $rm $removelist + exit $error + fi fi + # Append the name of the PIC object to the libtool object file. + test -z "$run" && cat >> ${libobj}T <> ${libobj}T </dev/null`" != "X$srcfile"; then - $ECHO "\ + $echo "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` @@ -1420,6784 +1057,5485 @@ avoid parallel builds (make -j) in this platform, or get a better compiler." - $opt_dry_run || $RM $removelist + $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' + $show "$mv $output_obj $obj" + if $run $mv $output_obj $obj; then : + else + error=$? + $run $rm $removelist + exit $error + fi fi + + # Append the name of the non-PIC object the libtool object file. + # Only append if the libtool object file exists. + test -z "$run" && cat >> ${libobj}T <> ${libobj}T <&2 + 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 -Complete the installation of libtool libraries. + # See if our shared archives depend on static archives. + test -n "$old_archive_from_new_cmds" && build_old_libs=yes -Each LIBDIR is a directory that contains libtool libraries. + # Go through the arguments, transforming them on the way. + while test "$#" -gt 0; do + arg="$1" + shift + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test + ;; + *) qarg=$arg ;; + esac + libtool_args="$libtool_args $qarg" -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." - ;; + # If the previous option needs an argument, assign it. + if test -n "$prev"; then + case $prev in + output) + compile_command="$compile_command @OUTPUT@" + finalize_command="$finalize_command @OUTPUT@" + ;; + esac - install) - $ECHO \ -"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... + case $prev in + dlfiles|dlprefiles) + if test "$preload" = no; then + # Add the symbol object into the linking commands. + compile_command="$compile_command @SYMFILE@" + finalize_command="$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 + dlfiles="$dlfiles $arg" + else + dlprefiles="$dlprefiles $arg" + fi + prev= + continue + ;; + esac + ;; + expsyms) + export_symbols="$arg" + if test ! -f "$arg"; then + $echo "$modename: symbol file \`$arg' does not exist" + exit $EXIT_FAILURE + fi + prev= + continue + ;; + expsyms_regex) + export_symbols_regex="$arg" + prev= + continue + ;; + inst_prefix) + inst_prefix_dir="$arg" + prev= + continue + ;; + precious_regex) + precious_files_regex="$arg" + prev= + continue + ;; + release) + release="-$arg" + prev= + continue + ;; + objectlist) + if test -f "$arg"; then + save_arg=$arg + moreargs= + for fil in `cat $save_arg` + do +# moreargs="$moreargs $fil" + arg=$fil + # A libtool-controlled object. -Install executables or libraries. + # Check to see that this really is a libtool object. + if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + pic_object= + non_pic_object= -INSTALL-COMMAND is the installation command. The first component should be -either the \`install' or \`cp' program. + # Read the .lo file + # If there is no directory component, then add one. + case $arg in + */* | *\\*) . $arg ;; + *) . ./$arg ;; + esac -The following components of INSTALL-COMMAND are treated specially: + if test -z "$pic_object" || \ + test -z "$non_pic_object" || + test "$pic_object" = none && \ + test "$non_pic_object" = none; then + $echo "$modename: cannot find name of object for \`$arg'" 1>&2 + exit $EXIT_FAILURE + fi - -inst-prefix PREFIX-DIR Use PREFIX-DIR as a staging area for installation + # Extract subdirectory from the argument. + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$arg"; then + xdir= + else + xdir="$xdir/" + fi -The rest of the components are interpreted as arguments to that command (only -BSD-compatible install options are recognized)." - ;; + if test "$pic_object" != none; then + # Prepend the subdirectory the object is found in. + pic_object="$xdir$pic_object" - link) - $ECHO \ -"Usage: $progname [OPTION]... --mode=link LINK-COMMAND... + if test "$prev" = dlfiles; then + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + dlfiles="$dlfiles $pic_object" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi -Link object files or libraries together to form another library, or to -create an executable program. + # CHECK ME: I think I busted this. -Ossama + if test "$prev" = dlprefiles; then + # Preload the old-style object. + dlprefiles="$dlprefiles $pic_object" + prev= + fi -LINK-COMMAND is a command using the C compiler that you would use to create -a program from several object files. + # A PIC object. + libobjs="$libobjs $pic_object" + arg="$pic_object" + fi -The following components of LINK-COMMAND are treated specially: + # 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" - -all-static do not do any dynamic linking at all - -avoid-version do not add a version suffix if possible - -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 + # A standard non-PIC object + non_pic_objects="$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" + non_pic_objects="$non_pic_objects $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if test -z "$run"; then + $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 + exit $EXIT_FAILURE + else + # Dry-run case. -All other options (arguments beginning with \`-') are ignored. + # Extract subdirectory from the argument. + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$arg"; then + xdir= + else + xdir="$xdir/" + fi -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... + pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` + non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` + libobjs="$libobjs $pic_object" + non_pic_objects="$non_pic_objects $non_pic_object" + fi + fi + done + else + $echo "$modename: link input file \`$save_arg' does not exist" + exit $EXIT_FAILURE + fi + arg=$save_arg + prev= + continue + ;; + rpath | xrpath) + # We need an absolute path. + case $arg in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + $echo "$modename: only absolute run-paths are allowed" 1>&2 + exit $EXIT_FAILURE + ;; + esac + if test "$prev" = rpath; then + case "$rpath " in + *" $arg "*) ;; + *) rpath="$rpath $arg" ;; + esac + else + case "$xrpath " in + *" $arg "*) ;; + *) xrpath="$xrpath $arg" ;; + esac + fi + prev= + continue + ;; + xcompiler) + compiler_flags="$compiler_flags $qarg" + prev= + compile_command="$compile_command $qarg" + finalize_command="$finalize_command $qarg" + continue + ;; + xlinker) + linker_flags="$linker_flags $qarg" + compiler_flags="$compiler_flags $wl$qarg" + prev= + compile_command="$compile_command $wl$qarg" + finalize_command="$finalize_command $wl$qarg" + continue + ;; + xcclinker) + linker_flags="$linker_flags $qarg" + compiler_flags="$compiler_flags $qarg" + prev= + compile_command="$compile_command $qarg" + finalize_command="$finalize_command $qarg" + continue + ;; + shrext) + shrext_cmds="$arg" + prev= + continue + ;; + darwin_framework|darwin_framework_skip) + test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg" + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + prev= + continue + ;; + *) + eval "$prev=\"\$arg\"" + prev= + continue + ;; + esac + fi # test -n "$prev" -Remove libraries from an installation directory. + prevarg="$arg" -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. + case $arg in + -all-static) + if test -n "$link_static_flag"; then + compile_command="$compile_command $link_static_flag" + finalize_command="$finalize_command $link_static_flag" + fi + continue + ;; -If FILE is a libtool library, all the files associated with it are deleted. -Otherwise, only FILE itself is deleted using RM." - ;; + -allow-undefined) + # FIXME: remove this flag sometime in the future. + $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 + continue + ;; - *) - func_fatal_help "invalid operation mode \`$mode'" - ;; - esac + -avoid-version) + avoid_version=yes + continue + ;; - $ECHO - $ECHO "Try \`$progname --help' for more information about other modes." + -dlopen) + prev=dlfiles + continue + ;; - exit $? -} + -dlpreopen) + prev=dlprefiles + continue + ;; - # Now that we've collected a possible --mode arg, show help if necessary - $opt_help && func_mode_help + -export-dynamic) + export_dynamic=yes + continue + ;; + -export-symbols | -export-symbols-regex) + if test -n "$export_symbols" || test -n "$export_symbols_regex"; then + $echo "$modename: more than one -exported-symbols argument is not allowed" + exit $EXIT_FAILURE + fi + if test "X$arg" = "X-export-symbols"; then + prev=expsyms + else + prev=expsyms_regex + fi + continue + ;; -# 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" + -framework|-arch|-isysroot) + case " $CC " in + *" ${arg} ${1} "* | *" ${arg} ${1} "*) + prev=darwin_framework_skip ;; + *) compiler_flags="$compiler_flags $arg" + prev=darwin_framework ;; + esac + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + continue + ;; - # Handle -dlopen flags immediately. - for file in $execute_dlfiles; do - test -f "$file" \ - || func_fatal_help "\`$file' is not a file" + -inst-prefix-dir) + prev=inst_prefix + continue + ;; - dir= - case $file in - *.la) - # 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" + # 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*) + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + ;; + esac + continue + ;; - # Read the libtool library. - dlname= - library_names= - func_source "$file" + -L*) + dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + absdir=`cd "$dir" && pwd` + if test -z "$absdir"; then + $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 + absdir="$dir" + notinst_path="$notinst_path $dir" + fi + dir="$absdir" + ;; + esac + case "$deplibs " in + *" -L$dir "*) ;; + *) + deplibs="$deplibs -L$dir" + lib_search_path="$lib_search_path $dir" + ;; + esac + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) + testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$dir:"*) ;; + *) dllsearchpath="$dllsearchpath:$dir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + *) dllsearchpath="$dllsearchpath:$testbindir";; + esac + ;; + esac + continue + ;; - # 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 + -l*) + if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*) + # 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 + deplibs="$deplibs -framework System" + 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 + deplibs="$deplibs $arg" + continue + ;; - func_dirname "$file" "" "." - dir="$func_dirname_result" - - if test -f "$dir/$objdir/$dlname"; then - dir="$dir/$objdir" - else - if test ! -f "$dir/$dlname"; then - func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" - fi - fi + # Tru64 UNIX uses -model [arg] to determine the layout of C++ + # classes, name mangling, and exception handling. + -model) + compile_command="$compile_command $arg" + compiler_flags="$compiler_flags $arg" + finalize_command="$finalize_command $arg" + prev=xcompiler + continue ;; - *.lo) - # Just add the directory containing the .lo file. - func_dirname "$file" "" "." - dir="$func_dirname_result" + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) + compiler_flags="$compiler_flags $arg" + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + continue ;; - *) - func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" + -multi_module) + single_module="${wl}-multi_module" continue ;; - esac - # Get the absolute pathname. - absdir=`cd "$dir" && pwd` - test -n "$absdir" && dir="$absdir" + -module) + module=yes + continue + ;; - # 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 + # -64, -mips[0-9] enable 64-bit mode on the SGI compiler + # -r[0-9][0-9]* specifies the processor on the SGI compiler + # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler + # +DA*, +DD* enable 64-bit mode on the HP compiler + # -q* pass through compiler args for the IBM compiler + # -m* pass through architecture-specific compiler args for GCC + # -m*, -t[45]*, -txscale* pass through architecture-specific + # compiler args for GCC + # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC + # -F/path gives path to uninstalled frameworks, gcc on darwin + # @file GCC response files + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ + -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) - # This variable tells wrapper scripts just to set shlibpath_var - # rather than running their programs. - libtool_execute_magic="$magic" + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + compiler_flags="$compiler_flags $arg" + continue + ;; - # Check if any of the arguments is a wrapper script. - args= - for file - do - case $file in - -*) ;; - *) - # 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 + -shrext) + prev=shrext + continue ;; - esac - # Quote arguments (to preserve shell metacharacters). - func_quote_for_eval "$file" - args="$args $func_quote_for_eval_result" - 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 "$mode" = execute && func_mode_execute ${1+"$@"} - - -# func_mode_finish arg... -func_mode_finish () -{ - $opt_debug - libdirs="$nonopt" - admincmds= - - if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then - for dir - do - libdirs="$libdirs $dir" - done - - 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" || admincmds="$admincmds - $cmds" - fi - done - fi - # Exit here if they wanted silent mode. - $opt_silent && exit $EXIT_SUCCESS + -no-fast-install) + fast_install=no + continue + ;; - $ECHO "X----------------------------------------------------------------------" | $Xsed - $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\" + -no-install) + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*) + # The PATH hackery in wrapper scripts is required on Windows + # and Darwin in order for the loader to find any dlls it needs. + $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 + $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 + fast_install=no + ;; + *) no_install=yes ;; + esac + continue + ;; - $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 + -no-undefined) + allow_undefined=no + continue + ;; - $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." + -objectlist) + prev=objectlist + continue ;; - *) - $ECHO "more information, such as the ld(1) and ld.so(8) manual pages." - ;; - esac - $ECHO "X----------------------------------------------------------------------" | $Xsed - exit $EXIT_SUCCESS -} -test "$mode" = finish && func_mode_finish ${1+"$@"} + -o) prev=output ;; + -precious-files-regex) + prev=precious_regex + continue + ;; -# 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. - $ECHO "X$nonopt" | $GREP shtool >/dev/null; 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 + -release) + prev=release + continue + ;; - # The real first argument should be the name of the installation program. - # Aesthetically quote it. - func_quote_for_eval "$arg" - install_prog="$install_prog$func_quote_for_eval_result" + -rpath) + prev=rpath + continue + ;; - # We need to accept at least all the BSD install flags. - dest= - files= - opts= - prev= - install_type= - isdir=no - stripme= - for arg - do - if test -n "$dest"; then - files="$files $dest" - dest=$arg + -R) + prev=xrpath continue - fi + ;; - case $arg in - -d) isdir=yes ;; - -f) - case " $install_prog " in - *[\\\ /]cp\ *) ;; - *) prev=$arg ;; + -R*) + dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + $echo "$modename: only absolute run-paths are allowed" 1>&2 + exit $EXIT_FAILURE + ;; esac + case "$xrpath " in + *" $dir "*) ;; + *) xrpath="$xrpath $dir" ;; + esac + continue ;; - -g | -m | -o) - prev=$arg + + -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 ;; - -s) - stripme=" -s" + + -thread-safe) + thread_safe=yes continue ;; - -*) + + -version-info) + prev=vinfo + continue ;; - *) - # If the previous option needed an argument, then skip it. - if test -n "$prev"; then - prev= - else - dest=$arg - continue - fi + -version-number) + prev=vinfo + vinfo_number=yes + continue ;; - esac - # Aesthetically quote the argument. - func_quote_for_eval "$arg" - install_prog="$install_prog $func_quote_for_eval_result" - done + -Wc,*) + args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` + arg= + save_ifs="$IFS"; IFS=',' + for flag in $args; do + IFS="$save_ifs" + case $flag in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + flag="\"$flag\"" + ;; + esac + arg="$arg $wl$flag" + compiler_flags="$compiler_flags $flag" + done + IFS="$save_ifs" + arg=`$echo "X$arg" | $Xsed -e "s/^ //"` + ;; - test -z "$install_prog" && \ - func_fatal_help "you must specify an install program" + -Wl,*) + args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` + arg= + save_ifs="$IFS"; IFS=',' + for flag in $args; do + IFS="$save_ifs" + case $flag in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + flag="\"$flag\"" + ;; + esac + arg="$arg $wl$flag" + compiler_flags="$compiler_flags $wl$flag" + linker_flags="$linker_flags $flag" + done + IFS="$save_ifs" + arg=`$echo "X$arg" | $Xsed -e "s/^ //"` + ;; - test -n "$prev" && \ - func_fatal_help "the \`$prev' option requires an argument" + -Xcompiler) + prev=xcompiler + continue + ;; - 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 + -Xlinker) + prev=xlinker + continue + ;; - # 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" + -XCClinker) + prev=xcclinker + continue + ;; - # 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" + # Some other compiler flag. + -* | +*) + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" ;; 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. - staticlibs="$staticlibs $file" + *.$objext) + # A standard object. + objs="$objs $arg" ;; - *.la) - # 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" + *.lo) + # A libtool-controlled object. - library_names= - old_library= - relink_command= - func_source "$file" + # Check to see that this really is a libtool object. + if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + pic_object= + non_pic_object= - # Add the libdir to current_libdirs if it is the destination. - if test "X$destdir" = "X$libdir"; then - case "$current_libdirs " in - *" $libdir "*) ;; - *) current_libdirs="$current_libdirs $libdir" ;; - esac - else - # Note the libdir as a future libdir. - case "$future_libdirs " in - *" $libdir "*) ;; - *) future_libdirs="$future_libdirs $libdir" ;; + # Read the .lo file + # If there is no directory component, then add one. + case $arg in + */* | *\\*) . $arg ;; + *) . ./$arg ;; esac - fi - - func_dirname "$file" "/" "" - dir="$func_dirname_result" - dir="$dir$objdir" - - if test -n "$relink_command"; then - # Determine the prefix the user has applied to our future dir. - inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -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 -z "$pic_object" || \ + test -z "$non_pic_object" || + test "$pic_object" = none && \ + test "$non_pic_object" = none; then + $echo "$modename: cannot find name of object for \`$arg'" 1>&2 + exit $EXIT_FAILURE + fi - if test -n "$inst_prefix_dir"; then - # Stick the inst_prefix_dir data into the link command. - relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` - else - relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"` + # Extract subdirectory from the argument. + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$arg"; then + xdir= + else + xdir="$xdir/" fi - func_warning "relinking \`$file'" - func_show_eval "$relink_command" \ - 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' - fi + if test "$pic_object" != none; then + # Prepend the subdirectory the object is found in. + pic_object="$xdir$pic_object" - # See the names of the shared library. - set dummy $library_names; shift - if test -n "$1"; then - realname="$1" - shift + if test "$prev" = dlfiles; then + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + dlfiles="$dlfiles $pic_object" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi - srcname="$realname" - test -n "$relink_command" && srcname="$realname"T + # CHECK ME: I think I busted this. -Ossama + if test "$prev" = dlprefiles; then + # Preload the old-style object. + dlprefiles="$dlprefiles $pic_object" + prev= + fi - # Install the shared library and build the symlinks. - func_show_eval "$install_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 $?' + # A PIC object. + libobjs="$libobjs $pic_object" + arg="$pic_object" 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 + # 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 + non_pic_objects="$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" + non_pic_objects="$non_pic_objects $non_pic_object" fi + else + # Only an error if not doing a dry-run. + if test -z "$run"; then + $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 + exit $EXIT_FAILURE + else + # Dry-run case. - # Do each command in the postinstall commands. - lib="$destdir/$realname" - func_execute_cmds "$postinstall_cmds" 'exit $?' - fi + # Extract subdirectory from the argument. + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$arg"; then + xdir= + else + xdir="$xdir/" + 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 $?' + pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` + non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` + libobjs="$libobjs $pic_object" + non_pic_objects="$non_pic_objects $non_pic_object" + fi + fi + ;; - # Maybe install the static library, too. - test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" + *.$libext) + # An archive. + deplibs="$deplibs $arg" + old_deplibs="$old_deplibs $arg" + continue ;; - *.lo) - # Install (i.e. copy) a libtool object. + *.la) + # A libtool-controlled library. - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" + if test "$prev" = dlfiles; then + # This library was specified with -dlopen. + dlfiles="$dlfiles $arg" + prev= + elif test "$prev" = dlprefiles; then + # The library was specified with -dlpreopen. + dlprefiles="$dlprefiles $arg" + prev= else - func_basename "$file" - destfile="$func_basename_result" - destfile="$destdir/$destfile" + deplibs="$deplibs $arg" fi + continue + ;; - # 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'" + # Some other compiler argument. + *) + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" ;; 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 ;; + esac # arg - *) - # 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 + # Now actually substitute the argument into the commands. + if test -n "$arg"; then + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + fi + done # argument parsing loop - # 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 + if test -n "$prev"; then + $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi - # 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= + if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then + eval arg=\"$export_dynamic_flag_spec\" + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + fi - func_source "$wrapper" + oldlibs= + # calculate the name of the file, without its directory + outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` + libobjs_save="$libobjs" - # Check the variables that should have been set. - test -z "$generated_by_libtool_version" && \ - func_fatal_error "invalid libtool wrapper script \`$wrapper'" + if test -n "$shlibpath_var"; then + # get the directories listed in $shlibpath_var + eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'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\" - 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 "X$lib" | $Xsed -e '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 "X$relink_command" | $Xsed -e '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 "X$file$stripped_ext" | $Xsed -e "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' + output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` + if test "X$output_objdir" = "X$output"; then + output_objdir="$objdir" else - exit $EXIT_SUCCESS + output_objdir="$output_objdir/$objdir" fi -} - -test "$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" + # Create the object directory. + if test ! -d "$output_objdir"; then + $show "$mkdir $output_objdir" + $run $mkdir $output_objdir + exit_status=$? + if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then + exit $exit_status 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 - -/* 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 "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - for progfile in $progfiles; do - func_verbose "extracting global C symbols from \`$progfile'" - $opt_dry_run || eval "$NM $progfile | $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" - $opt_dry_run || { - eval '$ECHO ": $name " >> "$nlist"' - eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'" - } - 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 + # Determine the type of output + case $output in + "") + $echo "$modename: you must specify an output file" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + ;; + *.$libext) linkmode=oldlib ;; + *.lo | *.$objext) linkmode=obj ;; + *.la) linkmode=lib ;; + *) linkmode=prog ;; # Anything else should be a program. + esac - $ECHO >> "$output_objdir/$my_dlsyms" "\ + case $host in + *cygwin* | *mingw* | *pw32*) + # don't eliminate duplications in $postdeps and $predeps + duplicate_compiler_generated_deps=yes + ;; + *) + duplicate_compiler_generated_deps=$duplicate_deps + ;; + esac + specialdeplibs= -/* The mapping between symbol names and symbols. */ -typedef struct { - const char *name; - void *address; -} lt_dlsymlist; -" - case $host in - *cygwin* | *mingw* | *cegcc* ) - $ECHO >> "$output_objdir/$my_dlsyms" "\ -/* DATA imports from DLLs on WIN32 con't be const, because - runtime relocations are performed -- see ld's documentation - on pseudo-relocs. */" - lt_dlsym_const= ;; - *osf5*) - echo >> "$output_objdir/$my_dlsyms" "\ -/* This system does not cope well with relocations in const data */" - lt_dlsym_const= ;; - *) - lt_dlsym_const=const ;; - esac + 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 test "X$duplicate_deps" = "Xyes" ; then + case "$libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + libs="$libs $deplib" + done - $ECHO >> "$output_objdir/$my_dlsyms" "\ -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 }," + if test "$linkmode" = lib; then + libs="$predeps $libs $compiler_lib_search_path $postdeps" - 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" - ;; + # 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 test "X$duplicate_compiler_generated_deps" = "Xyes" ; then + for pre_post_dep in $predeps $postdeps; do + case "$pre_post_deps " in + *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; 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 + pre_post_deps="$pre_post_deps $pre_post_dep" + done + fi + pre_post_deps= + fi - 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" ;; + deplibs= + newdependency_libs= + newlib_search_path= + need_relink=no # whether we're linking any uninstalled libtool libraries + notinst_deplibs= # not-installed libtool libraries + case $linkmode in + lib) + passes="conv link" + for file in $dlfiles $dlprefiles; do + case $file in + *.la) ;; *) - if test "X$my_pic_p" != Xno; then - pic_flag_for_symtable=" $pic_flag" - fi + $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 + exit $EXIT_FAILURE ;; 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 + 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%" + test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" ;; esac - symtab_cflags= - for arg in $LTCFLAGS; do - case $arg in - -pie | -fpie | -fPIE) ;; - *) symtab_cflags="$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 "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` + 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 - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` + compiler_flags="$compiler_flags $deplib" fi + continue ;; - *) - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "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 "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "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. -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 - if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | - $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then - win32_nmres=`eval $NM -f posix -A $1 | - $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" -} - + -l*) + if test "$linkmode" != lib && test "$linkmode" != prog; then + $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 + continue + fi + name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` + 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 (${SED} -e '2q' $lib | + grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + library_names= + old_library= + case $lib in + */* | *\\*) . $lib ;; + *) . ./$lib ;; + esac + 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 + ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` + test "X$ladir" = "X$lib" && ladir="." + 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 + -L*) + case $linkmode in + lib) + deplibs="$deplib $deplibs" + test "$pass" = conv && continue + newdependency_libs="$deplib $newdependency_libs" + newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` + ;; + 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 + newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` + ;; + *) + $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2 + ;; + esac # linkmode + continue + ;; # -L + -R*) + if test "$pass" = link; then + dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` + # Make sure the xrpath contains only unique directories. + case "$xrpath " in + *" $dir "*) ;; + *) xrpath="$xrpath $dir" ;; + esac + fi + deplibs="$deplib $deplibs" + continue + ;; + *.la) lib="$deplib" ;; + *.$libext) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + continue + fi + case $linkmode in + lib) + valid_a_lib=no + case $deplibs_check_method in + match_pattern*) + set dummy $deplibs_check_method + match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` + 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 used here." + else + $echo + $echo "*** Warning: Linking the shared library $output against the" + $echo "*** static library $deplib is not portable!" + deplibs="$deplib $deplibs" + fi + 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. + newdlprefiles="$newdlprefiles $deplib" + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + newdlfiles="$newdlfiles $deplib" + fi + fi + continue + ;; + %DEPLIBS%) + alldeplibs=yes + continue + ;; + esac # case $deplib + if test "$found" = yes || test -f "$lib"; then : + else + $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2 + exit $EXIT_FAILURE + fi + # Check to see that this really is a libtool archive. + if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : + else + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + exit $EXIT_FAILURE + 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" - func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?' - 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 -} + ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` + test "X$ladir" = "X$lib" && ladir="." + dlname= + dlopen= + dlpreopen= + libdir= + library_names= + old_library= + # If the library was installed with an old release of libtool, + # it will not redefine variables installed, or shouldnotlink + installed=yes + shouldnotlink=no + avoidtemprpath= -# 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 ;; + # Read the .la file + case $lib in + */* | *\\*) . $lib ;; + *) . ./$lib ;; 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 | $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 | $NL2SP` - done - - func_extract_archives_result="$my_oldobjs" -} + if test "$linkmode,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan" || + { test "$linkmode" != prog && test "$linkmode" != lib; }; then + test -n "$dlopen" && dlfiles="$dlfiles $dlopen" + test -n "$dlpreopen" && dlprefiles="$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 + $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 + exit $EXIT_FAILURE + fi + # It is a libtool convenience library, so add in its objects. + convenience="$convenience $ladir/$objdir/$old_library" + old_convenience="$old_convenience $ladir/$objdir/$old_library" + tmp_libs= + for deplib in $dependency_libs; do + deplibs="$deplib $deplibs" + if test "X$duplicate_deps" = "Xyes" ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + tmp_libs="$tmp_libs $deplib" + done + elif test "$linkmode" != prog && test "$linkmode" != lib; then + $echo "$modename: \`$lib' is not a convenience library" 1>&2 + exit $EXIT_FAILURE + fi + continue + fi # $pass = conv -# func_emit_wrapper_part1 [arg=no] -# -# Emit the first part of a libtool wrapper script on stdout. -# For more information, see the description associated with -# func_emit_wrapper(), below. -func_emit_wrapper_part1 () -{ - func_emit_wrapper_part1_arg1=no - if test -n "$1" ; then - func_emit_wrapper_part1_arg1=$1 + # Get the name of the library we link against. + linklib= + for l in $old_library $library_names; do + linklib="$l" + done + if test -z "$linklib"; then + $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 + exit $EXIT_FAILURE fi - $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. + # This library was specified with -dlopen. + if test "$pass" = dlopen; then + if test -z "$libdir"; then + $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 + exit $EXIT_FAILURE + 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. + dlprefiles="$dlprefiles $lib $dependency_libs" + else + newdlfiles="$newdlfiles $lib" + fi + continue + fi # $pass = dlopen -# 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='$sed_quote_subst' + # 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 + $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2 + $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 + abs_ladir="$ladir" + fi + ;; + esac + laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` -# 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 + # Find the relevant object directory and library name. + if test "X$installed" = Xyes; then + if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then + $echo "$modename: warning: library \`$lib' was moved." 1>&2 + dir="$ladir" + absdir="$abs_ladir" + libdir="$abs_ladir" + else + dir="$libdir" + absdir="$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 + notinst_path="$notinst_path $abs_ladir" + else + dir="$ladir/$objdir" + absdir="$abs_ladir/$objdir" + # Remove this search path later + notinst_path="$notinst_path $abs_ladir" + fi + fi # $installed = yes + name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` -# 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 + # This library was specified with -dlpreopen. + if test "$pass" = dlpreopen; then + if test -z "$libdir"; then + $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 + exit $EXIT_FAILURE + fi + # Prefer using a static library (so that no silly _DYNAMIC symbols + # are required to link). + if test -n "$old_library"; then + newdlprefiles="$newdlprefiles $dir/$old_library" + # Otherwise, use the dlname, so that lt_dlopen finds it. + elif test -n "$dlname"; then + newdlprefiles="$newdlprefiles $dir/$dlname" + else + newdlprefiles="$newdlprefiles $dir/$linklib" + fi + fi # $pass = dlpreopen -relink_command=\"$relink_command\" + 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 -# 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 - ECHO=\"$qecho\" - file=\"\$0\" - # Make sure echo works. - if test \"X\$1\" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift - elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then - # Yippee, \$ECHO works! - : - else - # Restart under the correct shell, and then maybe \$ECHO will work. - exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} - fi - fi\ -" - $ECHO "\ - # Find the directory that this script lives in. - thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` - test \"x\$thisdir\" = \"x\$file\" && thisdir=. + if test "$linkmode" = prog && test "$pass" != link; then + newlib_search_path="$newlib_search_path $ladir" + deplibs="$lib $deplibs" - # 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 \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` + linkalldeplibs=no + if test "$link_all_deplibs" != no || test -z "$library_names" || + test "$build_libtool_libs" = no; then + linkalldeplibs=yes + fi - # 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 + tmp_libs= + for deplib in $dependency_libs; do + case $deplib in + -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test + 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 test "X$duplicate_deps" = "Xyes" ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + tmp_libs="$tmp_libs $deplib" + done # for deplib + continue + fi # $linkmode = prog... - file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\` - file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` - done -" -} -# end: func_emit_wrapper_part1 + 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 + *" $dir "*) ;; + *" $absdir "*) ;; + *) temp_rpath="$temp_rpath $absdir" ;; + esac + fi -# func_emit_wrapper_part2 [arg=no] -# -# Emit the second part of a libtool wrapper script on stdout. -# For more information, see the description associated with -# func_emit_wrapper(), below. -func_emit_wrapper_part2 () -{ - func_emit_wrapper_part2_arg1=no - if test -n "$1" ; then - func_emit_wrapper_part2_arg1=$1 - fi - - $ECHO "\ - - # Usually 'no', except on cygwin/mingw when embedded into - # the cwrapper. - WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_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 \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;; - $objdir ) thisdir=. ;; - 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 "*) ;; + *) compile_rpath="$compile_rpath $absdir" + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" + esac + ;; + esac + fi # $linkmode,$pass = prog,link... - # Try to get the absolute directory name. - absdir=\`cd \"\$thisdir\" && pwd\` - test -n \"\$absdir\" && thisdir=\"\$absdir\" -" + 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 - 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 + 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 + if test "$installed" = no; then + notinst_deplibs="$notinst_deplibs $lib" + need_relink=yes + fi + # This is a shared library - file=\"\$\$-\$program\" + # Warn about portability, can't link against -module's on + # some systems (darwin) + if 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 "*) ;; + *) compile_rpath="$compile_rpath $absdir" + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" + esac + ;; + esac + fi - if test ! -d \"\$progdir\"; then - $MKDIR \"\$progdir\" - else - $RM \"\$progdir/\$file\" - fi" + if test -n "$old_archive_from_expsyms_cmds"; then + # figure out the soname + set dummy $library_names + realname="$2" + shift; 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*) + major=`expr $current - $age` + versuffix="-$major" + ;; + esac + eval soname=\"$soname_spec\" + else + soname="$realname" + fi - $ECHO "\ + # Make a new name for the extract_expsyms_cmds to use + soroot="$soname" + soname=`$echo $soroot | ${SED} -e 's/^.*\///'` + newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a" - # 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 + # If the library has no export list, then create one now + if test -f "$output_objdir/$soname-def"; then : + else + $show "extracting exported symbol list from \`$soname'" + save_ifs="$IFS"; IFS='~' + cmds=$extract_expsyms_cmds + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + 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 + # Create $newlib + if test -f "$output_objdir/$newlib"; then :; else + $show "generating import library for \`$soname'" + save_ifs="$IFS"; IFS='~' + cmds=$old_archive_from_expsyms_cmds + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + 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" - $ECHO "\ + if test "$linkmode" = prog || test "$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 module then we can not link against + # it, someone is ignoring the new warnings I added + if /usr/bin/file -L $add 2> /dev/null | + $EGREP ": [^:]* bundle" >/dev/null ; 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 + 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; 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 + [\\/]*) + add_dir="$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 -f \"\$progdir/\$program\"; then" + if test "$lib_linked" != yes; then + $echo "$modename: configuration error: unsupported hardcode properties" + exit $EXIT_FAILURE + 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\" + if test -n "$add_shlibpath"; then + case :$compile_shlibpath: in + *":$add_shlibpath:"*) ;; + *) compile_shlibpath="$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:"*) ;; + *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; + esac + fi + fi + fi - # 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 \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` + if test "$linkmode" = prog || test "$mode" = relink; then + add_shlibpath= + add_dir= + add= + # Finalize command for both is simple: just hardcode it. + if test "$hardcode_direct" = yes; 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:"*) ;; + *) finalize_shlibpath="$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 + [\\/]*) + add_dir="$add_dir -L$inst_prefix_dir$libdir" + ;; + esac + fi + add="-l$name" + fi - export $shlibpath_var -" - 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. - # fixup the dll searchpath if we need to. - if test -n "$dllsearchpath"; then - $ECHO "\ - # Add the dll search path components to the executable PATH - PATH=$dllsearchpath:\$PATH -" - fi + # 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? - $ECHO "\ - if test \"\$libtool_execute_magic\" != \"$magic\"; then - # Run the actual program with our arguments. -" - case $host in - # Backslashes separate directories on plain windows - *-*-mingw | *-*-os2* | *-cegcc*) - $ECHO "\ - exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} -" - ;; + 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*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` + case " $xrpath " in + *" $temp_xrpath "*) ;; + *) xrpath="$xrpath $temp_xrpath";; + esac;; + *) temp_deplibs="$temp_deplibs $libdir";; + esac + done + dependency_libs="$temp_deplibs" + fi - *) - $ECHO "\ - exec \"\$progdir/\$program\" \${1+\"\$@\"} -" + newlib_search_path="$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" + if test "X$duplicate_deps" = "Xyes" ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + tmp_libs="$tmp_libs $deplib" + done + + if test "$link_all_deplibs" != no; then + # Add the search paths of all dependency libraries + for deplib in $dependency_libs; do + case $deplib in + -L*) path="$deplib" ;; + *.la) + dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` + test "X$dir" = "X$deplib" && dir="." + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; + *) + absdir=`cd "$dir" && pwd` + if test -z "$absdir"; then + $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 + absdir="$dir" + fi + ;; + esac + if grep "^installed=no" $deplib > /dev/null; then + path="$absdir/$objdir" + else + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + if test -z "$libdir"; then + $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 + exit $EXIT_FAILURE + fi + if test "$absdir" != "$libdir"; then + $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 + fi + path="$absdir" + fi + depdepl= + case $host in + *-*-darwin*) + # we do not want to link against static libs, + # but need to link against shared + eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` + eval deplibdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + if test -n "$deplibrary_names" ; then + for tmp in $deplibrary_names ; do + depdepl=$tmp + done + if test -f "$deplibdir/$depdepl" ; then + depdepl="$deplibdir/$depdepl" + elif test -f "$path/$depdepl" ; then + depdepl="$path/$depdepl" + else + # Can't find it, oh well... + depdepl= + fi + # do not add paths which are already there + case " $newlib_search_path " in + *" $path "*) ;; + *) newlib_search_path="$newlib_search_path $path";; + esac + fi + path="" + ;; + *) + path="-L$path" + ;; + esac + ;; + -l*) + case $host in + *-*-darwin*) + # Again, we only want to link against shared libraries + eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"` + for tmp in $newlib_search_path ; do + if test -f "$tmp/lib$tmp_libs.dylib" ; then + eval depdepl="$tmp/lib$tmp_libs.dylib" + break + fi + done + path="" + ;; + *) continue ;; + esac + ;; + *) continue ;; + esac + case " $deplibs " in + *" $path "*) ;; + *) deplibs="$path $deplibs" ;; + esac + case " $deplibs " in + *" $depdepl "*) ;; + *) deplibs="$depdepl $deplibs" ;; + esac + done + fi # link_all_deplibs != no + fi # linkmode = lib + done # for deplib in $libs + 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 "*) ;; + *) lib_search_path="$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 "*) ;; + *) tmp_libs="$tmp_libs $deplib" ;; + esac + ;; + *) tmp_libs="$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 - $ECHO "\ - \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 - exit 1 + if test -n "$i" ; then + tmp_libs="$tmp_libs $i" + fi + done + dependency_libs=$tmp_libs + done # for pass + if test "$linkmode" = prog; then + dlfiles="$newdlfiles" + dlprefiles="$newdlprefiles" 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\ -" -} -# end: func_emit_wrapper_part2 + case $linkmode in + oldlib) + case " $deplibs" in + *\ -l* | *\ -L*) + $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 ;; + esac -# 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=no - if test -n "$1" ; then - func_emit_wrapper_arg1=$1 - fi + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 + fi - # split this up so that func_emit_cwrapperexe_src - # can call each part independently. - func_emit_wrapper_part1 "${func_emit_wrapper_arg1}" - func_emit_wrapper_part2 "${func_emit_wrapper_arg1}" -} + if test -n "$rpath"; then + $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 + fi + if test -n "$xrpath"; then + $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 + fi -# func_to_host_path arg -# -# Convert paths to host format when used with build tools. -# Intended for use with "native" mingw (where libtool itself -# is running under the msys shell), or in the following cross- -# build environments: -# $build $host -# mingw (msys) mingw [e.g. native] -# cygwin mingw -# *nix + wine mingw -# where wine is equipped with the `winepath' executable. -# In the native mingw case, the (msys) shell automatically -# converts paths for any non-msys applications it launches, -# but that facility isn't available from inside the cwrapper. -# Similar accommodations are necessary for $host mingw and -# $build cygwin. Calling this function does no harm for other -# $host/$build combinations not listed above. -# -# ARG is the path (on $build) that should be converted to -# the proper representation for $host. The result is stored -# in $func_to_host_path_result. -func_to_host_path () -{ - func_to_host_path_result="$1" - if test -n "$1" ; then - case $host in - *mingw* ) - lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' - case $build in - *mingw* ) # actually, msys - # awkward: cmd appends spaces to result - lt_sed_strip_trailing_spaces="s/[ ]*\$//" - func_to_host_path_tmp1=`( cmd //c echo "$1" |\ - $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` - func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ - $SED -e "$lt_sed_naive_backslashify"` - ;; - *cygwin* ) - func_to_host_path_tmp1=`cygpath -w "$1"` - func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ - $SED -e "$lt_sed_naive_backslashify"` - ;; - * ) - # Unfortunately, winepath does not exit with a non-zero - # error code, so we are forced to check the contents of - # stdout. On the other hand, if the command is not - # found, the shell will set an exit code of 127 and print - # *an error message* to stdout. So we must check for both - # error code of zero AND non-empty stdout, which explains - # the odd construction: - func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null` - if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then - func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ - $SED -e "$lt_sed_naive_backslashify"` - else - # Allow warning below. - func_to_host_path_result="" - fi - ;; - esac - if test -z "$func_to_host_path_result" ; then - func_error "Could not determine host path corresponding to" - func_error " '$1'" - func_error "Continuing, but uninstalled executables may not work." - # Fallback: - func_to_host_path_result="$1" - fi - ;; - esac - fi -} -# end: func_to_host_path + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2 + fi -# func_to_host_pathlist arg -# -# Convert pathlists to host format when used with build tools. -# See func_to_host_path(), above. This function supports the -# following $build/$host combinations (but does no harm for -# combinations not listed here): -# $build $host -# mingw (msys) mingw [e.g. native] -# cygwin mingw -# *nix + wine mingw -# -# 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. -# -# ARG is a pathlist (on $build) that should be converted to -# the proper representation on $host. The result is stored -# in $func_to_host_pathlist_result. -func_to_host_pathlist () -{ - func_to_host_pathlist_result="$1" - if test -n "$1" ; then - case $host in - *mingw* ) - lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' - # 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_to_host_pathlist_tmp2="$1" - # Once set for this call, this variable should not be - # reassigned. It is used in tha fallback case. - func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\ - $SED -e 's|^:*||' -e 's|:*$||'` - case $build in - *mingw* ) # Actually, msys. - # Awkward: cmd appends spaces to result. - lt_sed_strip_trailing_spaces="s/[ ]*\$//" - func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\ - $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` - func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ - $SED -e "$lt_sed_naive_backslashify"` - ;; - *cygwin* ) - func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"` - func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ - $SED -e "$lt_sed_naive_backslashify"` - ;; - * ) - # unfortunately, winepath doesn't convert pathlists - func_to_host_pathlist_result="" - func_to_host_pathlist_oldIFS=$IFS - IFS=: - for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do - IFS=$func_to_host_pathlist_oldIFS - if test -n "$func_to_host_pathlist_f" ; then - func_to_host_path "$func_to_host_pathlist_f" - if test -n "$func_to_host_path_result" ; then - if test -z "$func_to_host_pathlist_result" ; then - func_to_host_pathlist_result="$func_to_host_path_result" - else - func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result" - fi - fi - fi - IFS=: - done - IFS=$func_to_host_pathlist_oldIFS - ;; - esac - if test -z "$func_to_host_pathlist_result" ; then - func_error "Could not determine the host path(s) corresponding to" - func_error " '$1'" - func_error "Continuing, but uninstalled executables may not work." - # Fallback. This may break if $1 contains DOS-style drive - # specifications. The fix is not to complicate the expression - # below, but for the user to provide a working wine installation - # with winepath so that path translation in the cross-to-mingw - # case works properly. - lt_replace_pathsep_nix_to_dos="s|:|;|g" - func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\ - $SED -e "$lt_replace_pathsep_nix_to_dos"` - fi - # Now, add the leading and trailing path separators back - case "$1" in - :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result" - ;; - esac - case "$1" in - *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;" - ;; - esac - ;; - esac - fi -} -# end: func_to_host_pathlist + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 + 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 <&2 + fi -/* $cwrappersource - temporary wrapper executable 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. + # Now set the variables for building old libraries. + build_libtool_libs=no + oldlibs="$output" + objs="$objs$old_deplibs" + ;; - This wrapper executable should never be moved out of the build directory. - If it is, it will not operate correctly. + lib) + # Make sure we only generate libraries of the form `libNAME.la'. + case $outputname in + lib*) + name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + ;; + *) + if test "$module" = no; then + $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + if test "$need_lib_prefix" != no; then + # Add the "lib" prefix for modules if required + name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + else + libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` + fi + ;; + esac - Currently, it simply execs the wrapper *script* "$SHELL $output", - but could eventually absorb all of the scripts functionality and - exec $objdir/$outputname directly. -*/ -EOF - cat <<"EOF" -#include -#include -#ifdef _MSC_VER -# include -# include -# include -# define setmode _setmode -#else -# include -# include -# ifdef __CYGWIN__ -# include -# define HAVE_SETENV -# ifdef __STRICT_ANSI__ -char *realpath (const char *, char *); -int putenv (char *); -int setenv (const char *, const char *, int); -# endif -# endif -#endif -#include -#include -#include -#include -#include -#include -#include -#include + if test -n "$objs"; then + if test "$deplibs_check_method" != pass_all; then + $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 + exit $EXIT_FAILURE + else + $echo + $echo "*** Warning: Linking the shared library $output against the non-libtool" + $echo "*** objects $objs is not portable!" + libobjs="$libobjs $objs" + fi + fi -#if defined(PATH_MAX) -# define LT_PATHMAX PATH_MAX -#elif defined(MAXPATHLEN) -# define LT_PATHMAX MAXPATHLEN -#else -# define LT_PATHMAX 1024 -#endif + if test "$dlself" != no; then + $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 + fi -#ifndef S_IXOTH -# define S_IXOTH 0 -#endif -#ifndef S_IXGRP -# define S_IXGRP 0 -#endif + set dummy $rpath + if test "$#" -gt 2; then + $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 + fi + install_libdir="$2" -#ifdef _MSC_VER -# define S_IXUSR _S_IEXEC -# define stat _stat -# ifndef _INTPTR_T_DEFINED -# define intptr_t int -# endif -#endif + 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 -#ifndef DIR_SEPARATOR -# define DIR_SEPARATOR '/' -# define PATH_SEPARATOR ':' -#endif + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2 + fi -#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 + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 + fi + else -#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 */ + # Parse the version information argument. + save_ifs="$IFS"; IFS=':' + set dummy $vinfo 0 0 0 + IFS="$save_ifs" -#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 */ + if test -n "$8"; then + $echo "$modename: too many parameters to \`-version-info'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi -#ifdef __CYGWIN__ -# define FOPEN_WB "wb" -#endif + # convert absolute version numbers to libtool ages + # this retains compatibility with .la files and attempts + # to make the code below a bit more comprehensible -#ifndef FOPEN_WB -# define FOPEN_WB "w" -#endif -#ifndef _O_BINARY -# define _O_BINARY 0 -#endif + case $vinfo_number in + yes) + number_major="$2" + number_minor="$3" + number_revision="$4" + # + # 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) + current=`expr $number_major + $number_minor` + age="$number_minor" + revision="$number_revision" + ;; + freebsd-aout|freebsd-elf|sunos) + current="$number_major" + revision="$number_minor" + age="0" + ;; + irix|nonstopux) + current=`expr $number_major + $number_minor` + age="$number_minor" + revision="$number_minor" + lt_irix_increment=no + ;; + *) + $echo "$modename: unknown library version type \`$version_type'" 1>&2 + $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 + exit $EXIT_FAILURE + ;; + esac + ;; + no) + current="$2" + revision="$3" + age="$4" + ;; + esac -#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) -#define XFREE(stale) do { \ - if (stale) { free ((void *) stale); stale = 0; } \ -} while (0) + # 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]) ;; + *) + $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit $EXIT_FAILURE + ;; + esac -#undef LTWRAPPER_DEBUGPRINTF -#if defined DEBUGWRAPPER -# define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args -static void -ltwrapper_debugprintf (const char *fmt, ...) -{ - va_list args; - va_start (args, fmt); - (void) vfprintf (stderr, fmt, args); - va_end (args); -} -#else -# define LTWRAPPER_DEBUGPRINTF(args) -#endif + 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]) ;; + *) + $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit $EXIT_FAILURE + ;; + esac -const char *program_name = NULL; + 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]) ;; + *) + $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit $EXIT_FAILURE + ;; + esac -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_fatal (const char *message, ...); -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_opt_process_env_set (const char *arg); -void lt_opt_process_env_prepend (const char *arg); -void lt_opt_process_env_append (const char *arg); -int lt_split_name_value (const char *arg, char** name, char** value); -void lt_update_exe_path (const char *name, const char *value); -void lt_update_lib_path (const char *name, const char *value); + if test "$age" -gt "$current"; then + $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit $EXIT_FAILURE + fi -static const char *script_text_part1 = -EOF + # Calculate the version variables. + major= + versuffix= + verstring= + case $version_type in + none) ;; - func_emit_wrapper_part1 yes | - $SED -e 's/\([\\"]\)/\\\1/g' \ - -e 's/^/ "/' -e 's/$/\\n"/' - echo ";" - cat <&2 + $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 + exit $EXIT_FAILURE + ;; + esac -int -main (int argc, char *argv[]) -{ - char **newargz; - int newargc; - char *tmp_pathspec; - char *actual_cwrapper_path; - char *actual_cwrapper_name; - char *target_name; - char *lt_argv_zero; - intptr_t rval = 127; - - int i; - - program_name = (char *) xstrdup (base_name (argv[0])); - LTWRAPPER_DEBUGPRINTF (("(main) argv[0] : %s\n", argv[0])); - LTWRAPPER_DEBUGPRINTF (("(main) program_name : %s\n", program_name)); - - /* very simple arg parsing; don't want to rely on getopt */ - for (i = 1; i < argc; i++) - { - if (strcmp (argv[i], dumpscript_opt) == 0) - { -EOF - case "$host" in - *mingw* | *cygwin* ) - # make stdout use "unix" line endings - echo " setmode(1,_O_BINARY);" - ;; - esac - - cat <<"EOF" - printf ("%s", script_text_part1); - printf ("%s", script_text_part2); - return 0; - } - } - - newargz = XMALLOC (char *, argc + 1); - tmp_pathspec = find_executable (argv[0]); - if (tmp_pathspec == NULL) - lt_fatal ("Couldn't find %s", argv[0]); - LTWRAPPER_DEBUGPRINTF (("(main) found exe (before symlink chase) at : %s\n", - tmp_pathspec)); - - actual_cwrapper_path = chase_symlinks (tmp_pathspec); - LTWRAPPER_DEBUGPRINTF (("(main) found exe (after symlink chase) at : %s\n", - actual_cwrapper_path)); - XFREE (tmp_pathspec); - - actual_cwrapper_name = xstrdup( base_name (actual_cwrapper_path)); - strendzap (actual_cwrapper_path, actual_cwrapper_name); - - /* wrapper name transforms */ - strendzap (actual_cwrapper_name, ".exe"); - tmp_pathspec = lt_extend_str (actual_cwrapper_name, ".exe", 1); - XFREE (actual_cwrapper_name); - actual_cwrapper_name = tmp_pathspec; - tmp_pathspec = 0; - - /* target_name transforms -- use actual target program name; might have lt- prefix */ - target_name = xstrdup (base_name (TARGET_PROGRAM_NAME)); - strendzap (target_name, ".exe"); - tmp_pathspec = lt_extend_str (target_name, ".exe", 1); - XFREE (target_name); - target_name = tmp_pathspec; - tmp_pathspec = 0; - - LTWRAPPER_DEBUGPRINTF (("(main) libtool target name: %s\n", - target_name)); -EOF - - cat <"))); - for (i = 0; i < newargc; i++) - { - LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : ""))); - } - -EOF - - case $host_os in - mingw*) - cat <<"EOF" - /* execv doesn't actually work on mingw as expected on unix */ - rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz); - if (rval == -1) - { - /* failed to start process */ - LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno)); - return 127; - } - return rval; -EOF - ;; - *) - cat <<"EOF" - execv (lt_argv_zero, newargz); - return rval; /* =127, but avoids unused variable warning */ -EOF - ;; - esac - - cat <<"EOF" -} - -void * -xmalloc (size_t num) -{ - void *p = (void *) malloc (num); - if (!p) - lt_fatal ("Memory exhausted"); - - return p; -} - -char * -xstrdup (const char *string) -{ - return string ? strcpy ((char *) xmalloc (strlen (string) + 1), - string) : NULL; -} - -const char * -base_name (const char *name) -{ - const char *base; - -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - /* Skip over the disk name in MSDOS pathnames. */ - if (isalpha ((unsigned char) name[0]) && name[1] == ':') - name += 2; -#endif - - for (base = name; *name; name++) - if (IS_DIR_SEPARATOR (*name)) - base = name + 1; - return base; -} + *) + verstring="0.0" + ;; + esac + if test "$need_version" = no; then + versuffix= + else + versuffix=".0.0" + fi + fi -int -check_executable (const char *path) -{ - struct stat st; + # Remove version info from name if versioning should be avoided + if test "$avoid_version" = yes && test "$need_version" = no; then + major= + versuffix= + verstring="" + fi - LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n", - path ? (*path ? path : "EMPTY!") : "NULL!")); - if ((!path) || (!*path)) - return 0; + # Check to see if the archive will have undefined symbols. + if test "$allow_undefined" = yes; then + if test "$allow_undefined_flag" = unsupported; then + $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 + build_libtool_libs=no + build_old_libs=yes + fi + else + # Don't allow undefined symbols. + allow_undefined_flag="$no_undefined_flag" + fi + fi - if ((stat (path, &st) >= 0) - && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) - return 1; - else - return 0; -} + if test "$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) + ;; + $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 + removelist="$removelist $p" + ;; + *) ;; + esac + done + if test -n "$removelist"; then + $show "${rm}r $removelist" + $run ${rm}r $removelist + fi + fi -int -make_executable (const char *path) -{ - int rval = 0; - struct stat st; + # Now set the variables for building old libraries. + if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then + oldlibs="$oldlibs $output_objdir/$libname.$libext" - LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n", - path ? (*path ? path : "EMPTY!") : "NULL!")); - if ((!path) || (!*path)) - return 0; + # Transform .lo files to .o files. + oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` + fi - if (stat (path, &st) >= 0) - { - rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); - } - return rval; -} + # Eliminate all temporary directories. + #for path in $notinst_path; do + # lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"` + # deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"` + # dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"` + #done -/* 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; + if test -n "$xrpath"; then + # If the user specified any rpath flags, then add them. + temp_xrpath= + for libdir in $xrpath; do + temp_xrpath="$temp_xrpath -R$libdir" + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$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 - LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n", - wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!")); + # 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 "*) ;; + *) dlfiles="$dlfiles $lib" ;; + esac + done - if ((wrapper == NULL) || (*wrapper == '\0')) - return NULL; + # Make sure dlprefiles contains only unique files + old_dlprefiles="$dlprefiles" + dlprefiles= + for lib in $old_dlprefiles; do + case "$dlprefiles " in + *" $lib "*) ;; + *) dlprefiles="$dlprefiles $lib" ;; + esac + done - /* 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 + if test "$build_libtool_libs" = yes; then + if test -n "$rpath"; then + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) + # these systems don't actually have a c library (as such)! + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C library is in the System framework + deplibs="$deplibs -framework System" + ;; + *-*-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 + deplibs="$deplibs -lc" + fi + ;; + esac + fi - 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 ("getcwd failed"); - 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 ("getcwd failed"); - 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) - { - LTWRAPPER_DEBUGPRINTF (("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 - { - char *errstr = strerror (errno); - lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr); - } - } - XFREE (tmp_pathspec); - - if (!has_symlinks) - { - return xstrdup (pathspec); - } - - tmp_pathspec = realpath (pathspec, buf); - if (tmp_pathspec == 0) - { - lt_fatal ("Could not follow symlinks for %s", pathspec); - } - return xstrdup (tmp_pathspec); -#endif -} - -char * -strendzap (char *str, const char *pat) -{ - size_t len, patlen; + # 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. + $rm conftest.c + cat > conftest.c </dev/null` + 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 "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; + esac + done + if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ + | ${SED} 10q \ + | $EGREP "$file_magic_regex" > /dev/null; then + newdeplibs="$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 + else + # Add a -L argument. + newdeplibs="$newdeplibs $a_deplib" + fi + done # Gone through all deplibs. + ;; + match_pattern*) + set dummy $deplibs_check_method + match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` + for a_deplib in $deplibs; do + name=`expr $a_deplib : '-l\(.*\)'` + # If $name is empty we are operating on a -L argument. + if test -n "$name" && test "$name" != "0"; then + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $a_deplib "*) + newdeplibs="$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 + newdeplibs="$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 + else + # Add a -L argument. + newdeplibs="$newdeplibs $a_deplib" + fi + done # Gone through all deplibs. + ;; + none | unknown | *) + newdeplibs="" + tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ + -e '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 "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"` + done + fi + if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \ + | grep . >/dev/null; then + $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 + fi + ;; + esac + versuffix=$versuffix_save + major=$major_save + release=$release_save + libname=$libname_save + name=$name_save - assert (str != NULL); - assert (pat != NULL); + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library is the System framework + newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` + ;; + esac - len = strlen (str); - patlen = strlen (pat); + 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 (patlen <= len) - { - str += len - patlen; - if (strcmp (str, pat) == 0) - *str = '\0'; - } - return str; -} + 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 -static void -lt_error_core (int exit_status, const char *mode, - const char *message, va_list ap) -{ - fprintf (stderr, "%s: %s: ", program_name, mode); - vfprintf (stderr, message, ap); - fprintf (stderr, ".\n"); - if (exit_status >= 0) - exit (exit_status); -} + # 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 "*) + new_libs="$new_libs -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$new_libs $deplib" ;; + esac + ;; + *) new_libs="$new_libs $deplib" ;; + esac + done + deplibs="$new_libs" -void -lt_fatal (const char *message, ...) -{ - va_list ap; - va_start (ap, message); - lt_error_core (EXIT_FAILURE, "FATAL", message, ap); - va_end (ap); -} -void -lt_setenv (const char *name, const char *value) -{ - LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n", - (name ? name : ""), - (value ? 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 - } -} + # All the library-specific variables (install_libdir is set above). + library_names= + old_library= + dlname= -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; -} + # 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 "$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 + 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"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + dep_rpath="$dep_rpath $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) perm_rpath="$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 + case $archive_cmds in + *\$LD*) eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" ;; + *) eval dep_rpath=\"$hardcode_libdir_flag_spec\" ;; + esac + 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 + rpath="$rpath$dir:" + done + eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" + fi + test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" + fi -int -lt_split_name_value (const char *arg, char** name, char** value) -{ - const char *p; - int len; - if (!arg || !*arg) - return 1; + shlibpath="$finalize_shlibpath" + test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" + if test -n "$shlibpath"; then + eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" + fi - p = strchr (arg, (int)'='); + # Get the real and link names of the library. + eval shared_ext=\"$shrext_cmds\" + eval library_names=\"$library_names_spec\" + set dummy $library_names + realname="$2" + shift; shift - if (!p) - return 1; + if test -n "$soname_spec"; then + eval soname=\"$soname_spec\" + else + soname="$realname" + fi + if test -z "$dlname"; then + dlname=$soname + fi - *value = xstrdup (++p); + lib="$output_objdir/$realname" + linknames= + for link + do + linknames="$linknames $link" + done - len = strlen (arg) - strlen (*value); - *name = XMALLOC (char, len); - strncpy (*name, arg, len-1); - (*name)[len - 1] = '\0'; + # Use standard objects if they are pic + test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - return 0; -} + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then + $show "generating symbol list for \`$libname.la'" + export_symbols="$output_objdir/$libname.exp" + $run $rm $export_symbols + cmds=$export_symbols_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + if len=`expr "X$cmd" : ".*"` && + test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then + $show "$cmd" + $run eval "$cmd" || exit $? + skipped_export=false + else + # The command line is too long to execute in one step. + $show "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"; then + $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" + $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' + $show "$mv \"${export_symbols}T\" \"$export_symbols\"" + $run eval '$mv "${export_symbols}T" "$export_symbols"' + fi + fi + fi -void -lt_opt_process_env_set (const char *arg) -{ - char *name = NULL; - char *value = NULL; + if test -n "$export_symbols" && test -n "$include_expsyms"; then + $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' + fi - if (lt_split_name_value (arg, &name, &value) != 0) - { - XFREE (name); - XFREE (value); - lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg); - } + tmp_deplibs= + for test_deplib in $deplibs; do + case " $convenience " in + *" $test_deplib "*) ;; + *) + tmp_deplibs="$tmp_deplibs $test_deplib" + ;; + esac + done + deplibs="$tmp_deplibs" - lt_setenv (name, value); - XFREE (name); - XFREE (value); -} + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + else + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" -void -lt_opt_process_env_prepend (const char *arg) -{ - char *name = NULL; - char *value = NULL; - char *new_value = NULL; + func_extract_archives $gentop $convenience + libobjs="$libobjs $func_extract_archives_result" + fi + fi + + if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then + eval flag=\"$thread_safe_flag_spec\" + linker_flags="$linker_flags $flag" + fi - if (lt_split_name_value (arg, &name, &value) != 0) - { - XFREE (name); - XFREE (value); - lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg); - } + # Make a backup of the uninstalled library when relinking + if test "$mode" = relink; then + $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $? + fi - new_value = lt_extend_str (getenv (name), value, 0); - lt_setenv (name, new_value); - XFREE (new_value); - XFREE (name); - XFREE (value); -} + # 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 -void -lt_opt_process_env_append (const char *arg) -{ - char *name = NULL; - char *value = NULL; - char *new_value = NULL; + if test "X$skipped_export" != "X:" && + len=`expr "X$test_cmds" : ".*" 2>/dev/null` && + test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then + : + else + # The command line is too long to link in one step, link piecewise. + $echo "creating reloadable object files..." - if (lt_split_name_value (arg, &name, &value) != 0) - { - XFREE (name); - XFREE (value); - lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg); - } + # 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 + output_la=`$echo "X$output" | $Xsed -e "$basename"` - new_value = lt_extend_str (getenv (name), value, 1); - lt_setenv (name, new_value); - XFREE (new_value); - XFREE (name); - XFREE (value); -} + # Clear the reloadable object creation command queue and + # initialize k to one. + test_cmds= + concat_cmds= + objlist= + delfiles= + last_robj= + k=1 + output=$output_objdir/$output_la-${k}.$objext + # Loop over the list of objects to be linked. + for obj in $save_libobjs + do + eval test_cmds=\"$reload_cmds $objlist $last_robj\" + if test "X$objlist" = X || + { len=`expr "X$test_cmds" : ".*" 2>/dev/null` && + test "$len" -le "$max_cmd_len"; }; then + objlist="$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. + eval concat_cmds=\"$reload_cmds $objlist $last_robj\" + else + # All subsequent reloadable object files will link in + # the last one created. + eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\" + fi + last_robj=$output_objdir/$output_la-${k}.$objext + k=`expr $k + 1` + output=$output_objdir/$output_la-${k}.$objext + objlist=$obj + len=1 + 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~ + eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" -void -lt_update_exe_path (const char *name, const char *value) -{ - LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n", - (name ? name : ""), - (value ? value : ""))); + if ${skipped_export-false}; then + $show "generating symbol list for \`$libname.la'" + export_symbols="$output_objdir/$libname.exp" + $run $rm $export_symbols + libobjs=$output + # Append the command to create the export file. + eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" + fi + + # Set up a command to remove the reloadable object files + # after they are used. + i=0 + while test "$i" -lt "$k" + do + i=`expr $i + 1` + delfiles="$delfiles $output_objdir/$output_la-${i}.$objext" + done - 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); - } -} + $echo "creating a temporary reloadable object file: $output" -void -lt_update_lib_path (const char *name, const char *value) -{ - LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n", - (name ? name : ""), - (value ? value : ""))); + # Loop through the commands generated above and execute them. + save_ifs="$IFS"; IFS='~' + for cmd in $concat_cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" - if (name && *name && value && *value) - { - char *new_value = lt_extend_str (getenv (name), value, 0); - lt_setenv (name, new_value); - XFREE (new_value); - } -} + 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\" + fi + # Expand the library linking commands again to reset the + # value of $libobjs for piecewise linking. -EOF -} -# end: func_emit_cwrapperexe_src + # 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 -# 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 + # Append the command to remove the reloadable object files + # to the just-reset $cmds. + eval cmds=\"\$cmds~\$rm $delfiles\" + fi + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || { + lt_exit=$? - # 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 + # Restore the uninstalled library and exit + if test "$mode" = relink; then + $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' + fi - 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= + exit $lt_exit + } + done + IFS="$save_ifs" - avoid_version=no - 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 + # Restore the uninstalled library and exit + if test "$mode" = relink; then + $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? - # 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 + if test -n "$convenience"; then + if test -z "$whole_archive_flag_spec"; then + $show "${rm}r $gentop" + $run ${rm}r "$gentop" + fi 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 + exit $EXIT_SUCCESS + fi - # 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" + # Create links to the real library. + for linkname in $linknames; do + if test "$realname" != "$linkname"; then + $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" + $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $? + fi + done - # 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 + # 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 + ;; - case $prev in - 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 - dlfiles="$dlfiles $arg" - else - dlprefiles="$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 "*) ;; - *) deplibs="$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 -# moreargs="$moreargs $fil" - arg=$fil - # A libtool-controlled object. + obj) + case " $deplibs" in + *\ -l* | *\ -L*) + $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 ;; + esac - # Check to see that this really is a libtool object. - if func_lalib_unsafe_p "$arg"; then - pic_object= - non_pic_object= + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 + fi - # Read the .lo file - func_source "$arg" + if test -n "$rpath"; then + $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 + fi - 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 + if test -n "$xrpath"; then + $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 + fi - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 + fi - if test "$pic_object" != none; then - # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 + fi - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - dlfiles="$dlfiles $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi + case $output in + *.lo) + if test -n "$objs$old_deplibs"; then + $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 + exit $EXIT_FAILURE + fi + libobj="$output" + obj=`$echo "X$output" | $Xsed -e "$lo2o"` + ;; + *) + libobj= + obj="$output" + ;; + esac - # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then - # Preload the old-style object. - dlprefiles="$dlprefiles $pic_object" - prev= - fi + # Delete the old objects. + $run $rm $obj $libobj - # A PIC object. - func_append libobjs " $pic_object" - arg="$pic_object" - fi + # 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= - # 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" + 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 "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` + else + gentop="$output_objdir/${obj}x" + generated="$generated $gentop" - # 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_extract_archives $gentop $convenience + reload_conv_objs="$reload_objs $func_extract_archives_result" + fi + fi - 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 "*) ;; - *) rpath="$rpath $arg" ;; - esac - else - case "$xrpath " in - *" $arg "*) ;; - *) xrpath="$xrpath $arg" ;; - esac - fi - prev= - continue - ;; - shrext) - shrext_cmds="$arg" - prev= - continue - ;; - weak) - weak_libs="$weak_libs $arg" - prev= - continue - ;; - xcclinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $qarg" - prev= - func_append compile_command " $qarg" - func_append finalize_command " $qarg" - continue - ;; - xcompiler) - compiler_flags="$compiler_flags $qarg" - prev= - func_append compile_command " $qarg" - func_append finalize_command " $qarg" - continue - ;; - xlinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$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" + # Create the old-style object. + reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test - prevarg="$arg" + output="$obj" + cmds=$reload_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" - 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" + # Exit if we aren't doing a library object file. + if test -z "$libobj"; then + if test -n "$gentop"; then + $show "${rm}r $gentop" + $run ${rm}r $gentop 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" - ;; + exit $EXIT_SUCCESS + fi - -avoid-version) - avoid_version=yes - continue - ;; + if test "$build_libtool_libs" != yes; then + if test -n "$gentop"; then + $show "${rm}r $gentop" + $run ${rm}r $gentop + fi - -dlopen) - prev=dlfiles - continue - ;; + # Create an invalid libtool object if no PIC, so that we don't + # accidentally link it into a program. + # $show "echo timestamp > $libobj" + # $run eval "echo timestamp > $libobj" || exit $? + exit $EXIT_SUCCESS + fi - -dlpreopen) - prev=dlprefiles - continue - ;; + 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" + cmds=$reload_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + fi - -export-dynamic) - export_dynamic=yes - continue - ;; + if test -n "$gentop"; then + $show "${rm}r $gentop" + $run ${rm}r $gentop + fi - -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 + exit $EXIT_SUCCESS + ;; + + prog) + case $host in + *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;; + esac + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 + fi + + if test "$preload" = yes; then + if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown && + test "$dlopen_self_static" = unknown; then + $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." fi - continue - ;; + fi - -framework) - prev=framework - continue + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library is the System framework + compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` + finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` ;; + esac - -inst-prefix-dir) - prev=inst_prefix - continue - ;; + case $host in + *darwin*) + # Don't allow lazy linking, it breaks C++ global constructors + if test "$tagname" = CXX ; then + compile_command="$compile_command ${wl}-bind_at_load" + finalize_command="$finalize_command ${wl}-bind_at_load" + fi + ;; + esac - # 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" + + # 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 "*) + new_libs="$new_libs -L$path/$objdir" ;; + esac ;; esac - continue - ;; - - -L*) - func_stripname '-L' '' "$arg" - dir=$func_stripname_result - if test -z "$dir"; then - if test "$#" -gt 0; then - func_fatal_error "require no space between \`-L' and \`$1'" + done + for deplib in $compile_deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$new_libs $deplib" ;; + esac + ;; + *) new_libs="$new_libs $deplib" ;; + esac + done + compile_deplibs="$new_libs" + + + compile_command="$compile_command $compile_deplibs" + finalize_command="$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 "*) ;; + *) finalize_rpath="$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"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + fi else - func_fatal_error "need path for \`-L' option" + eval flag=\"$hardcode_libdir_flag_spec\" + rpath="$rpath $flag" fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) perm_rpath="$perm_rpath $libdir" ;; + esac fi - # 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 "*) ;; - *) - deplibs="$deplibs -L$dir" - lib_search_path="$lib_search_path $dir" - ;; - esac case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'` + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) + testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'` case :$dllsearchpath: in - *":$dir:"*) ;; - ::) dllsearchpath=$dir;; - *) dllsearchpath="$dllsearchpath:$dir";; + *":$libdir:"*) ;; + *) dllsearchpath="$dllsearchpath:$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; - ::) dllsearchpath=$testbindir;; *) dllsearchpath="$dllsearchpath:$testbindir";; esac ;; esac - continue - ;; + 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" - -l*) - if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*) - # 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 - deplibs="$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 - ;; + 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"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + rpath="$rpath $flag" + fi + elif test -n "$runpath_var"; then + case "$finalize_perm_rpath " in + *" $libdir "*) ;; + *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; 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 - deplibs="$deplibs $arg" - continue - ;; + 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" - -module) - module=yes - continue - ;; + if test -n "$libobjs" && test "$build_old_libs" = yes; then + # Transform all the library objects into standard objects. + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + fi - # 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) - compiler_flags="$compiler_flags $arg" - func_append compile_command " $arg" - func_append finalize_command " $arg" - prev=xcompiler - continue - ;; + dlsyms= + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + if test -n "$NM" && test -n "$global_symbol_pipe"; then + dlsyms="${outputname}S.c" + else + $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 + fi + fi - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) - compiler_flags="$compiler_flags $arg" - func_append compile_command " $arg" - func_append finalize_command " $arg" - case "$new_inherited_linker_flags " in - *" $arg "*) ;; - * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;; - esac - continue - ;; + if test -n "$dlsyms"; then + case $dlsyms in + "") ;; + *.c) + # Discover the nlist of each of the dlfiles. + nlist="$output_objdir/${outputname}.nm" - -multi_module) - single_module="${wl}-multi_module" - continue - ;; + $show "$rm $nlist ${nlist}S ${nlist}T" + $run $rm "$nlist" "${nlist}S" "${nlist}T" - -no-fast-install) - fast_install=no - continue - ;; + # Parse the name list into a source file. + $show "creating $output_objdir/$dlsyms" - -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 - ;; + test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ +/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ +/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ - -no-undefined) - allow_undefined=no - continue - ;; +#ifdef __cplusplus +extern \"C\" { +#endif - -objectlist) - prev=objectlist - continue - ;; +/* Prevent the only kind of declaration conflicts we can make. */ +#define lt_preloaded_symbols some_other_symbol - -o) prev=output ;; +/* External symbol declarations for the compiler. */\ +" - -precious-files-regex) - prev=precious_regex - continue - ;; + if test "$dlself" = yes; then + $show "generating symbol list for \`$output'" - -release) - prev=release - continue - ;; + test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" - -rpath) - prev=rpath - continue - ;; + # Add our own program objects to the symbol list. + progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + for arg in $progfiles; do + $show "extracting global C symbols from \`$arg'" + $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" + done - -R) - prev=xrpath - continue - ;; + if test -n "$exclude_expsyms"; then + $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' + $run eval '$mv "$nlist"T "$nlist"' + fi + + if test -n "$export_symbols_regex"; then + $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' + $run eval '$mv "$nlist"T "$nlist"' + fi + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + export_symbols="$output_objdir/$outputname.exp" + $run $rm $export_symbols + $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' + case $host in + *cygwin* | *mingw* ) + $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' + ;; + esac + else + $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' + $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' + $run eval 'mv "$nlist"T "$nlist"' + case $host in + *cygwin* | *mingw* ) + $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' + ;; + esac + fi + fi - -R*) - func_stripname '-R' '' "$arg" - dir=$func_stripname_result - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - func_fatal_error "only absolute run-paths are allowed" - ;; - esac - case "$xrpath " in - *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; - esac - continue - ;; + for arg in $dlprefiles; do + $show "extracting global C symbols from \`$arg'" + name=`$echo "$arg" | ${SED} -e 's%^.*/%%'` + $run eval '$echo ": $name " >> "$nlist"' + $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" + done - -shared) - # The effects of -shared are defined in a previous loop. - continue - ;; + if test -z "$run"; then + # 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 - -shrext) - prev=shrext - continue - ;; + # 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 - -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 - ;; + if test -f "$nlist"S; then + eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"' + else + $echo '/* NONE */' >> "$output_objdir/$dlsyms" + fi - -thread-safe) - thread_safe=yes - continue - ;; + $echo >> "$output_objdir/$dlsyms" "\ - -version-info) - prev=vinfo - continue - ;; +#undef lt_preloaded_symbols - -version-number) - prev=vinfo - vinfo_number=yes - continue - ;; +#if defined (__STDC__) && __STDC__ +# define lt_ptr void * +#else +# define lt_ptr char * +# define const +#endif - -weak) - prev=weak - continue - ;; +/* The mapping between symbol names and symbols. */ +" - -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" - arg="$arg $wl$func_quote_for_eval_result" - compiler_flags="$compiler_flags $func_quote_for_eval_result" - done - IFS="$save_ifs" - func_stripname ' ' '' "$arg" - arg=$func_stripname_result - ;; + case $host in + *cygwin* | *mingw* ) + $echo >> "$output_objdir/$dlsyms" "\ +/* DATA imports from DLLs on WIN32 can't be const, because + runtime relocations are performed -- see ld's documentation + on pseudo-relocs */ +struct { +" + ;; + * ) + $echo >> "$output_objdir/$dlsyms" "\ +const struct { +" + ;; + esac - -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" - arg="$arg $wl$func_quote_for_eval_result" - compiler_flags="$compiler_flags $wl$func_quote_for_eval_result" - linker_flags="$linker_flags $func_quote_for_eval_result" - done - IFS="$save_ifs" - func_stripname ' ' '' "$arg" - arg=$func_stripname_result - ;; - -Xcompiler) - prev=xcompiler - continue - ;; + $echo >> "$output_objdir/$dlsyms" "\ + const char *name; + lt_ptr address; +} +lt_preloaded_symbols[] = +{\ +" - -Xlinker) - prev=xlinker - continue - ;; + eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms" - -XCClinker) - prev=xcclinker - continue - ;; + $echo >> "$output_objdir/$dlsyms" "\ + {0, (lt_ptr) 0} +}; - # -msg_* for osf cc - -msg_*) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - ;; +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt_preloaded_symbols; +} +#endif - # -64, -mips[0-9] enable 64-bit mode on the SGI compiler - # -r[0-9][0-9]* specifies the processor on the SGI compiler - # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler - # +DA*, +DD* enable 64-bit mode on the HP compiler - # -q* pass through compiler args for the IBM compiler - # -m*, -t[45]*, -txscale* pass through architecture-specific - # compiler args for GCC - # -F/path gives path to uninstalled frameworks, gcc on darwin - # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC - # @file GCC response files - -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ - -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - func_append compile_command " $arg" - func_append finalize_command " $arg" - compiler_flags="$compiler_flags $arg" - continue - ;; +#ifdef __cplusplus +} +#endif\ +" + fi - # Some other compiler flag. - -* | +*) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - ;; + pic_flag_for_symtable= + 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*) + case "$compile_command " in + *" -static "*) ;; + *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";; + esac;; + *-*-hpux*) + case "$compile_command " in + *" -static "*) ;; + *) pic_flag_for_symtable=" $pic_flag";; + esac + esac - *.$objext) - # A standard object. - objs="$objs $arg" - ;; + # Now compile the dynamic symbol file. + $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" + $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? + + # Clean up the generated files. + $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" + $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" + + # Transform the symbol file into the correct name. + case $host in + *cygwin* | *mingw* ) + if test -f "$output_objdir/${outputname}.def" ; then + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` + else + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` + fi + ;; + * ) + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` + ;; + esac + ;; + *) + $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 + exit $EXIT_FAILURE + ;; + 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. - *.lo) - # A libtool-controlled object. + # Nullify the symbol file. + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` + fi - # Check to see that this really is a libtool object. - if func_lalib_unsafe_p "$arg"; then - pic_object= - non_pic_object= + if test "$need_relink" = no || test "$build_libtool_libs" != yes; then + # Replace the output file specification. + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP` + link_command="$compile_command$compile_rpath" - # Read the .lo file - func_source "$arg" + # We have no uninstalled library dependencies, so finalize right now. + $show "$link_command" + $run eval "$link_command" + exit_status=$? - 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 + # Delete the generated files. + if test -n "$dlsyms"; then + $show "$rm $output_objdir/${outputname}S.${objext}" + $run $rm "$output_objdir/${outputname}S.${objext}" + fi - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" + exit $exit_status + fi - if test "$pic_object" != none; then - # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" + if test -n "$shlibpath_var"; then + # We should set the shlibpath_var + rpath= + for dir in $temp_rpath; do + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) + # Absolute path. + rpath="$rpath$dir:" + ;; + *) + # Relative path: add a thisdir entry. + rpath="$rpath\$thisdir/$dir:" + ;; + esac + done + temp_rpath="$rpath" + fi - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - dlfiles="$dlfiles $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - 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 - # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then - # Preload the old-style object. - dlprefiles="$dlprefiles $pic_object" - prev= - 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 + rpath="$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 + rpath="$rpath$dir:" + done + finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + fi - # A PIC object. - func_append libobjs " $pic_object" - arg="$pic_object" - 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 "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` + # Delete the old output file. + $run $rm $output + # Link the executable and exit + $show "$link_command" + $run eval "$link_command" || exit $? + exit $EXIT_SUCCESS + 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" + 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" - # 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 + $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 + $echo "$modename: \`$output' will be relinked during installation" 1>&2 + else + if test "$fast_install" != no; then + link_command="$finalize_var$compile_command$finalize_rpath" + if test "$fast_install" = yes; then + relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP` 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" + # fast_install is set to needless + relink_command= 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 + link_command="$compile_var$compile_command$compile_rpath" + relink_command="$finalize_var$finalize_command$finalize_rpath" fi - ;; + fi - *.$libext) - # An archive. - deplibs="$deplibs $arg" - old_deplibs="$old_deplibs $arg" - continue - ;; + # Replace the output file specification. + link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` - *.la) - # A libtool-controlled library. + # Delete the old output files. + $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname - if test "$prev" = dlfiles; then - # This library was specified with -dlopen. - dlfiles="$dlfiles $arg" - prev= - elif test "$prev" = dlprefiles; then - # The library was specified with -dlpreopen. - dlprefiles="$dlprefiles $arg" - prev= - else - deplibs="$deplibs $arg" - fi - continue - ;; + $show "$link_command" + $run eval "$link_command" || exit $? - # 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 create the wrapper script. + $show "creating $output" - # Now actually substitute the argument into the commands. - if test -n "$arg"; then - func_append compile_command " $arg" - func_append finalize_command " $arg" + # 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}\" || 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 + var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` + relink_command="$var=\"$var_value\"; export $var; $relink_command" + fi + done + relink_command="(cd `pwd`; $relink_command)" + relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` fi - done # argument parsing loop - test -n "$prev" && \ - func_fatal_help "the \`$prevarg' option requires an argument" + # Quote $echo for shipping. + if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then + case $progpath in + [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; + *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; + esac + qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` + else + qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` + fi - 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 + # Only actually do things if our run command is non-null. + if test -z "$run"; then + # win32 will think the script is a binary if it has + # a .exe suffix, so we strip it off here. + case $output in + *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;; + esac + # test for cygwin because mv fails w/o .exe extensions + case $host in + *cygwin*) + exeext=.exe + outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;; + *) exeext= ;; + esac + case $host in + *cygwin* | *mingw* ) + output_name=`basename $output` + output_path=`dirname $output` + cwrappersource="$output_path/$objdir/lt-$output_name.c" + cwrapper="$output_path/$output_name.exe" + $rm $cwrappersource $cwrapper + trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 - oldlibs= - # calculate the name of the file, without its directory - func_basename "$output" - outputname="$func_basename_result" - libobjs_save="$libobjs" + cat > $cwrappersource <> $cwrappersource<<"EOF" +#include +#include +#include +#include +#include +#include +#include +#include +#include - 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_duplicate_deps ; then - case "$libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - libs="$libs $deplib" - done +#if defined(PATH_MAX) +# define LT_PATHMAX PATH_MAX +#elif defined(MAXPATHLEN) +# define LT_PATHMAX MAXPATHLEN +#else +# define LT_PATHMAX 1024 +#endif - if test "$linkmode" = lib; then - libs="$predeps $libs $compiler_lib_search_path $postdeps" +#ifndef DIR_SEPARATOR +# define DIR_SEPARATOR '/' +# define PATH_SEPARATOR ':' +#endif - # 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 "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; - esac - pre_post_deps="$pre_post_deps $pre_post_dep" - done - fi - pre_post_deps= - fi +#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ + defined (__OS2__) +# define HAVE_DOS_BASED_FILE_SYSTEM +# ifndef DIR_SEPARATOR_2 +# define DIR_SEPARATOR_2 '\\' +# endif +# ifndef PATH_SEPARATOR_2 +# define PATH_SEPARATOR_2 ';' +# endif +#endif - 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 +#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 */ - 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 +#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 */ - 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 +#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) +#define XFREE(stale) do { \ + if (stale) { free ((void *) stale); stale = 0; } \ +} while (0) - 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%" - test "X$link_all_deplibs" != Xno && libs="$libs $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= - case $lib in - *.la) func_source "$lib" ;; - esac +/* -DDEBUG is fairly common in CFLAGS. */ +#undef DEBUG +#if defined DEBUGWRAPPER +# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__) +#else +# define DEBUG(format, ...) +#endif - # Collect preopened libtool deplibs, except any this library - # has declared as weak libs - for deplib in $dependency_libs; do - deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"` - case " $weak_libs " in - *" $deplib_base "*) ;; - *) deplibs="$deplibs $deplib" ;; - esac - done - done - libs="$dlprefiles" - fi - if test "$pass" = dlopen; then - # Collect dlpreopened libraries - save_deplibs="$deplibs" - deplibs= - fi +const char *program_name = NULL; - 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 - compiler_flags="$compiler_flags $deplib" - if test "$linkmode" = lib ; then - case "$new_inherited_linker_flags " in - *" $deplib "*) ;; - * ) new_inherited_linker_flags="$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 "*) ;; - * ) new_inherited_linker_flags="$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" - newlib_search_path="$newlib_search_path $func_stripname_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" - newlib_search_path="$newlib_search_path $func_stripname_result" - ;; - *) - func_warning "\`-L' is ignored for archives/objects" - ;; - esac # linkmode - continue - ;; # -L - -R*) - if test "$pass" = link; then - func_stripname '-R' '' "$deplib" - dir=$func_stripname_result - # Make sure the xrpath contains only unique directories. - case "$xrpath " in - *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; - esac - fi - deplibs="$deplib $deplibs" - continue - ;; - *.la) lib="$deplib" ;; - *.$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 \"X$deplib\"" 2>/dev/null | $Xsed -e 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. - newdlprefiles="$newdlprefiles $deplib" - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - newdlfiles="$newdlfiles $deplib" - fi - fi - continue - ;; - %DEPLIBS%) - alldeplibs=yes - continue - ;; - esac # case $deplib +void * xmalloc (size_t num); +char * xstrdup (const char *string); +const char * base_name (const char *name); +char * find_executable(const char *wrapper); +int check_executable(const char *path); +char * strendzap(char *str, const char *pat); +void lt_fatal (const char *message, ...); - if test "$found" = yes || test -f "$lib"; then : - else - func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" - fi +int +main (int argc, char *argv[]) +{ + char **newargz; + int i; - # 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" + program_name = (char *) xstrdup (base_name (argv[0])); + DEBUG("(main) argv[0] : %s\n",argv[0]); + DEBUG("(main) program_name : %s\n",program_name); + newargz = XMALLOC(char *, argc+2); +EOF - func_dirname "$lib" "" "." - ladir="$func_dirname_result" + cat >> $cwrappersource <> $cwrappersource <<"EOF" + newargz[1] = find_executable(argv[0]); + if (newargz[1] == NULL) + lt_fatal("Couldn't find %s", argv[0]); + DEBUG("(main) found exe at : %s\n",newargz[1]); + /* we know the script has the same name, without the .exe */ + /* so make sure newargz[1] doesn't end in .exe */ + strendzap(newargz[1],".exe"); + for (i = 1; i < argc; i++) + newargz[i+1] = xstrdup(argv[i]); + newargz[argc+1] = NULL; + for (i=0; i> $cwrappersource <> $cwrappersource <> $cwrappersource <<"EOF" + return 127; +} +void * +xmalloc (size_t num) +{ + void * p = (void *) malloc (num); + if (!p) + lt_fatal ("Memory exhausted"); - # Get the name of the library we link against. - linklib= - for l in $old_library $library_names; do - linklib="$l" - done - if test -z "$linklib"; then - func_fatal_error "cannot find name of link library for \`$lib'" - fi + return p; +} - # 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. - dlprefiles="$dlprefiles $lib $dependency_libs" - else - newdlfiles="$newdlfiles $lib" - fi - continue - fi # $pass = dlopen +char * +xstrdup (const char *string) +{ + return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL +; +} - # 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" +const char * +base_name (const char *name) +{ + const char *base; - # Find the relevant object directory and library name. - if test "X$installed" = Xyes; then - if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then - func_warning "library \`$lib' was moved." - dir="$ladir" - absdir="$abs_ladir" - libdir="$abs_ladir" - else - dir="$libdir" - absdir="$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 - notinst_path="$notinst_path $abs_ladir" - else - dir="$ladir/$objdir" - absdir="$abs_ladir/$objdir" - # Remove this search path later - notinst_path="$notinst_path $abs_ladir" - fi - fi # $installed = yes - func_stripname 'lib' '.la' "$laname" - name=$func_stripname_result +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + /* Skip over the disk name in MSDOS pathnames. */ + if (isalpha ((unsigned char)name[0]) && name[1] == ':') + name += 2; +#endif - # 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 - # Prefer using a static library (so that no silly _DYNAMIC symbols - # are required to link). - if test -n "$old_library"; then - newdlprefiles="$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" && \ - dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library" - # Otherwise, use the dlname, so that lt_dlopen finds it. - elif test -n "$dlname"; then - newdlprefiles="$newdlprefiles $dir/$dlname" - else - newdlprefiles="$newdlprefiles $dir/$linklib" - fi - 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 - newlib_search_path="$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" - newlib_search_path="$newlib_search_path $func_stripname_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_duplicate_deps ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$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:"*) ;; - *) temp_rpath="$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 "*) ;; - *) compile_rpath="$compile_rpath $absdir" - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$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 - notinst_deplibs="$notinst_deplibs $lib" - need_relink=no - ;; - *) - if test "$installed" = no; then - notinst_deplibs="$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 "*) ;; - *) compile_rpath="$compile_rpath $absdir" - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$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 "$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 - [\\/]*) - add_dir="$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:"*) ;; - *) compile_shlibpath="$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:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; - esac - fi - fi - fi - - if test "$linkmode" = prog || test "$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:"*) ;; - *) finalize_shlibpath="$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 - [\\/]*) - add_dir="$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 "*) ;; - *) xrpath="$xrpath $temp_xrpath";; - esac;; - *) temp_deplibs="$temp_deplibs $libdir";; - esac - done - dependency_libs="$temp_deplibs" - fi - - newlib_search_path="$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" - if $opt_duplicate_deps ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - 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_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 - compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" - linker_flags="$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 "X $new_inherited_linker_flags" | $Xsed -e '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 "*) ;; - *) lib_search_path="$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 "*) ;; - *) tmp_libs="$tmp_libs $deplib" ;; - esac - ;; - *) tmp_libs="$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 - tmp_libs="$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" - objs="$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!" - libobjs="$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|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 - ;; - *) - func_fatal_configuration "$modename: unknown library version type \`$version_type'" - ;; - 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. - verstring="$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" - libobjs="$libobjs $symfileobj" - test "X$libobjs" = "X " && libobjs= - - if test "$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 - removelist="$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 - oldlibs="$oldlibs $output_objdir/$libname.$libext" - - # Transform .lo files to .o files. - oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` - fi - - # Eliminate all temporary directories. - #for path in $notinst_path; do - # lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"` - # deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"` - # dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "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 - temp_xrpath="$temp_xrpath -R$libdir" - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$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 "*) ;; - *) dlfiles="$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 "*) ;; - *) dlprefiles="$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*) - # these systems don't actually have a c library (as such)! - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C library is in the System framework - deplibs="$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 - deplibs="$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` - 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 "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; - esac - done - if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | - $SED -e 10q | - $EGREP "$file_magic_regex" > /dev/null; then - newdeplibs="$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. - newdeplibs="$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 "*) - newdeplibs="$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 \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \ - $EGREP "$match_pattern_regex" > /dev/null; then - newdeplibs="$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. - newdeplibs="$newdeplibs $a_deplib" - ;; - esac - done # Gone through all deplibs. - ;; - none | unknown | *) - newdeplibs="" - tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \ - -e 's/ -lc$//' -e '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 "X $tmp_deplibs" | $Xsed -e "s,$i,,"` - done - fi - if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' | - $GREP . >/dev/null; then - $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 - fi - ;; - esac - versuffix=$versuffix_save - major=$major_save - release=$release_save - libname=$libname_save - name=$name_save + for (base = name; *name; name++) + if (IS_DIR_SEPARATOR (*name)) + base = name + 1; + return base; +} - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library with the System framework - newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'` - ;; - esac +int +check_executable(const char * path) +{ + struct stat st; - 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." + DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!"); + if ((!path) || (!*path)) + return 0; - 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 "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - ;; - esac + if ((stat (path, &st) >= 0) && + ( + /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */ +#if defined (S_IXOTH) + ((st.st_mode & S_IXOTH) == S_IXOTH) || +#endif +#if defined (S_IXGRP) + ((st.st_mode & S_IXGRP) == S_IXGRP) || +#endif + ((st.st_mode & S_IXUSR) == S_IXUSR)) + ) + return 1; + else + return 0; +} - # 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 "*) - new_libs="$new_libs -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$new_libs $deplib" ;; - esac - ;; - *) new_libs="$new_libs $deplib" ;; - esac - done - deplibs="$new_libs" +/* Searches for the full path of the wrapper. Returns + newly allocated full path name if found, NULL otherwise */ +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; - # All the library-specific variables (install_libdir is set above). - library_names= - old_library= - dlname= + DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"); - # 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 "$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 - 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"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - dep_rpath="$dep_rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) perm_rpath="$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 - rpath="$rpath$dir:" - done - eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" - fi - test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" - fi + 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 ("getcwd failed"); + 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 ("getcwd failed"); + 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 * +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; +} + +static void +lt_error_core (int exit_status, const char * mode, + const char * message, va_list ap) +{ + fprintf (stderr, "%s: %s: ", program_name, mode); + vfprintf (stderr, message, ap); + fprintf (stderr, ".\n"); + + if (exit_status >= 0) + exit (exit_status); +} + +void +lt_fatal (const char *message, ...) +{ + va_list ap; + va_start (ap, message); + lt_error_core (EXIT_FAILURE, "FATAL", message, ap); + va_end (ap); +} +EOF + # we should really use a build-platform specific compiler + # here, but OTOH, the wrappers (shell script and this C one) + # are only useful if you want to execute the "real" binary. + # Since the "real" binary is built for $host, then this + # wrapper might as well be built for $host, too. + $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource + ;; + esac + $rm $output + trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 + + $echo > $output "\ +#! $SHELL + +# $output - temporary wrapper script for $objdir/$outputname +# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP +# +# 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. +Xsed='${SED} -e 1s/^X//' +sed_quote_subst='$sed_quote_subst' + +# Be Bourne compatible (taken from Autoconf:_AS_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 variable: + 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 + echo=\"$qecho\" + file=\"\$0\" + # Make sure echo works. + if test \"X\$1\" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift + elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then + # Yippee, \$echo works! + : + else + # Restart under the correct shell, and then maybe \$echo will work. + exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} + fi + fi\ +" + $echo >> $output "\ - shlibpath="$finalize_shlibpath" - test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" - if test -n "$shlibpath"; then - eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" - fi + # Find the directory that this script lives in. + thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` + test \"x\$thisdir\" = \"x\$file\" && thisdir=. - # 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 + # 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 \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` - if test -n "$soname_spec"; then - eval soname=\"$soname_spec\" - else - soname="$realname" - fi - if test -z "$dlname"; then - dlname=$soname - fi + # 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 - lib="$output_objdir/$realname" - linknames= - for link - do - linknames="$linknames $link" - done + file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` + file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` + done - # Use standard objects if they are pic - test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - test "X$libobjs" = "X " && libobjs= + # Try to get the absolute directory name. + absdir=\`cd \"\$thisdir\" && pwd\` + test -n \"\$absdir\" && thisdir=\"\$absdir\" +" - 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" - delfiles="$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 + if test "$fast_install" = yes; then + $echo >> $output "\ + program=lt-'$outputname'$exeext + progdir=\"\$thisdir/$objdir\" - # 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 cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - func_len " $cmd" - len=$func_len_result - if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then - func_show_eval "$cmd" 'exit $?' - 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 ! -f \"\$progdir/\$program\" || \\ + { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ + test \"X\$file\" != \"X\$progdir/\$program\"; }; 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 "X$include_expsyms" | $Xsed | $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 - delfiles="$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 + file=\"\$\$-\$program\" - tmp_deplibs= - for test_deplib in $deplibs; do - case " $convenience " in - *" $test_deplib "*) ;; - *) - tmp_deplibs="$tmp_deplibs $test_deplib" - ;; - esac - done - deplibs="$tmp_deplibs" + if test ! -d \"\$progdir\"; then + $mkdir \"\$progdir\" + else + $rm \"\$progdir/\$file\" + fi" - 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" - generated="$generated $gentop" + $echo >> $output "\ - func_extract_archives $gentop $convenience - libobjs="$libobjs $func_extract_archives_result" - test "X$libobjs" = "X " && libobjs= - fi - fi + # 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 $EXIT_FAILURE + fi + fi - if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then - eval flag=\"$thread_safe_flag_spec\" - linker_flags="$linker_flags $flag" + $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || + { $rm \"\$progdir/\$program\"; + $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } + $rm \"\$progdir/\$file\" + fi" + else + $echo >> $output "\ + program='$outputname' + progdir=\"\$thisdir/$objdir\" +" fi - # Make a backup of the uninstalled library when relinking - if test "$mode" = relink; then - $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? - fi + $echo >> $output "\ - # 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 + if test -f \"\$progdir/\$program\"; then" + + # Export our shlibpath_var if we have one. + if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then + $echo >> $output "\ + # 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 \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` + + export $shlibpath_var +" 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. + # fixup the dll searchpath if we need to. + if test -n "$dllsearchpath"; then + $echo >> $output "\ + # Add the dll search path components to the executable PATH + PATH=$dllsearchpath:\$PATH +" + fi - # 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 - output_la=`$ECHO "X$output" | $Xsed -e "$basename"` + $echo >> $output "\ + if test \"\$libtool_execute_magic\" != \"$magic\"; then + # Run the actual program with our arguments. +" + case $host in + # Backslashes separate directories on plain windows + *-*-mingw | *-*-os2*) + $echo >> $output "\ + exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} +" + ;; - # Clear the reloadable object creation command queue and - # initialize k to one. - test_cmds= - concat_cmds= - objlist= - last_robj= - k=1 + *) + $echo >> $output "\ + exec \"\$progdir/\$program\" \${1+\"\$@\"} +" + ;; + esac + $echo >> $output "\ + \$echo \"\$0: cannot exec \$program \$*\" + exit $EXIT_FAILURE + 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 $EXIT_FAILURE + fi +fi\ +" + chmod +x $output + fi + exit $EXIT_SUCCESS + ;; + esac - 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 - $ECHO "$obj" >> $output - done - $ECHO ')' >> $output - delfiles="$delfiles $output" - 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 - $ECHO "$obj" >> $output - done - delfiles="$delfiles $output" - output=$firstobj\"$file_list_spec$output\" - 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. - eval concat_cmds=\"$reload_cmds $objlist $last_robj\" - else - # All subsequent reloadable object files will link in - # the last one created. - eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$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~ - eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" - if test -n "$last_robj"; then - eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" - fi - delfiles="$delfiles $output" + # See if we need to build an old-fashioned archive. + for oldlib in $oldlibs; do - else - output= - fi + if test "$build_libtool_libs" = convenience; then + oldobjs="$libobjs_save" + 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" + fi + addlibs="$old_convenience" + 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 + if test -n "$addlibs"; then + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" - test -n "$save_libobjs" && - func_verbose "creating a temporary reloadable object file: $output" + func_extract_archives $gentop $addlibs + oldobjs="$oldobjs $func_extract_archives_result" + fi - # 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 "$mode" = relink; then - ( cd "$output_objdir" && \ - $RM "${realname}T" && \ - $MV "${realname}U" "$realname" ) - 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 + # 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 + $echo "X$obj" | $Xsed -e 's%^.*/%%' + done | sort | sort -uc >/dev/null 2>&1); then + : + else + $echo "copying selected object files to avoid basename conflicts..." - exit $lt_exit - } - done - IFS="$save_ifs" + if test -z "$gentop"; then + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" - 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"' + $show "${rm}r $gentop" + $run ${rm}r "$gentop" + $show "$mkdir $gentop" + $run $mkdir "$gentop" + exit_status=$? + if test "$exit_status" -ne 0 && test ! -d "$gentop"; then + exit $exit_status 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 "X$include_expsyms" | $Xsed | $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 - delfiles="$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 + save_oldobjs=$oldobjs + oldobjs= + counter=1 + for obj in $save_oldobjs + do + objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` + case " $oldobjs " in + " ") oldobjs=$obj ;; + *[\ /]"$objbase "*) + while :; do + # Make sure we don't pick an alternate name that also + # overlaps. + newobj=lt$counter-$objbase + counter=`expr $counter + 1` + case " $oldobjs " in + *[\ /]"$newobj "*) ;; + *) if test ! -f "$gentop/$newobj"; then break; fi ;; + esac + done + $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" + $run ln "$obj" "$gentop/$newobj" || + $run cp "$obj" "$gentop/$newobj" + oldobjs="$oldobjs $gentop/$newobj" + ;; + *) oldobjs="$oldobjs $obj" ;; + esac + done + fi - libobjs=$output - # Restore the value of output. - output=$save_output + eval cmds=\"$old_archive_cmds\" - 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. + if len=`expr "X$cmds" : ".*"` && + test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then + cmds=$old_archive_cmds + else + # the command line is too long to link in one step, link in parts + $echo "using piecewise archive linking..." + save_RANLIB=$RANLIB + RANLIB=: + objlist= + concat_cmds= + save_oldobjs=$oldobjs - # 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 + # Is there a better way of finding the last object in the list? + for obj in $save_oldobjs + do + last_oldobj=$obj + done + for obj in $save_oldobjs + do + oldobjs="$objlist $obj" + objlist="$objlist $obj" + eval test_cmds=\"$old_archive_cmds\" + if len=`expr "X$test_cmds" : ".*" 2>/dev/null` && + test "$len" -le "$max_cmd_len"; then + : else - cmds=$module_cmds + # 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= fi + done + RANLIB=$save_RANLIB + oldobjs=$objlist + if test "X$oldobjs" = "X" ; then + eval cmds=\"\$concat_cmds\" else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - cmds=$archive_expsym_cmds - else - cmds=$archive_cmds - fi + eval cmds=\"\$concat_cmds~\$old_archive_cmds\" 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" - generated="$generated $gentop" - - func_extract_archives $gentop $dlprefiles - libobjs="$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 "$mode" = relink; then - ( cd "$output_objdir" && \ - $RM "${realname}T" && \ - $MV "${realname}U" "$realname" ) - fi - - exit $lt_exit - } - done + fi + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + eval cmd=\"$cmd\" IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + done - # Restore the uninstalled library and exit - if test "$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 + if test -n "$generated"; then + $show "${rm}r$generated" + $run ${rm}r$generated + 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 + # Now create the libtool archive. + case $output in + *.la) + old_library= + test "$build_old_libs" = yes && old_library="$libname.$libext" + $show "creating $output" - # 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" + # 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}\" || 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 + var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` + relink_command="$var=\"$var_value\"; 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 "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` + if test "$hardcode_automatic" = yes ; then + relink_command= 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 "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` - else - gentop="$output_objdir/${obj}x" - generated="$generated $gentop" + # Only create the output if not a dry run. + if test -z "$run"; then + 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) + name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + if test -z "$libdir"; then + $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 + exit $EXIT_FAILURE + fi + newdependency_libs="$newdependency_libs $libdir/$name" + ;; + *) newdependency_libs="$newdependency_libs $deplib" ;; + esac + done + dependency_libs="$newdependency_libs" + newdlfiles= + for lib in $dlfiles; do + name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + if test -z "$libdir"; then + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + exit $EXIT_FAILURE + fi + newdlfiles="$newdlfiles $libdir/$name" + done + dlfiles="$newdlfiles" + newdlprefiles= + for lib in $dlprefiles; do + name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + if test -z "$libdir"; then + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + exit $EXIT_FAILURE + fi + newdlprefiles="$newdlprefiles $libdir/$name" + done + dlprefiles="$newdlprefiles" + else + newdlfiles= + for lib in $dlfiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + *) abs=`pwd`"/$lib" ;; + esac + newdlfiles="$newdlfiles $abs" + done + dlfiles="$newdlfiles" + newdlprefiles= + for lib in $dlprefiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + *) abs=`pwd`"/$lib" ;; + esac + newdlprefiles="$newdlprefiles $abs" + done + dlprefiles="$newdlprefiles" + fi + $rm $output + # place dlname in correct position for cygwin + tdlname=$dlname + case $host,$output,$installed,$module,$dlname in + *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; + esac + $echo > $output "\ +# $outputname - a libtool library file +# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP +# +# Please DO NOT delete this file! +# It is necessary for linking the library. - func_extract_archives $gentop $convenience - reload_conv_objs="$reload_objs $func_extract_archives_result" - fi - fi +# The name that we can dlopen(3). +dlname='$tdlname' - # Create the old-style object. - reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test +# Names of this library. +library_names='$library_names' - output="$obj" - func_execute_cmds "$reload_cmds" 'exit $?' +# The name of the static archive. +old_library='$old_library' - # 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 +# Libraries that this one depends upon. +dependency_libs='$dependency_libs' - exit $EXIT_SUCCESS - fi +# Version information for $libname. +current=$current +age=$age +revision=$revision - if test "$build_libtool_libs" != yes; then - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi +# Is this an already installed library? +installed=$installed - # 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 +# Should we warn about portability when linking against -modules? +shouldnotlink=$module - 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 +# Files to dlopen/dlpreopen +dlopen='$dlfiles' +dlpreopen='$dlprefiles' - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' +# 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 fi - exit $EXIT_SUCCESS + # Do a symbolic link so that the libtool archive can be found in + # LD_LIBRARY_PATH before the program is installed. + $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" + $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? ;; + esac + exit $EXIT_SUCCESS + ;; - prog) - case $host in - *cygwin*) func_stripname '' '.exe' "$output" - output=$func_stripname_result.exe;; + # libtool install mode + install) + modename="$modename: install" + + # 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. + $echo "X$nonopt" | grep shtool > /dev/null; then + # Aesthetically quote it. + arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; esac - test -n "$vinfo" && \ - func_warning "\`-version-info' is ignored for programs" + install_prog="$arg " + arg="$1" + shift + else + install_prog= + arg=$nonopt + fi - test -n "$release" && \ - func_warning "\`-release' is ignored for programs" + # The real first argument should be the name of the installation program. + # Aesthetically quote it. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + install_prog="$install_prog$arg" - 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." + # We need to accept at least all the BSD install flags. + dest= + files= + opts= + prev= + install_type= + isdir=no + stripme= + for arg + do + if test -n "$dest"; then + files="$files $dest" + dest=$arg + continue + fi - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library is the System framework - compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` - finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` + case $arg in + -d) isdir=yes ;; + -f) + case " $install_prog " in + *[\\\ /]cp\ *) ;; + *) prev=$arg ;; + esac + ;; + -g | -m | -o) prev=$arg ;; + -s) + stripme=" -s" + continue + ;; + -*) + ;; + *) + # If the previous option needed an argument, then skip it. + if test -n "$prev"; then + prev= + else + dest=$arg + continue + fi ;; 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]) - compile_command="$compile_command ${wl}-bind_at_load" - finalize_command="$finalize_command ${wl}-bind_at_load" - ;; - esac - fi - # Time to change all our "foo.ltframework" stuff back to "-framework foo" - compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + # Aesthetically quote the argument. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" ;; esac + install_prog="$install_prog $arg" + done + + if test -z "$install_prog"; then + $echo "$modename: you must specify an install program" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + if test -n "$prev"; then + $echo "$modename: the \`$prev' option requires an argument" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi - # 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 "*) ;; + if test -z "$files"; then + if test -z "$dest"; then + $echo "$modename: no file or destination specified" 1>&2 + else + $echo "$modename: you must specify a destination" 1>&2 + fi + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Strip any trailing slash from the destination. + dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` + + # Check to see that the destination is a directory. + test -d "$dest" && isdir=yes + if test "$isdir" = yes; then + destdir="$dest" + destname= + else + destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` + test "X$destdir" = "X$dest" && destdir=. + destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` + + # Not a directory, so check to see that there is only one file specified. + set dummy $files + if test "$#" -gt 2; then + $echo "$modename: \`$dest' is not a directory" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + fi + case $destdir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + for file in $files; do + case $file in + *.lo) ;; *) - case " $compile_deplibs " in - *" -L$path/$objdir "*) - new_libs="$new_libs -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $compile_deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$new_libs $deplib" ;; - esac + $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE ;; - *) new_libs="$new_libs $deplib" ;; esac done - compile_deplibs="$new_libs" + ;; + esac + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic="$magic" - compile_command="$compile_command $compile_deplibs" - finalize_command="$finalize_command $finalize_deplibs" + staticlibs= + future_libdirs= + current_libdirs= + for file in $files; do - 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 "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; - esac - done - fi + # Do each installation. + case $file in + *.$libext) + # Do the static libraries later. + staticlibs="$staticlibs $file" + ;; - # 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"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; - esac + *.la) + # Check to see that this really is a libtool archive. + if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : + else + $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE fi - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$libdir:"*) ;; - ::) dllsearchpath=$libdir;; - *) dllsearchpath="$dllsearchpath:$libdir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - ::) dllsearchpath=$testbindir;; - *) dllsearchpath="$dllsearchpath:$testbindir";; - esac - ;; + + library_names= + old_library= + relink_command= + # If there is no directory component, then add one. + case $file in + */* | *\\*) . $file ;; + *) . ./$file ;; 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"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$finalize_perm_rpath " in + # Add the libdir to current_libdirs if it is the destination. + if test "X$destdir" = "X$libdir"; then + case "$current_libdirs " in *" $libdir "*) ;; - *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; + *) current_libdirs="$current_libdirs $libdir" ;; + esac + else + # Note the libdir as a future libdir. + case "$future_libdirs " in + *" $libdir "*) ;; + *) future_libdirs="$future_libdirs $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 "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - fi - func_generate_dlsyms "$outputname" "@PROGRAM@" "no" + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ + test "X$dir" = "X$file/" && dir= + dir="$dir$objdir" - # template prelinking step - if test -n "$prelink_cmds"; then - func_execute_cmds "$prelink_cmds" 'exit $?' - fi + if test -n "$relink_command"; then + # Determine the prefix the user has applied to our future dir. + inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"` - wrappers_required=yes - case $host in - *cygwin* | *mingw* ) - if test "$build_libtool_libs" != yes; then - wrappers_required=no - fi - ;; - *cegcc) - # Disable wrappers for cegcc, we are cross compiling anyway. - wrappers_required=no - ;; - *) - 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 "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` - link_command="$compile_command$compile_rpath" + # 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. + if test "$inst_prefix_dir" = "$destdir"; then + $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 + exit $EXIT_FAILURE + fi - # We have no uninstalled library dependencies, so finalize right now. - exit_status=0 - func_show_eval "$link_command" 'exit_status=$?' + if test -n "$inst_prefix_dir"; then + # Stick the inst_prefix_dir data into the link command. + relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP` + else + relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP` + fi - # Delete the generated files. - if test -f "$output_objdir/${outputname}S.${objext}"; then - func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' + $echo "$modename: warning: relinking \`$file'" 1>&2 + $show "$relink_command" + if $run eval "$relink_command"; then : + else + $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 + exit $EXIT_FAILURE + fi fi - exit $exit_status - fi + # See the names of the shared library. + set dummy $library_names + if test -n "$2"; then + realname="$2" + shift + shift - 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 + srcname="$realname" + test -n "$relink_command" && srcname="$realname"T - 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 - rpath="$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 - rpath="$rpath$dir:" + # Install the shared library and build the symlinks. + $show "$install_prog $dir/$srcname $destdir/$realname" + $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? + if test -n "$stripme" && test -n "$striplib"; then + $show "$striplib $destdir/$realname" + $run 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 + if test "$linkname" != "$realname"; then + $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" + $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" + fi + done + fi + + # Do each command in the postinstall commands. + lib="$destdir/$realname" + cmds=$postinstall_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test "$mode" = relink; then + $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' + fi + + exit $lt_exit + } done - finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " + IFS="$save_ifs" 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 "X$link_command" | $Xsed -e '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 $?' - exit $EXIT_SUCCESS - fi + # Install the pseudo-library for information purposes. + name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + instname="$dir/$name"i + $show "$install_prog $instname $destdir/$name" + $run eval "$install_prog $instname $destdir/$name" || exit $? - 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" + # Maybe install the static library, too. + test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" + ;; - 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 "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` - else - # fast_install is set to needless - relink_command= - fi + *.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 - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" + destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + destfile="$destdir/$destfile" fi - fi - # Replace the output file specification. - link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` + # Deduce the name of the destination old-style object file. + case $destfile in + *.lo) + staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` + ;; + *.$objext) + staticdest="$destfile" + destfile= + ;; + *) + $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + ;; + esac - # Delete the old output files. - $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname + # Install the libtool object if requested. + if test -n "$destfile"; then + $show "$install_prog $file $destfile" + $run eval "$install_prog $file $destfile" || exit $? + fi - func_show_eval "$link_command" 'exit $?' + # Install the old object if enabled. + if test "$build_old_libs" = yes; then + # Deduce the name of the old-style object file. + staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` - # Now create the wrapper script. - func_verbose "creating $output" + $show "$install_prog $staticobj $staticdest" + $run eval "$install_prog \$staticobj \$staticdest" || exit $? + fi + exit $EXIT_SUCCESS + ;; - # 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 "X$relink_command" | $Xsed -e "$sed_quote_subst"` - fi + *) + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile="$destdir/$destname" + else + destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + destfile="$destdir/$destfile" + fi - # Quote $ECHO for shipping. - if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then - case $progpath in - [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; - *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; + # 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 + file=`$echo $file|${SED} 's,.exe$,,'` + stripped_ext=".exe" + fi + ;; esac - qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"` - else - qecho=`$ECHO "X$ECHO" | $Xsed -e "$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 + # Do a test to see if this is really a libtool program. case $host in - *cygwin*) - exeext=.exe - func_stripname '' '.exe' "$outputname" - outputname=$func_stripname_result ;; - *) exeext= ;; + *cygwin*|*mingw*) + wrapper=`$echo $file | ${SED} -e 's,.exe$,,'` + ;; + *) + wrapper=$file + ;; 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; 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 - } + if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then + notinst_deplibs= + relink_command= + + # Note that it is not necessary on cygwin/mingw to append a dot to + # foo even if both foo 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. + # + # If there is no directory component, then add one. + case $wrapper in + */* | *\\*) . ${wrapper} ;; + *) . ./${wrapper} ;; + esac + + # Check the variables that should have been set. + if test -z "$notinst_deplibs"; then + $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 + exit $EXIT_FAILURE + fi + + finalize=yes + for lib in $notinst_deplibs; do + # Check to see that each library is installed. + libdir= + if test -f "$lib"; then + # If there is no directory component, then add one. + case $lib in + */* | *\\*) . $lib ;; + *) . ./$lib ;; + esac + fi + libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test + if test -n "$libdir" && test ! -f "$libfile"; then + $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 + finalize=no + fi + done + + relink_command= + # Note that it is not necessary on cygwin/mingw to append a dot to + # foo even if both foo 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. + # + # If there is no directory component, then add one. + case $wrapper in + */* | *\\*) . ${wrapper} ;; + *) . ./${wrapper} ;; + esac + + outputname= + if test "$fast_install" = no && test -n "$relink_command"; then + if test "$finalize" = yes && test -z "$run"; then + tmpdir=`func_mktempdir` + file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` + outputname="$tmpdir/$file" + # Replace the output file specification. + relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP` - # 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 - $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result + $show "$relink_command" + if $run eval "$relink_command"; then : else - func_emit_wrapper no > $func_ltwrapper_scriptname_result + $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 + ${rm}r "$tmpdir" + continue fi - } - ;; - * ) - $RM $output - trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 + file="$outputname" + else + $echo "$modename: warning: cannot relink \`$file'" 1>&2 + fi + else + # Install the binary that we compiled earlier. + file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` + fi + fi - func_emit_wrapper no > $output - chmod +x $output + # 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) + destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'` + ;; + esac ;; esac - } - exit $EXIT_SUCCESS - ;; - esac + $show "$install_prog$stripme $file $destfile" + $run eval "$install_prog\$stripme \$file \$destfile" || exit $? + test -n "$outputname" && ${rm}r "$tmpdir" + ;; + esac + done - # See if we need to build an old-fashioned archive. - for oldlib in $oldlibs; do + for file in $staticlibs; do + name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - 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 - oldobjs="$oldobjs $symfileobj" - fi - fi - addlibs="$old_convenience" - fi + # Set up the ranlib parameters. + oldlib="$destdir/$name" - if test -n "$addlibs"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" + $show "$install_prog $file $oldlib" + $run eval "$install_prog \$file \$oldlib" || exit $? - func_extract_archives $gentop $addlibs - oldobjs="$oldobjs $func_extract_archives_result" + if test -n "$stripme" && test -n "$old_striplib"; then + $show "$old_striplib $oldlib" + $run eval "$old_striplib $oldlib" || exit $? 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 + # Do each command in the postinstall commands. + cmds=$old_postinstall_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + done - # Add any objects from preloaded convenience libraries - if test -n "$dlprefiles"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" + if test -n "$future_libdirs"; then + $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 + fi - func_extract_archives $gentop $dlprefiles - oldobjs="$oldobjs $func_extract_archives_result" - fi + if test -n "$current_libdirs"; then + # Maybe just do a dry run. + test -n "$run" && current_libdirs=" -n$current_libdirs" + exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' + else + exit $EXIT_SUCCESS + 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" - generated="$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" - oldobjs="$oldobjs $gentop/$newobj" - ;; - *) oldobjs="$oldobjs $obj" ;; - esac - done - fi - eval cmds=\"$old_archive_cmds\" + # libtool finish mode + finish) + modename="$modename: finish" + libdirs="$nonopt" + admincmds= - 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 - 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 + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then + for dir + do + libdirs="$libdirs $dir" + done + + for libdir in $libdirs; do + if test -n "$finish_cmds"; then + # Do each command in the finish commands. + cmds=$finish_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || admincmds="$admincmds + $cmd" 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 + IFS="$save_ifs" fi - fi - func_execute_cmds "$cmds" 'exit $?' + if test -n "$finish_eval"; then + # Do the single finish_eval. + eval cmds=\"$finish_eval\" + $run eval "$cmds" || admincmds="$admincmds + $cmds" + fi + done + fi + + # Exit here if they wanted silent mode. + test "$show" = : && exit $EXIT_SUCCESS + + $echo "X----------------------------------------------------------------------" | $Xsed + $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\" - test -n "$generated" && \ - func_show_eval "${RM}r$generated" + $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" + $echo "more information, such as the ld(1) and ld.so(8) manual pages." + $echo "X----------------------------------------------------------------------" | $Xsed + exit $EXIT_SUCCESS + ;; - # Now create the libtool archive. - case $output in - *.la) - old_library= - test "$build_old_libs" = yes && old_library="$libname.$libext" - func_verbose "creating $output" + # libtool execute mode + execute) + modename="$modename: execute" - # 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 "X$relink_command" | $Xsed -e "$sed_quote_subst"` - if test "$hardcode_automatic" = yes ; then - relink_command= - fi + # The first argument is the command name. + cmd="$nonopt" + if test -z "$cmd"; then + $echo "$modename: you must specify a COMMAND" 1>&2 + $echo "$help" + exit $EXIT_FAILURE + 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" - newdependency_libs="$newdependency_libs $libdir/$name" - ;; - *) newdependency_libs="$newdependency_libs $deplib" ;; - esac - done - dependency_libs="$newdependency_libs" - newdlfiles= + # Handle -dlopen flags immediately. + for file in $execute_dlfiles; do + if test ! -f "$file"; then + $echo "$modename: \`$file' is not a file" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi - 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" - newdlfiles="$newdlfiles $libdir/$name" - ;; - *) newdlfiles="$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" - newdlprefiles="$newdlprefiles $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 - newdlfiles="$newdlfiles $abs" - done - dlfiles="$newdlfiles" - newdlprefiles= - for lib in $dlprefiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; - *) abs=`pwd`"/$lib" ;; - esac - newdlprefiles="$newdlprefiles $abs" - done - dlprefiles="$newdlprefiles" - fi - $RM $output - # place dlname in correct position for cygwin - tdlname=$dlname - case $host,$output,$installed,$module,$dlname in - *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; - 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. + dir= + case $file in + *.la) + # Check to see that this really is a libtool archive. + if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : + else + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi -# The name that we can dlopen(3). -dlname='$tdlname' + # Read the libtool library. + dlname= + library_names= -# Names of this library. -library_names='$library_names' + # If there is no directory component, then add one. + case $file in + */* | *\\*) . $file ;; + *) . ./$file ;; + esac -# The name of the static archive. -old_library='$old_library' + # Skip this library if it cannot be dlopened. + if test -z "$dlname"; then + # Warn if it was a shared library. + test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" + continue + fi -# Linker flags that can not go in dependency_libs. -inherited_linker_flags='$new_inherited_linker_flags' + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` + test "X$dir" = "X$file" && dir=. -# Libraries that this one depends upon. -dependency_libs='$dependency_libs' + if test -f "$dir/$objdir/$dlname"; then + dir="$dir/$objdir" + else + if test ! -f "$dir/$dlname"; then + $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 + exit $EXIT_FAILURE + fi + fi + ;; -# Names of additional weak libraries provided by this library -weak_library_names='$weak_libs' + *.lo) + # Just add the directory containing the .lo file. + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` + test "X$dir" = "X$file" && dir=. + ;; -# Version information for $libname. -current=$current -age=$age -revision=$revision + *) + $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 + continue + ;; + esac -# Is this an already installed library? -installed=$installed + # Get the absolute pathname. + absdir=`cd "$dir" && pwd` + test -n "$absdir" && dir="$absdir" -# Should we warn about portability when linking against -modules? -shouldnotlink=$module + # 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 -# Files to dlopen/dlpreopen -dlopen='$dlfiles' -dlpreopen='$dlprefiles' + # This variable tells wrapper scripts just to set shlibpath_var + # rather than running their programs. + libtool_execute_magic="$magic" -# 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 - } + # Check if any of the arguments is a wrapper script. + args= + for file + do + case $file in + -*) ;; + *) + # Do a test to see if this is really a libtool program. + if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + # If there is no directory component, then add one. + case $file in + */* | *\\*) . $file ;; + *) . ./$file ;; + esac - # 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 -} + # Transform arg to wrapped name. + file="$progdir/$program" + fi + ;; + esac + # Quote arguments (to preserve shell metacharacters). + file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` + args="$args \"$file\"" + done + + if test -z "$run"; then + if test -n "$shlibpath_var"; then + # Export the shlibpath_var. + eval "export $shlibpath_var" + fi -{ test "$mode" = link || test "$mode" = relink; } && - func_mode_link ${1+"$@"} + # 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 + 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 + ;; -# func_mode_uninstall arg... -func_mode_uninstall () -{ - $opt_debug - RM="$nonopt" + # libtool clean and uninstall mode + clean | uninstall) + modename="$modename: $mode" + rm="$nonopt" files= rmforce= exit_status=0 @@ -8209,28 +6547,30 @@ for arg do case $arg in - -f) RM="$RM $arg"; rmforce=yes ;; - -*) RM="$RM $arg" ;; + -f) rm="$rm $arg"; rmforce=yes ;; + -*) rm="$rm $arg" ;; *) files="$files $arg" ;; esac done - test -z "$RM" && \ - func_fatal_help "you must specify an RM program" + if test -z "$rm"; then + $echo "$modename: you must specify an RM program" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi rmdirs= origobjdir="$objdir" for file in $files; do - func_dirname "$file" "" "." - dir="$func_dirname_result" - if test "X$dir" = X.; then + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` + if test "X$dir" = "X$file"; then + dir=. objdir="$origobjdir" else objdir="$dir/$origobjdir" fi - func_basename "$file" - name="$func_basename_result" + name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` test "$mode" = uninstall && objdir="$dir" # Remember objdir for removal later, being careful to avoid duplicates @@ -8242,9 +6582,9 @@ 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 + 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 @@ -8258,8 +6598,8 @@ case $name in *.la) # Possibly a libtool archive, so verify it. - if func_lalib_p "$file"; then - func_source $dir/$name + if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + . $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do @@ -8274,17 +6614,39 @@ *" $dlname "*) ;; *) rmfiles="$rmfiles $objdir/$dlname" ;; esac - test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" + test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${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' + cmds=$postuninstall_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" + if test "$?" -ne 0 && test "$rmforce" != yes; then + exit_status=1 + fi + done + IFS="$save_ifs" 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' + cmds=$old_postuninstall_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" + if test "$?" -ne 0 && test "$rmforce" != yes; then + exit_status=1 + fi + done + IFS="$save_ifs" fi # FIXME: should reinstall the best remaining shared library. ;; @@ -8294,20 +6656,20 @@ *.lo) # Possibly a libtool object, so verify it. - if func_lalib_p "$file"; then + if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then # Read the .lo file - func_source $dir/$name + . $dir/$name # Add PIC object to the list of files to remove. - if test -n "$pic_object" && - test "$pic_object" != none; then + if test -n "$pic_object" \ + && test "$pic_object" != none; then rmfiles="$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 + if test -n "$non_pic_object" \ + && test "$non_pic_object" != none; then rmfiles="$rmfiles $dir/$non_pic_object" fi fi @@ -8318,26 +6680,17 @@ noexename=$name case $file in *.exe) - func_stripname '' '.exe' "$file" - file=$func_stripname_result - func_stripname '' '.exe' "$name" - noexename=$func_stripname_result + file=`$echo $file|${SED} 's,.exe$,,'` + noexename=`$echo $name|${SED} 's,.exe$,,'` # $file with .exe has already been added to rmfiles, # add $file without .exe rmfiles="$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 - rmfiles="$rmfiles $func_ltwrapper_scriptname_result" - else - relink_command= - func_source $dir/$noexename - fi + if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + relink_command= + . $dir/$noexename # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles @@ -8352,38 +6705,239 @@ fi ;; esac - func_show_eval "$RM $rmfiles" 'exit_status=1' + $show "$rm $rmfiles" + $run $rm $rmfiles || exit_status=1 done objdir="$origobjdir" # 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" + $show "rmdir $dir" + $run rmdir $dir >/dev/null 2>&1 fi done exit $exit_status -} - -{ test "$mode" = uninstall || test "$mode" = clean; } && - func_mode_uninstall ${1+"$@"} + ;; -test -z "$mode" && { - help="$generic_help" - func_fatal_help "you must specify a MODE" -} + "") + $echo "$modename: you must specify a MODE" 1>&2 + $echo "$generic_help" 1>&2 + exit $EXIT_FAILURE + ;; + esac -test -z "$exec_cmd" && \ - func_fatal_help "invalid operation mode \`$mode'" + if test -z "$exec_cmd"; then + $echo "$modename: invalid operation mode \`$mode'" 1>&2 + $echo "$generic_help" 1>&2 + exit $EXIT_FAILURE + fi +fi # test -z "$show_help" if test -n "$exec_cmd"; then - eval exec "$exec_cmd" + eval exec $exec_cmd exit $EXIT_FAILURE fi -exit $exit_status +# We need to display help for each of the modes. +case $mode in +"") $echo \ +"Usage: $modename [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 + --finish same as \`--mode=finish' + --help display this help message and exit + --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] + --quiet same as \`--silent' + --silent don't print informational messages + --tag=TAG use configuration variables from tag TAG + --version print version information + +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. Try \`$modename --help --mode=MODE' for +a more detailed description of MODE. + +Report bugs to ." + exit $EXIT_SUCCESS + ;; + +clean) + $echo \ +"Usage: $modename [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: $modename [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 + -prefer-pic try to building PIC objects only + -prefer-non-pic try to building non-PIC objects only + -static always build a \`.o' file suitable for static linking + +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: $modename [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: $modename [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: $modename [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 rest of the components are interpreted as arguments to that command (only +BSD-compatible install options are recognized)." + ;; + +link) + $echo \ +"Usage: $modename [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 + -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 + -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] + +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: $modename [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." + ;; + +*) + $echo "$modename: invalid operation mode \`$mode'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + ;; +esac + +$echo +$echo "Try \`$modename --help' for more information about other modes." + +exit $? # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting @@ -8397,17 +6951,14 @@ # 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 +disable_libs=shared # ### 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` +disable_libs=static # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: -# vi:sw=2 - diff -Nru libva-1.0.1/Makefile.am libva-1.0.1-3+0.31.1/Makefile.am --- libva-1.0.1/Makefile.am 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/Makefile.am 2010-06-01 10:57:37.000000000 +0000 @@ -22,7 +22,7 @@ AUTOMAKE_OPTIONS = foreign -SUBDIRS = src test +SUBDIRS = va test if BUILD_DUMMY_DRIVER SUBDIRS += dummy_drv_video endif @@ -32,10 +32,13 @@ pcfiles = libva.pc pcfiles += libva-x11.pc +if USE_GLX +pcfiles += libva-glx.pc +endif pkgconfigdir = @pkgconfigdir@ pkgconfig_DATA = $(pcfiles) -EXTRA_DIST = libva.pc.in libva-x11.pc.in +EXTRA_DIST = libva.pc.in libva-x11.pc.in libva-glx.pc.in CLEANFILES = $(pcfiles) diff -Nru libva-1.0.1/Makefile.in libva-1.0.1-3+0.31.1/Makefile.in --- libva-1.0.1/Makefile.in 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/Makefile.in 2010-04-06 06:06:26.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.10.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008 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. @@ -39,9 +38,8 @@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c @@ -58,13 +56,12 @@ host_triplet = @host@ @BUILD_DUMMY_DRIVER_TRUE@am__append_1 = dummy_drv_video @BUILD_I965_DRIVER_TRUE@am__append_2 = i965_drv_video -@USE_GLX_TRUE@am__append_3 = libva-glx.pc subdir = . DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ - $(srcdir)/libva-glx.pc.in $(srcdir)/libva-x11.pc.in \ - $(srcdir)/libva.pc.in $(top_srcdir)/configure COPYING \ - config.guess config.sub depcomp install-sh ltmain.sh missing + $(srcdir)/libva-x11.pc.in $(srcdir)/libva.pc.in \ + $(top_srcdir)/configure COPYING config.guess config.sub \ + depcomp install-sh ltmain.sh missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -73,8 +70,7 @@ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h -CONFIG_CLEAN_FILES = libva.pc libva-x11.pc libva-glx.pc -CONFIG_CLEAN_VPATH_FILES = +CONFIG_CLEAN_FILES = libva.pc libva-x11.pc SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ @@ -89,29 +85,12 @@ $(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__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(pkgconfigdir)" +pkgconfigDATA_INSTALL = $(INSTALL_DATA) DATA = $(pkgconfig_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ - distdir dist dist-all distcheck ETAGS = etags CTAGS = ctags DIST_SUBDIRS = src test dummy_drv_video i965_drv_video @@ -119,34 +98,9 @@ distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ - { test ! -d "$(distdir)" \ - || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr "$(distdir)"; }; } -am__relativize = \ - dir0=`pwd`; \ - sed_first='s,^\([^/]*\)/.*$$,\1,'; \ - sed_rest='s,^[^/]*/*,,'; \ - sed_last='s,^.*/\([^/]*\)$$,\1,'; \ - sed_butlast='s,/*[^/]*$$,,'; \ - while test -n "$$dir1"; do \ - first=`echo "$$dir1" | sed -e "$$sed_first"`; \ - if test "$$first" != "."; then \ - if test "$$first" = ".."; then \ - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ - else \ - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ - if test "$$first2" = "$$first"; then \ - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ - else \ - dir2="../$$dir2"; \ - fi; \ - dir0="$$dir0"/"$$first"; \ - fi; \ - fi; \ - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ - done; \ - reldir="$$dir2" + { test ! -d $(distdir) \ + || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -fr $(distdir); }; } DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print @@ -163,30 +117,32 @@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DRM_CFLAGS = @DRM_CFLAGS@ DRM_LIBS = @DRM_LIBS@ DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ +ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -FGREP = @FGREP@ +F77 = @F77@ +FFLAGS = @FFLAGS@ GEN4ASM_CFLAGS = @GEN4ASM_CFLAGS@ GEN4ASM_LIBS = @GEN4ASM_LIBS@ -GL_DEPS_CFLAGS = @GL_DEPS_CFLAGS@ -GL_DEPS_LIBS = @GL_DEPS_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ @@ -199,25 +155,18 @@ LIBVA_MAJOR_VERSION = @LIBVA_MAJOR_VERSION@ LIBVA_MICRO_VERSION = @LIBVA_MICRO_VERSION@ LIBVA_MINOR_VERSION = @LIBVA_MINOR_VERSION@ -LIBVA_SDS_VERSION = @LIBVA_SDS_VERSION@ LIBVA_VERSION = @LIBVA_VERSION@ -LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ -NM = @NM@ NMEDIT = @NMEDIT@ -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@ @@ -238,7 +187,8 @@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -271,7 +221,6 @@ libvacorelib = @libvacorelib@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -285,14 +234,13 @@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign SUBDIRS = src test $(am__append_1) $(am__append_2) -pcfiles = libva.pc libva-x11.pc $(am__append_3) +pcfiles = libva.pc libva-x11.pc pkgconfig_DATA = $(pcfiles) -EXTRA_DIST = libva.pc.in libva-x11.pc.in libva-glx.pc.in +EXTRA_DIST = libva.pc.in libva-x11.pc.in CLEANFILES = $(pcfiles) all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive @@ -304,15 +252,15 @@ @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ - $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ + echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \ + cd $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -328,10 +276,9 @@ $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) - $(am__cd) $(srcdir) && $(AUTOCONF) + cd $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) - $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) -$(am__aclocal_m4_deps): + cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) config.h: stamp-h1 @if test ! -f $@; then \ @@ -343,7 +290,7 @@ @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: $(am__configure_deps) - ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) + cd $(top_srcdir) && $(AUTOHEADER) rm -f stamp-h1 touch $@ @@ -353,8 +300,6 @@ cd $(top_builddir) && $(SHELL) ./config.status $@ libva-x11.pc: $(top_builddir)/config.status $(srcdir)/libva-x11.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ -libva-glx.pc: $(top_builddir)/config.status $(srcdir)/libva-glx.pc.in - cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: -rm -f *.lo @@ -363,27 +308,24 @@ -rm -rf .libs _libs distclean-libtool: - -rm -f libtool config.lt + -rm -f libtool install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" - @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ - for p in $$list; do \ + @list='$(pkgconfig_DATA)'; 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 $$?; \ + f=$(am__strip_dir) \ + echo " $(pkgconfigDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ + $(pkgconfigDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfigdir)/$$f"; \ done uninstall-pkgconfigDATA: @$(NORMAL_UNINSTALL) - @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(pkgconfigdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(pkgconfigdir)" && rm -f $$files + @list='$(pkgconfig_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ + rm -f "$(DESTDIR)$(pkgconfigdir)/$$f"; \ + done # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. @@ -392,7 +334,7 @@ # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): - @fail= failcom='exit 1'; \ + @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ @@ -409,7 +351,7 @@ else \ local_target="$$target"; \ fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ @@ -417,7 +359,7 @@ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ + @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ @@ -443,16 +385,16 @@ else \ local_target="$$target"; \ fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) @@ -460,14 +402,14 @@ 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; } \ + $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - set x; \ + tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ @@ -479,7 +421,7 @@ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ - set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ @@ -488,41 +430,36 @@ 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 \ + if test -z "$(ETAGS_ARGS)$$tags$$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; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) + tags=; \ list='$(SOURCES) $(HEADERS) config.h.in $(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" \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique + $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" + && 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)" + test -d $(distdir) || mkdir $(distdir) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -538,55 +475,38 @@ 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 {} \;; \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ - $(am__relativize); \ - new_distdir=$$reldir; \ - dir1=$$subdir; dir2="$(top_distdir)"; \ - $(am__relativize); \ - new_top_distdir=$$reldir; \ - echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ - echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ - ($(am__cd) $$subdir && \ + distdir=`$(am__cd) $(distdir) && pwd`; \ + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ + (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$new_top_distdir" \ - distdir="$$new_distdir" \ + top_distdir="$$top_distdir" \ + distdir="$$distdir/$$subdir" \ am__remove_distdir=: \ am__skip_length_check=: \ - am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done - -test -n "$(am__skip_mode_fix)" \ - || find "$(distdir)" -type d ! -perm -755 \ - -exec chmod u+rwx,go+rx {} \; -o \ + -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -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)" + || chmod -R a+r $(distdir) dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) @@ -598,10 +518,6 @@ tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma $(am__remove_distdir) -dist-xz: distdir - tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz - $(am__remove_distdir) - dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) @@ -626,17 +542,15 @@ distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ - bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ + bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ - lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ - *.tar.xz*) \ - xz -dc $(distdir).tar.xz | $(am__untar) ;;\ + unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac @@ -644,11 +558,9 @@ 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 \ + && cd $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ @@ -670,15 +582,13 @@ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ - && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ - && cd "$$am__cwd" \ - || exit 1 + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck $(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: - @$(am__cd) '$(distuninstallcheck_dir)' \ + @cd $(distuninstallcheck_dir) \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ @@ -724,7 +634,6 @@ 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) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -745,8 +654,6 @@ html: html-recursive -html-am: - info: info-recursive info-am: @@ -755,28 +662,18 @@ install-dvi: install-dvi-recursive -install-dvi-am: - install-exec-am: install-html: install-html-recursive -install-html-am: - install-info: install-info-recursive -install-info-am: - install-man: install-pdf: install-pdf-recursive -install-pdf-am: - install-ps: install-ps-recursive -install-ps-am: - installcheck-am: maintainer-clean: maintainer-clean-recursive @@ -799,26 +696,25 @@ uninstall-am: uninstall-pkgconfigDATA -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ - ctags-recursive install-am install-strip tags-recursive +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ + install-strip .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-generic \ clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ - dist-gzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \ - distcheck distclean distclean-generic distclean-hdr \ - 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-man \ - install-pdf install-pdf-am install-pkgconfigDATA install-ps \ - install-ps-am install-strip installcheck installcheck-am \ - installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am uninstall-pkgconfigDATA - + dist-gzip dist-lzma dist-shar dist-tarZ dist-zip distcheck \ + distclean distclean-generic distclean-hdr 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-man install-pdf \ + install-pdf-am install-pkgconfigDATA install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am tags tags-recursive uninstall uninstall-am \ + uninstall-pkgconfigDATA # 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. diff -Nru libva-1.0.1/src/glx/Makefile.in libva-1.0.1-3+0.31.1/src/glx/Makefile.in --- libva-1.0.1/src/glx/Makefile.in 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/src/glx/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,578 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ - -# Copyright (C) 2009 Splitted-Desktop Systems. All Rights Reserved. -# -# 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, sub license, 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 (including the -# next paragraph) 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 NON-INFRINGEMENT. -# IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR -# ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -VPATH = @srcdir@ -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 = src/glx -DIST_COMMON = $(libva_glxinclude_HEADERS) $(noinst_HEADERS) \ - $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libva_glx_la_LIBADD = -am__objects_1 = va_glx.lo va_glx_impl.lo -am_libva_glx_la_OBJECTS = $(am__objects_1) -libva_glx_la_OBJECTS = $(am_libva_glx_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -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 = $(libva_glx_la_SOURCES) -DIST_SOURCES = $(libva_glx_la_SOURCES) -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__installdirs = "$(DESTDIR)$(libva_glxincludedir)" -HEADERS = $(libva_glxinclude_HEADERS) $(noinst_HEADERS) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DRM_CFLAGS = @DRM_CFLAGS@ -DRM_LIBS = @DRM_LIBS@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GEN4ASM_CFLAGS = @GEN4ASM_CFLAGS@ -GEN4ASM_LIBS = @GEN4ASM_LIBS@ -GL_DEPS_CFLAGS = @GL_DEPS_CFLAGS@ -GL_DEPS_LIBS = @GL_DEPS_LIBS@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVA_CFLAGS = @LIBVA_CFLAGS@ -LIBVA_DRIVERS_PATH = @LIBVA_DRIVERS_PATH@ -LIBVA_LIBS = @LIBVA_LIBS@ -LIBVA_LT_LDFLAGS = @LIBVA_LT_LDFLAGS@ -LIBVA_LT_VERSION = @LIBVA_LT_VERSION@ -LIBVA_MAJOR_VERSION = @LIBVA_MAJOR_VERSION@ -LIBVA_MICRO_VERSION = @LIBVA_MICRO_VERSION@ -LIBVA_MINOR_VERSION = @LIBVA_MINOR_VERSION@ -LIBVA_SDS_VERSION = @LIBVA_SDS_VERSION@ -LIBVA_VERSION = @LIBVA_VERSION@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -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@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -X11_CFLAGS = @X11_CFLAGS@ -X11_LIBS = @X11_LIBS@ -XEXT_CFLAGS = @XEXT_CFLAGS@ -XEXT_LIBS = @XEXT_LIBS@ -XFIXES_CFLAGS = @XFIXES_CFLAGS@ -XFIXES_LIBS = @XFIXES_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -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@ -libvabackendlib = @libvabackendlib@ -libvacorelib = @libvacorelib@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -pkgconfigdir = @pkgconfigdir@ -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@ -AM_CFLAGS = -DLINUX -DIN_LIBVA -I$(top_srcdir)/src -I$(top_srcdir)/src/x11 -source_c = \ - va_glx.c \ - va_glx_impl.c - -source_h = \ - va_glx.h \ - va_backend_glx.h - -source_h_priv = \ - va_glx_impl.h \ - va_glx_private.h - -noinst_LTLIBRARIES = libva_glx.la -libva_glxincludedir = ${includedir}/va -libva_glxinclude_HEADERS = $(source_h) -libva_glx_la_SOURCES = $(source_c) -noinst_HEADERS = $(source_h_priv) -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/glx/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/glx/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_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 -libva_glx.la: $(libva_glx_la_OBJECTS) $(libva_glx_la_DEPENDENCIES) - $(LINK) $(libva_glx_la_OBJECTS) $(libva_glx_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/va_glx.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/va_glx_impl.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 -install-libva_glxincludeHEADERS: $(libva_glxinclude_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(libva_glxincludedir)" || $(MKDIR_P) "$(DESTDIR)$(libva_glxincludedir)" - @list='$(libva_glxinclude_HEADERS)'; test -n "$(libva_glxincludedir)" || list=; \ - 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)$(libva_glxincludedir)'"; \ - $(INSTALL_HEADER) $$files "$(DESTDIR)$(libva_glxincludedir)" || exit $$?; \ - done - -uninstall-libva_glxincludeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(libva_glxinclude_HEADERS)'; test -n "$(libva_glxincludedir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(libva_glxincludedir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(libva_glxincludedir)" && rm -f $$files - -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) - @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 -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) $(HEADERS) -installdirs: - for dir in "$(DESTDIR)$(libva_glxincludedir)"; 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: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -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) - -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-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: install-libva_glxincludeHEADERS - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -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 -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-libva_glxincludeHEADERS - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir 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-libva_glxincludeHEADERS install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-libva_glxincludeHEADERS - - -# 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: diff -Nru libva-1.0.1/src/Makefile.am libva-1.0.1-3+0.31.1/src/Makefile.am --- libva-1.0.1/src/Makefile.am 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/src/Makefile.am 1970-01-01 00:00:00.000000000 +0000 @@ -1,55 +0,0 @@ -# Copyright (c) 2007 Intel Corporation. All Rights Reserved. -# -# 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, sub license, 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 (including the -# next paragraph) 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 NON-INFRINGEMENT. -# IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR -# ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -INCLUDES = \ - $(LIBVA_CFLAGS) -I$(top_srcdir)/src/x11 \ - -DIN_LIBVA \ - -DVA_DRIVERS_PATH="\"$(LIBVA_DRIVERS_PATH)\"" - -LDADD = \ - $(LIBVA_LT_LDFLAGS) - -lib_LTLIBRARIES = \ - libva.la \ - libva-x11.la - -libva_ladir = $(libdir) -libva_la_LDFLAGS = $(LDADD) -no-undefined -libva_la_LIBADD = $(LIBVA_LIBS) -ldl - -libva_x11_la_SOURCES = -libva_x11_la_LIBADD = $(libvacorelib) x11/libva_x11.la $(LIBVA_LIBS) $(X11_LIBS) $(XEXT_LIBS) $(DRM_LIBS) $(XFIXES_LIBS) -libva_x11_la_LDFLAGS = $(LDADD) -libva_x11_la_DEPENDENCIES = $(libvacorelib) x11/libva_x11.la - -SUBDIRS = x11 - -libva_la_SOURCES = va.c - -libvaincludedir = ${includedir}/va -libvainclude_HEADERS = va.h va_backend.h va_version.h - -DISTCLEANFILES = \ - va_version.h - -EXTRA_DIST = \ - va_version.h.in diff -Nru libva-1.0.1/src/Makefile.in libva-1.0.1-3+0.31.1/src/Makefile.in --- libva-1.0.1/src/Makefile.in 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/src/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,808 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ - -# Copyright (c) 2007 Intel Corporation. All Rights Reserved. -# -# 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, sub license, 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 (including the -# next paragraph) 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 NON-INFRINGEMENT. -# IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR -# ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -VPATH = @srcdir@ -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 = src -DIST_COMMON = $(libvainclude_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(srcdir)/va_version.h.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = va_version.h -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__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libvaincludedir)" -LTLIBRARIES = $(lib_LTLIBRARIES) -am_libva_compat_la_OBJECTS = va_compat_lib.lo -libva_compat_la_OBJECTS = $(am_libva_compat_la_OBJECTS) -am__DEPENDENCIES_1 = -am_libva_glx_la_OBJECTS = -libva_glx_la_OBJECTS = $(am_libva_glx_la_OBJECTS) -libva_glx_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libva_glx_la_LDFLAGS) $(LDFLAGS) -o $@ -@USE_GLX_TRUE@am_libva_glx_la_rpath = -rpath $(libdir) -am_libva_x11_la_OBJECTS = -libva_x11_la_OBJECTS = $(am_libva_x11_la_OBJECTS) -libva_x11_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libva_x11_la_LDFLAGS) $(LDFLAGS) -o $@ -libva_la_DEPENDENCIES = $(am__DEPENDENCIES_1) -am_libva_la_OBJECTS = va.lo va_compat.lo -libva_la_OBJECTS = $(am_libva_la_OBJECTS) -libva_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(libva_la_LDFLAGS) \ - $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -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 = $(libva_compat_la_SOURCES) $(libva_glx_la_SOURCES) \ - $(libva_x11_la_SOURCES) $(libva_la_SOURCES) -DIST_SOURCES = $(libva_compat_la_SOURCES) $(libva_glx_la_SOURCES) \ - $(libva_x11_la_SOURCES) $(libva_la_SOURCES) -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive -HEADERS = $(libvainclude_HEADERS) -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ - distdir -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -am__relativize = \ - dir0=`pwd`; \ - sed_first='s,^\([^/]*\)/.*$$,\1,'; \ - sed_rest='s,^[^/]*/*,,'; \ - sed_last='s,^.*/\([^/]*\)$$,\1,'; \ - sed_butlast='s,/*[^/]*$$,,'; \ - while test -n "$$dir1"; do \ - first=`echo "$$dir1" | sed -e "$$sed_first"`; \ - if test "$$first" != "."; then \ - if test "$$first" = ".."; then \ - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ - else \ - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ - if test "$$first2" = "$$first"; then \ - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ - else \ - dir2="../$$dir2"; \ - fi; \ - dir0="$$dir0"/"$$first"; \ - fi; \ - fi; \ - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ - done; \ - reldir="$$dir2" -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DRM_CFLAGS = @DRM_CFLAGS@ -DRM_LIBS = @DRM_LIBS@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GEN4ASM_CFLAGS = @GEN4ASM_CFLAGS@ -GEN4ASM_LIBS = @GEN4ASM_LIBS@ -GL_DEPS_CFLAGS = @GL_DEPS_CFLAGS@ -GL_DEPS_LIBS = @GL_DEPS_LIBS@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVA_CFLAGS = @LIBVA_CFLAGS@ -LIBVA_DRIVERS_PATH = @LIBVA_DRIVERS_PATH@ -LIBVA_LIBS = @LIBVA_LIBS@ -LIBVA_LT_LDFLAGS = @LIBVA_LT_LDFLAGS@ -LIBVA_LT_VERSION = @LIBVA_LT_VERSION@ -LIBVA_MAJOR_VERSION = @LIBVA_MAJOR_VERSION@ -LIBVA_MICRO_VERSION = @LIBVA_MICRO_VERSION@ -LIBVA_MINOR_VERSION = @LIBVA_MINOR_VERSION@ -LIBVA_SDS_VERSION = @LIBVA_SDS_VERSION@ -LIBVA_VERSION = @LIBVA_VERSION@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -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@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -X11_CFLAGS = @X11_CFLAGS@ -X11_LIBS = @X11_LIBS@ -XEXT_CFLAGS = @XEXT_CFLAGS@ -XEXT_LIBS = @XEXT_LIBS@ -XFIXES_CFLAGS = @XFIXES_CFLAGS@ -XFIXES_LIBS = @XFIXES_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -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@ -libvabackendlib = @libvabackendlib@ -libvacorelib = @libvacorelib@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -pkgconfigdir = @pkgconfigdir@ -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@ -INCLUDES = \ - $(LIBVA_CFLAGS) -I$(top_srcdir)/src/x11 \ - -DIN_LIBVA \ - -DVA_DRIVERS_PATH="\"$(LIBVA_DRIVERS_PATH)\"" - -LDADD = \ - $(LIBVA_LT_LDFLAGS) - -libva_x11_backend = libva-x11.la -libva_x11_backenddir = x11 -@USE_GLX_FALSE@libva_glx_backend = -@USE_GLX_TRUE@libva_glx_backend = libva-glx.la -@USE_GLX_FALSE@libva_glx_backenddir = -@USE_GLX_TRUE@libva_glx_backenddir = glx -lib_LTLIBRARIES = libva.la $(libva_x11_backend) $(libva_glx_backend) \ - libva-compat.la -libva_ladir = $(libdir) -libva_la_LDFLAGS = $(LDADD) -no-undefined -libva_la_LIBADD = $(LIBVA_LIBS) -ldl -libva_x11_la_SOURCES = -libva_x11_la_LIBADD = $(libvacorelib) x11/libva_x11.la $(LIBVA_LIBS) $(X11_LIBS) $(XEXT_LIBS) $(XFIXES_LIBS) -ldl -libva_x11_la_LDFLAGS = $(LDADD) -libva_x11_la_DEPENDENCIES = $(libvacorelib) x11/libva_x11.la -libva_glx_la_SOURCES = -libva_glx_la_LIBADD = $(libvacorelib) glx/libva_glx.la libva-x11.la $(GL_DEPS_LIBS) -ldl -libva_glx_la_LDFLAGS = $(LDADD) -libva_glx_la_DEPENDENCIES = $(libvacorelib) glx/libva_glx.la libva-x11.la -SUBDIRS = $(libva_x11_backenddir) $(libva_glx_backenddir) -DIST_SUBDIRS = x11 glx -libva_la_SOURCES = va.c va_compat.c -libvaincludedir = ${includedir}/va -libvainclude_HEADERS = va.h va_backend.h va_version.h -DISTCLEANFILES = \ - va_version.h - -EXTRA_DIST = \ - va_version.h.in \ - va_compat.h \ - va_compat_template.h - -libva_compat_la_SOURCES = va_compat_lib.c -libva_compat_la_LIBADD = libva-x11.la -ldl -libva_compat_la_DEPENDENCIES = libva-x11.la -all: all-recursive - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -va_version.h: $(top_builddir)/config.status $(srcdir)/va_version.h.in - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -install-libLTLIBRARIES: $(lib_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" - @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 " $(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 -libva-compat.la: $(libva_compat_la_OBJECTS) $(libva_compat_la_DEPENDENCIES) - $(LINK) -rpath $(libdir) $(libva_compat_la_OBJECTS) $(libva_compat_la_LIBADD) $(LIBS) -libva-glx.la: $(libva_glx_la_OBJECTS) $(libva_glx_la_DEPENDENCIES) - $(libva_glx_la_LINK) $(am_libva_glx_la_rpath) $(libva_glx_la_OBJECTS) $(libva_glx_la_LIBADD) $(LIBS) -libva-x11.la: $(libva_x11_la_OBJECTS) $(libva_x11_la_DEPENDENCIES) - $(libva_x11_la_LINK) -rpath $(libdir) $(libva_x11_la_OBJECTS) $(libva_x11_la_LIBADD) $(LIBS) -libva.la: $(libva_la_OBJECTS) $(libva_la_DEPENDENCIES) - $(libva_la_LINK) -rpath $(libdir) $(libva_la_OBJECTS) $(libva_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/va.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/va_compat.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/va_compat_lib.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 -install-libvaincludeHEADERS: $(libvainclude_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(libvaincludedir)" || $(MKDIR_P) "$(DESTDIR)$(libvaincludedir)" - @list='$(libvainclude_HEADERS)'; test -n "$(libvaincludedir)" || list=; \ - 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)$(libvaincludedir)'"; \ - $(INSTALL_HEADER) $$files "$(DESTDIR)$(libvaincludedir)" || exit $$?; \ - done - -uninstall-libvaincludeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(libvainclude_HEADERS)'; test -n "$(libvaincludedir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(libvaincludedir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(libvaincludedir)" && rm -f $$files - -# This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -$(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -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: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - 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: ctags-recursive $(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) - @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 - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ - $(am__relativize); \ - new_distdir=$$reldir; \ - dir1=$$subdir; dir2="$(top_distdir)"; \ - $(am__relativize); \ - new_top_distdir=$$reldir; \ - echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ - echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ - ($(am__cd) $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$new_top_distdir" \ - distdir="$$new_distdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - am__skip_mode_fix=: \ - distdir) \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-recursive -all-am: Makefile $(LTLIBRARIES) $(HEADERS) -installdirs: installdirs-recursive -installdirs-am: - for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libvaincludedir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -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-recursive - -clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ - mostlyclean-am - -distclean: distclean-recursive - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -html-am: - -info: info-recursive - -info-am: - -install-data-am: install-libvaincludeHEADERS - -install-dvi: install-dvi-recursive - -install-dvi-am: - -install-exec-am: install-libLTLIBRARIES - -install-html: install-html-recursive - -install-html-am: - -install-info: install-info-recursive - -install-info-am: - -install-man: - -install-pdf: install-pdf-recursive - -install-pdf-am: - -install-ps: install-ps-recursive - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: uninstall-libLTLIBRARIES uninstall-libvaincludeHEADERS - -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ - install-am install-strip tags-recursive - -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-am clean clean-generic \ - clean-libLTLIBRARIES clean-libtool ctags ctags-recursive \ - distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir 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-libvaincludeHEADERS install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs installdirs-am \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ - uninstall-libLTLIBRARIES uninstall-libvaincludeHEADERS - - -va_compat.c: va_compat_template.h - -# 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: diff -Nru libva-1.0.1/src/va_backend.h libva-1.0.1-3+0.31.1/src/va_backend.h --- libva-1.0.1/src/va_backend.h 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/src/va_backend.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,423 +0,0 @@ -/* - * Copyright (c) 2007 Intel Corporation. All Rights Reserved. - * - * 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, sub license, 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 (including the - * next paragraph) 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 NON-INFRINGEMENT. - * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * Video Decode Acceleration -Backend API - */ - -#ifndef _VA_BACKEND_H_ -#define _VA_BACKEND_H_ - -#ifdef IN_LIBVA -#include "va.h" -#include "x11/va_x11.h" -#else -#include -#include -#endif - -#include -#include - - -typedef struct VADriverContext *VADriverContextP; -typedef struct VADisplayContext *VADisplayContextP; - -struct VADriverVTable -{ - VAStatus (*vaTerminate) ( VADriverContextP ctx ); - - VAStatus (*vaQueryConfigProfiles) ( - VADriverContextP ctx, - VAProfile *profile_list, /* out */ - int *num_profiles /* out */ - ); - - VAStatus (*vaQueryConfigEntrypoints) ( - VADriverContextP ctx, - VAProfile profile, - VAEntrypoint *entrypoint_list, /* out */ - int *num_entrypoints /* out */ - ); - - VAStatus (*vaGetConfigAttributes) ( - VADriverContextP ctx, - VAProfile profile, - VAEntrypoint entrypoint, - VAConfigAttrib *attrib_list, /* in/out */ - int num_attribs - ); - - VAStatus (*vaCreateConfig) ( - VADriverContextP ctx, - VAProfile profile, - VAEntrypoint entrypoint, - VAConfigAttrib *attrib_list, - int num_attribs, - VAConfigID *config_id /* out */ - ); - - VAStatus (*vaDestroyConfig) ( - VADriverContextP ctx, - VAConfigID config_id - ); - - VAStatus (*vaQueryConfigAttributes) ( - VADriverContextP ctx, - VAConfigID config_id, - VAProfile *profile, /* out */ - VAEntrypoint *entrypoint, /* out */ - VAConfigAttrib *attrib_list, /* out */ - int *num_attribs /* out */ - ); - - VAStatus (*vaCreateSurfaces) ( - VADriverContextP ctx, - int width, - int height, - int format, - int num_surfaces, - VASurfaceID *surfaces /* out */ - ); - - VAStatus (*vaDestroySurfaces) ( - VADriverContextP ctx, - VASurfaceID *surface_list, - int num_surfaces - ); - - VAStatus (*vaCreateContext) ( - VADriverContextP ctx, - VAConfigID config_id, - int picture_width, - int picture_height, - int flag, - VASurfaceID *render_targets, - int num_render_targets, - VAContextID *context /* out */ - ); - - VAStatus (*vaDestroyContext) ( - VADriverContextP ctx, - VAContextID context - ); - - VAStatus (*vaCreateBuffer) ( - VADriverContextP ctx, - VAContextID context, /* in */ - VABufferType type, /* in */ - unsigned int size, /* in */ - unsigned int num_elements, /* in */ - void *data, /* in */ - VABufferID *buf_id /* out */ - ); - - VAStatus (*vaBufferSetNumElements) ( - VADriverContextP ctx, - VABufferID buf_id, /* in */ - unsigned int num_elements /* in */ - ); - - VAStatus (*vaMapBuffer) ( - VADriverContextP ctx, - VABufferID buf_id, /* in */ - void **pbuf /* out */ - ); - - VAStatus (*vaUnmapBuffer) ( - VADriverContextP ctx, - VABufferID buf_id /* in */ - ); - - VAStatus (*vaDestroyBuffer) ( - VADriverContextP ctx, - VABufferID buffer_id - ); - - VAStatus (*vaBeginPicture) ( - VADriverContextP ctx, - VAContextID context, - VASurfaceID render_target - ); - - VAStatus (*vaRenderPicture) ( - VADriverContextP ctx, - VAContextID context, - VABufferID *buffers, - int num_buffers - ); - - VAStatus (*vaEndPicture) ( - VADriverContextP ctx, - VAContextID context - ); - - VAStatus (*vaSyncSurface) ( - VADriverContextP ctx, - VASurfaceID render_target - ); - - VAStatus (*vaQuerySurfaceStatus) ( - VADriverContextP ctx, - VASurfaceID render_target, - VASurfaceStatus *status /* out */ - ); - - VAStatus (*vaPutSurface) ( - VADriverContextP ctx, - VASurfaceID surface, - Drawable draw, /* X Drawable */ - short srcx, - short srcy, - unsigned short srcw, - unsigned short srch, - short destx, - short desty, - unsigned short destw, - unsigned short desth, - VARectangle *cliprects, /* client supplied clip list */ - unsigned int number_cliprects, /* number of clip rects in the clip list */ - unsigned int flags /* de-interlacing flags */ - ); - - VAStatus (*vaQueryImageFormats) ( - VADriverContextP ctx, - VAImageFormat *format_list, /* out */ - int *num_formats /* out */ - ); - - VAStatus (*vaCreateImage) ( - VADriverContextP ctx, - VAImageFormat *format, - int width, - int height, - VAImage *image /* out */ - ); - - VAStatus (*vaDeriveImage) ( - VADriverContextP ctx, - VASurfaceID surface, - VAImage *image /* out */ - ); - - VAStatus (*vaDestroyImage) ( - VADriverContextP ctx, - VAImageID image - ); - - VAStatus (*vaSetImagePalette) ( - VADriverContextP ctx, - VAImageID image, - /* - * pointer to an array holding the palette data. The size of the array is - * num_palette_entries * entry_bytes in size. The order of the components - * in the palette is described by the component_order in VAImage struct - */ - unsigned char *palette - ); - - VAStatus (*vaGetImage) ( - VADriverContextP ctx, - VASurfaceID surface, - int x, /* coordinates of the upper left source pixel */ - int y, - unsigned int width, /* width and height of the region */ - unsigned int height, - VAImageID image - ); - - VAStatus (*vaPutImage) ( - VADriverContextP ctx, - VASurfaceID surface, - VAImageID image, - int src_x, - int src_y, - unsigned int src_width, - unsigned int src_height, - int dest_x, - int dest_y, - unsigned int dest_width, - unsigned int dest_height - ); - - VAStatus (*vaQuerySubpictureFormats) ( - VADriverContextP ctx, - VAImageFormat *format_list, /* out */ - unsigned int *flags, /* out */ - unsigned int *num_formats /* out */ - ); - - VAStatus (*vaCreateSubpicture) ( - VADriverContextP ctx, - VAImageID image, - VASubpictureID *subpicture /* out */ - ); - - VAStatus (*vaDestroySubpicture) ( - VADriverContextP ctx, - VASubpictureID subpicture - ); - - VAStatus (*vaSetSubpictureImage) ( - VADriverContextP ctx, - VASubpictureID subpicture, - VAImageID image - ); - - VAStatus (*vaSetSubpictureChromakey) ( - VADriverContextP ctx, - VASubpictureID subpicture, - unsigned int chromakey_min, - unsigned int chromakey_max, - unsigned int chromakey_mask - ); - - VAStatus (*vaSetSubpictureGlobalAlpha) ( - VADriverContextP ctx, - VASubpictureID subpicture, - float global_alpha - ); - - VAStatus (*vaAssociateSubpicture) ( - VADriverContextP ctx, - VASubpictureID subpicture, - VASurfaceID *target_surfaces, - int num_surfaces, - short src_x, /* upper left offset in subpicture */ - short src_y, - unsigned short src_width, - unsigned short src_height, - short dest_x, /* upper left offset in surface */ - short dest_y, - unsigned short dest_width, - unsigned short dest_height, - /* - * whether to enable chroma-keying or global-alpha - * see VA_SUBPICTURE_XXX values - */ - unsigned int flags - ); - - VAStatus (*vaDeassociateSubpicture) ( - VADriverContextP ctx, - VASubpictureID subpicture, - VASurfaceID *target_surfaces, - int num_surfaces - ); - - VAStatus (*vaQueryDisplayAttributes) ( - VADriverContextP ctx, - VADisplayAttribute *attr_list, /* out */ - int *num_attributes /* out */ - ); - - VAStatus (*vaGetDisplayAttributes) ( - VADriverContextP ctx, - VADisplayAttribute *attr_list, /* in/out */ - int num_attributes - ); - - VAStatus (*vaSetDisplayAttributes) ( - VADriverContextP ctx, - VADisplayAttribute *attr_list, - int num_attributes - ); - - /* device specific */ - VAStatus (*vaCreateSurfaceFromCIFrame) ( - VADriverContextP ctx, - unsigned long frame_id, - VASurfaceID *surface /* out */ - ); - - - VAStatus (*vaCreateSurfaceFromV4L2Buf) ( - VADriverContextP ctx, - int v4l2_fd, /* file descriptor of V4L2 device */ - struct v4l2_format *v4l2_fmt, /* format of V4L2 */ - struct v4l2_buffer *v4l2_buf, /* V4L2 buffer */ - VASurfaceID *surface /* out */ - ); - - VAStatus (*vaCopySurfaceToBuffer) ( - VADriverContextP ctx, - VASurfaceID surface, - unsigned int *fourcc, /* out for follow argument */ - unsigned int *luma_stride, - unsigned int *chroma_u_stride, - unsigned int *chroma_v_stride, - unsigned int *luma_offset, - unsigned int *chroma_u_offset, - unsigned int *chroma_v_offset, - void **buffer - ); -}; - -struct VADriverContext -{ - void *pDriverData; - struct VADriverVTable vtable; - - Display *x11_dpy; - int x11_screen; - int version_major; - int version_minor; - int max_profiles; - int max_entrypoints; - int max_attributes; - int max_image_formats; - int max_subpic_formats; - int max_display_attributes; - const char *str_vendor; - - void *handle; /* dlopen handle */ - - void *dri_state; -}; - -struct VADisplayContext -{ - VADisplayContextP pNext; - VADriverContextP pDriverContext; - - int (*vaIsValid) ( - VADisplayContextP ctx - ); - - void (*vaDestroy) ( - VADisplayContextP ctx - ); - - VAStatus (*vaGetDriverName) ( - VADisplayContextP ctx, - char **driver_name - ); -}; - -typedef VAStatus (*VADriverInit) ( - VADriverContextP driver_context -); - - -#endif /* _VA_BACKEND_H_ */ diff -Nru libva-1.0.1/src/va.c libva-1.0.1-3+0.31.1/src/va.c --- libva-1.0.1/src/va.c 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/src/va.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,1266 +0,0 @@ -/* - * Copyright (c) 2007 Intel Corporation. All Rights Reserved. - * - * 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, sub license, 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 (including the - * next paragraph) 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 NON-INFRINGEMENT. - * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#define _GNU_SOURCE 1 -#include "va.h" -#include "va_backend.h" - -#include -#include -#include -#include -#include -#include - -#include -#include "va_dri.h" -#include "va_dri2.h" -#include "va_dricommon.h" - - -#define DRIVER_INIT_FUNC "__vaDriverInit_0_31" - -#define DRIVER_EXTENSION "_drv_video.so" - -#define CTX(dpy) (((VADisplayContextP)dpy)->pDriverContext) -#define CHECK_DISPLAY(dpy) if( !vaDisplayIsValid(dpy) ) { return VA_STATUS_ERROR_INVALID_DISPLAY; } - -#define ASSERT assert -#define CHECK_VTABLE(s, ctx, func) if (!va_checkVtable(ctx->vtable.va##func, #func)) s = VA_STATUS_ERROR_UNKNOWN; -#define CHECK_MAXIMUM(s, ctx, var) if (!va_checkMaximum(ctx->max_##var, #var)) s = VA_STATUS_ERROR_UNKNOWN; -#define CHECK_STRING(s, ctx, var) if (!va_checkString(ctx->str_##var, #var)) s = VA_STATUS_ERROR_UNKNOWN; - -#define TRACE(func) if (va_debug_trace) va_infoMessage("[TR] %s\n", #func); - -static int va_debug_trace = 0; - -static int vaDisplayIsValid(VADisplay dpy) -{ - VADisplayContextP pDisplayContext = (VADisplayContextP)dpy; - return pDisplayContext && pDisplayContext->vaIsValid(pDisplayContext); -} - -static void va_errorMessage(const char *msg, ...) -{ - va_list args; - - fprintf(stderr, "libva error: "); - va_start(args, msg); - vfprintf(stderr, msg, args); - va_end(args); -} - -static void va_infoMessage(const char *msg, ...) -{ - va_list args; - - fprintf(stderr, "libva: "); - va_start(args, msg); - vfprintf(stderr, msg, args); - va_end(args); -} - -static Bool va_checkVtable(void *ptr, char *function) -{ - if (!ptr) - { - va_errorMessage("No valid vtable entry for va%s\n", function); - return False; - } - return True; -} - -static Bool va_checkMaximum(int value, char *variable) -{ - if (!value) - { - va_errorMessage("Failed to define max_%s in init\n", variable); - return False; - } - return True; -} - -static Bool va_checkString(const char* value, char *variable) -{ - if (!value) - { - va_errorMessage("Failed to define str_%s in init\n", variable); - return False; - } - return True; -} - -static VAStatus va_getDriverName(VADisplay dpy, char **driver_name) -{ - VADisplayContextP pDisplayContext = (VADisplayContextP)dpy; - - return pDisplayContext->vaGetDriverName(pDisplayContext, driver_name); -} - -static VAStatus va_openDriver(VADisplay dpy, char *driver_name) -{ - VADriverContextP ctx = CTX(dpy); - VAStatus vaStatus = VA_STATUS_ERROR_UNKNOWN; - char *search_path = NULL; - char *saveptr; - char *driver_dir; - - if (geteuid() == getuid()) - { - /* don't allow setuid apps to use LIBVA_DRIVERS_PATH */ - search_path = getenv("LIBVA_DRIVERS_PATH"); - if (!search_path) - { - search_path = getenv("LIBGL_DRIVERS_PATH"); - } - } - if (!search_path) - { - search_path = VA_DRIVERS_PATH; - } - - search_path = strdup((const char *)search_path); - driver_dir = strtok_r((const char *)search_path, ":", &saveptr); - while(driver_dir) - { - void *handle = NULL; - char *driver_path = (char *) malloc( strlen(driver_dir) + - strlen(driver_name) + - strlen(DRIVER_EXTENSION) + 2 ); - strncpy( driver_path, driver_dir, strlen(driver_dir) + 1); - strncat( driver_path, "/", strlen("/") ); - strncat( driver_path, driver_name, strlen(driver_name) ); - strncat( driver_path, DRIVER_EXTENSION, strlen(DRIVER_EXTENSION) ); - - va_infoMessage("Trying to open %s\n", driver_path); - - handle = dlopen( driver_path, RTLD_NOW | RTLD_GLOBAL | RTLD_NODELETE ); - if (!handle) - { - /* Don't give errors for non-existing files */ - if (0 == access( driver_path, F_OK)) - { - va_errorMessage("dlopen of %s failed: %s\n", driver_path, dlerror()); - } - } - else - { - VADriverInit init_func; - init_func = (VADriverInit) dlsym(handle, DRIVER_INIT_FUNC); - if (!init_func) - { - va_errorMessage("%s has no function %s\n", driver_path, DRIVER_INIT_FUNC); - dlclose(handle); - } - else - { - vaStatus = (*init_func)(ctx); - - if (VA_STATUS_SUCCESS == vaStatus) - { - CHECK_MAXIMUM(vaStatus, ctx, profiles); - CHECK_MAXIMUM(vaStatus, ctx, entrypoints); - CHECK_MAXIMUM(vaStatus, ctx, attributes); - CHECK_MAXIMUM(vaStatus, ctx, image_formats); - CHECK_MAXIMUM(vaStatus, ctx, subpic_formats); - CHECK_MAXIMUM(vaStatus, ctx, display_attributes); - CHECK_STRING(vaStatus, ctx, vendor); - CHECK_VTABLE(vaStatus, ctx, Terminate); - CHECK_VTABLE(vaStatus, ctx, QueryConfigProfiles); - CHECK_VTABLE(vaStatus, ctx, QueryConfigEntrypoints); - CHECK_VTABLE(vaStatus, ctx, QueryConfigAttributes); - CHECK_VTABLE(vaStatus, ctx, CreateConfig); - CHECK_VTABLE(vaStatus, ctx, DestroyConfig); - CHECK_VTABLE(vaStatus, ctx, GetConfigAttributes); - CHECK_VTABLE(vaStatus, ctx, CreateSurfaces); - CHECK_VTABLE(vaStatus, ctx, DestroySurfaces); - CHECK_VTABLE(vaStatus, ctx, CreateContext); - CHECK_VTABLE(vaStatus, ctx, DestroyContext); - CHECK_VTABLE(vaStatus, ctx, CreateBuffer); - CHECK_VTABLE(vaStatus, ctx, BufferSetNumElements); - CHECK_VTABLE(vaStatus, ctx, MapBuffer); - CHECK_VTABLE(vaStatus, ctx, UnmapBuffer); - CHECK_VTABLE(vaStatus, ctx, DestroyBuffer); - CHECK_VTABLE(vaStatus, ctx, BeginPicture); - CHECK_VTABLE(vaStatus, ctx, RenderPicture); - CHECK_VTABLE(vaStatus, ctx, EndPicture); - CHECK_VTABLE(vaStatus, ctx, SyncSurface); - CHECK_VTABLE(vaStatus, ctx, QuerySurfaceStatus); - CHECK_VTABLE(vaStatus, ctx, PutSurface); - CHECK_VTABLE(vaStatus, ctx, QueryImageFormats); - CHECK_VTABLE(vaStatus, ctx, CreateImage); - CHECK_VTABLE(vaStatus, ctx, DeriveImage); - CHECK_VTABLE(vaStatus, ctx, DestroyImage); - CHECK_VTABLE(vaStatus, ctx, SetImagePalette); - CHECK_VTABLE(vaStatus, ctx, GetImage); - CHECK_VTABLE(vaStatus, ctx, PutImage); - CHECK_VTABLE(vaStatus, ctx, QuerySubpictureFormats); - CHECK_VTABLE(vaStatus, ctx, CreateSubpicture); - CHECK_VTABLE(vaStatus, ctx, DestroySubpicture); - CHECK_VTABLE(vaStatus, ctx, SetSubpictureImage); - CHECK_VTABLE(vaStatus, ctx, SetSubpictureChromakey); - CHECK_VTABLE(vaStatus, ctx, SetSubpictureGlobalAlpha); - CHECK_VTABLE(vaStatus, ctx, AssociateSubpicture); - CHECK_VTABLE(vaStatus, ctx, DeassociateSubpicture); - CHECK_VTABLE(vaStatus, ctx, QueryDisplayAttributes); - CHECK_VTABLE(vaStatus, ctx, GetDisplayAttributes); - CHECK_VTABLE(vaStatus, ctx, SetDisplayAttributes); - } - if (VA_STATUS_SUCCESS != vaStatus) - { - va_errorMessage("%s init failed\n", driver_path); - dlclose(handle); - } - if (VA_STATUS_SUCCESS == vaStatus) - { - ctx->handle = handle; - } - free(driver_path); - break; - } - } - free(driver_path); - - driver_dir = strtok_r(NULL, ":", &saveptr); - } - - free(search_path); - - return vaStatus; -} - -VAPrivFunc vaGetLibFunc(VADisplay dpy, const char *func) -{ - VADriverContextP ctx; - if( !vaDisplayIsValid(dpy) ) - return NULL; - ctx = CTX(dpy); - - if (NULL == ctx->handle) - return NULL; - - return (VAPrivFunc) dlsym(ctx->handle, func); -} - - -/* - * Returns a short english description of error_status - */ -const char *vaErrorStr(VAStatus error_status) -{ - switch(error_status) - { - case VA_STATUS_SUCCESS: - return "success (no error)"; - case VA_STATUS_ERROR_OPERATION_FAILED: - return "operation failed"; - case VA_STATUS_ERROR_ALLOCATION_FAILED: - return "resource allocation failed"; - case VA_STATUS_ERROR_INVALID_DISPLAY: - return "invalid VADisplay"; - case VA_STATUS_ERROR_INVALID_CONFIG: - return "invalid VAConfigID"; - case VA_STATUS_ERROR_INVALID_CONTEXT: - return "invalid VAContextID"; - case VA_STATUS_ERROR_INVALID_SURFACE: - return "invalid VASurfaceID"; - case VA_STATUS_ERROR_INVALID_BUFFER: - return "invalid VABufferID"; - case VA_STATUS_ERROR_INVALID_IMAGE: - return "invalid VAImageID"; - case VA_STATUS_ERROR_INVALID_SUBPICTURE: - return "invalid VASubpictureID"; - case VA_STATUS_ERROR_ATTR_NOT_SUPPORTED: - return "attribute not supported"; - case VA_STATUS_ERROR_MAX_NUM_EXCEEDED: - return "list argument exceeds maximum number"; - case VA_STATUS_ERROR_UNSUPPORTED_PROFILE: - return "the requested VAProfile is not supported"; - case VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT: - return "the requested VAEntryPoint is not supported"; - case VA_STATUS_ERROR_UNSUPPORTED_RT_FORMAT: - return "the requested RT Format is not supported"; - case VA_STATUS_ERROR_UNSUPPORTED_BUFFERTYPE: - return "the requested VABufferType is not supported"; - case VA_STATUS_ERROR_SURFACE_BUSY: - return "surface is in use"; - case VA_STATUS_ERROR_FLAG_NOT_SUPPORTED: - return "flag not supported"; - case VA_STATUS_ERROR_INVALID_PARAMETER: - return "invalid parameter"; - case VA_STATUS_ERROR_RESOLUTION_NOT_SUPPORTED: - return "resolution not supported"; - case VA_STATUS_ERROR_UNIMPLEMENTED: - return "the requested function is not implemented"; - case VA_STATUS_ERROR_SURFACE_IN_DISPLAYING: - return "surface is in displaying (may by overlay)" ; - case VA_STATUS_ERROR_UNKNOWN: - return "unknown libva error"; - } - return "unknown libva error / description missing"; -} - -VAStatus vaInitialize ( - VADisplay dpy, - int *major_version, /* out */ - int *minor_version /* out */ -) -{ - char *driver_name = NULL; - VAStatus vaStatus; - - CHECK_DISPLAY(dpy); - - va_debug_trace = (getenv("LIBVA_DEBUG_TRACE") != NULL); - - va_infoMessage("libva version %s\n", VA_VERSION_S); - - vaStatus = va_getDriverName(dpy, &driver_name); - va_infoMessage("va_getDriverName() returns %d\n", vaStatus); - - if (VA_STATUS_SUCCESS == vaStatus) - { - vaStatus = va_openDriver(dpy, driver_name); - va_infoMessage("va_openDriver() returns %d\n", vaStatus); - - *major_version = VA_MAJOR_VERSION; - *minor_version = VA_MINOR_VERSION; - } - - if (driver_name) - free(driver_name); - return vaStatus; -} - - -/* - * After this call, all library internal resources will be cleaned up - */ -VAStatus vaTerminate ( - VADisplay dpy -) -{ - VAStatus vaStatus = VA_STATUS_SUCCESS; - VADisplayContextP pDisplayContext = (VADisplayContextP)dpy; - VADriverContextP old_ctx; - - CHECK_DISPLAY(dpy); - old_ctx = CTX(dpy); - - if (old_ctx->handle) - { - vaStatus = old_ctx->vtable.vaTerminate(old_ctx); - dlclose(old_ctx->handle); - old_ctx->handle = NULL; - } - - if (VA_STATUS_SUCCESS == vaStatus) - pDisplayContext->vaDestroy(pDisplayContext); - return vaStatus; -} - -/* - * vaQueryVendorString returns a pointer to a zero-terminated string - * describing some aspects of the VA implemenation on a specific - * hardware accelerator. The format of the returned string is: - * --- - * e.g. for the Intel GMA500 implementation, an example would be: - * "IntelGMA500-1.0-0.2-patch3 - */ -const char *vaQueryVendorString ( - VADisplay dpy -) -{ - if( !vaDisplayIsValid(dpy) ) - return NULL; - - return CTX(dpy)->str_vendor; -} - - -/* Get maximum number of profiles supported by the implementation */ -int vaMaxNumProfiles ( - VADisplay dpy -) -{ - if( !vaDisplayIsValid(dpy) ) - return 0; - - return CTX(dpy)->max_profiles; -} - -/* Get maximum number of entrypoints supported by the implementation */ -int vaMaxNumEntrypoints ( - VADisplay dpy -) -{ - if( !vaDisplayIsValid(dpy) ) - return 0; - - return CTX(dpy)->max_entrypoints; -} - - -/* Get maximum number of attributs supported by the implementation */ -int vaMaxNumConfigAttributes ( - VADisplay dpy -) -{ - if( !vaDisplayIsValid(dpy) ) - return 0; - - return CTX(dpy)->max_attributes; -} - -VAStatus vaQueryConfigEntrypoints ( - VADisplay dpy, - VAProfile profile, - VAEntrypoint *entrypoints, /* out */ - int *num_entrypoints /* out */ -) -{ - VADriverContextP ctx; - CHECK_DISPLAY(dpy); - ctx = CTX(dpy); - - TRACE(vaQueryConfigEntrypoints); - return ctx->vtable.vaQueryConfigEntrypoints ( ctx, profile, entrypoints, num_entrypoints); -} - -VAStatus vaGetConfigAttributes ( - VADisplay dpy, - VAProfile profile, - VAEntrypoint entrypoint, - VAConfigAttrib *attrib_list, /* in/out */ - int num_attribs -) -{ - VADriverContextP ctx; - CHECK_DISPLAY(dpy); - ctx = CTX(dpy); - - TRACE(vaGetConfigAttributes); - return ctx->vtable.vaGetConfigAttributes ( ctx, profile, entrypoint, attrib_list, num_attribs ); -} - -VAStatus vaQueryConfigProfiles ( - VADisplay dpy, - VAProfile *profile_list, /* out */ - int *num_profiles /* out */ -) -{ - VADriverContextP ctx; - CHECK_DISPLAY(dpy); - ctx = CTX(dpy); - - TRACE(vaQueryConfigProfiles); - return ctx->vtable.vaQueryConfigProfiles ( ctx, profile_list, num_profiles ); -} - -VAStatus vaCreateConfig ( - VADisplay dpy, - VAProfile profile, - VAEntrypoint entrypoint, - VAConfigAttrib *attrib_list, - int num_attribs, - VAConfigID *config_id /* out */ -) -{ - VADriverContextP ctx; - CHECK_DISPLAY(dpy); - ctx = CTX(dpy); - - TRACE(vaCreateConfig); - return ctx->vtable.vaCreateConfig ( ctx, profile, entrypoint, attrib_list, num_attribs, config_id ); -} - -VAStatus vaDestroyConfig ( - VADisplay dpy, - VAConfigID config_id -) -{ - VADriverContextP ctx; - CHECK_DISPLAY(dpy); - ctx = CTX(dpy); - - TRACE(vaDestroyConfig); - return ctx->vtable.vaDestroyConfig ( ctx, config_id ); -} - -VAStatus vaQueryConfigAttributes ( - VADisplay dpy, - VAConfigID config_id, - VAProfile *profile, /* out */ - VAEntrypoint *entrypoint, /* out */ - VAConfigAttrib *attrib_list,/* out */ - int *num_attribs /* out */ -) -{ - VADriverContextP ctx; - CHECK_DISPLAY(dpy); - ctx = CTX(dpy); - - TRACE(vaQueryConfigAttributes); - return ctx->vtable.vaQueryConfigAttributes( ctx, config_id, profile, entrypoint, attrib_list, num_attribs); -} - -VAStatus vaCreateSurfaces ( - VADisplay dpy, - int width, - int height, - int format, - int num_surfaces, - VASurfaceID *surfaces /* out */ -) -{ - VADriverContextP ctx; - CHECK_DISPLAY(dpy); - ctx = CTX(dpy); - - TRACE(vaCreateSurfaces); - return ctx->vtable.vaCreateSurfaces( ctx, width, height, format, num_surfaces, surfaces ); -} - - -VAStatus vaDestroySurfaces ( - VADisplay dpy, - VASurfaceID *surface_list, - int num_surfaces -) -{ - VADriverContextP ctx; - CHECK_DISPLAY(dpy); - ctx = CTX(dpy); - - TRACE(vaDestroySurfaces); - return ctx->vtable.vaDestroySurfaces( ctx, surface_list, num_surfaces ); -} - -VAStatus vaCreateContext ( - VADisplay dpy, - VAConfigID config_id, - int picture_width, - int picture_height, - int flag, - VASurfaceID *render_targets, - int num_render_targets, - VAContextID *context /* out */ -) -{ - VADriverContextP ctx; - CHECK_DISPLAY(dpy); - ctx = CTX(dpy); - - TRACE(vaCreateContext); - return ctx->vtable.vaCreateContext( ctx, config_id, picture_width, picture_height, - flag, render_targets, num_render_targets, context ); -} - -VAStatus vaDestroyContext ( - VADisplay dpy, - VAContextID context -) -{ - VADriverContextP ctx; - CHECK_DISPLAY(dpy); - ctx = CTX(dpy); - - TRACE(vaDestroyContext); - return ctx->vtable.vaDestroyContext( ctx, context ); -} - -VAStatus vaCreateBuffer ( - VADisplay dpy, - VAContextID context, /* in */ - VABufferType type, /* in */ - unsigned int size, /* in */ - unsigned int num_elements, /* in */ - void *data, /* in */ - VABufferID *buf_id /* out */ -) -{ - VADriverContextP ctx; - CHECK_DISPLAY(dpy); - ctx = CTX(dpy); - - TRACE(vaCreateBuffer); - return ctx->vtable.vaCreateBuffer( ctx, context, type, size, num_elements, data, buf_id); -} - -VAStatus vaBufferSetNumElements ( - VADisplay dpy, - VABufferID buf_id, /* in */ - unsigned int num_elements /* in */ -) -{ - VADriverContextP ctx; - CHECK_DISPLAY(dpy); - ctx = CTX(dpy); - - TRACE(vaBufferSetNumElements); - return ctx->vtable.vaBufferSetNumElements( ctx, buf_id, num_elements ); -} - - -VAStatus vaMapBuffer ( - VADisplay dpy, - VABufferID buf_id, /* in */ - void **pbuf /* out */ -) -{ - VADriverContextP ctx; - CHECK_DISPLAY(dpy); - ctx = CTX(dpy); - - TRACE(vaMapBuffer); - return ctx->vtable.vaMapBuffer( ctx, buf_id, pbuf ); -} - -VAStatus vaUnmapBuffer ( - VADisplay dpy, - VABufferID buf_id /* in */ -) -{ - VADriverContextP ctx; - CHECK_DISPLAY(dpy); - ctx = CTX(dpy); - - TRACE(vaUnmapBuffer); - return ctx->vtable.vaUnmapBuffer( ctx, buf_id ); -} - -VAStatus vaDestroyBuffer ( - VADisplay dpy, - VABufferID buffer_id -) -{ - VADriverContextP ctx; - CHECK_DISPLAY(dpy); - ctx = CTX(dpy); - - TRACE(vaDestroyBuffer); - return ctx->vtable.vaDestroyBuffer( ctx, buffer_id ); -} - -VAStatus vaBeginPicture ( - VADisplay dpy, - VAContextID context, - VASurfaceID render_target -) -{ - VADriverContextP ctx; - CHECK_DISPLAY(dpy); - ctx = CTX(dpy); - - TRACE(vaBeginPicture); - return ctx->vtable.vaBeginPicture( ctx, context, render_target ); -} - -VAStatus vaRenderPicture ( - VADisplay dpy, - VAContextID context, - VABufferID *buffers, - int num_buffers -) -{ - VADriverContextP ctx; - CHECK_DISPLAY(dpy); - ctx = CTX(dpy); - - TRACE(vaRenderPicture); - return ctx->vtable.vaRenderPicture( ctx, context, buffers, num_buffers ); -} - -VAStatus vaEndPicture ( - VADisplay dpy, - VAContextID context -) -{ - VADriverContextP ctx; - CHECK_DISPLAY(dpy); - ctx = CTX(dpy); - - TRACE(vaEndPicture); - return ctx->vtable.vaEndPicture( ctx, context ); -} - -VAStatus vaSyncSurface ( - VADisplay dpy, - VASurfaceID render_target -) -{ - VADriverContextP ctx; - CHECK_DISPLAY(dpy); - ctx = CTX(dpy); - - TRACE(vaSyncSurface); - return ctx->vtable.vaSyncSurface( ctx, render_target ); -} - -VAStatus vaQuerySurfaceStatus ( - VADisplay dpy, - VASurfaceID render_target, - VASurfaceStatus *status /* out */ -) -{ - VADriverContextP ctx; - CHECK_DISPLAY(dpy); - ctx = CTX(dpy); - - TRACE(vaQuerySurfaceStatus); - return ctx->vtable.vaQuerySurfaceStatus( ctx, render_target, status ); -} - -VAStatus vaPutSurface ( - VADisplay dpy, - VASurfaceID surface, - Drawable draw, /* X Drawable */ - short srcx, - short srcy, - unsigned short srcw, - unsigned short srch, - short destx, - short desty, - unsigned short destw, - unsigned short desth, - VARectangle *cliprects, /* client supplied clip list */ - unsigned int number_cliprects, /* number of clip rects in the clip list */ - unsigned int flags /* de-interlacing flags */ -) -{ - VADriverContextP ctx; - CHECK_DISPLAY(dpy); - ctx = CTX(dpy); - - TRACE(vaPutSurface); - return ctx->vtable.vaPutSurface( ctx, surface, draw, srcx, srcy, srcw, srch, - destx, desty, destw, desth, - cliprects, number_cliprects, flags ); -} - -/* Get maximum number of image formats supported by the implementation */ -int vaMaxNumImageFormats ( - VADisplay dpy -) -{ - if( !vaDisplayIsValid(dpy) ) - return 0; - - return CTX(dpy)->max_image_formats; -} - -VAStatus vaQueryImageFormats ( - VADisplay dpy, - VAImageFormat *format_list, /* out */ - int *num_formats /* out */ -) -{ - VADriverContextP ctx; - CHECK_DISPLAY(dpy); - ctx = CTX(dpy); - - TRACE(vaQueryImageFormats); - return ctx->vtable.vaQueryImageFormats ( ctx, format_list, num_formats); -} - -/* - * The width and height fields returned in the VAImage structure may get - * enlarged for some YUV formats. The size of the data buffer that needs - * to be allocated will be given in the "data_size" field in VAImage. - * Image data is not allocated by this function. The client should - * allocate the memory and fill in the VAImage structure's data field - * after looking at "data_size" returned from the library. - */ -VAStatus vaCreateImage ( - VADisplay dpy, - VAImageFormat *format, - int width, - int height, - VAImage *image /* out */ -) -{ - VADriverContextP ctx; - CHECK_DISPLAY(dpy); - ctx = CTX(dpy); - - TRACE(vaCreateImage); - return ctx->vtable.vaCreateImage ( ctx, format, width, height, image); -} - -/* - * Should call DestroyImage before destroying the surface it is bound to - */ -VAStatus vaDestroyImage ( - VADisplay dpy, - VAImageID image -) -{ - VADriverContextP ctx; - CHECK_DISPLAY(dpy); - ctx = CTX(dpy); - - TRACE(vaDestroyImage); - return ctx->vtable.vaDestroyImage ( ctx, image); -} - -VAStatus vaSetImagePalette ( - VADisplay dpy, - VAImageID image, - unsigned char *palette -) -{ - VADriverContextP ctx; - CHECK_DISPLAY(dpy); - ctx = CTX(dpy); - - TRACE(vaSetImagePalette); - return ctx->vtable.vaSetImagePalette ( ctx, image, palette); -} - -/* - * Retrieve surface data into a VAImage - * Image must be in a format supported by the implementation - */ -VAStatus vaGetImage ( - VADisplay dpy, - VASurfaceID surface, - int x, /* coordinates of the upper left source pixel */ - int y, - unsigned int width, /* width and height of the region */ - unsigned int height, - VAImageID image -) -{ - VADriverContextP ctx; - CHECK_DISPLAY(dpy); - ctx = CTX(dpy); - - TRACE(vaGetImage); - return ctx->vtable.vaGetImage ( ctx, surface, x, y, width, height, image); -} - -/* - * Copy data from a VAImage to a surface - * Image must be in a format supported by the implementation - */ -VAStatus vaPutImage ( - VADisplay dpy, - VASurfaceID surface, - VAImageID image, - int src_x, - int src_y, - unsigned int src_width, - unsigned int src_height, - int dest_x, - int dest_y, - unsigned int dest_width, - unsigned int dest_height -) -{ - VADriverContextP ctx; - CHECK_DISPLAY(dpy); - ctx = CTX(dpy); - - TRACE(vaPutImage); - return ctx->vtable.vaPutImage ( ctx, surface, image, src_x, src_y, src_width, src_height, dest_x, dest_y, dest_width, dest_height ); -} - -/* - * Derive an VAImage from an existing surface. - * This interface will derive a VAImage and corresponding image buffer from - * an existing VA Surface. The image buffer can then be mapped/unmapped for - * direct CPU access. This operation is only possible on implementations with - * direct rendering capabilities and internal surface formats that can be - * represented with a VAImage. When the operation is not possible this interface - * will return VA_STATUS_ERROR_OPERATION_FAILED. Clients should then fall back - * to using vaCreateImage + vaPutImage to accomplish the same task in an - * indirect manner. - * - * Implementations should only return success when the resulting image buffer - * would be useable with vaMap/Unmap. - * - * When directly accessing a surface special care must be taken to insure - * proper synchronization with the graphics hardware. Clients should call - * vaQuerySurfaceStatus to insure that a surface is not the target of concurrent - * rendering or currently being displayed by an overlay. - * - * Additionally nothing about the contents of a surface should be assumed - * following a vaPutSurface. Implementations are free to modify the surface for - * scaling or subpicture blending within a call to vaPutImage. - * - * Calls to vaPutImage or vaGetImage using the same surface from which the image - * has been derived will return VA_STATUS_ERROR_SURFACE_BUSY. vaPutImage or - * vaGetImage with other surfaces is supported. - * - * An image created with vaDeriveImage should be freed with vaDestroyImage. The - * image and image buffer structures will be destroyed; however, the underlying - * surface will remain unchanged until freed with vaDestroySurfaces. - */ -VAStatus vaDeriveImage ( - VADisplay dpy, - VASurfaceID surface, - VAImage *image /* out */ -) -{ - VADriverContextP ctx; - CHECK_DISPLAY(dpy); - ctx = CTX(dpy); - - TRACE(vaDeriveImage); - return ctx->vtable.vaDeriveImage ( ctx, surface, image ); -} - - -/* Get maximum number of subpicture formats supported by the implementation */ -int vaMaxNumSubpictureFormats ( - VADisplay dpy -) -{ - if( !vaDisplayIsValid(dpy) ) - return 0; - - return CTX(dpy)->max_subpic_formats; -} - -/* - * Query supported subpicture formats - * The caller must provide a "format_list" array that can hold at - * least vaMaxNumSubpictureFormats() entries. The flags arrary holds the flag - * for each format to indicate additional capabilities for that format. The actual - * number of formats returned in "format_list" is returned in "num_formats". - */ -VAStatus vaQuerySubpictureFormats ( - VADisplay dpy, - VAImageFormat *format_list, /* out */ - unsigned int *flags, /* out */ - unsigned int *num_formats /* out */ -) -{ - VADriverContextP ctx; - CHECK_DISPLAY(dpy); - ctx = CTX(dpy); - - TRACE(vaQuerySubpictureFormats); - return ctx->vtable.vaQuerySubpictureFormats ( ctx, format_list, flags, num_formats); -} - -/* - * Subpictures are created with an image associated. - */ -VAStatus vaCreateSubpicture ( - VADisplay dpy, - VAImageID image, - VASubpictureID *subpicture /* out */ -) -{ - VADriverContextP ctx; - CHECK_DISPLAY(dpy); - ctx = CTX(dpy); - - TRACE(vaCreateSubpicture); - return ctx->vtable.vaCreateSubpicture ( ctx, image, subpicture ); -} - -/* - * Destroy the subpicture before destroying the image it is assocated to - */ -VAStatus vaDestroySubpicture ( - VADisplay dpy, - VASubpictureID subpicture -) -{ - VADriverContextP ctx; - CHECK_DISPLAY(dpy); - ctx = CTX(dpy); - - TRACE(vaDestroySubpicture); - return ctx->vtable.vaDestroySubpicture ( ctx, subpicture); -} - -VAStatus vaSetSubpictureImage ( - VADisplay dpy, - VASubpictureID subpicture, - VAImageID image -) -{ - VADriverContextP ctx; - CHECK_DISPLAY(dpy); - ctx = CTX(dpy); - - TRACE(vaSetSubpictureImage); - return ctx->vtable.vaSetSubpictureImage ( ctx, subpicture, image); -} - - -/* - * If chromakey is enabled, then the area where the source value falls within - * the chromakey [min, max] range is transparent - */ -VAStatus vaSetSubpictureChromakey ( - VADisplay dpy, - VASubpictureID subpicture, - unsigned int chromakey_min, - unsigned int chromakey_max, - unsigned int chromakey_mask -) -{ - VADriverContextP ctx; - CHECK_DISPLAY(dpy); - ctx = CTX(dpy); - - TRACE(vaSetSubpictureChromakey); - return ctx->vtable.vaSetSubpictureChromakey ( ctx, subpicture, chromakey_min, chromakey_max, chromakey_mask ); -} - - -/* - * Global alpha value is between 0 and 1. A value of 1 means fully opaque and - * a value of 0 means fully transparent. If per-pixel alpha is also specified then - * the overall alpha is per-pixel alpha multiplied by the global alpha - */ -VAStatus vaSetSubpictureGlobalAlpha ( - VADisplay dpy, - VASubpictureID subpicture, - float global_alpha -) -{ - VADriverContextP ctx; - CHECK_DISPLAY(dpy); - ctx = CTX(dpy); - - TRACE(vaSetSubpictureGlobalAlpha); - return ctx->vtable.vaSetSubpictureGlobalAlpha ( ctx, subpicture, global_alpha ); -} - -/* - vaAssociateSubpicture associates the subpicture with the target_surface. - It defines the region mapping between the subpicture and the target - surface through source and destination rectangles (with the same width and height). - Both will be displayed at the next call to vaPutSurface. Additional - associations before the call to vaPutSurface simply overrides the association. -*/ -VAStatus vaAssociateSubpicture ( - VADisplay dpy, - VASubpictureID subpicture, - VASurfaceID *target_surfaces, - int num_surfaces, - short src_x, /* upper left offset in subpicture */ - short src_y, - unsigned short src_width, - unsigned short src_height, - short dest_x, /* upper left offset in surface */ - short dest_y, - unsigned short dest_width, - unsigned short dest_height, - /* - * whether to enable chroma-keying or global-alpha - * see VA_SUBPICTURE_XXX values - */ - unsigned int flags -) -{ - VADriverContextP ctx; - CHECK_DISPLAY(dpy); - ctx = CTX(dpy); - - TRACE(vaAssociateSubpicture); - return ctx->vtable.vaAssociateSubpicture ( ctx, subpicture, target_surfaces, num_surfaces, src_x, src_y, src_width, src_height, dest_x, dest_y, dest_width, dest_height, flags ); -} - -/* - * vaDeassociateSubpicture removes the association of the subpicture with target_surfaces. - */ -VAStatus vaDeassociateSubpicture ( - VADisplay dpy, - VASubpictureID subpicture, - VASurfaceID *target_surfaces, - int num_surfaces -) -{ - VADriverContextP ctx; - CHECK_DISPLAY(dpy); - ctx = CTX(dpy); - - TRACE(vaDeassociateSubpicture); - return ctx->vtable.vaDeassociateSubpicture ( ctx, subpicture, target_surfaces, num_surfaces ); -} - - -/* Get maximum number of display attributes supported by the implementation */ -int vaMaxNumDisplayAttributes ( - VADisplay dpy -) -{ - if( !vaDisplayIsValid(dpy) ) - return 0; - - return CTX(dpy)->max_display_attributes; -} - -/* - * Query display attributes - * The caller must provide a "attr_list" array that can hold at - * least vaMaxNumDisplayAttributes() entries. The actual number of attributes - * returned in "attr_list" is returned in "num_attributes". - */ -VAStatus vaQueryDisplayAttributes ( - VADisplay dpy, - VADisplayAttribute *attr_list, /* out */ - int *num_attributes /* out */ -) -{ - VADriverContextP ctx; - CHECK_DISPLAY(dpy); - ctx = CTX(dpy); - - TRACE(vaQueryDisplayAttributes); - return ctx->vtable.vaQueryDisplayAttributes ( ctx, attr_list, num_attributes ); -} - -/* - * Get display attributes - * This function returns the current attribute values in "attr_list". - * Only attributes returned with VA_DISPLAY_ATTRIB_GETTABLE set in the "flags" field - * from vaQueryDisplayAttributes() can have their values retrieved. - */ -VAStatus vaGetDisplayAttributes ( - VADisplay dpy, - VADisplayAttribute *attr_list, /* in/out */ - int num_attributes -) -{ - VADriverContextP ctx; - CHECK_DISPLAY(dpy); - ctx = CTX(dpy); - - TRACE(vaGetDisplayAttributes); - return ctx->vtable.vaGetDisplayAttributes ( ctx, attr_list, num_attributes ); -} - -/* - * Set display attributes - * Only attributes returned with VA_DISPLAY_ATTRIB_SETTABLE set in the "flags" field - * from vaQueryDisplayAttributes() can be set. If the attribute is not settable or - * the value is out of range, the function returns VA_STATUS_ERROR_ATTR_NOT_SUPPORTED - */ -VAStatus vaSetDisplayAttributes ( - VADisplay dpy, - VADisplayAttribute *attr_list, - int num_attributes -) -{ - VADriverContextP ctx; - CHECK_DISPLAY(dpy); - ctx = CTX(dpy); - - TRACE(vaSetDisplayAttributes); - return ctx->vtable.vaSetDisplayAttributes ( ctx, attr_list, num_attributes ); -} - -/* Wrap a CI (camera imaging) frame as a VA surface to share captured video between camear - * and VA encode. With frame_id, VA driver need to call CI interfaces to get the information - * of the frame, and to determine if the frame can be wrapped as a VA surface - * - * Application should make sure the frame is idle before the frame is passed into VA stack - * and also a vaSyncSurface should be called before application tries to access the frame - * from CI stack - */ -VAStatus vaCreateSurfaceFromCIFrame ( - VADisplay dpy, - unsigned long frame_id, - VASurfaceID *surface /* out */ -) -{ - VADriverContextP ctx; - CHECK_DISPLAY(dpy); - ctx = CTX(dpy); - - TRACE(vaCreateSurfacesFromCIFrame); - - if (ctx->vtable.vaCreateSurfaceFromCIFrame) - return ctx->vtable.vaCreateSurfaceFromCIFrame( ctx, frame_id, surface ); - else - return VA_STATUS_ERROR_UNKNOWN; -} - - -/* Wrap a V4L2 buffer as a VA surface, so that V4L2 camera, VA encode - * can share the data without copy - * The VA driver should query the camera device from v4l2_fd to see - * if camera device memory/buffer can be wrapped into a VA surface - * Buffer information is passed in by v4l2_fmt and v4l2_buf structure, - * VA driver also needs do further check if the buffer can meet encode - * hardware requirement, such as dimension, fourcc, stride, etc - * - * Application should make sure the buffer is idle before the frame into VA stack - * and also a vaSyncSurface should be called before application tries to access the frame - * from V4L2 stack - */ -VAStatus vaCreateSurfaceFromV4L2Buf( - VADisplay dpy, - int v4l2_fd, /* file descriptor of V4L2 device */ - struct v4l2_format *v4l2_fmt, /* format of V4L2 */ - struct v4l2_buffer *v4l2_buf, /* V4L2 buffer */ - VASurfaceID *surface /* out */ -) -{ - VADriverContextP ctx; - CHECK_DISPLAY(dpy); - ctx = CTX(dpy); - - TRACE(vtable.vaCreateSurfaceFromV4L2Buf); - - if (ctx->vtable.vaCreateSurfaceFromV4L2Buf) - return ctx->vtable.vaCreateSurfaceFromV4L2Buf( ctx, v4l2_fd, v4l2_fmt, v4l2_buf, surface ); - else - return VA_STATUS_ERROR_UNKNOWN; -} - -/* It is a debug interface, and isn't exported in core VAAPI - * It is used to dump surface data into system memory - * Application should explicitly call free to release the buffer memory - */ - -VAStatus vaCopySurfaceToBuffer(VADisplay dpy, - VASurfaceID surface, - unsigned int *fourcc, /* following are output argument */ - unsigned int *luma_stride, - unsigned int *chroma_u_stride, - unsigned int *chroma_v_stride, - unsigned int *luma_offset, - unsigned int *chroma_u_offset, - unsigned int *chroma_v_offset, - void **buffer -) -{ - VADriverContextP ctx; - CHECK_DISPLAY(dpy); - ctx = CTX(dpy); - - TRACE(vaCopySurfaceToBuffer); - if (ctx->vtable.vaCopySurfaceToBuffer) - return ctx->vtable.vaCopySurfaceToBuffer( ctx, surface, fourcc, luma_stride, chroma_u_stride, chroma_v_stride, luma_offset, chroma_u_offset, chroma_v_offset, buffer); - else - return VA_STATUS_ERROR_UNKNOWN; -} diff -Nru libva-1.0.1/src/va.h libva-1.0.1-3+0.31.1/src/va.h --- libva-1.0.1/src/va.h 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/src/va.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,1715 +0,0 @@ -/* - * Copyright (c) 2007-2009 Intel Corporation. All Rights Reserved. - * - * 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, sub license, 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 (including the - * next paragraph) 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 NON-INFRINGEMENT. - * IN NO EVENT SHALL INTEL AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ -/* - * Video Acceleration (VA) API Specification - * - * Rev. 0.30 - * - * - * Revision History: - * rev 0.10 (12/10/2006 Jonathan Bian) - Initial draft - * rev 0.11 (12/15/2006 Jonathan Bian) - Fixed some errors - * rev 0.12 (02/05/2007 Jonathan Bian) - Added VC-1 data structures for slice level decode - * rev 0.13 (02/28/2007 Jonathan Bian) - Added GetDisplay() - * rev 0.14 (04/13/2007 Jonathan Bian) - Fixed MPEG-2 PictureParameter structure, cleaned up a few funcs. - * rev 0.15 (04/20/2007 Jonathan Bian) - Overhauled buffer management - * rev 0.16 (05/02/2007 Jonathan Bian) - Added error codes and fixed some issues with configuration - * rev 0.17 (05/07/2007 Jonathan Bian) - Added H.264/AVC data structures for slice level decode. - * rev 0.18 (05/14/2007 Jonathan Bian) - Added data structures for MPEG-4 slice level decode - * and MPEG-2 motion compensation. - * rev 0.19 (08/06/2007 Jonathan Bian) - Removed extra type for bitplane data. - * rev 0.20 (08/08/2007 Jonathan Bian) - Added missing fields to VC-1 PictureParameter structure. - * rev 0.21 (08/20/2007 Jonathan Bian) - Added image and subpicture support. - * rev 0.22 (08/27/2007 Jonathan Bian) - Added support for chroma-keying and global alpha. - * rev 0.23 (09/11/2007 Jonathan Bian) - Fixed some issues with images and subpictures. - * rev 0.24 (09/18/2007 Jonathan Bian) - Added display attributes. - * rev 0.25 (10/18/2007 Jonathan Bian) - Changed to use IDs only for some types. - * rev 0.26 (11/07/2007 Waldo Bastian) - Change vaCreateBuffer semantics - * rev 0.27 (11/19/2007 Matt Sottek) - Added DeriveImage - * rev 0.28 (12/06/2007 Jonathan Bian) - Added new versions of PutImage and AssociateSubpicture - * to enable scaling - * rev 0.29 (02/07/2008 Jonathan Bian) - VC1 parameter fixes, - * added VA_STATUS_ERROR_RESOLUTION_NOT_SUPPORTED - * rev 0.30 (03/01/2009 Jonathan Bian) - Added encoding support for H.264 BP and MPEG-4 SP and fixes - * for ISO C conformance. - * rev 0.31 (09/02/2009 Gwenole Beauchesne) - VC-1/H264 fields change for VDPAU and XvBA backend - * Application needs to relink with the new library. - * - * Acknowledgements: - * Some concepts borrowed from XvMC and XvImage. - * Waldo Bastian (Intel), Matt Sottek (Intel), Austin Yuan (Intel), and Gwenole Beauchesne (SDS) - * contributed to various aspects of the API. - */ - -#ifndef _VA_H_ -#define _VA_H_ - -#ifdef IN_LIBVA -#include "va_version.h" -#else -#include -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -/* -Overview - -The VA API is intended to provide an interface between a video decode/encode/display -application (client) and a hardware accelerator (server), to off-load -video decode/encode/display operations from the host to the hardware accelerator at various -entry-points. - -The basic operation steps are: - -- Negotiate a mutually acceptable configuration with the server to lock - down profile, entrypoints, and other attributes that will not change on - a frame-by-frame basis. -- Create a decode context which represents a "virtualized" hardware decode - device -- Get and fill decode buffers with picture level, slice level and macroblock - level data (depending on entrypoints) -- Pass the decode buffers to the server to decode the current frame - -Initialization & Configuration Management - -- Find out supported profiles -- Find out entrypoints for a given profile -- Find out configuration attributes for a given profile/entrypoint pair -- Create a configuration for use by the decoder - -*/ - -typedef void* VADisplay; /* window system dependent */ - -typedef int VAStatus; /* Return status type from functions */ -/* Values for the return status */ -#define VA_STATUS_SUCCESS 0x00000000 -#define VA_STATUS_ERROR_OPERATION_FAILED 0x00000001 -#define VA_STATUS_ERROR_ALLOCATION_FAILED 0x00000002 -#define VA_STATUS_ERROR_INVALID_DISPLAY 0x00000003 -#define VA_STATUS_ERROR_INVALID_CONFIG 0x00000004 -#define VA_STATUS_ERROR_INVALID_CONTEXT 0x00000005 -#define VA_STATUS_ERROR_INVALID_SURFACE 0x00000006 -#define VA_STATUS_ERROR_INVALID_BUFFER 0x00000007 -#define VA_STATUS_ERROR_INVALID_IMAGE 0x00000008 -#define VA_STATUS_ERROR_INVALID_SUBPICTURE 0x00000009 -#define VA_STATUS_ERROR_ATTR_NOT_SUPPORTED 0x0000000a -#define VA_STATUS_ERROR_MAX_NUM_EXCEEDED 0x0000000b -#define VA_STATUS_ERROR_UNSUPPORTED_PROFILE 0x0000000c -#define VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT 0x0000000d -#define VA_STATUS_ERROR_UNSUPPORTED_RT_FORMAT 0x0000000e -#define VA_STATUS_ERROR_UNSUPPORTED_BUFFERTYPE 0x0000000f -#define VA_STATUS_ERROR_SURFACE_BUSY 0x00000010 -#define VA_STATUS_ERROR_FLAG_NOT_SUPPORTED 0x00000011 -#define VA_STATUS_ERROR_INVALID_PARAMETER 0x00000012 -#define VA_STATUS_ERROR_RESOLUTION_NOT_SUPPORTED 0x00000013 -#define VA_STATUS_ERROR_UNIMPLEMENTED 0x00000014 -#define VA_STATUS_ERROR_SURFACE_IN_DISPLAYING 0x00000015 -#define VA_STATUS_ERROR_UNKNOWN 0xFFFFFFFF - -/* - * Returns a short english description of error_status - */ -const char *vaErrorStr(VAStatus error_status); - -/* - * Initialization: - * A display must be obtained by calling vaGetDisplay() before calling - * vaInitialize() and other functions. This connects the API to the - * native window system. - * For X Windows, native_dpy would be from XOpenDisplay() - */ -typedef void* NativeDisplay; /* window system dependent */ - -/* - * Initialize the library - */ -VAStatus vaInitialize ( - VADisplay dpy, - int *major_version, /* out */ - int *minor_version /* out */ -); - -/* - * After this call, all library internal resources will be cleaned up - */ -VAStatus vaTerminate ( - VADisplay dpy -); - -/* - * vaQueryVendorString returns a pointer to a zero-terminated string - * describing some aspects of the VA implemenation on a specific - * hardware accelerator. The format of the returned string is vendor - * specific and at the discretion of the implementer. - * e.g. for the Intel GMA500 implementation, an example would be: - * "Intel GMA500 - 2.0.0.32L.0005" - */ -const char *vaQueryVendorString ( - VADisplay dpy -); - -typedef int (*VAPrivFunc)(); - -/* - * Return a function pointer given a function name in the library. - * This allows private interfaces into the library - */ -VAPrivFunc vaGetLibFunc ( - VADisplay dpy, - const char *func -); - -/* Currently defined profiles */ -typedef enum -{ - VAProfileMPEG2Simple = 0, - VAProfileMPEG2Main = 1, - VAProfileMPEG4Simple = 2, - VAProfileMPEG4AdvancedSimple = 3, - VAProfileMPEG4Main = 4, - VAProfileH264Baseline = 5, - VAProfileH264Main = 6, - VAProfileH264High = 7, - VAProfileVC1Simple = 8, - VAProfileVC1Main = 9, - VAProfileVC1Advanced = 10, - VAProfileH263Baseline = 11 -} VAProfile; - -/* - * Currently defined entrypoints - */ -typedef enum -{ - VAEntrypointVLD = 1, - VAEntrypointIZZ = 2, - VAEntrypointIDCT = 3, - VAEntrypointMoComp = 4, - VAEntrypointDeblocking = 5, - VAEntrypointEncSlice = 6 /* slice level encode */ -} VAEntrypoint; - -/* Currently defined configuration attribute types */ -typedef enum -{ - VAConfigAttribRTFormat = 0, - VAConfigAttribSpatialResidual = 1, - VAConfigAttribSpatialClipping = 2, - VAConfigAttribIntraResidual = 3, - VAConfigAttribEncryption = 4, - VAConfigAttribRateControl = 5 -} VAConfigAttribType; - -/* - * Configuration attributes - * If there is more than one value for an attribute, a default - * value will be assigned to the attribute if the client does not - * specify the attribute when creating a configuration - */ -typedef struct _VAConfigAttrib { - VAConfigAttribType type; - unsigned int value; /* OR'd flags (bits) for this attribute */ -} VAConfigAttrib; - -/* attribute value for VAConfigAttribRTFormat */ -#define VA_RT_FORMAT_YUV420 0x00000001 -#define VA_RT_FORMAT_YUV422 0x00000002 -#define VA_RT_FORMAT_YUV444 0x00000004 -#define VA_RT_FORMAT_PROTECTED 0x80000000 - -/* attribute value for VAConfigAttribRateControl */ -#define VA_RC_NONE 0x00000001 -#define VA_RC_CBR 0x00000002 -#define VA_RC_VBR 0x00000004 - -/* - * if an attribute is not applicable for a given - * profile/entrypoint pair, then set the value to the following - */ -#define VA_ATTRIB_NOT_SUPPORTED 0x80000000 - -/* Get maximum number of profiles supported by the implementation */ -int vaMaxNumProfiles ( - VADisplay dpy -); - -/* Get maximum number of entrypoints supported by the implementation */ -int vaMaxNumEntrypoints ( - VADisplay dpy -); - -/* Get maximum number of attributs supported by the implementation */ -int vaMaxNumConfigAttributes ( - VADisplay dpy -); - -/* - * Query supported profiles - * The caller must provide a "profile_list" array that can hold at - * least vaMaxNumProfile() entries. The actual number of profiles - * returned in "profile_list" is returned in "num_profile". - */ -VAStatus vaQueryConfigProfiles ( - VADisplay dpy, - VAProfile *profile_list, /* out */ - int *num_profiles /* out */ -); - -/* - * Query supported entrypoints for a given profile - * The caller must provide an "entrypoint_list" array that can hold at - * least vaMaxNumEntrypoints() entries. The actual number of entrypoints - * returned in "entrypoint_list" is returned in "num_entrypoints". - */ -VAStatus vaQueryConfigEntrypoints ( - VADisplay dpy, - VAProfile profile, - VAEntrypoint *entrypoint_list, /* out */ - int *num_entrypoints /* out */ -); - -/* - * Get attributes for a given profile/entrypoint pair - * The caller must provide an "attrib_list" with all attributes to be - * retrieved. Upon return, the attributes in "attrib_list" have been - * updated with their value. Unknown attributes or attributes that are - * not supported for the given profile/entrypoint pair will have their - * value set to VA_ATTRIB_NOT_SUPPORTED - */ -VAStatus vaGetConfigAttributes ( - VADisplay dpy, - VAProfile profile, - VAEntrypoint entrypoint, - VAConfigAttrib *attrib_list, /* in/out */ - int num_attribs -); - -/* Generic ID type, can be re-typed for specific implementation */ -typedef unsigned int VAGenericID; - -typedef VAGenericID VAConfigID; - -/* - * Create a configuration for the decode pipeline - * it passes in the attribute list that specifies the attributes it cares - * about, with the rest taking default values. - */ -VAStatus vaCreateConfig ( - VADisplay dpy, - VAProfile profile, - VAEntrypoint entrypoint, - VAConfigAttrib *attrib_list, - int num_attribs, - VAConfigID *config_id /* out */ -); - -/* - * Free resources associdated with a given config - */ -VAStatus vaDestroyConfig ( - VADisplay dpy, - VAConfigID config_id -); - -/* - * Query all attributes for a given configuration - * The profile of the configuration is returned in "profile" - * The entrypoint of the configuration is returned in "entrypoint" - * The caller must provide an "attrib_list" array that can hold at least - * vaMaxNumConfigAttributes() entries. The actual number of attributes - * returned in "attrib_list" is returned in "num_attribs" - */ -VAStatus vaQueryConfigAttributes ( - VADisplay dpy, - VAConfigID config_id, - VAProfile *profile, /* out */ - VAEntrypoint *entrypoint, /* out */ - VAConfigAttrib *attrib_list,/* out */ - int *num_attribs /* out */ -); - - -/* - * Contexts and Surfaces - * - * Context represents a "virtual" video decode pipeline. Surfaces are render - * targets for a given context. The data in the surfaces are not accessible - * to the client and the internal data format of the surface is implementatin - * specific. - * - * Surfaces will be bound to a context when the context is created. Once - * a surface is bound to a given context, it can not be used to create - * another context. The association is removed when the context is destroyed - * - * Both contexts and surfaces are identified by unique IDs and its - * implementation specific internals are kept opaque to the clients - */ - -typedef VAGenericID VAContextID; - -typedef VAGenericID VASurfaceID; - -#define VA_INVALID_ID 0xffffffff -#define VA_INVALID_SURFACE VA_INVALID_ID - -/* - * vaCreateSurfaces - Create an array of surfaces used for decode and display - * dpy: display - * width: surface width - * height: surface height - * format: VA_RT_FORMAT_YUV420, VA_RT_FORMAT_YUV422 or VA_RT_FORMAT_YUV444 - * num_surfaces: number of surfaces to be created - * surfaces: array of surfaces created upon return - */ -VAStatus vaCreateSurfaces ( - VADisplay dpy, - int width, - int height, - int format, - int num_surfaces, - VASurfaceID *surfaces /* out */ -); - -/* Wrap a CI (camera imaging) frame as a VA surface to share captured video between camear - * and VA encode. With frame_id, VA driver need to call CI interfaces to get the information - * of the frame, and to determine if the frame can be wrapped as a VA surface - * - * Application should make sure the frame is idle before the frame is passed into VA stack - * and also a vaSyncSurface should be called before application tries to access the frame - * from CI stack - */ -VAStatus vaCreateSurfaceFromCIFrame ( - VADisplay dpy, - unsigned long frame_id, - VASurfaceID *surface /* out */ -); - - -/* - * vaDestroySurfaces - Destroy resources associated with surfaces. - * Surfaces can only be destroyed after the context associated has been - * destroyed. - * dpy: display - * surfaces: array of surfaces to destroy - * num_surfaces: number of surfaces in the array to be destroyed. - */ -VAStatus vaDestroySurfaces ( - VADisplay dpy, - VASurfaceID *surfaces, - int num_surfaces -); - -#define VA_PROGRESSIVE 0x1 -/* - * vaCreateContext - Create a context - * dpy: display - * config_id: configuration for the context - * picture_width: coded picture width - * picture_height: coded picture height - * flag: any combination of the following: - * VA_PROGRESSIVE (only progressive frame pictures in the sequence when set) - * render_targets: render targets (surfaces) tied to the context - * num_render_targets: number of render targets in the above array - * context: created context id upon return - */ -VAStatus vaCreateContext ( - VADisplay dpy, - VAConfigID config_id, - int picture_width, - int picture_height, - int flag, - VASurfaceID *render_targets, - int num_render_targets, - VAContextID *context /* out */ -); - -/* - * vaDestroyContext - Destroy a context - * dpy: display - * context: context to be destroyed - */ -VAStatus vaDestroyContext ( - VADisplay dpy, - VAContextID context -); - -/* - * Buffers - * Buffers are used to pass various types of data from the - * client to the server. The server maintains a data store - * for each buffer created, and the client idenfies a buffer - * through a unique buffer id assigned by the server. - */ - -typedef VAGenericID VABufferID; - -typedef enum -{ - VAPictureParameterBufferType = 0, - VAIQMatrixBufferType = 1, - VABitPlaneBufferType = 2, - VASliceGroupMapBufferType = 3, - VASliceParameterBufferType = 4, - VASliceDataBufferType = 5, - VAMacroblockParameterBufferType = 6, - VAResidualDataBufferType = 7, - VADeblockingParameterBufferType = 8, - VAImageBufferType = 9, - VAProtectedSliceDataBufferType = 10, -/* Following are encode buffer types */ - VAEncCodedBufferType = 21, - VAEncSequenceParameterBufferType = 22, - VAEncPictureParameterBufferType = 23, - VAEncSliceParameterBufferType = 24, - VAEncH264VUIBufferType = 25, - VAEncH264SEIBufferType = 26, -} VABufferType; - - -/* - * There will be cases where the bitstream buffer will not have enough room to hold - * the data for the entire slice, and the following flags will be used in the slice - * parameter to signal to the server for the possible cases. - * If a slice parameter buffer and slice data buffer pair is sent to the server with - * the slice data partially in the slice data buffer (BEGIN and MIDDLE cases below), - * then a slice parameter and data buffer needs to be sent again to complete this slice. - */ -#define VA_SLICE_DATA_FLAG_ALL 0x00 /* whole slice is in the buffer */ -#define VA_SLICE_DATA_FLAG_BEGIN 0x01 /* The beginning of the slice is in the buffer but the end if not */ -#define VA_SLICE_DATA_FLAG_MIDDLE 0x02 /* Neither beginning nor end of the slice is in the buffer */ -#define VA_SLICE_DATA_FLAG_END 0x04 /* end of the slice is in the buffer */ - -/* Codec-independent Slice Parameter Buffer base */ -typedef struct _VASliceParameterBufferBase -{ - unsigned int slice_data_size; /* number of bytes in the slice data buffer for this slice */ - unsigned int slice_data_offset; /* the offset to the first byte of slice data */ - unsigned int slice_data_flag; /* see VA_SLICE_DATA_FLAG_XXX definitions */ -} VASliceParameterBufferBase; - -/**************************** - * MPEG-2 data structures - ****************************/ - -/* MPEG-2 Picture Parameter Buffer */ -/* - * For each frame or field, and before any slice data, a single - * picture parameter buffer must be send. - */ -typedef struct _VAPictureParameterBufferMPEG2 -{ - unsigned short horizontal_size; - unsigned short vertical_size; - VASurfaceID forward_reference_picture; - VASurfaceID backward_reference_picture; - /* meanings of the following fields are the same as in the standard */ - int picture_coding_type; - int f_code; /* pack all four fcode into this */ - union { - struct { - unsigned int intra_dc_precision : 2; - unsigned int picture_structure : 2; - unsigned int top_field_first : 1; - unsigned int frame_pred_frame_dct : 1; - unsigned int concealment_motion_vectors : 1; - unsigned int q_scale_type : 1; - unsigned int intra_vlc_format : 1; - unsigned int alternate_scan : 1; - unsigned int repeat_first_field : 1; - unsigned int progressive_frame : 1; - unsigned int is_first_field : 1; /* indicate whether the current field - * is the first field for field picture - */ - } bits; - unsigned int value; - } picture_coding_extension; -} VAPictureParameterBufferMPEG2; - -/* MPEG-2 Inverse Quantization Matrix Buffer */ -typedef struct _VAIQMatrixBufferMPEG2 -{ - int load_intra_quantiser_matrix; - int load_non_intra_quantiser_matrix; - int load_chroma_intra_quantiser_matrix; - int load_chroma_non_intra_quantiser_matrix; - unsigned char intra_quantiser_matrix[64]; - unsigned char non_intra_quantiser_matrix[64]; - unsigned char chroma_intra_quantiser_matrix[64]; - unsigned char chroma_non_intra_quantiser_matrix[64]; -} VAIQMatrixBufferMPEG2; - -/* MPEG-2 Slice Parameter Buffer */ -typedef struct _VASliceParameterBufferMPEG2 -{ - unsigned int slice_data_size;/* number of bytes in the slice data buffer for this slice */ - unsigned int slice_data_offset;/* the offset to the first byte of slice data */ - unsigned int slice_data_flag; /* see VA_SLICE_DATA_FLAG_XXX defintions */ - unsigned int macroblock_offset;/* the offset to the first bit of MB from the first byte of slice data */ - unsigned int slice_horizontal_position; - unsigned int slice_vertical_position; - int quantiser_scale_code; - int intra_slice_flag; -} VASliceParameterBufferMPEG2; - -/* MPEG-2 Macroblock Parameter Buffer */ -typedef struct _VAMacroblockParameterBufferMPEG2 -{ - unsigned short macroblock_address; - /* - * macroblock_address (in raster scan order) - * top-left: 0 - * bottom-right: picture-height-in-mb*picture-width-in-mb - 1 - */ - unsigned char macroblock_type; /* see definition below */ - union { - struct { - unsigned int frame_motion_type : 2; - unsigned int field_motion_type : 2; - unsigned int dct_type : 1; - } bits; - unsigned int value; - } macroblock_modes; - unsigned char motion_vertical_field_select; - /* - * motion_vertical_field_select: - * see section 6.3.17.2 in the spec - * only the lower 4 bits are used - * bit 0: first vector forward - * bit 1: first vector backward - * bit 2: second vector forward - * bit 3: second vector backward - */ - short PMV[2][2][2]; /* see Table 7-7 in the spec */ - unsigned short coded_block_pattern; - /* - * The bitplanes for coded_block_pattern are described - * in Figure 6.10-12 in the spec - */ - - /* Number of skipped macroblocks after this macroblock */ - unsigned short num_skipped_macroblocks; -} VAMacroblockParameterBufferMPEG2; - -/* - * OR'd flags for macroblock_type (section 6.3.17.1 in the spec) - */ -#define VA_MB_TYPE_MOTION_FORWARD 0x02 -#define VA_MB_TYPE_MOTION_BACKWARD 0x04 -#define VA_MB_TYPE_MOTION_PATTERN 0x08 -#define VA_MB_TYPE_MOTION_INTRA 0x10 - -/* - * MPEG-2 Residual Data Buffer - * For each macroblock, there wil be 64 shorts (16-bit) in the - * residual data buffer - */ - -/**************************** - * MPEG-4 Part 2 data structures - ****************************/ - -/* MPEG-4 Picture Parameter Buffer */ -/* - * For each frame or field, and before any slice data, a single - * picture parameter buffer must be send. - */ -typedef struct _VAPictureParameterBufferMPEG4 -{ - unsigned short vop_width; - unsigned short vop_height; - VASurfaceID forward_reference_picture; - VASurfaceID backward_reference_picture; - union { - struct { - unsigned int short_video_header : 1; - unsigned int chroma_format : 2; - unsigned int interlaced : 1; - unsigned int obmc_disable : 1; - unsigned int sprite_enable : 2; - unsigned int sprite_warping_accuracy : 2; - unsigned int quant_type : 1; - unsigned int quarter_sample : 1; - unsigned int data_partitioned : 1; - unsigned int reversible_vlc : 1; - } bits; - unsigned int value; - } vol_fields; - unsigned char no_of_sprite_warping_points; - short sprite_trajectory_du[3]; - short sprite_trajectory_dv[3]; - unsigned char quant_precision; - union { - struct { - unsigned int vop_coding_type : 2; - unsigned int backward_reference_vop_coding_type : 2; - unsigned int vop_rounding_type : 1; - unsigned int intra_dc_vlc_thr : 3; - unsigned int top_field_first : 1; - unsigned int alternate_vertical_scan_flag : 1; - } bits; - unsigned int value; - } vop_fields; - unsigned char vop_fcode_forward; - unsigned char vop_fcode_backward; - /* short header related */ - unsigned char num_gobs_in_vop; - unsigned char num_macroblocks_in_gob; - /* for direct mode prediction */ - short TRB; - short TRD; -} VAPictureParameterBufferMPEG4; - -/* MPEG-4 Inverse Quantization Matrix Buffer */ -typedef struct _VAIQMatrixBufferMPEG4 -{ - int load_intra_quant_mat; - int load_non_intra_quant_mat; - unsigned char intra_quant_mat[64]; - unsigned char non_intra_quant_mat[64]; -} VAIQMatrixBufferMPEG4; - -/* MPEG-4 Slice Parameter Buffer */ -typedef struct _VASliceParameterBufferMPEG4 -{ - unsigned int slice_data_size;/* number of bytes in the slice data buffer for this slice */ - unsigned int slice_data_offset;/* the offset to the first byte of slice data */ - unsigned int slice_data_flag; /* see VA_SLICE_DATA_FLAG_XXX defintions */ - unsigned int macroblock_offset;/* the offset to the first bit of MB from the first byte of slice data */ - unsigned int macroblock_number; - int quant_scale; -} VASliceParameterBufferMPEG4; - -/* - VC-1 data structures -*/ - -typedef enum /* see 7.1.1.32 */ -{ - VAMvMode1Mv = 0, - VAMvMode1MvHalfPel = 1, - VAMvMode1MvHalfPelBilinear = 2, - VAMvModeMixedMv = 3, - VAMvModeIntensityCompensation = 4 -} VAMvModeVC1; - -/* VC-1 Picture Parameter Buffer */ -/* - * For each picture, and before any slice data, a picture parameter - * buffer must be send. Multiple picture parameter buffers may be - * sent for a single picture. In that case picture parameters will - * apply to all slice data that follow it until a new picture - * parameter buffer is sent. - * - * Notes: - * pic_quantizer_type should be set to the applicable quantizer - * type as defined by QUANTIZER (J.1.19) and either - * PQUANTIZER (7.1.1.8) or PQINDEX (7.1.1.6) - */ -typedef struct _VAPictureParameterBufferVC1 -{ - VASurfaceID forward_reference_picture; - VASurfaceID backward_reference_picture; - /* if out-of-loop post-processing is done on the render - target, then we need to keep the in-loop decoded - picture as a reference picture */ - VASurfaceID inloop_decoded_picture; - - /* sequence layer for AP or meta data for SP and MP */ - union { - struct { - unsigned int pulldown : 1; /* SEQUENCE_LAYER::PULLDOWN */ - unsigned int interlace : 1; /* SEQUENCE_LAYER::INTERLACE */ - unsigned int tfcntrflag : 1; /* SEQUENCE_LAYER::TFCNTRFLAG */ - unsigned int finterpflag : 1; /* SEQUENCE_LAYER::FINTERPFLAG */ - unsigned int psf : 1; /* SEQUENCE_LAYER::PSF */ - unsigned int multires : 1; /* METADATA::MULTIRES */ - unsigned int overlap : 1; /* METADATA::OVERLAP */ - unsigned int syncmarker : 1; /* METADATA::SYNCMARKER */ - unsigned int rangered : 1; /* METADATA::RANGERED */ - unsigned int max_b_frames : 3; /* METADATA::MAXBFRAMES */ - } bits; - unsigned int value; - } sequence_fields; - - unsigned short coded_width; /* ENTRY_POINT_LAYER::CODED_WIDTH */ - unsigned short coded_height; /* ENTRY_POINT_LAYER::CODED_HEIGHT */ - union { - struct { - unsigned int broken_link : 1; /* ENTRY_POINT_LAYER::BROKEN_LINK */ - unsigned int closed_entry : 1; /* ENTRY_POINT_LAYER::CLOSED_ENTRY */ - unsigned int panscan_flag : 1; /* ENTRY_POINT_LAYER::PANSCAN_FLAG */ - unsigned int loopfilter : 1; /* ENTRY_POINT_LAYER::LOOPFILTER */ - } bits; - unsigned int value; - } entrypoint_fields; - unsigned char conditional_overlap_flag; /* ENTRY_POINT_LAYER::CONDOVER */ - unsigned char fast_uvmc_flag; /* ENTRY_POINT_LAYER::FASTUVMC */ - union { - struct { - unsigned int luma_flag : 1; /* ENTRY_POINT_LAYER::RANGE_MAPY_FLAG */ - unsigned int luma : 3; /* ENTRY_POINT_LAYER::RANGE_MAPY */ - unsigned int chroma_flag : 1; /* ENTRY_POINT_LAYER::RANGE_MAPUV_FLAG */ - unsigned int chroma : 3; /* ENTRY_POINT_LAYER::RANGE_MAPUV */ - } bits; - unsigned int value; - } range_mapping_fields; - - unsigned char b_picture_fraction; /* PICTURE_LAYER::BFRACTION */ - unsigned char cbp_table; /* PICTURE_LAYER::CBPTAB/ICBPTAB */ - unsigned char mb_mode_table; /* PICTURE_LAYER::MBMODETAB */ - unsigned char range_reduction_frame;/* PICTURE_LAYER::RANGEREDFRM */ - unsigned char rounding_control; /* PICTURE_LAYER::RNDCTRL */ - unsigned char post_processing; /* PICTURE_LAYER::POSTPROC */ - unsigned char picture_resolution_index; /* PICTURE_LAYER::RESPIC */ - unsigned char luma_scale; /* PICTURE_LAYER::LUMSCALE */ - unsigned char luma_shift; /* PICTURE_LAYER::LUMSHIFT */ - union { - struct { - unsigned int picture_type : 3; /* PICTURE_LAYER::PTYPE */ - unsigned int frame_coding_mode : 3; /* PICTURE_LAYER::FCM */ - unsigned int top_field_first : 1; /* PICTURE_LAYER::TFF */ - unsigned int is_first_field : 1; /* set to 1 if it is the first field */ - unsigned int intensity_compensation : 1; /* PICTURE_LAYER::INTCOMP */ - } bits; - unsigned int value; - } picture_fields; - union { - struct { - unsigned int mv_type_mb : 1; /* PICTURE::MVTYPEMB */ - unsigned int direct_mb : 1; /* PICTURE::DIRECTMB */ - unsigned int skip_mb : 1; /* PICTURE::SKIPMB */ - unsigned int field_tx : 1; /* PICTURE::FIELDTX */ - unsigned int forward_mb : 1; /* PICTURE::FORWARDMB */ - unsigned int ac_pred : 1; /* PICTURE::ACPRED */ - unsigned int overflags : 1; /* PICTURE::OVERFLAGS */ - } flags; - unsigned int value; - } raw_coding; - union { - struct { - unsigned int bp_mv_type_mb : 1; /* PICTURE::MVTYPEMB */ - unsigned int bp_direct_mb : 1; /* PICTURE::DIRECTMB */ - unsigned int bp_skip_mb : 1; /* PICTURE::SKIPMB */ - unsigned int bp_field_tx : 1; /* PICTURE::FIELDTX */ - unsigned int bp_forward_mb : 1; /* PICTURE::FORWARDMB */ - unsigned int bp_ac_pred : 1; /* PICTURE::ACPRED */ - unsigned int bp_overflags : 1; /* PICTURE::OVERFLAGS */ - } flags; - unsigned int value; - } bitplane_present; /* signal what bitplane is being passed via the bitplane buffer */ - union { - struct { - unsigned int reference_distance_flag : 1;/* PICTURE_LAYER::REFDIST_FLAG */ - unsigned int reference_distance : 5;/* PICTURE_LAYER::REFDIST */ - unsigned int num_reference_pictures: 1;/* PICTURE_LAYER::NUMREF */ - unsigned int reference_field_pic_indicator : 1;/* PICTURE_LAYER::REFFIELD */ - } bits; - unsigned int value; - } reference_fields; - union { - struct { - unsigned int mv_mode : 3; /* PICTURE_LAYER::MVMODE */ - unsigned int mv_mode2 : 3; /* PICTURE_LAYER::MVMODE2 */ - unsigned int mv_table : 3; /* PICTURE_LAYER::MVTAB/IMVTAB */ - unsigned int two_mv_block_pattern_table: 2; /* PICTURE_LAYER::2MVBPTAB */ - unsigned int four_mv_switch : 1; /* PICTURE_LAYER::4MVSWITCH */ - unsigned int four_mv_block_pattern_table : 2; /* PICTURE_LAYER::4MVBPTAB */ - unsigned int extended_mv_flag : 1; /* ENTRY_POINT_LAYER::EXTENDED_MV */ - unsigned int extended_mv_range : 2; /* PICTURE_LAYER::MVRANGE */ - unsigned int extended_dmv_flag : 1; /* ENTRY_POINT_LAYER::EXTENDED_DMV */ - unsigned int extended_dmv_range : 2; /* PICTURE_LAYER::DMVRANGE */ - } bits; - unsigned int value; - } mv_fields; - union { - struct { - unsigned int dquant : 2; /* ENTRY_POINT_LAYER::DQUANT */ - unsigned int quantizer : 2; /* ENTRY_POINT_LAYER::QUANTIZER */ - unsigned int half_qp : 1; /* PICTURE_LAYER::HALFQP */ - unsigned int pic_quantizer_scale : 5;/* PICTURE_LAYER::PQUANT */ - unsigned int pic_quantizer_type : 1;/* PICTURE_LAYER::PQUANTIZER */ - unsigned int dq_frame : 1; /* VOPDQUANT::DQUANTFRM */ - unsigned int dq_profile : 2; /* VOPDQUANT::DQPROFILE */ - unsigned int dq_sb_edge : 2; /* VOPDQUANT::DQSBEDGE */ - unsigned int dq_db_edge : 2; /* VOPDQUANT::DQDBEDGE */ - unsigned int dq_binary_level : 1; /* VOPDQUANT::DQBILEVEL */ - unsigned int alt_pic_quantizer : 5;/* VOPDQUANT::ALTPQUANT */ - } bits; - unsigned int value; - } pic_quantizer_fields; - union { - struct { - unsigned int variable_sized_transform_flag : 1;/* ENTRY_POINT_LAYER::VSTRANSFORM */ - unsigned int mb_level_transform_type_flag : 1;/* PICTURE_LAYER::TTMBF */ - unsigned int frame_level_transform_type : 2;/* PICTURE_LAYER::TTFRM */ - unsigned int transform_ac_codingset_idx1 : 2;/* PICTURE_LAYER::TRANSACFRM */ - unsigned int transform_ac_codingset_idx2 : 2;/* PICTURE_LAYER::TRANSACFRM2 */ - unsigned int intra_transform_dc_table : 1;/* PICTURE_LAYER::TRANSDCTAB */ - } bits; - unsigned int value; - } transform_fields; -} VAPictureParameterBufferVC1; - -/* VC-1 Bitplane Buffer -There will be at most three bitplanes coded in any picture header. To send -the bitplane data more efficiently, each byte is divided in two nibbles, with -each nibble carrying three bitplanes for one macroblock. The following table -shows the bitplane data arrangement within each nibble based on the picture -type. - -Picture Type Bit3 Bit2 Bit1 Bit0 -I or BI OVERFLAGS ACPRED FIELDTX -P MYTYPEMB SKIPMB DIRECTMB -B FORWARDMB SKIPMB DIRECTMB - -Within each byte, the lower nibble is for the first MB and the upper nibble is -for the second MB. E.g. the lower nibble of the first byte in the bitplane -buffer is for Macroblock #1 and the upper nibble of the first byte is for -Macroblock #2 in the first row. -*/ - -/* VC-1 Slice Parameter Buffer */ -typedef struct _VASliceParameterBufferVC1 -{ - unsigned int slice_data_size;/* number of bytes in the slice data buffer for this slice */ - unsigned int slice_data_offset;/* the offset to the first byte of slice data */ - unsigned int slice_data_flag; /* see VA_SLICE_DATA_FLAG_XXX defintions */ - unsigned int macroblock_offset;/* the offset to the first bit of MB from the first byte of slice data */ - unsigned int slice_vertical_position; -} VASliceParameterBufferVC1; - -/* VC-1 Slice Data Buffer */ -/* -This is simplely a buffer containing raw bit-stream bytes -*/ - -/**************************** - * H.264/AVC data structures - ****************************/ - -typedef struct _VAPictureH264 -{ - VASurfaceID picture_id; - unsigned int frame_idx; - unsigned int flags; - unsigned int TopFieldOrderCnt; - unsigned int BottomFieldOrderCnt; -} VAPictureH264; -/* flags in VAPictureH264 could be OR of the following */ -#define VA_PICTURE_H264_INVALID 0x00000001 -#define VA_PICTURE_H264_TOP_FIELD 0x00000002 -#define VA_PICTURE_H264_BOTTOM_FIELD 0x00000004 -#define VA_PICTURE_H264_SHORT_TERM_REFERENCE 0x00000008 -#define VA_PICTURE_H264_LONG_TERM_REFERENCE 0x00000010 - -/* H.264 Picture Parameter Buffer */ -/* - * For each picture, and before any slice data, a single - * picture parameter buffer must be send. - */ -typedef struct _VAPictureParameterBufferH264 -{ - VAPictureH264 CurrPic; - VAPictureH264 ReferenceFrames[16]; /* in DPB */ - unsigned short picture_width_in_mbs_minus1; - unsigned short picture_height_in_mbs_minus1; - unsigned char bit_depth_luma_minus8; - unsigned char bit_depth_chroma_minus8; - unsigned char num_ref_frames; - union { - struct { - unsigned int chroma_format_idc : 2; - unsigned int residual_colour_transform_flag : 1; - unsigned int gaps_in_frame_num_value_allowed_flag : 1; - unsigned int frame_mbs_only_flag : 1; - unsigned int mb_adaptive_frame_field_flag : 1; - unsigned int direct_8x8_inference_flag : 1; - unsigned int MinLumaBiPredSize8x8 : 1; /* see A.3.3.2 */ - unsigned int log2_max_frame_num_minus4 : 4; - unsigned int pic_order_cnt_type : 2; - unsigned int log2_max_pic_order_cnt_lsb_minus4 : 4; - unsigned int delta_pic_order_always_zero_flag : 1; - } bits; - unsigned int value; - } seq_fields; - unsigned char num_slice_groups_minus1; - unsigned char slice_group_map_type; - unsigned short slice_group_change_rate_minus1; - signed char pic_init_qp_minus26; - signed char pic_init_qs_minus26; - signed char chroma_qp_index_offset; - signed char second_chroma_qp_index_offset; - union { - struct { - unsigned int entropy_coding_mode_flag : 1; - unsigned int weighted_pred_flag : 1; - unsigned int weighted_bipred_idc : 2; - unsigned int transform_8x8_mode_flag : 1; - unsigned int field_pic_flag : 1; - unsigned int constrained_intra_pred_flag : 1; - unsigned int pic_order_present_flag : 1; - unsigned int deblocking_filter_control_present_flag : 1; - unsigned int redundant_pic_cnt_present_flag : 1; - unsigned int reference_pic_flag : 1; /* nal_ref_idc != 0 */ - } bits; - unsigned int value; - } pic_fields; - unsigned short frame_num; -} VAPictureParameterBufferH264; - -/* H.264 Inverse Quantization Matrix Buffer */ -typedef struct _VAIQMatrixBufferH264 -{ - unsigned char ScalingList4x4[6][16]; - unsigned char ScalingList8x8[2][64]; -} VAIQMatrixBufferH264; - -/* - * H.264 Slice Group Map Buffer - * When VAPictureParameterBufferH264::num_slice_group_minus1 is not equal to 0, - * A slice group map buffer should be sent for each picture if required. The buffer - * is sent only when there is a change in the mapping values. - * The slice group map buffer map "map units" to slice groups as specified in - * section 8.2.2 of the H.264 spec. The buffer will contain one byte for each macroblock - * in raster scan order - */ - -/* H.264 Slice Parameter Buffer */ -typedef struct _VASliceParameterBufferH264 -{ - unsigned int slice_data_size;/* number of bytes in the slice data buffer for this slice */ - unsigned int slice_data_offset;/* the offset to the NAL start code for this slice */ - unsigned int slice_data_flag; /* see VA_SLICE_DATA_FLAG_XXX defintions */ - unsigned short slice_data_bit_offset; /* bit offset from NAL start code to the beginning of slice data */ - unsigned short first_mb_in_slice; - unsigned char slice_type; - unsigned char direct_spatial_mv_pred_flag; - unsigned char num_ref_idx_l0_active_minus1; - unsigned char num_ref_idx_l1_active_minus1; - unsigned char cabac_init_idc; - char slice_qp_delta; - unsigned char disable_deblocking_filter_idc; - char slice_alpha_c0_offset_div2; - char slice_beta_offset_div2; - VAPictureH264 RefPicList0[32]; /* See 8.2.4.2 */ - VAPictureH264 RefPicList1[32]; /* See 8.2.4.2 */ - unsigned char luma_log2_weight_denom; - unsigned char chroma_log2_weight_denom; - unsigned char luma_weight_l0_flag; - short luma_weight_l0[32]; - short luma_offset_l0[32]; - unsigned char chroma_weight_l0_flag; - short chroma_weight_l0[32][2]; - short chroma_offset_l0[32][2]; - unsigned char luma_weight_l1_flag; - short luma_weight_l1[32]; - short luma_offset_l1[32]; - unsigned char chroma_weight_l1_flag; - short chroma_weight_l1[32][2]; - short chroma_offset_l1[32][2]; -} VASliceParameterBufferH264; - -/**************************** - * Common encode data structures - ****************************/ -typedef enum -{ - VAEncPictureTypeIntra = 0, - VAEncPictureTypePredictive = 1, - VAEncPictureTypeBidirectional = 2, -} VAEncPictureType; - -/* Encode Slice Parameter Buffer */ -typedef struct _VAEncSliceParameterBuffer -{ - unsigned int start_row_number; /* starting MB row number for this slice */ - unsigned int slice_height; /* slice height measured in MB */ - union { - struct { - unsigned int is_intra : 1; - unsigned int disable_deblocking_filter_idc : 2; - } bits; - unsigned int value; - } slice_flags; -} VAEncSliceParameterBuffer; - -/**************************** - * H.264 specific encode data structures - ****************************/ - -typedef struct _VAEncSequenceParameterBufferH264 -{ - unsigned char seq_parameter_set_id; - unsigned char level_idc; - unsigned int intra_period; - unsigned int picture_width_in_mbs; - unsigned int picture_height_in_mbs; - unsigned int bits_per_second; - unsigned int frame_rate; - unsigned int initial_qp; - unsigned int min_qp; - unsigned int basic_unit_size; - unsigned char vui_flag; -} VAEncSequenceParameterBufferH264; - -typedef struct _VAEncPictureParameterBufferH264 -{ - VASurfaceID reference_picture; - VASurfaceID reconstructed_picture; - VABufferID coded_buf; - unsigned short picture_width; - unsigned short picture_height; - unsigned char last_picture; /* if set to 1 it indicates the last picture in the sequence */ -} VAEncPictureParameterBufferH264; - -/**************************** - * H.263 specific encode data structures - ****************************/ - -typedef struct _VAEncSequenceParameterBufferH263 -{ - unsigned int intra_period; - unsigned int bits_per_second; - unsigned int frame_rate; - unsigned int initial_qp; - unsigned int min_qp; -} VAEncSequenceParameterBufferH263; - -typedef struct _VAEncPictureParameterBufferH263 -{ - VASurfaceID reference_picture; - VASurfaceID reconstructed_picture; - VABufferID coded_buf; - unsigned short picture_width; - unsigned short picture_height; - VAEncPictureType picture_type; -} VAEncPictureParameterBufferH263; - -/**************************** - * MPEG-4 specific encode data structures - ****************************/ - -typedef struct _VAEncSequenceParameterBufferMPEG4 -{ - unsigned char profile_and_level_indication; - unsigned int intra_period; - unsigned int video_object_layer_width; - unsigned int video_object_layer_height; - unsigned int vop_time_increment_resolution; - unsigned int fixed_vop_rate; - unsigned int fixed_vop_time_increment; - unsigned int bits_per_second; - unsigned int frame_rate; - unsigned int initial_qp; - unsigned int min_qp; -} VAEncSequenceParameterBufferMPEG4; - -typedef struct _VAEncPictureParameterBufferMPEG4 -{ - VASurfaceID reference_picture; - VASurfaceID reconstructed_picture; - VABufferID coded_buf; - unsigned short picture_width; - unsigned short picture_height; - unsigned int modulo_time_base; /* number of 1s */ - unsigned int vop_time_increment; - VAEncPictureType picture_type; -} VAEncPictureParameterBufferMPEG4; - - - -/* Buffer functions */ - -/* - * Creates a buffer for "num_elements" elements of "size" bytes and - * initalize with "data". - * if "data" is null, then the contents of the buffer data store - * are undefined. - * Basically there are two ways to get buffer data to the server side. One is - * to call vaCreateBuffer() with a non-null "data", which results the data being - * copied to the data store on the server side. A different method that - * eliminates this copy is to pass null as "data" when calling vaCreateBuffer(), - * and then use vaMapBuffer() to map the data store from the server side to the - * client address space for access. - * Note: image buffers are created by the library, not the client. Please see - * vaCreateImage on how image buffers are managed. - */ -VAStatus vaCreateBuffer ( - VADisplay dpy, - VAContextID context, - VABufferType type, /* in */ - unsigned int size, /* in */ - unsigned int num_elements, /* in */ - void *data, /* in */ - VABufferID *buf_id /* out */ -); - -/* - * Convey to the server how many valid elements are in the buffer. - * e.g. if multiple slice parameters are being held in a single buffer, - * this will communicate to the server the number of slice parameters - * that are valid in the buffer. - */ -VAStatus vaBufferSetNumElements ( - VADisplay dpy, - VABufferID buf_id, /* in */ - unsigned int num_elements /* in */ -); - -/* - * Map data store of the buffer into the client's address space - * vaCreateBuffer() needs to be called with "data" set to NULL before - * calling vaMapBuffer() - */ -VAStatus vaMapBuffer ( - VADisplay dpy, - VABufferID buf_id, /* in */ - void **pbuf /* out */ -); - -/* - * After client making changes to a mapped data store, it needs to - * "Unmap" it to let the server know that the data is ready to be - * consumed by the server - */ -VAStatus vaUnmapBuffer ( - VADisplay dpy, - VABufferID buf_id /* in */ -); - -/* - * After this call, the buffer is deleted and this buffer_id is no longer valid - * Only call this if the buffer is not going to be passed to vaRenderBuffer - */ -VAStatus vaDestroyBuffer ( - VADisplay dpy, - VABufferID buffer_id -); - -/* -Render (Decode) Pictures - -A picture represents either a frame or a field. - -The Begin/Render/End sequence sends the decode buffers to the server -*/ - -/* - * Get ready to decode a picture to a target surface - */ -VAStatus vaBeginPicture ( - VADisplay dpy, - VAContextID context, - VASurfaceID render_target -); - -/* - * Send decode buffers to the server. - * Buffers are automatically destroyed afterwards - */ -VAStatus vaRenderPicture ( - VADisplay dpy, - VAContextID context, - VABufferID *buffers, - int num_buffers -); - -/* - * Make the end of rendering for a picture. - * The server should start processing all pending operations for this - * surface. This call is non-blocking. The client can start another - * Begin/Render/End sequence on a different render target. - */ -VAStatus vaEndPicture ( - VADisplay dpy, - VAContextID context -); - -/* - -Synchronization - -*/ - -/* - * This function blocks until all pending operations on the render target - * have been completed. Upon return it is safe to use the render target for a - * different picture. - */ -VAStatus vaSyncSurface ( - VADisplay dpy, - VASurfaceID render_target -); - -typedef enum -{ - VASurfaceRendering = 1, /* Rendering in progress */ - VASurfaceDisplaying = 2, /* Displaying in progress (not safe to render into it) */ - /* this status is useful if surface is used as the source */ - /* of an overlay */ - VASurfaceReady = 4, /* not being rendered or displayed */ - VASurfaceSkipped = 8 /* Indicate a skipped frame during encode */ -} VASurfaceStatus; - -/* - * Find out any pending ops on the render target - */ -VAStatus vaQuerySurfaceStatus ( - VADisplay dpy, - VASurfaceID render_target, - VASurfaceStatus *status /* out */ -); - -/* - * Images and Subpictures - * VAImage is used to either get the surface data to client memory, or - * to copy image data in client memory to a surface. - * Both images, subpictures and surfaces follow the same 2D coordinate system where origin - * is at the upper left corner with positive X to the right and positive Y down - */ -#define VA_FOURCC(ch0, ch1, ch2, ch3) \ - ((unsigned long)(unsigned char) (ch0) | ((unsigned long)(unsigned char) (ch1) << 8) | \ - ((unsigned long)(unsigned char) (ch2) << 16) | ((unsigned long)(unsigned char) (ch3) << 24 )) - -/* a few common FourCCs */ -#define VA_FOURCC_NV12 0x3231564E -#define VA_FOURCC_AI44 0x34344149 -#define VA_FOURCC_RGBA 0x41424752 -#define VA_FOURCC_UYVY 0x59565955 -#define VA_FOURCC_YUY2 0x32595559 -#define VA_FOURCC_AYUV 0x56555941 -#define VA_FOURCC_NV11 0x3131564e -#define VA_FOURCC_YV12 0x32315659 -#define VA_FOURCC_P208 0x38303250 -#define VA_FOURCC_IYUV 0x56555949 - -/* byte order */ -#define VA_LSB_FIRST 1 -#define VA_MSB_FIRST 2 - -typedef struct _VAImageFormat -{ - unsigned int fourcc; - unsigned int byte_order; /* VA_LSB_FIRST, VA_MSB_FIRST */ - unsigned int bits_per_pixel; - /* for RGB formats */ - unsigned int depth; /* significant bits per pixel */ - unsigned int red_mask; - unsigned int green_mask; - unsigned int blue_mask; - unsigned int alpha_mask; -} VAImageFormat; - -typedef VAGenericID VAImageID; - -typedef struct _VAImage -{ - VAImageID image_id; /* uniquely identify this image */ - VAImageFormat format; - VABufferID buf; /* image data buffer */ - /* - * Image data will be stored in a buffer of type VAImageBufferType to facilitate - * data store on the server side for optimal performance. The buffer will be - * created by the CreateImage function, and proper storage allocated based on the image - * size and format. This buffer is managed by the library implementation, and - * accessed by the client through the buffer Map/Unmap functions. - */ - unsigned short width; - unsigned short height; - unsigned int data_size; - unsigned int num_planes; /* can not be greater than 3 */ - /* - * An array indicating the scanline pitch in bytes for each plane. - * Each plane may have a different pitch. Maximum 3 planes for planar formats - */ - unsigned int pitches[3]; - /* - * An array indicating the byte offset from the beginning of the image data - * to the start of each plane. - */ - unsigned int offsets[3]; - - /* The following fields are only needed for paletted formats */ - int num_palette_entries; /* set to zero for non-palette images */ - /* - * Each component is one byte and entry_bytes indicates the number of components in - * each entry (eg. 3 for YUV palette entries). set to zero for non-palette images - */ - int entry_bytes; - /* - * An array of ascii characters describing the order of the components within the bytes. - * Only entry_bytes characters of the string are used. - */ - char component_order[4]; -} VAImage; - -/* Get maximum number of image formats supported by the implementation */ -int vaMaxNumImageFormats ( - VADisplay dpy -); - -/* - * Query supported image formats - * The caller must provide a "format_list" array that can hold at - * least vaMaxNumImageFormats() entries. The actual number of formats - * returned in "format_list" is returned in "num_formats". - */ -VAStatus vaQueryImageFormats ( - VADisplay dpy, - VAImageFormat *format_list, /* out */ - int *num_formats /* out */ -); - -/* - * Create a VAImage structure - * The width and height fields returned in the VAImage structure may get - * enlarged for some YUV formats. Upon return from this function, - * image->buf has been created and proper storage allocated by the library. - * The client can access the image through the Map/Unmap calls. - */ -VAStatus vaCreateImage ( - VADisplay dpy, - VAImageFormat *format, - int width, - int height, - VAImage *image /* out */ -); - -/* - * Should call DestroyImage before destroying the surface it is bound to - */ -VAStatus vaDestroyImage ( - VADisplay dpy, - VAImageID image -); - -VAStatus vaSetImagePalette ( - VADisplay dpy, - VAImageID image, - /* - * pointer to an array holding the palette data. The size of the array is - * num_palette_entries * entry_bytes in size. The order of the components - * in the palette is described by the component_order in VAImage struct - */ - unsigned char *palette -); - -/* - * Retrive surface data into a VAImage - * Image must be in a format supported by the implementation - */ -VAStatus vaGetImage ( - VADisplay dpy, - VASurfaceID surface, - int x, /* coordinates of the upper left source pixel */ - int y, - unsigned int width, /* width and height of the region */ - unsigned int height, - VAImageID image -); - -/* - * Copy data from a VAImage to a surface - * Image must be in a format supported by the implementation - * Returns a VA_STATUS_ERROR_SURFACE_BUSY if the surface - * shouldn't be rendered into when this is called - */ -VAStatus vaPutImage ( - VADisplay dpy, - VASurfaceID surface, - VAImageID image, - int src_x, - int src_y, - unsigned int src_width, - unsigned int src_height, - int dest_x, - int dest_y, - unsigned int dest_width, - unsigned int dest_height -); - -/* - * Derive an VAImage from an existing surface. - * This interface will derive a VAImage and corresponding image buffer from - * an existing VA Surface. The image buffer can then be mapped/unmapped for - * direct CPU access. This operation is only possible on implementations with - * direct rendering capabilities and internal surface formats that can be - * represented with a VAImage. When the operation is not possible this interface - * will return VA_STATUS_ERROR_OPERATION_FAILED. Clients should then fall back - * to using vaCreateImage + vaPutImage to accomplish the same task in an - * indirect manner. - * - * Implementations should only return success when the resulting image buffer - * would be useable with vaMap/Unmap. - * - * When directly accessing a surface special care must be taken to insure - * proper synchronization with the graphics hardware. Clients should call - * vaQuerySurfaceStatus to insure that a surface is not the target of concurrent - * rendering or currently being displayed by an overlay. - * - * Additionally nothing about the contents of a surface should be assumed - * following a vaPutSurface. Implementations are free to modify the surface for - * scaling or subpicture blending within a call to vaPutImage. - * - * Calls to vaPutImage or vaGetImage using the same surface from which the image - * has been derived will return VA_STATUS_ERROR_SURFACE_BUSY. vaPutImage or - * vaGetImage with other surfaces is supported. - * - * An image created with vaDeriveImage should be freed with vaDestroyImage. The - * image and image buffer structures will be destroyed; however, the underlying - * surface will remain unchanged until freed with vaDestroySurfaces. - */ -VAStatus vaDeriveImage ( - VADisplay dpy, - VASurfaceID surface, - VAImage *image /* out */ -); - -/* - * Subpictures - * Subpicture is a special type of image that can be blended - * with a surface during vaPutSurface(). Subpicture can be used to render - * DVD sub-titles or closed captioning text etc. - */ - -typedef VAGenericID VASubpictureID; - -/* Get maximum number of subpicture formats supported by the implementation */ -int vaMaxNumSubpictureFormats ( - VADisplay dpy -); - -/* flags for subpictures */ -#define VA_SUBPICTURE_CHROMA_KEYING 0x0001 -#define VA_SUBPICTURE_GLOBAL_ALPHA 0x0002 -/* - * Query supported subpicture formats - * The caller must provide a "format_list" array that can hold at - * least vaMaxNumSubpictureFormats() entries. The flags arrary holds the flag - * for each format to indicate additional capabilities for that format. The actual - * number of formats returned in "format_list" is returned in "num_formats". - * flags: returned value to indicate addtional capabilities - * VA_SUBPICTURE_CHROMA_KEYING - supports chroma-keying - * VA_SUBPICTURE_GLOBAL_ALPHA - supports global alpha - */ -VAStatus vaQuerySubpictureFormats ( - VADisplay dpy, - VAImageFormat *format_list, /* out */ - unsigned int *flags, /* out */ - unsigned int *num_formats /* out */ -); - -/* - * Subpictures are created with an image associated. - */ -VAStatus vaCreateSubpicture ( - VADisplay dpy, - VAImageID image, - VASubpictureID *subpicture /* out */ -); - -/* - * Destroy the subpicture before destroying the image it is assocated to - */ -VAStatus vaDestroySubpicture ( - VADisplay dpy, - VASubpictureID subpicture -); - -/* - * Bind an image to the subpicture. This image will now be associated with - * the subpicture instead of the one at creation. - */ -VAStatus vaSetSubpictureImage ( - VADisplay dpy, - VASubpictureID subpicture, - VAImageID image -); - -/* - * If chromakey is enabled, then the area where the source value falls within - * the chromakey [min, max] range is transparent - * The chromakey component format is the following: - * For RGB: [0:7] Red [8:15] Blue [16:23] Green - * For YUV: [0:7] V [8:15] U [16:23] Y - * The chromakey mask can be used to mask out certain components for chromakey - * comparision - */ -VAStatus vaSetSubpictureChromakey ( - VADisplay dpy, - VASubpictureID subpicture, - unsigned int chromakey_min, - unsigned int chromakey_max, - unsigned int chromakey_mask -); - -/* - * Global alpha value is between 0 and 1. A value of 1 means fully opaque and - * a value of 0 means fully transparent. If per-pixel alpha is also specified then - * the overall alpha is per-pixel alpha multiplied by the global alpha - */ -VAStatus vaSetSubpictureGlobalAlpha ( - VADisplay dpy, - VASubpictureID subpicture, - float global_alpha -); - -/* - * vaAssociateSubpicture associates the subpicture with target_surfaces. - * It defines the region mapping between the subpicture and the target - * surfaces through source and destination rectangles (with the same width and height). - * Both will be displayed at the next call to vaPutSurface. Additional - * associations before the call to vaPutSurface simply overrides the association. - */ -VAStatus vaAssociateSubpicture ( - VADisplay dpy, - VASubpictureID subpicture, - VASurfaceID *target_surfaces, - int num_surfaces, - short src_x, /* upper left offset in subpicture */ - short src_y, - unsigned short src_width, - unsigned short src_height, - short dest_x, /* upper left offset in surface */ - short dest_y, - unsigned short dest_width, - unsigned short dest_height, - /* - * whether to enable chroma-keying or global-alpha - * see VA_SUBPICTURE_XXX values - */ - unsigned int flags -); - -/* - * vaDeassociateSubpicture removes the association of the subpicture with target_surfaces. - */ -VAStatus vaDeassociateSubpicture ( - VADisplay dpy, - VASubpictureID subpicture, - VASurfaceID *target_surfaces, - int num_surfaces -); - -typedef struct _VARectangle -{ - short x; - short y; - unsigned short width; - unsigned short height; -} VARectangle; - -/* - * Display attributes - * Display attributes are used to control things such as contrast, hue, saturation, - * brightness etc. in the rendering process. The application can query what - * attributes are supported by the driver, and then set the appropriate attributes - * before calling vaPutSurface() - */ - -/* Currently defined display attribute types */ -typedef enum -{ - VADisplayAttribBrightness = 0, - VADisplayAttribContrast = 1, - VADisplayAttribHue = 2, - VADisplayAttribSaturation = 3, - /* client can specifiy a background color for the target window */ - VADisplayAttribBackgroundColor = 4, - /* - * this is a gettable only attribute. For some implementations that use the - * hardware overlay, after PutSurface is called, the surface can not be - * re-used until after the subsequent PutSurface call. If this is the case - * then the value for this attribute will be set to 1 so that the client - * will not attempt to re-use the surface right after returning from a call - * to PutSurface. - */ - VADisplayAttribDirectSurface = 5, -} VADisplayAttribType; - -/* flags for VADisplayAttribute */ -#define VA_DISPLAY_ATTRIB_NOT_SUPPORTED 0x0000 -#define VA_DISPLAY_ATTRIB_GETTABLE 0x0001 -#define VA_DISPLAY_ATTRIB_SETTABLE 0x0002 - -typedef struct _VADisplayAttribute -{ - VADisplayAttribType type; - int min_value; - int max_value; - int value; /* used by the set/get attribute functions */ -/* flags can be VA_DISPLAY_ATTRIB_GETTABLE or VA_DISPLAY_ATTRIB_SETTABLE or OR'd together */ - unsigned int flags; -} VADisplayAttribute; - -/* Get maximum number of display attributs supported by the implementation */ -int vaMaxNumDisplayAttributes ( - VADisplay dpy -); - -/* - * Query display attributes - * The caller must provide a "attr_list" array that can hold at - * least vaMaxNumDisplayAttributes() entries. The actual number of attributes - * returned in "attr_list" is returned in "num_attributes". - */ -VAStatus vaQueryDisplayAttributes ( - VADisplay dpy, - VADisplayAttribute *attr_list, /* out */ - int *num_attributes /* out */ -); - -/* - * Get display attributes - * This function returns the current attribute values in "attr_list". - * Only attributes returned with VA_DISPLAY_ATTRIB_GETTABLE set in the "flags" field - * from vaQueryDisplayAttributes() can have their values retrieved. - */ -VAStatus vaGetDisplayAttributes ( - VADisplay dpy, - VADisplayAttribute *attr_list, /* in/out */ - int num_attributes -); - -/* - * Set display attributes - * Only attributes returned with VA_DISPLAY_ATTRIB_SETTABLE set in the "flags" field - * from vaQueryDisplayAttributes() can be set. If the attribute is not settable or - * the value is out of range, the function returns VA_STATUS_ERROR_ATTR_NOT_SUPPORTED - */ -VAStatus vaSetDisplayAttributes ( - VADisplay dpy, - VADisplayAttribute *attr_list, - int num_attributes -); - -#ifdef __cplusplus -} -#endif - -#endif /* _VA_H_ */ diff -Nru libva-1.0.1/src/va_version.h.in libva-1.0.1-3+0.31.1/src/va_version.h.in --- libva-1.0.1/src/va_version.h.in 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/src/va_version.h.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,87 +0,0 @@ -/* - * Copyright (C) 2009 Splitted-Desktop Systems. All Rights Reserved. - * - * 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, sub license, 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 (including the - * next paragraph) 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 NON-INFRINGEMENT. - * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#ifndef VA_VERSION_H -#define VA_VERSION_H - -/** - * VA_MAJOR_VERSION: - * - * The major version of the VA library (1, if %VA_VERSION is 1.2.3) - */ -#define VA_MAJOR_VERSION (@LIBVA_MAJOR_VERSION@) - -/** - * VA_MINOR_VERSION: - * - * The minor version of the VA library (2, if %VA_VERSION is 1.2.3) - */ -#define VA_MINOR_VERSION (@LIBVA_MINOR_VERSION@) - -/** - * VA_MICRO_VERSION: - * - * The micro version of the VA library (3, if %VA_VERSION is 1.2.3) - */ -#define VA_MICRO_VERSION (@LIBVA_MICRO_VERSION@) - -/** - * VA_VERSION: - * - * The full version of the VA library, like 1.2.3 - */ -#define VA_VERSION @LIBVA_VERSION@ - -/** - * VA_VERSION_S: - * - * The full version of the VA library, in string form (suited for - * string concatenation) - */ -#define VA_VERSION_S "@LIBVA_VERSION@" - -/** - * VA_VERSION_HEX: - * - * Numerically encoded version of the VA library, like 0x010203 - */ -#define VA_VERSION_HEX ((VA_MAJOR_VERSION << 24) | \ - (VA_MINOR_VERSION << 16) | \ - (VA_MICRO_VERSION << 8)) - -/** - * VA_CHECK_VERSION: - * @major: major version, like 1 in 1.2.3 - * @minor: minor version, like 2 in 1.2.3 - * @micro: micro version, like 3 in 1.2.3 - * - * Evaluates to %TRUE if the version of the VA library is greater - * than @major, @minor and @micro - */ -#define VA_CHECK_VERSION(major,minor,micro) \ - (VA_MAJOR_VERSION > (major) || \ - (VA_MAJOR_VERSION == (major) && VA_MINOR_VERSION > (minor)) || \ - (VA_MAJOR_VERSION == (major) && VA_MINOR_VERSION == (minor) && VA_MICRO_VERSION >= (micro))) - -#endif /* VA_VERSION_H */ diff -Nru libva-1.0.1/src/x11/dri1_util.c libva-1.0.1-3+0.31.1/src/x11/dri1_util.c --- libva-1.0.1/src/x11/dri1_util.c 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/src/x11/dri1_util.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,157 +0,0 @@ -#include -#include -#include -#include -#include - -#include - -#include "X11/Xlib.h" -#include "va.h" -#include "va_backend.h" - -#include "va_dri.h" -#include "va_dricommon.h" - -struct dri1_drawable -{ - struct dri_drawable base; - union dri_buffer buffer; - int width; - int height; -}; - -static struct dri_drawable * -dri1CreateDrawable(VADriverContextP ctx, XID x_drawable) -{ - struct dri1_drawable *dri1_drawable; - - dri1_drawable = calloc(1, sizeof(*dri1_drawable)); - - if (!dri1_drawable) - return NULL; - - dri1_drawable->base.x_drawable = x_drawable; - - return &dri1_drawable->base; -} - -static void -dri1DestroyDrawable(VADriverContextP ctx, struct dri_drawable *dri_drawable) -{ - free(dri_drawable); -} - -static void -dri1SwapBuffer(VADriverContextP ctx, struct dri_drawable *dri_drawable) -{ - -} - -static union dri_buffer * -dri1GetRenderingBuffer(VADriverContextP ctx, struct dri_drawable *dri_drawable) -{ - struct dri1_drawable *dri1_drawable = (struct dri1_drawable *)dri_drawable; - - return &dri1_drawable->buffer; -} - -static void -dri1Close(VADriverContextP ctx) -{ - struct dri_state *dri_state = (struct dri_state *)ctx->dri_state; - - free_drawable_hashtable(ctx); - VA_DRIDestroyContext(ctx->x11_dpy, ctx->x11_screen, dri_state->hwContextID); - assert(dri_state->pSAREA != MAP_FAILED); - drmUnmap(dri_state->pSAREA, SAREA_MAX); - assert(dri_state->fd >= 0); - drmCloseOnce(dri_state->fd); - VA_DRICloseConnection(ctx->x11_dpy, ctx->x11_screen); -} - -Bool -isDRI1Connected(VADriverContextP ctx, char **driver_name) -{ - struct dri_state *dri_state = (struct dri_state *)ctx->dri_state; - int direct_capable; - int driver_major; - int driver_minor; - int driver_patch; - int newlyopened; - char *BusID; - drm_magic_t magic; - - *driver_name = NULL; - dri_state->fd = -1; - dri_state->pSAREA = MAP_FAILED; - dri_state->driConnectedFlag = VA_NONE; - - if (!VA_DRIQueryDirectRenderingCapable(ctx->x11_dpy, - ctx->x11_screen, - &direct_capable)) - goto err_out0; - - if (!direct_capable) - goto err_out0; - - if (!VA_DRIGetClientDriverName(ctx->x11_dpy, ctx->x11_screen, - &driver_major, &driver_minor, - &driver_patch, driver_name)) - goto err_out0; - - if (!VA_DRIOpenConnection(ctx->x11_dpy, ctx->x11_screen, - &dri_state->hSAREA, &BusID)) - goto err_out0; - - - dri_state->fd = drmOpenOnce(NULL, BusID, &newlyopened); - XFree(BusID); - - if (dri_state->fd < 0) - goto err_out1; - - - if (drmGetMagic(dri_state->fd, &magic)) - goto err_out1; - - if (newlyopened && !VA_DRIAuthConnection(ctx->x11_dpy, ctx->x11_screen, magic)) - goto err_out1; - - if (drmMap(dri_state->fd, dri_state->hSAREA, SAREA_MAX, &dri_state->pSAREA)) - goto err_out1; - - if (!VA_DRICreateContext(ctx->x11_dpy, ctx->x11_screen, - DefaultVisual(ctx->x11_dpy, ctx->x11_screen), - &dri_state->hwContextID, &dri_state->hwContext)) - goto err_out1; - - dri_state->driConnectedFlag = VA_DRI1; - dri_state->createDrawable = dri1CreateDrawable; - dri_state->destroyDrawable = dri1DestroyDrawable; - dri_state->swapBuffer = dri1SwapBuffer; - dri_state->getRenderingBuffer = dri1GetRenderingBuffer; - dri_state->close = dri1Close; - - return True; - -err_out1: - if (dri_state->pSAREA != MAP_FAILED) - drmUnmap(dri_state->pSAREA, SAREA_MAX); - - if (dri_state->fd >= 0) - drmCloseOnce(dri_state->fd); - - VA_DRICloseConnection(ctx->x11_dpy, ctx->x11_screen); - -err_out0: - if (*driver_name) - XFree(*driver_name); - - dri_state->pSAREA = MAP_FAILED; - dri_state->fd = -1; - *driver_name = NULL; - - return False; -} - diff -Nru libva-1.0.1/src/x11/dri2_util.c libva-1.0.1-3+0.31.1/src/x11/dri2_util.c --- libva-1.0.1/src/x11/dri2_util.c 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/src/x11/dri2_util.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,200 +0,0 @@ -#include -#include -#include -#include - -#include - -#include -#include -#include "va.h" -#include "va_backend.h" - -#include "va_dri2.h" -#include "va_dri2tokens.h" -#include "va_dricommon.h" - -#define __DRI_BUFFER_FRONT_LEFT 0 -#define __DRI_BUFFER_BACK_LEFT 1 -#define __DRI_BUFFER_FRONT_RIGHT 2 -#define __DRI_BUFFER_BACK_RIGHT 3 -#define __DRI_BUFFER_DEPTH 4 -#define __DRI_BUFFER_STENCIL 5 -#define __DRI_BUFFER_ACCUM 6 -#define __DRI_BUFFER_FAKE_FRONT_LEFT 7 -#define __DRI_BUFFER_FAKE_FRONT_RIGHT 8 - -struct dri2_drawable -{ - struct dri_drawable base; - union dri_buffer buffers[5]; - int width; - int height; - int has_backbuffer; - int back_index; - int front_index; -}; - -static struct dri_drawable * -dri2CreateDrawable(VADriverContextP ctx, XID x_drawable) -{ - struct dri2_drawable *dri2_drawable; - - dri2_drawable = calloc(1, sizeof(*dri2_drawable)); - - if (!dri2_drawable) - return NULL; - - dri2_drawable->base.x_drawable = x_drawable; - dri2_drawable->base.x = 0; - dri2_drawable->base.y = 0; - VA_DRI2CreateDrawable(ctx->x11_dpy, x_drawable); - - return &dri2_drawable->base; -} - -static void -dri2DestroyDrawable(VADriverContextP ctx, struct dri_drawable *dri_drawable) -{ - VA_DRI2DestroyDrawable(ctx->x11_dpy, dri_drawable->x_drawable); - free(dri_drawable); -} - -static void -dri2SwapBuffer(VADriverContextP ctx, struct dri_drawable *dri_drawable) -{ - struct dri2_drawable *dri2_drawable = (struct dri2_drawable *)dri_drawable; - XRectangle xrect; - XserverRegion region; - - if (dri2_drawable->has_backbuffer) { - xrect.x = 0; - xrect.y = 0; - xrect.width = dri2_drawable->width; - xrect.height = dri2_drawable->height; - - region = XFixesCreateRegion(ctx->x11_dpy, &xrect, 1); - VA_DRI2CopyRegion(ctx->x11_dpy, dri_drawable->x_drawable, region, - DRI2BufferFrontLeft, DRI2BufferBackLeft); - XFixesDestroyRegion(ctx->x11_dpy, region); - } -} - -static union dri_buffer * -dri2GetRenderingBuffer(VADriverContextP ctx, struct dri_drawable *dri_drawable) -{ - struct dri2_drawable *dri2_drawable = (struct dri2_drawable *)dri_drawable; - int i; - int count; - unsigned int attachments[5]; - VA_DRI2Buffer *buffers; - - i = 0; - attachments[i++] = __DRI_BUFFER_BACK_LEFT; - attachments[i++] = __DRI_BUFFER_FRONT_LEFT; - buffers = VA_DRI2GetBuffers(ctx->x11_dpy, dri_drawable->x_drawable, - &dri2_drawable->width, &dri2_drawable->height, - attachments, i, &count); - assert(buffers); - if (buffers == NULL) - return NULL; - - dri2_drawable->has_backbuffer = 0; - - for (i = 0; i < count; i++) { - dri2_drawable->buffers[i].dri2.attachment = buffers[i].attachment; - dri2_drawable->buffers[i].dri2.name = buffers[i].name; - dri2_drawable->buffers[i].dri2.pitch = buffers[i].pitch; - dri2_drawable->buffers[i].dri2.cpp = buffers[i].cpp; - dri2_drawable->buffers[i].dri2.flags = buffers[i].flags; - - if (buffers[i].attachment == __DRI_BUFFER_BACK_LEFT) { - dri2_drawable->has_backbuffer = 1; - dri2_drawable->back_index = i; - } - - if (buffers[i].attachment == __DRI_BUFFER_FRONT_LEFT) - dri2_drawable->front_index = i; - } - - dri_drawable->width = dri2_drawable->width; - dri_drawable->height = dri2_drawable->height; - Xfree(buffers); - - if (dri2_drawable->has_backbuffer) - return &dri2_drawable->buffers[dri2_drawable->back_index]; - - return &dri2_drawable->buffers[dri2_drawable->front_index]; -} - -static void -dri2Close(VADriverContextP ctx) -{ - struct dri_state *dri_state = (struct dri_state *)ctx->dri_state; - - free_drawable_hashtable(ctx); - assert(dri_state->fd >= 0); - close(dri_state->fd); -} - -Bool -isDRI2Connected(VADriverContextP ctx, char **driver_name) -{ - struct dri_state *dri_state = (struct dri_state *)ctx->dri_state; - int major, minor; - int error_base; - int event_base; - char *device_name = NULL; - drm_magic_t magic; - *driver_name = NULL; - dri_state->fd = -1; - dri_state->driConnectedFlag = VA_NONE; - if (!VA_DRI2QueryExtension(ctx->x11_dpy, &event_base, &error_base)) - goto err_out; - - if (!VA_DRI2QueryVersion(ctx->x11_dpy, &major, &minor)) - goto err_out; - - - if (!VA_DRI2Connect(ctx->x11_dpy, RootWindow(ctx->x11_dpy, ctx->x11_screen), - driver_name, &device_name)) - goto err_out; - - dri_state->fd = open(device_name, O_RDWR); - assert(dri_state->fd >= 0); - - if (dri_state->fd < 0) - goto err_out; - - if (drmGetMagic(dri_state->fd, &magic)) - goto err_out; - - if (!VA_DRI2Authenticate(ctx->x11_dpy, RootWindow(ctx->x11_dpy, ctx->x11_screen), - magic)) - goto err_out; - - dri_state->driConnectedFlag = VA_DRI2; - dri_state->createDrawable = dri2CreateDrawable; - dri_state->destroyDrawable = dri2DestroyDrawable; - dri_state->swapBuffer = dri2SwapBuffer; - dri_state->getRenderingBuffer = dri2GetRenderingBuffer; - dri_state->close = dri2Close; - - return True; - -err_out: - if (device_name) - Xfree(device_name); - - if (*driver_name) - Xfree(*driver_name); - - if (dri_state->fd >= 0) - close(dri_state->fd); - - *driver_name = NULL; - dri_state->fd = -1; - - return False; -} - diff -Nru libva-1.0.1/src/x11/Makefile.am libva-1.0.1-3+0.31.1/src/x11/Makefile.am --- libva-1.0.1/src/x11/Makefile.am 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/src/x11/Makefile.am 1970-01-01 00:00:00.000000000 +0000 @@ -1,30 +0,0 @@ -# INTEL CONFIDENTIAL -# Copyright 2007 Intel Corporation. All Rights Reserved. -# -# The source code contained or described herein and all documents related to -# the source code ("Material") are owned by Intel Corporation or its suppliers -# or licensors. Title to the Material remains with Intel Corporation or its -# suppliers and licensors. The Material may contain trade secrets and -# proprietary and confidential information of Intel Corporation and its -# suppliers and licensors, and is protected by worldwide copyright and trade -# secret laws and treaty provisions. No part of the Material may be used, -# copied, reproduced, modified, published, uploaded, posted, transmitted, -# distributed, or disclosed in any way without Intel's prior express written -# permission. -# -# No license under any patent, copyright, trade secret or other intellectual -# property right is granted to or conferred upon you by disclosure or delivery -# of the Materials, either expressly, by implication, inducement, estoppel or -# otherwise. Any license under such intellectual property rights must be -# express and approved by Intel in writing. - -AM_CFLAGS = -DLINUX -DIN_LIBVA -I$(top_srcdir)/src $(DRM_CFLAGS) - -noinst_LTLIBRARIES = libva_x11.la - -libva_x11includedir = ${includedir}/va -libva_x11include_HEADERS = va_x11.h va_dri.h va_dri2.h va_dricommon.h - -libva_x11_la_SOURCES = va_x11.c va_dri.c va_dri2.c va_dricommon.c dri2_util.c dri1_util.c va_nvctrl.c - -EXTRA_DIST = va_dristr.h va_dri2str.h va_dri2tokens.h va_nvctrl.h diff -Nru libva-1.0.1/src/x11/Makefile.in libva-1.0.1-3+0.31.1/src/x11/Makefile.in --- libva-1.0.1/src/x11/Makefile.in 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/src/x11/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,591 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ - -# INTEL CONFIDENTIAL -# Copyright 2007 Intel Corporation. All Rights Reserved. -# -# The source code contained or described herein and all documents related to -# the source code ("Material") are owned by Intel Corporation or its suppliers -# or licensors. Title to the Material remains with Intel Corporation or its -# suppliers and licensors. The Material may contain trade secrets and -# proprietary and confidential information of Intel Corporation and its -# suppliers and licensors, and is protected by worldwide copyright and trade -# secret laws and treaty provisions. No part of the Material may be used, -# copied, reproduced, modified, published, uploaded, posted, transmitted, -# distributed, or disclosed in any way without Intel's prior express written -# permission. -# -# No license under any patent, copyright, trade secret or other intellectual -# property right is granted to or conferred upon you by disclosure or delivery -# of the Materials, either expressly, by implication, inducement, estoppel or -# otherwise. Any license under such intellectual property rights must be -# express and approved by Intel in writing. - - -VPATH = @srcdir@ -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 = src/x11 -DIST_COMMON = $(libva_x11include_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libva_x11_la_LIBADD = -am_libva_x11_la_OBJECTS = dri1_util.lo dri2_util.lo libdrm_glue.lo \ - va_dri.lo va_dri2.lo va_dricommon.lo va_fglext.lo va_nvctrl.lo \ - va_x11.lo -libva_x11_la_OBJECTS = $(am_libva_x11_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -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 = $(libva_x11_la_SOURCES) -DIST_SOURCES = $(libva_x11_la_SOURCES) -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__installdirs = "$(DESTDIR)$(libva_x11includedir)" -HEADERS = $(libva_x11include_HEADERS) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DRM_CFLAGS = @DRM_CFLAGS@ -DRM_LIBS = @DRM_LIBS@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GEN4ASM_CFLAGS = @GEN4ASM_CFLAGS@ -GEN4ASM_LIBS = @GEN4ASM_LIBS@ -GL_DEPS_CFLAGS = @GL_DEPS_CFLAGS@ -GL_DEPS_LIBS = @GL_DEPS_LIBS@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVA_CFLAGS = @LIBVA_CFLAGS@ -LIBVA_DRIVERS_PATH = @LIBVA_DRIVERS_PATH@ -LIBVA_LIBS = @LIBVA_LIBS@ -LIBVA_LT_LDFLAGS = @LIBVA_LT_LDFLAGS@ -LIBVA_LT_VERSION = @LIBVA_LT_VERSION@ -LIBVA_MAJOR_VERSION = @LIBVA_MAJOR_VERSION@ -LIBVA_MICRO_VERSION = @LIBVA_MICRO_VERSION@ -LIBVA_MINOR_VERSION = @LIBVA_MINOR_VERSION@ -LIBVA_SDS_VERSION = @LIBVA_SDS_VERSION@ -LIBVA_VERSION = @LIBVA_VERSION@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -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@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -X11_CFLAGS = @X11_CFLAGS@ -X11_LIBS = @X11_LIBS@ -XEXT_CFLAGS = @XEXT_CFLAGS@ -XEXT_LIBS = @XEXT_LIBS@ -XFIXES_CFLAGS = @XFIXES_CFLAGS@ -XFIXES_LIBS = @XFIXES_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -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@ -libvabackendlib = @libvabackendlib@ -libvacorelib = @libvacorelib@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -pkgconfigdir = @pkgconfigdir@ -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@ -AM_CFLAGS = -DLINUX -DIN_LIBVA -I$(top_srcdir)/src $(DRM_CFLAGS) -noinst_LTLIBRARIES = libva_x11.la -libva_x11includedir = ${includedir}/va -libva_x11include_HEADERS = va_x11.h va_dri.h va_dri2.h va_dricommon.h -libva_x11_la_SOURCES = \ - dri1_util.c \ - dri2_util.c \ - libdrm_glue.c \ - va_dri.c \ - va_dri2.c \ - va_dricommon.c \ - va_fglext.c \ - va_nvctrl.c \ - va_x11.c \ - $(NULL) - -EXTRA_DIST = \ - libdrm_glue.h \ - va_dri2str.h \ - va_dri2tokens.h \ - va_dristr.h \ - va_fglext.h \ - va_nvctrl.h \ - $(NULL) - -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/x11/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/x11/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_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 -libva_x11.la: $(libva_x11_la_OBJECTS) $(libva_x11_la_DEPENDENCIES) - $(LINK) $(libva_x11_la_OBJECTS) $(libva_x11_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dri1_util.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dri2_util.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrm_glue.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/va_dri.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/va_dri2.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/va_dricommon.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/va_fglext.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/va_nvctrl.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/va_x11.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 -install-libva_x11includeHEADERS: $(libva_x11include_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(libva_x11includedir)" || $(MKDIR_P) "$(DESTDIR)$(libva_x11includedir)" - @list='$(libva_x11include_HEADERS)'; test -n "$(libva_x11includedir)" || list=; \ - 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)$(libva_x11includedir)'"; \ - $(INSTALL_HEADER) $$files "$(DESTDIR)$(libva_x11includedir)" || exit $$?; \ - done - -uninstall-libva_x11includeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(libva_x11include_HEADERS)'; test -n "$(libva_x11includedir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(libva_x11includedir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(libva_x11includedir)" && rm -f $$files - -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) - @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 -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) $(HEADERS) -installdirs: - for dir in "$(DESTDIR)$(libva_x11includedir)"; 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: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -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) - -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-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: install-libva_x11includeHEADERS - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -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 -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-libva_x11includeHEADERS - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir 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-libva_x11includeHEADERS install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-libva_x11includeHEADERS - - -# 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: diff -Nru libva-1.0.1/src/x11/va_dri2.c libva-1.0.1-3+0.31.1/src/x11/va_dri2.c --- libva-1.0.1/src/x11/va_dri2.c 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/src/x11/va_dri2.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,307 +0,0 @@ -/* - * Copyright © 2008 Red Hat, Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Soft- - * ware"), to deal in the Software without restriction, including without - * limitation the rights to use, copy, modify, merge, publish, distribute, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, provided that the above copyright - * notice(s) and this permission notice appear in all copies of the Soft- - * ware and that both the above copyright notice(s) and this permission - * notice appear in supporting documentation. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- - * ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY - * RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN - * THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSE- - * QUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFOR- - * MANCE OF THIS SOFTWARE. - * - * Except as contained in this notice, the name of a copyright holder shall - * not be used in advertising or otherwise to promote the sale, use or - * other dealings in this Software without prior written authorization of - * the copyright holder. - * - * Authors: - * Kristian Høgsberg (krh@redhat.com) - */ - - -#define NEED_REPLIES -#include -#include -#include -#include "xf86drm.h" -#include "va_dri2.h" -#include "va_dri2str.h" -#include "va_dri2tokens.h" - -#ifndef DRI2DriverDRI -#define DRI2DriverDRI 0 -#endif - -static char va_dri2ExtensionName[] = DRI2_NAME; -static XExtensionInfo _va_dri2_info_data; -static XExtensionInfo *va_dri2Info = &_va_dri2_info_data; -static XEXT_GENERATE_CLOSE_DISPLAY (VA_DRI2CloseDisplay, va_dri2Info) -static /* const */ XExtensionHooks va_dri2ExtensionHooks = { - NULL, /* create_gc */ - NULL, /* copy_gc */ - NULL, /* flush_gc */ - NULL, /* free_gc */ - NULL, /* create_font */ - NULL, /* free_font */ - VA_DRI2CloseDisplay, /* close_display */ - NULL, /* wire_to_event */ - NULL, /* event_to_wire */ - NULL, /* error */ - NULL, /* error_string */ -}; - -static XEXT_GENERATE_FIND_DISPLAY (DRI2FindDisplay, va_dri2Info, - va_dri2ExtensionName, - &va_dri2ExtensionHooks, - 0, NULL) - -Bool VA_DRI2QueryExtension(Display *dpy, int *eventBase, int *errorBase) -{ - XExtDisplayInfo *info = DRI2FindDisplay(dpy); - - if (XextHasExtension(info)) { - *eventBase = info->codes->first_event; - *errorBase = info->codes->first_error; - return True; - } - - return False; -} - -Bool VA_DRI2QueryVersion(Display *dpy, int *major, int *minor) -{ - XExtDisplayInfo *info = DRI2FindDisplay (dpy); - xDRI2QueryVersionReply rep; - xDRI2QueryVersionReq *req; - - XextCheckExtension (dpy, info, va_dri2ExtensionName, False); - - LockDisplay(dpy); - GetReq(DRI2QueryVersion, req); - req->reqType = info->codes->major_opcode; - req->dri2ReqType = X_DRI2QueryVersion; - req->majorVersion = DRI2_MAJOR; - req->minorVersion = DRI2_MINOR; - if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { - UnlockDisplay(dpy); - SyncHandle(); - return False; - } - *major = rep.majorVersion; - *minor = rep.minorVersion; - UnlockDisplay(dpy); - SyncHandle(); - - return True; -} - -Bool VA_DRI2Connect(Display *dpy, XID window, - char **driverName, char **deviceName) -{ - XExtDisplayInfo *info = DRI2FindDisplay(dpy); - xDRI2ConnectReply rep; - xDRI2ConnectReq *req; - - XextCheckExtension (dpy, info, va_dri2ExtensionName, False); - - LockDisplay(dpy); - GetReq(DRI2Connect, req); - req->reqType = info->codes->major_opcode; - req->dri2ReqType = X_DRI2Connect; - req->window = window; - req->driverType = DRI2DriverDRI; - if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { - UnlockDisplay(dpy); - SyncHandle(); - return False; - } - - if (rep.driverNameLength == 0 && rep.deviceNameLength == 0) { - UnlockDisplay(dpy); - SyncHandle(); - return False; - } - - *driverName = Xmalloc(rep.driverNameLength + 1); - if (*driverName == NULL) { - _XEatData(dpy, - ((rep.driverNameLength + 3) & ~3) + - ((rep.deviceNameLength + 3) & ~3)); - UnlockDisplay(dpy); - SyncHandle(); - return False; - } - _XReadPad(dpy, *driverName, rep.driverNameLength); - (*driverName)[rep.driverNameLength] = '\0'; - - *deviceName = Xmalloc(rep.deviceNameLength + 1); - if (*deviceName == NULL) { - Xfree(*driverName); - _XEatData(dpy, ((rep.deviceNameLength + 3) & ~3)); - UnlockDisplay(dpy); - SyncHandle(); - return False; - } - _XReadPad(dpy, *deviceName, rep.deviceNameLength); - (*deviceName)[rep.deviceNameLength] = '\0'; - - UnlockDisplay(dpy); - SyncHandle(); - - return True; -} - -Bool VA_DRI2Authenticate(Display *dpy, XID window, drm_magic_t magic) -{ - XExtDisplayInfo *info = DRI2FindDisplay(dpy); - xDRI2AuthenticateReq *req; - xDRI2AuthenticateReply rep; - - XextCheckExtension (dpy, info, va_dri2ExtensionName, False); - - LockDisplay(dpy); - GetReq(DRI2Authenticate, req); - req->reqType = info->codes->major_opcode; - req->dri2ReqType = X_DRI2Authenticate; - req->window = window; - req->magic = magic; - - if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { - UnlockDisplay(dpy); - SyncHandle(); - return False; - } - - UnlockDisplay(dpy); - SyncHandle(); - - return rep.authenticated; -} - -void VA_DRI2CreateDrawable(Display *dpy, XID drawable) -{ - XExtDisplayInfo *info = DRI2FindDisplay(dpy); - xDRI2CreateDrawableReq *req; - - XextSimpleCheckExtension (dpy, info, va_dri2ExtensionName); - - LockDisplay(dpy); - GetReq(DRI2CreateDrawable, req); - req->reqType = info->codes->major_opcode; - req->dri2ReqType = X_DRI2CreateDrawable; - req->drawable = drawable; - UnlockDisplay(dpy); - SyncHandle(); -} - -void VA_DRI2DestroyDrawable(Display *dpy, XID drawable) -{ - XExtDisplayInfo *info = DRI2FindDisplay(dpy); - xDRI2DestroyDrawableReq *req; - - XextSimpleCheckExtension (dpy, info, va_dri2ExtensionName); - - XSync(dpy, False); - - LockDisplay(dpy); - GetReq(DRI2DestroyDrawable, req); - req->reqType = info->codes->major_opcode; - req->dri2ReqType = X_DRI2DestroyDrawable; - req->drawable = drawable; - UnlockDisplay(dpy); - SyncHandle(); -} - -VA_DRI2Buffer *VA_DRI2GetBuffers(Display *dpy, XID drawable, - int *width, int *height, - unsigned int *attachments, int count, - int *outCount) -{ - XExtDisplayInfo *info = DRI2FindDisplay(dpy); - xDRI2GetBuffersReply rep; - xDRI2GetBuffersReq *req; - VA_DRI2Buffer *buffers; - xDRI2Buffer repBuffer; - CARD32 *p; - int i; - - XextCheckExtension (dpy, info, va_dri2ExtensionName, False); - - LockDisplay(dpy); - GetReqExtra(DRI2GetBuffers, count * 4, req); - req->reqType = info->codes->major_opcode; - req->dri2ReqType = X_DRI2GetBuffers; - req->drawable = drawable; - req->count = count; - p = (CARD32 *) &req[1]; - for (i = 0; i < count; i++) - p[i] = attachments[i]; - - if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { - UnlockDisplay(dpy); - SyncHandle(); - return NULL; - } - - *width = rep.width; - *height = rep.height; - *outCount = rep.count; - - buffers = Xmalloc(rep.count * sizeof buffers[0]); - if (buffers == NULL) { - _XEatData(dpy, rep.count * sizeof repBuffer); - UnlockDisplay(dpy); - SyncHandle(); - return NULL; - } - - for (i = 0; i < rep.count; i++) { - _XReadPad(dpy, (char *) &repBuffer, sizeof repBuffer); - buffers[i].attachment = repBuffer.attachment; - buffers[i].name = repBuffer.name; - buffers[i].pitch = repBuffer.pitch; - buffers[i].cpp = repBuffer.cpp; - buffers[i].flags = repBuffer.flags; - } - - UnlockDisplay(dpy); - SyncHandle(); - - return buffers; -} - -void VA_DRI2CopyRegion(Display *dpy, XID drawable, XserverRegion region, - CARD32 dest, CARD32 src) -{ - XExtDisplayInfo *info = DRI2FindDisplay(dpy); - xDRI2CopyRegionReq *req; - xDRI2CopyRegionReply rep; - - XextSimpleCheckExtension (dpy, info, va_dri2ExtensionName); - - LockDisplay(dpy); - GetReq(DRI2CopyRegion, req); - req->reqType = info->codes->major_opcode; - req->dri2ReqType = X_DRI2CopyRegion; - req->drawable = drawable; - req->region = region; - req->dest = dest; - req->src = src; - - _XReply(dpy, (xReply *)&rep, 0, xFalse); - - UnlockDisplay(dpy); - SyncHandle(); -} diff -Nru libva-1.0.1/src/x11/va_dri2.h libva-1.0.1-3+0.31.1/src/x11/va_dri2.h --- libva-1.0.1/src/x11/va_dri2.h 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/src/x11/va_dri2.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,71 +0,0 @@ -/* - * Copyright © 2007,2008 Red Hat, Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Soft- - * ware"), to deal in the Software without restriction, including without - * limitation the rights to use, copy, modify, merge, publish, distribute, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, provided that the above copyright - * notice(s) and this permission notice appear in all copies of the Soft- - * ware and that both the above copyright notice(s) and this permission - * notice appear in supporting documentation. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- - * ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY - * RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN - * THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSE- - * QUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFOR- - * MANCE OF THIS SOFTWARE. - * - * Except as contained in this notice, the name of a copyright holder shall - * not be used in advertising or otherwise to promote the sale, use or - * other dealings in this Software without prior written authorization of - * the copyright holder. - * - * Authors: - * Kristian Høgsberg (krh@redhat.com) - */ - -#ifndef _VA_DRI2_H_ -#define _VA_DRI2_H_ - -#include -#include -#include - -typedef struct { - unsigned int attachment; - unsigned int name; - unsigned int pitch; - unsigned int cpp; - unsigned int flags; -} VA_DRI2Buffer; - -extern Bool -VA_DRI2QueryExtension(Display *display, int *eventBase, int *errorBase); -extern Bool -VA_DRI2QueryVersion(Display *display, int *major, int *minor); -extern Bool -VA_DRI2Connect(Display *display, XID window, - char **driverName, char **deviceName); -extern Bool -VA_DRI2Authenticate(Display *display, XID window, drm_magic_t magic); -extern void -VA_DRI2CreateDrawable(Display *display, XID drawable); -extern void -VA_DRI2DestroyDrawable(Display *display, XID handle); -extern VA_DRI2Buffer * -VA_DRI2GetBuffers(Display *dpy, XID drawable, - int *width, int *height, - unsigned int *attachments, int count, - int *outCount); -#if 0 -extern void -VA_DRI2CopyRegion(Display *dpy, XID drawable, XserverRegion region, - CARD32 dest, CARD32 src); -#endif -#endif diff -Nru libva-1.0.1/src/x11/va_dri2str.h libva-1.0.1-3+0.31.1/src/x11/va_dri2str.h --- libva-1.0.1/src/x11/va_dri2str.h 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/src/x11/va_dri2str.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,193 +0,0 @@ -/* - * Copyright © 2008 Red Hat, Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Soft- - * ware"), to deal in the Software without restriction, including without - * limitation the rights to use, copy, modify, merge, publish, distribute, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, provided that the above copyright - * notice(s) and this permission notice appear in all copies of the Soft- - * ware and that both the above copyright notice(s) and this permission - * notice appear in supporting documentation. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- - * ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY - * RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN - * THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSE- - * QUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFOR- - * MANCE OF THIS SOFTWARE. - * - * Except as contained in this notice, the name of a copyright holder shall - * not be used in advertising or otherwise to promote the sale, use or - * other dealings in this Software without prior written authorization of - * the copyright holder. - * - * Authors: - * Kristian Høgsberg (krh@redhat.com) - */ - -#ifndef _DRI2_PROTO_H_ -#define _DRI2_PROTO_H_ - -#define DRI2_NAME "DRI2" -#define DRI2_MAJOR 1 -#define DRI2_MINOR 0 - -#define DRI2NumberErrors 0 -#define DRI2NumberEvents 0 -#define DRI2NumberRequests 7 - -#define X_DRI2QueryVersion 0 -#define X_DRI2Connect 1 -#define X_DRI2Authenticate 2 -#define X_DRI2CreateDrawable 3 -#define X_DRI2DestroyDrawable 4 -#define X_DRI2GetBuffers 5 -#define X_DRI2CopyRegion 6 - -typedef struct { - CARD32 attachment B32; - CARD32 name B32; - CARD32 pitch B32; - CARD32 cpp B32; - CARD32 flags B32; -} xDRI2Buffer; - -typedef struct { - CARD8 reqType; - CARD8 dri2ReqType; - CARD16 length B16; - CARD32 majorVersion B32; - CARD32 minorVersion B32; -} xDRI2QueryVersionReq; -#define sz_xDRI2QueryVersionReq 12 - -typedef struct { - BYTE type; /* X_Reply */ - BYTE pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 majorVersion B32; - CARD32 minorVersion B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; -} xDRI2QueryVersionReply; -#define sz_xDRI2QueryVersionReply 32 - -typedef struct { - CARD8 reqType; - CARD8 dri2ReqType; - CARD16 length B16; - CARD32 window B32; - CARD32 driverType B32; -} xDRI2ConnectReq; -#define sz_xDRI2ConnectReq 12 - -typedef struct { - BYTE type; /* X_Reply */ - BYTE pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 driverNameLength B32; - CARD32 deviceNameLength B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; -} xDRI2ConnectReply; -#define sz_xDRI2ConnectReply 32 - -typedef struct { - CARD8 reqType; - CARD8 dri2ReqType; - CARD16 length B16; - CARD32 window B32; - CARD32 magic B32; -} xDRI2AuthenticateReq; -#define sz_xDRI2AuthenticateReq 12 - -typedef struct { - BYTE type; /* X_Reply */ - BYTE pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 authenticated B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xDRI2AuthenticateReply; -#define sz_xDRI2AuthenticateReply 32 - -typedef struct { - CARD8 reqType; - CARD8 dri2ReqType; - CARD16 length B16; - CARD32 drawable B32; -} xDRI2CreateDrawableReq; -#define sz_xDRI2CreateDrawableReq 8 - -typedef struct { - CARD8 reqType; - CARD8 dri2ReqType; - CARD16 length B16; - CARD32 drawable B32; -} xDRI2DestroyDrawableReq; -#define sz_xDRI2DestroyDrawableReq 8 - -typedef struct { - CARD8 reqType; - CARD8 dri2ReqType; - CARD16 length B16; - CARD32 drawable B32; - CARD32 count B32; -} xDRI2GetBuffersReq; -#define sz_xDRI2GetBuffersReq 12 - -typedef struct { - BYTE type; /* X_Reply */ - BYTE pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 width B32; - CARD32 height B32; - CARD32 count B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; -} xDRI2GetBuffersReply; -#define sz_xDRI2GetBuffersReply 32 - -typedef struct { - CARD8 reqType; - CARD8 dri2ReqType; - CARD16 length B16; - CARD32 drawable B32; - CARD32 region B32; - CARD32 dest B32; - CARD32 src B32; -} xDRI2CopyRegionReq; -#define sz_xDRI2CopyRegionReq 20 - -typedef struct { - BYTE type; /* X_Reply */ - BYTE pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; - CARD32 pad7 B32; -} xDRI2CopyRegionReply; -#define sz_xDRI2CopyRegionReply 32 - -#endif diff -Nru libva-1.0.1/src/x11/va_dri2tokens.h libva-1.0.1-3+0.31.1/src/x11/va_dri2tokens.h --- libva-1.0.1/src/x11/va_dri2tokens.h 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/src/x11/va_dri2tokens.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright © 2008 Red Hat, Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Soft- - * ware"), to deal in the Software without restriction, including without - * limitation the rights to use, copy, modify, merge, publish, distribute, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, provided that the above copyright - * notice(s) and this permission notice appear in all copies of the Soft- - * ware and that both the above copyright notice(s) and this permission - * notice appear in supporting documentation. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- - * ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY - * RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN - * THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSE- - * QUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFOR- - * MANCE OF THIS SOFTWARE. - * - * Except as contained in this notice, the name of a copyright holder shall - * not be used in advertising or otherwise to promote the sale, use or - * other dealings in this Software without prior written authorization of - * the copyright holder. - * - * Authors: - * Kristian Høgsberg (krh@redhat.com) - */ - -#ifndef _DRI2_TOKENS_H_ -#define _DRI2_TOKENS_H_ - -#define DRI2BufferFrontLeft 0 -#define DRI2BufferBackLeft 1 -#define DRI2BufferFrontRight 2 -#define DRI2BufferBackRight 3 -#define DRI2BufferDepth 4 -#define DRI2BufferStencil 5 -#define DRI2BufferAccum 6 -#define DRI2BufferFakeFrontLeft 7 -#define DRI2BufferFakeFrontRight 8 - -#define DRI2DriverDRI 0 - -#endif diff -Nru libva-1.0.1/src/x11/va_dri.c libva-1.0.1-3+0.31.1/src/x11/va_dri.c --- libva-1.0.1/src/x11/va_dri.c 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/src/x11/va_dri.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,624 +0,0 @@ -/* $XFree86: xc/lib/GL/dri/XF86dri.c,v 1.13 2002/10/30 12:51:25 alanh Exp $ */ -/************************************************************************** - -Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. -Copyright 2000 VA Linux Systems, Inc. -Copyright 2007 Intel Corporation -All Rights Reserved. - -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, sub license, 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 (including the -next paragraph) 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 NON-INFRINGEMENT. -IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR -ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -**************************************************************************/ - -/* - * Authors: - * Kevin E. Martin - * Jens Owen - * Rickard E. (Rik) Faith - * - */ - -/* THIS IS NOT AN X CONSORTIUM STANDARD */ - -#define NEED_REPLIES -#include -#include -#include -#include "va_dristr.h" - -#define PUBLIC - -static XExtensionInfo _va_dri_info_data; -static XExtensionInfo *va_dri_info = &_va_dri_info_data; -static char va_dri_extension_name[] = VA_DRINAME; - -#define VA_DRICheckExtension(dpy,i,val) \ - XextCheckExtension (dpy, i, va_dri_extension_name, val) - -/***************************************************************************** - * * - * private utility routines * - * * - *****************************************************************************/ - -static int close_display(Display *dpy, XExtCodes *extCodes); -static /* const */ XExtensionHooks va_dri_extension_hooks = { - NULL, /* create_gc */ - NULL, /* copy_gc */ - NULL, /* flush_gc */ - NULL, /* free_gc */ - NULL, /* create_font */ - NULL, /* free_font */ - close_display, /* close_display */ - NULL, /* wire_to_event */ - NULL, /* event_to_wire */ - NULL, /* error */ - NULL, /* error_string */ -}; - -static XEXT_GENERATE_FIND_DISPLAY (find_display, va_dri_info, - va_dri_extension_name, - &va_dri_extension_hooks, - 0, NULL) - -static XEXT_GENERATE_CLOSE_DISPLAY (close_display, va_dri_info) - - -/***************************************************************************** - * * - * public XFree86-DRI Extension routines * - * * - *****************************************************************************/ - -#if 0 -#include -#define TRACE(msg) fprintf(stderr,"XF86DRI%s\n", msg); -#else -#define TRACE(msg) -#endif - - -PUBLIC Bool VA_DRIQueryExtension (dpy, event_basep, error_basep) - Display *dpy; - int *event_basep, *error_basep; -{ - XExtDisplayInfo *info = find_display (dpy); - - TRACE("QueryExtension..."); - if (XextHasExtension(info)) { - *event_basep = info->codes->first_event; - *error_basep = info->codes->first_error; - TRACE("QueryExtension... return True"); - return True; - } else { - TRACE("QueryExtension... return False"); - return False; - } -} - -PUBLIC Bool VA_DRIQueryVersion(dpy, majorVersion, minorVersion, patchVersion) - Display* dpy; - int* majorVersion; - int* minorVersion; - int* patchVersion; -{ - XExtDisplayInfo *info = find_display (dpy); - xVA_DRIQueryVersionReply rep; - xVA_DRIQueryVersionReq *req; - - TRACE("QueryVersion..."); - VA_DRICheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(VA_DRIQueryVersion, req); - req->reqType = info->codes->major_opcode; - req->driReqType = X_VA_DRIQueryVersion; - if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { - UnlockDisplay(dpy); - SyncHandle(); - TRACE("QueryVersion... return False"); - return False; - } - *majorVersion = rep.majorVersion; - *minorVersion = rep.minorVersion; - *patchVersion = rep.patchVersion; - UnlockDisplay(dpy); - SyncHandle(); - TRACE("QueryVersion... return True"); - return True; -} - -PUBLIC Bool VA_DRIQueryDirectRenderingCapable(dpy, screen, isCapable) - Display* dpy; - int screen; - Bool* isCapable; -{ - XExtDisplayInfo *info = find_display (dpy); - xVA_DRIQueryDirectRenderingCapableReply rep; - xVA_DRIQueryDirectRenderingCapableReq *req; - - TRACE("QueryDirectRenderingCapable..."); - VA_DRICheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(VA_DRIQueryDirectRenderingCapable, req); - req->reqType = info->codes->major_opcode; - req->driReqType = X_VA_DRIQueryDirectRenderingCapable; - req->screen = screen; - if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { - UnlockDisplay(dpy); - SyncHandle(); - TRACE("QueryDirectRenderingCapable... return False"); - return False; - } - *isCapable = rep.isCapable; - UnlockDisplay(dpy); - SyncHandle(); - TRACE("QueryDirectRenderingCapable... return True"); - return True; -} - -PUBLIC Bool VA_DRIOpenConnection(dpy, screen, hSAREA, busIdString) - Display* dpy; - int screen; - drm_handle_t * hSAREA; - char **busIdString; -{ - XExtDisplayInfo *info = find_display (dpy); - xVA_DRIOpenConnectionReply rep; - xVA_DRIOpenConnectionReq *req; - - TRACE("OpenConnection..."); - VA_DRICheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(VA_DRIOpenConnection, req); - req->reqType = info->codes->major_opcode; - req->driReqType = X_VA_DRIOpenConnection; - req->screen = screen; - if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { - UnlockDisplay(dpy); - SyncHandle(); - TRACE("OpenConnection... return False"); - return False; - } - - *hSAREA = rep.hSAREALow; - if (sizeof(drm_handle_t) == 8) { - int shift = 32; /* var to prevent warning on next line */ - *hSAREA |= ((drm_handle_t) rep.hSAREAHigh) << shift; - } - - if (rep.length) { - if (!(*busIdString = (char *)Xcalloc(rep.busIdStringLength + 1, 1))) { - _XEatData(dpy, ((rep.busIdStringLength+3) & ~3)); - UnlockDisplay(dpy); - SyncHandle(); - TRACE("OpenConnection... return False"); - return False; - } - _XReadPad(dpy, *busIdString, rep.busIdStringLength); - } else { - *busIdString = NULL; - } - UnlockDisplay(dpy); - SyncHandle(); - TRACE("OpenConnection... return True"); - return True; -} - -PUBLIC Bool VA_DRIAuthConnection(dpy, screen, magic) - Display* dpy; - int screen; - drm_magic_t magic; -{ - XExtDisplayInfo *info = find_display (dpy); - xVA_DRIAuthConnectionReq *req; - xVA_DRIAuthConnectionReply rep; - - TRACE("AuthConnection..."); - VA_DRICheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(VA_DRIAuthConnection, req); - req->reqType = info->codes->major_opcode; - req->driReqType = X_VA_DRIAuthConnection; - req->screen = screen; - req->magic = magic; - rep.authenticated = 0; - if (!_XReply(dpy, (xReply *)&rep, 0, xFalse) || !rep.authenticated) { - UnlockDisplay(dpy); - SyncHandle(); - TRACE("AuthConnection... return False"); - return False; - } - UnlockDisplay(dpy); - SyncHandle(); - TRACE("AuthConnection... return True"); - return True; -} - -PUBLIC Bool VA_DRICloseConnection(dpy, screen) - Display* dpy; - int screen; -{ - XExtDisplayInfo *info = find_display (dpy); - xVA_DRICloseConnectionReq *req; - - TRACE("CloseConnection..."); - - VA_DRICheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(VA_DRICloseConnection, req); - req->reqType = info->codes->major_opcode; - req->driReqType = X_VA_DRICloseConnection; - req->screen = screen; - UnlockDisplay(dpy); - SyncHandle(); - TRACE("CloseConnection... return True"); - return True; -} - -PUBLIC Bool VA_DRIGetClientDriverName(dpy, screen, ddxDriverMajorVersion, - ddxDriverMinorVersion, ddxDriverPatchVersion, clientDriverName) - Display* dpy; - int screen; - int* ddxDriverMajorVersion; - int* ddxDriverMinorVersion; - int* ddxDriverPatchVersion; - char** clientDriverName; -{ - XExtDisplayInfo *info = find_display (dpy); - xVA_DRIGetClientDriverNameReply rep; - xVA_DRIGetClientDriverNameReq *req; - - TRACE("GetClientDriverName..."); - VA_DRICheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(VA_DRIGetClientDriverName, req); - req->reqType = info->codes->major_opcode; - req->driReqType = X_VA_DRIGetClientDriverName; - req->screen = screen; - if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { - UnlockDisplay(dpy); - SyncHandle(); - TRACE("GetClientDriverName... return False"); - return False; - } - - *ddxDriverMajorVersion = rep.ddxDriverMajorVersion; - *ddxDriverMinorVersion = rep.ddxDriverMinorVersion; - *ddxDriverPatchVersion = rep.ddxDriverPatchVersion; - - if (rep.length) { - if (!(*clientDriverName = (char *)Xcalloc(rep.clientDriverNameLength + 1, 1))) { - _XEatData(dpy, ((rep.clientDriverNameLength+3) & ~3)); - UnlockDisplay(dpy); - SyncHandle(); - TRACE("GetClientDriverName... return False"); - return False; - } - _XReadPad(dpy, *clientDriverName, rep.clientDriverNameLength); - } else { - *clientDriverName = NULL; - } - UnlockDisplay(dpy); - SyncHandle(); - TRACE("GetClientDriverName... return True"); - return True; -} - -PUBLIC Bool VA_DRICreateContextWithConfig(dpy, screen, configID, context, - hHWContext) - Display* dpy; - int screen; - int configID; - XID* context; - drm_context_t * hHWContext; -{ - XExtDisplayInfo *info = find_display (dpy); - xVA_DRICreateContextReply rep; - xVA_DRICreateContextReq *req; - - TRACE("CreateContext..."); - VA_DRICheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(VA_DRICreateContext, req); - req->reqType = info->codes->major_opcode; - req->driReqType = X_VA_DRICreateContext; - req->visual = configID; - req->screen = screen; - *context = XAllocID(dpy); - req->context = *context; - if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { - UnlockDisplay(dpy); - SyncHandle(); - TRACE("CreateContext... return False"); - return False; - } - *hHWContext = rep.hHWContext; - UnlockDisplay(dpy); - SyncHandle(); - TRACE("CreateContext... return True"); - return True; -} - -PUBLIC Bool VA_DRICreateContext(dpy, screen, visual, context, hHWContext) - Display* dpy; - int screen; - Visual* visual; - XID* context; - drm_context_t * hHWContext; -{ - return VA_DRICreateContextWithConfig( dpy, screen, visual->visualid, - context, hHWContext ); -} - -PUBLIC Bool VA_DRIDestroyContext( __DRInativeDisplay * ndpy, int screen, - __DRIid context ) -{ - Display * const dpy = (Display *) ndpy; - XExtDisplayInfo *info = find_display (dpy); - xVA_DRIDestroyContextReq *req; - - TRACE("DestroyContext..."); - VA_DRICheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(VA_DRIDestroyContext, req); - req->reqType = info->codes->major_opcode; - req->driReqType = X_VA_DRIDestroyContext; - req->screen = screen; - req->context = context; - UnlockDisplay(dpy); - SyncHandle(); - TRACE("DestroyContext... return True"); - return True; -} - -PUBLIC Bool VA_DRICreateDrawable( __DRInativeDisplay * ndpy, int screen, - __DRIid drawable, drm_drawable_t * hHWDrawable ) -{ - Display * const dpy = (Display *) ndpy; - XExtDisplayInfo *info = find_display (dpy); - xVA_DRICreateDrawableReply rep; - xVA_DRICreateDrawableReq *req; - - TRACE("CreateDrawable..."); - VA_DRICheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(VA_DRICreateDrawable, req); - req->reqType = info->codes->major_opcode; - req->driReqType = X_VA_DRICreateDrawable; - req->screen = screen; - req->drawable = drawable; - if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { - UnlockDisplay(dpy); - SyncHandle(); - TRACE("CreateDrawable... return False"); - return False; - } - *hHWDrawable = rep.hHWDrawable; - UnlockDisplay(dpy); - SyncHandle(); - TRACE("CreateDrawable... return True"); - return True; -} - -PUBLIC Bool VA_DRIDestroyDrawable( __DRInativeDisplay * ndpy, int screen, - __DRIid drawable ) -{ - Display * const dpy = (Display *) ndpy; - XExtDisplayInfo *info = find_display (dpy); - xVA_DRIDestroyDrawableReq *req; - - TRACE("DestroyDrawable..."); - VA_DRICheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(VA_DRIDestroyDrawable, req); - req->reqType = info->codes->major_opcode; - req->driReqType = X_VA_DRIDestroyDrawable; - req->screen = screen; - req->drawable = drawable; - UnlockDisplay(dpy); - SyncHandle(); - TRACE("DestroyDrawable... return True"); - return True; -} - -PUBLIC Bool VA_DRIGetDrawableInfo(Display* dpy, int screen, Drawable drawable, - unsigned int* index, unsigned int* stamp, - int* X, int* Y, int* W, int* H, - int* numClipRects, drm_clip_rect_t ** pClipRects, - int* backX, int* backY, - int* numBackClipRects, drm_clip_rect_t ** pBackClipRects ) -{ - XExtDisplayInfo *info = find_display (dpy); - xVA_DRIGetDrawableInfoReply rep; - xVA_DRIGetDrawableInfoReq *req; - int total_rects; - - TRACE("GetDrawableInfo..."); - VA_DRICheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(VA_DRIGetDrawableInfo, req); - req->reqType = info->codes->major_opcode; - req->driReqType = X_VA_DRIGetDrawableInfo; - req->screen = screen; - req->drawable = drawable; - - if (!_XReply(dpy, (xReply *)&rep, 1, xFalse)) - { - UnlockDisplay(dpy); - SyncHandle(); - TRACE("GetDrawableInfo... return False"); - return False; - } - *index = rep.drawableTableIndex; - *stamp = rep.drawableTableStamp; - *X = (int)rep.drawableX; - *Y = (int)rep.drawableY; - *W = (int)rep.drawableWidth; - *H = (int)rep.drawableHeight; - *numClipRects = rep.numClipRects; - total_rects = *numClipRects; - - *backX = rep.backX; - *backY = rep.backY; - *numBackClipRects = rep.numBackClipRects; - total_rects += *numBackClipRects; - -#if 0 - /* Because of the fix in Xserver/GL/dri/xf86dri.c, this check breaks - * backwards compatibility (Because of the >> 2 shift) but the fix - * enables multi-threaded apps to work. - */ - if (rep.length != ((((SIZEOF(xVA_DRIGetDrawableInfoReply) - - SIZEOF(xGenericReply) + - total_rects * sizeof(drm_clip_rect_t)) + 3) & ~3) >> 2)) { - _XEatData(dpy, rep.length); - UnlockDisplay(dpy); - SyncHandle(); - TRACE("GetDrawableInfo... return False"); - return False; - } -#endif - - if (*numClipRects) { - int len = sizeof(drm_clip_rect_t) * (*numClipRects); - - *pClipRects = (drm_clip_rect_t *)Xcalloc(len, 1); - if (*pClipRects) - _XRead(dpy, (char*)*pClipRects, len); - } else { - *pClipRects = NULL; - } - - if (*numBackClipRects) { - int len = sizeof(drm_clip_rect_t) * (*numBackClipRects); - - *pBackClipRects = (drm_clip_rect_t *)Xcalloc(len, 1); - if (*pBackClipRects) - _XRead(dpy, (char*)*pBackClipRects, len); - } else { - *pBackClipRects = NULL; - } - - UnlockDisplay(dpy); - SyncHandle(); - TRACE("GetDrawableInfo... return True"); - return True; -} - -PUBLIC Bool VA_DRIGetDeviceInfo(dpy, screen, hFrameBuffer, - fbOrigin, fbSize, fbStride, devPrivateSize, pDevPrivate) - Display* dpy; - int screen; - drm_handle_t * hFrameBuffer; - int* fbOrigin; - int* fbSize; - int* fbStride; - int* devPrivateSize; - void** pDevPrivate; -{ - XExtDisplayInfo *info = find_display (dpy); - xVA_DRIGetDeviceInfoReply rep; - xVA_DRIGetDeviceInfoReq *req; - - TRACE("GetDeviceInfo..."); - VA_DRICheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(VA_DRIGetDeviceInfo, req); - req->reqType = info->codes->major_opcode; - req->driReqType = X_VA_DRIGetDeviceInfo; - req->screen = screen; - if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { - UnlockDisplay(dpy); - SyncHandle(); - TRACE("GetDeviceInfo... return False"); - return False; - } - - *hFrameBuffer = rep.hFrameBufferLow; - if (sizeof(drm_handle_t) == 8) { - int shift = 32; /* var to prevent warning on next line */ - *hFrameBuffer |= ((drm_handle_t) rep.hFrameBufferHigh) << shift; - } - - *fbOrigin = rep.framebufferOrigin; - *fbSize = rep.framebufferSize; - *fbStride = rep.framebufferStride; - *devPrivateSize = rep.devPrivateSize; - - if (rep.length) { - if (!(*pDevPrivate = (void *)Xcalloc(rep.devPrivateSize, 1))) { - _XEatData(dpy, ((rep.devPrivateSize+3) & ~3)); - UnlockDisplay(dpy); - SyncHandle(); - TRACE("GetDeviceInfo... return False"); - return False; - } - _XRead(dpy, (char*)*pDevPrivate, rep.devPrivateSize); - } else { - *pDevPrivate = NULL; - } - - UnlockDisplay(dpy); - SyncHandle(); - TRACE("GetDeviceInfo... return True"); - return True; -} - -PUBLIC Bool VA_DRIOpenFullScreen(dpy, screen, drawable) - Display* dpy; - int screen; - Drawable drawable; -{ - /* This function and the underlying X protocol are deprecated. - */ - (void) dpy; - (void) screen; - (void) drawable; - return False; -} - -PUBLIC Bool VA_DRICloseFullScreen(dpy, screen, drawable) - Display* dpy; - int screen; - Drawable drawable; -{ - /* This function and the underlying X protocol are deprecated. - */ - (void) dpy; - (void) screen; - (void) drawable; - return True; -} - -#undef TRACE - diff -Nru libva-1.0.1/src/x11/va_dricommon.c libva-1.0.1-3+0.31.1/src/x11/va_dricommon.c --- libva-1.0.1/src/x11/va_dricommon.c 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/src/x11/va_dricommon.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,62 +0,0 @@ -#include "va_dricommon.h" - -static struct dri_drawable * -do_drawable_hash(VADriverContextP ctx, XID drawable) -{ - struct dri_state *dri_state = (struct dri_state *)ctx->dri_state; - int index = drawable % DRAWABLE_HASH_SZ; - struct dri_drawable *dri_drawable = dri_state->drawable_hash[index]; - - while (dri_drawable) { - if (dri_drawable->x_drawable == drawable) - return dri_drawable; - dri_drawable = dri_drawable->next; - } - - dri_drawable = dri_state->createDrawable(ctx, drawable); - dri_drawable->x_drawable = drawable; - dri_drawable->next = dri_state->drawable_hash[index]; - dri_state->drawable_hash[index] = dri_drawable; - - return dri_drawable; -} - -void -free_drawable_hashtable(VADriverContextP ctx) -{ - struct dri_state *dri_state = (struct dri_state *)ctx->dri_state; - int i; - struct dri_drawable *dri_drawable, *prev; - - for (i = 0; i < DRAWABLE_HASH_SZ; i++) { - dri_drawable = dri_state->drawable_hash[i]; - - while (dri_drawable) { - prev = dri_drawable; - dri_drawable = prev->next; - dri_state->destroyDrawable(ctx, prev); - } - } -} - -struct dri_drawable * -dri_get_drawable(VADriverContextP ctx, XID drawable) -{ - return do_drawable_hash(ctx, drawable); -} - -void -dri_swap_buffer(VADriverContextP ctx, struct dri_drawable *dri_drawable) -{ - struct dri_state *dri_state = (struct dri_state *)ctx->dri_state; - - dri_state->swapBuffer(ctx, dri_drawable); -} - -union dri_buffer * -dri_get_rendering_buffer(VADriverContextP ctx, struct dri_drawable *dri_drawable) -{ - struct dri_state *dri_state = (struct dri_state *)ctx->dri_state; - - return dri_state->getRenderingBuffer(ctx, dri_drawable); -} diff -Nru libva-1.0.1/src/x11/va_dricommon.h libva-1.0.1-3+0.31.1/src/x11/va_dricommon.h --- libva-1.0.1/src/x11/va_dricommon.h 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/src/x11/va_dricommon.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,68 +0,0 @@ -#ifndef _VA_DRICOMMON_H_ -#define _VA_DRICOMMON_H_ - -#include - -#include -#include -#include - -#include "va_backend.h" - -enum -{ - VA_NONE = 0, - VA_DRI1 = 1, - VA_DRI2 = 2 -}; - -union dri_buffer -{ - struct { - unsigned int attachment; - unsigned int name; - unsigned int pitch; - unsigned int cpp; - unsigned int flags; - } dri2; - - struct { - } dri1; -}; - -struct dri_drawable -{ - XID x_drawable; - int x; - int y; - unsigned int width; - unsigned int height; - struct dri_drawable *next; -}; - -#define DRAWABLE_HASH_SZ 32 -struct dri_state -{ - int fd; - int driConnectedFlag; /* 0: disconnected, 1: DRI, 2: DRI2 */ - drm_handle_t hSAREA; - drm_context_t hwContext; - drmAddress pSAREA; - XID hwContextID; - struct dri_drawable *drawable_hash[DRAWABLE_HASH_SZ]; - - struct dri_drawable *(*createDrawable)(VADriverContextP ctx, XID x_drawable); - void (*destroyDrawable)(VADriverContextP ctx, struct dri_drawable *dri_drawable); - void (*swapBuffer)(VADriverContextP ctx, struct dri_drawable *dri_drawable); - union dri_buffer *(*getRenderingBuffer)(VADriverContextP ctx, struct dri_drawable *dri_drawable); - void (*close)(VADriverContextP ctx); -}; - -Bool isDRI2Connected(VADriverContextP ctx, char **driver_name); -Bool isDRI1Connected(VADriverContextP ctx, char **driver_name); -void free_drawable_hashtable(VADriverContextP ctx); -struct dri_drawable *dri_get_drawable(VADriverContextP ctx, XID drawable); -void dri_swap_buffer(VADriverContextP ctx, struct dri_drawable *dri_drawable); -union dri_buffer *dri_get_rendering_buffer(VADriverContextP ctx, struct dri_drawable *dri_drawable); - -#endif /* _VA_DRICOMMON_H_ */ diff -Nru libva-1.0.1/src/x11/va_dri.h libva-1.0.1-3+0.31.1/src/x11/va_dri.h --- libva-1.0.1/src/x11/va_dri.h 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/src/x11/va_dri.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,120 +0,0 @@ -/* $XFree86: xc/lib/GL/dri/xf86dri.h,v 1.8 2002/10/30 12:51:25 alanh Exp $ */ -/************************************************************************** - -Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. -Copyright 2000 VA Linux Systems, Inc. -Copyright 2007 Intel Corporation -All Rights Reserved. - -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, sub license, 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 (including the -next paragraph) 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 NON-INFRINGEMENT. -IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR -ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -**************************************************************************/ - -/** - * \file xf86dri.h - * Protocol numbers and function prototypes for DRI X protocol. - * - * \author Kevin E. Martin - * \author Jens Owen - * \author Rickard E. (Rik) Faith - */ - -#ifndef _VA_DRI_H_ -#define _VA_DRI_H_ - -#include -#include - -#define X_VA_DRIQueryVersion 0 -#define X_VA_DRIQueryDirectRenderingCapable 1 -#define X_VA_DRIOpenConnection 2 -#define X_VA_DRICloseConnection 3 -#define X_VA_DRIGetClientDriverName 4 -#define X_VA_DRICreateContext 5 -#define X_VA_DRIDestroyContext 6 -#define X_VA_DRICreateDrawable 7 -#define X_VA_DRIDestroyDrawable 8 -#define X_VA_DRIGetDrawableInfo 9 -#define X_VA_DRIGetDeviceInfo 10 -#define X_VA_DRIAuthConnection 11 -#define X_VA_DRIOpenFullScreen 12 /* Deprecated */ -#define X_VA_DRICloseFullScreen 13 /* Deprecated */ - -#define VA_DRINumberEvents 0 - -#define VA_DRIClientNotLocal 0 -#define VA_DRIOperationNotSupported 1 -#define VA_DRINumberErrors (VA_DRIOperationNotSupported + 1) - -typedef unsigned long __DRIid; -typedef void __DRInativeDisplay; - -_XFUNCPROTOBEGIN - -Bool VA_DRIQueryExtension( Display *dpy, int *event_base, int *error_base ); - -Bool VA_DRIQueryVersion( Display *dpy, int *majorVersion, int *minorVersion, - int *patchVersion ); - -Bool VA_DRIQueryDirectRenderingCapable( Display *dpy, int screen, - Bool *isCapable ); - -Bool VA_DRIOpenConnection( Display *dpy, int screen, drm_handle_t *hSAREA, - char **busIDString ); - -Bool VA_DRIAuthConnection( Display *dpy, int screen, drm_magic_t magic ); - -Bool VA_DRICloseConnection( Display *dpy, int screen ); - -Bool VA_DRIGetClientDriverName( Display *dpy, int screen, - int *ddxDriverMajorVersion, int *ddxDriverMinorVersion, - int *ddxDriverPatchVersion, char **clientDriverName ); - -Bool VA_DRICreateContext( Display *dpy, int screen, Visual *visual, - XID *ptr_to_returned_context_id, drm_context_t *hHWContext ); - -Bool VA_DRICreateContextWithConfig( Display *dpy, int screen, int configID, - XID *ptr_to_returned_context_id, drm_context_t *hHWContext ); - -Bool VA_DRIDestroyContext( __DRInativeDisplay *dpy, int screen, - __DRIid context_id ); - -Bool VA_DRICreateDrawable( __DRInativeDisplay *dpy, int screen, - __DRIid drawable, drm_drawable_t *hHWDrawable ); - -Bool VA_DRIDestroyDrawable( __DRInativeDisplay *dpy, int screen, - __DRIid drawable); - -Bool VA_DRIGetDrawableInfo( Display *dpy, int screen, Drawable drawable, - unsigned int *index, unsigned int *stamp, - int *X, int *Y, int *W, int *H, - int *numClipRects, drm_clip_rect_t ** pClipRects, - int *backX, int *backY, - int *numBackClipRects, drm_clip_rect_t **pBackClipRects ); - -Bool VA_DRIGetDeviceInfo( Display *dpy, int screen, - drm_handle_t *hFrameBuffer, int *fbOrigin, int *fbSize, - int *fbStride, int *devPrivateSize, void **pDevPrivate ); - -_XFUNCPROTOEND - -#endif /* _VA_DRI_H_ */ - diff -Nru libva-1.0.1/src/x11/va_dristr.h libva-1.0.1-3+0.31.1/src/x11/va_dristr.h --- libva-1.0.1/src/x11/va_dristr.h 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/src/x11/va_dristr.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,344 +0,0 @@ -/* $XFree86: xc/lib/GL/dri/xf86dristr.h,v 1.10 2002/10/30 12:51:25 alanh Exp $ */ -/************************************************************************** - -Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. -Copyright 2000 VA Linux Systems, Inc. -Copyright 2007 Intel Corporation -All Rights Reserved. - -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, sub license, 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 (including the -next paragraph) 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 NON-INFRINGEMENT. -IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR -ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -**************************************************************************/ - -/* - * Authors: - * Kevin E. Martin - * Jens Owen - * Rickard E. (Rik) Fiath - * - */ - -#ifndef _VA_DRISTR_H_ -#define _VA_DRISTR_H_ - -#include "va_dri.h" - -#define VA_DRINAME "XFree86-DRI" - -/* The DRI version number. This was originally set to be the same of the - * XFree86 version number. However, this version is really indepedent of - * the XFree86 version. - * - * Version History: - * 4.0.0: Original - * 4.0.1: Patch to bump clipstamp when windows are destroyed, 28 May 02 - * 4.1.0: Add transition from single to multi in DRMInfo rec, 24 Jun 02 - */ -#define VA_DRI_MAJOR_VERSION 4 -#define VA_DRI_MINOR_VERSION 1 -#define VA_DRI_PATCH_VERSION 0 - -typedef struct _VA_DRIQueryVersion { - CARD8 reqType; /* always DRIReqCode */ - CARD8 driReqType; /* always X_DRIQueryVersion */ - CARD16 length B16; -} xVA_DRIQueryVersionReq; -#define sz_xVA_DRIQueryVersionReq 4 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD16 majorVersion B16; /* major version of DRI protocol */ - CARD16 minorVersion B16; /* minor version of DRI protocol */ - CARD32 patchVersion B32; /* patch version of DRI protocol */ - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xVA_DRIQueryVersionReply; -#define sz_xVA_DRIQueryVersionReply 32 - -typedef struct _VA_DRIQueryDirectRenderingCapable { - CARD8 reqType; /* always DRIReqCode */ - CARD8 driReqType; /* X_DRIQueryDirectRenderingCapable */ - CARD16 length B16; - CARD32 screen B32; -} xVA_DRIQueryDirectRenderingCapableReq; -#define sz_xVA_DRIQueryDirectRenderingCapableReq 8 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - BOOL isCapable; - BOOL pad2; - BOOL pad3; - BOOL pad4; - CARD32 pad5 B32; - CARD32 pad6 B32; - CARD32 pad7 B32; - CARD32 pad8 B32; - CARD32 pad9 B32; -} xVA_DRIQueryDirectRenderingCapableReply; -#define sz_xVA_DRIQueryDirectRenderingCapableReply 32 - -typedef struct _VA_DRIOpenConnection { - CARD8 reqType; /* always DRIReqCode */ - CARD8 driReqType; /* always X_DRIOpenConnection */ - CARD16 length B16; - CARD32 screen B32; -} xVA_DRIOpenConnectionReq; -#define sz_xVA_DRIOpenConnectionReq 8 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 hSAREALow B32; - CARD32 hSAREAHigh B32; - CARD32 busIdStringLength B32; - CARD32 pad6 B32; - CARD32 pad7 B32; - CARD32 pad8 B32; -} xVA_DRIOpenConnectionReply; -#define sz_xVA_DRIOpenConnectionReply 32 - -typedef struct _VA_DRIAuthConnection { - CARD8 reqType; /* always DRIReqCode */ - CARD8 driReqType; /* always X_DRICloseConnection */ - CARD16 length B16; - CARD32 screen B32; - CARD32 magic B32; -} xVA_DRIAuthConnectionReq; -#define sz_xVA_DRIAuthConnectionReq 12 - -typedef struct { - BYTE type; - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 authenticated B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xVA_DRIAuthConnectionReply; -#define zx_xVA_DRIAuthConnectionReply 32 - -typedef struct _VA_DRICloseConnection { - CARD8 reqType; /* always DRIReqCode */ - CARD8 driReqType; /* always X_DRICloseConnection */ - CARD16 length B16; - CARD32 screen B32; -} xVA_DRICloseConnectionReq; -#define sz_xVA_DRICloseConnectionReq 8 - -typedef struct _VA_DRIGetClientDriverName { - CARD8 reqType; /* always DRIReqCode */ - CARD8 driReqType; /* always X_DRIGetClientDriverName */ - CARD16 length B16; - CARD32 screen B32; -} xVA_DRIGetClientDriverNameReq; -#define sz_xVA_DRIGetClientDriverNameReq 8 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 ddxDriverMajorVersion B32; - CARD32 ddxDriverMinorVersion B32; - CARD32 ddxDriverPatchVersion B32; - CARD32 clientDriverNameLength B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xVA_DRIGetClientDriverNameReply; -#define sz_xVA_DRIGetClientDriverNameReply 32 - -typedef struct _VA_DRICreateContext { - CARD8 reqType; /* always DRIReqCode */ - CARD8 driReqType; /* always X_DRICreateContext */ - CARD16 length B16; - CARD32 screen B32; - CARD32 visual B32; - CARD32 context B32; -} xVA_DRICreateContextReq; -#define sz_xVA_DRICreateContextReq 16 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 hHWContext B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xVA_DRICreateContextReply; -#define sz_xVA_DRICreateContextReply 32 - -typedef struct _VA_DRIDestroyContext { - CARD8 reqType; /* always DRIReqCode */ - CARD8 driReqType; /* always X_DRIDestroyContext */ - CARD16 length B16; - CARD32 screen B32; - CARD32 context B32; -} xVA_DRIDestroyContextReq; -#define sz_xVA_DRIDestroyContextReq 12 - -typedef struct _VA_DRICreateDrawable { - CARD8 reqType; /* always DRIReqCode */ - CARD8 driReqType; /* always X_DRICreateDrawable */ - CARD16 length B16; - CARD32 screen B32; - CARD32 drawable B32; -} xVA_DRICreateDrawableReq; -#define sz_xVA_DRICreateDrawableReq 12 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 hHWDrawable B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xVA_DRICreateDrawableReply; -#define sz_xVA_DRICreateDrawableReply 32 - -typedef struct _VA_DRIDestroyDrawable { - CARD8 reqType; /* always DRIReqCode */ - CARD8 driReqType; /* always X_DRIDestroyDrawable */ - CARD16 length B16; - CARD32 screen B32; - CARD32 drawable B32; -} xVA_DRIDestroyDrawableReq; -#define sz_xVA_DRIDestroyDrawableReq 12 - -typedef struct _VA_DRIGetDrawableInfo { - CARD8 reqType; /* always DRIReqCode */ - CARD8 driReqType; /* always X_DRIGetDrawableInfo */ - CARD16 length B16; - CARD32 screen B32; - CARD32 drawable B32; -} xVA_DRIGetDrawableInfoReq; -#define sz_xVA_DRIGetDrawableInfoReq 12 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 drawableTableIndex B32; - CARD32 drawableTableStamp B32; - INT16 drawableX B16; - INT16 drawableY B16; - INT16 drawableWidth B16; - INT16 drawableHeight B16; - CARD32 numClipRects B32; - INT16 backX B16; - INT16 backY B16; - CARD32 numBackClipRects B32; -} xVA_DRIGetDrawableInfoReply; - -#define sz_xVA_DRIGetDrawableInfoReply 36 - - -typedef struct _VA_DRIGetDeviceInfo { - CARD8 reqType; /* always DRIReqCode */ - CARD8 driReqType; /* always X_DRIGetDeviceInfo */ - CARD16 length B16; - CARD32 screen B32; -} xVA_DRIGetDeviceInfoReq; -#define sz_xVA_DRIGetDeviceInfoReq 8 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 hFrameBufferLow B32; - CARD32 hFrameBufferHigh B32; - CARD32 framebufferOrigin B32; - CARD32 framebufferSize B32; - CARD32 framebufferStride B32; - CARD32 devPrivateSize B32; -} xVA_DRIGetDeviceInfoReply; -#define sz_xVA_DRIGetDeviceInfoReply 32 - -typedef struct _VA_DRIOpenFullScreen { - CARD8 reqType; /* always DRIReqCode */ - CARD8 driReqType; /* always X_DRIOpenFullScreen */ - CARD16 length B16; - CARD32 screen B32; - CARD32 drawable B32; -} xVA_DRIOpenFullScreenReq; -#define sz_xVA_DRIOpenFullScreenReq 12 - -typedef struct { - BYTE type; - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 isFullScreen B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xVA_DRIOpenFullScreenReply; -#define sz_xVA_DRIOpenFullScreenReply 32 - -typedef struct _VA_DRICloseFullScreen { - CARD8 reqType; /* always DRIReqCode */ - CARD8 driReqType; /* always X_DRICloseFullScreen */ - CARD16 length B16; - CARD32 screen B32; - CARD32 drawable B32; -} xVA_DRICloseFullScreenReq; -#define sz_xVA_DRICloseFullScreenReq 12 - -typedef struct { - BYTE type; - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; - CARD32 pad7 B32; -} xVA_DRICloseFullScreenReply; -#define sz_xVA_DRICloseFullScreenReply 32 - - -#endif /* _VA_DRISTR_H_ */ diff -Nru libva-1.0.1/src/x11/va_nvctrl.c libva-1.0.1-3+0.31.1/src/x11/va_nvctrl.c --- libva-1.0.1/src/x11/va_nvctrl.c 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/src/x11/va_nvctrl.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,399 +0,0 @@ -/* - * Copyright (c) 2008 NVIDIA, Corporation - * - * 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 (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#define _GNU_SOURCE 1 -#include - -#define NEED_REPLIES -#include -#include -#include -#include -#include -#include "va_nvctrl.h" - -#define NV_CONTROL_ERRORS 0 -#define NV_CONTROL_EVENTS 5 -#define NV_CONTROL_NAME "NV-CONTROL" - -#define NV_CTRL_TARGET_TYPE_X_SCREEN 0 -#define NV_CTRL_TARGET_TYPE_GPU 1 -#define NV_CTRL_TARGET_TYPE_FRAMELOCK 2 -#define NV_CTRL_TARGET_TYPE_VCSC 3 /* Visual Computing System */ - -#define NV_CTRL_STRING_NVIDIA_DRIVER_VERSION 3 /* R--G */ - -#define X_nvCtrlQueryExtension 0 -#define X_nvCtrlIsNv 1 -#define X_nvCtrlQueryStringAttribute 4 - -typedef struct { - CARD8 reqType; - CARD8 nvReqType; - CARD16 length B16; -} xnvCtrlQueryExtensionReq; -#define sz_xnvCtrlQueryExtensionReq 4 - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 padb1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD16 major B16; - CARD16 minor B16; - CARD32 padl4 B32; - CARD32 padl5 B32; - CARD32 padl6 B32; - CARD32 padl7 B32; - CARD32 padl8 B32; -} xnvCtrlQueryExtensionReply; -#define sz_xnvCtrlQueryExtensionReply 32 - -typedef struct { - CARD8 reqType; - CARD8 nvReqType; - CARD16 length B16; - CARD32 screen B32; -} xnvCtrlIsNvReq; -#define sz_xnvCtrlIsNvReq 8 - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 padb1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 isnv B32; - CARD32 padl4 B32; - CARD32 padl5 B32; - CARD32 padl6 B32; - CARD32 padl7 B32; - CARD32 padl8 B32; -} xnvCtrlIsNvReply; -#define sz_xnvCtrlIsNvReply 32 - -typedef struct { - CARD8 reqType; - CARD8 nvReqType; - CARD16 length B16; - CARD16 target_id B16; /* X screen number or GPU number */ - CARD16 target_type B16; /* X screen or GPU */ - CARD32 display_mask B32; - CARD32 attribute B32; -} xnvCtrlQueryStringAttributeReq; -#define sz_xnvCtrlQueryStringAttributeReq 16 - -typedef struct { - BYTE type; - BYTE pad0; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 flags B32; - CARD32 n B32; /* Length of string */ - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; - CARD32 pad7 B32; -} xnvCtrlQueryStringAttributeReply; -#define sz_xnvCtrlQueryStringAttributeReply 32 - -#define NVCTRL_EXT_NEED_CHECK (XPointer)(~0) -#define NVCTRL_EXT_NEED_NOTHING (XPointer)(0) -#define NVCTRL_EXT_NEED_TARGET_SWAP (XPointer)(1) - -static XExtensionInfo _nvctrl_ext_info_data; -static XExtensionInfo *nvctrl_ext_info = &_nvctrl_ext_info_data; -static /* const */ char *nvctrl_extension_name = NV_CONTROL_NAME; - -#define XNVCTRLCheckExtension(dpy,i,val) \ - XextCheckExtension (dpy, i, nvctrl_extension_name, val) -#define XNVCTRLSimpleCheckExtension(dpy,i) \ - XextSimpleCheckExtension (dpy, i, nvctrl_extension_name) - -static int close_display(); -static /* const */ XExtensionHooks nvctrl_extension_hooks = { - NULL, /* create_gc */ - NULL, /* copy_gc */ - NULL, /* flush_gc */ - NULL, /* free_gc */ - NULL, /* create_font */ - NULL, /* free_font */ - close_display, /* close_display */ - NULL, /* wire_to_event */ - NULL, /* event_to_wire */ - NULL, /* error */ - NULL, /* error_string */ -}; - -static XEXT_GENERATE_FIND_DISPLAY (find_display, nvctrl_ext_info, - nvctrl_extension_name, - &nvctrl_extension_hooks, - NV_CONTROL_EVENTS, NVCTRL_EXT_NEED_CHECK) - -static XEXT_GENERATE_CLOSE_DISPLAY (close_display, nvctrl_ext_info) - -static Bool XNVCTRLQueryVersion (Display *dpy, int *major, int *minor); - -/* - * NV-CONTROL versions 1.8 and 1.9 pack the target_type and target_id - * fields in reversed order. In order to talk to one of these servers, - * we need to swap these fields. - */ -static void XNVCTRLCheckTargetData(Display *dpy, XExtDisplayInfo *info, - int *target_type, int *target_id) -{ - /* Find out what the server's NV-CONTROL version is and - * setup for swapping if we need to. - */ - if (info->data == NVCTRL_EXT_NEED_CHECK) { - int major, minor; - - if (XNVCTRLQueryVersion(dpy, &major, &minor)) { - if (major == 1 && - (minor == 8 || minor == 9)) { - info->data = NVCTRL_EXT_NEED_TARGET_SWAP; - } else { - info->data = NVCTRL_EXT_NEED_NOTHING; - } - } else { - info->data = NVCTRL_EXT_NEED_NOTHING; - } - } - - /* We need to swap the target_type and target_id */ - if (info->data == NVCTRL_EXT_NEED_TARGET_SWAP) { - int tmp; - tmp = *target_type; - *target_type = *target_id; - *target_id = tmp; - } -} - - -static Bool XNVCTRLQueryExtension ( - Display *dpy, - int *event_basep, - int *error_basep -){ - XExtDisplayInfo *info = find_display (dpy); - - if (XextHasExtension(info)) { - if (event_basep) *event_basep = info->codes->first_event; - if (error_basep) *error_basep = info->codes->first_error; - return True; - } else { - return False; - } -} - - -static Bool XNVCTRLQueryVersion ( - Display *dpy, - int *major, - int *minor -){ - XExtDisplayInfo *info = find_display (dpy); - xnvCtrlQueryExtensionReply rep; - xnvCtrlQueryExtensionReq *req; - - if(!XextHasExtension(info)) - return False; - - XNVCTRLCheckExtension (dpy, info, False); - - LockDisplay (dpy); - GetReq (nvCtrlQueryExtension, req); - req->reqType = info->codes->major_opcode; - req->nvReqType = X_nvCtrlQueryExtension; - if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) { - UnlockDisplay (dpy); - SyncHandle (); - return False; - } - if (major) *major = rep.major; - if (minor) *minor = rep.minor; - UnlockDisplay (dpy); - SyncHandle (); - return True; -} - - -static Bool XNVCTRLIsNvScreen ( - Display *dpy, - int screen -){ - XExtDisplayInfo *info = find_display (dpy); - xnvCtrlIsNvReply rep; - xnvCtrlIsNvReq *req; - Bool isnv; - - if(!XextHasExtension(info)) - return False; - - XNVCTRLCheckExtension (dpy, info, False); - - LockDisplay (dpy); - GetReq (nvCtrlIsNv, req); - req->reqType = info->codes->major_opcode; - req->nvReqType = X_nvCtrlIsNv; - req->screen = screen; - if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) { - UnlockDisplay (dpy); - SyncHandle (); - return False; - } - isnv = rep.isnv; - UnlockDisplay (dpy); - SyncHandle (); - return isnv; -} - - -static Bool XNVCTRLQueryTargetStringAttribute ( - Display *dpy, - int target_type, - int target_id, - unsigned int display_mask, - unsigned int attribute, - char **ptr -){ - XExtDisplayInfo *info = find_display (dpy); - xnvCtrlQueryStringAttributeReply rep; - xnvCtrlQueryStringAttributeReq *req; - Bool exists; - int length, numbytes, slop; - - if (!ptr) return False; - - if(!XextHasExtension(info)) - return False; - - XNVCTRLCheckExtension (dpy, info, False); - XNVCTRLCheckTargetData(dpy, info, &target_type, &target_id); - - LockDisplay (dpy); - GetReq (nvCtrlQueryStringAttribute, req); - req->reqType = info->codes->major_opcode; - req->nvReqType = X_nvCtrlQueryStringAttribute; - req->target_type = target_type; - req->target_id = target_id; - req->display_mask = display_mask; - req->attribute = attribute; - if (!_XReply (dpy, (xReply *) &rep, 0, False)) { - UnlockDisplay (dpy); - SyncHandle (); - return False; - } - length = rep.length; - numbytes = rep.n; - slop = numbytes & 3; - *ptr = (char *) Xmalloc(numbytes); - if (! *ptr) { - _XEatData(dpy, length); - UnlockDisplay (dpy); - SyncHandle (); - return False; - } else { - _XRead(dpy, (char *) *ptr, numbytes); - if (slop) _XEatData(dpy, 4-slop); - } - exists = rep.flags; - UnlockDisplay (dpy); - SyncHandle (); - return exists; -} - -static Bool XNVCTRLQueryStringAttribute ( - Display *dpy, - int screen, - unsigned int display_mask, - unsigned int attribute, - char **ptr -){ - return XNVCTRLQueryTargetStringAttribute(dpy, NV_CTRL_TARGET_TYPE_X_SCREEN, - screen, display_mask, - attribute, ptr); -} - - -Bool VA_NVCTRLQueryDirectRenderingCapable( Display *dpy, int screen, - Bool *isCapable ) -{ - int event_base; - int error_base; - - if (isCapable) - *isCapable = False; - - if (!XNVCTRLQueryExtension(dpy, &event_base, &error_base)) - return False; - - if (isCapable && XNVCTRLIsNvScreen(dpy, screen)) - *isCapable = True; - - return True; -} - -Bool VA_NVCTRLGetClientDriverName( Display *dpy, int screen, - int *ddxDriverMajorVersion, int *ddxDriverMinorVersion, - int *ddxDriverPatchVersion, char **clientDriverName ) -{ - if (ddxDriverMajorVersion) - *ddxDriverMajorVersion = 0; - if (ddxDriverMinorVersion) - *ddxDriverMinorVersion = 0; - if (ddxDriverPatchVersion) - *ddxDriverPatchVersion = 0; - if (clientDriverName) - *clientDriverName = NULL; - - char *nvidia_driver_version = NULL; - if (!XNVCTRLQueryStringAttribute(dpy, screen, 0, NV_CTRL_STRING_NVIDIA_DRIVER_VERSION, &nvidia_driver_version)) - return False; - - char *end, *str = nvidia_driver_version; - unsigned long v = strtoul(str, &end, 10); - if (end && end != str) { - if (ddxDriverMajorVersion) - *ddxDriverMajorVersion = v; - if (*(str = end) == '.') { - v = strtoul(str + 1, &end, 10); - if (end && end != str && (*end == '.' || *end == '\0')) { - if (ddxDriverMinorVersion) - *ddxDriverMinorVersion = v; - if (*(str = end) == '.') { - v = strtoul(str + 1, &end, 10); - if (end && end != str && *end == '\0') { - if (ddxDriverPatchVersion) - *ddxDriverPatchVersion = v; - } - } - } - } - } - Xfree(nvidia_driver_version); - - if (clientDriverName) - *clientDriverName = strdup("nvidia"); - - return True; -} diff -Nru libva-1.0.1/src/x11/va_nvctrl.h libva-1.0.1-3+0.31.1/src/x11/va_nvctrl.h --- libva-1.0.1/src/x11/va_nvctrl.h 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/src/x11/va_nvctrl.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2008 NVIDIA, Corporation - * - * 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 (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#ifndef VA_NVCTRLLIB_H -#define VA_NVCTRLLIB_H - -#include - -Bool VA_NVCTRLQueryDirectRenderingCapable( Display *dpy, int screen, - Bool *isCapable ); - -Bool VA_NVCTRLGetClientDriverName( Display *dpy, int screen, - int *ddxDriverMajorVersion, int *ddxDriverMinorVersion, - int *ddxDriverPatchVersion, char **clientDriverName ); - -#endif /* VA_NVCTRLLIB_H */ diff -Nru libva-1.0.1/src/x11/va_x11.c libva-1.0.1-3+0.31.1/src/x11/va_x11.c --- libva-1.0.1/src/x11/va_x11.c 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/src/x11/va_x11.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,214 +0,0 @@ -/* - * Copyright (c) 2007 Intel Corporation. All Rights Reserved. - * - * 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, sub license, 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 (including the - * next paragraph) 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 NON-INFRINGEMENT. - * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#define _GNU_SOURCE 1 -#include "config.h" -#include "va.h" -#include "va_backend.h" -#include "va_x11.h" -#include "va_dri.h" -#include "va_dri2.h" -#include "va_dricommon.h" -#include "va_nvctrl.h" -#include -#include -#include -#include -#include -#include -#include -#include - -static VADisplayContextP pDisplayContexts = NULL; - -static int va_DisplayContextIsValid ( - VADisplayContextP pDisplayContext -) -{ - VADisplayContextP ctx = pDisplayContexts; - - while (ctx) - { - if (ctx == pDisplayContext && pDisplayContext->pDriverContext) - return 1; - ctx = ctx->pNext; - } - return 0; -} - -static void va_DisplayContextDestroy ( - VADisplayContextP pDisplayContext -) -{ - VADisplayContextP *ctx = &pDisplayContexts; - - /* Throw away pDisplayContext */ - while (*ctx) - { - if (*ctx == pDisplayContext) - { - *ctx = pDisplayContext->pNext; - pDisplayContext->pNext = NULL; - break; - } - ctx = &((*ctx)->pNext); - } - free(pDisplayContext->pDriverContext->dri_state); - free(pDisplayContext->pDriverContext); - free(pDisplayContext); -} - - -static VAStatus va_DRI2GetDriverName ( - VADisplayContextP pDisplayContext, - char **driver_name -) -{ - VADriverContextP ctx = pDisplayContext->pDriverContext; - - if (!isDRI2Connected(ctx, driver_name)) - return VA_STATUS_ERROR_UNKNOWN; - - return VA_STATUS_SUCCESS; -} - -static VAStatus va_DRIGetDriverName ( - VADisplayContextP pDisplayContext, - char **driver_name -) -{ - VADriverContextP ctx = pDisplayContext->pDriverContext; - - if (!isDRI1Connected(ctx, driver_name)) - return VA_STATUS_ERROR_UNKNOWN; - - return VA_STATUS_SUCCESS; -} - -static VAStatus va_NVCTRL_GetDriverName ( - VADisplayContextP pDisplayContext, - char **driver_name -) -{ - VADriverContextP ctx = pDisplayContext->pDriverContext; - int direct_capable, driver_major, driver_minor, driver_patch; - Bool result; - - result = VA_NVCTRLQueryDirectRenderingCapable(ctx->x11_dpy, ctx->x11_screen, - &direct_capable); - if (!result || !direct_capable) - return VA_STATUS_ERROR_UNKNOWN; - - result = VA_NVCTRLGetClientDriverName(ctx->x11_dpy, ctx->x11_screen, - &driver_major, &driver_minor, - &driver_patch, driver_name); - if (!result) - return VA_STATUS_ERROR_UNKNOWN; - - return VA_STATUS_SUCCESS; -} - -static VAStatus va_DisplayContextGetDriverName ( - VADisplayContextP pDisplayContext, - char **driver_name -) -{ - VAStatus vaStatus; - char *driver_name_env; - - if (driver_name) - *driver_name = NULL; - - if ((driver_name_env = getenv("LIBVA_DRIVER_NAME")) != NULL - && geteuid() == getuid()) - { - /* don't allow setuid apps to use LIBVA_DRIVER_NAME */ - *driver_name = strdup(driver_name_env); - return VA_STATUS_SUCCESS; - } - - vaStatus = va_DRI2GetDriverName(pDisplayContext, driver_name); - if (vaStatus != VA_STATUS_SUCCESS) - vaStatus = va_DRIGetDriverName(pDisplayContext, driver_name); - if (vaStatus != VA_STATUS_SUCCESS) - vaStatus = va_NVCTRL_GetDriverName(pDisplayContext, driver_name); - - return vaStatus; -} - - -VADisplay vaGetDisplay ( - Display *native_dpy /* implementation specific */ -) -{ - VADisplay dpy = NULL; - VADisplayContextP pDisplayContext = pDisplayContexts; - - if (!native_dpy) - return NULL; - - while (pDisplayContext) - { - if (pDisplayContext->pDriverContext && - pDisplayContext->pDriverContext->x11_dpy == native_dpy) - { - dpy = (VADisplay)pDisplayContext; - break; - } - pDisplayContext = pDisplayContext->pNext; - } - - if (!dpy) - { - /* create new entry */ - VADriverContextP pDriverContext; - struct dri_state *dri_state; - pDisplayContext = calloc(1, sizeof(*pDisplayContext)); - pDriverContext = calloc(1, sizeof(*pDriverContext)); - dri_state = calloc(1, sizeof(*dri_state)); - if (pDisplayContext && pDriverContext && dri_state) - { - pDriverContext->x11_dpy = native_dpy; - pDisplayContext->pNext = pDisplayContexts; - pDisplayContext->pDriverContext = pDriverContext; - pDisplayContext->vaIsValid = va_DisplayContextIsValid; - pDisplayContext->vaDestroy = va_DisplayContextDestroy; - pDisplayContext->vaGetDriverName = va_DisplayContextGetDriverName; - pDisplayContexts = pDisplayContext; - pDriverContext->dri_state = dri_state; - dpy = (VADisplay)pDisplayContext; - } - else - { - if (pDisplayContext) - free(pDisplayContext); - if (pDriverContext) - free(pDriverContext); - if (dri_state) - free(dri_state); - } - } - - return dpy; -} diff -Nru libva-1.0.1/src/x11/va_x11.h libva-1.0.1-3+0.31.1/src/x11/va_x11.h --- libva-1.0.1/src/x11/va_x11.h 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/src/x11/va_x11.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,67 +0,0 @@ -#ifndef _VA_X11_H_ -#define _VA_X11_H_ - -#ifdef IN_LIBVA -#include "va.h" -#else -#include -#endif -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Returns a suitable VADisplay for VA API - */ -VADisplay vaGetDisplay ( - Display *dpy -); - -/* - * Output rendering - * Following is the rendering interface for X windows, - * to get the decode output surface to a X drawable - * It basically performs a de-interlacing (if needed), - * color space conversion and scaling to the destination - * rectangle - */ -/* de-interlacing flags for vaPutSurface */ -#define VA_FRAME_PICTURE 0x00000000 -#define VA_TOP_FIELD 0x00000001 -#define VA_BOTTOM_FIELD 0x00000002 - -/* - * clears the drawable with background color. - * for hardware overlay based implementation this flag - * can be used to turn off the overlay - */ -#define VA_CLEAR_DRAWABLE 0x00000008 - -/* color space conversion flags for vaPutSurface */ -#define VA_SRC_BT601 0x00000010 -#define VA_SRC_BT709 0x00000020 - -VAStatus vaPutSurface ( - VADisplay dpy, - VASurfaceID surface, - Drawable draw, /* X Drawable */ - short srcx, - short srcy, - unsigned short srcw, - unsigned short srch, - short destx, - short desty, - unsigned short destw, - unsigned short desth, - VARectangle *cliprects, /* client supplied destination clip list */ - unsigned int number_cliprects, /* number of clip rects in the clip list */ - unsigned int flags /* PutSurface flags */ -); - -#ifdef __cplusplus -} -#endif - -#endif /* _VA_X11_H_ */ diff -Nru libva-1.0.1/test/basic/Makefile.am libva-1.0.1-3+0.31.1/test/basic/Makefile.am --- libva-1.0.1/test/basic/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/test/basic/Makefile.am 2010-06-02 06:46:21.000000000 +0000 @@ -0,0 +1,68 @@ +# Copyright (c) 2007 Intel Corporation. All Rights Reserved. +# +# 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, sub license, 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 (including the +# next paragraph) 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 NON-INFRINGEMENT. +# IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR +# ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +bin_PROGRAMS = test_01 test_02 test_03 test_04 test_05 test_06 \ + test_07 test_08 test_09 test_10 test_11 + +AM_CFLAGS = -I$(top_srcdir)/va -I$(top_srcdir)/src/x11 + +TEST_LIBS = $(top_builddir)/va/$(libvabackendlib) + +test_01_LDADD = $(TEST_LIBS) +test_01_SOURCES = test_01.c + +test_02_LDADD = $(TEST_LIBS) +test_02_SOURCES = test_02.c + +test_03_LDADD = $(TEST_LIBS) +test_03_SOURCES = test_03.c + +test_04_LDADD = $(TEST_LIBS) +test_04_SOURCES = test_04.c + +test_05_LDADD = $(TEST_LIBS) +test_05_SOURCES = test_05.c + +test_06_LDADD = $(TEST_LIBS) +test_06_SOURCES = test_06.c + +test_07_LDADD = $(TEST_LIBS) +test_07_SOURCES = test_07.c + +test_08_LDADD = $(TEST_LIBS) +test_08_SOURCES = test_08.c + +test_09_LDADD = $(TEST_LIBS) +test_09_SOURCES = test_09.c + +test_10_LDADD = $(TEST_LIBS) +test_10_SOURCES = test_10.c + +test_11_LDADD = $(TEST_LIBS) +test_11_SOURCES = test_11.c + +EXTRA_DIST = test_common.c + +valgrind: $(bin_PROGRAMS) + for a in $(bin_PROGRAMS); do \ + valgrind --leak-check=full --show-reachable=yes .libs/$$a; \ + done diff -Nru libva-1.0.1/test/basic/Makefile.in libva-1.0.1-3+0.31.1/test/basic/Makefile.in --- libva-1.0.1/test/basic/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/test/basic/Makefile.in 2010-04-06 06:06:26.000000000 +0000 @@ -0,0 +1,610 @@ +# Makefile.in generated by automake 1.10.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 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@ + +# Copyright (c) 2007 Intel Corporation. All Rights Reserved. +# +# 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, sub license, 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 (including the +# next paragraph) 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 NON-INFRINGEMENT. +# IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR +# ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +bin_PROGRAMS = test_01$(EXEEXT) test_02$(EXEEXT) test_03$(EXEEXT) \ + test_04$(EXEEXT) test_05$(EXEEXT) test_06$(EXEEXT) \ + test_07$(EXEEXT) test_08$(EXEEXT) test_09$(EXEEXT) \ + test_10$(EXEEXT) test_11$(EXEEXT) +subdir = test/basic +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" +binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +PROGRAMS = $(bin_PROGRAMS) +am_test_01_OBJECTS = test_01.$(OBJEXT) +test_01_OBJECTS = $(am_test_01_OBJECTS) +test_01_DEPENDENCIES = $(TEST_LIBS) +am_test_02_OBJECTS = test_02.$(OBJEXT) +test_02_OBJECTS = $(am_test_02_OBJECTS) +test_02_DEPENDENCIES = $(TEST_LIBS) +am_test_03_OBJECTS = test_03.$(OBJEXT) +test_03_OBJECTS = $(am_test_03_OBJECTS) +test_03_DEPENDENCIES = $(TEST_LIBS) +am_test_04_OBJECTS = test_04.$(OBJEXT) +test_04_OBJECTS = $(am_test_04_OBJECTS) +test_04_DEPENDENCIES = $(TEST_LIBS) +am_test_05_OBJECTS = test_05.$(OBJEXT) +test_05_OBJECTS = $(am_test_05_OBJECTS) +test_05_DEPENDENCIES = $(TEST_LIBS) +am_test_06_OBJECTS = test_06.$(OBJEXT) +test_06_OBJECTS = $(am_test_06_OBJECTS) +test_06_DEPENDENCIES = $(TEST_LIBS) +am_test_07_OBJECTS = test_07.$(OBJEXT) +test_07_OBJECTS = $(am_test_07_OBJECTS) +test_07_DEPENDENCIES = $(TEST_LIBS) +am_test_08_OBJECTS = test_08.$(OBJEXT) +test_08_OBJECTS = $(am_test_08_OBJECTS) +test_08_DEPENDENCIES = $(TEST_LIBS) +am_test_09_OBJECTS = test_09.$(OBJEXT) +test_09_OBJECTS = $(am_test_09_OBJECTS) +test_09_DEPENDENCIES = $(TEST_LIBS) +am_test_10_OBJECTS = test_10.$(OBJEXT) +test_10_OBJECTS = $(am_test_10_OBJECTS) +test_10_DEPENDENCIES = $(TEST_LIBS) +am_test_11_OBJECTS = test_11.$(OBJEXT) +test_11_OBJECTS = $(am_test_11_OBJECTS) +test_11_DEPENDENCIES = $(TEST_LIBS) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +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 = $(test_01_SOURCES) $(test_02_SOURCES) $(test_03_SOURCES) \ + $(test_04_SOURCES) $(test_05_SOURCES) $(test_06_SOURCES) \ + $(test_07_SOURCES) $(test_08_SOURCES) $(test_09_SOURCES) \ + $(test_10_SOURCES) $(test_11_SOURCES) +DIST_SOURCES = $(test_01_SOURCES) $(test_02_SOURCES) \ + $(test_03_SOURCES) $(test_04_SOURCES) $(test_05_SOURCES) \ + $(test_06_SOURCES) $(test_07_SOURCES) $(test_08_SOURCES) \ + $(test_09_SOURCES) $(test_10_SOURCES) $(test_11_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DRM_CFLAGS = @DRM_CFLAGS@ +DRM_LIBS = @DRM_LIBS@ +DSYMUTIL = @DSYMUTIL@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +GEN4ASM_CFLAGS = @GEN4ASM_CFLAGS@ +GEN4ASM_LIBS = @GEN4ASM_LIBS@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIBVA_CFLAGS = @LIBVA_CFLAGS@ +LIBVA_DRIVERS_PATH = @LIBVA_DRIVERS_PATH@ +LIBVA_LIBS = @LIBVA_LIBS@ +LIBVA_LT_LDFLAGS = @LIBVA_LT_LDFLAGS@ +LIBVA_LT_VERSION = @LIBVA_LT_VERSION@ +LIBVA_MAJOR_VERSION = @LIBVA_MAJOR_VERSION@ +LIBVA_MICRO_VERSION = @LIBVA_MICRO_VERSION@ +LIBVA_MINOR_VERSION = @LIBVA_MINOR_VERSION@ +LIBVA_VERSION = @LIBVA_VERSION@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NMEDIT = @NMEDIT@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +X11_CFLAGS = @X11_CFLAGS@ +X11_LIBS = @X11_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XFIXES_CFLAGS = @XFIXES_CFLAGS@ +XFIXES_LIBS = @XFIXES_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +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@ +libvabackendlib = @libvabackendlib@ +libvacorelib = @libvacorelib@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfigdir = @pkgconfigdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +AM_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/x11 -DIN_LIBVA +TEST_LIBS = $(top_srcdir)/src/$(libvabackendlib) +test_01_LDADD = $(TEST_LIBS) +test_01_SOURCES = test_01.c +test_02_LDADD = $(TEST_LIBS) +test_02_SOURCES = test_02.c +test_03_LDADD = $(TEST_LIBS) +test_03_SOURCES = test_03.c +test_04_LDADD = $(TEST_LIBS) +test_04_SOURCES = test_04.c +test_05_LDADD = $(TEST_LIBS) +test_05_SOURCES = test_05.c +test_06_LDADD = $(TEST_LIBS) +test_06_SOURCES = test_06.c +test_07_LDADD = $(TEST_LIBS) +test_07_SOURCES = test_07.c +test_08_LDADD = $(TEST_LIBS) +test_08_SOURCES = test_08.c +test_09_LDADD = $(TEST_LIBS) +test_09_SOURCES = test_09.c +test_10_LDADD = $(TEST_LIBS) +test_10_SOURCES = test_10.c +test_11_LDADD = $(TEST_LIBS) +test_11_SOURCES = test_11.c +EXTRA_DIST = test_common.c +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu test/basic/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu test/basic/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + if test -f $$p \ + || test -f $$p1 \ + ; then \ + f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ + else :; fi; \ + done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ + rm -f "$(DESTDIR)$(bindir)/$$f"; \ + done + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +test_01$(EXEEXT): $(test_01_OBJECTS) $(test_01_DEPENDENCIES) + @rm -f test_01$(EXEEXT) + $(LINK) $(test_01_OBJECTS) $(test_01_LDADD) $(LIBS) +test_02$(EXEEXT): $(test_02_OBJECTS) $(test_02_DEPENDENCIES) + @rm -f test_02$(EXEEXT) + $(LINK) $(test_02_OBJECTS) $(test_02_LDADD) $(LIBS) +test_03$(EXEEXT): $(test_03_OBJECTS) $(test_03_DEPENDENCIES) + @rm -f test_03$(EXEEXT) + $(LINK) $(test_03_OBJECTS) $(test_03_LDADD) $(LIBS) +test_04$(EXEEXT): $(test_04_OBJECTS) $(test_04_DEPENDENCIES) + @rm -f test_04$(EXEEXT) + $(LINK) $(test_04_OBJECTS) $(test_04_LDADD) $(LIBS) +test_05$(EXEEXT): $(test_05_OBJECTS) $(test_05_DEPENDENCIES) + @rm -f test_05$(EXEEXT) + $(LINK) $(test_05_OBJECTS) $(test_05_LDADD) $(LIBS) +test_06$(EXEEXT): $(test_06_OBJECTS) $(test_06_DEPENDENCIES) + @rm -f test_06$(EXEEXT) + $(LINK) $(test_06_OBJECTS) $(test_06_LDADD) $(LIBS) +test_07$(EXEEXT): $(test_07_OBJECTS) $(test_07_DEPENDENCIES) + @rm -f test_07$(EXEEXT) + $(LINK) $(test_07_OBJECTS) $(test_07_LDADD) $(LIBS) +test_08$(EXEEXT): $(test_08_OBJECTS) $(test_08_DEPENDENCIES) + @rm -f test_08$(EXEEXT) + $(LINK) $(test_08_OBJECTS) $(test_08_LDADD) $(LIBS) +test_09$(EXEEXT): $(test_09_OBJECTS) $(test_09_DEPENDENCIES) + @rm -f test_09$(EXEEXT) + $(LINK) $(test_09_OBJECTS) $(test_09_LDADD) $(LIBS) +test_10$(EXEEXT): $(test_10_OBJECTS) $(test_10_DEPENDENCIES) + @rm -f test_10$(EXEEXT) + $(LINK) $(test_10_OBJECTS) $(test_10_LDADD) $(LIBS) +test_11$(EXEEXT): $(test_11_OBJECTS) $(test_11_DEPENDENCIES) + @rm -f test_11$(EXEEXT) + $(LINK) $(test_11_OBJECTS) $(test_11_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_01.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_02.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_03.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_04.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_05.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_06.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_07.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_08.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_09.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_10.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_11.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(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@ mv -f $(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@ mv -f $(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 + +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; nonemtpy = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + 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; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + 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)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @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 $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: + for dir in "$(DESTDIR)$(bindir)"; 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: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: install-binPROGRAMS + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -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-binPROGRAMS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libtool ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-binPROGRAMS + + +valgrind: $(bin_PROGRAMS) + for a in $(bin_PROGRAMS); do \ + valgrind --leak-check=full --show-reachable=yes .libs/$$a; \ + done +# 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: diff -Nru libva-1.0.1/test/basic/test_01.c libva-1.0.1-3+0.31.1/test/basic/test_01.c --- libva-1.0.1/test/basic/test_01.c 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/test/basic/test_01.c 2010-02-12 12:05:55.000000000 +0000 @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2007 Intel Corporation. All Rights Reserved. + * + * 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, sub license, 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 (including the + * next paragraph) 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 NON-INFRINGEMENT. + * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +#define TEST_DESCRIPTION "Initialize & Terminate" + +#include "test_common.c" + +void pre() +{ +} + +void post() +{ +} + +void test() +{ + test_init(); + + test_terminate(); +} diff -Nru libva-1.0.1/test/basic/test_02.c libva-1.0.1-3+0.31.1/test/basic/test_02.c --- libva-1.0.1/test/basic/test_02.c 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/test/basic/test_02.c 2010-02-12 12:05:55.000000000 +0000 @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2007 Intel Corporation. All Rights Reserved. + * + * 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, sub license, 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 (including the + * next paragraph) 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 NON-INFRINGEMENT. + * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +#define TEST_DESCRIPTION "Query profiles" + +#include "test_common.c" + +void pre() +{ + test_init(); +} + +void test() +{ + test_profiles(); +} + +void post() +{ + test_terminate(); +} diff -Nru libva-1.0.1/test/basic/test_03.c libva-1.0.1-3+0.31.1/test/basic/test_03.c --- libva-1.0.1/test/basic/test_03.c 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/test/basic/test_03.c 2010-02-12 12:05:55.000000000 +0000 @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2007 Intel Corporation. All Rights Reserved. + * + * 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, sub license, 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 (including the + * next paragraph) 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 NON-INFRINGEMENT. + * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +#define TEST_DESCRIPTION "Query entrypoints for all profiles" + +#include "test_common.c" + +void pre() +{ + test_init(); + test_profiles(); +} + +void test() +{ + int max_entrypoints; + int num_entrypoints; + int i, j; + max_entrypoints = vaMaxNumEntrypoints(va_dpy); + status("vaMaxEntryPoints = %d\n", max_entrypoints); + ASSERT(max_entrypoints > 0); + + VAEntrypoint *entrypoints = malloc(max_entrypoints * sizeof(VAEntrypoint)); + ASSERT(entrypoints); + + for(i = 0; i < num_profiles; i++) + { + memset(entrypoints, 0xff, max_entrypoints * sizeof(VAEntrypoint)); + va_status = vaQueryConfigEntrypoints(va_dpy, profiles[i], entrypoints, &num_entrypoints); + ASSERT( VA_STATUS_SUCCESS == va_status ); + status("vaQueryConfigEntryPoints(%s) reports %d entrypoints\n", profile2string(profiles[i]), num_entrypoints); + ASSERT(num_entrypoints <= max_entrypoints); + ASSERT(num_entrypoints > 0); + for(j = 0; j < num_entrypoints; j++) + { + status(" entrypoint %d [%s]\n", entrypoints[j], entrypoint2string(entrypoints[j])); + } + } + + free(entrypoints); +} + +void post() +{ + test_terminate(); +} diff -Nru libva-1.0.1/test/basic/test_04.c libva-1.0.1-3+0.31.1/test/basic/test_04.c --- libva-1.0.1/test/basic/test_04.c 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/test/basic/test_04.c 2010-02-12 12:05:55.000000000 +0000 @@ -0,0 +1,84 @@ +/* + * Copyright (c) 2007 Intel Corporation. All Rights Reserved. + * + * 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, sub license, 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 (including the + * next paragraph) 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 NON-INFRINGEMENT. + * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +#define TEST_DESCRIPTION "Get config attributes for all profiles / entrypoints" + +#include "test_common.c" + +void pre() +{ + test_init(); + test_profiles(); +} + +#define DEADVALUE 0xdeaddead + +void test() +{ + VAConfigAttrib attributes[] = { + { type: VAConfigAttribRTFormat, value: DEADVALUE }, + { type: VAConfigAttribSpatialResidual, value: DEADVALUE }, + { type: VAConfigAttribSpatialClipping, value: DEADVALUE }, + { type: VAConfigAttribIntraResidual, value: DEADVALUE }, + { type: VAConfigAttribEncryption, value: DEADVALUE } + }; + int max_entrypoints; + int num_entrypoints; + int num_attribs = sizeof(attributes) / sizeof(VAConfigAttrib); + int i, j, k; + max_entrypoints = vaMaxNumEntrypoints(va_dpy); + ASSERT(max_entrypoints > 0); + VAEntrypoint *entrypoints = malloc(max_entrypoints * sizeof(VAEntrypoint)); + ASSERT(entrypoints); + + VAConfigAttrib *attrib_list = (VAConfigAttrib *) malloc(sizeof(attributes)); + ASSERT(attrib_list); + + for(i = 0; i < num_profiles; i++) + { + va_status = vaQueryConfigEntrypoints(va_dpy, profiles[i], entrypoints, &num_entrypoints); + ASSERT( VA_STATUS_SUCCESS == va_status ); + + for(j = 0; j < num_entrypoints; j++) + { + memcpy(attrib_list, attributes, sizeof(attributes)); + status("vaGetConfigAttributes for %s, %s\n", profile2string(profiles[i]), entrypoint2string(entrypoints[j])); + va_status = vaGetConfigAttributes(va_dpy, profiles[i], entrypoints[j], attrib_list, num_attribs); + ASSERT( VA_STATUS_SUCCESS == va_status ); + for(k = 0; k < num_attribs; k++) + { + status(" %d -> %08x\n", attrib_list[k].type, attrib_list[k].value); + ASSERT(attrib_list[k].value != DEADVALUE); + } + } + } + + free(attrib_list); + free(entrypoints); +} + +void post() +{ + test_terminate(); +} diff -Nru libva-1.0.1/test/basic/test_05.c libva-1.0.1-3+0.31.1/test/basic/test_05.c --- libva-1.0.1/test/basic/test_05.c 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/test/basic/test_05.c 2010-02-12 12:05:55.000000000 +0000 @@ -0,0 +1,77 @@ +/* + * Copyright (c) 2007 Intel Corporation. All Rights Reserved. + * + * 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, sub license, 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 (including the + * next paragraph) 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 NON-INFRINGEMENT. + * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +#define TEST_DESCRIPTION "Create/destroy configs for all profiles / entrypoints" + +#include "test_common.c" + +void pre() +{ + test_init(); + test_profiles(); +} + +void test() +{ + int max_entrypoints; + int num_entrypoints; + int i, j, k; + int config_count = 0; + max_entrypoints = vaMaxNumEntrypoints(va_dpy); + ASSERT(max_entrypoints > 0); + VAEntrypoint *entrypoints = malloc(max_entrypoints * sizeof(VAEntrypoint)); + ASSERT(entrypoints); + + VAConfigID *configs = malloc(max_entrypoints * num_profiles * sizeof(VAConfigID)); + + for(i = 0; i < num_profiles; i++) + { + va_status = vaQueryConfigEntrypoints(va_dpy, profiles[i], entrypoints, &num_entrypoints); + ASSERT( VA_STATUS_SUCCESS == va_status ); + + for(j = 0; j < num_entrypoints; j++) + { + status("vaCreateConfig for %s, %s\n", profile2string(profiles[i]), entrypoint2string(entrypoints[j])); + va_status = vaCreateConfig(va_dpy, profiles[i], entrypoints[j], NULL, 0, &(configs[config_count])); + ASSERT( VA_STATUS_SUCCESS == va_status ); + status("vaCreateConfig returns %08x\n", configs[config_count]); + config_count++; + } + } + + for(i = 0; i < config_count; i++) + { + status("vaDestroyConfig for config %08x\n", configs[i]); + va_status = vaDestroyConfig( va_dpy, configs[i] ); + ASSERT( VA_STATUS_SUCCESS == va_status ); + } + + free(configs); + free(entrypoints); +} + +void post() +{ + test_terminate(); +} diff -Nru libva-1.0.1/test/basic/test_06.c libva-1.0.1-3+0.31.1/test/basic/test_06.c --- libva-1.0.1/test/basic/test_06.c 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/test/basic/test_06.c 2010-02-12 12:05:55.000000000 +0000 @@ -0,0 +1,123 @@ +/* + * Copyright (c) 2007 Intel Corporation. All Rights Reserved. + * + * 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, sub license, 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 (including the + * next paragraph) 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 NON-INFRINGEMENT. + * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +#define TEST_DESCRIPTION "Get config attributes from configs" + +#include "test_common.c" + +int max_entrypoints; +VAEntrypoint *entrypoints; + +VAConfigID *configs; +int config_count = 0; + + + +void pre() +{ + int i, j, k; + + test_init(); + test_profiles(); + + max_entrypoints = vaMaxNumEntrypoints(va_dpy); + ASSERT(max_entrypoints > 0); + entrypoints = malloc(max_entrypoints * sizeof(VAEntrypoint)); + ASSERT(entrypoints); + + configs = malloc(max_entrypoints * num_profiles * sizeof(VAConfigID)); + ASSERT(configs); + + // Create configs + for(i = 0; i < num_profiles; i++) + { + int num_entrypoints; + va_status = vaQueryConfigEntrypoints(va_dpy, profiles[i], entrypoints, &num_entrypoints); + ASSERT( VA_STATUS_SUCCESS == va_status ); + + for(j = 0; j < num_entrypoints; j++) + { + va_status = vaCreateConfig(va_dpy, profiles[i], entrypoints[j], NULL, 0, &(configs[config_count])); + ASSERT( VA_STATUS_SUCCESS == va_status ); + config_count++; + } + } +} + +void test() +{ + int i, j, k; + int max_attribs; + + max_attribs = vaMaxNumConfigAttributes(va_dpy); + ASSERT(max_attribs > 0); + + VAConfigAttrib *attrib_list = malloc(max_attribs * sizeof(VAConfigAttrib)); + + config_count = 0; + for(i = 0; i < num_profiles; i++) + { + int num_entrypoints; + + va_status = vaQueryConfigEntrypoints(va_dpy, profiles[i], entrypoints, &num_entrypoints); + ASSERT( VA_STATUS_SUCCESS == va_status ); + for(j = 0; j < num_entrypoints; j++) + { + VAProfile profile= -1; + VAEntrypoint entrypoint = -1; + int num_attribs = -1; + + status("Checking vaQueryConfigAttributes for %s, %s\n", profile2string(profiles[i]), entrypoint2string(entrypoints[j])); + memset(attrib_list, 0xff, max_attribs * sizeof(VAConfigAttrib)); + + va_status = vaQueryConfigAttributes(va_dpy, configs[config_count], &profile, &entrypoint, attrib_list, &num_attribs); + config_count++; + ASSERT( VA_STATUS_SUCCESS == va_status ); + ASSERT( profile == profiles[i] ); + ASSERT( entrypoint == entrypoints[j] ); + ASSERT( num_attribs >= 0 ); + for(k = 0; k < num_attribs; k++) + { + status(" %d -> %08x\n", attrib_list[k].type, attrib_list[k].value); + ASSERT(attrib_list[k].value != VA_ATTRIB_NOT_SUPPORTED); + } + } + } + + free(attrib_list); +} + +void post() +{ + int i; + for(i = 0; i < config_count; i++) + { + va_status = vaDestroyConfig( va_dpy, configs[i] ); + ASSERT( VA_STATUS_SUCCESS == va_status ); + } + + free(configs); + free(entrypoints); + test_terminate(); +} diff -Nru libva-1.0.1/test/basic/test_07.c libva-1.0.1-3+0.31.1/test/basic/test_07.c --- libva-1.0.1/test/basic/test_07.c 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/test/basic/test_07.c 2010-02-12 12:05:55.000000000 +0000 @@ -0,0 +1,119 @@ +/* + * Copyright (c) 2007 Intel Corporation. All Rights Reserved. + * + * 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, sub license, 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 (including the + * next paragraph) 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 NON-INFRINGEMENT. + * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +#define TEST_DESCRIPTION "Create and destory surfaces" + +#include "test_common.c" + +void pre() +{ + test_init(); +} + +#define DEAD_SURFACE_ID (VASurfaceID) 0xbeefdead + +void test_unique_surfaces(VASurfaceID *surface_list1, int surface_count1, VASurfaceID *surface_list2, int surface_count2) +{ + int i,j; + + for(i = 0; i < surface_count1; i++) + { + for(j = 0; j < surface_count2; j++) + { + if ((surface_list1 == surface_list2) && (i == j)) continue; + ASSERT(surface_list1[i] != VA_INVALID_SURFACE); + ASSERT(surface_list2[j] != VA_INVALID_SURFACE); + ASSERT(surface_list1[i] != surface_list2[j]); + } + } +} + + +void test() +{ + VASurfaceID surfaces_1[1+1]; + VASurfaceID surfaces_4[4+1]; + VASurfaceID surfaces_16[16+1]; + VASurfaceID surfaces_6[6+1]; + + memset(surfaces_1, 0xff, sizeof(surfaces_1)); + memset(surfaces_4, 0xff, sizeof(surfaces_4)); + memset(surfaces_16, 0xff, sizeof(surfaces_16)); + memset(surfaces_6, 0xff, sizeof(surfaces_6)); + + status("vaCreateSurfaces 1 surface\n"); + surfaces_1[1] = DEAD_SURFACE_ID; + va_status = vaCreateSurfaces(va_dpy, 352, 288, VA_RT_FORMAT_YUV420, 1, surfaces_1); + ASSERT( VA_STATUS_SUCCESS == va_status ); + ASSERT( DEAD_SURFACE_ID == surfaces_1[1] ); /* bounds check */ + + status("vaCreateSurfaces 4 surfaces\n"); + surfaces_4[4] = DEAD_SURFACE_ID; + va_status = vaCreateSurfaces(va_dpy, 352, 288, VA_RT_FORMAT_YUV420, 4, surfaces_4); + ASSERT( VA_STATUS_SUCCESS == va_status ); + ASSERT( DEAD_SURFACE_ID == surfaces_4[4] ); /* bounds check */ + + status("vaCreateSurfaces 16 surfaces\n"); + surfaces_16[16] = DEAD_SURFACE_ID; + va_status = vaCreateSurfaces(va_dpy, 352, 288, VA_RT_FORMAT_YUV420, 16, surfaces_16); + ASSERT( VA_STATUS_SUCCESS == va_status ); + ASSERT( DEAD_SURFACE_ID == surfaces_16[16] ); /* bounds check */ + + test_unique_surfaces(surfaces_1, 1, surfaces_4, 4); + test_unique_surfaces(surfaces_4, 4, surfaces_16, 4); + test_unique_surfaces(surfaces_4, 4, surfaces_16, 16); + test_unique_surfaces(surfaces_4, 1, surfaces_16, 16); + test_unique_surfaces(surfaces_1, 16, surfaces_16, 16); + + status("vaDestroySurface 4 surfaces\n"); + va_status = vaDestroySurfaces(va_dpy, surfaces_4, 4); + ASSERT( VA_STATUS_SUCCESS == va_status ); + + status("vaCreateSurfaces 6 surfaces\n"); + surfaces_6[6] = DEAD_SURFACE_ID; + va_status = vaCreateSurfaces(va_dpy, 352, 288, VA_RT_FORMAT_YUV420, 6, surfaces_6); + ASSERT( VA_STATUS_SUCCESS == va_status ); + ASSERT( DEAD_SURFACE_ID == surfaces_6[6] ); /* bounds check */ + + test_unique_surfaces(surfaces_1, 1, surfaces_6, 6); + test_unique_surfaces(surfaces_6, 6, surfaces_16, 16); + test_unique_surfaces(surfaces_1, 6, surfaces_16, 6); + + status("vaDestroySurface 16 surfaces\n"); + va_status = vaDestroySurfaces(va_dpy, surfaces_16, 16); + ASSERT( VA_STATUS_SUCCESS == va_status ); + + status("vaDestroySurface 1 surface\n"); + va_status = vaDestroySurfaces(va_dpy, surfaces_1, 1); + ASSERT( VA_STATUS_SUCCESS == va_status ); + + status("vaDestroySurface 6 surfaces\n"); + va_status = vaDestroySurfaces(va_dpy, surfaces_6, 6); + ASSERT( VA_STATUS_SUCCESS == va_status ); +} + +void post() +{ + test_terminate(); +} diff -Nru libva-1.0.1/test/basic/test_08.c libva-1.0.1-3+0.31.1/test/basic/test_08.c --- libva-1.0.1/test/basic/test_08.c 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/test/basic/test_08.c 2010-02-12 12:05:55.000000000 +0000 @@ -0,0 +1,92 @@ +/* + * Copyright (c) 2007 Intel Corporation. All Rights Reserved. + * + * 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, sub license, 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 (including the + * next paragraph) 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 NON-INFRINGEMENT. + * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +#define TEST_DESCRIPTION "Create and destory surfaces of different sizes" + +#include "test_common.c" + +void pre() +{ + test_init(); +} + +#define DEAD_SURFACE_ID (VASurfaceID) 0xbeefdead + +void test_unique_surfaces(VASurfaceID *surface_list, int surface_count) +{ + int i,j; + + for(i = 0; i < surface_count; i++) + { + ASSERT(surface_list[i] != VA_INVALID_SURFACE); + for(j = 0; j < i; j++) + { + if (i == j) continue; + ASSERT(surface_list[i] != surface_list[j]); + } + } +} + +typedef struct test_size { int w; int h; } test_size_t; + +test_size_t test_sizes[] = { + { 10, 10 }, + { 128, 128 }, + { 176, 144 }, + { 144, 176 }, + { 352, 288 }, + { 399, 299 }, + { 640, 480 }, + { 1280, 720 } +}; + +#define NUM_SIZES (sizeof(test_sizes) / sizeof(test_size_t)) + +void test() +{ + VASurfaceID surfaces[NUM_SIZES+1]; + int i; + + memset(surfaces, 0xff, sizeof(surfaces)); + + for(i = 0; i < NUM_SIZES; i++) + { + status("vaCreateSurfaces create %dx%d surface\n", test_sizes[i].w, test_sizes[i].h); + surfaces[i+1] = DEAD_SURFACE_ID; + va_status = vaCreateSurfaces(va_dpy, test_sizes[i].w, test_sizes[i].h, VA_RT_FORMAT_YUV420, 1, &surfaces[i]); + ASSERT( VA_STATUS_SUCCESS == va_status ); + ASSERT( DEAD_SURFACE_ID == surfaces[i+1] ); + } + + test_unique_surfaces(surfaces, NUM_SIZES); + + status("vaDestroySurface all surfaces\n"); + va_status = vaDestroySurfaces(va_dpy, surfaces, NUM_SIZES); + ASSERT( VA_STATUS_SUCCESS == va_status ); +} + +void post() +{ + test_terminate(); +} diff -Nru libva-1.0.1/test/basic/test_09.c libva-1.0.1-3+0.31.1/test/basic/test_09.c --- libva-1.0.1/test/basic/test_09.c 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/test/basic/test_09.c 2010-02-12 12:05:55.000000000 +0000 @@ -0,0 +1,109 @@ +/* + * Copyright (c) 2007 Intel Corporation. All Rights Reserved. + * + * 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, sub license, 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 (including the + * next paragraph) 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 NON-INFRINGEMENT. + * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +#define TEST_DESCRIPTION "Create/destroy contexts for all profiles / entrypoints" + +#include "test_common.c" + +void pre() +{ + test_init(); + test_profiles(); +} + +void test() +{ + int max_entrypoints; + int num_entrypoints; + int i, j, k; + int config_count = 0; + max_entrypoints = vaMaxNumEntrypoints(va_dpy); + ASSERT(max_entrypoints > 0); + VAEntrypoint *entrypoints = malloc(max_entrypoints * sizeof(VAEntrypoint)); + ASSERT(entrypoints); + + VAConfigID *configs = malloc(max_entrypoints * num_profiles * sizeof(VAConfigID)); + VAContextID *contexts = malloc(max_entrypoints * num_profiles * sizeof(VAContextID)); + + for(i = 0; i < num_profiles; i++) + { + va_status = vaQueryConfigEntrypoints(va_dpy, profiles[i], entrypoints, &num_entrypoints); + ASSERT( VA_STATUS_SUCCESS == va_status ); + + for(j = 0; j < num_entrypoints; j++) + { + status("vaCreateConfig for %s, %s\n", profile2string(profiles[i]), entrypoint2string(entrypoints[j])); + va_status = vaCreateConfig(va_dpy, profiles[i], entrypoints[j], NULL, 0, &(configs[config_count])); + ASSERT( VA_STATUS_SUCCESS == va_status ); + status("vaCreateConfig returns %08x\n", configs[config_count]); + config_count++; + } + } + + int width = 352; + int height = 288; + int surface_count = 4; + int total_surfaces = config_count * surface_count; + + VASurfaceID *surfaces = malloc(total_surfaces * sizeof(VASurfaceID)); + + // TODO: Don't assume VA_RT_FORMAT_YUV420 is supported / needed for each config + va_status = vaCreateSurfaces(va_dpy, width, height, VA_RT_FORMAT_YUV420, total_surfaces, surfaces); + ASSERT( VA_STATUS_SUCCESS == va_status ); + + for(i = 0; i < config_count; i++) + { + status("vaCreateContext with config %08x\n", configs[i]); + int flags = 0; + va_status = vaCreateContext( va_dpy, configs[i], width, height, flags, surfaces + i*surface_count, surface_count, &contexts[i] ); + ASSERT( VA_STATUS_SUCCESS == va_status ); + } + + for(i = 0; i < config_count; i++) + { + status("vaDestroyContext for context %08x\n", contexts[i]); + va_status = vaDestroyContext( va_dpy, contexts[i] ); + ASSERT( VA_STATUS_SUCCESS == va_status ); + } + + for(i = 0; i < config_count; i++) + { + status("vaDestroyConfig for config %08x\n", configs[i]); + va_status = vaDestroyConfig( va_dpy, configs[i] ); + ASSERT( VA_STATUS_SUCCESS == va_status ); + } + + va_status = vaDestroySurfaces(va_dpy, surfaces, total_surfaces); + ASSERT( VA_STATUS_SUCCESS == va_status ); + + free(contexts); + free(configs); + free(surfaces); + free(entrypoints); +} + +void post() +{ + test_terminate(); +} diff -Nru libva-1.0.1/test/basic/test_10.c libva-1.0.1-3+0.31.1/test/basic/test_10.c --- libva-1.0.1/test/basic/test_10.c 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/test/basic/test_10.c 2010-02-12 12:05:55.000000000 +0000 @@ -0,0 +1,140 @@ +/* + * Copyright (c) 2007 Intel Corporation. All Rights Reserved. + * + * 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, sub license, 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 (including the + * next paragraph) 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 NON-INFRINGEMENT. + * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +#define TEST_DESCRIPTION "Create and destroy buffers" + +#include "test_common.c" + +VAConfigID config; +VAContextID context; +VASurfaceID *surfaces; +int total_surfaces; + +void pre() +{ + test_init(); + + va_status = vaCreateConfig(va_dpy, VAProfileMPEG2Main, VAEntrypointVLD, NULL, 0, &config); + ASSERT( VA_STATUS_SUCCESS == va_status ); + status("vaCreateConfig returns %08x\n", config); + + int width = 352; + int height = 288; + int surface_count = 4; + total_surfaces = surface_count; + + surfaces = malloc(total_surfaces * sizeof(VASurfaceID)); + + // TODO: Don't assume VA_RT_FORMAT_YUV420 is supported / needed for each config + va_status = vaCreateSurfaces(va_dpy, width, height, VA_RT_FORMAT_YUV420, total_surfaces, surfaces); + ASSERT( VA_STATUS_SUCCESS == va_status ); + + status("vaCreateContext with config %08x\n", config); + int flags = 0; + va_status = vaCreateContext( va_dpy, config, width, height, flags, surfaces, surface_count, &context ); + ASSERT( VA_STATUS_SUCCESS == va_status ); +} + +void test_unique_buffers(VABufferID *buffer_list, int buffer_count) +{ + int i,j; + + for(i = 0; i < buffer_count; i++) + { + for(j = 0; j < i; j++) + { + ASSERT(buffer_list[i] != buffer_list[j]); + } + } +} + +VABufferType buffer_types[] = +{ + VAPictureParameterBufferType, + VAIQMatrixBufferType, + VABitPlaneBufferType, + VASliceGroupMapBufferType, + VASliceParameterBufferType, + VASliceDataBufferType, + VAMacroblockParameterBufferType, + VAResidualDataBufferType, + VADeblockingParameterBufferType, +}; + +unsigned int buffer_sizes[] = +{ + sizeof(VAPictureParameterBufferMPEG4), + sizeof(VAIQMatrixBufferH264), + 32*1024, + 48*1024, + sizeof(VASliceParameterBufferMPEG2), + 128*1024, + sizeof(VAMacroblockParameterBufferMPEG2), + 32*1024, + 15*1024, +}; + + +#define NUM_BUFFER_TYPES (sizeof(buffer_types) / sizeof(VABufferType)) + +#define DEAD_BUFFER_ID ((VABufferID) 0x1234ffff) + +void test() +{ + VABufferID buffer_ids[NUM_BUFFER_TYPES+1]; + int i; + memset(buffer_ids, 0xff, sizeof(buffer_ids)); + for(i=0; i < NUM_BUFFER_TYPES; i++) + { + buffer_ids[i+1] = DEAD_BUFFER_ID; + va_status = vaCreateBuffer(va_dpy, context, buffer_types[i], buffer_sizes[i], 1, NULL, &buffer_ids[i]); + ASSERT( VA_STATUS_SUCCESS == va_status ); + ASSERT( DEAD_BUFFER_ID == buffer_ids[i+1] ); /* Bounds check */ + } + test_unique_buffers(buffer_ids, NUM_BUFFER_TYPES); + + for(i=0; i < NUM_BUFFER_TYPES; i++) + { + va_status = vaDestroyBuffer(va_dpy, buffer_ids[i]); + ASSERT( VA_STATUS_SUCCESS == va_status ); + } +} + +void post() +{ + status("vaDestroyContext for context %08x\n", context); + va_status = vaDestroyContext( va_dpy, context ); + ASSERT( VA_STATUS_SUCCESS == va_status ); + + status("vaDestroyConfig for config %08x\n", config); + va_status = vaDestroyConfig( va_dpy, config ); + ASSERT( VA_STATUS_SUCCESS == va_status ); + + va_status = vaDestroySurfaces(va_dpy, surfaces, total_surfaces); + ASSERT( VA_STATUS_SUCCESS == va_status ); + + free(surfaces); + + test_terminate(); +} diff -Nru libva-1.0.1/test/basic/test_11.c libva-1.0.1-3+0.31.1/test/basic/test_11.c --- libva-1.0.1/test/basic/test_11.c 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/test/basic/test_11.c 2010-02-12 12:05:55.000000000 +0000 @@ -0,0 +1,179 @@ +/* + * Copyright (c) 2007 Intel Corporation. All Rights Reserved. + * + * 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, sub license, 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 (including the + * next paragraph) 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 NON-INFRINGEMENT. + * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +#define TEST_DESCRIPTION "Map and unmap buffers" + +#include "test_common.c" + +VAConfigID config; +VAContextID context; +VASurfaceID *surfaces; +int total_surfaces; + +void pre() +{ + test_init(); + + va_status = vaCreateConfig(va_dpy, VAProfileMPEG2Main, VAEntrypointVLD, NULL, 0, &config); + ASSERT( VA_STATUS_SUCCESS == va_status ); + status("vaCreateConfig returns %08x\n", config); + + int width = 352; + int height = 288; + int surface_count = 4; + total_surfaces = surface_count; + + surfaces = malloc(total_surfaces * sizeof(VASurfaceID)); + + // TODO: Don't assume VA_RT_FORMAT_YUV420 is supported / needed for each config + va_status = vaCreateSurfaces(va_dpy, width, height, VA_RT_FORMAT_YUV420, total_surfaces, surfaces); + ASSERT( VA_STATUS_SUCCESS == va_status ); + + status("vaCreateContext with config %08x\n", config); + int flags = 0; + va_status = vaCreateContext( va_dpy, config, width, height, flags, surfaces, surface_count, &context ); + ASSERT( VA_STATUS_SUCCESS == va_status ); +} + +void test_unique_buffers(VABufferID *buffer_list, int buffer_count) +{ + int i,j; + + for(i = 0; i < buffer_count; i++) + { + for(j = 0; j < i; j++) + { + ASSERT(buffer_list[i] != buffer_list[j]); + } + } +} + +VABufferType buffer_types[] = +{ + VAPictureParameterBufferType, + VAIQMatrixBufferType, + VABitPlaneBufferType, + VASliceGroupMapBufferType, + VASliceParameterBufferType, + VASliceDataBufferType, + VAMacroblockParameterBufferType, + VAResidualDataBufferType, + VADeblockingParameterBufferType, +}; + +unsigned int buffer_sizes[] = +{ + sizeof(VAPictureParameterBufferMPEG4), + sizeof(VAIQMatrixBufferH264), + 32*1024, + 48*1024, + sizeof(VASliceParameterBufferMPEG2), + 128*1024, + sizeof(VAMacroblockParameterBufferMPEG2), + 32*1024, + 15*1024, +}; + + +#define NUM_BUFFER_TYPES (sizeof(buffer_types) / sizeof(VABufferType)) + +#define DEAD_BUFFER_ID ((VABufferID) 0x1234ffff) + +void test() +{ + VABufferID buffer_ids[NUM_BUFFER_TYPES+1]; + uint32_t *input_data[NUM_BUFFER_TYPES]; + int i, j; + memset(buffer_ids, 0xff, sizeof(buffer_ids)); + for(i=0; i < NUM_BUFFER_TYPES; i++) + { + uint32_t *data; + + input_data[i] = malloc(buffer_sizes[i]+4); + ASSERT(input_data[i]); + + /* Generate input data */ + for(j = buffer_sizes[i] / 4; j--;) + { + input_data[i][j] = random(); + } + + /* Copy to secondary buffer */ + data = malloc(buffer_sizes[i]); + ASSERT(data); + memcpy(data, input_data[i], buffer_sizes[i]); + + /* Create buffer and fill with data */ + va_status = vaCreateBuffer(va_dpy, context, buffer_types[i], buffer_sizes[i], 1, data, &buffer_ids[i]); + ASSERT( VA_STATUS_SUCCESS == va_status ); + status("vaCreateBuffer created buffer %08x of type %d\n", buffer_ids[i], buffer_types[i]); + + /* Wipe secondary buffer */ + memset(data, 0, buffer_sizes[i]); + free(data); + } + + for(i=0; i < NUM_BUFFER_TYPES; i++) + { + void *data = NULL; + /* Fetch VA Buffer */ + va_status = vaMapBuffer(va_dpy, buffer_ids[i], &data); + ASSERT( VA_STATUS_SUCCESS == va_status ); + status("vaMapBuffer mapped buffer %08x\n", buffer_ids[i]); + + /* Compare data */ + ASSERT( memcmp(input_data[i], data, buffer_sizes[i]) == 0 ); + } + + for(i=0; i < NUM_BUFFER_TYPES; i++) + { + va_status = vaUnmapBuffer(va_dpy, buffer_ids[i]); + ASSERT( VA_STATUS_SUCCESS == va_status ); + + va_status = vaDestroyBuffer(va_dpy, buffer_ids[i]); + ASSERT( VA_STATUS_SUCCESS == va_status ); + + free(input_data[i]); + } +} + + + +void post() +{ + status("vaDestroyContext for context %08x\n", context); + va_status = vaDestroyContext( va_dpy, context ); + ASSERT( VA_STATUS_SUCCESS == va_status ); + + status("vaDestroyConfig for config %08x\n", config); + va_status = vaDestroyConfig( va_dpy, config ); + ASSERT( VA_STATUS_SUCCESS == va_status ); + + va_status = vaDestroySurfaces(va_dpy, surfaces, total_surfaces); + ASSERT( VA_STATUS_SUCCESS == va_status ); + + free(surfaces); + + test_terminate(); +} diff -Nru libva-1.0.1/test/basic/test_common.c libva-1.0.1-3+0.31.1/test/basic/test_common.c --- libva-1.0.1/test/basic/test_common.c 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/test/basic/test_common.c 2010-03-08 11:52:42.000000000 +0000 @@ -0,0 +1,171 @@ +/* + * Copyright (c) 2007 Intel Corporation. All Rights Reserved. + * + * 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, sub license, 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 (including the + * next paragraph) 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 NON-INFRINGEMENT. + * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +#include + +#include "assert.h" +#include +#include +#include +#include +#include +#include + +#define ASSERT assert + +Display *dpy; +VADisplay va_dpy; +VAStatus va_status; +int major_version, minor_version; +int print_status = 0; +int num_profiles; +VAProfile *profiles = NULL; + +void pre(); +void test(); +void post(); + +void status(const char *msg, ...) +{ + if (!print_status) return; + va_list args; + printf("--- "); + va_start(args, msg); + vfprintf(stdout, msg, args); + va_end(args); +} + + +int main(int argc, const char* argv[]) +{ + const char *name = strrchr(argv[0], '/'); + if (name) + name++; + else + name = argv[0]; + printf("*** %s: %s\n", name, TEST_DESCRIPTION); + pre(); + print_status = 1; + test(); + print_status = 0; + post(); + printf("*** %s: Finished\n", name); + return 0; +} + +void test_init() +{ + dpy = XOpenDisplay(NULL); + ASSERT( dpy ); + status("XOpenDisplay: dpy = %08x\n", dpy); + + va_dpy = vaGetDisplay(dpy); + ASSERT( va_dpy ); + status("vaGetDisplay: va_dpy = %08x\n", va_dpy); + + va_status = vaInitialize(va_dpy, &major_version, &minor_version); + ASSERT( VA_STATUS_SUCCESS == va_status ); + status("vaInitialize: major = %d minor = %d\n", major_version, minor_version); +} + +void test_terminate() +{ + va_status = vaTerminate(va_dpy); + ASSERT( VA_STATUS_SUCCESS == va_status ); + status("vaTerminate\n"); + + XCloseDisplay(dpy); + status("XCloseDisplay\n"); + + if (profiles) + { + free(profiles); + profiles = NULL; + } +} + +#define PROFILE(profile) case VAProfile##profile: return("VAProfile" #profile); + +const char *profile2string(VAProfile profile) +{ + switch(profile) + { + PROFILE(MPEG2Simple) + PROFILE(MPEG2Main) + PROFILE(MPEG4Simple) + PROFILE(MPEG4AdvancedSimple) + PROFILE(MPEG4Main) + PROFILE(H264Baseline) + PROFILE(H264Main) + PROFILE(H264High) + PROFILE(VC1Simple) + PROFILE(VC1Main) + PROFILE(VC1Advanced) + } + ASSERT(0); + return "Unknown"; +} + +#define ENTRYPOINT(profile) case VAEntrypoint##profile: return("VAEntrypoint" #profile); + +const char *entrypoint2string(VAEntrypoint entrypoint) +{ + switch(entrypoint) + { + ENTRYPOINT(VLD) + ENTRYPOINT(IZZ) + ENTRYPOINT(IDCT) + ENTRYPOINT(MoComp) + ENTRYPOINT(Deblocking) + } + ASSERT(0); + return "Unknown"; +} + + +void test_profiles() +{ + int max_profiles; + int i; + max_profiles = vaMaxNumProfiles(va_dpy); + status("vaMaxNumProfiles = %d\n", max_profiles); + ASSERT(max_profiles > 0); + profiles = malloc(max_profiles * sizeof(VAProfile)); + ASSERT(profiles); + + va_status = vaQueryConfigProfiles(va_dpy, profiles, &num_profiles); + ASSERT( VA_STATUS_SUCCESS == va_status ); + + status("vaQueryConfigProfiles reports %d profiles\n", num_profiles); + ASSERT(num_profiles <= max_profiles); + ASSERT(num_profiles > 0); + + if (print_status) + { + for(i = 0; i < num_profiles; i++) + { + status(" profile %d [%s]\n", profiles[i], profile2string(profiles[i])); + } + } +} diff -Nru libva-1.0.1/test/decode/Makefile.am libva-1.0.1-3+0.31.1/test/decode/Makefile.am --- libva-1.0.1/test/decode/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/test/decode/Makefile.am 2010-06-02 06:46:21.000000000 +0000 @@ -0,0 +1,36 @@ +# Copyright (c) 2007 Intel Corporation. All Rights Reserved. +# +# 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, sub license, 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 (including the +# next paragraph) 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 NON-INFRINGEMENT. +# IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR +# ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +bin_PROGRAMS = mpeg2vldemo + +AM_CFLAGS = -I$(top_srcdir)/va -I$(top_srcdir)/src/x11 + +TEST_LIBS = $(top_builddir)/va/$(libvabackendlib) + +mpeg2vldemo_LDADD = $(TEST_LIBS) +mpeg2vldemo_SOURCES = mpeg2vldemo.c + + +valgrind: $(bin_PROGRAMS) + for a in $(bin_PROGRAMS); do \ + valgrind --leak-check=full --show-reachable=yes .libs/$$a; \ + done diff -Nru libva-1.0.1/test/decode/Makefile.in libva-1.0.1-3+0.31.1/test/decode/Makefile.in --- libva-1.0.1/test/decode/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/test/decode/Makefile.in 2010-04-06 06:06:26.000000000 +0000 @@ -0,0 +1,510 @@ +# Makefile.in generated by automake 1.10.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 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@ + +# Copyright (c) 2007 Intel Corporation. All Rights Reserved. +# +# 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, sub license, 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 (including the +# next paragraph) 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 NON-INFRINGEMENT. +# IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR +# ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +bin_PROGRAMS = mpeg2vldemo$(EXEEXT) +subdir = test/decode +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" +binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +PROGRAMS = $(bin_PROGRAMS) +am_mpeg2vldemo_OBJECTS = mpeg2vldemo.$(OBJEXT) +mpeg2vldemo_OBJECTS = $(am_mpeg2vldemo_OBJECTS) +mpeg2vldemo_DEPENDENCIES = $(TEST_LIBS) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +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 = $(mpeg2vldemo_SOURCES) +DIST_SOURCES = $(mpeg2vldemo_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DRM_CFLAGS = @DRM_CFLAGS@ +DRM_LIBS = @DRM_LIBS@ +DSYMUTIL = @DSYMUTIL@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +GEN4ASM_CFLAGS = @GEN4ASM_CFLAGS@ +GEN4ASM_LIBS = @GEN4ASM_LIBS@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIBVA_CFLAGS = @LIBVA_CFLAGS@ +LIBVA_DRIVERS_PATH = @LIBVA_DRIVERS_PATH@ +LIBVA_LIBS = @LIBVA_LIBS@ +LIBVA_LT_LDFLAGS = @LIBVA_LT_LDFLAGS@ +LIBVA_LT_VERSION = @LIBVA_LT_VERSION@ +LIBVA_MAJOR_VERSION = @LIBVA_MAJOR_VERSION@ +LIBVA_MICRO_VERSION = @LIBVA_MICRO_VERSION@ +LIBVA_MINOR_VERSION = @LIBVA_MINOR_VERSION@ +LIBVA_VERSION = @LIBVA_VERSION@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NMEDIT = @NMEDIT@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +X11_CFLAGS = @X11_CFLAGS@ +X11_LIBS = @X11_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XFIXES_CFLAGS = @XFIXES_CFLAGS@ +XFIXES_LIBS = @XFIXES_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +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@ +libvabackendlib = @libvabackendlib@ +libvacorelib = @libvacorelib@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfigdir = @pkgconfigdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +AM_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/x11 -DIN_LIBVA +TEST_LIBS = $(top_srcdir)/src/$(libvabackendlib) +mpeg2vldemo_LDADD = $(TEST_LIBS) +mpeg2vldemo_SOURCES = mpeg2vldemo.c +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu test/decode/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu test/decode/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + if test -f $$p \ + || test -f $$p1 \ + ; then \ + f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ + else :; fi; \ + done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ + rm -f "$(DESTDIR)$(bindir)/$$f"; \ + done + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +mpeg2vldemo$(EXEEXT): $(mpeg2vldemo_OBJECTS) $(mpeg2vldemo_DEPENDENCIES) + @rm -f mpeg2vldemo$(EXEEXT) + $(LINK) $(mpeg2vldemo_OBJECTS) $(mpeg2vldemo_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpeg2vldemo.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(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@ mv -f $(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@ mv -f $(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 + +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; nonemtpy = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + 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; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + 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)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @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 $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: + for dir in "$(DESTDIR)$(bindir)"; 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: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: install-binPROGRAMS + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -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-binPROGRAMS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libtool ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-binPROGRAMS + + +valgrind: $(bin_PROGRAMS) + for a in $(bin_PROGRAMS); do \ + valgrind --leak-check=full --show-reachable=yes .libs/$$a; \ + done +# 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: diff -Nru libva-1.0.1/test/decode/mpeg2vldemo.c libva-1.0.1-3+0.31.1/test/decode/mpeg2vldemo.c --- libva-1.0.1/test/decode/mpeg2vldemo.c 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/test/decode/mpeg2vldemo.c 2010-03-08 11:52:42.000000000 +0000 @@ -0,0 +1,286 @@ +/* + * Copyright (c) 2007-2008 Intel Corporation. All Rights Reserved. + * + * 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, sub license, 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 (including the + * next paragraph) 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 NON-INFRINGEMENT. + * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +/* + * it is a real program to show how VAAPI decode work, + * It does VLD decode for a simple MPEG2 clip "mpeg2-I.m2v" + * "mpeg2-I.m2v" and VA parameters are hardcoded into mpeg2vldemo.c, + * See mpeg2-I.jif to know how those VA parameters come from + * + * gcc -o mpeg2vldemo mpeg2vldemo.c -lva -lva-x11 -I/usr/include/va + * ./mpeg2vldemo : only do decode + * ./mpeg2vldemo : decode+display + * + */ +#include +#include +#include +#include +#include + +#include + +#include +#include +#include + +#include + +#include +#include + +#define CHECK_VASTATUS(va_status,func) \ +if (va_status != VA_STATUS_SUCCESS) { \ + fprintf(stderr,"%s:%s (%d) failed,exit\n", __func__, func, __LINE__); \ + exit(1); \ +} + +/* Data dump of a 16x16 MPEG2 video clip,it has one I frame + */ +static unsigned char mpeg2_clip[]={ + 0x00,0x00,0x01,0xb3,0x01,0x00,0x10,0x13,0xff,0xff,0xe0,0x18,0x00,0x00,0x01,0xb5, + 0x14,0x8a,0x00,0x01,0x00,0x00,0x00,0x00,0x01,0xb8,0x00,0x08,0x00,0x00,0x00,0x00, + 0x01,0x00,0x00,0x0f,0xff,0xf8,0x00,0x00,0x01,0xb5,0x8f,0xff,0xf3,0x41,0x80,0x00, + 0x00,0x01,0x01,0x13,0xe1,0x00,0x15,0x81,0x54,0xe0,0x2a,0x05,0x43,0x00,0x2d,0x60, + 0x18,0x01,0x4e,0x82,0xb9,0x58,0xb1,0x83,0x49,0xa4,0xa0,0x2e,0x05,0x80,0x4b,0x7a, + 0x00,0x01,0x38,0x20,0x80,0xe8,0x05,0xff,0x60,0x18,0xe0,0x1d,0x80,0x98,0x01,0xf8, + 0x06,0x00,0x54,0x02,0xc0,0x18,0x14,0x03,0xb2,0x92,0x80,0xc0,0x18,0x94,0x42,0x2c, + 0xb2,0x11,0x64,0xa0,0x12,0x5e,0x78,0x03,0x3c,0x01,0x80,0x0e,0x80,0x18,0x80,0x6b, + 0xca,0x4e,0x01,0x0f,0xe4,0x32,0xc9,0xbf,0x01,0x42,0x69,0x43,0x50,0x4b,0x01,0xc9, + 0x45,0x80,0x50,0x01,0x38,0x65,0xe8,0x01,0x03,0xf3,0xc0,0x76,0x00,0xe0,0x03,0x20, + 0x28,0x18,0x01,0xa9,0x34,0x04,0xc5,0xe0,0x0b,0x0b,0x04,0x20,0x06,0xc0,0x89,0xff, + 0x60,0x12,0x12,0x8a,0x2c,0x34,0x11,0xff,0xf6,0xe2,0x40,0xc0,0x30,0x1b,0x7a,0x01, + 0xa9,0x0d,0x00,0xac,0x64 +}; + +/* hardcoded here without a bitstream parser helper + * please see picture mpeg2-I.jpg for bitstream details + */ +static VAPictureParameterBufferMPEG2 pic_param={ + horizontal_size:16, + vertical_size:16, + forward_reference_picture:0xffffffff, + backward_reference_picture:0xffffffff, + picture_coding_type:1, + f_code:0xffff, + { + { + intra_dc_precision:0, + picture_structure:3, + top_field_first:0, + frame_pred_frame_dct:1, + concealment_motion_vectors:0, + q_scale_type:0, + intra_vlc_format:0, + alternate_scan:0, + repeat_first_field:0, + progressive_frame:1 , + is_first_field:1 + }, + } +}; + +/* see MPEG2 spec65 for the defines of matrix */ +static VAIQMatrixBufferMPEG2 iq_matrix = { + load_intra_quantiser_matrix:1, + load_non_intra_quantiser_matrix:1, + load_chroma_intra_quantiser_matrix:0, + load_chroma_non_intra_quantiser_matrix:0, + intra_quantiser_matrix:{ + 8, 16, 16, 19, 16, 19, 22, 22, + 22, 22, 22, 22, 26, 24, 26, 27, + 27, 27, 26, 26, 26, 26, 27, 27, + 27, 29, 29, 29, 34, 34, 34, 29, + 29, 29, 27, 27, 29, 29, 32, 32, + 34, 34, 37, 38, 37, 35, 35, 34, + 35, 38, 38, 40, 40, 40, 48, 48, + 46, 46, 56, 56, 58, 69, 69, 83 + }, + non_intra_quantiser_matrix:{16}, + chroma_intra_quantiser_matrix:{0}, + chroma_non_intra_quantiser_matrix:{0} +}; + +static VASliceParameterBufferMPEG2 slice_param={ + slice_data_size:150, + slice_data_offset:0, + slice_data_flag:0, + macroblock_offset:38,/* 4byte + 6bits=38bits */ + slice_vertical_position:0, + quantiser_scale_code:2, + intra_slice_flag:0 +}; + +#define CLIP_WIDTH 16 +#define CLIP_HEIGHT 16 + +#define WIN_WIDTH (CLIP_WIDTH<<1) +#define WIN_HEIGHT (CLIP_HEIGHT<<1) + +int main(int argc,char **argv) +{ + VAEntrypoint entrypoints[5]; + int num_entrypoints,vld_entrypoint; + VAConfigAttrib attrib; + VAConfigID config_id; + VASurfaceID surface_id; + VAContextID context_id; + VABufferID pic_param_buf,iqmatrix_buf,slice_param_buf,slice_data_buf; + int major_ver, minor_ver; + Display *x11_display; + VADisplay va_dpy; + VAStatus va_status; + int putsurface=0; + + if (argc > 1) + putsurface=1; + + x11_display = XOpenDisplay(":0.0"); + + if (x11_display == NULL) { + fprintf(stderr, "Can't connect X server!\n"); + exit(-1); + } + + assert(x11_display); + + va_dpy = vaGetDisplay(x11_display); + va_status = vaInitialize(va_dpy, &major_ver, &minor_ver); + assert(va_status == VA_STATUS_SUCCESS); + + va_status = vaQueryConfigEntrypoints(va_dpy, VAProfileMPEG2Main, entrypoints, + &num_entrypoints); + CHECK_VASTATUS(va_status, "vaQueryConfigEntrypoints"); + + for (vld_entrypoint = 0; vld_entrypoint < num_entrypoints; vld_entrypoint++) { + if (entrypoints[vld_entrypoint] == VAEntrypointVLD) + break; + } + if (vld_entrypoint == num_entrypoints) { + /* not find VLD entry point */ + assert(0); + } + + /* Assuming finding VLD, find out the format for the render target */ + attrib.type = VAConfigAttribRTFormat; + vaGetConfigAttributes(va_dpy, VAProfileMPEG2Main, VAEntrypointVLD, + &attrib, 1); + if ((attrib.value & VA_RT_FORMAT_YUV420) == 0) { + /* not find desired YUV420 RT format */ + assert(0); + } + + va_status = vaCreateConfig(va_dpy, VAProfileMPEG2Main, VAEntrypointVLD, + &attrib, 1,&config_id); + CHECK_VASTATUS(va_status, "vaQueryConfigEntrypoints"); + + va_status = vaCreateSurfaces(va_dpy,CLIP_WIDTH,CLIP_HEIGHT, + VA_RT_FORMAT_YUV420, 1, &surface_id); + CHECK_VASTATUS(va_status, "vaCreateSurfaces"); + + /* Create a context for this decode pipe */ + va_status = vaCreateContext(va_dpy, config_id, + CLIP_WIDTH, + ((CLIP_HEIGHT+15)/16)*16, + VA_PROGRESSIVE, + &surface_id, + 1, + &context_id); + CHECK_VASTATUS(va_status, "vaCreateContext"); + + va_status = vaCreateBuffer(va_dpy, context_id, + VAPictureParameterBufferType, + sizeof(VAPictureParameterBufferMPEG2), + 1, &pic_param, + &pic_param_buf); + CHECK_VASTATUS(va_status, "vaCreateBuffer"); + + va_status = vaCreateBuffer(va_dpy, context_id, + VAIQMatrixBufferType, + sizeof(VAIQMatrixBufferMPEG2), + 1, &iq_matrix, + &iqmatrix_buf ); + CHECK_VASTATUS(va_status, "vaCreateBuffer"); + + va_status = vaCreateBuffer(va_dpy, context_id, + VASliceParameterBufferType, + sizeof(VASliceParameterBufferMPEG2), + 1, + &slice_param, &slice_param_buf); + CHECK_VASTATUS(va_status, "vaCreateBuffer"); + + va_status = vaCreateBuffer(va_dpy, context_id, + VASliceDataBufferType, + 0xc4-0x2f+1, + 1, + mpeg2_clip+0x2f, + &slice_data_buf); + CHECK_VASTATUS(va_status, "vaCreateBuffer"); + + va_status = vaBeginPicture(va_dpy, context_id, surface_id); + CHECK_VASTATUS(va_status, "vaBeginPicture"); + + va_status = vaRenderPicture(va_dpy,context_id, &pic_param_buf, 1); + CHECK_VASTATUS(va_status, "vaRenderPicture"); + + va_status = vaRenderPicture(va_dpy,context_id, &iqmatrix_buf, 1); + CHECK_VASTATUS(va_status, "vaRenderPicture"); + + va_status = vaRenderPicture(va_dpy,context_id, &slice_param_buf, 1); + CHECK_VASTATUS(va_status, "vaRenderPicture"); + + va_status = vaRenderPicture(va_dpy,context_id, &slice_data_buf, 1); + CHECK_VASTATUS(va_status, "vaRenderPicture"); + + va_status = vaEndPicture(va_dpy,context_id); + CHECK_VASTATUS(va_status, "vaEndPicture"); + + va_status = vaSyncSurface(va_dpy, surface_id); + CHECK_VASTATUS(va_status, "vaSyncSurface"); + + if (putsurface) { + Window win; + win = XCreateSimpleWindow(x11_display, RootWindow(x11_display, 0), 0, 0, + WIN_WIDTH,WIN_HEIGHT, 0, 0, WhitePixel(x11_display, 0)); + XMapWindow(x11_display, win); + XSync(x11_display, False); + va_status = vaPutSurface(va_dpy, surface_id, win, + 0,0,CLIP_WIDTH,CLIP_HEIGHT, + 0,0,WIN_WIDTH,WIN_HEIGHT, + NULL,0,0); + CHECK_VASTATUS(va_status, "vaPutSurface"); + } + + printf("press any key to exit\n"); + getchar(); + + vaDestroySurfaces(va_dpy,&surface_id,1); + vaDestroyConfig(va_dpy,config_id); + vaDestroyContext(va_dpy,context_id); + + vaTerminate(va_dpy); + XCloseDisplay(x11_display); + + return 0; +} diff -Nru libva-1.0.1/test/encode/h264encode.c libva-1.0.1-3+0.31.1/test/encode/h264encode.c --- libva-1.0.1/test/encode/h264encode.c 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/test/encode/h264encode.c 2010-06-02 06:46:21.000000000 +0000 @@ -0,0 +1,472 @@ +/* + * Copyright (c) 2007-2008 Intel Corporation. All Rights Reserved. + * + * 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, sub license, 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 (including the + * next paragraph) 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 NON-INFRINGEMENT. + * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +/* + * it is a real program to show how VAAPI encoding work, + * It does H264 element stream level encoding on auto-generated YUV data + * + * gcc -o h264encode h264encode -lva -lva-x11 + * ./h264encode -w -h -n + * + */ +#include +#include +#include +#include +#include + +#include + +#include +#include +#include + +#include + +#include +#include + +#define CHECK_VASTATUS(va_status,func) \ +if (va_status != VA_STATUS_SUCCESS) { \ + fprintf(stderr,"%s:%s (%d) failed,exit\n", __func__, func, __LINE__); \ + exit(1); \ +} + +#include "loadsurface.h" + +#define SURFACE_NUM 18 /* 16 surfaces for src, 2 surface for reconstructed/reference */ + +static Display *x11_display; +static VADisplay va_dpy; +static VAContextID context_id; +static VASurfaceID surface_id[SURFACE_NUM]; +static Window display_win = 0; +static int win_width; +static int win_height; + +static int coded_fd; +static char coded_file[256]; + +#define CODEDBUF_NUM 5 +static VABufferID coded_buf[CODEDBUF_NUM]; + +static int frame_display = 0; /* display the frame during encoding */ +static int frame_width=352, frame_height=288; +static int frame_rate = 30; +static int frame_count = 400; +static int intra_count = 30; +static int frame_bitrate = 8000000; /* 8M */ +static int initial_qp = 15; +static int minimal_qp = 0; + +static int upload_source_YUV_once_for_all() +{ + VAImage surface_image; + void *surface_p=NULL, *U_start,*V_start; + VAStatus va_status; + int box_width=8; + int row_shift=0; + int i; + + for (i=0; isize); + coded_size += write(coded_fd, buf_list->buf, buf_list->size); + buf_list = buf_list->next; + } + vaUnmapBuffer(va_dpy,coded_buf); + + printf("\r "); /* return back to startpoint */ + switch (current_frame % 4) { + case 0: + printf("|"); + break; + case 1: + printf("/"); + break; + case 2: + printf("-"); + break; + case 3: + printf("\\"); + break; + } + printf("%08d", current_frame); + if (current_frame % intra_count == 0) + printf("(I)"); + else + printf("(P)"); + + printf("(%06d bytes coded)",coded_size); + if (frame_skipped) + printf("(SKipped)"); + printf(" "); + + return; +} + + +static int display_surface(int frame_id, int *exit_encode) +{ + Window win = display_win; + XEvent event; + VAStatus va_status; + + if (win == 0) { /* display reconstructed surface */ + win_width = frame_width; + win_height = frame_height; + + win = XCreateSimpleWindow(x11_display, RootWindow(x11_display, 0), 0, 0, + frame_width, frame_height, 0, 0, WhitePixel(x11_display, 0)); + XMapWindow(x11_display, win); + XSync(x11_display, False); + + display_win = win; + } + + va_status = vaPutSurface(va_dpy, surface_id[frame_id], win, + 0,0, frame_width, frame_height, + 0,0, win_width, win_height, + NULL,0,0); + + *exit_encode = 0; + while(XPending(x11_display)) { + XNextEvent(x11_display, &event); + + /* bail on any focused key press */ + if(event.type == KeyPress) { + *exit_encode = 1; + break; + } + + /* rescale the video to fit the window */ + if(event.type == ConfigureNotify) { + win_width = event.xconfigure.width; + win_height = event.xconfigure.height; + } + } + + return; +} + +enum { + SH_LEVEL_1=10, + SH_LEVEL_1B=11, + SH_LEVEL_2=20, + SH_LEVEL_3=30, + SH_LEVEL_31=31, + SH_LEVEL_32=32, + SH_LEVEL_4=40, + SH_LEVEL_5=50 +}; + +static int do_h264_encoding(void) +{ + VAEncPictureParameterBufferH264 pic_h264; + VAEncSliceParameterBuffer slice_h264; + VAStatus va_status; + VABufferID seq_param_buf, pic_param_buf, slice_param_buf; + int codedbuf_size; + VASurfaceStatus surface_status; + int src_surface, dst_surface, ref_surface; + int codedbuf_idx = 0; + int frame_skipped = 0; + int i; + + + va_status = vaCreateSurfaces(va_dpy,frame_width, frame_height, + VA_RT_FORMAT_YUV420, SURFACE_NUM, &surface_id[0]); + CHECK_VASTATUS(va_status, "vaCreateSurfaces"); + + /* upload RAW YUV data into all surfaces */ + upload_source_YUV_once_for_all(); + + codedbuf_size = (frame_width * frame_height * 400) / (16*16); + + for (i = 0; i < CODEDBUF_NUM; i++) { + /* create coded buffer once for all + * other VA buffers which won't be used again after vaRenderPicture. + * so APP can always vaCreateBuffer for every frame + * but coded buffer need to be mapped and accessed after vaRenderPicture/vaEndPicture + * so VA won't maintain the coded buffer + */ + va_status = vaCreateBuffer(va_dpy,context_id,VAEncCodedBufferType, + codedbuf_size, 1, NULL, &coded_buf[i]); + CHECK_VASTATUS(va_status,"vaBeginPicture"); + } + + src_surface = 0; + /* the last two frames are reference/reconstructed frame */ + dst_surface = SURFACE_NUM - 1; + ref_surface = SURFACE_NUM - 2; + + for (i = 0; i < frame_count; i++) { + va_status = vaBeginPicture(va_dpy, context_id, surface_id[src_surface]); + CHECK_VASTATUS(va_status,"vaBeginPicture"); + + if (i == 0) { + VAEncSequenceParameterBufferH264 seq_h264 = {0}; + VABufferID seq_param_buf; + + seq_h264.level_idc = SH_LEVEL_3; + seq_h264.picture_width_in_mbs = frame_width / 16; + seq_h264.picture_height_in_mbs = frame_height / 16; + seq_h264.bits_per_second = frame_bitrate; + seq_h264.frame_rate = frame_rate; + seq_h264.initial_qp = initial_qp; + seq_h264.min_qp = minimal_qp; + seq_h264.basic_unit_size = 0; + seq_h264.intra_period = intra_count; + + va_status = vaCreateBuffer(va_dpy, context_id, + VAEncSequenceParameterBufferType, + sizeof(seq_h264),1,&seq_h264,&seq_param_buf); + CHECK_VASTATUS(va_status,"vaCreateBuffer");; + + va_status = vaRenderPicture(va_dpy,context_id, &seq_param_buf, 1); + CHECK_VASTATUS(va_status,"vaRenderPicture");; + } + + + pic_h264.reference_picture = surface_id[ref_surface]; + pic_h264.reconstructed_picture= surface_id[dst_surface]; + pic_h264.coded_buf = coded_buf[codedbuf_idx]; + pic_h264.picture_width = frame_width; + pic_h264.picture_height = frame_height; + pic_h264.last_picture = (i==frame_count); + + va_status = vaCreateBuffer(va_dpy, context_id,VAEncPictureParameterBufferType, + sizeof(pic_h264),1,&pic_h264,&pic_param_buf); + CHECK_VASTATUS(va_status,"vaCreateBuffer");; + + va_status = vaRenderPicture(va_dpy,context_id, &pic_param_buf, 1); + CHECK_VASTATUS(va_status,"vaRenderPicture"); + + /* one frame, one slice */ + slice_h264.start_row_number = 0; + slice_h264.slice_height = frame_height/16; /* Measured by MB */ + slice_h264.slice_flags.bits.is_intra = ((i % intra_count) == 0); + slice_h264.slice_flags.bits.disable_deblocking_filter_idc = 0; + va_status = vaCreateBuffer(va_dpy,context_id,VAEncSliceParameterBufferType, + sizeof(slice_h264),1,&slice_h264,&slice_param_buf); + CHECK_VASTATUS(va_status,"vaCreateBuffer");; + + va_status = vaRenderPicture(va_dpy,context_id, &slice_param_buf, 1); + CHECK_VASTATUS(va_status,"vaRenderPicture"); + + va_status = vaEndPicture(va_dpy,context_id); + CHECK_VASTATUS(va_status,"vaEndPicture");; + + va_status = vaSyncSurface(va_dpy, surface_id[src_surface]); + CHECK_VASTATUS(va_status,"vaSyncSurface"); + + surface_status = 0; + va_status = vaQuerySurfaceStatus(va_dpy, surface_id[src_surface],&surface_status); + frame_skipped = (surface_status & VASurfaceSkipped); + + save_coded_buf(coded_buf[codedbuf_idx], i, frame_skipped); + + /* should display reconstructed frame, but just diplay source frame */ + if (frame_display) { + int exit_encode = 0; + + display_surface(src_surface, &exit_encode); + if (exit_encode) + frame_count = i; + } + + /* use next surface */ + src_surface++; + if (src_surface == (SURFACE_NUM - 2)) + src_surface = 0; + + /* use next codedbuf */ + codedbuf_idx++; + if (codedbuf_idx == (CODEDBUF_NUM - 1)) + codedbuf_idx = 0; + + /* if a frame is skipped, current frame still use last reference frame */ + if (frame_skipped == 0) { + /* swap ref/dst */ + int tmp = dst_surface; + dst_surface = ref_surface; + ref_surface = tmp; + } + } + + return 0; +} + +int main(int argc,char **argv) +{ + VAEntrypoint entrypoints[5]; + int num_entrypoints,slice_entrypoint; + VAConfigAttrib attrib[2]; + VAConfigID config_id; + int major_ver, minor_ver; + VAStatus va_status; + char c; + + strcpy(coded_file, "/tmp/demo.264"); + while ((c =getopt(argc,argv,"w:h:n:p:f:r:q:s:o:d?") ) != EOF) { + switch (c) { + case 'w': + frame_width = atoi(optarg); + break; + case 'h': + frame_height = atoi(optarg); + break; + case 'n': + frame_count = atoi(optarg); + break; + case 'p': + intra_count = atoi(optarg); + break; + case 'f': + frame_rate = atoi(optarg); + break; + case 'b': + frame_bitrate = atoi(optarg); + break; + case 'q': + initial_qp = atoi(optarg); + break; + case 's': + minimal_qp = atoi(optarg); + break; + case 'd': + frame_display = 1; + break; + case 'o': + strcpy(coded_file, optarg); + break; + case ':': + case '?': + printf("./h264encode \n"); + printf(" -w -h: resolution\n"); + printf(" -n frame number\n"); + printf(" -d display the source frame\n"); + printf(" -p P frame count between two I frames\n"); + printf(" -f frame rate\n"); + printf(" -r bit rate\n"); + printf(" -q initial QP\n"); + printf(" -s maximum QP\n"); + printf(" -o coded file\n"); + exit(0); + } + } + + x11_display = XOpenDisplay(":0.0"); + assert(x11_display); + + va_dpy = vaGetDisplay(x11_display); + va_status = vaInitialize(va_dpy, &major_ver, &minor_ver); + CHECK_VASTATUS(va_status, "vaInitialize"); + + vaQueryConfigEntrypoints(va_dpy, VAProfileH264Baseline, entrypoints, + &num_entrypoints); + for (slice_entrypoint = 0; slice_entrypoint < num_entrypoints; slice_entrypoint++) { + if (entrypoints[slice_entrypoint] == VAEntrypointEncSlice) + break; + } + if (slice_entrypoint == num_entrypoints) { + /* not find Slice entry point */ + assert(0); + } + + /* find out the format for the render target, and rate control mode */ + attrib[0].type = VAConfigAttribRTFormat; + attrib[1].type = VAConfigAttribRateControl; + vaGetConfigAttributes(va_dpy, VAProfileH264Baseline, VAEntrypointEncSlice, + &attrib[0], 2); + if ((attrib[0].value & VA_RT_FORMAT_YUV420) == 0) { + /* not find desired YUV420 RT format */ + assert(0); + } + if ((attrib[1].value & VA_RC_VBR) == 0) { + /* Can't find matched RC mode */ + printf("VBR mode doesn't found, exit\n"); + assert(0); + } + attrib[0].value = VA_RT_FORMAT_YUV420; /* set to desired RT format */ + attrib[1].value = VA_RC_VBR; /* set to desired RC mode */ + + va_status = vaCreateConfig(va_dpy, VAProfileH264Baseline, VAEntrypointEncSlice, + &attrib[0], 2,&config_id); + CHECK_VASTATUS(va_status, "vaCreateConfig"); + + va_status = vaCreateSurfaces(va_dpy,frame_width, frame_height, + VA_RT_FORMAT_YUV420, SURFACE_NUM, &surface_id[0]); + CHECK_VASTATUS(va_status, "vaCreateSurfaces"); + + /* Create a context for this decode pipe */ + va_status = vaCreateContext(va_dpy, config_id, + frame_width, ((frame_height+15)/16)*16, + VA_PROGRESSIVE,&surface_id[0],SURFACE_NUM,&context_id); + CHECK_VASTATUS(va_status, "vaCreateContext"); + + /* store coded data into a file */ + coded_fd = open(coded_file,O_CREAT|O_RDWR, 0); + if (coded_fd == -1) { + printf("Open file %s failed, exit\n", coded_file); + exit(1); + } + + printf("Coded %d frames, %dx%d, save the coded file into %s\n", + frame_count, frame_width, frame_height, coded_file); + do_h264_encoding(); + + printf("\n\n"); + + vaDestroySurfaces(va_dpy,&surface_id[0],SURFACE_NUM); + vaDestroyConfig(va_dpy,config_id); + vaDestroyContext(va_dpy,context_id); + + vaTerminate(va_dpy); + + XCloseDisplay(x11_display); + + return 0; +} diff -Nru libva-1.0.1/test/encode/loadsurface.h libva-1.0.1-3+0.31.1/test/encode/loadsurface.h --- libva-1.0.1/test/encode/loadsurface.h 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/test/encode/loadsurface.h 2010-02-12 12:05:55.000000000 +0000 @@ -0,0 +1,120 @@ +/* + * Copyright (c) 2008-2009 Intel Corporation. All Rights Reserved. + * + * 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, sub license, 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 (including the + * next paragraph) 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 NON-INFRINGEMENT. + * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + + +static int yuvgen_planar(int width, int height, + unsigned char *Y_start, int Y_pitch, + unsigned char *U_start, int U_pitch, + unsigned char *V_start, int V_pitch, + int UV_interleave, int box_width, int row_shift, + int field) +{ + int row; + + /* copy Y plane */ + for (row=0;row/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ 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 \ + if test -z "$(ETAGS_ARGS)$$tags$$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; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ fi ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) + tags=; \ 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" \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique + $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -check-TESTS: $(TESTS) - @failed=0; all=0; xfail=0; xpass=0; skip=0; \ - srcdir=$(srcdir); export srcdir; \ - list=' $(TESTS) '; \ - $(am__tty_colors); \ - if test -n "$$list"; then \ - for tst in $$list; do \ - if test -f ./$$tst; then dir=./; \ - elif test -f $$tst; then dir=; \ - else dir="$(srcdir)/"; fi; \ - if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ - all=`expr $$all + 1`; \ - case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$tst[\ \ ]*) \ - xpass=`expr $$xpass + 1`; \ - failed=`expr $$failed + 1`; \ - col=$$red; res=XPASS; \ - ;; \ - *) \ - col=$$grn; res=PASS; \ - ;; \ - esac; \ - elif test $$? -ne 77; then \ - all=`expr $$all + 1`; \ - case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$tst[\ \ ]*) \ - xfail=`expr $$xfail + 1`; \ - col=$$lgn; res=XFAIL; \ - ;; \ - *) \ - failed=`expr $$failed + 1`; \ - col=$$red; res=FAIL; \ - ;; \ - esac; \ - else \ - skip=`expr $$skip + 1`; \ - col=$$blu; res=SKIP; \ - fi; \ - echo "$${col}$$res$${std}: $$tst"; \ - done; \ - if test "$$all" -eq 1; then \ - tests="test"; \ - All=""; \ - else \ - tests="tests"; \ - All="All "; \ - fi; \ - if test "$$failed" -eq 0; then \ - if test "$$xfail" -eq 0; then \ - banner="$$All$$all $$tests passed"; \ - else \ - if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ - banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ - fi; \ - else \ - if test "$$xpass" -eq 0; then \ - banner="$$failed of $$all $$tests failed"; \ - else \ - if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ - banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ - fi; \ - fi; \ - dashes="$$banner"; \ - skipped=""; \ - if test "$$skip" -ne 0; then \ - if test "$$skip" -eq 1; then \ - skipped="($$skip test was not run)"; \ - else \ - skipped="($$skip tests were not run)"; \ - fi; \ - test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ - dashes="$$skipped"; \ - fi; \ - report=""; \ - if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ - report="Please report to $(PACKAGE_BUGREPORT)"; \ - test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ - dashes="$$report"; \ - fi; \ - dashes=`echo "$$dashes" | sed s/./=/g`; \ - if test "$$failed" -eq 0; then \ - echo "$$grn$$dashes"; \ - else \ - echo "$$red$$dashes"; \ - fi; \ - echo "$$banner"; \ - test -z "$$skipped" || echo "$$skipped"; \ - test -z "$$report" || echo "$$report"; \ - echo "$$dashes$$std"; \ - test "$$failed" -eq 0; \ - else :; fi - distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ @@ -641,38 +478,50 @@ 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 {} \;; \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ + distdir=`$(am__cd) $(distdir) && pwd`; \ + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$top_distdir" \ + distdir="$$distdir/$$subdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + distdir) \ + || exit 1; \ fi; \ done check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) - $(MAKE) $(AM_MAKEFLAGS) check-TESTS -check: check-am +check: check-recursive all-am: Makefile $(PROGRAMS) -installdirs: +installdirs: installdirs-recursive +installdirs-am: for dir in "$(DESTDIR)$(bindir)"; 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: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am -installcheck: installcheck-am +installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ @@ -684,105 +533,90 @@ 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) 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: clean-recursive -clean-am: clean-binPROGRAMS clean-checkPROGRAMS clean-generic \ - clean-libtool mostlyclean-am +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am -distclean: distclean-am +distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags -dvi: dvi-am +dvi: dvi-recursive dvi-am: -html: html-am - -html-am: +html: html-recursive -info: info-am +info: info-recursive info-am: install-data-am: -install-dvi: install-dvi-am - -install-dvi-am: +install-dvi: install-dvi-recursive install-exec-am: install-binPROGRAMS -install-html: install-html-am +install-html: install-html-recursive -install-html-am: - -install-info: install-info-am - -install-info-am: +install-info: install-info-recursive install-man: -install-pdf: install-pdf-am - -install-pdf-am: +install-pdf: install-pdf-recursive -install-ps: install-ps-am - -install-ps-am: +install-ps: install-ps-recursive installcheck-am: -maintainer-clean: maintainer-clean-am +maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic -mostlyclean: mostlyclean-am +mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool -pdf: pdf-am +pdf: pdf-recursive pdf-am: -ps: ps-am +ps: ps-recursive ps-am: uninstall-am: uninstall-binPROGRAMS -.MAKE: check-am install-am install-strip +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ + install-strip -.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ - clean-binPROGRAMS clean-checkPROGRAMS clean-generic \ - clean-libtool ctags distclean distclean-compile \ - distclean-generic distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-binPROGRAMS install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am \ +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libtool ctags ctags-recursive distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-binPROGRAMS install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-recursive uninstall uninstall-am \ uninstall-binPROGRAMS -valgrind: $(check_PROGRAMS) - for a in $(check_PROGRAMS); do \ - valgrind --leak-check=full --show-reachable=yes .libs/$$a; \ - done - +valgrind: vainfo + valgrind --leak-check=full --show-reachable=yes .libs/vainfo; # 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: Binary files /tmp/aLfCWnHnUg/libva-1.0.1/test/mpeg2-I.jpg and /tmp/YnhYs77nIe/libva-1.0.1-3+0.31.1/test/mpeg2-I.jpg differ Binary files /tmp/aLfCWnHnUg/libva-1.0.1/test/mpeg2-I.mpg and /tmp/YnhYs77nIe/libva-1.0.1-3+0.31.1/test/mpeg2-I.mpg differ diff -Nru libva-1.0.1/test/putsurface/loadsurface.h libva-1.0.1-3+0.31.1/test/putsurface/loadsurface.h --- libva-1.0.1/test/putsurface/loadsurface.h 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/test/putsurface/loadsurface.h 2010-02-12 12:05:55.000000000 +0000 @@ -0,0 +1,120 @@ +/* + * Copyright (c) 2008-2009 Intel Corporation. All Rights Reserved. + * + * 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, sub license, 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 (including the + * next paragraph) 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 NON-INFRINGEMENT. + * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + + +static int yuvgen_planar(int width, int height, + unsigned char *Y_start, int Y_pitch, + unsigned char *U_start, int U_pitch, + unsigned char *V_start, int V_pitch, + int UV_interleave, int box_width, int row_shift, + int field) +{ + int row; + + /* copy Y plane */ + for (row=0;row +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include + +#include +#include + +#include + +#include + +/*currently, if XCheckWindowEvent was called in more than one thread, it would cause + * XIO: fatal IO error 11 (Resource temporarily unavailable) on X server ":0.0" + * after 87 requests (83 known processed) with 0 events remaining. + * + * X Error of failed request: BadGC (invalid GC parameter) + * Major opcode of failed request: 60 (X_FreeGC) + * Resource id in failed request: 0x600034 + * Serial number of failed request: 398 + * Current serial number in output stream: 399 + * The root cause is unknown. */ + +#define CHECK_VASTATUS(va_status,func) \ +if (va_status != VA_STATUS_SUCCESS) { \ + fprintf(stderr,"%s:%s (%d) failed,exit\n", __func__, func, __LINE__); \ + exit(1); \ +} + +#include "loadsurface.h" + + +#define SURFACE_NUM 5 +static VASurfaceID surface_id[SURFACE_NUM]; +static int surface_width=352, surface_height=288; +static int win_width=352, win_height=288; +static Window win_thread0, win_thread1; +static Pixmap pixmap_thread0, pixmap_thread1; +static GC context_thread0, context_thread1; +static Display *x11_display; +static VADisplay *va_dpy; +static int multi_thread=0; +static int put_pixmap = 0; +static int test_clip = 0; +static int display_field = VA_FRAME_PICTURE; +static int check_event = 1; +static int verbose=0; +static pthread_mutex_t surface_mutex[SURFACE_NUM]; + +static pthread_mutex_t gmutex; + +static int box_width=32; + +static Pixmap create_pixmap(int width, int height) +{ + int screen = DefaultScreen(x11_display); + Window root; + Pixmap pixmap; + XWindowAttributes attr; + + root = RootWindow(x11_display, screen); + + XGetWindowAttributes (x11_display, root, &attr); + + printf("Create a pixmap from ROOT window %dx%d\n\n", attr.width, attr.height); + pixmap = XCreatePixmap(x11_display, root, attr.width, attr.height, + DefaultDepth(x11_display, DefaultScreen(x11_display))); + + return pixmap; +} + +static int create_window(int width, int height) +{ + int screen = DefaultScreen(x11_display); + Window root, win; + + root = RootWindow(x11_display, screen); + + printf("Create window0 for thread0\n"); + win_thread0 = win = XCreateSimpleWindow(x11_display, root, 0, 0, width, height, + 0, 0, WhitePixel(x11_display, 0)); + if (win) { + XSizeHints sizehints; + sizehints.width = width; + sizehints.height = height; + sizehints.flags = USSize; + XSetNormalHints(x11_display, win, &sizehints); + XSetStandardProperties(x11_display, win, "Thread 0", "Thread 0", + None, (char **)NULL, 0, &sizehints); + + XMapWindow(x11_display, win); + } + context_thread0 = XCreateGC(x11_display, win, 0, 0); + XSelectInput(x11_display, win, KeyPressMask | StructureNotifyMask); + XSync(x11_display, False); + + if (put_pixmap) + pixmap_thread0 = create_pixmap(width, height); + + if (multi_thread == 0) + return 0; + + printf("Create window1 for thread1\n"); + + win_thread1 = win = XCreateSimpleWindow(x11_display, root, width, 0, width, height, + 0, 0, WhitePixel(x11_display, 0)); + if (win) { + XSizeHints sizehints; + sizehints.width = width; + sizehints.height = height; + sizehints.flags = USSize; + XSetNormalHints(x11_display, win, &sizehints); + XSetStandardProperties(x11_display, win, "Thread 1", "Thread 1", + None, (char **)NULL, 0, &sizehints); + + XMapWindow(x11_display, win); + } + if (put_pixmap) + pixmap_thread1 = create_pixmap(width, height); + + context_thread1 = XCreateGC(x11_display, win, 0, 0); + XSelectInput(x11_display, win, KeyPressMask | StructureNotifyMask); + XSync(x11_display, False); + + return 0; +} + +static VASurfaceID get_next_free_surface(int *index) +{ + VASurfaceStatus surface_status; + int i; + + assert(index); + + for (i=0; i\n"); + printf(" -p output to pixmap\n"); + printf(" -d the dimension of black/write square box, default is 32\n"); + printf(" -t multi-threads\n"); + printf(" -e don't check X11 event\n"); + printf(" -c test clipbox\n"); + printf(" -f <1/2> top field, or bottom field\n"); + printf(" -v verbose output\n"); + exit(0); + break; + case 'w': + win_width = atoi(optarg); + break; + case 'h': + win_height = atoi(optarg); + break; + case 'd': + box_width = atoi(optarg); + break; + case 't': + multi_thread = 1; + printf("Two threads to do vaPutSurface\n"); + break; + case 'e': + check_event = 0; + break; + case 'p': + put_pixmap = 1; + break; + case 'c': + test_clip = 1; + break; + case 'f': + if (atoi(optarg) == 1) { + printf("Display TOP field\n"); + display_field = VA_TOP_FIELD; + } else if (atoi(optarg) == 2) { + printf("Display BOTTOM field\n"); + display_field = VA_BOTTOM_FIELD; + } else + printf("The validate input for -f is: 1(top field)/2(bottom field)\n"); + break; + case 'v': + verbose = 1; + printf("Enable verbose output\n"); + break; + } + } + + x11_display = XOpenDisplay(":0.0"); + if (x11_display == NULL) { + fprintf(stderr, "Can't connect X server!\n"); + exit(-1); + } + + create_window(win_width, win_height); + + va_dpy = vaGetDisplay(x11_display); + va_status = vaInitialize(va_dpy, &major_ver, &minor_ver); + CHECK_VASTATUS(va_status, "vaInitialize"); + + surface_width = win_width; + surface_height = win_height; + va_status = vaCreateSurfaces(va_dpy,surface_width, surface_height, + VA_RT_FORMAT_YUV420, SURFACE_NUM, &surface_id[0]); + CHECK_VASTATUS(va_status, "vaCreateSurfaces"); + + if (check_event) + pthread_mutex_init(&gmutex, NULL); + + for(i = 0; i< SURFACE_NUM; i++) + pthread_mutex_init(&surface_mutex[i], NULL); + + if (multi_thread == 1) + ret = pthread_create(&thread1, NULL, (void *)putsurface_thread, (void*)win_thread1); + + putsurface_thread((void *)win_thread0); + + if (multi_thread == 1) + pthread_join(thread1, (void **)&ret); + + vaDestroySurfaces(va_dpy,&surface_id[0],SURFACE_NUM); + vaTerminate(va_dpy); + + return 0; +} diff -Nru libva-1.0.1/test/test_01.c libva-1.0.1-3+0.31.1/test/test_01.c --- libva-1.0.1/test/test_01.c 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/test/test_01.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,42 +0,0 @@ -/* - * Copyright (c) 2007 Intel Corporation. All Rights Reserved. - * - * 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, sub license, 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 (including the - * next paragraph) 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 NON-INFRINGEMENT. - * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#define TEST_DESCRIPTION "Initialize & Terminate" - -#include "test_common.c" - -void pre() -{ -} - -void post() -{ -} - -void test() -{ - test_init(); - - test_terminate(); -} diff -Nru libva-1.0.1/test/test_02.c libva-1.0.1-3+0.31.1/test/test_02.c --- libva-1.0.1/test/test_02.c 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/test/test_02.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,42 +0,0 @@ -/* - * Copyright (c) 2007 Intel Corporation. All Rights Reserved. - * - * 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, sub license, 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 (including the - * next paragraph) 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 NON-INFRINGEMENT. - * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#define TEST_DESCRIPTION "Query profiles" - -#include "test_common.c" - -void pre() -{ - test_init(); -} - -void test() -{ - test_profiles(); -} - -void post() -{ - test_terminate(); -} diff -Nru libva-1.0.1/test/test_03.c libva-1.0.1-3+0.31.1/test/test_03.c --- libva-1.0.1/test/test_03.c 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/test/test_03.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,67 +0,0 @@ -/* - * Copyright (c) 2007 Intel Corporation. All Rights Reserved. - * - * 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, sub license, 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 (including the - * next paragraph) 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 NON-INFRINGEMENT. - * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#define TEST_DESCRIPTION "Query entrypoints for all profiles" - -#include "test_common.c" - -void pre() -{ - test_init(); - test_profiles(); -} - -void test() -{ - int max_entrypoints; - int num_entrypoints; - int i, j; - max_entrypoints = vaMaxNumEntrypoints(va_dpy); - status("vaMaxEntryPoints = %d\n", max_entrypoints); - ASSERT(max_entrypoints > 0); - - VAEntrypoint *entrypoints = malloc(max_entrypoints * sizeof(VAEntrypoint)); - ASSERT(entrypoints); - - for(i = 0; i < num_profiles; i++) - { - memset(entrypoints, 0xff, max_entrypoints * sizeof(VAEntrypoint)); - va_status = vaQueryConfigEntrypoints(va_dpy, profiles[i], entrypoints, &num_entrypoints); - ASSERT( VA_STATUS_SUCCESS == va_status ); - status("vaQueryConfigEntryPoints(%s) reports %d entrypoints\n", profile2string(profiles[i]), num_entrypoints); - ASSERT(num_entrypoints <= max_entrypoints); - ASSERT(num_entrypoints > 0); - for(j = 0; j < num_entrypoints; j++) - { - status(" entrypoint %d [%s]\n", entrypoints[j], entrypoint2string(entrypoints[j])); - } - } - - free(entrypoints); -} - -void post() -{ - test_terminate(); -} diff -Nru libva-1.0.1/test/test_04.c libva-1.0.1-3+0.31.1/test/test_04.c --- libva-1.0.1/test/test_04.c 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/test/test_04.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,84 +0,0 @@ -/* - * Copyright (c) 2007 Intel Corporation. All Rights Reserved. - * - * 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, sub license, 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 (including the - * next paragraph) 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 NON-INFRINGEMENT. - * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#define TEST_DESCRIPTION "Get config attributes for all profiles / entrypoints" - -#include "test_common.c" - -void pre() -{ - test_init(); - test_profiles(); -} - -#define DEADVALUE 0xdeaddead - -void test() -{ - VAConfigAttrib attributes[] = { - { type: VAConfigAttribRTFormat, value: DEADVALUE }, - { type: VAConfigAttribSpatialResidual, value: DEADVALUE }, - { type: VAConfigAttribSpatialClipping, value: DEADVALUE }, - { type: VAConfigAttribIntraResidual, value: DEADVALUE }, - { type: VAConfigAttribEncryption, value: DEADVALUE } - }; - int max_entrypoints; - int num_entrypoints; - int num_attribs = sizeof(attributes) / sizeof(VAConfigAttrib); - int i, j, k; - max_entrypoints = vaMaxNumEntrypoints(va_dpy); - ASSERT(max_entrypoints > 0); - VAEntrypoint *entrypoints = malloc(max_entrypoints * sizeof(VAEntrypoint)); - ASSERT(entrypoints); - - VAConfigAttrib *attrib_list = (VAConfigAttrib *) malloc(sizeof(attributes)); - ASSERT(attrib_list); - - for(i = 0; i < num_profiles; i++) - { - va_status = vaQueryConfigEntrypoints(va_dpy, profiles[i], entrypoints, &num_entrypoints); - ASSERT( VA_STATUS_SUCCESS == va_status ); - - for(j = 0; j < num_entrypoints; j++) - { - memcpy(attrib_list, attributes, sizeof(attributes)); - status("vaGetConfigAttributes for %s, %s\n", profile2string(profiles[i]), entrypoint2string(entrypoints[j])); - va_status = vaGetConfigAttributes(va_dpy, profiles[i], entrypoints[j], attrib_list, num_attribs); - ASSERT( VA_STATUS_SUCCESS == va_status ); - for(k = 0; k < num_attribs; k++) - { - status(" %d -> %08x\n", attrib_list[k].type, attrib_list[k].value); - ASSERT(attrib_list[k].value != DEADVALUE); - } - } - } - - free(attrib_list); - free(entrypoints); -} - -void post() -{ - test_terminate(); -} diff -Nru libva-1.0.1/test/test_05.c libva-1.0.1-3+0.31.1/test/test_05.c --- libva-1.0.1/test/test_05.c 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/test/test_05.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,77 +0,0 @@ -/* - * Copyright (c) 2007 Intel Corporation. All Rights Reserved. - * - * 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, sub license, 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 (including the - * next paragraph) 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 NON-INFRINGEMENT. - * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#define TEST_DESCRIPTION "Create/destroy configs for all profiles / entrypoints" - -#include "test_common.c" - -void pre() -{ - test_init(); - test_profiles(); -} - -void test() -{ - int max_entrypoints; - int num_entrypoints; - int i, j, k; - int config_count = 0; - max_entrypoints = vaMaxNumEntrypoints(va_dpy); - ASSERT(max_entrypoints > 0); - VAEntrypoint *entrypoints = malloc(max_entrypoints * sizeof(VAEntrypoint)); - ASSERT(entrypoints); - - VAConfigID *configs = malloc(max_entrypoints * num_profiles * sizeof(VAConfigID)); - - for(i = 0; i < num_profiles; i++) - { - va_status = vaQueryConfigEntrypoints(va_dpy, profiles[i], entrypoints, &num_entrypoints); - ASSERT( VA_STATUS_SUCCESS == va_status ); - - for(j = 0; j < num_entrypoints; j++) - { - status("vaCreateConfig for %s, %s\n", profile2string(profiles[i]), entrypoint2string(entrypoints[j])); - va_status = vaCreateConfig(va_dpy, profiles[i], entrypoints[j], NULL, 0, &(configs[config_count])); - ASSERT( VA_STATUS_SUCCESS == va_status ); - status("vaCreateConfig returns %08x\n", configs[config_count]); - config_count++; - } - } - - for(i = 0; i < config_count; i++) - { - status("vaDestroyConfig for config %08x\n", configs[i]); - va_status = vaDestroyConfig( va_dpy, configs[i] ); - ASSERT( VA_STATUS_SUCCESS == va_status ); - } - - free(configs); - free(entrypoints); -} - -void post() -{ - test_terminate(); -} diff -Nru libva-1.0.1/test/test_06.c libva-1.0.1-3+0.31.1/test/test_06.c --- libva-1.0.1/test/test_06.c 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/test/test_06.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,123 +0,0 @@ -/* - * Copyright (c) 2007 Intel Corporation. All Rights Reserved. - * - * 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, sub license, 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 (including the - * next paragraph) 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 NON-INFRINGEMENT. - * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#define TEST_DESCRIPTION "Get config attributes from configs" - -#include "test_common.c" - -int max_entrypoints; -VAEntrypoint *entrypoints; - -VAConfigID *configs; -int config_count = 0; - - - -void pre() -{ - int i, j, k; - - test_init(); - test_profiles(); - - max_entrypoints = vaMaxNumEntrypoints(va_dpy); - ASSERT(max_entrypoints > 0); - entrypoints = malloc(max_entrypoints * sizeof(VAEntrypoint)); - ASSERT(entrypoints); - - configs = malloc(max_entrypoints * num_profiles * sizeof(VAConfigID)); - ASSERT(configs); - - // Create configs - for(i = 0; i < num_profiles; i++) - { - int num_entrypoints; - va_status = vaQueryConfigEntrypoints(va_dpy, profiles[i], entrypoints, &num_entrypoints); - ASSERT( VA_STATUS_SUCCESS == va_status ); - - for(j = 0; j < num_entrypoints; j++) - { - va_status = vaCreateConfig(va_dpy, profiles[i], entrypoints[j], NULL, 0, &(configs[config_count])); - ASSERT( VA_STATUS_SUCCESS == va_status ); - config_count++; - } - } -} - -void test() -{ - int i, j, k; - int max_attribs; - - max_attribs = vaMaxNumConfigAttributes(va_dpy); - ASSERT(max_attribs > 0); - - VAConfigAttrib *attrib_list = malloc(max_attribs * sizeof(VAConfigAttrib)); - - config_count = 0; - for(i = 0; i < num_profiles; i++) - { - int num_entrypoints; - - va_status = vaQueryConfigEntrypoints(va_dpy, profiles[i], entrypoints, &num_entrypoints); - ASSERT( VA_STATUS_SUCCESS == va_status ); - for(j = 0; j < num_entrypoints; j++) - { - VAProfile profile= -1; - VAEntrypoint entrypoint = -1; - int num_attribs = -1; - - status("Checking vaQueryConfigAttributes for %s, %s\n", profile2string(profiles[i]), entrypoint2string(entrypoints[j])); - memset(attrib_list, 0xff, max_attribs * sizeof(VAConfigAttrib)); - - va_status = vaQueryConfigAttributes(va_dpy, configs[config_count], &profile, &entrypoint, attrib_list, &num_attribs); - config_count++; - ASSERT( VA_STATUS_SUCCESS == va_status ); - ASSERT( profile == profiles[i] ); - ASSERT( entrypoint == entrypoints[j] ); - ASSERT( num_attribs >= 0 ); - for(k = 0; k < num_attribs; k++) - { - status(" %d -> %08x\n", attrib_list[k].type, attrib_list[k].value); - ASSERT(attrib_list[k].value != VA_ATTRIB_NOT_SUPPORTED); - } - } - } - - free(attrib_list); -} - -void post() -{ - int i; - for(i = 0; i < config_count; i++) - { - va_status = vaDestroyConfig( va_dpy, configs[i] ); - ASSERT( VA_STATUS_SUCCESS == va_status ); - } - - free(configs); - free(entrypoints); - test_terminate(); -} diff -Nru libva-1.0.1/test/test_07.c libva-1.0.1-3+0.31.1/test/test_07.c --- libva-1.0.1/test/test_07.c 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/test/test_07.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,119 +0,0 @@ -/* - * Copyright (c) 2007 Intel Corporation. All Rights Reserved. - * - * 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, sub license, 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 (including the - * next paragraph) 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 NON-INFRINGEMENT. - * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#define TEST_DESCRIPTION "Create and destory surfaces" - -#include "test_common.c" - -void pre() -{ - test_init(); -} - -#define DEAD_SURFACE_ID (VASurfaceID) 0xbeefdead - -void test_unique_surfaces(VASurfaceID *surface_list1, int surface_count1, VASurfaceID *surface_list2, int surface_count2) -{ - int i,j; - - for(i = 0; i < surface_count1; i++) - { - for(j = 0; j < surface_count2; j++) - { - if ((surface_list1 == surface_list2) && (i == j)) continue; - ASSERT(surface_list1[i] != VA_INVALID_SURFACE); - ASSERT(surface_list2[j] != VA_INVALID_SURFACE); - ASSERT(surface_list1[i] != surface_list2[j]); - } - } -} - - -void test() -{ - VASurfaceID surfaces_1[1+1]; - VASurfaceID surfaces_4[4+1]; - VASurfaceID surfaces_16[16+1]; - VASurfaceID surfaces_6[6+1]; - - memset(surfaces_1, 0xff, sizeof(surfaces_1)); - memset(surfaces_4, 0xff, sizeof(surfaces_4)); - memset(surfaces_16, 0xff, sizeof(surfaces_16)); - memset(surfaces_6, 0xff, sizeof(surfaces_6)); - - status("vaCreateSurfaces 1 surface\n"); - surfaces_1[1] = DEAD_SURFACE_ID; - va_status = vaCreateSurfaces(va_dpy, 352, 288, VA_RT_FORMAT_YUV420, 1, surfaces_1); - ASSERT( VA_STATUS_SUCCESS == va_status ); - ASSERT( DEAD_SURFACE_ID == surfaces_1[1] ); /* bounds check */ - - status("vaCreateSurfaces 4 surfaces\n"); - surfaces_4[4] = DEAD_SURFACE_ID; - va_status = vaCreateSurfaces(va_dpy, 352, 288, VA_RT_FORMAT_YUV420, 4, surfaces_4); - ASSERT( VA_STATUS_SUCCESS == va_status ); - ASSERT( DEAD_SURFACE_ID == surfaces_4[4] ); /* bounds check */ - - status("vaCreateSurfaces 16 surfaces\n"); - surfaces_16[16] = DEAD_SURFACE_ID; - va_status = vaCreateSurfaces(va_dpy, 352, 288, VA_RT_FORMAT_YUV420, 16, surfaces_16); - ASSERT( VA_STATUS_SUCCESS == va_status ); - ASSERT( DEAD_SURFACE_ID == surfaces_16[16] ); /* bounds check */ - - test_unique_surfaces(surfaces_1, 1, surfaces_4, 4); - test_unique_surfaces(surfaces_4, 4, surfaces_16, 4); - test_unique_surfaces(surfaces_4, 4, surfaces_16, 16); - test_unique_surfaces(surfaces_4, 1, surfaces_16, 16); - test_unique_surfaces(surfaces_1, 16, surfaces_16, 16); - - status("vaDestroySurface 4 surfaces\n"); - va_status = vaDestroySurfaces(va_dpy, surfaces_4, 4); - ASSERT( VA_STATUS_SUCCESS == va_status ); - - status("vaCreateSurfaces 6 surfaces\n"); - surfaces_6[6] = DEAD_SURFACE_ID; - va_status = vaCreateSurfaces(va_dpy, 352, 288, VA_RT_FORMAT_YUV420, 6, surfaces_6); - ASSERT( VA_STATUS_SUCCESS == va_status ); - ASSERT( DEAD_SURFACE_ID == surfaces_6[6] ); /* bounds check */ - - test_unique_surfaces(surfaces_1, 1, surfaces_6, 6); - test_unique_surfaces(surfaces_6, 6, surfaces_16, 16); - test_unique_surfaces(surfaces_1, 6, surfaces_16, 6); - - status("vaDestroySurface 16 surfaces\n"); - va_status = vaDestroySurfaces(va_dpy, surfaces_16, 16); - ASSERT( VA_STATUS_SUCCESS == va_status ); - - status("vaDestroySurface 1 surface\n"); - va_status = vaDestroySurfaces(va_dpy, surfaces_1, 1); - ASSERT( VA_STATUS_SUCCESS == va_status ); - - status("vaDestroySurface 6 surfaces\n"); - va_status = vaDestroySurfaces(va_dpy, surfaces_6, 6); - ASSERT( VA_STATUS_SUCCESS == va_status ); -} - -void post() -{ - test_terminate(); -} diff -Nru libva-1.0.1/test/test_08.c libva-1.0.1-3+0.31.1/test/test_08.c --- libva-1.0.1/test/test_08.c 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/test/test_08.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,92 +0,0 @@ -/* - * Copyright (c) 2007 Intel Corporation. All Rights Reserved. - * - * 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, sub license, 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 (including the - * next paragraph) 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 NON-INFRINGEMENT. - * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#define TEST_DESCRIPTION "Create and destory surfaces of different sizes" - -#include "test_common.c" - -void pre() -{ - test_init(); -} - -#define DEAD_SURFACE_ID (VASurfaceID) 0xbeefdead - -void test_unique_surfaces(VASurfaceID *surface_list, int surface_count) -{ - int i,j; - - for(i = 0; i < surface_count; i++) - { - ASSERT(surface_list[i] != VA_INVALID_SURFACE); - for(j = 0; j < i; j++) - { - if (i == j) continue; - ASSERT(surface_list[i] != surface_list[j]); - } - } -} - -typedef struct test_size { int w; int h; } test_size_t; - -test_size_t test_sizes[] = { - { 10, 10 }, - { 128, 128 }, - { 176, 144 }, - { 144, 176 }, - { 352, 288 }, - { 399, 299 }, - { 640, 480 }, - { 1280, 720 } -}; - -#define NUM_SIZES (sizeof(test_sizes) / sizeof(test_size_t)) - -void test() -{ - VASurfaceID surfaces[NUM_SIZES+1]; - int i; - - memset(surfaces, 0xff, sizeof(surfaces)); - - for(i = 0; i < NUM_SIZES; i++) - { - status("vaCreateSurfaces create %dx%d surface\n", test_sizes[i].w, test_sizes[i].h); - surfaces[i+1] = DEAD_SURFACE_ID; - va_status = vaCreateSurfaces(va_dpy, test_sizes[i].w, test_sizes[i].h, VA_RT_FORMAT_YUV420, 1, &surfaces[i]); - ASSERT( VA_STATUS_SUCCESS == va_status ); - ASSERT( DEAD_SURFACE_ID == surfaces[i+1] ); - } - - test_unique_surfaces(surfaces, NUM_SIZES); - - status("vaDestroySurface all surfaces\n"); - va_status = vaDestroySurfaces(va_dpy, surfaces, NUM_SIZES); - ASSERT( VA_STATUS_SUCCESS == va_status ); -} - -void post() -{ - test_terminate(); -} diff -Nru libva-1.0.1/test/test_09.c libva-1.0.1-3+0.31.1/test/test_09.c --- libva-1.0.1/test/test_09.c 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/test/test_09.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,109 +0,0 @@ -/* - * Copyright (c) 2007 Intel Corporation. All Rights Reserved. - * - * 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, sub license, 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 (including the - * next paragraph) 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 NON-INFRINGEMENT. - * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#define TEST_DESCRIPTION "Create/destroy contexts for all profiles / entrypoints" - -#include "test_common.c" - -void pre() -{ - test_init(); - test_profiles(); -} - -void test() -{ - int max_entrypoints; - int num_entrypoints; - int i, j, k; - int config_count = 0; - max_entrypoints = vaMaxNumEntrypoints(va_dpy); - ASSERT(max_entrypoints > 0); - VAEntrypoint *entrypoints = malloc(max_entrypoints * sizeof(VAEntrypoint)); - ASSERT(entrypoints); - - VAConfigID *configs = malloc(max_entrypoints * num_profiles * sizeof(VAConfigID)); - VAContextID *contexts = malloc(max_entrypoints * num_profiles * sizeof(VAContextID)); - - for(i = 0; i < num_profiles; i++) - { - va_status = vaQueryConfigEntrypoints(va_dpy, profiles[i], entrypoints, &num_entrypoints); - ASSERT( VA_STATUS_SUCCESS == va_status ); - - for(j = 0; j < num_entrypoints; j++) - { - status("vaCreateConfig for %s, %s\n", profile2string(profiles[i]), entrypoint2string(entrypoints[j])); - va_status = vaCreateConfig(va_dpy, profiles[i], entrypoints[j], NULL, 0, &(configs[config_count])); - ASSERT( VA_STATUS_SUCCESS == va_status ); - status("vaCreateConfig returns %08x\n", configs[config_count]); - config_count++; - } - } - - int width = 352; - int height = 288; - int surface_count = 4; - int total_surfaces = config_count * surface_count; - - VASurfaceID *surfaces = malloc(total_surfaces * sizeof(VASurfaceID)); - - // TODO: Don't assume VA_RT_FORMAT_YUV420 is supported / needed for each config - va_status = vaCreateSurfaces(va_dpy, width, height, VA_RT_FORMAT_YUV420, total_surfaces, surfaces); - ASSERT( VA_STATUS_SUCCESS == va_status ); - - for(i = 0; i < config_count; i++) - { - status("vaCreateContext with config %08x\n", configs[i]); - int flags = 0; - va_status = vaCreateContext( va_dpy, configs[i], width, height, flags, surfaces + i*surface_count, surface_count, &contexts[i] ); - ASSERT( VA_STATUS_SUCCESS == va_status ); - } - - for(i = 0; i < config_count; i++) - { - status("vaDestroyContext for context %08x\n", contexts[i]); - va_status = vaDestroyContext( va_dpy, contexts[i] ); - ASSERT( VA_STATUS_SUCCESS == va_status ); - } - - for(i = 0; i < config_count; i++) - { - status("vaDestroyConfig for config %08x\n", configs[i]); - va_status = vaDestroyConfig( va_dpy, configs[i] ); - ASSERT( VA_STATUS_SUCCESS == va_status ); - } - - va_status = vaDestroySurfaces(va_dpy, surfaces, total_surfaces); - ASSERT( VA_STATUS_SUCCESS == va_status ); - - free(contexts); - free(configs); - free(surfaces); - free(entrypoints); -} - -void post() -{ - test_terminate(); -} diff -Nru libva-1.0.1/test/test_10.c libva-1.0.1-3+0.31.1/test/test_10.c --- libva-1.0.1/test/test_10.c 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/test/test_10.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,140 +0,0 @@ -/* - * Copyright (c) 2007 Intel Corporation. All Rights Reserved. - * - * 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, sub license, 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 (including the - * next paragraph) 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 NON-INFRINGEMENT. - * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#define TEST_DESCRIPTION "Create and destroy buffers" - -#include "test_common.c" - -VAConfigID config; -VAContextID context; -VASurfaceID *surfaces; -int total_surfaces; - -void pre() -{ - test_init(); - - va_status = vaCreateConfig(va_dpy, VAProfileMPEG2Main, VAEntrypointVLD, NULL, 0, &config); - ASSERT( VA_STATUS_SUCCESS == va_status ); - status("vaCreateConfig returns %08x\n", config); - - int width = 352; - int height = 288; - int surface_count = 4; - total_surfaces = surface_count; - - surfaces = malloc(total_surfaces * sizeof(VASurfaceID)); - - // TODO: Don't assume VA_RT_FORMAT_YUV420 is supported / needed for each config - va_status = vaCreateSurfaces(va_dpy, width, height, VA_RT_FORMAT_YUV420, total_surfaces, surfaces); - ASSERT( VA_STATUS_SUCCESS == va_status ); - - status("vaCreateContext with config %08x\n", config); - int flags = 0; - va_status = vaCreateContext( va_dpy, config, width, height, flags, surfaces, surface_count, &context ); - ASSERT( VA_STATUS_SUCCESS == va_status ); -} - -void test_unique_buffers(VABufferID *buffer_list, int buffer_count) -{ - int i,j; - - for(i = 0; i < buffer_count; i++) - { - for(j = 0; j < i; j++) - { - ASSERT(buffer_list[i] != buffer_list[j]); - } - } -} - -VABufferType buffer_types[] = -{ - VAPictureParameterBufferType, - VAIQMatrixBufferType, - VABitPlaneBufferType, - VASliceGroupMapBufferType, - VASliceParameterBufferType, - VASliceDataBufferType, - VAMacroblockParameterBufferType, - VAResidualDataBufferType, - VADeblockingParameterBufferType, -}; - -unsigned int buffer_sizes[] = -{ - sizeof(VAPictureParameterBufferMPEG4), - sizeof(VAIQMatrixBufferH264), - 32*1024, - 48*1024, - sizeof(VASliceParameterBufferMPEG2), - 128*1024, - sizeof(VAMacroblockParameterBufferMPEG2), - 32*1024, - 15*1024, -}; - - -#define NUM_BUFFER_TYPES (sizeof(buffer_types) / sizeof(VABufferType)) - -#define DEAD_BUFFER_ID ((VABufferID) 0x1234ffff) - -void test() -{ - VABufferID buffer_ids[NUM_BUFFER_TYPES+1]; - int i; - memset(buffer_ids, 0xff, sizeof(buffer_ids)); - for(i=0; i < NUM_BUFFER_TYPES; i++) - { - buffer_ids[i+1] = DEAD_BUFFER_ID; - va_status = vaCreateBuffer(va_dpy, context, buffer_types[i], buffer_sizes[i], 1, NULL, &buffer_ids[i]); - ASSERT( VA_STATUS_SUCCESS == va_status ); - ASSERT( DEAD_BUFFER_ID == buffer_ids[i+1] ); /* Bounds check */ - } - test_unique_buffers(buffer_ids, NUM_BUFFER_TYPES); - - for(i=0; i < NUM_BUFFER_TYPES; i++) - { - va_status = vaDestroyBuffer(va_dpy, buffer_ids[i]); - ASSERT( VA_STATUS_SUCCESS == va_status ); - } -} - -void post() -{ - status("vaDestroyContext for context %08x\n", context); - va_status = vaDestroyContext( va_dpy, context ); - ASSERT( VA_STATUS_SUCCESS == va_status ); - - status("vaDestroyConfig for config %08x\n", config); - va_status = vaDestroyConfig( va_dpy, config ); - ASSERT( VA_STATUS_SUCCESS == va_status ); - - va_status = vaDestroySurfaces(va_dpy, surfaces, total_surfaces); - ASSERT( VA_STATUS_SUCCESS == va_status ); - - free(surfaces); - - test_terminate(); -} diff -Nru libva-1.0.1/test/test_11.c libva-1.0.1-3+0.31.1/test/test_11.c --- libva-1.0.1/test/test_11.c 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/test/test_11.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,179 +0,0 @@ -/* - * Copyright (c) 2007 Intel Corporation. All Rights Reserved. - * - * 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, sub license, 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 (including the - * next paragraph) 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 NON-INFRINGEMENT. - * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#define TEST_DESCRIPTION "Map and unmap buffers" - -#include "test_common.c" - -VAConfigID config; -VAContextID context; -VASurfaceID *surfaces; -int total_surfaces; - -void pre() -{ - test_init(); - - va_status = vaCreateConfig(va_dpy, VAProfileMPEG2Main, VAEntrypointVLD, NULL, 0, &config); - ASSERT( VA_STATUS_SUCCESS == va_status ); - status("vaCreateConfig returns %08x\n", config); - - int width = 352; - int height = 288; - int surface_count = 4; - total_surfaces = surface_count; - - surfaces = malloc(total_surfaces * sizeof(VASurfaceID)); - - // TODO: Don't assume VA_RT_FORMAT_YUV420 is supported / needed for each config - va_status = vaCreateSurfaces(va_dpy, width, height, VA_RT_FORMAT_YUV420, total_surfaces, surfaces); - ASSERT( VA_STATUS_SUCCESS == va_status ); - - status("vaCreateContext with config %08x\n", config); - int flags = 0; - va_status = vaCreateContext( va_dpy, config, width, height, flags, surfaces, surface_count, &context ); - ASSERT( VA_STATUS_SUCCESS == va_status ); -} - -void test_unique_buffers(VABufferID *buffer_list, int buffer_count) -{ - int i,j; - - for(i = 0; i < buffer_count; i++) - { - for(j = 0; j < i; j++) - { - ASSERT(buffer_list[i] != buffer_list[j]); - } - } -} - -VABufferType buffer_types[] = -{ - VAPictureParameterBufferType, - VAIQMatrixBufferType, - VABitPlaneBufferType, - VASliceGroupMapBufferType, - VASliceParameterBufferType, - VASliceDataBufferType, - VAMacroblockParameterBufferType, - VAResidualDataBufferType, - VADeblockingParameterBufferType, -}; - -unsigned int buffer_sizes[] = -{ - sizeof(VAPictureParameterBufferMPEG4), - sizeof(VAIQMatrixBufferH264), - 32*1024, - 48*1024, - sizeof(VASliceParameterBufferMPEG2), - 128*1024, - sizeof(VAMacroblockParameterBufferMPEG2), - 32*1024, - 15*1024, -}; - - -#define NUM_BUFFER_TYPES (sizeof(buffer_types) / sizeof(VABufferType)) - -#define DEAD_BUFFER_ID ((VABufferID) 0x1234ffff) - -void test() -{ - VABufferID buffer_ids[NUM_BUFFER_TYPES+1]; - uint32_t *input_data[NUM_BUFFER_TYPES]; - int i, j; - memset(buffer_ids, 0xff, sizeof(buffer_ids)); - for(i=0; i < NUM_BUFFER_TYPES; i++) - { - uint32_t *data; - - input_data[i] = malloc(buffer_sizes[i]+4); - ASSERT(input_data[i]); - - /* Generate input data */ - for(j = buffer_sizes[i] / 4; j--;) - { - input_data[i][j] = random(); - } - - /* Copy to secondary buffer */ - data = malloc(buffer_sizes[i]); - ASSERT(data); - memcpy(data, input_data[i], buffer_sizes[i]); - - /* Create buffer and fill with data */ - va_status = vaCreateBuffer(va_dpy, context, buffer_types[i], buffer_sizes[i], 1, data, &buffer_ids[i]); - ASSERT( VA_STATUS_SUCCESS == va_status ); - status("vaCreateBuffer created buffer %08x of type %d\n", buffer_ids[i], buffer_types[i]); - - /* Wipe secondary buffer */ - memset(data, 0, buffer_sizes[i]); - free(data); - } - - for(i=0; i < NUM_BUFFER_TYPES; i++) - { - void *data = NULL; - /* Fetch VA Buffer */ - va_status = vaMapBuffer(va_dpy, buffer_ids[i], &data); - ASSERT( VA_STATUS_SUCCESS == va_status ); - status("vaMapBuffer mapped buffer %08x\n", buffer_ids[i]); - - /* Compare data */ - ASSERT( memcmp(input_data[i], data, buffer_sizes[i]) == 0 ); - } - - for(i=0; i < NUM_BUFFER_TYPES; i++) - { - va_status = vaUnmapBuffer(va_dpy, buffer_ids[i]); - ASSERT( VA_STATUS_SUCCESS == va_status ); - - va_status = vaDestroyBuffer(va_dpy, buffer_ids[i]); - ASSERT( VA_STATUS_SUCCESS == va_status ); - - free(input_data[i]); - } -} - - - -void post() -{ - status("vaDestroyContext for context %08x\n", context); - va_status = vaDestroyContext( va_dpy, context ); - ASSERT( VA_STATUS_SUCCESS == va_status ); - - status("vaDestroyConfig for config %08x\n", config); - va_status = vaDestroyConfig( va_dpy, config ); - ASSERT( VA_STATUS_SUCCESS == va_status ); - - va_status = vaDestroySurfaces(va_dpy, surfaces, total_surfaces); - ASSERT( VA_STATUS_SUCCESS == va_status ); - - free(surfaces); - - test_terminate(); -} diff -Nru libva-1.0.1/test/test_12.c libva-1.0.1-3+0.31.1/test/test_12.c --- libva-1.0.1/test/test_12.c 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/test/test_12.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,250 +0,0 @@ -/* - * Copyright (c) 2007 Intel Corporation. All Rights Reserved. - * - * 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, sub license, 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 (including the - * next paragraph) 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 NON-INFRINGEMENT. - * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#define TEST_DESCRIPTION "Sample MPEG2 VLD Decoding" - -#ifdef IN_LIBVA -#include -#else -#include -#endif - -#include "test_common.c" - -#include -#include -#include - -void pre() -{ - test_init(); -} - -/* Data dump of a 16x16 MPEG2 video clip,it has one I frame - */ -static unsigned char mpeg2_clip[]={ - 0x00,0x00,0x01,0xb3,0x01,0x00,0x10,0x13,0xff,0xff,0xe0,0x18,0x00,0x00,0x01,0xb5, - 0x14,0x8a,0x00,0x01,0x00,0x00,0x00,0x00,0x01,0xb8,0x00,0x08,0x00,0x00,0x00,0x00, - 0x01,0x00,0x00,0x0f,0xff,0xf8,0x00,0x00,0x01,0xb5,0x8f,0xff,0xf3,0x41,0x80,0x00, - 0x00,0x01,0x01,0x13,0xe1,0x00,0x15,0x81,0x54,0xe0,0x2a,0x05,0x43,0x00,0x2d,0x60, - 0x18,0x01,0x4e,0x82,0xb9,0x58,0xb1,0x83,0x49,0xa4,0xa0,0x2e,0x05,0x80,0x4b,0x7a, - 0x00,0x01,0x38,0x20,0x80,0xe8,0x05,0xff,0x60,0x18,0xe0,0x1d,0x80,0x98,0x01,0xf8, - 0x06,0x00,0x54,0x02,0xc0,0x18,0x14,0x03,0xb2,0x92,0x80,0xc0,0x18,0x94,0x42,0x2c, - 0xb2,0x11,0x64,0xa0,0x12,0x5e,0x78,0x03,0x3c,0x01,0x80,0x0e,0x80,0x18,0x80,0x6b, - 0xca,0x4e,0x01,0x0f,0xe4,0x32,0xc9,0xbf,0x01,0x42,0x69,0x43,0x50,0x4b,0x01,0xc9, - 0x45,0x80,0x50,0x01,0x38,0x65,0xe8,0x01,0x03,0xf3,0xc0,0x76,0x00,0xe0,0x03,0x20, - 0x28,0x18,0x01,0xa9,0x34,0x04,0xc5,0xe0,0x0b,0x0b,0x04,0x20,0x06,0xc0,0x89,0xff, - 0x60,0x12,0x12,0x8a,0x2c,0x34,0x11,0xff,0xf6,0xe2,0x40,0xc0,0x30,0x1b,0x7a,0x01, - 0xa9,0x0d,0x00,0xac,0x64 -}; - -/* hardcoded here without a bitstream parser helper - * please see picture mpeg2-I.jpg for bitstream details - */ -static VAPictureParameterBufferMPEG2 pic_param={ - horizontal_size:16, - vertical_size:16, - forward_reference_picture:0xffffffff, - backward_reference_picture:0xffffffff, - picture_coding_type:1, - f_code:0xffff, - { - { - intra_dc_precision:0, - picture_structure:3, - top_field_first:0, - frame_pred_frame_dct:1, - concealment_motion_vectors:0, - q_scale_type:0, - intra_vlc_format:0, - alternate_scan:0, - repeat_first_field:0, - progressive_frame:1 , - is_first_field:1 - }, - } -}; - -/* see MPEG2 spec65 for the defines of matrix */ -static VAIQMatrixBufferMPEG2 iq_matrix = { - load_intra_quantiser_matrix:1, - load_non_intra_quantiser_matrix:1, - load_chroma_intra_quantiser_matrix:0, - load_chroma_non_intra_quantiser_matrix:0, - intra_quantiser_matrix:{ - 8, 16, 16, 19, 16, 19, 22, 22, - 22, 22, 22, 22, 26, 24, 26, 27, - 27, 27, 26, 26, 26, 26, 27, 27, - 27, 29, 29, 29, 34, 34, 34, 29, - 29, 29, 27, 27, 29, 29, 32, 32, - 34, 34, 37, 38, 37, 35, 35, 34, - 35, 38, 38, 40, 40, 40, 48, 48, - 46, 46, 56, 56, 58, 69, 69, 83 - }, - non_intra_quantiser_matrix:{16}, - chroma_intra_quantiser_matrix:{0}, - chroma_non_intra_quantiser_matrix:{0} -}; - -static VASliceParameterBufferMPEG2 slice_param={ - slice_data_size:150, - slice_data_offset:0, - slice_data_flag:0, - macroblock_offset:38,/* 4byte + 6bits=38bits */ - slice_vertical_position:0, - quantiser_scale_code:2, - intra_slice_flag:0 -}; - -#define CLIP_WIDTH 16 -#define CLIP_HEIGHT 16 - -int surf_width=CLIP_WIDTH,surf_height=CLIP_HEIGHT; -int win_width=CLIP_WIDTH<<1,win_height=CLIP_HEIGHT<<1; - -void test() -{ - VAEntrypoint entrypoints[5]; - int num_entrypoints,vld_entrypoint; - VAConfigAttrib attrib; - VAConfigID config_id; - VASurfaceID vaSurface; - VAContextID vaContext; - VABufferID vaPicParamBuf,vaIQMatrixBuf,vaSliceParamBuf,vaSliceDataBuf; - Window win = 0; - - va_status = vaQueryConfigEntrypoints(va_dpy, VAProfileMPEG2Main, entrypoints, - &num_entrypoints); - ASSERT( VA_STATUS_SUCCESS == va_status ); - - for (vld_entrypoint = 0; vld_entrypoint < num_entrypoints; vld_entrypoint++) { - if (entrypoints[vld_entrypoint] == VAEntrypointVLD) - break; - } - if (vld_entrypoint == num_entrypoints) { - /* not find VLD entry point */ - ASSERT(0); - } - - /* Assuming finding VLD, find out the format for the render target */ - attrib.type = VAConfigAttribRTFormat; - va_status = vaGetConfigAttributes(va_dpy, VAProfileMPEG2Main, VAEntrypointVLD, - &attrib, 1); - ASSERT( VA_STATUS_SUCCESS == va_status ); - if ((attrib.value & VA_RT_FORMAT_YUV420) == 0) { - /* not find desired YUV420 RT format */ - ASSERT(0); - } - - va_status = vaCreateConfig(va_dpy, VAProfileMPEG2Main, VAEntrypointVLD, - &attrib, 1,&config_id); - ASSERT( VA_STATUS_SUCCESS == va_status ); - - va_status = vaCreateSurfaces(va_dpy,surf_width,surf_height, - VA_RT_FORMAT_YUV420, 1, &vaSurface); - ASSERT( VA_STATUS_SUCCESS == va_status ); - - /* Create a context for this decode pipe */ - va_status = vaCreateContext(va_dpy, config_id, - CLIP_WIDTH, - ((CLIP_HEIGHT+15)/16)*16, - VA_PROGRESSIVE, - &vaSurface, - 1, - &vaContext); - ASSERT( VA_STATUS_SUCCESS == va_status ); - - va_status = vaCreateBuffer(va_dpy, vaContext, - VAPictureParameterBufferType, - sizeof(VAPictureParameterBufferMPEG2), - 1, &pic_param, - &vaPicParamBuf); - ASSERT( VA_STATUS_SUCCESS == va_status ); - - va_status = vaCreateBuffer(va_dpy, vaContext, - VAIQMatrixBufferType, - sizeof(VAIQMatrixBufferMPEG2), - 1, &iq_matrix, - &vaIQMatrixBuf ); - ASSERT( VA_STATUS_SUCCESS == va_status ); - - va_status = vaCreateBuffer(va_dpy, vaContext, - VASliceParameterBufferType, - sizeof(VASliceParameterBufferMPEG2), - 1, - &slice_param, &vaSliceParamBuf); - ASSERT( VA_STATUS_SUCCESS == va_status ); - - va_status = vaCreateBuffer(va_dpy, vaContext, - VASliceDataBufferType, - 0xc4-0x2f+1, - 1, - mpeg2_clip+0x2f, - &vaSliceDataBuf); - ASSERT( VA_STATUS_SUCCESS == va_status ); - - va_status = vaBeginPicture(va_dpy, vaContext, vaSurface); - ASSERT( VA_STATUS_SUCCESS == va_status ); - - va_status = vaRenderPicture(va_dpy,vaContext, &vaPicParamBuf, 1); - ASSERT( VA_STATUS_SUCCESS == va_status ); - - va_status = vaRenderPicture(va_dpy,vaContext, &vaIQMatrixBuf, 1); - ASSERT( VA_STATUS_SUCCESS == va_status ); - - va_status = vaRenderPicture(va_dpy,vaContext, &vaSliceParamBuf, 1); - ASSERT( VA_STATUS_SUCCESS == va_status ); - - va_status = vaRenderPicture(va_dpy,vaContext, &vaSliceDataBuf, 1); - ASSERT( VA_STATUS_SUCCESS == va_status ); - - va_status = vaEndPicture(va_dpy,vaContext); - ASSERT( VA_STATUS_SUCCESS == va_status ); - - va_status = vaSyncSurface(va_dpy, vaSurface); - ASSERT( VA_STATUS_SUCCESS == va_status ); - - win = XCreateSimpleWindow(dpy, RootWindow(dpy, 0), 0, 0, - win_width,win_height, 0, 0, WhitePixel(dpy, 0)); - XMapWindow(dpy, win); - XSync(dpy, False); - - va_status = vaPutSurface(va_dpy, vaSurface, win, - 0,0,surf_width,surf_height, - 0,0,win_width,win_height, - NULL,0,0); - ASSERT( VA_STATUS_SUCCESS == va_status ); - - printf("press any key to exit\n"); - getchar(); - - vaDestroySurfaces(va_dpy,&vaSurface,1); - vaDestroyConfig(va_dpy,config_id); - vaDestroyContext(va_dpy,vaContext); -} - -void post() -{ - test_terminate(); -} diff -Nru libva-1.0.1/test/test_common.c libva-1.0.1-3+0.31.1/test/test_common.c --- libva-1.0.1/test/test_common.c 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/test/test_common.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,175 +0,0 @@ -/* - * Copyright (c) 2007 Intel Corporation. All Rights Reserved. - * - * 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, sub license, 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 (including the - * next paragraph) 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 NON-INFRINGEMENT. - * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#ifdef IN_LIBVA -#include -#else -#include -#endif - -#include "assert.h" -#include -#include -#include -#include -#include -#include - -#define ASSERT assert - -Display *dpy; -VADisplay va_dpy; -VAStatus va_status; -int major_version, minor_version; -int print_status = 0; -int num_profiles; -VAProfile *profiles = NULL; - -void pre(); -void test(); -void post(); - -void status(const char *msg, ...) -{ - if (!print_status) return; - va_list args; - printf("--- "); - va_start(args, msg); - vfprintf(stdout, msg, args); - va_end(args); -} - - -int main(int argc, const char* argv[]) -{ - const char *name = strrchr(argv[0], '/'); - if (name) - name++; - else - name = argv[0]; - printf("*** %s: %s\n", name, TEST_DESCRIPTION); - pre(); - print_status = 1; - test(); - print_status = 0; - post(); - printf("*** %s: Finished\n", name); - return 0; -} - -void test_init() -{ - dpy = XOpenDisplay(NULL); - ASSERT( dpy ); - status("XOpenDisplay: dpy = %08x\n", dpy); - - va_dpy = vaGetDisplay(dpy); - ASSERT( va_dpy ); - status("vaGetDisplay: va_dpy = %08x\n", va_dpy); - - va_status = vaInitialize(va_dpy, &major_version, &minor_version); - ASSERT( VA_STATUS_SUCCESS == va_status ); - status("vaInitialize: major = %d minor = %d\n", major_version, minor_version); -} - -void test_terminate() -{ - va_status = vaTerminate(va_dpy); - ASSERT( VA_STATUS_SUCCESS == va_status ); - status("vaTerminate\n"); - - XCloseDisplay(dpy); - status("XCloseDisplay\n"); - - if (profiles) - { - free(profiles); - profiles = NULL; - } -} - -#define PROFILE(profile) case VAProfile##profile: return("VAProfile" #profile); - -const char *profile2string(VAProfile profile) -{ - switch(profile) - { - PROFILE(MPEG2Simple) - PROFILE(MPEG2Main) - PROFILE(MPEG4Simple) - PROFILE(MPEG4AdvancedSimple) - PROFILE(MPEG4Main) - PROFILE(H264Baseline) - PROFILE(H264Main) - PROFILE(H264High) - PROFILE(VC1Simple) - PROFILE(VC1Main) - PROFILE(VC1Advanced) - } - ASSERT(0); - return "Unknown"; -} - -#define ENTRYPOINT(profile) case VAEntrypoint##profile: return("VAEntrypoint" #profile); - -const char *entrypoint2string(VAEntrypoint entrypoint) -{ - switch(entrypoint) - { - ENTRYPOINT(VLD) - ENTRYPOINT(IZZ) - ENTRYPOINT(IDCT) - ENTRYPOINT(MoComp) - ENTRYPOINT(Deblocking) - } - ASSERT(0); - return "Unknown"; -} - - -void test_profiles() -{ - int max_profiles; - int i; - max_profiles = vaMaxNumProfiles(va_dpy); - status("vaMaxNumProfiles = %d\n", max_profiles); - ASSERT(max_profiles > 0); - profiles = malloc(max_profiles * sizeof(VAProfile)); - ASSERT(profiles); - - va_status = vaQueryConfigProfiles(va_dpy, profiles, &num_profiles); - ASSERT( VA_STATUS_SUCCESS == va_status ); - - status("vaQueryConfigProfiles reports %d profiles\n", num_profiles); - ASSERT(num_profiles <= max_profiles); - ASSERT(num_profiles > 0); - - if (print_status) - { - for(i = 0; i < num_profiles; i++) - { - status(" profile %d [%s]\n", profiles[i], profile2string(profiles[i])); - } - } -} diff -Nru libva-1.0.1/test/vainfo.c libva-1.0.1-3+0.31.1/test/vainfo.c --- libva-1.0.1/test/vainfo.c 2010-10-02 10:39:28.000000000 +0000 +++ libva-1.0.1-3+0.31.1/test/vainfo.c 2010-03-08 11:52:42.000000000 +0000 @@ -22,11 +22,7 @@ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#ifdef IN_LIBVA -#include -#else #include -#endif #include #include diff -Nru libva-1.0.1/va/android/drmtest.c libva-1.0.1-3+0.31.1/va/android/drmtest.c --- libva-1.0.1/va/android/drmtest.c 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/va/android/drmtest.c 2010-06-01 10:57:37.000000000 +0000 @@ -0,0 +1,139 @@ +/* + * Copyright © 2007 Intel Corporation + * + * 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 (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + * + * Authors: + * Eric Anholt + * + */ + +#include +#include +#include +#include +#include +#include "drmtest.h" + +#define LIBUDEV_I_KNOW_THE_API_IS_SUBJECT_TO_CHANGE +#include + +static int is_master(int fd) +{ + drm_client_t client; + int ret; + + /* Check that we're the only opener and authed. */ + client.idx = 0; + ret = ioctl(fd, DRM_IOCTL_GET_CLIENT, &client); + assert (ret == 0); + if (!client.auth) + return 0; + client.idx = 1; + ret = ioctl(fd, DRM_IOCTL_GET_CLIENT, &client); + if (ret != -1 || errno != EINVAL) + return 0; + + return 1; +} + +/** Open the first DRM device matching the criteria */ +int drm_open_matching(const char *pci_glob, int flags, int *vendor_id, int *device_id) +{ + struct udev *udev; + struct udev_enumerate *e; + struct udev_device *device, *parent; + struct udev_list_entry *entry; + const char *pci_id, *path; + char *tmp; + int fd; + + *vendor_id = 0; + *device_id = 0; + + udev = udev_new(); + if (udev == NULL) { + fprintf(stderr, "failed to initialize udev context\n"); + return -1; + //abort(); + } + + fd = -1; + e = udev_enumerate_new(udev); + udev_enumerate_add_match_subsystem(e, "drm"); + udev_enumerate_scan_devices(e); + udev_list_entry_foreach(entry, udev_enumerate_get_list_entry(e)) { + path = udev_list_entry_get_name(entry); + device = udev_device_new_from_syspath(udev, path); + parent = udev_device_get_parent(device); + /* Filter out KMS output devices. */ + if (strcmp(udev_device_get_subsystem(parent), "pci") != 0) + continue; + pci_id = udev_device_get_property_value(parent, "PCI_ID"); + if (fnmatch(pci_glob, pci_id, 0) != 0) + continue; + fd = open(udev_device_get_devnode(device), O_RDWR); + if (fd < 0) + continue; + if ((flags & DRM_TEST_MASTER) && !is_master(fd)) { + close(fd); + fd = -1; + continue; + } + + break; + } + udev_enumerate_unref(e); + udev_unref(udev); + + *vendor_id = (int) strtol(pci_id, &tmp, 16); + *device_id = (int) strtol((tmp+1), NULL, 16); + + return fd; +} + +int drm_open_any(int *vendor_id, int *device_id) +{ + int fd = drm_open_matching("*:*", 0, vendor_id, device_id); + + if (fd < 0) { + fprintf(stderr, "failed to open any drm device\n"); + //abort(); + } + + return fd; +} + +/** + * Open the first DRM device we can find where we end up being the master. + */ +int drm_open_any_master(void) +{ + int vendor_id, device_id; + int fd = drm_open_matching("*:*", DRM_TEST_MASTER, &vendor_id, &device_id); + + if (fd < 0) { + fprintf(stderr, "failed to open any drm device\n"); + abort(); + } + + return fd; + +} diff -Nru libva-1.0.1/va/android/drmtest.h libva-1.0.1-3+0.31.1/va/android/drmtest.h --- libva-1.0.1/va/android/drmtest.h 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/va/android/drmtest.h 2010-06-01 10:57:37.000000000 +0000 @@ -0,0 +1,40 @@ +/* + * Copyright © 2007 Intel Corporation + * + * 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 (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + * + * Authors: + * Eric Anholt + * + */ + +#include +#include +#include +#include +#include + +#include "xf86drm.h" + +#define DRM_TEST_MASTER 0x01 + +int drm_open_any(int *vendor_id, int *device_id); +int drm_open_any_master(void); +int drm_open_matching(const char *pci_glob, int flags, int *vendor_id, int *device_id); diff -Nru libva-1.0.1/va/android/Makefile.am libva-1.0.1-3+0.31.1/va/android/Makefile.am --- libva-1.0.1/va/android/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/va/android/Makefile.am 2010-06-01 10:57:37.000000000 +0000 @@ -0,0 +1,30 @@ +# INTEL CONFIDENTIAL +# Copyright 2007 Intel Corporation. All Rights Reserved. +# +# The source code contained or described herein and all documents related to +# the source code ("Material") are owned by Intel Corporation or its suppliers +# or licensors. Title to the Material remains with Intel Corporation or its +# suppliers and licensors. The Material may contain trade secrets and +# proprietary and confidential information of Intel Corporation and its +# suppliers and licensors, and is protected by worldwide copyright and trade +# secret laws and treaty provisions. No part of the Material may be used, +# copied, reproduced, modified, published, uploaded, posted, transmitted, +# distributed, or disclosed in any way without Intel's prior express written +# permission. +# +# No license under any patent, copyright, trade secret or other intellectual +# property right is granted to or conferred upon you by disclosure or delivery +# of the Materials, either expressly, by implication, inducement, estoppel or +# otherwise. Any license under such intellectual property rights must be +# express and approved by Intel in writing. + +AM_CFLAGS = -DLINUX -I$(top_srcdir)/va -I$(top_srcdir)/va/x11 $(DRM_CFLAGS) + +noinst_LTLIBRARIES = libva_dummy.la + +libva_dummy_la_LIBADD = $(LIBVA_LIBS) -ldl -ludev + +libva_dummyincludedir = ${includedir}/va + +libva_dummy_la_SOURCES = va_dummy.c drmtest.c + diff -Nru libva-1.0.1/va/android/va_android.cpp libva-1.0.1-3+0.31.1/va/android/va_android.cpp --- libva-1.0.1/va/android/va_android.cpp 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/va/android/va_android.cpp 2010-06-04 07:42:00.000000000 +0000 @@ -0,0 +1,300 @@ +/* + * Copyright (c) 2007 Intel Corporation. All Rights Reserved. + * + * 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, sub license, 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 (including the + * next paragraph) 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 NON-INFRINGEMENT. + * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +#define _GNU_SOURCE 1 +#include "va.h" +#include "va_backend.h" +#include "va_android.h" +#include "va_dricommon.h" /* needs some helper functions from this file */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifndef ANDROID +#include +#include "drmtest.h" +#endif + +#define CHECK_SYMBOL(func) { if (!func) printf("func %s not found\n", #func); return VA_STATUS_ERROR_UNKNOWN; } +#define DEVICE_NAME "/dev/card0" + +static VADisplayContextP pDisplayContexts = NULL; + +static int open_device (char *dev_name) +{ + struct stat st; + int fd; + + if (-1 == stat (dev_name, &st)) + { + printf ("Cannot identify '%s': %d, %s\n", + dev_name, errno, strerror (errno)); + return -1; + } + + if (!S_ISCHR (st.st_mode)) + { + printf ("%s is no device\n", dev_name); + return -1; + } + + fd = open (dev_name, O_RDWR); + + if (-1 == fd) + { + fprintf (stderr, "Cannot open '%s': %d, %s\n", + dev_name, errno, strerror (errno)); + return -1; + } + + return fd; +} + +static int va_DisplayContextIsValid ( + VADisplayContextP pDisplayContext + ) +{ + VADisplayContextP ctx = pDisplayContexts; + + while (ctx) + { + if (ctx == pDisplayContext && pDisplayContext->pDriverContext) + return 1; + ctx = ctx->pNext; + } + return 0; +} + +static void va_DisplayContextDestroy ( + VADisplayContextP pDisplayContext +) +{ + VADisplayContextP *ctx = &pDisplayContexts; + + /* Throw away pDisplayContext */ + while (*ctx) + { + if (*ctx == pDisplayContext) + { + *ctx = pDisplayContext->pNext; + pDisplayContext->pNext = NULL; + break; + } + ctx = &((*ctx)->pNext); + } + free(pDisplayContext->pDriverContext->dri_state); + free(pDisplayContext->pDriverContext); + free(pDisplayContext); +} + +#ifdef ANDROID +static VAStatus va_DisplayContextGetDriverName ( + VADisplayContextP pDisplayContext, + char **driver_name +) +{ + VADriverContextP ctx = pDisplayContext->pDriverContext; + struct dri_state *dri_state = (struct dri_state *)ctx->dri_state; + char *driver_name_env; + int vendor_id, device_id; + + struct { + int vendor_id; + int device_id; + char driver_name[64]; + } devices[] = { + { 0x8086, 0x4100, "pvr" }, + { 0x8086, 0x0130, "pvr" }, + { 0x0, 0x0, "\0" }, + }; + + memset(dri_state, 0, sizeof(*dri_state)); + dri_state->fd = open_device(DEVICE_NAME); + + if (dri_state->fd < 0) { + fprintf(stderr,"can't open DRM devices\n"); + return VA_STATUS_ERROR_UNKNOWN; + } + + /* TBD: other vendor driver names */ + vendor_id = devices[0].vendor_id; + device_id = devices[0].device_id; + *driver_name = strdup(devices[0].driver_name); + + dri_state->driConnectedFlag = VA_DUMMY; + + return VA_STATUS_SUCCESS; +} +#else +static VAStatus va_DisplayContextGetDriverName ( + VADisplayContextP pDisplayContext, + char **driver_name +) +{ + VADriverContextP ctx = pDisplayContext->pDriverContext; + struct dri_state *dri_state = (struct dri_state *)ctx->dri_state; + char *driver_name_env; + int vendor_id, device_id; + int i = 0; + + struct { + int vendor_id; + int device_id; + char driver_name[64]; + } devices[] = { + { 0x8086, 0x4100, "pvr" }, + { 0x8086, 0x0130, "pvr" }, + { 0x0, 0x0, "\0" }, + }; + + memset(dri_state, 0, sizeof(*dri_state)); + dri_state->fd = drm_open_any(&vendor_id, &device_id); + + if (dri_state->fd < 0) { + fprintf(stderr,"can't open DRM devices\n"); + return VA_STATUS_ERROR_UNKNOWN; + } + + /* TBD: other vendor driver names */ + + while (devices[i].device_id != 0) { + if ((devices[i].vendor_id == vendor_id) && + (devices[i].device_id == device_id)) + break; + i++; + } + + if (devices[i].device_id != 0) + *driver_name = strdup(devices[i].driver_name); + else { + fprintf(stderr,"device (0x%04x:0x%04x) is not supported\n", + vendor_id, device_id); + + return VA_STATUS_ERROR_UNKNOWN; + } + + printf("DRM device is opened, loading driver %s for device 0x%04x:0x%04x\n", + driver_name, vendor_id, device_id); + + dri_state->driConnectedFlag = VA_DUMMY; + + return VA_STATUS_SUCCESS; +} +#endif + +VADisplay vaGetDisplay ( + void *native_dpy /* implementation specific */ +) +{ + VADisplay dpy = NULL; + VADisplayContextP pDisplayContext = pDisplayContexts; + + if (!native_dpy) + return NULL; + + while (pDisplayContext) + { + if (pDisplayContext->pDriverContext && + pDisplayContext->pDriverContext->native_dpy == (void *)native_dpy) + { + dpy = (VADisplay)pDisplayContext; + break; + } + pDisplayContext = pDisplayContext->pNext; + } + + + if (!dpy) + { + /* create new entry */ + VADriverContextP pDriverContext; + struct dri_state *dri_state; + pDisplayContext = (VADisplayContextP)calloc(1, sizeof(*pDisplayContext)); + pDriverContext = (VADriverContextP)calloc(1, sizeof(*pDriverContext)); + dri_state = (struct dri_state*)calloc(1, sizeof(*dri_state)); + if (pDisplayContext && pDriverContext && dri_state) + { + pDisplayContext->vadpy_magic = VA_DISPLAY_MAGIC; + + pDriverContext->native_dpy = (void *)native_dpy; + pDisplayContext->pNext = pDisplayContexts; + pDisplayContext->pDriverContext = pDriverContext; + pDisplayContext->vaIsValid = va_DisplayContextIsValid; + pDisplayContext->vaDestroy = va_DisplayContextDestroy; + pDisplayContext->vaGetDriverName = va_DisplayContextGetDriverName; + pDisplayContexts = pDisplayContext; + pDriverContext->dri_state = dri_state; + dpy = (VADisplay)pDisplayContext; + } + else + { + if (pDisplayContext) + free(pDisplayContext); + if (pDriverContext) + free(pDriverContext); + if (dri_state) + free(dri_state); + } + } + + return dpy; +} + +#define CTX(dpy) (((VADisplayContextP)dpy)->pDriverContext) +#define CHECK_DISPLAY(dpy) if( !vaDisplayIsValid(dpy) ) { return VA_STATUS_ERROR_INVALID_DISPLAY; } + + +#ifdef ANDROID +VAStatus vaPutSurface ( + VADisplay dpy, + VASurfaceID surface, + sp draw, /* Android Surface/Window */ + short srcx, + short srcy, + unsigned short srcw, + unsigned short srch, + short destx, + short desty, + unsigned short destw, + unsigned short desth, + VARectangle *cliprects, /* client supplied clip list */ + unsigned int number_cliprects, /* number of clip rects in the clip list */ + unsigned int flags /* de-interlacing flags */ +) +{ + VADriverContextP ctx; + + CHECK_DISPLAY(dpy); + ctx = CTX(dpy); + return ctx->vtable.vaPutSurface( ctx, surface, static_cast(&draw), srcx, srcy, srcw, srch, + destx, desty, destw, desth, + cliprects, number_cliprects, flags ); +} +#endif diff -Nru libva-1.0.1/va/android/va_dummy.c libva-1.0.1-3+0.31.1/va/android/va_dummy.c --- libva-1.0.1/va/android/va_dummy.c 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/va/android/va_dummy.c 2010-06-04 07:42:00.000000000 +0000 @@ -0,0 +1,300 @@ +/* + * Copyright (c) 2007 Intel Corporation. All Rights Reserved. + * + * 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, sub license, 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 (including the + * next paragraph) 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 NON-INFRINGEMENT. + * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +#define _GNU_SOURCE 1 +#include "va.h" +#include "va_backend.h" +#include "va_android.h" +#include "va_dricommon.h" /* needs some helper functions from this file */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifndef ANDROID +#include +#include "drmtest.h" +#endif + +#define CHECK_SYMBOL(func) { if (!func) printf("func %s not found\n", #func); return VA_STATUS_ERROR_UNKNOWN; } +#define DEVICE_NAME "/dev/card0" + +static VADisplayContextP pDisplayContexts = NULL; + +static int open_device (char *dev_name) +{ + struct stat st; + int fd; + + if (-1 == stat (dev_name, &st)) + { + printf ("Cannot identify '%s': %d, %s\n", + dev_name, errno, strerror (errno)); + return -1; + } + + if (!S_ISCHR (st.st_mode)) + { + printf ("%s is no device\n", dev_name); + return -1; + } + + fd = open (dev_name, O_RDWR); + + if (-1 == fd) + { + fprintf (stderr, "Cannot open '%s': %d, %s\n", + dev_name, errno, strerror (errno)); + return -1; + } + + return fd; +} + +static int va_DisplayContextIsValid ( + VADisplayContextP pDisplayContext + ) +{ + VADisplayContextP ctx = pDisplayContexts; + + while (ctx) + { + if (ctx == pDisplayContext && pDisplayContext->pDriverContext) + return 1; + ctx = ctx->pNext; + } + return 0; +} + +static void va_DisplayContextDestroy ( + VADisplayContextP pDisplayContext +) +{ + VADisplayContextP *ctx = &pDisplayContexts; + + /* Throw away pDisplayContext */ + while (*ctx) + { + if (*ctx == pDisplayContext) + { + *ctx = pDisplayContext->pNext; + pDisplayContext->pNext = NULL; + break; + } + ctx = &((*ctx)->pNext); + } + free(pDisplayContext->pDriverContext->dri_state); + free(pDisplayContext->pDriverContext); + free(pDisplayContext); +} + +#ifdef ANDROID +static VAStatus va_DisplayContextGetDriverName ( + VADisplayContextP pDisplayContext, + char **driver_name +) +{ + VADriverContextP ctx = pDisplayContext->pDriverContext; + struct dri_state *dri_state = (struct dri_state *)ctx->dri_state; + char *driver_name_env; + int vendor_id, device_id; + + struct { + int vendor_id; + int device_id; + char driver_name[64]; + } devices[] = { + { 0x8086, 0x4100, "pvr" }, + { 0x8086, 0x0130, "pvr" }, + { 0x0, 0x0, "\0" }, + }; + + memset(dri_state, 0, sizeof(*dri_state)); + dri_state->fd = open_device(DEVICE_NAME); + + if (dri_state->fd < 0) { + fprintf(stderr,"can't open DRM devices\n"); + return VA_STATUS_ERROR_UNKNOWN; + } + + /* TBD: other vendor driver names */ + vendor_id = devices[0].vendor_id; + device_id = devices[0].device_id; + *driver_name = strdup(devices[0].driver_name); + + dri_state->driConnectedFlag = VA_DUMMY; + + return VA_STATUS_SUCCESS; +} +#else +static VAStatus va_DisplayContextGetDriverName ( + VADisplayContextP pDisplayContext, + char **driver_name +) +{ + VADriverContextP ctx = pDisplayContext->pDriverContext; + struct dri_state *dri_state = (struct dri_state *)ctx->dri_state; + char *driver_name_env; + int vendor_id, device_id; + int i = 0; + + struct { + int vendor_id; + int device_id; + char driver_name[64]; + } devices[] = { + { 0x8086, 0x4100, "pvr" }, + { 0x8086, 0x0130, "pvr" }, + { 0x0, 0x0, "\0" }, + }; + + memset(dri_state, 0, sizeof(*dri_state)); + dri_state->fd = drm_open_any(&vendor_id, &device_id); + + if (dri_state->fd < 0) { + fprintf(stderr,"can't open DRM devices\n"); + return VA_STATUS_ERROR_UNKNOWN; + } + + /* TBD: other vendor driver names */ + + while (devices[i].device_id != 0) { + if ((devices[i].vendor_id == vendor_id) && + (devices[i].device_id == device_id)) + break; + i++; + } + + if (devices[i].device_id != 0) + *driver_name = strdup(devices[i].driver_name); + else { + fprintf(stderr,"device (0x%04x:0x%04x) is not supported\n", + vendor_id, device_id); + + return VA_STATUS_ERROR_UNKNOWN; + } + + printf("DRM device is opened, loading driver %s for device 0x%04x:0x%04x\n", + driver_name, vendor_id, device_id); + + dri_state->driConnectedFlag = VA_DUMMY; + + return VA_STATUS_SUCCESS; +} +#endif + +VADisplay vaGetDisplay ( + void *native_dpy /* implementation specific */ +) +{ + VADisplay dpy = NULL; + VADisplayContextP pDisplayContext = pDisplayContexts; + + if (!native_dpy) + return NULL; + + while (pDisplayContext) + { + if (pDisplayContext->pDriverContext && + pDisplayContext->pDriverContext->native_dpy == (void *)native_dpy) + { + dpy = (VADisplay)pDisplayContext; + break; + } + pDisplayContext = pDisplayContext->pNext; + } + + + if (!dpy) + { + /* create new entry */ + VADriverContextP pDriverContext; + struct dri_state *dri_state; + pDisplayContext = (VADisplayContextP)calloc(1, sizeof(*pDisplayContext)); + pDriverContext = (VADriverContextP)calloc(1, sizeof(*pDriverContext)); + dri_state = (struct dri_state*)calloc(1, sizeof(*dri_state)); + if (pDisplayContext && pDriverContext && dri_state) + { + pDisplayContext->vadpy_magic = VA_DISPLAY_MAGIC; + + pDriverContext->native_dpy = (void *)native_dpy; + pDisplayContext->pNext = pDisplayContexts; + pDisplayContext->pDriverContext = pDriverContext; + pDisplayContext->vaIsValid = va_DisplayContextIsValid; + pDisplayContext->vaDestroy = va_DisplayContextDestroy; + pDisplayContext->vaGetDriverName = va_DisplayContextGetDriverName; + pDisplayContexts = pDisplayContext; + pDriverContext->dri_state = dri_state; + dpy = (VADisplay)pDisplayContext; + } + else + { + if (pDisplayContext) + free(pDisplayContext); + if (pDriverContext) + free(pDriverContext); + if (dri_state) + free(dri_state); + } + } + + return dpy; +} + +#define CTX(dpy) (((VADisplayContextP)dpy)->pDriverContext) +#define CHECK_DISPLAY(dpy) if( !vaDisplayIsValid(dpy) ) { return VA_STATUS_ERROR_INVALID_DISPLAY; } + + +#ifdef ANDROID +VAStatus vaPutSurface ( + VADisplay dpy, + VASurfaceID surface, + sp draw, /* Android Surface/Window */ + short srcx, + short srcy, + unsigned short srcw, + unsigned short srch, + short destx, + short desty, + unsigned short destw, + unsigned short desth, + VARectangle *cliprects, /* client supplied clip list */ + unsigned int number_cliprects, /* number of clip rects in the clip list */ + unsigned int flags /* de-interlacing flags */ +) +{ + VADriverContextP ctx; + + CHECK_DISPLAY(dpy); + ctx = CTX(dpy); + return ctx->vtable.vaPutSurface( ctx, surface, static_cast(&draw), srcx, srcy, srcw, srch, + destx, desty, destw, desth, + cliprects, number_cliprects, flags ); +} +#endif diff -Nru libva-1.0.1/va/Android.mk libva-1.0.1-3+0.31.1/va/Android.mk --- libva-1.0.1/va/Android.mk 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/va/Android.mk 2010-06-04 09:08:10.000000000 +0000 @@ -0,0 +1,91 @@ +# For libva +# ===================================================== + +LOCAL_PATH:= $(call my-dir) + +LIBVA_DRIVERS_PATH = /system/lib + +include $(CLEAR_VARS) + +#LIBVA_MINOR_VERSION := 31 +#LIBVA_MAJOR_VERSION := 0 + +LOCAL_SRC_FILES := \ + va.c \ + va_trace.c \ + +LOCAL_CFLAGS += \ + -DANDROID \ + -DVA_DRIVERS_PATH="\"$(LIBVA_DRIVERS_PATH)\"" + +LOCAL_C_INCLUDES += \ + $(TARGET_OUT_HEADERS)/libva \ + $(LOCAL_PATH)/x11 \ + $(LOCAL_PATH)/.. + +LOCAL_COPY_HEADERS := \ + va.h \ + va_version.h \ + va_backend.h \ + va_version.h.in \ + x11/va_dricommon.h + +LOCAL_COPY_HEADERS_TO := libva/va + +LOCAL_MODULE := libva + +LOCAL_SHARED_LIBRARIES := libdl libdrm libcutils + +include $(BUILD_SHARED_LIBRARY) + + +# For libva-android +# ===================================================== + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := \ + android/va_android.cpp + +LOCAL_CFLAGS += \ + -DANDROID + +LOCAL_C_INCLUDES += \ + $(TARGET_OUT_HEADERS)/libva \ + $(LOCAL_PATH)/x11 + +LOCAL_COPY_HEADERS_TO := libva/va + +LOCAL_COPY_HEADERS := va_android.h + +LOCAL_MODULE := libva-android + +LOCAL_SHARED_LIBRARIES := libva + +include $(BUILD_SHARED_LIBRARY) + + +# For libva-tpi +# ===================================================== + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := va_tpi.c + +LOCAL_CFLAGS += -DANDROID + +LOCAL_C_INCLUDES += \ + $(TARGET_OUT_HEADERS)/libva \ + $(LOCAL_PATH)/.. + +LOCAL_COPY_HEADERS_TO := libva/va + +LOCAL_COPY_HEADERS := \ + va_tpi.h \ + va_backend_tpi.h + +LOCAL_SHARED_LIBRARIES := libva + +LOCAL_MODULE := libva-tpi + +include $(BUILD_SHARED_LIBRARY) diff -Nru libva-1.0.1/va/dummy/drmtest.c libva-1.0.1-3+0.31.1/va/dummy/drmtest.c --- libva-1.0.1/va/dummy/drmtest.c 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/va/dummy/drmtest.c 2010-06-01 10:57:37.000000000 +0000 @@ -0,0 +1,139 @@ +/* + * Copyright © 2007 Intel Corporation + * + * 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 (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + * + * Authors: + * Eric Anholt + * + */ + +#include +#include +#include +#include +#include +#include "drmtest.h" + +#define LIBUDEV_I_KNOW_THE_API_IS_SUBJECT_TO_CHANGE +#include + +static int is_master(int fd) +{ + drm_client_t client; + int ret; + + /* Check that we're the only opener and authed. */ + client.idx = 0; + ret = ioctl(fd, DRM_IOCTL_GET_CLIENT, &client); + assert (ret == 0); + if (!client.auth) + return 0; + client.idx = 1; + ret = ioctl(fd, DRM_IOCTL_GET_CLIENT, &client); + if (ret != -1 || errno != EINVAL) + return 0; + + return 1; +} + +/** Open the first DRM device matching the criteria */ +int drm_open_matching(const char *pci_glob, int flags, int *vendor_id, int *device_id) +{ + struct udev *udev; + struct udev_enumerate *e; + struct udev_device *device, *parent; + struct udev_list_entry *entry; + const char *pci_id, *path; + char *tmp; + int fd; + + *vendor_id = 0; + *device_id = 0; + + udev = udev_new(); + if (udev == NULL) { + fprintf(stderr, "failed to initialize udev context\n"); + return -1; + //abort(); + } + + fd = -1; + e = udev_enumerate_new(udev); + udev_enumerate_add_match_subsystem(e, "drm"); + udev_enumerate_scan_devices(e); + udev_list_entry_foreach(entry, udev_enumerate_get_list_entry(e)) { + path = udev_list_entry_get_name(entry); + device = udev_device_new_from_syspath(udev, path); + parent = udev_device_get_parent(device); + /* Filter out KMS output devices. */ + if (strcmp(udev_device_get_subsystem(parent), "pci") != 0) + continue; + pci_id = udev_device_get_property_value(parent, "PCI_ID"); + if (fnmatch(pci_glob, pci_id, 0) != 0) + continue; + fd = open(udev_device_get_devnode(device), O_RDWR); + if (fd < 0) + continue; + if ((flags & DRM_TEST_MASTER) && !is_master(fd)) { + close(fd); + fd = -1; + continue; + } + + break; + } + udev_enumerate_unref(e); + udev_unref(udev); + + *vendor_id = (int) strtol(pci_id, &tmp, 16); + *device_id = (int) strtol((tmp+1), NULL, 16); + + return fd; +} + +int drm_open_any(int *vendor_id, int *device_id) +{ + int fd = drm_open_matching("*:*", 0, vendor_id, device_id); + + if (fd < 0) { + fprintf(stderr, "failed to open any drm device\n"); + //abort(); + } + + return fd; +} + +/** + * Open the first DRM device we can find where we end up being the master. + */ +int drm_open_any_master(void) +{ + int vendor_id, device_id; + int fd = drm_open_matching("*:*", DRM_TEST_MASTER, &vendor_id, &device_id); + + if (fd < 0) { + fprintf(stderr, "failed to open any drm device\n"); + abort(); + } + + return fd; + +} diff -Nru libva-1.0.1/va/dummy/drmtest.h libva-1.0.1-3+0.31.1/va/dummy/drmtest.h --- libva-1.0.1/va/dummy/drmtest.h 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/va/dummy/drmtest.h 2010-06-01 10:57:37.000000000 +0000 @@ -0,0 +1,40 @@ +/* + * Copyright © 2007 Intel Corporation + * + * 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 (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + * + * Authors: + * Eric Anholt + * + */ + +#include +#include +#include +#include +#include + +#include "xf86drm.h" + +#define DRM_TEST_MASTER 0x01 + +int drm_open_any(int *vendor_id, int *device_id); +int drm_open_any_master(void); +int drm_open_matching(const char *pci_glob, int flags, int *vendor_id, int *device_id); diff -Nru libva-1.0.1/va/dummy/Makefile.am libva-1.0.1-3+0.31.1/va/dummy/Makefile.am --- libva-1.0.1/va/dummy/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/va/dummy/Makefile.am 2010-06-01 10:57:37.000000000 +0000 @@ -0,0 +1,30 @@ +# INTEL CONFIDENTIAL +# Copyright 2007 Intel Corporation. All Rights Reserved. +# +# The source code contained or described herein and all documents related to +# the source code ("Material") are owned by Intel Corporation or its suppliers +# or licensors. Title to the Material remains with Intel Corporation or its +# suppliers and licensors. The Material may contain trade secrets and +# proprietary and confidential information of Intel Corporation and its +# suppliers and licensors, and is protected by worldwide copyright and trade +# secret laws and treaty provisions. No part of the Material may be used, +# copied, reproduced, modified, published, uploaded, posted, transmitted, +# distributed, or disclosed in any way without Intel's prior express written +# permission. +# +# No license under any patent, copyright, trade secret or other intellectual +# property right is granted to or conferred upon you by disclosure or delivery +# of the Materials, either expressly, by implication, inducement, estoppel or +# otherwise. Any license under such intellectual property rights must be +# express and approved by Intel in writing. + +AM_CFLAGS = -DLINUX -I$(top_srcdir)/va -I$(top_srcdir)/va/x11 $(DRM_CFLAGS) + +noinst_LTLIBRARIES = libva_dummy.la + +libva_dummy_la_LIBADD = $(LIBVA_LIBS) -ldl -ludev + +libva_dummyincludedir = ${includedir}/va + +libva_dummy_la_SOURCES = va_dummy.c drmtest.c + diff -Nru libva-1.0.1/va/dummy/va_android.cpp libva-1.0.1-3+0.31.1/va/dummy/va_android.cpp --- libva-1.0.1/va/dummy/va_android.cpp 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/va/dummy/va_android.cpp 2010-06-04 07:42:00.000000000 +0000 @@ -0,0 +1,300 @@ +/* + * Copyright (c) 2007 Intel Corporation. All Rights Reserved. + * + * 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, sub license, 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 (including the + * next paragraph) 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 NON-INFRINGEMENT. + * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +#define _GNU_SOURCE 1 +#include "va.h" +#include "va_backend.h" +#include "va_android.h" +#include "va_dricommon.h" /* needs some helper functions from this file */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifndef ANDROID +#include +#include "drmtest.h" +#endif + +#define CHECK_SYMBOL(func) { if (!func) printf("func %s not found\n", #func); return VA_STATUS_ERROR_UNKNOWN; } +#define DEVICE_NAME "/dev/card0" + +static VADisplayContextP pDisplayContexts = NULL; + +static int open_device (char *dev_name) +{ + struct stat st; + int fd; + + if (-1 == stat (dev_name, &st)) + { + printf ("Cannot identify '%s': %d, %s\n", + dev_name, errno, strerror (errno)); + return -1; + } + + if (!S_ISCHR (st.st_mode)) + { + printf ("%s is no device\n", dev_name); + return -1; + } + + fd = open (dev_name, O_RDWR); + + if (-1 == fd) + { + fprintf (stderr, "Cannot open '%s': %d, %s\n", + dev_name, errno, strerror (errno)); + return -1; + } + + return fd; +} + +static int va_DisplayContextIsValid ( + VADisplayContextP pDisplayContext + ) +{ + VADisplayContextP ctx = pDisplayContexts; + + while (ctx) + { + if (ctx == pDisplayContext && pDisplayContext->pDriverContext) + return 1; + ctx = ctx->pNext; + } + return 0; +} + +static void va_DisplayContextDestroy ( + VADisplayContextP pDisplayContext +) +{ + VADisplayContextP *ctx = &pDisplayContexts; + + /* Throw away pDisplayContext */ + while (*ctx) + { + if (*ctx == pDisplayContext) + { + *ctx = pDisplayContext->pNext; + pDisplayContext->pNext = NULL; + break; + } + ctx = &((*ctx)->pNext); + } + free(pDisplayContext->pDriverContext->dri_state); + free(pDisplayContext->pDriverContext); + free(pDisplayContext); +} + +#ifdef ANDROID +static VAStatus va_DisplayContextGetDriverName ( + VADisplayContextP pDisplayContext, + char **driver_name +) +{ + VADriverContextP ctx = pDisplayContext->pDriverContext; + struct dri_state *dri_state = (struct dri_state *)ctx->dri_state; + char *driver_name_env; + int vendor_id, device_id; + + struct { + int vendor_id; + int device_id; + char driver_name[64]; + } devices[] = { + { 0x8086, 0x4100, "pvr" }, + { 0x8086, 0x0130, "pvr" }, + { 0x0, 0x0, "\0" }, + }; + + memset(dri_state, 0, sizeof(*dri_state)); + dri_state->fd = open_device(DEVICE_NAME); + + if (dri_state->fd < 0) { + fprintf(stderr,"can't open DRM devices\n"); + return VA_STATUS_ERROR_UNKNOWN; + } + + /* TBD: other vendor driver names */ + vendor_id = devices[0].vendor_id; + device_id = devices[0].device_id; + *driver_name = strdup(devices[0].driver_name); + + dri_state->driConnectedFlag = VA_DUMMY; + + return VA_STATUS_SUCCESS; +} +#else +static VAStatus va_DisplayContextGetDriverName ( + VADisplayContextP pDisplayContext, + char **driver_name +) +{ + VADriverContextP ctx = pDisplayContext->pDriverContext; + struct dri_state *dri_state = (struct dri_state *)ctx->dri_state; + char *driver_name_env; + int vendor_id, device_id; + int i = 0; + + struct { + int vendor_id; + int device_id; + char driver_name[64]; + } devices[] = { + { 0x8086, 0x4100, "pvr" }, + { 0x8086, 0x0130, "pvr" }, + { 0x0, 0x0, "\0" }, + }; + + memset(dri_state, 0, sizeof(*dri_state)); + dri_state->fd = drm_open_any(&vendor_id, &device_id); + + if (dri_state->fd < 0) { + fprintf(stderr,"can't open DRM devices\n"); + return VA_STATUS_ERROR_UNKNOWN; + } + + /* TBD: other vendor driver names */ + + while (devices[i].device_id != 0) { + if ((devices[i].vendor_id == vendor_id) && + (devices[i].device_id == device_id)) + break; + i++; + } + + if (devices[i].device_id != 0) + *driver_name = strdup(devices[i].driver_name); + else { + fprintf(stderr,"device (0x%04x:0x%04x) is not supported\n", + vendor_id, device_id); + + return VA_STATUS_ERROR_UNKNOWN; + } + + printf("DRM device is opened, loading driver %s for device 0x%04x:0x%04x\n", + driver_name, vendor_id, device_id); + + dri_state->driConnectedFlag = VA_DUMMY; + + return VA_STATUS_SUCCESS; +} +#endif + +VADisplay vaGetDisplay ( + void *native_dpy /* implementation specific */ +) +{ + VADisplay dpy = NULL; + VADisplayContextP pDisplayContext = pDisplayContexts; + + if (!native_dpy) + return NULL; + + while (pDisplayContext) + { + if (pDisplayContext->pDriverContext && + pDisplayContext->pDriverContext->native_dpy == (void *)native_dpy) + { + dpy = (VADisplay)pDisplayContext; + break; + } + pDisplayContext = pDisplayContext->pNext; + } + + + if (!dpy) + { + /* create new entry */ + VADriverContextP pDriverContext; + struct dri_state *dri_state; + pDisplayContext = (VADisplayContextP)calloc(1, sizeof(*pDisplayContext)); + pDriverContext = (VADriverContextP)calloc(1, sizeof(*pDriverContext)); + dri_state = (struct dri_state*)calloc(1, sizeof(*dri_state)); + if (pDisplayContext && pDriverContext && dri_state) + { + pDisplayContext->vadpy_magic = VA_DISPLAY_MAGIC; + + pDriverContext->native_dpy = (void *)native_dpy; + pDisplayContext->pNext = pDisplayContexts; + pDisplayContext->pDriverContext = pDriverContext; + pDisplayContext->vaIsValid = va_DisplayContextIsValid; + pDisplayContext->vaDestroy = va_DisplayContextDestroy; + pDisplayContext->vaGetDriverName = va_DisplayContextGetDriverName; + pDisplayContexts = pDisplayContext; + pDriverContext->dri_state = dri_state; + dpy = (VADisplay)pDisplayContext; + } + else + { + if (pDisplayContext) + free(pDisplayContext); + if (pDriverContext) + free(pDriverContext); + if (dri_state) + free(dri_state); + } + } + + return dpy; +} + +#define CTX(dpy) (((VADisplayContextP)dpy)->pDriverContext) +#define CHECK_DISPLAY(dpy) if( !vaDisplayIsValid(dpy) ) { return VA_STATUS_ERROR_INVALID_DISPLAY; } + + +#ifdef ANDROID +VAStatus vaPutSurface ( + VADisplay dpy, + VASurfaceID surface, + sp draw, /* Android Surface/Window */ + short srcx, + short srcy, + unsigned short srcw, + unsigned short srch, + short destx, + short desty, + unsigned short destw, + unsigned short desth, + VARectangle *cliprects, /* client supplied clip list */ + unsigned int number_cliprects, /* number of clip rects in the clip list */ + unsigned int flags /* de-interlacing flags */ +) +{ + VADriverContextP ctx; + + CHECK_DISPLAY(dpy); + ctx = CTX(dpy); + return ctx->vtable.vaPutSurface( ctx, surface, static_cast(&draw), srcx, srcy, srcw, srch, + destx, desty, destw, desth, + cliprects, number_cliprects, flags ); +} +#endif diff -Nru libva-1.0.1/va/dummy/va_dummy.c libva-1.0.1-3+0.31.1/va/dummy/va_dummy.c --- libva-1.0.1/va/dummy/va_dummy.c 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/va/dummy/va_dummy.c 2010-06-04 07:42:00.000000000 +0000 @@ -0,0 +1,300 @@ +/* + * Copyright (c) 2007 Intel Corporation. All Rights Reserved. + * + * 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, sub license, 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 (including the + * next paragraph) 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 NON-INFRINGEMENT. + * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +#define _GNU_SOURCE 1 +#include "va.h" +#include "va_backend.h" +#include "va_android.h" +#include "va_dricommon.h" /* needs some helper functions from this file */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifndef ANDROID +#include +#include "drmtest.h" +#endif + +#define CHECK_SYMBOL(func) { if (!func) printf("func %s not found\n", #func); return VA_STATUS_ERROR_UNKNOWN; } +#define DEVICE_NAME "/dev/card0" + +static VADisplayContextP pDisplayContexts = NULL; + +static int open_device (char *dev_name) +{ + struct stat st; + int fd; + + if (-1 == stat (dev_name, &st)) + { + printf ("Cannot identify '%s': %d, %s\n", + dev_name, errno, strerror (errno)); + return -1; + } + + if (!S_ISCHR (st.st_mode)) + { + printf ("%s is no device\n", dev_name); + return -1; + } + + fd = open (dev_name, O_RDWR); + + if (-1 == fd) + { + fprintf (stderr, "Cannot open '%s': %d, %s\n", + dev_name, errno, strerror (errno)); + return -1; + } + + return fd; +} + +static int va_DisplayContextIsValid ( + VADisplayContextP pDisplayContext + ) +{ + VADisplayContextP ctx = pDisplayContexts; + + while (ctx) + { + if (ctx == pDisplayContext && pDisplayContext->pDriverContext) + return 1; + ctx = ctx->pNext; + } + return 0; +} + +static void va_DisplayContextDestroy ( + VADisplayContextP pDisplayContext +) +{ + VADisplayContextP *ctx = &pDisplayContexts; + + /* Throw away pDisplayContext */ + while (*ctx) + { + if (*ctx == pDisplayContext) + { + *ctx = pDisplayContext->pNext; + pDisplayContext->pNext = NULL; + break; + } + ctx = &((*ctx)->pNext); + } + free(pDisplayContext->pDriverContext->dri_state); + free(pDisplayContext->pDriverContext); + free(pDisplayContext); +} + +#ifdef ANDROID +static VAStatus va_DisplayContextGetDriverName ( + VADisplayContextP pDisplayContext, + char **driver_name +) +{ + VADriverContextP ctx = pDisplayContext->pDriverContext; + struct dri_state *dri_state = (struct dri_state *)ctx->dri_state; + char *driver_name_env; + int vendor_id, device_id; + + struct { + int vendor_id; + int device_id; + char driver_name[64]; + } devices[] = { + { 0x8086, 0x4100, "pvr" }, + { 0x8086, 0x0130, "pvr" }, + { 0x0, 0x0, "\0" }, + }; + + memset(dri_state, 0, sizeof(*dri_state)); + dri_state->fd = open_device(DEVICE_NAME); + + if (dri_state->fd < 0) { + fprintf(stderr,"can't open DRM devices\n"); + return VA_STATUS_ERROR_UNKNOWN; + } + + /* TBD: other vendor driver names */ + vendor_id = devices[0].vendor_id; + device_id = devices[0].device_id; + *driver_name = strdup(devices[0].driver_name); + + dri_state->driConnectedFlag = VA_DUMMY; + + return VA_STATUS_SUCCESS; +} +#else +static VAStatus va_DisplayContextGetDriverName ( + VADisplayContextP pDisplayContext, + char **driver_name +) +{ + VADriverContextP ctx = pDisplayContext->pDriverContext; + struct dri_state *dri_state = (struct dri_state *)ctx->dri_state; + char *driver_name_env; + int vendor_id, device_id; + int i = 0; + + struct { + int vendor_id; + int device_id; + char driver_name[64]; + } devices[] = { + { 0x8086, 0x4100, "pvr" }, + { 0x8086, 0x0130, "pvr" }, + { 0x0, 0x0, "\0" }, + }; + + memset(dri_state, 0, sizeof(*dri_state)); + dri_state->fd = drm_open_any(&vendor_id, &device_id); + + if (dri_state->fd < 0) { + fprintf(stderr,"can't open DRM devices\n"); + return VA_STATUS_ERROR_UNKNOWN; + } + + /* TBD: other vendor driver names */ + + while (devices[i].device_id != 0) { + if ((devices[i].vendor_id == vendor_id) && + (devices[i].device_id == device_id)) + break; + i++; + } + + if (devices[i].device_id != 0) + *driver_name = strdup(devices[i].driver_name); + else { + fprintf(stderr,"device (0x%04x:0x%04x) is not supported\n", + vendor_id, device_id); + + return VA_STATUS_ERROR_UNKNOWN; + } + + printf("DRM device is opened, loading driver %s for device 0x%04x:0x%04x\n", + driver_name, vendor_id, device_id); + + dri_state->driConnectedFlag = VA_DUMMY; + + return VA_STATUS_SUCCESS; +} +#endif + +VADisplay vaGetDisplay ( + void *native_dpy /* implementation specific */ +) +{ + VADisplay dpy = NULL; + VADisplayContextP pDisplayContext = pDisplayContexts; + + if (!native_dpy) + return NULL; + + while (pDisplayContext) + { + if (pDisplayContext->pDriverContext && + pDisplayContext->pDriverContext->native_dpy == (void *)native_dpy) + { + dpy = (VADisplay)pDisplayContext; + break; + } + pDisplayContext = pDisplayContext->pNext; + } + + + if (!dpy) + { + /* create new entry */ + VADriverContextP pDriverContext; + struct dri_state *dri_state; + pDisplayContext = (VADisplayContextP)calloc(1, sizeof(*pDisplayContext)); + pDriverContext = (VADriverContextP)calloc(1, sizeof(*pDriverContext)); + dri_state = (struct dri_state*)calloc(1, sizeof(*dri_state)); + if (pDisplayContext && pDriverContext && dri_state) + { + pDisplayContext->vadpy_magic = VA_DISPLAY_MAGIC; + + pDriverContext->native_dpy = (void *)native_dpy; + pDisplayContext->pNext = pDisplayContexts; + pDisplayContext->pDriverContext = pDriverContext; + pDisplayContext->vaIsValid = va_DisplayContextIsValid; + pDisplayContext->vaDestroy = va_DisplayContextDestroy; + pDisplayContext->vaGetDriverName = va_DisplayContextGetDriverName; + pDisplayContexts = pDisplayContext; + pDriverContext->dri_state = dri_state; + dpy = (VADisplay)pDisplayContext; + } + else + { + if (pDisplayContext) + free(pDisplayContext); + if (pDriverContext) + free(pDriverContext); + if (dri_state) + free(dri_state); + } + } + + return dpy; +} + +#define CTX(dpy) (((VADisplayContextP)dpy)->pDriverContext) +#define CHECK_DISPLAY(dpy) if( !vaDisplayIsValid(dpy) ) { return VA_STATUS_ERROR_INVALID_DISPLAY; } + + +#ifdef ANDROID +VAStatus vaPutSurface ( + VADisplay dpy, + VASurfaceID surface, + sp draw, /* Android Surface/Window */ + short srcx, + short srcy, + unsigned short srcw, + unsigned short srch, + short destx, + short desty, + unsigned short destw, + unsigned short desth, + VARectangle *cliprects, /* client supplied clip list */ + unsigned int number_cliprects, /* number of clip rects in the clip list */ + unsigned int flags /* de-interlacing flags */ +) +{ + VADriverContextP ctx; + + CHECK_DISPLAY(dpy); + ctx = CTX(dpy); + return ctx->vtable.vaPutSurface( ctx, surface, static_cast(&draw), srcx, srcy, srcw, srch, + destx, desty, destw, desth, + cliprects, number_cliprects, flags ); +} +#endif diff -Nru libva-1.0.1/va/glx/Makefile.am libva-1.0.1-3+0.31.1/va/glx/Makefile.am --- libva-1.0.1/va/glx/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/va/glx/Makefile.am 2010-06-01 10:57:37.000000000 +0000 @@ -0,0 +1,41 @@ +# Copyright (C) 2009 Splitted-Desktop Systems. All Rights Reserved. +# +# 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, sub license, 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 (including the +# next paragraph) 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 NON-INFRINGEMENT. +# IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR +# ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +AM_CFLAGS = -DLINUX -I$(top_srcdir)/va -I$(top_srcdir)/va/x11 + +source_c = \ + va_glx.c \ + va_glx_impl.c + +source_h = \ + va_glx.h \ + va_backend_glx.h + +source_h_priv = \ + va_glx_impl.h \ + va_glx_private.h + +noinst_LTLIBRARIES = libva_glx.la +libva_glxincludedir = ${includedir}/va +libva_glxinclude_HEADERS = $(source_h) +libva_glx_la_SOURCES = $(source_c) +noinst_HEADERS = $(source_h_priv) diff -Nru libva-1.0.1/va/glx/va_backend_glx.h libva-1.0.1-3+0.31.1/va/glx/va_backend_glx.h --- libva-1.0.1/va/glx/va_backend_glx.h 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/va/glx/va_backend_glx.h 2010-06-01 10:57:37.000000000 +0000 @@ -0,0 +1,54 @@ +/* + * Copyright (C) 2009 Splitted-Desktop Systems. All Rights Reserved. + * + * 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, sub license, 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 (including the + * next paragraph) 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 NON-INFRINGEMENT. + * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +#ifndef VA_BACKEND_GLX_H +#define VA_BACKEND_GLX_H + +struct VADriverContext; + +struct VADriverVTableGLX { + /* Optional: create a surface used for display to OpenGL */ + VAStatus (*vaCreateSurfaceGLX)( + struct VADriverContext *ctx, + unsigned int gl_target, + unsigned int gl_texture, + void **gl_surface + ); + + /* Optional: destroy a VA/GLX surface */ + VAStatus (*vaDestroySurfaceGLX)( + struct VADriverContext *ctx, + void *gl_surface + ); + + /* Optional: copy a VA surface to a VA/GLX surface */ + VAStatus (*vaCopySurfaceGLX)( + struct VADriverContext *ctx, + void *gl_surface, + VASurfaceID surface, + unsigned int flags + ); +}; + +#endif /* VA_BACKEND_GLX_H */ diff -Nru libva-1.0.1/va/glx/va_glx.c libva-1.0.1-3+0.31.1/va/glx/va_glx.c --- libva-1.0.1/va/glx/va_glx.c 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/va/glx/va_glx.c 2010-06-01 10:57:37.000000000 +0000 @@ -0,0 +1,165 @@ +/* + * Copyright (C) 2009 Splitted-Desktop Systems. All Rights Reserved. + * + * 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, sub license, 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 (including the + * next paragraph) 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 NON-INFRINGEMENT. + * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +#include +#include "va_glx_private.h" +#include "va_glx_impl.h" + +#define INIT_CONTEXT(ctx, dpy) do { \ + if (!vaDisplayIsValid(dpy)) \ + return VA_STATUS_ERROR_INVALID_DISPLAY; \ + \ + ctx = ((VADisplayContextP)(dpy))->pDriverContext; \ + if (!(ctx)) \ + return VA_STATUS_ERROR_INVALID_DISPLAY; \ + \ + VAStatus status = va_glx_init_context(ctx); \ + if (status != VA_STATUS_SUCCESS) \ + return status; \ + } while (0) + +#define INVOKE(ctx, func, args) do { \ + VADriverVTableGLXP vtable; \ + vtable = &VA_DRIVER_CONTEXT_GLX(ctx)->vtable; \ + if (!vtable->va##func##GLX) \ + return VA_STATUS_ERROR_UNIMPLEMENTED; \ + status = vtable->va##func##GLX args; \ + } while (0) + + +// Destroy VA/GLX display context +static void va_DisplayContextDestroy(VADisplayContextP pDisplayContext) +{ + VADisplayContextGLXP pDisplayContextGLX; + VADriverContextP pDriverContext; + VADriverContextGLXP pDriverContextGLX; + + if (!pDisplayContext) + return; + + pDriverContext = pDisplayContext->pDriverContext; + pDriverContextGLX = pDriverContext->glx; + if (pDriverContextGLX) { + free(pDriverContextGLX); + pDriverContext->glx = NULL; + } + + pDisplayContextGLX = pDisplayContext->opaque; + if (pDisplayContextGLX) { + vaDestroyFunc vaDestroy = pDisplayContextGLX->vaDestroy; + free(pDisplayContextGLX); + pDisplayContext->opaque = NULL; + if (vaDestroy) + vaDestroy(pDisplayContext); + } +} + +// Return a suitable VADisplay for VA API +VADisplay vaGetDisplayGLX(Display *native_dpy) +{ + VADisplay dpy = NULL; + VADisplayContextP pDisplayContext = NULL; + VADisplayContextGLXP pDisplayContextGLX = NULL; + VADriverContextP pDriverContext; + VADriverContextGLXP pDriverContextGLX = NULL; + + dpy = vaGetDisplay(native_dpy); + if (!dpy) + return NULL; + pDisplayContext = (VADisplayContextP)dpy; + pDriverContext = pDisplayContext->pDriverContext; + + pDisplayContextGLX = calloc(1, sizeof(*pDisplayContextGLX)); + if (!pDisplayContextGLX) + goto error; + + pDriverContextGLX = calloc(1, sizeof(*pDriverContextGLX)); + if (!pDriverContextGLX) + goto error; + + pDisplayContextGLX->vaDestroy = pDisplayContext->vaDestroy; + pDisplayContext->vaDestroy = va_DisplayContextDestroy; + pDisplayContext->opaque = pDisplayContextGLX; + pDriverContext->glx = pDriverContextGLX; + return dpy; + +error: + free(pDriverContextGLX); + free(pDisplayContextGLX); + pDisplayContext->vaDestroy(pDisplayContext); + return NULL; +} + +// Create a surface used for display to OpenGL +VAStatus vaCreateSurfaceGLX( + VADisplay dpy, + GLenum target, + GLuint texture, + void **gl_surface +) +{ + VADriverContextP ctx; + VAStatus status; + + /* Make sure it is a valid GL texture object */ + if (!glIsTexture(texture)) + return VA_STATUS_ERROR_INVALID_PARAMETER; + + INIT_CONTEXT(ctx, dpy); + + INVOKE(ctx, CreateSurface, (ctx, target, texture, gl_surface)); + return status; +} + +// Destroy a VA/GLX surface +VAStatus vaDestroySurfaceGLX( + VADisplay dpy, + void *gl_surface +) +{ + VADriverContextP ctx; + VAStatus status; + + INIT_CONTEXT(ctx, dpy); + + INVOKE(ctx, DestroySurface, (ctx, gl_surface)); + return status; +} + +// Copy a VA surface to a VA/GLX surface +VAStatus vaCopySurfaceGLX( + VADisplay dpy, + void *gl_surface, + VASurfaceID surface, + unsigned int flags +) +{ + VADriverContextP ctx; + VAStatus status; + + INIT_CONTEXT(ctx, dpy); + + INVOKE(ctx, CopySurface, (ctx, gl_surface, surface, flags)); + return status; +} diff -Nru libva-1.0.1/va/glx/va_glx.h libva-1.0.1-3+0.31.1/va/glx/va_glx.h --- libva-1.0.1/va/glx/va_glx.h 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/va/glx/va_glx.h 2010-06-01 10:57:37.000000000 +0000 @@ -0,0 +1,109 @@ +/* + * Copyright (C) 2009 Splitted-Desktop Systems. All Rights Reserved. + * + * 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, sub license, 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 (including the + * next paragraph) 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 NON-INFRINGEMENT. + * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +#ifndef VA_GLX_H +#define VA_GLX_H + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * Return a suitable VADisplay for VA API + * + * @param[in] dpy the X11 display + * @return a VADisplay + */ +VADisplay vaGetDisplayGLX( + Display *dpy +); + +/** + * Create a surface used for display to OpenGL + * + * The application shall maintain the live GLX context itself. + * Implementations are free to use glXGetCurrentContext() and + * glXGetCurrentDrawable() functions for internal purposes. + * + * @param[in] dpy the VA display + * @param[in] target the GL target to which the texture needs to be bound + * @param[in] texture the GL texture + * @param[out] gl_surface the VA/GLX surface + * @return VA_STATUS_SUCCESS if successful + */ +VAStatus vaCreateSurfaceGLX( + VADisplay dpy, + GLenum target, + GLuint texture, + void **gl_surface +); + +/** + * Destroy a VA/GLX surface + * + * The application shall maintain the live GLX context itself. + * Implementations are free to use glXGetCurrentContext() and + * glXGetCurrentDrawable() functions for internal purposes. + * + * @param[in] dpy the VA display + * @param[in] gl_surface the VA surface + * @return VA_STATUS_SUCCESS if successful + */ +VAStatus vaDestroySurfaceGLX( + VADisplay dpy, + void *gl_surface +); + +/** + * Copy a VA surface to a VA/GLX surface + * + * This function will not return until the copy is completed. At this + * point, the underlying GL texture will contain the surface pixels + * in an RGB format defined by the user. + * + * The application shall maintain the live GLX context itself. + * Implementations are free to use glXGetCurrentContext() and + * glXGetCurrentDrawable() functions for internal purposes. + * + * @param[in] dpy the VA display + * @param[in] gl_surface the VA/GLX destination surface + * @param[in] surface the VA source surface + * @param[in] flags the PutSurface flags + * @return VA_STATUS_SUCCESS if successful + */ +VAStatus vaCopySurfaceGLX( + VADisplay dpy, + void *gl_surface, + VASurfaceID surface, + unsigned int flags +); + +#ifdef __cplusplus +} +#endif + +#endif /* VA_GLX_H */ diff -Nru libva-1.0.1/va/glx/va_glx_impl.c libva-1.0.1-3+0.31.1/va/glx/va_glx_impl.c --- libva-1.0.1/va/glx/va_glx_impl.c 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/va/glx/va_glx_impl.c 2010-07-07 12:20:30.000000000 +0000 @@ -0,0 +1,1083 @@ +/* + * Copyright (C) 2009 Splitted-Desktop Systems. All Rights Reserved. + * + * 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, sub license, 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 (including the + * next paragraph) 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 NON-INFRINGEMENT. + * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +#define _GNU_SOURCE 1 +#include "va_glx_private.h" +#include "va_glx_impl.h" +#include +#include +#include +#include +#include +#include + +static void va_glx_error_message(const char *format, ...) +{ + va_list args; + va_start(args, format); + fprintf(stderr, "[%s] ", PACKAGE_NAME); + vfprintf(stderr, format, args); + va_end(args); +} + +// X error trap +static int x11_error_code = 0; +static int (*old_error_handler)(Display *, XErrorEvent *); + +static int error_handler(Display *dpy, XErrorEvent *error) +{ + x11_error_code = error->error_code; + return 0; +} + +static void x11_trap_errors(void) +{ + x11_error_code = 0; + old_error_handler = XSetErrorHandler(error_handler); +} + +static int x11_untrap_errors(void) +{ + XSetErrorHandler(old_error_handler); + return x11_error_code; +} + +// Returns a string representation of an OpenGL error +static const char *gl_get_error_string(GLenum error) +{ + static const struct { + GLenum val; + const char *str; + } + gl_errors[] = { + { GL_NO_ERROR, "no error" }, + { GL_INVALID_ENUM, "invalid enumerant" }, + { GL_INVALID_VALUE, "invalid value" }, + { GL_INVALID_OPERATION, "invalid operation" }, + { GL_STACK_OVERFLOW, "stack overflow" }, + { GL_STACK_UNDERFLOW, "stack underflow" }, + { GL_OUT_OF_MEMORY, "out of memory" }, +#ifdef GL_INVALID_FRAMEBUFFER_OPERATION_EXT + { GL_INVALID_FRAMEBUFFER_OPERATION_EXT, "invalid framebuffer operation" }, +#endif + { ~0, NULL } + }; + + int i; + for (i = 0; gl_errors[i].str; i++) { + if (gl_errors[i].val == error) + return gl_errors[i].str; + } + return "unknown"; +} + +static inline int gl_do_check_error(int report) +{ + GLenum error; + int is_error = 0; + while ((error = glGetError()) != GL_NO_ERROR) { + if (report) + va_glx_error_message("glError: %s caught\n", + gl_get_error_string(error)); + is_error = 1; + } + return is_error; +} + +static inline void gl_purge_errors(void) +{ + gl_do_check_error(0); +} + +static inline int gl_check_error(void) +{ + return gl_do_check_error(1); +} + +// glGetTexLevelParameteriv() wrapper +static int gl_get_texture_param(GLenum param, unsigned int *pval) +{ + GLint val; + + gl_purge_errors(); + glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, param, &val); + if (gl_check_error()) + return 0; + if (pval) + *pval = val; + return 1; +} + +// Returns the OpenGL VTable +static inline VAOpenGLVTableP gl_get_vtable(VADriverContextP ctx) +{ + return &VA_DRIVER_CONTEXT_GLX(ctx)->gl_vtable; +} + +// Lookup for a GLX function +typedef void (*GLFuncPtr)(void); +typedef GLFuncPtr (*GLXGetProcAddressProc)(const char *); + +static GLFuncPtr get_proc_address_default(const char *name) +{ + return NULL; +} + +static GLXGetProcAddressProc get_proc_address_func(void) +{ + GLXGetProcAddressProc get_proc_func; + + dlerror(); + get_proc_func = (GLXGetProcAddressProc) + dlsym(RTLD_DEFAULT, "glXGetProcAddress"); + if (!dlerror()) + return get_proc_func; + + get_proc_func = (GLXGetProcAddressProc) + dlsym(RTLD_DEFAULT, "glXGetProcAddressARB"); + if (!dlerror()) + return get_proc_func; + + return get_proc_address_default; +} + +static inline GLFuncPtr get_proc_address(const char *name) +{ + static GLXGetProcAddressProc get_proc_func = NULL; + if (!get_proc_func) + get_proc_func = get_proc_address_func(); + return get_proc_func(name); +} + +// Check for GLX extensions (TFP, FBO) +static int check_extension(const char *name, const char *ext) +{ + const char *end; + int name_len, n; + + if (!name || !ext) + return 0; + + end = ext + strlen(ext); + name_len = strlen(name); + while (ext < end) { + n = strcspn(ext, " "); + if (n == name_len && strncmp(name, ext, n) == 0) + return 1; + ext += (n + 1); + } + return 0; +} + +static int check_tfp_extensions(VADriverContextP ctx) +{ + const char *gl_extensions; + const char *glx_extensions; + + gl_extensions = (const char *)glGetString(GL_EXTENSIONS); + if (!check_extension("GL_ARB_texture_non_power_of_two", gl_extensions)) + return 0; + + glx_extensions = glXQueryExtensionsString((Display *)ctx->native_dpy, ctx->x11_screen); + if (!check_extension("GLX_EXT_texture_from_pixmap", glx_extensions)) + return 0; + return 1; +} + +static int check_fbo_extensions(VADriverContextP ctx) +{ + const char *gl_extensions; + + gl_extensions = (const char *)glGetString(GL_EXTENSIONS); + if (check_extension("GL_ARB_framebuffer_object", gl_extensions)) + return 1; + if (check_extension("GL_EXT_framebuffer_object", gl_extensions)) + return 1; + return 0; +} + +// Load GLX extensions +static int load_tfp_extensions(VADriverContextP ctx) +{ + VAOpenGLVTableP pOpenGLVTable = gl_get_vtable(ctx); + + pOpenGLVTable->glx_create_pixmap = (PFNGLXCREATEPIXMAPPROC) + get_proc_address("glXCreatePixmap"); + if (!pOpenGLVTable->glx_create_pixmap) + return 0; + pOpenGLVTable->glx_destroy_pixmap = (PFNGLXDESTROYPIXMAPPROC) + get_proc_address("glXDestroyPixmap"); + if (!pOpenGLVTable->glx_destroy_pixmap) + return 0; + pOpenGLVTable->glx_bind_tex_image = (PFNGLXBINDTEXIMAGEEXTPROC) + get_proc_address("glXBindTexImageEXT"); + if (!pOpenGLVTable->glx_bind_tex_image) + return 0; + pOpenGLVTable->glx_release_tex_image = (PFNGLXRELEASETEXIMAGEEXTPROC) + get_proc_address("glXReleaseTexImageEXT"); + if (!pOpenGLVTable->glx_release_tex_image) + return 0; + return 1; +} + +static int load_fbo_extensions(VADriverContextP ctx) +{ + VAOpenGLVTableP pOpenGLVTable = gl_get_vtable(ctx); + + pOpenGLVTable->gl_gen_framebuffers = (PFNGLGENFRAMEBUFFERSEXTPROC) + get_proc_address("glGenFramebuffersEXT"); + if (!pOpenGLVTable->gl_gen_framebuffers) + return 0; + pOpenGLVTable->gl_delete_framebuffers = (PFNGLDELETEFRAMEBUFFERSEXTPROC) + get_proc_address("glDeleteFramebuffersEXT"); + if (!pOpenGLVTable->gl_delete_framebuffers) + return 0; + pOpenGLVTable->gl_bind_framebuffer = (PFNGLBINDFRAMEBUFFEREXTPROC) + get_proc_address("glBindFramebufferEXT"); + if (!pOpenGLVTable->gl_bind_framebuffer) + return 0; + pOpenGLVTable->gl_gen_renderbuffers = (PFNGLGENRENDERBUFFERSEXTPROC) + get_proc_address("glGenRenderbuffersEXT"); + if (!pOpenGLVTable->gl_gen_renderbuffers) + return 0; + pOpenGLVTable->gl_delete_renderbuffers = (PFNGLDELETERENDERBUFFERSEXTPROC) + get_proc_address("glDeleteRenderbuffersEXT"); + if (!pOpenGLVTable->gl_delete_renderbuffers) + return 0; + pOpenGLVTable->gl_bind_renderbuffer = (PFNGLBINDRENDERBUFFEREXTPROC) + get_proc_address("glBindRenderbufferEXT"); + if (!pOpenGLVTable->gl_bind_renderbuffer) + return 0; + pOpenGLVTable->gl_renderbuffer_storage = (PFNGLRENDERBUFFERSTORAGEEXTPROC) + get_proc_address("glRenderbufferStorageEXT"); + if (!pOpenGLVTable->gl_renderbuffer_storage) + return 0; + pOpenGLVTable->gl_framebuffer_renderbuffer = (PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC) + get_proc_address("glFramebufferRenderbufferEXT"); + if (!pOpenGLVTable->gl_framebuffer_renderbuffer) + return 0; + pOpenGLVTable->gl_framebuffer_texture_2d = (PFNGLFRAMEBUFFERTEXTURE2DEXTPROC) + get_proc_address("glFramebufferTexture2DEXT"); + if (!pOpenGLVTable->gl_framebuffer_texture_2d) + return 0; + pOpenGLVTable->gl_check_framebuffer_status = (PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC) + get_proc_address("glCheckFramebufferStatusEXT"); + if (!pOpenGLVTable->gl_check_framebuffer_status) + return 0; + return 1; +} + + +/* ========================================================================= */ +/* === VA/GLX helpers === */ +/* ========================================================================= */ + +// OpenGL context state +typedef struct OpenGLContextState *OpenGLContextStateP; + +struct OpenGLContextState { + Display *display; + Window window; + GLXContext context; +}; + +static void +gl_destroy_context(OpenGLContextStateP cs) +{ + if (!cs) + return; + + if (cs->display && cs->context) { + if (glXGetCurrentContext() == cs->context) + glXMakeCurrent(cs->display, None, NULL); + glXDestroyContext(cs->display, cs->context); + cs->display = NULL; + cs->context = NULL; + } + free(cs); +} + +static OpenGLContextStateP +gl_create_context(VADriverContextP ctx, OpenGLContextStateP parent) +{ + OpenGLContextStateP cs; + GLXFBConfig *fbconfigs = NULL; + int fbconfig_id, val, n, n_fbconfigs; + Status status; + + static GLint fbconfig_attrs[] = { + GLX_DRAWABLE_TYPE, GLX_WINDOW_BIT, + GLX_RENDER_TYPE, GLX_RGBA_BIT, + GLX_DOUBLEBUFFER, True, + GLX_RED_SIZE, 8, + GLX_GREEN_SIZE, 8, + GLX_BLUE_SIZE, 8, + None + }; + + cs = malloc(sizeof(*cs)); + if (!cs) + goto error; + + cs->display = (Display *)ctx->native_dpy; + cs->window = parent ? parent->window : None; + cs->context = NULL; + + if (parent && parent->context) { + status = glXQueryContext( + parent->display, + parent->context, + GLX_FBCONFIG_ID, &fbconfig_id + ); + if (status != Success) + goto error; + + if (fbconfig_id == GLX_DONT_CARE) + goto choose_fbconfig; + + fbconfigs = glXGetFBConfigs( + (Display *)ctx->native_dpy, + ctx->x11_screen, + &n_fbconfigs + ); + if (!fbconfigs) + goto error; + + /* Find out a GLXFBConfig compatible with the parent context */ + for (n = 0; n < n_fbconfigs; n++) { + status = glXGetFBConfigAttrib( + (Display *)ctx->native_dpy, + fbconfigs[n], + GLX_FBCONFIG_ID, &val + ); + if (status == Success && val == fbconfig_id) + break; + } + if (n == n_fbconfigs) + goto error; + } + else { + choose_fbconfig: + fbconfigs = glXChooseFBConfig( + (Display *)ctx->native_dpy, + ctx->x11_screen, + fbconfig_attrs, &n_fbconfigs + ); + if (!fbconfigs) + goto error; + + /* Select the first one */ + n = 0; + } + + cs->context = glXCreateNewContext( + (Display *)ctx->native_dpy, + fbconfigs[n], + GLX_RGBA_TYPE, + parent ? parent->context : NULL, + True + ); + if (cs->context) + goto end; + +error: + gl_destroy_context(cs); + cs = NULL; +end: + if (fbconfigs) + XFree(fbconfigs); + return cs; +} + +static void gl_get_current_context(OpenGLContextStateP cs) +{ + cs->display = glXGetCurrentDisplay(); + cs->window = glXGetCurrentDrawable(); + cs->context = glXGetCurrentContext(); +} + +static int +gl_set_current_context(OpenGLContextStateP new_cs, OpenGLContextStateP old_cs) +{ + /* If display is NULL, this could be that new_cs was retrieved from + gl_get_current_context() with none set previously. If that case, + the other fields are also NULL and we don't return an error */ + if (!new_cs->display) + return !new_cs->window && !new_cs->context; + + if (old_cs) { + if (old_cs == new_cs) + return 1; + gl_get_current_context(old_cs); + if (old_cs->display == new_cs->display && + old_cs->window == new_cs->window && + old_cs->context == new_cs->context) + return 1; + } + return glXMakeCurrent(new_cs->display, new_cs->window, new_cs->context); +} + +/** Unique VASurfaceGLX identifier */ +#define VA_SURFACE_GLX_MAGIC VA_FOURCC('V','A','G','L') + +struct VASurfaceGLX { + uint32_t magic; ///< Magic number identifying a VASurfaceGLX + GLenum target; ///< GL target to which the texture is bound + GLuint texture; ///< GL texture + VASurfaceID surface; ///< Associated VA surface + unsigned int width; + unsigned int height; + OpenGLContextStateP gl_context; + int is_bound; + Pixmap pixmap; + GLuint pix_texture; + GLXPixmap glx_pixmap; + GLuint fbo; +}; + +// Create Pixmaps for GLX texture-from-pixmap extension +static int create_tfp_surface(VADriverContextP ctx, VASurfaceGLXP pSurfaceGLX) +{ + VAOpenGLVTableP const pOpenGLVTable = gl_get_vtable(ctx); + const unsigned int width = pSurfaceGLX->width; + const unsigned int height = pSurfaceGLX->height; + Pixmap pixmap = None; + GLXFBConfig *fbconfig = NULL; + GLXPixmap glx_pixmap = None; + Window root_window; + XWindowAttributes wattr; + int *attrib; + int n_fbconfig_attrs; + + root_window = RootWindow((Display *)ctx->native_dpy, ctx->x11_screen); + XGetWindowAttributes((Display *)ctx->native_dpy, root_window, &wattr); + if (wattr.depth != 24 && wattr.depth != 32) + return 0; + pixmap = XCreatePixmap( + (Display *)ctx->native_dpy, + root_window, + width, + height, + wattr.depth + ); + if (!pixmap) + return 0; + pSurfaceGLX->pixmap = pixmap; + + int fbconfig_attrs[32] = { + GLX_DRAWABLE_TYPE, GLX_PIXMAP_BIT, + GLX_DOUBLEBUFFER, GL_TRUE, + GLX_RENDER_TYPE, GLX_RGBA_BIT, + GLX_X_RENDERABLE, GL_TRUE, + GLX_Y_INVERTED_EXT, GL_TRUE, + GLX_RED_SIZE, 8, + GLX_GREEN_SIZE, 8, + GLX_BLUE_SIZE, 8, + GL_NONE, + }; + for (attrib = fbconfig_attrs; *attrib != GL_NONE; attrib += 2) + ; + *attrib++ = GLX_DEPTH_SIZE; *attrib++ = wattr.depth; + if (wattr.depth == 32) { + *attrib++ = GLX_ALPHA_SIZE; *attrib++ = 8; + *attrib++ = GLX_BIND_TO_TEXTURE_RGBA_EXT; *attrib++ = GL_TRUE; + } + else { + *attrib++ = GLX_BIND_TO_TEXTURE_RGB_EXT; *attrib++ = GL_TRUE; + } + *attrib++ = GL_NONE; + + fbconfig = glXChooseFBConfig( + (Display *)ctx->native_dpy, + ctx->x11_screen, + fbconfig_attrs, + &n_fbconfig_attrs + ); + if (!fbconfig) + return 0; + + int pixmap_attrs[10] = { + GLX_TEXTURE_TARGET_EXT, GLX_TEXTURE_2D_EXT, + GLX_MIPMAP_TEXTURE_EXT, GL_FALSE, + GL_NONE, + }; + for (attrib = pixmap_attrs; *attrib != GL_NONE; attrib += 2) + ; + *attrib++ = GLX_TEXTURE_FORMAT_EXT; + if (wattr.depth == 32) + *attrib++ = GLX_TEXTURE_FORMAT_RGBA_EXT; + else + *attrib++ = GLX_TEXTURE_FORMAT_RGB_EXT; + *attrib++ = GL_NONE; + + x11_trap_errors(); + glx_pixmap = pOpenGLVTable->glx_create_pixmap( + (Display *)ctx->native_dpy, + fbconfig[0], + pixmap, + pixmap_attrs + ); + free(fbconfig); + if (x11_untrap_errors() != 0) + return 0; + pSurfaceGLX->glx_pixmap = glx_pixmap; + + glGenTextures(1, &pSurfaceGLX->pix_texture); + glBindTexture(GL_TEXTURE_2D, pSurfaceGLX->pix_texture); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + return 1; +} + +// Destroy Pixmaps used for TFP +static void destroy_tfp_surface(VADriverContextP ctx, VASurfaceGLXP pSurfaceGLX) +{ + VAOpenGLVTableP const pOpenGLVTable = gl_get_vtable(ctx); + + if (pSurfaceGLX->pix_texture) { + glDeleteTextures(1, &pSurfaceGLX->pix_texture); + pSurfaceGLX->pix_texture = 0; + } + + if (pSurfaceGLX->glx_pixmap) { + pOpenGLVTable->glx_destroy_pixmap((Display *)ctx->native_dpy, pSurfaceGLX->glx_pixmap); + pSurfaceGLX->glx_pixmap = None; + } + + if (pSurfaceGLX->pixmap) { + XFreePixmap((Display *)ctx->native_dpy, pSurfaceGLX->pixmap); + pSurfaceGLX->pixmap = None; + } +} + +// Bind GLX Pixmap to texture +static int bind_pixmap(VADriverContextP ctx, VASurfaceGLXP pSurfaceGLX) +{ + VAOpenGLVTableP pOpenGLVTable = gl_get_vtable(ctx); + + if (pSurfaceGLX->is_bound) + return 1; + + glBindTexture(GL_TEXTURE_2D, pSurfaceGLX->pix_texture); + + x11_trap_errors(); + pOpenGLVTable->glx_bind_tex_image( + (Display *)ctx->native_dpy, + pSurfaceGLX->glx_pixmap, + GLX_FRONT_LEFT_EXT, + NULL + ); + XSync((Display *)ctx->native_dpy, False); + if (x11_untrap_errors() != 0) { + va_glx_error_message("failed to bind pixmap\n"); + return 0; + } + + pSurfaceGLX->is_bound = 1; + return 1; +} + +// Release GLX Pixmap from texture +static int unbind_pixmap(VADriverContextP ctx, VASurfaceGLXP pSurfaceGLX) +{ + VAOpenGLVTableP pOpenGLVTable = gl_get_vtable(ctx); + + if (!pSurfaceGLX->is_bound) + return 1; + + x11_trap_errors(); + pOpenGLVTable->glx_release_tex_image( + (Display *)ctx->native_dpy, + pSurfaceGLX->glx_pixmap, + GLX_FRONT_LEFT_EXT + ); + XSync((Display *)ctx->native_dpy, False); + if (x11_untrap_errors() != 0) { + va_glx_error_message("failed to release pixmap\n"); + return 0; + } + + glBindTexture(GL_TEXTURE_2D, 0); + + pSurfaceGLX->is_bound = 0; + return 1; +} + +// Render GLX Pixmap to texture +static void render_pixmap(VADriverContextP ctx, VASurfaceGLXP pSurfaceGLX) +{ + const unsigned int w = pSurfaceGLX->width; + const unsigned int h = pSurfaceGLX->height; + + glColor4f(1.0f, 1.0f, 1.0f, 1.0f); + glBegin(GL_QUADS); + { + glTexCoord2f(0.0f, 0.0f); glVertex2i(0, 0); + glTexCoord2f(0.0f, 1.0f); glVertex2i(0, h); + glTexCoord2f(1.0f, 1.0f); glVertex2i(w, h); + glTexCoord2f(1.0f, 0.0f); glVertex2i(w, 0); + } + glEnd(); +} + +// Create offscreen surface +static int create_fbo_surface(VADriverContextP ctx, VASurfaceGLXP pSurfaceGLX) +{ + VAOpenGLVTableP pOpenGLVTable = gl_get_vtable(ctx); + GLuint fbo; + GLenum status; + + pOpenGLVTable->gl_gen_framebuffers(1, &fbo); + pOpenGLVTable->gl_bind_framebuffer(GL_FRAMEBUFFER_EXT, fbo); + pOpenGLVTable->gl_framebuffer_texture_2d( + GL_FRAMEBUFFER_EXT, + GL_COLOR_ATTACHMENT0_EXT, + GL_TEXTURE_2D, + pSurfaceGLX->texture, + 0 + ); + + status = pOpenGLVTable->gl_check_framebuffer_status(GL_DRAW_FRAMEBUFFER_EXT); + pOpenGLVTable->gl_bind_framebuffer(GL_FRAMEBUFFER_EXT, 0); + if (status != GL_FRAMEBUFFER_COMPLETE_EXT) + return 0; + + pSurfaceGLX->fbo = fbo; + return 1; +} + +// Destroy offscreen surface +static void destroy_fbo_surface(VADriverContextP ctx, VASurfaceGLXP pSurfaceGLX) +{ + VAOpenGLVTableP pOpenGLVTable = gl_get_vtable(ctx); + + if (pSurfaceGLX->fbo) { + pOpenGLVTable->gl_delete_framebuffers(1, &pSurfaceGLX->fbo); + pSurfaceGLX->fbo = 0; + } +} + +// Setup matrices to match the FBO texture dimensions +static void fbo_enter(VADriverContextP ctx, VASurfaceGLXP pSurfaceGLX) +{ + VAOpenGLVTableP pOpenGLVTable = gl_get_vtable(ctx); + const unsigned int width = pSurfaceGLX->width; + const unsigned int height = pSurfaceGLX->height; + + pOpenGLVTable->gl_bind_framebuffer(GL_FRAMEBUFFER_EXT, pSurfaceGLX->fbo); + glPushAttrib(GL_VIEWPORT_BIT); + glMatrixMode(GL_PROJECTION); + glPushMatrix(); + glLoadIdentity(); + glMatrixMode(GL_MODELVIEW); + glPushMatrix(); + glLoadIdentity(); + glViewport(0, 0, width, height); + glTranslatef(-1.0f, -1.0f, 0.0f); + glScalef(2.0f / width, 2.0f / height, 1.0f); +} + +// Restore original OpenGL matrices +static void fbo_leave(VADriverContextP ctx) +{ + VAOpenGLVTableP pOpenGLVTable = gl_get_vtable(ctx); + + glPopAttrib(); + glMatrixMode(GL_PROJECTION); + glPopMatrix(); + glMatrixMode(GL_MODELVIEW); + glPopMatrix(); + pOpenGLVTable->gl_bind_framebuffer(GL_FRAMEBUFFER_EXT, 0); +} + +// Check internal texture format is supported +static int is_supported_internal_format(GLenum format) +{ + /* XXX: we don't support other textures than RGBA */ + switch (format) { + case 4: + case GL_RGBA: + case GL_RGBA8: + return 1; + } + return 0; +} + +// Destroy VA/GLX surface +static void +destroy_surface(VADriverContextP ctx, VASurfaceGLXP pSurfaceGLX) +{ + unbind_pixmap(ctx, pSurfaceGLX); + destroy_fbo_surface(ctx, pSurfaceGLX); + destroy_tfp_surface(ctx, pSurfaceGLX); + free(pSurfaceGLX); +} + +// Create VA/GLX surface +static VASurfaceGLXP +create_surface(VADriverContextP ctx, GLenum target, GLuint texture) +{ + VASurfaceGLXP pSurfaceGLX = NULL; + unsigned int internal_format, border_width, width, height; + int is_error = 1; + + pSurfaceGLX = malloc(sizeof(*pSurfaceGLX)); + if (!pSurfaceGLX) + goto end; + + pSurfaceGLX->magic = VA_SURFACE_GLX_MAGIC; + pSurfaceGLX->target = target; + pSurfaceGLX->texture = texture; + pSurfaceGLX->surface = VA_INVALID_SURFACE; + pSurfaceGLX->gl_context = NULL; + pSurfaceGLX->is_bound = 0; + pSurfaceGLX->pixmap = None; + pSurfaceGLX->pix_texture = 0; + pSurfaceGLX->glx_pixmap = None; + pSurfaceGLX->fbo = 0; + + glEnable(target); + glBindTexture(target, texture); + if (!gl_get_texture_param(GL_TEXTURE_INTERNAL_FORMAT, &internal_format)) + goto end; + if (!is_supported_internal_format(internal_format)) + goto end; + + /* Check texture dimensions */ + if (!gl_get_texture_param(GL_TEXTURE_BORDER, &border_width)) + goto end; + if (!gl_get_texture_param(GL_TEXTURE_WIDTH, &width)) + goto end; + if (!gl_get_texture_param(GL_TEXTURE_HEIGHT, &height)) + goto end; + + width -= 2 * border_width; + height -= 2 * border_width; + if (width == 0 || height == 0) + goto end; + + pSurfaceGLX->width = width; + pSurfaceGLX->height = height; + + /* Create TFP objects */ + if (!create_tfp_surface(ctx, pSurfaceGLX)) + goto end; + + /* Create FBO objects */ + if (!create_fbo_surface(ctx, pSurfaceGLX)) + goto end; + + is_error = 0; +end: + if (is_error && pSurfaceGLX) { + destroy_surface(ctx, pSurfaceGLX); + pSurfaceGLX = NULL; + } + return pSurfaceGLX; +} + + +/* ========================================================================= */ +/* === VA/GLX implementation from the driver (fordward calls) === */ +/* ========================================================================= */ + +#define INVOKE(ctx, func, args) do { \ + VADriverVTableGLXP vtable = (ctx)->vtable.glx; \ + if (!vtable->va##func##GLX) \ + return VA_STATUS_ERROR_UNIMPLEMENTED; \ + \ + VAStatus status = vtable->va##func##GLX args; \ + if (status != VA_STATUS_SUCCESS) \ + return status; \ + } while (0) + +static VAStatus +vaCreateSurfaceGLX_impl_driver( + VADriverContextP ctx, + GLenum target, + GLuint texture, + void **gl_surface +) +{ + INVOKE(ctx, CreateSurface, (ctx, target, texture, gl_surface)); + return VA_STATUS_SUCCESS; +} + +static VAStatus +vaDestroySurfaceGLX_impl_driver(VADriverContextP ctx, void *gl_surface) +{ + INVOKE(ctx, DestroySurface, (ctx, gl_surface)); + return VA_STATUS_SUCCESS; +} + +static VAStatus +vaCopySurfaceGLX_impl_driver( + VADriverContextP ctx, + void *gl_surface, + VASurfaceID surface, + unsigned int flags +) +{ + INVOKE(ctx, CopySurface, (ctx, gl_surface, surface, flags)); + return VA_STATUS_SUCCESS; +} + +#undef INVOKE + + +/* ========================================================================= */ +/* === VA/GLX implementation from libVA (generic and suboptimal path) === */ +/* ========================================================================= */ + +#define INIT_SURFACE(surface, surface_arg) do { \ + surface = (VASurfaceGLXP)(surface_arg); \ + if (!check_surface(surface)) \ + return VA_STATUS_ERROR_INVALID_SURFACE; \ + } while (0) + +// Check VASurfaceGLX is valid +static inline int check_surface(VASurfaceGLXP pSurfaceGLX) +{ + return pSurfaceGLX && pSurfaceGLX->magic == VA_SURFACE_GLX_MAGIC; +} + +static VAStatus +vaCreateSurfaceGLX_impl_libva( + VADriverContextP ctx, + GLenum target, + GLuint texture, + void **gl_surface +) +{ + VASurfaceGLXP pSurfaceGLX; + struct OpenGLContextState old_cs, *new_cs; + + gl_get_current_context(&old_cs); + new_cs = gl_create_context(ctx, &old_cs); + if (!new_cs) + return VA_STATUS_ERROR_ALLOCATION_FAILED; + if (!gl_set_current_context(new_cs, NULL)) + return VA_STATUS_ERROR_OPERATION_FAILED; + + pSurfaceGLX = create_surface(ctx, target, texture); + if (!pSurfaceGLX) + return VA_STATUS_ERROR_ALLOCATION_FAILED; + + pSurfaceGLX->gl_context = new_cs; + *gl_surface = pSurfaceGLX; + + gl_set_current_context(&old_cs, NULL); + return VA_STATUS_SUCCESS; +} + +static VAStatus +vaDestroySurfaceGLX_impl_libva(VADriverContextP ctx, void *gl_surface) +{ + VASurfaceGLXP pSurfaceGLX; + struct OpenGLContextState old_cs, *new_cs; + + INIT_SURFACE(pSurfaceGLX, gl_surface); + + new_cs = pSurfaceGLX->gl_context; + if (!gl_set_current_context(new_cs, &old_cs)) + return VA_STATUS_ERROR_OPERATION_FAILED; + + destroy_surface(ctx, pSurfaceGLX); + + gl_destroy_context(new_cs); + gl_set_current_context(&old_cs, NULL); + return VA_STATUS_SUCCESS; +} + +static inline VAStatus +deassociate_surface(VADriverContextP ctx, VASurfaceGLXP pSurfaceGLX) +{ + if (!unbind_pixmap(ctx, pSurfaceGLX)) + return VA_STATUS_ERROR_OPERATION_FAILED; + + pSurfaceGLX->surface = VA_INVALID_SURFACE; + return VA_STATUS_SUCCESS; +} + +static VAStatus +associate_surface( + VADriverContextP ctx, + VASurfaceGLXP pSurfaceGLX, + VASurfaceID surface, + unsigned int flags +) +{ + VAStatus status; + + /* XXX: optimise case where we are associating the same VA surface + as before an no changed occurred to it */ + status = deassociate_surface(ctx, pSurfaceGLX); + if (status != VA_STATUS_SUCCESS) + return status; + + x11_trap_errors(); + status = ctx->vtable.vaPutSurface( + ctx, + surface, + (void *)pSurfaceGLX->pixmap, + 0, 0, pSurfaceGLX->width, pSurfaceGLX->height, + 0, 0, pSurfaceGLX->width, pSurfaceGLX->height, + NULL, 0, + flags + ); + XSync((Display *)ctx->native_dpy, False); + if (x11_untrap_errors() != 0) + return VA_STATUS_ERROR_OPERATION_FAILED; + if (status != VA_STATUS_SUCCESS) + return status; + + pSurfaceGLX->surface = surface; + return VA_STATUS_SUCCESS; +} + +static inline VAStatus +sync_surface(VADriverContextP ctx, VASurfaceGLXP pSurfaceGLX) +{ + if (pSurfaceGLX->surface == VA_INVALID_SURFACE) + return VA_STATUS_ERROR_INVALID_SURFACE; + + return ctx->vtable.vaSyncSurface(ctx, pSurfaceGLX->surface); +} + +static inline VAStatus +begin_render_surface(VADriverContextP ctx, VASurfaceGLXP pSurfaceGLX) +{ + VAStatus status; + + status = sync_surface(ctx, pSurfaceGLX); + if (status != VA_STATUS_SUCCESS) + return status; + + if (!bind_pixmap(ctx, pSurfaceGLX)) + return VA_STATUS_ERROR_OPERATION_FAILED; + + return VA_STATUS_SUCCESS; +} + +static inline VAStatus +end_render_surface(VADriverContextP ctx, VASurfaceGLXP pSurfaceGLX) +{ + if (!unbind_pixmap(ctx, pSurfaceGLX)) + return VA_STATUS_ERROR_OPERATION_FAILED; + + return VA_STATUS_SUCCESS; +} + +static VAStatus +copy_surface( + VADriverContextP ctx, + VASurfaceGLXP pSurfaceGLX, + VASurfaceID surface, + unsigned int flags +) +{ + VAStatus status; + + /* Associate VA surface */ + status = associate_surface(ctx, pSurfaceGLX, surface, flags); + if (status != VA_STATUS_SUCCESS) + return status; + + /* Render to FBO */ + fbo_enter(ctx, pSurfaceGLX); + status = begin_render_surface(ctx, pSurfaceGLX); + if (status == VA_STATUS_SUCCESS) { + render_pixmap(ctx, pSurfaceGLX); + status = end_render_surface(ctx, pSurfaceGLX); + } + fbo_leave(ctx); + if (status != VA_STATUS_SUCCESS) + return status; + + return deassociate_surface(ctx, pSurfaceGLX); +} + +static VAStatus +vaCopySurfaceGLX_impl_libva( + VADriverContextP ctx, + void *gl_surface, + VASurfaceID surface, + unsigned int flags +) +{ + VASurfaceGLXP pSurfaceGLX; + VAStatus status; + struct OpenGLContextState old_cs; + + INIT_SURFACE(pSurfaceGLX, gl_surface); + + if (!gl_set_current_context(pSurfaceGLX->gl_context, &old_cs)) + return VA_STATUS_ERROR_OPERATION_FAILED; + + status = copy_surface(ctx, pSurfaceGLX, surface, flags); + + gl_set_current_context(&old_cs, NULL); + return status; +} + +#undef INIT_SURFACE + + +/* ========================================================================= */ +/* === Private VA/GLX vtable initialization === */ +/* ========================================================================= */ + +// Initialize GLX driver context +VAStatus va_glx_init_context(VADriverContextP ctx) +{ + VADriverContextGLXP glx_ctx = VA_DRIVER_CONTEXT_GLX(ctx); + VADriverVTableGLXP vtable = &glx_ctx->vtable; + int glx_major, glx_minor; + + if (glx_ctx->is_initialized) + return VA_STATUS_SUCCESS; + + if (ctx->vtable.glx && ctx->vtable.glx->vaCopySurfaceGLX) { + vtable->vaCreateSurfaceGLX = vaCreateSurfaceGLX_impl_driver; + vtable->vaDestroySurfaceGLX = vaDestroySurfaceGLX_impl_driver; + vtable->vaCopySurfaceGLX = vaCopySurfaceGLX_impl_driver; + } + else { + vtable->vaCreateSurfaceGLX = vaCreateSurfaceGLX_impl_libva; + vtable->vaDestroySurfaceGLX = vaDestroySurfaceGLX_impl_libva; + vtable->vaCopySurfaceGLX = vaCopySurfaceGLX_impl_libva; + + if (!glXQueryVersion((Display *)ctx->native_dpy, &glx_major, &glx_minor)) + return VA_STATUS_ERROR_UNIMPLEMENTED; + + if (!check_tfp_extensions(ctx) || !load_tfp_extensions(ctx)) + return VA_STATUS_ERROR_UNIMPLEMENTED; + + if (!check_fbo_extensions(ctx) || !load_fbo_extensions(ctx)) + return VA_STATUS_ERROR_UNIMPLEMENTED; + } + + glx_ctx->is_initialized = 1; + return VA_STATUS_SUCCESS; +} diff -Nru libva-1.0.1/va/glx/va_glx_impl.h libva-1.0.1-3+0.31.1/va/glx/va_glx_impl.h --- libva-1.0.1/va/glx/va_glx_impl.h 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/va/glx/va_glx_impl.h 2010-06-01 10:57:37.000000000 +0000 @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2009 Splitted-Desktop Systems. All Rights Reserved. + * + * 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, sub license, 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 (including the + * next paragraph) 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 NON-INFRINGEMENT. + * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +#ifndef VA_GLX_IMPL_H +#define VA_GLX_IMPL_H + +/** + * Initialize GLX driver context + * + * @param[in] ctx the VA driver context + * @return VA_STATUS_SUCCESS if successful + */ +VAStatus va_glx_init_context(VADriverContextP ctx); + /* ATTRIBUTE_HIDDEN; */ + +#endif /* VA_GLX_IMPL_H */ diff -Nru libva-1.0.1/va/glx/va_glx_private.h libva-1.0.1-3+0.31.1/va/glx/va_glx_private.h --- libva-1.0.1/va/glx/va_glx_private.h 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/va/glx/va_glx_private.h 2010-07-07 12:20:30.000000000 +0000 @@ -0,0 +1,86 @@ +/* + * Copyright (C) 2009 Splitted-Desktop Systems. All Rights Reserved. + * + * 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, sub license, 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 (including the + * next paragraph) 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 NON-INFRINGEMENT. + * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +#ifndef VA_GLX_PRIVATE_H +#define VA_GLX_PRIVATE_H + +#include "config.h" +#include "va.h" +#include "va_backend.h" +#include "va_x11.h" +#include "va_glx.h" +#include "va_backend_glx.h" +#include + +#if GLX_GLXEXT_VERSION < 18 +typedef void (*PFNGLXBINDTEXIMAGEEXTPROC)(Display *, GLXDrawable, int, const int *); +typedef void (*PFNGLXRELEASETEXIMAGEEXTPROC)(Display *, GLXDrawable, int); +#endif + +#if GLX_GLXEXT_VERSION < 27 +/* XXX: this is not exactly that version but this is the only means to + make sure we have the correct with those signatures */ +typedef GLXPixmap (*PFNGLXCREATEPIXMAPPROC)(Display *, GLXFBConfig, Pixmap, const int *); +typedef void (*PFNGLXDESTROYPIXMAPPROC)(Display *, GLXPixmap); +#endif + +typedef struct VAOpenGLVTable *VAOpenGLVTableP; + +struct VAOpenGLVTable { + PFNGLXCREATEPIXMAPPROC glx_create_pixmap; + PFNGLXDESTROYPIXMAPPROC glx_destroy_pixmap; + PFNGLXBINDTEXIMAGEEXTPROC glx_bind_tex_image; + PFNGLXRELEASETEXIMAGEEXTPROC glx_release_tex_image; + PFNGLGENFRAMEBUFFERSEXTPROC gl_gen_framebuffers; + PFNGLDELETEFRAMEBUFFERSEXTPROC gl_delete_framebuffers; + PFNGLBINDFRAMEBUFFEREXTPROC gl_bind_framebuffer; + PFNGLGENRENDERBUFFERSEXTPROC gl_gen_renderbuffers; + PFNGLDELETERENDERBUFFERSEXTPROC gl_delete_renderbuffers; + PFNGLBINDRENDERBUFFEREXTPROC gl_bind_renderbuffer; + PFNGLRENDERBUFFERSTORAGEEXTPROC gl_renderbuffer_storage; + PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC gl_framebuffer_renderbuffer; + PFNGLFRAMEBUFFERTEXTURE2DEXTPROC gl_framebuffer_texture_2d; + PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC gl_check_framebuffer_status; +}; + +typedef struct VADisplayContextGLX *VADisplayContextGLXP; +typedef struct VADriverContextGLX *VADriverContextGLXP; +typedef struct VASurfaceGLX *VASurfaceGLXP; +typedef struct VADriverVTableGLX *VADriverVTableGLXP; + +typedef void (*vaDestroyFunc)(VADisplayContextP); + +struct VADisplayContextGLX { + vaDestroyFunc vaDestroy; +}; + +#define VA_DRIVER_CONTEXT_GLX(ctx) ((VADriverContextGLXP)((ctx)->glx)) + +struct VADriverContextGLX { + struct VADriverVTableGLX vtable; + struct VAOpenGLVTable gl_vtable; + unsigned int is_initialized : 1; +}; + +#endif /* VA_GLX_PRIVATE_H */ diff -Nru libva-1.0.1/va/Makefile.am libva-1.0.1-3+0.31.1/va/Makefile.am --- libva-1.0.1/va/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/va/Makefile.am 2010-06-02 06:46:21.000000000 +0000 @@ -0,0 +1,90 @@ +# Copyright (c) 2007 Intel Corporation. All Rights Reserved. +# +# 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, sub license, 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 (including the +# next paragraph) 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 NON-INFRINGEMENT. +# IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR +# ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +INCLUDES = \ + $(LIBVA_CFLAGS) -I$(top_srcdir)/va/x11 \ + -DVA_DRIVERS_PATH="\"$(LIBVA_DRIVERS_PATH)\"" + +LDADD = \ + $(LIBVA_LT_LDFLAGS) + +libva_la_SOURCES = va.c va_trace.c +libva_ladir = $(libdir) +libva_la_LDFLAGS = $(LDADD) -no-undefined +libva_la_LIBADD = $(LIBVA_LIBS) -ldl + +libva_tpi_la_SOURCES = va_tpi.c +libva_tpi_ladir = $(libdir) +libva_tpi_la_LDFLAGS = $(LDADD) -no-undefined +libva_tpi_la_LIBADD = $(libvacorelib) -ldl +libva_tpi_la_DEPENDENCIES = $(libvacorelib) + + +libva_x11_backend = libva-x11.la +libva_x11_backenddir = x11 + +libva_x11_la_SOURCES = +libva_x11_la_LIBADD = $(libvacorelib) x11/libva_x11.la $(LIBVA_LIBS) $(X11_LIBS) $(XEXT_LIBS) $(DRM_LIBS) $(XFIXES_LIBS) +libva_x11_la_LDFLAGS = $(LDADD) +libva_x11_la_DEPENDENCIES = $(libvacorelib) x11/libva_x11.la + +if BUILD_DUMMY_BACKEND +libva_dummy_backend = libva-dummy.la +libva_dummy_backenddir = dummy + +libva_dummy_la_SOURCES = +libva_dummy_la_LIBADD = $(libvacorelib) dummy/libva_dummy.la $(LIBVA_LIBS) $(DRM_LIBS) +libva_dummy_la_LDFLAGS = $(LDADD) +libva_dummy_la_DEPENDENCIES = $(libvacorelib) dummy/libva_dummy.la +else +libva_dummy_backend = +libva_dummy_backenddir = +endif + +if USE_GLX +libva_glx_backend = libva-glx.la +libva_glx_backenddir = glx + +libva_glx_la_SOURCES = +libva_glx_la_LIBADD = $(libvacorelib) glx/libva_glx.la libva-x11.la $(GL_DEPS_LIBS) -ldl +libva_glx_la_LDFLAGS = $(LDADD) +libva_glx_la_DEPENDENCIES = $(libvacorelib) glx/libva_glx.la libva-x11.la + +else +libva_glx_backend = +libva_glx_backenddir = +endif + +lib_LTLIBRARIES = libva.la libva-tpi.la $(libva_x11_backend) $(libva_dummy_backend) $(libva_glx_backend) + +DIST_SUBDIRS = x11 glx dummy + +SUBDIRS = $(libva_x11_backenddir) $(libva_dummy_backenddir) $(libva_glx_backenddir) + +libvaincludedir = ${includedir}/va +libvainclude_HEADERS = va.h va_tpi.h va_x11.h va_backend.h va_backend_tpi.h va_dummy.h va_version.h + +DISTCLEANFILES = \ + va_version.h + +EXTRA_DIST = \ + va_version.h.in diff -Nru libva-1.0.1/va/va_android.h libva-1.0.1-3+0.31.1/va/va_android.h --- libva-1.0.1/va/va_android.h 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/va/va_android.h 2010-06-02 06:46:21.000000000 +0000 @@ -0,0 +1,54 @@ +#ifndef _VA_ANDROID_H_ +#define _VA_ANDROID_H_ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Returns a suitable VADisplay for VA API + */ +VADisplay vaGetDisplay ( + void *android_dpy +); + +#ifdef __cplusplus +} +#endif + +#ifdef __cplusplus +#ifdef ANDROID +#include +using namespace android; + +/* + * Output rendering + * Following is the rendering interface for Android system, + * to get the decode output surface to an ISurface object. + * It basically performs a de-interlacing (if needed), + * color space conversion and scaling to the destination + * rectangle + */ +VAStatus vaPutSurface ( + VADisplay dpy, + VASurfaceID surface, + sp draw, /* Android Window/Surface */ + short srcx, + short srcy, + unsigned short srcw, + unsigned short srch, + short destx, + short desty, + unsigned short destw, + unsigned short desth, + VARectangle *cliprects, /* client supplied destination clip list */ + unsigned int number_cliprects, /* number of clip rects in the clip list */ + unsigned int flags /* PutSurface flags */ +); + +#endif /* ANDROID */ +#endif /* __cplusplus */ + +#endif /* _VA_ANDROID_H_ */ diff -Nru libva-1.0.1/va/va_backend.h libva-1.0.1-3+0.31.1/va/va_backend.h --- libva-1.0.1/va/va_backend.h 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/va/va_backend.h 2010-06-04 07:42:00.000000000 +0000 @@ -0,0 +1,431 @@ +/* + * Copyright (c) 2007 Intel Corporation. All Rights Reserved. + * + * 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, sub license, 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 (including the + * next paragraph) 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 NON-INFRINGEMENT. + * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +/* + * Video Decode Acceleration -Backend API + */ + +#ifndef _VA_BACKEND_H_ +#define _VA_BACKEND_H_ + +#include +#ifndef ANDROID +#include +#endif +#include + +typedef struct VADriverContext *VADriverContextP; +typedef struct VADisplayContext *VADisplayContextP; + +struct VADriverVTable +{ + VAStatus (*vaTerminate) ( VADriverContextP ctx ); + + VAStatus (*vaQueryConfigProfiles) ( + VADriverContextP ctx, + VAProfile *profile_list, /* out */ + int *num_profiles /* out */ + ); + + VAStatus (*vaQueryConfigEntrypoints) ( + VADriverContextP ctx, + VAProfile profile, + VAEntrypoint *entrypoint_list, /* out */ + int *num_entrypoints /* out */ + ); + + VAStatus (*vaGetConfigAttributes) ( + VADriverContextP ctx, + VAProfile profile, + VAEntrypoint entrypoint, + VAConfigAttrib *attrib_list, /* in/out */ + int num_attribs + ); + + VAStatus (*vaCreateConfig) ( + VADriverContextP ctx, + VAProfile profile, + VAEntrypoint entrypoint, + VAConfigAttrib *attrib_list, + int num_attribs, + VAConfigID *config_id /* out */ + ); + + VAStatus (*vaDestroyConfig) ( + VADriverContextP ctx, + VAConfigID config_id + ); + + VAStatus (*vaQueryConfigAttributes) ( + VADriverContextP ctx, + VAConfigID config_id, + VAProfile *profile, /* out */ + VAEntrypoint *entrypoint, /* out */ + VAConfigAttrib *attrib_list, /* out */ + int *num_attribs /* out */ + ); + + VAStatus (*vaCreateSurfaces) ( + VADriverContextP ctx, + int width, + int height, + int format, + int num_surfaces, + VASurfaceID *surfaces /* out */ + ); + + VAStatus (*vaDestroySurfaces) ( + VADriverContextP ctx, + VASurfaceID *surface_list, + int num_surfaces + ); + + VAStatus (*vaCreateContext) ( + VADriverContextP ctx, + VAConfigID config_id, + int picture_width, + int picture_height, + int flag, + VASurfaceID *render_targets, + int num_render_targets, + VAContextID *context /* out */ + ); + + VAStatus (*vaDestroyContext) ( + VADriverContextP ctx, + VAContextID context + ); + + VAStatus (*vaCreateBuffer) ( + VADriverContextP ctx, + VAContextID context, /* in */ + VABufferType type, /* in */ + unsigned int size, /* in */ + unsigned int num_elements, /* in */ + void *data, /* in */ + VABufferID *buf_id /* out */ + ); + + VAStatus (*vaBufferSetNumElements) ( + VADriverContextP ctx, + VABufferID buf_id, /* in */ + unsigned int num_elements /* in */ + ); + + VAStatus (*vaMapBuffer) ( + VADriverContextP ctx, + VABufferID buf_id, /* in */ + void **pbuf /* out */ + ); + + VAStatus (*vaUnmapBuffer) ( + VADriverContextP ctx, + VABufferID buf_id /* in */ + ); + + VAStatus (*vaDestroyBuffer) ( + VADriverContextP ctx, + VABufferID buffer_id + ); + + VAStatus (*vaBeginPicture) ( + VADriverContextP ctx, + VAContextID context, + VASurfaceID render_target + ); + + VAStatus (*vaRenderPicture) ( + VADriverContextP ctx, + VAContextID context, + VABufferID *buffers, + int num_buffers + ); + + VAStatus (*vaEndPicture) ( + VADriverContextP ctx, + VAContextID context + ); + + VAStatus (*vaSyncSurface) ( + VADriverContextP ctx, + VASurfaceID render_target + ); + + VAStatus (*vaQuerySurfaceStatus) ( + VADriverContextP ctx, + VASurfaceID render_target, + VASurfaceStatus *status /* out */ + ); + + VAStatus (*vaPutSurface) ( + VADriverContextP ctx, + VASurfaceID surface, + void* draw, /* Drawable of window system */ + short srcx, + short srcy, + unsigned short srcw, + unsigned short srch, + short destx, + short desty, + unsigned short destw, + unsigned short desth, + VARectangle *cliprects, /* client supplied clip list */ + unsigned int number_cliprects, /* number of clip rects in the clip list */ + unsigned int flags /* de-interlacing flags */ + ); + + VAStatus (*vaQueryImageFormats) ( + VADriverContextP ctx, + VAImageFormat *format_list, /* out */ + int *num_formats /* out */ + ); + + VAStatus (*vaCreateImage) ( + VADriverContextP ctx, + VAImageFormat *format, + int width, + int height, + VAImage *image /* out */ + ); + + VAStatus (*vaDeriveImage) ( + VADriverContextP ctx, + VASurfaceID surface, + VAImage *image /* out */ + ); + + VAStatus (*vaDestroyImage) ( + VADriverContextP ctx, + VAImageID image + ); + + VAStatus (*vaSetImagePalette) ( + VADriverContextP ctx, + VAImageID image, + /* + * pointer to an array holding the palette data. The size of the array is + * num_palette_entries * entry_bytes in size. The order of the components + * in the palette is described by the component_order in VAImage struct + */ + unsigned char *palette + ); + + VAStatus (*vaGetImage) ( + VADriverContextP ctx, + VASurfaceID surface, + int x, /* coordinates of the upper left source pixel */ + int y, + unsigned int width, /* width and height of the region */ + unsigned int height, + VAImageID image + ); + + VAStatus (*vaPutImage) ( + VADriverContextP ctx, + VASurfaceID surface, + VAImageID image, + int src_x, + int src_y, + unsigned int src_width, + unsigned int src_height, + int dest_x, + int dest_y, + unsigned int dest_width, + unsigned int dest_height + ); + + VAStatus (*vaQuerySubpictureFormats) ( + VADriverContextP ctx, + VAImageFormat *format_list, /* out */ + unsigned int *flags, /* out */ + unsigned int *num_formats /* out */ + ); + + VAStatus (*vaCreateSubpicture) ( + VADriverContextP ctx, + VAImageID image, + VASubpictureID *subpicture /* out */ + ); + + VAStatus (*vaDestroySubpicture) ( + VADriverContextP ctx, + VASubpictureID subpicture + ); + + VAStatus (*vaSetSubpictureImage) ( + VADriverContextP ctx, + VASubpictureID subpicture, + VAImageID image + ); + + VAStatus (*vaSetSubpictureChromakey) ( + VADriverContextP ctx, + VASubpictureID subpicture, + unsigned int chromakey_min, + unsigned int chromakey_max, + unsigned int chromakey_mask + ); + + VAStatus (*vaSetSubpictureGlobalAlpha) ( + VADriverContextP ctx, + VASubpictureID subpicture, + float global_alpha + ); + + VAStatus (*vaAssociateSubpicture) ( + VADriverContextP ctx, + VASubpictureID subpicture, + VASurfaceID *target_surfaces, + int num_surfaces, + short src_x, /* upper left offset in subpicture */ + short src_y, + unsigned short src_width, + unsigned short src_height, + short dest_x, /* upper left offset in surface */ + short dest_y, + unsigned short dest_width, + unsigned short dest_height, + /* + * whether to enable chroma-keying or global-alpha + * see VA_SUBPICTURE_XXX values + */ + unsigned int flags + ); + + VAStatus (*vaDeassociateSubpicture) ( + VADriverContextP ctx, + VASubpictureID subpicture, + VASurfaceID *target_surfaces, + int num_surfaces + ); + + VAStatus (*vaQueryDisplayAttributes) ( + VADriverContextP ctx, + VADisplayAttribute *attr_list, /* out */ + int *num_attributes /* out */ + ); + + VAStatus (*vaGetDisplayAttributes) ( + VADriverContextP ctx, + VADisplayAttribute *attr_list, /* in/out */ + int num_attributes + ); + + VAStatus (*vaSetDisplayAttributes) ( + VADriverContextP ctx, + VADisplayAttribute *attr_list, + int num_attributes + ); + + /* used by va trace */ + VAStatus (*vaBufferInfo) ( + VADriverContextP ctx, + VAContextID context, /* in */ + VABufferID buf_id, /* in */ + VABufferType *type, /* out */ + unsigned int *size, /* out */ + unsigned int *num_elements /* out */ + ); + + /* lock/unlock surface for external access */ + VAStatus (*vaLockSurface) ( + VADriverContextP ctx, + VASurfaceID surface, + unsigned int *fourcc, /* out for follow argument */ + unsigned int *luma_stride, + unsigned int *chroma_u_stride, + unsigned int *chroma_v_stride, + unsigned int *luma_offset, + unsigned int *chroma_u_offset, + unsigned int *chroma_v_offset, + unsigned int *buffer_name, /* if it is not NULL, assign the low lever + * surface buffer name + */ + void **buffer /* if it is not NULL, map the surface buffer for + * CPU access + */ + ); + + VAStatus (*vaUnlockSurface) ( + VADriverContextP ctx, + VASurfaceID surface + ); + + /* Optional: GLX support hooks */ + struct VADriverVTableGLX *glx; +}; + +struct VADriverContext +{ + void *pDriverData; + struct VADriverVTable vtable; + void *vtable_tpi; /* the structure is malloc-ed */ + + void *native_dpy; + int x11_screen; + int version_major; + int version_minor; + int max_profiles; + int max_entrypoints; + int max_attributes; + int max_image_formats; + int max_subpic_formats; + int max_display_attributes; + const char *str_vendor; + + void *handle; /* dlopen handle */ + + void *dri_state; + void *glx; /* opaque for GLX code */ +}; + +#define VA_DISPLAY_MAGIC 0x56414430 /* VAD0 */ +struct VADisplayContext +{ + int vadpy_magic; + + VADisplayContextP pNext; + VADriverContextP pDriverContext; + + int (*vaIsValid) ( + VADisplayContextP ctx + ); + + void (*vaDestroy) ( + VADisplayContextP ctx + ); + + VAStatus (*vaGetDriverName) ( + VADisplayContextP ctx, + char **driver_name + ); + + void *opaque; /* opaque for display extensions (e.g. GLX) */ +}; + +typedef VAStatus (*VADriverInit) ( + VADriverContextP driver_context +); + +#endif /* _VA_BACKEND_H_ */ diff -Nru libva-1.0.1/va/va_backend_tpi.h libva-1.0.1-3+0.31.1/va/va_backend_tpi.h --- libva-1.0.1/va/va_backend_tpi.h 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/va/va_backend_tpi.h 2010-06-01 10:57:37.000000000 +0000 @@ -0,0 +1,74 @@ +/* + * Copyright (c) 2007 Intel Corporation. All Rights Reserved. + * + * 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, sub license, 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 (including the + * next paragraph) 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 NON-INFRINGEMENT. + * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +/* + * Video Decode Acceleration -Backend API + */ + +#ifndef _VA_BACKEND_TPI_H_ +#define _VA_BACKEND_TPI_H_ + +#include +#include + +#include + +struct VADriverVTableTPI +{ + /* device specific */ + VAStatus (*vaCreateSurfaceFromCIFrame) ( + VADriverContextP ctx, + unsigned long frame_id, + VASurfaceID *surface /* out */ + ); + + VAStatus (*vaCreateSurfaceFromV4L2Buf) ( + VADriverContextP ctx, + int v4l2_fd, /* file descriptor of V4L2 device */ + struct v4l2_format *v4l2_fmt, /* format of V4L2 */ + struct v4l2_buffer *v4l2_buf, /* V4L2 buffer */ + VASurfaceID *surface /* out */ + ); + + VAStatus (*vaPutSurfaceBuf) ( + VADisplay dpy, + VASurfaceID surface, + unsigned char* data, + int* data_len, + short srcx, + short srcy, + unsigned short srcw, + unsigned short srch, + short destx, + short desty, + unsigned short destw, + unsigned short desth, + VARectangle *cliprects, /* client supplied clip list */ + unsigned int number_cliprects, /* number of clip rects in the clip list */ + unsigned int flags /* de-interlacing flags */ + ); +}; + + +#endif /* _VA_BACKEND_TPI_H_ */ diff -Nru libva-1.0.1/va/va.c libva-1.0.1-3+0.31.1/va/va.c --- libva-1.0.1/va/va.c 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/va/va.c 2010-07-12 09:09:38.000000000 +0000 @@ -0,0 +1,1191 @@ +/* + * Copyright (c) 2007 Intel Corporation. All Rights Reserved. + * + * 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, sub license, 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 (including the + * next paragraph) 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 NON-INFRINGEMENT. + * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +#define _GNU_SOURCE 1 +#include "va.h" +#include "va_backend.h" +#include "config.h" + +#include +#include +#include +#include +#include +#include +#include + +#ifdef ANDROID +#define Bool int +#define True 1 +#define False 0 +#endif + +#define DRIVER_INIT_FUNC "__vaDriverInit_0_31" + +#define DRIVER_EXTENSION "_drv_video.so" + +#define CTX(dpy) (((VADisplayContextP)dpy)->pDriverContext) +#define CHECK_DISPLAY(dpy) if( !vaDisplayIsValid(dpy) ) { return VA_STATUS_ERROR_INVALID_DISPLAY; } + +#define ASSERT assert +#define CHECK_VTABLE(s, ctx, func) if (!va_checkVtable(ctx->vtable.va##func, #func)) s = VA_STATUS_ERROR_UNKNOWN; +#define CHECK_MAXIMUM(s, ctx, var) if (!va_checkMaximum(ctx->max_##var, #var)) s = VA_STATUS_ERROR_UNKNOWN; +#define CHECK_STRING(s, ctx, var) if (!va_checkString(ctx->str_##var, #var)) s = VA_STATUS_ERROR_UNKNOWN; + +extern int trace_flag; +#define VA_TRACE(trace_func,...) \ + if (trace_flag) { \ + va_TraceMsg("========%s========\n", __func__); \ + trace_func(__VA_ARGS__); \ + } + +int vaDisplayIsValid(VADisplay dpy) +{ + VADisplayContextP pDisplayContext = (VADisplayContextP)dpy; + return pDisplayContext && (pDisplayContext->vadpy_magic == VA_DISPLAY_MAGIC) && pDisplayContext->vaIsValid(pDisplayContext); +} + +static void va_errorMessage(const char *msg, ...) +{ + va_list args; + + fprintf(stderr, "libva error: "); + va_start(args, msg); + vfprintf(stderr, msg, args); + va_end(args); +} + +static void va_infoMessage(const char *msg, ...) +{ + va_list args; + + fprintf(stderr, "libva: "); + va_start(args, msg); + vfprintf(stderr, msg, args); + va_end(args); +} + +static Bool va_checkVtable(void *ptr, char *function) +{ + if (!ptr) + { + va_errorMessage("No valid vtable entry for va%s\n", function); + return False; + } + return True; +} + +static Bool va_checkMaximum(int value, char *variable) +{ + if (!value) + { + va_errorMessage("Failed to define max_%s in init\n", variable); + return False; + } + return True; +} + +static Bool va_checkString(const char* value, char *variable) +{ + if (!value) + { + va_errorMessage("Failed to define str_%s in init\n", variable); + return False; + } + return True; +} + +static VAStatus va_getDriverName(VADisplay dpy, char **driver_name) +{ + VADisplayContextP pDisplayContext = (VADisplayContextP)dpy; + + return pDisplayContext->vaGetDriverName(pDisplayContext, driver_name); +} + +static VAStatus va_openDriver(VADisplay dpy, char *driver_name) +{ + VADriverContextP ctx = CTX(dpy); + VAStatus vaStatus = VA_STATUS_ERROR_UNKNOWN; + char *search_path = NULL; + char *saveptr; + char *driver_dir; + + if (geteuid() == getuid()) + { + /* don't allow setuid apps to use LIBVA_DRIVERS_PATH */ + search_path = getenv("LIBVA_DRIVERS_PATH"); + } + if (!search_path) + { + search_path = VA_DRIVERS_PATH; + } + + search_path = strdup((const char *)search_path); + driver_dir = strtok_r((const char *)search_path, ":", &saveptr); + while(driver_dir) + { + void *handle = NULL; + char *driver_path = (char *) malloc( strlen(driver_dir) + + strlen(driver_name) + + strlen(DRIVER_EXTENSION) + 2 ); + strncpy( driver_path, driver_dir, strlen(driver_dir) + 1); + strncat( driver_path, "/", strlen("/") ); + strncat( driver_path, driver_name, strlen(driver_name) ); + strncat( driver_path, DRIVER_EXTENSION, strlen(DRIVER_EXTENSION) ); + + va_infoMessage("Trying to open %s\n", driver_path); +#ifndef ANDROID + handle = dlopen( driver_path, RTLD_NOW | RTLD_GLOBAL | RTLD_NODELETE ); +#else + handle = dlopen( driver_path, RTLD_NOW| RTLD_GLOBAL); +#endif + if (!handle) + { + /* Don't give errors for non-existing files */ + if (0 == access( driver_path, F_OK)) + { + va_errorMessage("dlopen of %s failed: %s\n", driver_path, dlerror()); + } + } + else + { + VADriverInit init_func; + init_func = (VADriverInit) dlsym(handle, DRIVER_INIT_FUNC); + if (!init_func) + { + va_errorMessage("%s has no function %s\n", driver_path, DRIVER_INIT_FUNC); + dlclose(handle); + } + else + { + vaStatus = (*init_func)(ctx); + + if (VA_STATUS_SUCCESS == vaStatus) + { + CHECK_MAXIMUM(vaStatus, ctx, profiles); + CHECK_MAXIMUM(vaStatus, ctx, entrypoints); + CHECK_MAXIMUM(vaStatus, ctx, attributes); + CHECK_MAXIMUM(vaStatus, ctx, image_formats); + CHECK_MAXIMUM(vaStatus, ctx, subpic_formats); + CHECK_MAXIMUM(vaStatus, ctx, display_attributes); + CHECK_STRING(vaStatus, ctx, vendor); + CHECK_VTABLE(vaStatus, ctx, Terminate); + CHECK_VTABLE(vaStatus, ctx, QueryConfigProfiles); + CHECK_VTABLE(vaStatus, ctx, QueryConfigEntrypoints); + CHECK_VTABLE(vaStatus, ctx, QueryConfigAttributes); + CHECK_VTABLE(vaStatus, ctx, CreateConfig); + CHECK_VTABLE(vaStatus, ctx, DestroyConfig); + CHECK_VTABLE(vaStatus, ctx, GetConfigAttributes); + CHECK_VTABLE(vaStatus, ctx, CreateSurfaces); + CHECK_VTABLE(vaStatus, ctx, DestroySurfaces); + CHECK_VTABLE(vaStatus, ctx, CreateContext); + CHECK_VTABLE(vaStatus, ctx, DestroyContext); + CHECK_VTABLE(vaStatus, ctx, CreateBuffer); + CHECK_VTABLE(vaStatus, ctx, BufferSetNumElements); + CHECK_VTABLE(vaStatus, ctx, MapBuffer); + CHECK_VTABLE(vaStatus, ctx, UnmapBuffer); + CHECK_VTABLE(vaStatus, ctx, DestroyBuffer); + CHECK_VTABLE(vaStatus, ctx, BeginPicture); + CHECK_VTABLE(vaStatus, ctx, RenderPicture); + CHECK_VTABLE(vaStatus, ctx, EndPicture); + CHECK_VTABLE(vaStatus, ctx, SyncSurface); + CHECK_VTABLE(vaStatus, ctx, QuerySurfaceStatus); + CHECK_VTABLE(vaStatus, ctx, PutSurface); + CHECK_VTABLE(vaStatus, ctx, QueryImageFormats); + CHECK_VTABLE(vaStatus, ctx, CreateImage); + CHECK_VTABLE(vaStatus, ctx, DeriveImage); + CHECK_VTABLE(vaStatus, ctx, DestroyImage); + CHECK_VTABLE(vaStatus, ctx, SetImagePalette); + CHECK_VTABLE(vaStatus, ctx, GetImage); + CHECK_VTABLE(vaStatus, ctx, PutImage); + CHECK_VTABLE(vaStatus, ctx, QuerySubpictureFormats); + CHECK_VTABLE(vaStatus, ctx, CreateSubpicture); + CHECK_VTABLE(vaStatus, ctx, DestroySubpicture); + CHECK_VTABLE(vaStatus, ctx, SetSubpictureImage); + CHECK_VTABLE(vaStatus, ctx, SetSubpictureChromakey); + CHECK_VTABLE(vaStatus, ctx, SetSubpictureGlobalAlpha); + CHECK_VTABLE(vaStatus, ctx, AssociateSubpicture); + CHECK_VTABLE(vaStatus, ctx, DeassociateSubpicture); + CHECK_VTABLE(vaStatus, ctx, QueryDisplayAttributes); + CHECK_VTABLE(vaStatus, ctx, GetDisplayAttributes); + CHECK_VTABLE(vaStatus, ctx, SetDisplayAttributes); + } + if (VA_STATUS_SUCCESS != vaStatus) + { + va_errorMessage("%s init failed\n", driver_path); + dlclose(handle); + } + if (VA_STATUS_SUCCESS == vaStatus) + { + ctx->handle = handle; + } + free(driver_path); + break; + } + } + free(driver_path); + + driver_dir = strtok_r(NULL, ":", &saveptr); + } + + free(search_path); + + return vaStatus; +} + +VAPrivFunc vaGetLibFunc(VADisplay dpy, const char *func) +{ + VADriverContextP ctx; + if( !vaDisplayIsValid(dpy) ) + return NULL; + ctx = CTX(dpy); + + if (NULL == ctx->handle) + return NULL; + + return (VAPrivFunc) dlsym(ctx->handle, func); +} + + +/* + * Returns a short english description of error_status + */ +const char *vaErrorStr(VAStatus error_status) +{ + switch(error_status) + { + case VA_STATUS_SUCCESS: + return "success (no error)"; + case VA_STATUS_ERROR_OPERATION_FAILED: + return "operation failed"; + case VA_STATUS_ERROR_ALLOCATION_FAILED: + return "resource allocation failed"; + case VA_STATUS_ERROR_INVALID_DISPLAY: + return "invalid VADisplay"; + case VA_STATUS_ERROR_INVALID_CONFIG: + return "invalid VAConfigID"; + case VA_STATUS_ERROR_INVALID_CONTEXT: + return "invalid VAContextID"; + case VA_STATUS_ERROR_INVALID_SURFACE: + return "invalid VASurfaceID"; + case VA_STATUS_ERROR_INVALID_BUFFER: + return "invalid VABufferID"; + case VA_STATUS_ERROR_INVALID_IMAGE: + return "invalid VAImageID"; + case VA_STATUS_ERROR_INVALID_SUBPICTURE: + return "invalid VASubpictureID"; + case VA_STATUS_ERROR_ATTR_NOT_SUPPORTED: + return "attribute not supported"; + case VA_STATUS_ERROR_MAX_NUM_EXCEEDED: + return "list argument exceeds maximum number"; + case VA_STATUS_ERROR_UNSUPPORTED_PROFILE: + return "the requested VAProfile is not supported"; + case VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT: + return "the requested VAEntryPoint is not supported"; + case VA_STATUS_ERROR_UNSUPPORTED_RT_FORMAT: + return "the requested RT Format is not supported"; + case VA_STATUS_ERROR_UNSUPPORTED_BUFFERTYPE: + return "the requested VABufferType is not supported"; + case VA_STATUS_ERROR_SURFACE_BUSY: + return "surface is in use"; + case VA_STATUS_ERROR_FLAG_NOT_SUPPORTED: + return "flag not supported"; + case VA_STATUS_ERROR_INVALID_PARAMETER: + return "invalid parameter"; + case VA_STATUS_ERROR_RESOLUTION_NOT_SUPPORTED: + return "resolution not supported"; + case VA_STATUS_ERROR_UNIMPLEMENTED: + return "the requested function is not implemented"; + case VA_STATUS_ERROR_SURFACE_IN_DISPLAYING: + return "surface is in displaying (may by overlay)" ; + case VA_STATUS_ERROR_INVALID_IMAGE_FORMAT: + return "invalid VAImageFormat"; + case VA_STATUS_ERROR_UNKNOWN: + return "unknown libva error"; + } + return "unknown libva error / description missing"; +} + +VAStatus vaInitialize ( + VADisplay dpy, + int *major_version, /* out */ + int *minor_version /* out */ +) +{ + const char *driver_name_env = NULL; + char *driver_name = NULL; + VAStatus vaStatus; + + CHECK_DISPLAY(dpy); + + va_TraceInit(); + + va_infoMessage("libva version %s\n", VA_VERSION_S); + + driver_name_env = getenv("LIBVA_DRIVER_NAME"); + if (driver_name_env && geteuid() == getuid()) + { + /* Don't allow setuid apps to use LIBVA_DRIVER_NAME */ + driver_name = strdup(driver_name_env); + vaStatus = VA_STATUS_SUCCESS; + va_infoMessage("User requested driver '%s'\n", driver_name); + } + else + { + vaStatus = va_getDriverName(dpy, &driver_name); + va_infoMessage("va_getDriverName() returns %d\n", vaStatus); + } + + if (VA_STATUS_SUCCESS == vaStatus) + { + vaStatus = va_openDriver(dpy, driver_name); + va_infoMessage("va_openDriver() returns %d\n", vaStatus); + + *major_version = VA_MAJOR_VERSION; + *minor_version = VA_MINOR_VERSION; + } + + if (driver_name) + free(driver_name); + return vaStatus; +} + + +/* + * After this call, all library internal resources will be cleaned up + */ +VAStatus vaTerminate ( + VADisplay dpy +) +{ + VAStatus vaStatus = VA_STATUS_SUCCESS; + VADisplayContextP pDisplayContext = (VADisplayContextP)dpy; + VADriverContextP old_ctx; + + CHECK_DISPLAY(dpy); + old_ctx = CTX(dpy); + + if (old_ctx->handle) + { + vaStatus = old_ctx->vtable.vaTerminate(old_ctx); + dlclose(old_ctx->handle); + old_ctx->handle = NULL; + } + + if (VA_STATUS_SUCCESS == vaStatus) + pDisplayContext->vaDestroy(pDisplayContext); + + va_TraceEnd(); + + return vaStatus; +} + +/* + * vaQueryVendorString returns a pointer to a zero-terminated string + * describing some aspects of the VA implemenation on a specific + * hardware accelerator. The format of the returned string is: + * --- + * e.g. for the Intel GMA500 implementation, an example would be: + * "IntelGMA500-1.0-0.2-patch3 + */ +const char *vaQueryVendorString ( + VADisplay dpy +) +{ + if( !vaDisplayIsValid(dpy) ) + return NULL; + + return CTX(dpy)->str_vendor; +} + + +/* Get maximum number of profiles supported by the implementation */ +int vaMaxNumProfiles ( + VADisplay dpy +) +{ + if( !vaDisplayIsValid(dpy) ) + return 0; + + return CTX(dpy)->max_profiles; +} + +/* Get maximum number of entrypoints supported by the implementation */ +int vaMaxNumEntrypoints ( + VADisplay dpy +) +{ + if( !vaDisplayIsValid(dpy) ) + return 0; + + return CTX(dpy)->max_entrypoints; +} + + +/* Get maximum number of attributs supported by the implementation */ +int vaMaxNumConfigAttributes ( + VADisplay dpy +) +{ + if( !vaDisplayIsValid(dpy) ) + return 0; + + return CTX(dpy)->max_attributes; +} + +VAStatus vaQueryConfigEntrypoints ( + VADisplay dpy, + VAProfile profile, + VAEntrypoint *entrypoints, /* out */ + int *num_entrypoints /* out */ +) +{ + VADriverContextP ctx; + CHECK_DISPLAY(dpy); + ctx = CTX(dpy); + + return ctx->vtable.vaQueryConfigEntrypoints ( ctx, profile, entrypoints, num_entrypoints); +} + +VAStatus vaGetConfigAttributes ( + VADisplay dpy, + VAProfile profile, + VAEntrypoint entrypoint, + VAConfigAttrib *attrib_list, /* in/out */ + int num_attribs +) +{ + VADriverContextP ctx; + CHECK_DISPLAY(dpy); + ctx = CTX(dpy); + + return ctx->vtable.vaGetConfigAttributes ( ctx, profile, entrypoint, attrib_list, num_attribs ); +} + +VAStatus vaQueryConfigProfiles ( + VADisplay dpy, + VAProfile *profile_list, /* out */ + int *num_profiles /* out */ +) +{ + VADriverContextP ctx; + CHECK_DISPLAY(dpy); + ctx = CTX(dpy); + + return ctx->vtable.vaQueryConfigProfiles ( ctx, profile_list, num_profiles ); +} + +VAStatus vaCreateConfig ( + VADisplay dpy, + VAProfile profile, + VAEntrypoint entrypoint, + VAConfigAttrib *attrib_list, + int num_attribs, + VAConfigID *config_id /* out */ +) +{ + VADriverContextP ctx; + CHECK_DISPLAY(dpy); + ctx = CTX(dpy); + + VA_TRACE(va_TraceCreateConfig, dpy, profile, entrypoint, attrib_list, num_attribs, config_id); + return ctx->vtable.vaCreateConfig ( ctx, profile, entrypoint, attrib_list, num_attribs, config_id ); +} + +VAStatus vaDestroyConfig ( + VADisplay dpy, + VAConfigID config_id +) +{ + VADriverContextP ctx; + CHECK_DISPLAY(dpy); + ctx = CTX(dpy); + + return ctx->vtable.vaDestroyConfig ( ctx, config_id ); +} + +VAStatus vaQueryConfigAttributes ( + VADisplay dpy, + VAConfigID config_id, + VAProfile *profile, /* out */ + VAEntrypoint *entrypoint, /* out */ + VAConfigAttrib *attrib_list,/* out */ + int *num_attribs /* out */ +) +{ + VADriverContextP ctx; + CHECK_DISPLAY(dpy); + ctx = CTX(dpy); + + return ctx->vtable.vaQueryConfigAttributes( ctx, config_id, profile, entrypoint, attrib_list, num_attribs); +} + +VAStatus vaCreateSurfaces ( + VADisplay dpy, + int width, + int height, + int format, + int num_surfaces, + VASurfaceID *surfaces /* out */ +) +{ + VADriverContextP ctx; + CHECK_DISPLAY(dpy); + ctx = CTX(dpy); + + VA_TRACE(va_TraceCreateSurface, dpy, width, height, format, num_surfaces, surfaces); + return ctx->vtable.vaCreateSurfaces( ctx, width, height, format, num_surfaces, surfaces ); +} + + +VAStatus vaDestroySurfaces ( + VADisplay dpy, + VASurfaceID *surface_list, + int num_surfaces +) +{ + VADriverContextP ctx; + CHECK_DISPLAY(dpy); + ctx = CTX(dpy); + + return ctx->vtable.vaDestroySurfaces( ctx, surface_list, num_surfaces ); +} + +VAStatus vaCreateContext ( + VADisplay dpy, + VAConfigID config_id, + int picture_width, + int picture_height, + int flag, + VASurfaceID *render_targets, + int num_render_targets, + VAContextID *context /* out */ +) +{ + VADriverContextP ctx; + CHECK_DISPLAY(dpy); + ctx = CTX(dpy); + + VA_TRACE(va_TraceCreateContext, dpy, config_id, picture_width, picture_height, flag, render_targets, num_render_targets, context); + return ctx->vtable.vaCreateContext( ctx, config_id, picture_width, picture_height, + flag, render_targets, num_render_targets, context ); +} + +VAStatus vaDestroyContext ( + VADisplay dpy, + VAContextID context +) +{ + VADriverContextP ctx; + CHECK_DISPLAY(dpy); + ctx = CTX(dpy); + + return ctx->vtable.vaDestroyContext( ctx, context ); +} + +VAStatus vaCreateBuffer ( + VADisplay dpy, + VAContextID context, /* in */ + VABufferType type, /* in */ + unsigned int size, /* in */ + unsigned int num_elements, /* in */ + void *data, /* in */ + VABufferID *buf_id /* out */ +) +{ + VADriverContextP ctx; + CHECK_DISPLAY(dpy); + ctx = CTX(dpy); + + return ctx->vtable.vaCreateBuffer( ctx, context, type, size, num_elements, data, buf_id); +} + +VAStatus vaBufferSetNumElements ( + VADisplay dpy, + VABufferID buf_id, /* in */ + unsigned int num_elements /* in */ +) +{ + VADriverContextP ctx; + CHECK_DISPLAY(dpy); + ctx = CTX(dpy); + + return ctx->vtable.vaBufferSetNumElements( ctx, buf_id, num_elements ); +} + + +VAStatus vaMapBuffer ( + VADisplay dpy, + VABufferID buf_id, /* in */ + void **pbuf /* out */ +) +{ + VADriverContextP ctx; + CHECK_DISPLAY(dpy); + ctx = CTX(dpy); + + return ctx->vtable.vaMapBuffer( ctx, buf_id, pbuf ); +} + +VAStatus vaUnmapBuffer ( + VADisplay dpy, + VABufferID buf_id /* in */ +) +{ + VADriverContextP ctx; + CHECK_DISPLAY(dpy); + ctx = CTX(dpy); + + return ctx->vtable.vaUnmapBuffer( ctx, buf_id ); +} + +VAStatus vaDestroyBuffer ( + VADisplay dpy, + VABufferID buffer_id +) +{ + VADriverContextP ctx; + CHECK_DISPLAY(dpy); + ctx = CTX(dpy); + + return ctx->vtable.vaDestroyBuffer( ctx, buffer_id ); +} + +VAStatus vaBufferInfo ( + VADisplay dpy, + VAContextID context, /* in */ + VABufferID buf_id, /* in */ + VABufferType *type, /* out */ + unsigned int *size, /* out */ + unsigned int *num_elements /* out */ +) +{ + VADriverContextP ctx; + CHECK_DISPLAY(dpy); + ctx = CTX(dpy); + + return ctx->vtable.vaBufferInfo( ctx, context, buf_id, type, size, num_elements ); +} + +VAStatus vaBeginPicture ( + VADisplay dpy, + VAContextID context, + VASurfaceID render_target +) +{ + VADriverContextP ctx; + CHECK_DISPLAY(dpy); + ctx = CTX(dpy); + + VA_TRACE(va_TraceBeginPicture, ctx, context, render_target); + return ctx->vtable.vaBeginPicture( ctx, context, render_target ); +} + +VAStatus vaRenderPicture ( + VADisplay dpy, + VAContextID context, + VABufferID *buffers, + int num_buffers +) +{ + VADriverContextP ctx; + CHECK_DISPLAY(dpy); + ctx = CTX(dpy); + + VA_TRACE(va_TraceRenderPicture, dpy, context, buffers, num_buffers); + return ctx->vtable.vaRenderPicture( ctx, context, buffers, num_buffers ); +} + +VAStatus vaEndPicture ( + VADisplay dpy, + VAContextID context +) +{ + VAStatus va_status; + VADriverContextP ctx; + CHECK_DISPLAY(dpy); + ctx = CTX(dpy); + + va_status = ctx->vtable.vaEndPicture( ctx, context ); + VA_TRACE(va_TraceEndPicture, dpy, context); + return va_status; +} + +VAStatus vaSyncSurface ( + VADisplay dpy, + VASurfaceID render_target +) +{ + VADriverContextP ctx; + CHECK_DISPLAY(dpy); + ctx = CTX(dpy); + + return ctx->vtable.vaSyncSurface( ctx, render_target ); +} + +VAStatus vaQuerySurfaceStatus ( + VADisplay dpy, + VASurfaceID render_target, + VASurfaceStatus *status /* out */ +) +{ + VADriverContextP ctx; + CHECK_DISPLAY(dpy); + ctx = CTX(dpy); + + return ctx->vtable.vaQuerySurfaceStatus( ctx, render_target, status ); +} + +/* Get maximum number of image formats supported by the implementation */ +int vaMaxNumImageFormats ( + VADisplay dpy +) +{ + if( !vaDisplayIsValid(dpy) ) + return 0; + + return CTX(dpy)->max_image_formats; +} + +VAStatus vaQueryImageFormats ( + VADisplay dpy, + VAImageFormat *format_list, /* out */ + int *num_formats /* out */ +) +{ + VADriverContextP ctx; + CHECK_DISPLAY(dpy); + ctx = CTX(dpy); + + return ctx->vtable.vaQueryImageFormats ( ctx, format_list, num_formats); +} + +/* + * The width and height fields returned in the VAImage structure may get + * enlarged for some YUV formats. The size of the data buffer that needs + * to be allocated will be given in the "data_size" field in VAImage. + * Image data is not allocated by this function. The client should + * allocate the memory and fill in the VAImage structure's data field + * after looking at "data_size" returned from the library. + */ +VAStatus vaCreateImage ( + VADisplay dpy, + VAImageFormat *format, + int width, + int height, + VAImage *image /* out */ +) +{ + VADriverContextP ctx; + CHECK_DISPLAY(dpy); + ctx = CTX(dpy); + + return ctx->vtable.vaCreateImage ( ctx, format, width, height, image); +} + +/* + * Should call DestroyImage before destroying the surface it is bound to + */ +VAStatus vaDestroyImage ( + VADisplay dpy, + VAImageID image +) +{ + VADriverContextP ctx; + CHECK_DISPLAY(dpy); + ctx = CTX(dpy); + + return ctx->vtable.vaDestroyImage ( ctx, image); +} + +VAStatus vaSetImagePalette ( + VADisplay dpy, + VAImageID image, + unsigned char *palette +) +{ + VADriverContextP ctx; + CHECK_DISPLAY(dpy); + ctx = CTX(dpy); + + return ctx->vtable.vaSetImagePalette ( ctx, image, palette); +} + +/* + * Retrieve surface data into a VAImage + * Image must be in a format supported by the implementation + */ +VAStatus vaGetImage ( + VADisplay dpy, + VASurfaceID surface, + int x, /* coordinates of the upper left source pixel */ + int y, + unsigned int width, /* width and height of the region */ + unsigned int height, + VAImageID image +) +{ + VADriverContextP ctx; + CHECK_DISPLAY(dpy); + ctx = CTX(dpy); + + return ctx->vtable.vaGetImage ( ctx, surface, x, y, width, height, image); +} + +/* + * Copy data from a VAImage to a surface + * Image must be in a format supported by the implementation + */ +VAStatus vaPutImage ( + VADisplay dpy, + VASurfaceID surface, + VAImageID image, + int src_x, + int src_y, + unsigned int src_width, + unsigned int src_height, + int dest_x, + int dest_y, + unsigned int dest_width, + unsigned int dest_height +) +{ + VADriverContextP ctx; + CHECK_DISPLAY(dpy); + ctx = CTX(dpy); + + return ctx->vtable.vaPutImage ( ctx, surface, image, src_x, src_y, src_width, src_height, dest_x, dest_y, dest_width, dest_height ); +} + +/* + * Derive an VAImage from an existing surface. + * This interface will derive a VAImage and corresponding image buffer from + * an existing VA Surface. The image buffer can then be mapped/unmapped for + * direct CPU access. This operation is only possible on implementations with + * direct rendering capabilities and internal surface formats that can be + * represented with a VAImage. When the operation is not possible this interface + * will return VA_STATUS_ERROR_OPERATION_FAILED. Clients should then fall back + * to using vaCreateImage + vaPutImage to accomplish the same task in an + * indirect manner. + * + * Implementations should only return success when the resulting image buffer + * would be useable with vaMap/Unmap. + * + * When directly accessing a surface special care must be taken to insure + * proper synchronization with the graphics hardware. Clients should call + * vaQuerySurfaceStatus to insure that a surface is not the target of concurrent + * rendering or currently being displayed by an overlay. + * + * Additionally nothing about the contents of a surface should be assumed + * following a vaPutSurface. Implementations are free to modify the surface for + * scaling or subpicture blending within a call to vaPutImage. + * + * Calls to vaPutImage or vaGetImage using the same surface from which the image + * has been derived will return VA_STATUS_ERROR_SURFACE_BUSY. vaPutImage or + * vaGetImage with other surfaces is supported. + * + * An image created with vaDeriveImage should be freed with vaDestroyImage. The + * image and image buffer structures will be destroyed; however, the underlying + * surface will remain unchanged until freed with vaDestroySurfaces. + */ +VAStatus vaDeriveImage ( + VADisplay dpy, + VASurfaceID surface, + VAImage *image /* out */ +) +{ + VADriverContextP ctx; + CHECK_DISPLAY(dpy); + ctx = CTX(dpy); + + return ctx->vtable.vaDeriveImage ( ctx, surface, image ); +} + + +/* Get maximum number of subpicture formats supported by the implementation */ +int vaMaxNumSubpictureFormats ( + VADisplay dpy +) +{ + if( !vaDisplayIsValid(dpy) ) + return 0; + + return CTX(dpy)->max_subpic_formats; +} + +/* + * Query supported subpicture formats + * The caller must provide a "format_list" array that can hold at + * least vaMaxNumSubpictureFormats() entries. The flags arrary holds the flag + * for each format to indicate additional capabilities for that format. The actual + * number of formats returned in "format_list" is returned in "num_formats". + */ +VAStatus vaQuerySubpictureFormats ( + VADisplay dpy, + VAImageFormat *format_list, /* out */ + unsigned int *flags, /* out */ + unsigned int *num_formats /* out */ +) +{ + VADriverContextP ctx; + CHECK_DISPLAY(dpy); + ctx = CTX(dpy); + + return ctx->vtable.vaQuerySubpictureFormats ( ctx, format_list, flags, num_formats); +} + +/* + * Subpictures are created with an image associated. + */ +VAStatus vaCreateSubpicture ( + VADisplay dpy, + VAImageID image, + VASubpictureID *subpicture /* out */ +) +{ + VADriverContextP ctx; + CHECK_DISPLAY(dpy); + ctx = CTX(dpy); + + return ctx->vtable.vaCreateSubpicture ( ctx, image, subpicture ); +} + +/* + * Destroy the subpicture before destroying the image it is assocated to + */ +VAStatus vaDestroySubpicture ( + VADisplay dpy, + VASubpictureID subpicture +) +{ + VADriverContextP ctx; + CHECK_DISPLAY(dpy); + ctx = CTX(dpy); + + return ctx->vtable.vaDestroySubpicture ( ctx, subpicture); +} + +VAStatus vaSetSubpictureImage ( + VADisplay dpy, + VASubpictureID subpicture, + VAImageID image +) +{ + VADriverContextP ctx; + CHECK_DISPLAY(dpy); + ctx = CTX(dpy); + + return ctx->vtable.vaSetSubpictureImage ( ctx, subpicture, image); +} + + +/* + * If chromakey is enabled, then the area where the source value falls within + * the chromakey [min, max] range is transparent + */ +VAStatus vaSetSubpictureChromakey ( + VADisplay dpy, + VASubpictureID subpicture, + unsigned int chromakey_min, + unsigned int chromakey_max, + unsigned int chromakey_mask +) +{ + VADriverContextP ctx; + CHECK_DISPLAY(dpy); + ctx = CTX(dpy); + + return ctx->vtable.vaSetSubpictureChromakey ( ctx, subpicture, chromakey_min, chromakey_max, chromakey_mask ); +} + + +/* + * Global alpha value is between 0 and 1. A value of 1 means fully opaque and + * a value of 0 means fully transparent. If per-pixel alpha is also specified then + * the overall alpha is per-pixel alpha multiplied by the global alpha + */ +VAStatus vaSetSubpictureGlobalAlpha ( + VADisplay dpy, + VASubpictureID subpicture, + float global_alpha +) +{ + VADriverContextP ctx; + CHECK_DISPLAY(dpy); + ctx = CTX(dpy); + + return ctx->vtable.vaSetSubpictureGlobalAlpha ( ctx, subpicture, global_alpha ); +} + +/* + vaAssociateSubpicture associates the subpicture with the target_surface. + It defines the region mapping between the subpicture and the target + surface through source and destination rectangles (with the same width and height). + Both will be displayed at the next call to vaPutSurface. Additional + associations before the call to vaPutSurface simply overrides the association. +*/ +VAStatus vaAssociateSubpicture ( + VADisplay dpy, + VASubpictureID subpicture, + VASurfaceID *target_surfaces, + int num_surfaces, + short src_x, /* upper left offset in subpicture */ + short src_y, + unsigned short src_width, + unsigned short src_height, + short dest_x, /* upper left offset in surface */ + short dest_y, + unsigned short dest_width, + unsigned short dest_height, + /* + * whether to enable chroma-keying or global-alpha + * see VA_SUBPICTURE_XXX values + */ + unsigned int flags +) +{ + VADriverContextP ctx; + CHECK_DISPLAY(dpy); + ctx = CTX(dpy); + + return ctx->vtable.vaAssociateSubpicture ( ctx, subpicture, target_surfaces, num_surfaces, src_x, src_y, src_width, src_height, dest_x, dest_y, dest_width, dest_height, flags ); +} + +/* + * vaDeassociateSubpicture removes the association of the subpicture with target_surfaces. + */ +VAStatus vaDeassociateSubpicture ( + VADisplay dpy, + VASubpictureID subpicture, + VASurfaceID *target_surfaces, + int num_surfaces +) +{ + VADriverContextP ctx; + CHECK_DISPLAY(dpy); + ctx = CTX(dpy); + + return ctx->vtable.vaDeassociateSubpicture ( ctx, subpicture, target_surfaces, num_surfaces ); +} + + +/* Get maximum number of display attributes supported by the implementation */ +int vaMaxNumDisplayAttributes ( + VADisplay dpy +) +{ + if( !vaDisplayIsValid(dpy) ) + return 0; + + return CTX(dpy)->max_display_attributes; +} + +/* + * Query display attributes + * The caller must provide a "attr_list" array that can hold at + * least vaMaxNumDisplayAttributes() entries. The actual number of attributes + * returned in "attr_list" is returned in "num_attributes". + */ +VAStatus vaQueryDisplayAttributes ( + VADisplay dpy, + VADisplayAttribute *attr_list, /* out */ + int *num_attributes /* out */ +) +{ + VADriverContextP ctx; + CHECK_DISPLAY(dpy); + ctx = CTX(dpy); + + return ctx->vtable.vaQueryDisplayAttributes ( ctx, attr_list, num_attributes ); +} + +/* + * Get display attributes + * This function returns the current attribute values in "attr_list". + * Only attributes returned with VA_DISPLAY_ATTRIB_GETTABLE set in the "flags" field + * from vaQueryDisplayAttributes() can have their values retrieved. + */ +VAStatus vaGetDisplayAttributes ( + VADisplay dpy, + VADisplayAttribute *attr_list, /* in/out */ + int num_attributes +) +{ + VADriverContextP ctx; + CHECK_DISPLAY(dpy); + ctx = CTX(dpy); + + return ctx->vtable.vaGetDisplayAttributes ( ctx, attr_list, num_attributes ); +} + +/* + * Set display attributes + * Only attributes returned with VA_DISPLAY_ATTRIB_SETTABLE set in the "flags" field + * from vaQueryDisplayAttributes() can be set. If the attribute is not settable or + * the value is out of range, the function returns VA_STATUS_ERROR_ATTR_NOT_SUPPORTED + */ +VAStatus vaSetDisplayAttributes ( + VADisplay dpy, + VADisplayAttribute *attr_list, + int num_attributes +) +{ + VADriverContextP ctx; + CHECK_DISPLAY(dpy); + ctx = CTX(dpy); + + return ctx->vtable.vaSetDisplayAttributes ( ctx, attr_list, num_attributes ); +} + +VAStatus vaLockSurface(VADisplay dpy, + VASurfaceID surface, + unsigned int *fourcc, /* following are output argument */ + unsigned int *luma_stride, + unsigned int *chroma_u_stride, + unsigned int *chroma_v_stride, + unsigned int *luma_offset, + unsigned int *chroma_u_offset, + unsigned int *chroma_v_offset, + unsigned int *buffer_name, + void **buffer +) +{ + VADriverContextP ctx; + CHECK_DISPLAY(dpy); + ctx = CTX(dpy); + + return ctx->vtable.vaLockSurface( ctx, surface, fourcc, luma_stride, chroma_u_stride, chroma_v_stride, luma_offset, chroma_u_offset, chroma_v_offset, buffer_name, buffer); +} + + +VAStatus vaUnlockSurface(VADisplay dpy, + VASurfaceID surface +) +{ + VADriverContextP ctx; + CHECK_DISPLAY(dpy); + ctx = CTX(dpy); + + return ctx->vtable.vaUnlockSurface( ctx, surface ); +} diff -Nru libva-1.0.1/va/va_dummy.h libva-1.0.1-3+0.31.1/va/va_dummy.h --- libva-1.0.1/va/va_dummy.h 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/va/va_dummy.h 2010-06-02 06:46:21.000000000 +0000 @@ -0,0 +1,54 @@ +#ifndef _VA_ANDROID_H_ +#define _VA_ANDROID_H_ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Returns a suitable VADisplay for VA API + */ +VADisplay vaGetDisplay ( + void *android_dpy +); + +#ifdef __cplusplus +} +#endif + +#ifdef __cplusplus +#ifdef ANDROID +#include +using namespace android; + +/* + * Output rendering + * Following is the rendering interface for Android system, + * to get the decode output surface to an ISurface object. + * It basically performs a de-interlacing (if needed), + * color space conversion and scaling to the destination + * rectangle + */ +VAStatus vaPutSurface ( + VADisplay dpy, + VASurfaceID surface, + sp draw, /* Android Window/Surface */ + short srcx, + short srcy, + unsigned short srcw, + unsigned short srch, + short destx, + short desty, + unsigned short destw, + unsigned short desth, + VARectangle *cliprects, /* client supplied destination clip list */ + unsigned int number_cliprects, /* number of clip rects in the clip list */ + unsigned int flags /* PutSurface flags */ +); + +#endif /* ANDROID */ +#endif /* __cplusplus */ + +#endif /* _VA_ANDROID_H_ */ diff -Nru libva-1.0.1/va/va.h libva-1.0.1-3+0.31.1/va/va.h --- libva-1.0.1/va/va.h 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/va/va.h 2010-07-07 12:20:30.000000000 +0000 @@ -0,0 +1,1801 @@ +/* + * Copyright (c) 2007-2009 Intel Corporation. All Rights Reserved. + * + * 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, sub license, 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 (including the + * next paragraph) 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 NON-INFRINGEMENT. + * IN NO EVENT SHALL INTEL AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +/* + * Video Acceleration (VA) API Specification + * + * Rev. 0.30 + * + * + * Revision History: + * rev 0.10 (12/10/2006 Jonathan Bian) - Initial draft + * rev 0.11 (12/15/2006 Jonathan Bian) - Fixed some errors + * rev 0.12 (02/05/2007 Jonathan Bian) - Added VC-1 data structures for slice level decode + * rev 0.13 (02/28/2007 Jonathan Bian) - Added GetDisplay() + * rev 0.14 (04/13/2007 Jonathan Bian) - Fixed MPEG-2 PictureParameter structure, cleaned up a few funcs. + * rev 0.15 (04/20/2007 Jonathan Bian) - Overhauled buffer management + * rev 0.16 (05/02/2007 Jonathan Bian) - Added error codes and fixed some issues with configuration + * rev 0.17 (05/07/2007 Jonathan Bian) - Added H.264/AVC data structures for slice level decode. + * rev 0.18 (05/14/2007 Jonathan Bian) - Added data structures for MPEG-4 slice level decode + * and MPEG-2 motion compensation. + * rev 0.19 (08/06/2007 Jonathan Bian) - Removed extra type for bitplane data. + * rev 0.20 (08/08/2007 Jonathan Bian) - Added missing fields to VC-1 PictureParameter structure. + * rev 0.21 (08/20/2007 Jonathan Bian) - Added image and subpicture support. + * rev 0.22 (08/27/2007 Jonathan Bian) - Added support for chroma-keying and global alpha. + * rev 0.23 (09/11/2007 Jonathan Bian) - Fixed some issues with images and subpictures. + * rev 0.24 (09/18/2007 Jonathan Bian) - Added display attributes. + * rev 0.25 (10/18/2007 Jonathan Bian) - Changed to use IDs only for some types. + * rev 0.26 (11/07/2007 Waldo Bastian) - Change vaCreateBuffer semantics + * rev 0.27 (11/19/2007 Matt Sottek) - Added DeriveImage + * rev 0.28 (12/06/2007 Jonathan Bian) - Added new versions of PutImage and AssociateSubpicture + * to enable scaling + * rev 0.29 (02/07/2008 Jonathan Bian) - VC1 parameter fixes, + * added VA_STATUS_ERROR_RESOLUTION_NOT_SUPPORTED + * rev 0.30 (03/01/2009 Jonathan Bian) - Added encoding support for H.264 BP and MPEG-4 SP and fixes + * for ISO C conformance. + * rev 0.31 (09/02/2009 Gwenole Beauchesne) - VC-1/H264 fields change for VDPAU and XvBA backend + * Application needs to relink with the new library. + * + * rev 0.31.1 (03/29/2009) - Data structure for JPEG encode + * + * Acknowledgements: + * Some concepts borrowed from XvMC and XvImage. + * Waldo Bastian (Intel), Matt Sottek (Intel), Austin Yuan (Intel), and Gwenole Beauchesne (SDS) + * contributed to various aspects of the API. + */ + +#ifndef _VA_H_ +#define _VA_H_ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* +Overview + +The VA API is intended to provide an interface between a video decode/encode/display +application (client) and a hardware accelerator (server), to off-load +video decode/encode/display operations from the host to the hardware accelerator at various +entry-points. + +The basic operation steps are: + +- Negotiate a mutually acceptable configuration with the server to lock + down profile, entrypoints, and other attributes that will not change on + a frame-by-frame basis. +- Create a decode context which represents a "virtualized" hardware decode + device +- Get and fill decode buffers with picture level, slice level and macroblock + level data (depending on entrypoints) +- Pass the decode buffers to the server to decode the current frame + +Initialization & Configuration Management + +- Find out supported profiles +- Find out entrypoints for a given profile +- Find out configuration attributes for a given profile/entrypoint pair +- Create a configuration for use by the decoder + +*/ + +typedef void* VADisplay; /* window system dependent */ + +typedef int VAStatus; /* Return status type from functions */ +/* Values for the return status */ +#define VA_STATUS_SUCCESS 0x00000000 +#define VA_STATUS_ERROR_OPERATION_FAILED 0x00000001 +#define VA_STATUS_ERROR_ALLOCATION_FAILED 0x00000002 +#define VA_STATUS_ERROR_INVALID_DISPLAY 0x00000003 +#define VA_STATUS_ERROR_INVALID_CONFIG 0x00000004 +#define VA_STATUS_ERROR_INVALID_CONTEXT 0x00000005 +#define VA_STATUS_ERROR_INVALID_SURFACE 0x00000006 +#define VA_STATUS_ERROR_INVALID_BUFFER 0x00000007 +#define VA_STATUS_ERROR_INVALID_IMAGE 0x00000008 +#define VA_STATUS_ERROR_INVALID_SUBPICTURE 0x00000009 +#define VA_STATUS_ERROR_ATTR_NOT_SUPPORTED 0x0000000a +#define VA_STATUS_ERROR_MAX_NUM_EXCEEDED 0x0000000b +#define VA_STATUS_ERROR_UNSUPPORTED_PROFILE 0x0000000c +#define VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT 0x0000000d +#define VA_STATUS_ERROR_UNSUPPORTED_RT_FORMAT 0x0000000e +#define VA_STATUS_ERROR_UNSUPPORTED_BUFFERTYPE 0x0000000f +#define VA_STATUS_ERROR_SURFACE_BUSY 0x00000010 +#define VA_STATUS_ERROR_FLAG_NOT_SUPPORTED 0x00000011 +#define VA_STATUS_ERROR_INVALID_PARAMETER 0x00000012 +#define VA_STATUS_ERROR_RESOLUTION_NOT_SUPPORTED 0x00000013 +#define VA_STATUS_ERROR_UNIMPLEMENTED 0x00000014 +#define VA_STATUS_ERROR_SURFACE_IN_DISPLAYING 0x00000015 +#define VA_STATUS_ERROR_INVALID_IMAGE_FORMAT 0x00000016 +#define VA_STATUS_ERROR_UNKNOWN 0xFFFFFFFF + +/* De-interlacing flags for vaPutSurface() */ +#define VA_FRAME_PICTURE 0x00000000 +#define VA_TOP_FIELD 0x00000001 +#define VA_BOTTOM_FIELD 0x00000002 + +/* + * Clears the drawable with background color. + * for hardware overlay based implementation this flag + * can be used to turn off the overlay + */ +#define VA_CLEAR_DRAWABLE 0x00000008 + +/* Color space conversion flags for vaPutSurface() */ +#define VA_SRC_BT601 0x00000010 +#define VA_SRC_BT709 0x00000020 + +/* + * Returns a short english description of error_status + */ +const char *vaErrorStr(VAStatus error_status); + +/* + * Initialization: + * A display must be obtained by calling vaGetDisplay() before calling + * vaInitialize() and other functions. This connects the API to the + * native window system. + * For X Windows, native_dpy would be from XOpenDisplay() + */ +typedef void* NativeDisplay; /* window system dependent */ + +int vaDisplayIsValid(VADisplay dpy); + +/* + * Initialize the library + */ +VAStatus vaInitialize ( + VADisplay dpy, + int *major_version, /* out */ + int *minor_version /* out */ +); + +/* + * After this call, all library internal resources will be cleaned up + */ +VAStatus vaTerminate ( + VADisplay dpy +); + +/* + * vaQueryVendorString returns a pointer to a zero-terminated string + * describing some aspects of the VA implemenation on a specific + * hardware accelerator. The format of the returned string is vendor + * specific and at the discretion of the implementer. + * e.g. for the Intel GMA500 implementation, an example would be: + * "Intel GMA500 - 2.0.0.32L.0005" + */ +const char *vaQueryVendorString ( + VADisplay dpy +); + +typedef int (*VAPrivFunc)(); + +/* + * Return a function pointer given a function name in the library. + * This allows private interfaces into the library + */ +VAPrivFunc vaGetLibFunc ( + VADisplay dpy, + const char *func +); + +/* Currently defined profiles */ +typedef enum +{ + VAProfileMPEG2Simple = 0, + VAProfileMPEG2Main = 1, + VAProfileMPEG4Simple = 2, + VAProfileMPEG4AdvancedSimple = 3, + VAProfileMPEG4Main = 4, + VAProfileH264Baseline = 5, + VAProfileH264Main = 6, + VAProfileH264High = 7, + VAProfileVC1Simple = 8, + VAProfileVC1Main = 9, + VAProfileVC1Advanced = 10, + VAProfileH263Baseline = 11, + VAProfileJPEGBaseline = 12 +} VAProfile; + +/* + * Currently defined entrypoints + */ +typedef enum +{ + VAEntrypointVLD = 1, + VAEntrypointIZZ = 2, + VAEntrypointIDCT = 3, + VAEntrypointMoComp = 4, + VAEntrypointDeblocking = 5, + VAEntrypointEncSlice = 6, /* slice level encode */ + VAEntrypointEncPicture = 7 /* pictuer encode, JPEG, etc */ +} VAEntrypoint; + +/* Currently defined configuration attribute types */ +typedef enum +{ + VAConfigAttribRTFormat = 0, + VAConfigAttribSpatialResidual = 1, + VAConfigAttribSpatialClipping = 2, + VAConfigAttribIntraResidual = 3, + VAConfigAttribEncryption = 4, + VAConfigAttribRateControl = 5 +} VAConfigAttribType; + +/* + * Configuration attributes + * If there is more than one value for an attribute, a default + * value will be assigned to the attribute if the client does not + * specify the attribute when creating a configuration + */ +typedef struct _VAConfigAttrib { + VAConfigAttribType type; + unsigned int value; /* OR'd flags (bits) for this attribute */ +} VAConfigAttrib; + +/* attribute value for VAConfigAttribRTFormat */ +#define VA_RT_FORMAT_YUV420 0x00000001 +#define VA_RT_FORMAT_YUV422 0x00000002 +#define VA_RT_FORMAT_YUV444 0x00000004 +#define VA_RT_FORMAT_PROTECTED 0x80000000 + +/* attribute value for VAConfigAttribRateControl */ +#define VA_RC_NONE 0x00000001 +#define VA_RC_CBR 0x00000002 +#define VA_RC_VBR 0x00000004 + +/* + * if an attribute is not applicable for a given + * profile/entrypoint pair, then set the value to the following + */ +#define VA_ATTRIB_NOT_SUPPORTED 0x80000000 + +/* Get maximum number of profiles supported by the implementation */ +int vaMaxNumProfiles ( + VADisplay dpy +); + +/* Get maximum number of entrypoints supported by the implementation */ +int vaMaxNumEntrypoints ( + VADisplay dpy +); + +/* Get maximum number of attributs supported by the implementation */ +int vaMaxNumConfigAttributes ( + VADisplay dpy +); + +/* + * Query supported profiles + * The caller must provide a "profile_list" array that can hold at + * least vaMaxNumProfile() entries. The actual number of profiles + * returned in "profile_list" is returned in "num_profile". + */ +VAStatus vaQueryConfigProfiles ( + VADisplay dpy, + VAProfile *profile_list, /* out */ + int *num_profiles /* out */ +); + +/* + * Query supported entrypoints for a given profile + * The caller must provide an "entrypoint_list" array that can hold at + * least vaMaxNumEntrypoints() entries. The actual number of entrypoints + * returned in "entrypoint_list" is returned in "num_entrypoints". + */ +VAStatus vaQueryConfigEntrypoints ( + VADisplay dpy, + VAProfile profile, + VAEntrypoint *entrypoint_list, /* out */ + int *num_entrypoints /* out */ +); + +/* + * Get attributes for a given profile/entrypoint pair + * The caller must provide an "attrib_list" with all attributes to be + * retrieved. Upon return, the attributes in "attrib_list" have been + * updated with their value. Unknown attributes or attributes that are + * not supported for the given profile/entrypoint pair will have their + * value set to VA_ATTRIB_NOT_SUPPORTED + */ +VAStatus vaGetConfigAttributes ( + VADisplay dpy, + VAProfile profile, + VAEntrypoint entrypoint, + VAConfigAttrib *attrib_list, /* in/out */ + int num_attribs +); + +/* Generic ID type, can be re-typed for specific implementation */ +typedef unsigned int VAGenericID; + +typedef VAGenericID VAConfigID; + +/* + * Create a configuration for the decode pipeline + * it passes in the attribute list that specifies the attributes it cares + * about, with the rest taking default values. + */ +VAStatus vaCreateConfig ( + VADisplay dpy, + VAProfile profile, + VAEntrypoint entrypoint, + VAConfigAttrib *attrib_list, + int num_attribs, + VAConfigID *config_id /* out */ +); + +/* + * Free resources associdated with a given config + */ +VAStatus vaDestroyConfig ( + VADisplay dpy, + VAConfigID config_id +); + +/* + * Query all attributes for a given configuration + * The profile of the configuration is returned in "profile" + * The entrypoint of the configuration is returned in "entrypoint" + * The caller must provide an "attrib_list" array that can hold at least + * vaMaxNumConfigAttributes() entries. The actual number of attributes + * returned in "attrib_list" is returned in "num_attribs" + */ +VAStatus vaQueryConfigAttributes ( + VADisplay dpy, + VAConfigID config_id, + VAProfile *profile, /* out */ + VAEntrypoint *entrypoint, /* out */ + VAConfigAttrib *attrib_list,/* out */ + int *num_attribs /* out */ +); + + +/* + * Contexts and Surfaces + * + * Context represents a "virtual" video decode pipeline. Surfaces are render + * targets for a given context. The data in the surfaces are not accessible + * to the client and the internal data format of the surface is implementatin + * specific. + * + * Surfaces will be bound to a context when the context is created. Once + * a surface is bound to a given context, it can not be used to create + * another context. The association is removed when the context is destroyed + * + * Both contexts and surfaces are identified by unique IDs and its + * implementation specific internals are kept opaque to the clients + */ + +typedef VAGenericID VAContextID; + +typedef VAGenericID VASurfaceID; + +#define VA_INVALID_ID 0xffffffff +#define VA_INVALID_SURFACE VA_INVALID_ID + +/* + * vaCreateSurfaces - Create an array of surfaces used for decode and display + * dpy: display + * width: surface width + * height: surface height + * format: VA_RT_FORMAT_YUV420, VA_RT_FORMAT_YUV422 or VA_RT_FORMAT_YUV444 + * num_surfaces: number of surfaces to be created + * surfaces: array of surfaces created upon return + */ +VAStatus vaCreateSurfaces ( + VADisplay dpy, + int width, + int height, + int format, + int num_surfaces, + VASurfaceID *surfaces /* out */ +); + + +/* + * vaDestroySurfaces - Destroy resources associated with surfaces. + * Surfaces can only be destroyed after the context associated has been + * destroyed. + * dpy: display + * surfaces: array of surfaces to destroy + * num_surfaces: number of surfaces in the array to be destroyed. + */ +VAStatus vaDestroySurfaces ( + VADisplay dpy, + VASurfaceID *surfaces, + int num_surfaces +); + +#define VA_PROGRESSIVE 0x1 +/* + * vaCreateContext - Create a context + * dpy: display + * config_id: configuration for the context + * picture_width: coded picture width + * picture_height: coded picture height + * flag: any combination of the following: + * VA_PROGRESSIVE (only progressive frame pictures in the sequence when set) + * render_targets: render targets (surfaces) tied to the context + * num_render_targets: number of render targets in the above array + * context: created context id upon return + */ +VAStatus vaCreateContext ( + VADisplay dpy, + VAConfigID config_id, + int picture_width, + int picture_height, + int flag, + VASurfaceID *render_targets, + int num_render_targets, + VAContextID *context /* out */ +); + +/* + * vaDestroyContext - Destroy a context + * dpy: display + * context: context to be destroyed + */ +VAStatus vaDestroyContext ( + VADisplay dpy, + VAContextID context +); + +/* + * Buffers + * Buffers are used to pass various types of data from the + * client to the server. The server maintains a data store + * for each buffer created, and the client idenfies a buffer + * through a unique buffer id assigned by the server. + */ + +typedef VAGenericID VABufferID; + +typedef enum +{ + VAPictureParameterBufferType = 0, + VAIQMatrixBufferType = 1, + VABitPlaneBufferType = 2, + VASliceGroupMapBufferType = 3, + VASliceParameterBufferType = 4, + VASliceDataBufferType = 5, + VAMacroblockParameterBufferType = 6, + VAResidualDataBufferType = 7, + VADeblockingParameterBufferType = 8, + VAImageBufferType = 9, + VAProtectedSliceDataBufferType = 10, + VAQMatrixBufferType = 11, +/* Following are encode buffer types */ + VAEncCodedBufferType = 21, + VAEncSequenceParameterBufferType = 22, + VAEncPictureParameterBufferType = 23, + VAEncSliceParameterBufferType = 24, + VAEncH264VUIBufferType = 25, + VAEncH264SEIBufferType = 26, +} VABufferType; + + +/* + * There will be cases where the bitstream buffer will not have enough room to hold + * the data for the entire slice, and the following flags will be used in the slice + * parameter to signal to the server for the possible cases. + * If a slice parameter buffer and slice data buffer pair is sent to the server with + * the slice data partially in the slice data buffer (BEGIN and MIDDLE cases below), + * then a slice parameter and data buffer needs to be sent again to complete this slice. + */ +#define VA_SLICE_DATA_FLAG_ALL 0x00 /* whole slice is in the buffer */ +#define VA_SLICE_DATA_FLAG_BEGIN 0x01 /* The beginning of the slice is in the buffer but the end if not */ +#define VA_SLICE_DATA_FLAG_MIDDLE 0x02 /* Neither beginning nor end of the slice is in the buffer */ +#define VA_SLICE_DATA_FLAG_END 0x04 /* end of the slice is in the buffer */ + +/* Codec-independent Slice Parameter Buffer base */ +typedef struct _VASliceParameterBufferBase +{ + unsigned int slice_data_size; /* number of bytes in the slice data buffer for this slice */ + unsigned int slice_data_offset; /* the offset to the first byte of slice data */ + unsigned int slice_data_flag; /* see VA_SLICE_DATA_FLAG_XXX definitions */ +} VASliceParameterBufferBase; + + +/**************************** + * JEPG data structure + ***************************/ +typedef struct _VAQMatrixBufferJPEG +{ + int load_lum_quantiser_matrix; + int load_chroma_quantiser_matrix; + unsigned char lum_quantiser_matrix[64]; + unsigned char chroma_quantiser_matrix[64]; +} VAQMatrixBufferJPEG; + +typedef struct _VAEncPictureParameterBufferJPEG +{ + VASurfaceID reconstructed_picture; + unsigned short picture_width; + unsigned short picture_height; + VABufferID coded_buf; +} VAEncPictureParameterBufferJPEG; + + +/**************************** + * MPEG-2 data structures + ****************************/ + +/* MPEG-2 Picture Parameter Buffer */ +/* + * For each frame or field, and before any slice data, a single + * picture parameter buffer must be send. + */ +typedef struct _VAPictureParameterBufferMPEG2 +{ + unsigned short horizontal_size; + unsigned short vertical_size; + VASurfaceID forward_reference_picture; + VASurfaceID backward_reference_picture; + /* meanings of the following fields are the same as in the standard */ + int picture_coding_type; + int f_code; /* pack all four fcode into this */ + union { + struct { + unsigned int intra_dc_precision : 2; + unsigned int picture_structure : 2; + unsigned int top_field_first : 1; + unsigned int frame_pred_frame_dct : 1; + unsigned int concealment_motion_vectors : 1; + unsigned int q_scale_type : 1; + unsigned int intra_vlc_format : 1; + unsigned int alternate_scan : 1; + unsigned int repeat_first_field : 1; + unsigned int progressive_frame : 1; + unsigned int is_first_field : 1; /* indicate whether the current field + * is the first field for field picture + */ + } bits; + unsigned int value; + } picture_coding_extension; +} VAPictureParameterBufferMPEG2; + +/* MPEG-2 Inverse Quantization Matrix Buffer */ +typedef struct _VAIQMatrixBufferMPEG2 +{ + int load_intra_quantiser_matrix; + int load_non_intra_quantiser_matrix; + int load_chroma_intra_quantiser_matrix; + int load_chroma_non_intra_quantiser_matrix; + unsigned char intra_quantiser_matrix[64]; + unsigned char non_intra_quantiser_matrix[64]; + unsigned char chroma_intra_quantiser_matrix[64]; + unsigned char chroma_non_intra_quantiser_matrix[64]; +} VAIQMatrixBufferMPEG2; + +/* MPEG-2 Slice Parameter Buffer */ +typedef struct _VASliceParameterBufferMPEG2 +{ + unsigned int slice_data_size;/* number of bytes in the slice data buffer for this slice */ + unsigned int slice_data_offset;/* the offset to the first byte of slice data */ + unsigned int slice_data_flag; /* see VA_SLICE_DATA_FLAG_XXX defintions */ + unsigned int macroblock_offset;/* the offset to the first bit of MB from the first byte of slice data */ + unsigned int slice_horizontal_position; + unsigned int slice_vertical_position; + int quantiser_scale_code; + int intra_slice_flag; +} VASliceParameterBufferMPEG2; + +/* MPEG-2 Macroblock Parameter Buffer */ +typedef struct _VAMacroblockParameterBufferMPEG2 +{ + unsigned short macroblock_address; + /* + * macroblock_address (in raster scan order) + * top-left: 0 + * bottom-right: picture-height-in-mb*picture-width-in-mb - 1 + */ + unsigned char macroblock_type; /* see definition below */ + union { + struct { + unsigned int frame_motion_type : 2; + unsigned int field_motion_type : 2; + unsigned int dct_type : 1; + } bits; + unsigned int value; + } macroblock_modes; + unsigned char motion_vertical_field_select; + /* + * motion_vertical_field_select: + * see section 6.3.17.2 in the spec + * only the lower 4 bits are used + * bit 0: first vector forward + * bit 1: first vector backward + * bit 2: second vector forward + * bit 3: second vector backward + */ + short PMV[2][2][2]; /* see Table 7-7 in the spec */ + unsigned short coded_block_pattern; + /* + * The bitplanes for coded_block_pattern are described + * in Figure 6.10-12 in the spec + */ + + /* Number of skipped macroblocks after this macroblock */ + unsigned short num_skipped_macroblocks; +} VAMacroblockParameterBufferMPEG2; + +/* + * OR'd flags for macroblock_type (section 6.3.17.1 in the spec) + */ +#define VA_MB_TYPE_MOTION_FORWARD 0x02 +#define VA_MB_TYPE_MOTION_BACKWARD 0x04 +#define VA_MB_TYPE_MOTION_PATTERN 0x08 +#define VA_MB_TYPE_MOTION_INTRA 0x10 + +/* + * MPEG-2 Residual Data Buffer + * For each macroblock, there wil be 64 shorts (16-bit) in the + * residual data buffer + */ + +/**************************** + * MPEG-4 Part 2 data structures + ****************************/ + +/* MPEG-4 Picture Parameter Buffer */ +/* + * For each frame or field, and before any slice data, a single + * picture parameter buffer must be send. + */ +typedef struct _VAPictureParameterBufferMPEG4 +{ + unsigned short vop_width; + unsigned short vop_height; + VASurfaceID forward_reference_picture; + VASurfaceID backward_reference_picture; + union { + struct { + unsigned int short_video_header : 1; + unsigned int chroma_format : 2; + unsigned int interlaced : 1; + unsigned int obmc_disable : 1; + unsigned int sprite_enable : 2; + unsigned int sprite_warping_accuracy : 2; + unsigned int quant_type : 1; + unsigned int quarter_sample : 1; + unsigned int data_partitioned : 1; + unsigned int reversible_vlc : 1; + unsigned int resync_marker_disable : 1; + } bits; + unsigned int value; + } vol_fields; + unsigned char no_of_sprite_warping_points; + short sprite_trajectory_du[3]; + short sprite_trajectory_dv[3]; + unsigned char quant_precision; + union { + struct { + unsigned int vop_coding_type : 2; + unsigned int backward_reference_vop_coding_type : 2; + unsigned int vop_rounding_type : 1; + unsigned int intra_dc_vlc_thr : 3; + unsigned int top_field_first : 1; + unsigned int alternate_vertical_scan_flag : 1; + } bits; + unsigned int value; + } vop_fields; + unsigned char vop_fcode_forward; + unsigned char vop_fcode_backward; + unsigned short vop_time_increment_resolution; + /* short header related */ + unsigned char num_gobs_in_vop; + unsigned char num_macroblocks_in_gob; + /* for direct mode prediction */ + short TRB; + short TRD; +} VAPictureParameterBufferMPEG4; + +/* MPEG-4 Inverse Quantization Matrix Buffer */ +typedef struct _VAIQMatrixBufferMPEG4 +{ + int load_intra_quant_mat; + int load_non_intra_quant_mat; + unsigned char intra_quant_mat[64]; + unsigned char non_intra_quant_mat[64]; +} VAIQMatrixBufferMPEG4; + +/* MPEG-4 Slice Parameter Buffer */ +typedef struct _VASliceParameterBufferMPEG4 +{ + unsigned int slice_data_size;/* number of bytes in the slice data buffer for this slice */ + unsigned int slice_data_offset;/* the offset to the first byte of slice data */ + unsigned int slice_data_flag; /* see VA_SLICE_DATA_FLAG_XXX defintions */ + unsigned int macroblock_offset;/* the offset to the first bit of MB from the first byte of slice data */ + unsigned int macroblock_number; + int quant_scale; +} VASliceParameterBufferMPEG4; + +/* + VC-1 data structures +*/ + +typedef enum /* see 7.1.1.32 */ +{ + VAMvMode1Mv = 0, + VAMvMode1MvHalfPel = 1, + VAMvMode1MvHalfPelBilinear = 2, + VAMvModeMixedMv = 3, + VAMvModeIntensityCompensation = 4 +} VAMvModeVC1; + +/* VC-1 Picture Parameter Buffer */ +/* + * For each picture, and before any slice data, a picture parameter + * buffer must be send. Multiple picture parameter buffers may be + * sent for a single picture. In that case picture parameters will + * apply to all slice data that follow it until a new picture + * parameter buffer is sent. + * + * Notes: + * pic_quantizer_type should be set to the applicable quantizer + * type as defined by QUANTIZER (J.1.19) and either + * PQUANTIZER (7.1.1.8) or PQINDEX (7.1.1.6) + */ +typedef struct _VAPictureParameterBufferVC1 +{ + VASurfaceID forward_reference_picture; + VASurfaceID backward_reference_picture; + /* if out-of-loop post-processing is done on the render + target, then we need to keep the in-loop decoded + picture as a reference picture */ + VASurfaceID inloop_decoded_picture; + + /* sequence layer for AP or meta data for SP and MP */ + union { + struct { + unsigned int pulldown : 1; /* SEQUENCE_LAYER::PULLDOWN */ + unsigned int interlace : 1; /* SEQUENCE_LAYER::INTERLACE */ + unsigned int tfcntrflag : 1; /* SEQUENCE_LAYER::TFCNTRFLAG */ + unsigned int finterpflag : 1; /* SEQUENCE_LAYER::FINTERPFLAG */ + unsigned int psf : 1; /* SEQUENCE_LAYER::PSF */ + unsigned int multires : 1; /* METADATA::MULTIRES */ + unsigned int overlap : 1; /* METADATA::OVERLAP */ + unsigned int syncmarker : 1; /* METADATA::SYNCMARKER */ + unsigned int rangered : 1; /* METADATA::RANGERED */ + unsigned int max_b_frames : 3; /* METADATA::MAXBFRAMES */ + } bits; + unsigned int value; + } sequence_fields; + + unsigned short coded_width; /* ENTRY_POINT_LAYER::CODED_WIDTH */ + unsigned short coded_height; /* ENTRY_POINT_LAYER::CODED_HEIGHT */ + union { + struct { + unsigned int broken_link : 1; /* ENTRY_POINT_LAYER::BROKEN_LINK */ + unsigned int closed_entry : 1; /* ENTRY_POINT_LAYER::CLOSED_ENTRY */ + unsigned int panscan_flag : 1; /* ENTRY_POINT_LAYER::PANSCAN_FLAG */ + unsigned int loopfilter : 1; /* ENTRY_POINT_LAYER::LOOPFILTER */ + } bits; + unsigned int value; + } entrypoint_fields; + unsigned char conditional_overlap_flag; /* ENTRY_POINT_LAYER::CONDOVER */ + unsigned char fast_uvmc_flag; /* ENTRY_POINT_LAYER::FASTUVMC */ + union { + struct { + unsigned int luma_flag : 1; /* ENTRY_POINT_LAYER::RANGE_MAPY_FLAG */ + unsigned int luma : 3; /* ENTRY_POINT_LAYER::RANGE_MAPY */ + unsigned int chroma_flag : 1; /* ENTRY_POINT_LAYER::RANGE_MAPUV_FLAG */ + unsigned int chroma : 3; /* ENTRY_POINT_LAYER::RANGE_MAPUV */ + } bits; + unsigned int value; + } range_mapping_fields; + + unsigned char b_picture_fraction; /* PICTURE_LAYER::BFRACTION */ + unsigned char cbp_table; /* PICTURE_LAYER::CBPTAB/ICBPTAB */ + unsigned char mb_mode_table; /* PICTURE_LAYER::MBMODETAB */ + unsigned char range_reduction_frame;/* PICTURE_LAYER::RANGEREDFRM */ + unsigned char rounding_control; /* PICTURE_LAYER::RNDCTRL */ + unsigned char post_processing; /* PICTURE_LAYER::POSTPROC */ + unsigned char picture_resolution_index; /* PICTURE_LAYER::RESPIC */ + unsigned char luma_scale; /* PICTURE_LAYER::LUMSCALE */ + unsigned char luma_shift; /* PICTURE_LAYER::LUMSHIFT */ + union { + struct { + unsigned int picture_type : 3; /* PICTURE_LAYER::PTYPE */ + unsigned int frame_coding_mode : 3; /* PICTURE_LAYER::FCM */ + unsigned int top_field_first : 1; /* PICTURE_LAYER::TFF */ + unsigned int is_first_field : 1; /* set to 1 if it is the first field */ + unsigned int intensity_compensation : 1; /* PICTURE_LAYER::INTCOMP */ + } bits; + unsigned int value; + } picture_fields; + union { + struct { + unsigned int mv_type_mb : 1; /* PICTURE::MVTYPEMB */ + unsigned int direct_mb : 1; /* PICTURE::DIRECTMB */ + unsigned int skip_mb : 1; /* PICTURE::SKIPMB */ + unsigned int field_tx : 1; /* PICTURE::FIELDTX */ + unsigned int forward_mb : 1; /* PICTURE::FORWARDMB */ + unsigned int ac_pred : 1; /* PICTURE::ACPRED */ + unsigned int overflags : 1; /* PICTURE::OVERFLAGS */ + } flags; + unsigned int value; + } raw_coding; + union { + struct { + unsigned int bp_mv_type_mb : 1; /* PICTURE::MVTYPEMB */ + unsigned int bp_direct_mb : 1; /* PICTURE::DIRECTMB */ + unsigned int bp_skip_mb : 1; /* PICTURE::SKIPMB */ + unsigned int bp_field_tx : 1; /* PICTURE::FIELDTX */ + unsigned int bp_forward_mb : 1; /* PICTURE::FORWARDMB */ + unsigned int bp_ac_pred : 1; /* PICTURE::ACPRED */ + unsigned int bp_overflags : 1; /* PICTURE::OVERFLAGS */ + } flags; + unsigned int value; + } bitplane_present; /* signal what bitplane is being passed via the bitplane buffer */ + union { + struct { + unsigned int reference_distance_flag : 1;/* PICTURE_LAYER::REFDIST_FLAG */ + unsigned int reference_distance : 5;/* PICTURE_LAYER::REFDIST */ + unsigned int num_reference_pictures: 1;/* PICTURE_LAYER::NUMREF */ + unsigned int reference_field_pic_indicator : 1;/* PICTURE_LAYER::REFFIELD */ + } bits; + unsigned int value; + } reference_fields; + union { + struct { + unsigned int mv_mode : 3; /* PICTURE_LAYER::MVMODE */ + unsigned int mv_mode2 : 3; /* PICTURE_LAYER::MVMODE2 */ + unsigned int mv_table : 3; /* PICTURE_LAYER::MVTAB/IMVTAB */ + unsigned int two_mv_block_pattern_table: 2; /* PICTURE_LAYER::2MVBPTAB */ + unsigned int four_mv_switch : 1; /* PICTURE_LAYER::4MVSWITCH */ + unsigned int four_mv_block_pattern_table : 2; /* PICTURE_LAYER::4MVBPTAB */ + unsigned int extended_mv_flag : 1; /* ENTRY_POINT_LAYER::EXTENDED_MV */ + unsigned int extended_mv_range : 2; /* PICTURE_LAYER::MVRANGE */ + unsigned int extended_dmv_flag : 1; /* ENTRY_POINT_LAYER::EXTENDED_DMV */ + unsigned int extended_dmv_range : 2; /* PICTURE_LAYER::DMVRANGE */ + } bits; + unsigned int value; + } mv_fields; + union { + struct { + unsigned int dquant : 2; /* ENTRY_POINT_LAYER::DQUANT */ + unsigned int quantizer : 2; /* ENTRY_POINT_LAYER::QUANTIZER */ + unsigned int half_qp : 1; /* PICTURE_LAYER::HALFQP */ + unsigned int pic_quantizer_scale : 5;/* PICTURE_LAYER::PQUANT */ + unsigned int pic_quantizer_type : 1;/* PICTURE_LAYER::PQUANTIZER */ + unsigned int dq_frame : 1; /* VOPDQUANT::DQUANTFRM */ + unsigned int dq_profile : 2; /* VOPDQUANT::DQPROFILE */ + unsigned int dq_sb_edge : 2; /* VOPDQUANT::DQSBEDGE */ + unsigned int dq_db_edge : 2; /* VOPDQUANT::DQDBEDGE */ + unsigned int dq_binary_level : 1; /* VOPDQUANT::DQBILEVEL */ + unsigned int alt_pic_quantizer : 5;/* VOPDQUANT::ALTPQUANT */ + } bits; + unsigned int value; + } pic_quantizer_fields; + union { + struct { + unsigned int variable_sized_transform_flag : 1;/* ENTRY_POINT_LAYER::VSTRANSFORM */ + unsigned int mb_level_transform_type_flag : 1;/* PICTURE_LAYER::TTMBF */ + unsigned int frame_level_transform_type : 2;/* PICTURE_LAYER::TTFRM */ + unsigned int transform_ac_codingset_idx1 : 2;/* PICTURE_LAYER::TRANSACFRM */ + unsigned int transform_ac_codingset_idx2 : 2;/* PICTURE_LAYER::TRANSACFRM2 */ + unsigned int intra_transform_dc_table : 1;/* PICTURE_LAYER::TRANSDCTAB */ + } bits; + unsigned int value; + } transform_fields; +} VAPictureParameterBufferVC1; + +/* VC-1 Bitplane Buffer +There will be at most three bitplanes coded in any picture header. To send +the bitplane data more efficiently, each byte is divided in two nibbles, with +each nibble carrying three bitplanes for one macroblock. The following table +shows the bitplane data arrangement within each nibble based on the picture +type. + +Picture Type Bit3 Bit2 Bit1 Bit0 +I or BI OVERFLAGS ACPRED FIELDTX +P MYTYPEMB SKIPMB DIRECTMB +B FORWARDMB SKIPMB DIRECTMB + +Within each byte, the lower nibble is for the first MB and the upper nibble is +for the second MB. E.g. the lower nibble of the first byte in the bitplane +buffer is for Macroblock #1 and the upper nibble of the first byte is for +Macroblock #2 in the first row. +*/ + +/* VC-1 Slice Parameter Buffer */ +typedef struct _VASliceParameterBufferVC1 +{ + unsigned int slice_data_size;/* number of bytes in the slice data buffer for this slice */ + unsigned int slice_data_offset;/* the offset to the first byte of slice data */ + unsigned int slice_data_flag; /* see VA_SLICE_DATA_FLAG_XXX defintions */ + unsigned int macroblock_offset;/* the offset to the first bit of MB from the first byte of slice data */ + unsigned int slice_vertical_position; +} VASliceParameterBufferVC1; + +/* VC-1 Slice Data Buffer */ +/* +This is simplely a buffer containing raw bit-stream bytes +*/ + +/**************************** + * H.264/AVC data structures + ****************************/ + +typedef struct _VAPictureH264 +{ + VASurfaceID picture_id; + unsigned int frame_idx; + unsigned int flags; + unsigned int TopFieldOrderCnt; + unsigned int BottomFieldOrderCnt; +} VAPictureH264; +/* flags in VAPictureH264 could be OR of the following */ +#define VA_PICTURE_H264_INVALID 0x00000001 +#define VA_PICTURE_H264_TOP_FIELD 0x00000002 +#define VA_PICTURE_H264_BOTTOM_FIELD 0x00000004 +#define VA_PICTURE_H264_SHORT_TERM_REFERENCE 0x00000008 +#define VA_PICTURE_H264_LONG_TERM_REFERENCE 0x00000010 + +/* H.264 Picture Parameter Buffer */ +/* + * For each picture, and before any slice data, a single + * picture parameter buffer must be send. + */ +typedef struct _VAPictureParameterBufferH264 +{ + VAPictureH264 CurrPic; + VAPictureH264 ReferenceFrames[16]; /* in DPB */ + unsigned short picture_width_in_mbs_minus1; + unsigned short picture_height_in_mbs_minus1; + unsigned char bit_depth_luma_minus8; + unsigned char bit_depth_chroma_minus8; + unsigned char num_ref_frames; + union { + struct { + unsigned int chroma_format_idc : 2; + unsigned int residual_colour_transform_flag : 1; + unsigned int gaps_in_frame_num_value_allowed_flag : 1; + unsigned int frame_mbs_only_flag : 1; + unsigned int mb_adaptive_frame_field_flag : 1; + unsigned int direct_8x8_inference_flag : 1; + unsigned int MinLumaBiPredSize8x8 : 1; /* see A.3.3.2 */ + unsigned int log2_max_frame_num_minus4 : 4; + unsigned int pic_order_cnt_type : 2; + unsigned int log2_max_pic_order_cnt_lsb_minus4 : 4; + unsigned int delta_pic_order_always_zero_flag : 1; + } bits; + unsigned int value; + } seq_fields; + unsigned char num_slice_groups_minus1; + unsigned char slice_group_map_type; + unsigned short slice_group_change_rate_minus1; + signed char pic_init_qp_minus26; + signed char pic_init_qs_minus26; + signed char chroma_qp_index_offset; + signed char second_chroma_qp_index_offset; + union { + struct { + unsigned int entropy_coding_mode_flag : 1; + unsigned int weighted_pred_flag : 1; + unsigned int weighted_bipred_idc : 2; + unsigned int transform_8x8_mode_flag : 1; + unsigned int field_pic_flag : 1; + unsigned int constrained_intra_pred_flag : 1; + unsigned int pic_order_present_flag : 1; + unsigned int deblocking_filter_control_present_flag : 1; + unsigned int redundant_pic_cnt_present_flag : 1; + unsigned int reference_pic_flag : 1; /* nal_ref_idc != 0 */ + } bits; + unsigned int value; + } pic_fields; + unsigned short frame_num; +} VAPictureParameterBufferH264; + +/* H.264 Inverse Quantization Matrix Buffer */ +typedef struct _VAIQMatrixBufferH264 +{ + unsigned char ScalingList4x4[6][16]; + unsigned char ScalingList8x8[2][64]; +} VAIQMatrixBufferH264; + +/* + * H.264 Slice Group Map Buffer + * When VAPictureParameterBufferH264::num_slice_group_minus1 is not equal to 0, + * A slice group map buffer should be sent for each picture if required. The buffer + * is sent only when there is a change in the mapping values. + * The slice group map buffer map "map units" to slice groups as specified in + * section 8.2.2 of the H.264 spec. The buffer will contain one byte for each macroblock + * in raster scan order + */ + +/* H.264 Slice Parameter Buffer */ +typedef struct _VASliceParameterBufferH264 +{ + unsigned int slice_data_size;/* number of bytes in the slice data buffer for this slice */ + unsigned int slice_data_offset;/* the offset to the NAL start code for this slice */ + unsigned int slice_data_flag; /* see VA_SLICE_DATA_FLAG_XXX defintions */ + unsigned short slice_data_bit_offset; /* bit offset from NAL start code to the beginning of slice data */ + unsigned short first_mb_in_slice; + unsigned char slice_type; + unsigned char direct_spatial_mv_pred_flag; + unsigned char num_ref_idx_l0_active_minus1; + unsigned char num_ref_idx_l1_active_minus1; + unsigned char cabac_init_idc; + char slice_qp_delta; + unsigned char disable_deblocking_filter_idc; + char slice_alpha_c0_offset_div2; + char slice_beta_offset_div2; + VAPictureH264 RefPicList0[32]; /* See 8.2.4.2 */ + VAPictureH264 RefPicList1[32]; /* See 8.2.4.2 */ + unsigned char luma_log2_weight_denom; + unsigned char chroma_log2_weight_denom; + unsigned char luma_weight_l0_flag; + short luma_weight_l0[32]; + short luma_offset_l0[32]; + unsigned char chroma_weight_l0_flag; + short chroma_weight_l0[32][2]; + short chroma_offset_l0[32][2]; + unsigned char luma_weight_l1_flag; + short luma_weight_l1[32]; + short luma_offset_l1[32]; + unsigned char chroma_weight_l1_flag; + short chroma_weight_l1[32][2]; + short chroma_offset_l1[32][2]; +} VASliceParameterBufferH264; + +/**************************** + * Common encode data structures + ****************************/ +typedef enum +{ + VAEncPictureTypeIntra = 0, + VAEncPictureTypePredictive = 1, + VAEncPictureTypeBidirectional = 2, +} VAEncPictureType; + +/* Encode Slice Parameter Buffer */ +typedef struct _VAEncSliceParameterBuffer +{ + unsigned int start_row_number; /* starting MB row number for this slice */ + unsigned int slice_height; /* slice height measured in MB */ + union { + struct { + unsigned int is_intra : 1; + unsigned int disable_deblocking_filter_idc : 2; + } bits; + unsigned int value; + } slice_flags; +} VAEncSliceParameterBuffer; + +/**************************** + * H.264 specific encode data structures + ****************************/ + +typedef struct _VAEncSequenceParameterBufferH264 +{ + unsigned char seq_parameter_set_id; + unsigned char level_idc; + unsigned int intra_period; + unsigned int intra_idr_period; + unsigned int picture_width_in_mbs; + unsigned int picture_height_in_mbs; + unsigned int bits_per_second; + unsigned int frame_rate; + unsigned int initial_qp; + unsigned int min_qp; + unsigned int basic_unit_size; + unsigned char vui_flag; +} VAEncSequenceParameterBufferH264; + +typedef struct _VAEncPictureParameterBufferH264 +{ + VASurfaceID reference_picture; + VASurfaceID reconstructed_picture; + VABufferID coded_buf; + unsigned short picture_width; + unsigned short picture_height; + unsigned char last_picture; /* if set to 1 it indicates the last picture in the sequence */ +} VAEncPictureParameterBufferH264; + +/**************************** + * H.263 specific encode data structures + ****************************/ + +typedef struct _VAEncSequenceParameterBufferH263 +{ + unsigned int intra_period; + unsigned int bits_per_second; + unsigned int frame_rate; + unsigned int initial_qp; + unsigned int min_qp; +} VAEncSequenceParameterBufferH263; + +typedef struct _VAEncPictureParameterBufferH263 +{ + VASurfaceID reference_picture; + VASurfaceID reconstructed_picture; + VABufferID coded_buf; + unsigned short picture_width; + unsigned short picture_height; + VAEncPictureType picture_type; +} VAEncPictureParameterBufferH263; + +/**************************** + * MPEG-4 specific encode data structures + ****************************/ + +typedef struct _VAEncSequenceParameterBufferMPEG4 +{ + unsigned char profile_and_level_indication; + unsigned int intra_period; + unsigned int video_object_layer_width; + unsigned int video_object_layer_height; + unsigned int vop_time_increment_resolution; + unsigned int fixed_vop_rate; + unsigned int fixed_vop_time_increment; + unsigned int bits_per_second; + unsigned int frame_rate; + unsigned int initial_qp; + unsigned int min_qp; +} VAEncSequenceParameterBufferMPEG4; + +typedef struct _VAEncPictureParameterBufferMPEG4 +{ + VASurfaceID reference_picture; + VASurfaceID reconstructed_picture; + VABufferID coded_buf; + unsigned short picture_width; + unsigned short picture_height; + unsigned int modulo_time_base; /* number of 1s */ + unsigned int vop_time_increment; + VAEncPictureType picture_type; +} VAEncPictureParameterBufferMPEG4; + + + +/* Buffer functions */ + +/* + * Creates a buffer for "num_elements" elements of "size" bytes and + * initalize with "data". + * if "data" is null, then the contents of the buffer data store + * are undefined. + * Basically there are two ways to get buffer data to the server side. One is + * to call vaCreateBuffer() with a non-null "data", which results the data being + * copied to the data store on the server side. A different method that + * eliminates this copy is to pass null as "data" when calling vaCreateBuffer(), + * and then use vaMapBuffer() to map the data store from the server side to the + * client address space for access. + * Note: image buffers are created by the library, not the client. Please see + * vaCreateImage on how image buffers are managed. + */ +VAStatus vaCreateBuffer ( + VADisplay dpy, + VAContextID context, + VABufferType type, /* in */ + unsigned int size, /* in */ + unsigned int num_elements, /* in */ + void *data, /* in */ + VABufferID *buf_id /* out */ +); + +/* + * Convey to the server how many valid elements are in the buffer. + * e.g. if multiple slice parameters are being held in a single buffer, + * this will communicate to the server the number of slice parameters + * that are valid in the buffer. + */ +VAStatus vaBufferSetNumElements ( + VADisplay dpy, + VABufferID buf_id, /* in */ + unsigned int num_elements /* in */ +); + + +/* + * device independent data structure for codedbuffer + */ +typedef struct _VACodedBufferSegment { + unsigned int size; /* size of the data buffer in the coded buffer segment, in bytes */ + unsigned int bit_offset;/* bit offset into the data buffer where valid bitstream data begins */ + void *buf; /* pointer to the beginning of the data buffer in the coded buffer segment */ + void *next; /* pointer to the next VACodedBufferSegment */ +} VACodedBufferSegment; + +/* + * Map data store of the buffer into the client's address space + * vaCreateBuffer() needs to be called with "data" set to NULL before + * calling vaMapBuffer() + * + * if buffer type is VAEncCodedBufferType, pbuf points to link-list of + * VACodedBufferSegment, and the list is terminated if "next" is NULL + */ +VAStatus vaMapBuffer ( + VADisplay dpy, + VABufferID buf_id, /* in */ + void **pbuf /* out */ +); + +/* + * After client making changes to a mapped data store, it needs to + * "Unmap" it to let the server know that the data is ready to be + * consumed by the server + */ +VAStatus vaUnmapBuffer ( + VADisplay dpy, + VABufferID buf_id /* in */ +); + +/* + * After this call, the buffer is deleted and this buffer_id is no longer valid + * Only call this if the buffer is not going to be passed to vaRenderBuffer + */ +VAStatus vaDestroyBuffer ( + VADisplay dpy, + VABufferID buffer_id +); + +/* +Render (Decode) Pictures + +A picture represents either a frame or a field. + +The Begin/Render/End sequence sends the decode buffers to the server +*/ + +/* + * Get ready to decode a picture to a target surface + */ +VAStatus vaBeginPicture ( + VADisplay dpy, + VAContextID context, + VASurfaceID render_target +); + +/* + * Send decode buffers to the server. + * Buffers are automatically destroyed afterwards + */ +VAStatus vaRenderPicture ( + VADisplay dpy, + VAContextID context, + VABufferID *buffers, + int num_buffers +); + +/* + * Make the end of rendering for a picture. + * The server should start processing all pending operations for this + * surface. This call is non-blocking. The client can start another + * Begin/Render/End sequence on a different render target. + */ +VAStatus vaEndPicture ( + VADisplay dpy, + VAContextID context +); + +/* + +Synchronization + +*/ + +/* + * This function blocks until all pending operations on the render target + * have been completed. Upon return it is safe to use the render target for a + * different picture. + */ +VAStatus vaSyncSurface ( + VADisplay dpy, + VASurfaceID render_target +); + +typedef enum +{ + VASurfaceRendering = 1, /* Rendering in progress */ + VASurfaceDisplaying = 2, /* Displaying in progress (not safe to render into it) */ + /* this status is useful if surface is used as the source */ + /* of an overlay */ + VASurfaceReady = 4, /* not being rendered or displayed */ + VASurfaceSkipped = 8 /* Indicate a skipped frame during encode */ +} VASurfaceStatus; + +/* + * Find out any pending ops on the render target + */ +VAStatus vaQuerySurfaceStatus ( + VADisplay dpy, + VASurfaceID render_target, + VASurfaceStatus *status /* out */ +); + +/* + * Images and Subpictures + * VAImage is used to either get the surface data to client memory, or + * to copy image data in client memory to a surface. + * Both images, subpictures and surfaces follow the same 2D coordinate system where origin + * is at the upper left corner with positive X to the right and positive Y down + */ +#define VA_FOURCC(ch0, ch1, ch2, ch3) \ + ((unsigned long)(unsigned char) (ch0) | ((unsigned long)(unsigned char) (ch1) << 8) | \ + ((unsigned long)(unsigned char) (ch2) << 16) | ((unsigned long)(unsigned char) (ch3) << 24 )) + +/* a few common FourCCs */ +#define VA_FOURCC_NV12 0x3231564E +#define VA_FOURCC_AI44 0x34344149 +#define VA_FOURCC_RGBA 0x41424752 +#define VA_FOURCC_UYVY 0x59565955 +#define VA_FOURCC_YUY2 0x32595559 +#define VA_FOURCC_AYUV 0x56555941 +#define VA_FOURCC_NV11 0x3131564e +#define VA_FOURCC_YV12 0x32315659 +#define VA_FOURCC_P208 0x38303250 +#define VA_FOURCC_IYUV 0x56555949 + +/* byte order */ +#define VA_LSB_FIRST 1 +#define VA_MSB_FIRST 2 + +typedef struct _VAImageFormat +{ + unsigned int fourcc; + unsigned int byte_order; /* VA_LSB_FIRST, VA_MSB_FIRST */ + unsigned int bits_per_pixel; + /* for RGB formats */ + unsigned int depth; /* significant bits per pixel */ + unsigned int red_mask; + unsigned int green_mask; + unsigned int blue_mask; + unsigned int alpha_mask; +} VAImageFormat; + +typedef VAGenericID VAImageID; + +typedef struct _VAImage +{ + VAImageID image_id; /* uniquely identify this image */ + VAImageFormat format; + VABufferID buf; /* image data buffer */ + /* + * Image data will be stored in a buffer of type VAImageBufferType to facilitate + * data store on the server side for optimal performance. The buffer will be + * created by the CreateImage function, and proper storage allocated based on the image + * size and format. This buffer is managed by the library implementation, and + * accessed by the client through the buffer Map/Unmap functions. + */ + unsigned short width; + unsigned short height; + unsigned int data_size; + unsigned int num_planes; /* can not be greater than 3 */ + /* + * An array indicating the scanline pitch in bytes for each plane. + * Each plane may have a different pitch. Maximum 3 planes for planar formats + */ + unsigned int pitches[3]; + /* + * An array indicating the byte offset from the beginning of the image data + * to the start of each plane. + */ + unsigned int offsets[3]; + + /* The following fields are only needed for paletted formats */ + int num_palette_entries; /* set to zero for non-palette images */ + /* + * Each component is one byte and entry_bytes indicates the number of components in + * each entry (eg. 3 for YUV palette entries). set to zero for non-palette images + */ + int entry_bytes; + /* + * An array of ascii characters describing the order of the components within the bytes. + * Only entry_bytes characters of the string are used. + */ + char component_order[4]; +} VAImage; + +/* Get maximum number of image formats supported by the implementation */ +int vaMaxNumImageFormats ( + VADisplay dpy +); + +/* + * Query supported image formats + * The caller must provide a "format_list" array that can hold at + * least vaMaxNumImageFormats() entries. The actual number of formats + * returned in "format_list" is returned in "num_formats". + */ +VAStatus vaQueryImageFormats ( + VADisplay dpy, + VAImageFormat *format_list, /* out */ + int *num_formats /* out */ +); + +/* + * Create a VAImage structure + * The width and height fields returned in the VAImage structure may get + * enlarged for some YUV formats. Upon return from this function, + * image->buf has been created and proper storage allocated by the library. + * The client can access the image through the Map/Unmap calls. + */ +VAStatus vaCreateImage ( + VADisplay dpy, + VAImageFormat *format, + int width, + int height, + VAImage *image /* out */ +); + +/* + * Should call DestroyImage before destroying the surface it is bound to + */ +VAStatus vaDestroyImage ( + VADisplay dpy, + VAImageID image +); + +VAStatus vaSetImagePalette ( + VADisplay dpy, + VAImageID image, + /* + * pointer to an array holding the palette data. The size of the array is + * num_palette_entries * entry_bytes in size. The order of the components + * in the palette is described by the component_order in VAImage struct + */ + unsigned char *palette +); + +/* + * Retrive surface data into a VAImage + * Image must be in a format supported by the implementation + */ +VAStatus vaGetImage ( + VADisplay dpy, + VASurfaceID surface, + int x, /* coordinates of the upper left source pixel */ + int y, + unsigned int width, /* width and height of the region */ + unsigned int height, + VAImageID image +); + +/* + * Copy data from a VAImage to a surface + * Image must be in a format supported by the implementation + * Returns a VA_STATUS_ERROR_SURFACE_BUSY if the surface + * shouldn't be rendered into when this is called + */ +VAStatus vaPutImage ( + VADisplay dpy, + VASurfaceID surface, + VAImageID image, + int src_x, + int src_y, + unsigned int src_width, + unsigned int src_height, + int dest_x, + int dest_y, + unsigned int dest_width, + unsigned int dest_height +); + +/* + * Derive an VAImage from an existing surface. + * This interface will derive a VAImage and corresponding image buffer from + * an existing VA Surface. The image buffer can then be mapped/unmapped for + * direct CPU access. This operation is only possible on implementations with + * direct rendering capabilities and internal surface formats that can be + * represented with a VAImage. When the operation is not possible this interface + * will return VA_STATUS_ERROR_OPERATION_FAILED. Clients should then fall back + * to using vaCreateImage + vaPutImage to accomplish the same task in an + * indirect manner. + * + * Implementations should only return success when the resulting image buffer + * would be useable with vaMap/Unmap. + * + * When directly accessing a surface special care must be taken to insure + * proper synchronization with the graphics hardware. Clients should call + * vaQuerySurfaceStatus to insure that a surface is not the target of concurrent + * rendering or currently being displayed by an overlay. + * + * Additionally nothing about the contents of a surface should be assumed + * following a vaPutSurface. Implementations are free to modify the surface for + * scaling or subpicture blending within a call to vaPutImage. + * + * Calls to vaPutImage or vaGetImage using the same surface from which the image + * has been derived will return VA_STATUS_ERROR_SURFACE_BUSY. vaPutImage or + * vaGetImage with other surfaces is supported. + * + * An image created with vaDeriveImage should be freed with vaDestroyImage. The + * image and image buffer structures will be destroyed; however, the underlying + * surface will remain unchanged until freed with vaDestroySurfaces. + */ +VAStatus vaDeriveImage ( + VADisplay dpy, + VASurfaceID surface, + VAImage *image /* out */ +); + +/* + * Subpictures + * Subpicture is a special type of image that can be blended + * with a surface during vaPutSurface(). Subpicture can be used to render + * DVD sub-titles or closed captioning text etc. + */ + +typedef VAGenericID VASubpictureID; + +/* Get maximum number of subpicture formats supported by the implementation */ +int vaMaxNumSubpictureFormats ( + VADisplay dpy +); + +/* flags for subpictures */ +#define VA_SUBPICTURE_CHROMA_KEYING 0x0001 +#define VA_SUBPICTURE_GLOBAL_ALPHA 0x0002 +/* + * Query supported subpicture formats + * The caller must provide a "format_list" array that can hold at + * least vaMaxNumSubpictureFormats() entries. The flags arrary holds the flag + * for each format to indicate additional capabilities for that format. The actual + * number of formats returned in "format_list" is returned in "num_formats". + * flags: returned value to indicate addtional capabilities + * VA_SUBPICTURE_CHROMA_KEYING - supports chroma-keying + * VA_SUBPICTURE_GLOBAL_ALPHA - supports global alpha + */ +VAStatus vaQuerySubpictureFormats ( + VADisplay dpy, + VAImageFormat *format_list, /* out */ + unsigned int *flags, /* out */ + unsigned int *num_formats /* out */ +); + +/* + * Subpictures are created with an image associated. + */ +VAStatus vaCreateSubpicture ( + VADisplay dpy, + VAImageID image, + VASubpictureID *subpicture /* out */ +); + +/* + * Destroy the subpicture before destroying the image it is assocated to + */ +VAStatus vaDestroySubpicture ( + VADisplay dpy, + VASubpictureID subpicture +); + +/* + * Bind an image to the subpicture. This image will now be associated with + * the subpicture instead of the one at creation. + */ +VAStatus vaSetSubpictureImage ( + VADisplay dpy, + VASubpictureID subpicture, + VAImageID image +); + +/* + * If chromakey is enabled, then the area where the source value falls within + * the chromakey [min, max] range is transparent + * The chromakey component format is the following: + * For RGB: [0:7] Red [8:15] Blue [16:23] Green + * For YUV: [0:7] V [8:15] U [16:23] Y + * The chromakey mask can be used to mask out certain components for chromakey + * comparision + */ +VAStatus vaSetSubpictureChromakey ( + VADisplay dpy, + VASubpictureID subpicture, + unsigned int chromakey_min, + unsigned int chromakey_max, + unsigned int chromakey_mask +); + +/* + * Global alpha value is between 0 and 1. A value of 1 means fully opaque and + * a value of 0 means fully transparent. If per-pixel alpha is also specified then + * the overall alpha is per-pixel alpha multiplied by the global alpha + */ +VAStatus vaSetSubpictureGlobalAlpha ( + VADisplay dpy, + VASubpictureID subpicture, + float global_alpha +); + +/* + * vaAssociateSubpicture associates the subpicture with target_surfaces. + * It defines the region mapping between the subpicture and the target + * surfaces through source and destination rectangles (with the same width and height). + * Both will be displayed at the next call to vaPutSurface. Additional + * associations before the call to vaPutSurface simply overrides the association. + */ +VAStatus vaAssociateSubpicture ( + VADisplay dpy, + VASubpictureID subpicture, + VASurfaceID *target_surfaces, + int num_surfaces, + short src_x, /* upper left offset in subpicture */ + short src_y, + unsigned short src_width, + unsigned short src_height, + short dest_x, /* upper left offset in surface */ + short dest_y, + unsigned short dest_width, + unsigned short dest_height, + /* + * whether to enable chroma-keying or global-alpha + * see VA_SUBPICTURE_XXX values + */ + unsigned int flags +); + +/* + * vaDeassociateSubpicture removes the association of the subpicture with target_surfaces. + */ +VAStatus vaDeassociateSubpicture ( + VADisplay dpy, + VASubpictureID subpicture, + VASurfaceID *target_surfaces, + int num_surfaces +); + +typedef struct _VARectangle +{ + short x; + short y; + unsigned short width; + unsigned short height; +} VARectangle; + +/* + * Display attributes + * Display attributes are used to control things such as contrast, hue, saturation, + * brightness etc. in the rendering process. The application can query what + * attributes are supported by the driver, and then set the appropriate attributes + * before calling vaPutSurface() + */ +/* PowerVR IEP Lite attributes */ +typedef enum +{ + VADISPLAYATTRIB_BLE_OFF = 0x00, + VADISPLAYATTRIB_BLE_LOW, + VADISPLAYATTRIB_BLE_MEDIUM, + VADISPLAYATTRIB_BLE_HIGH, + VADISPLAYATTRIB_BLE_NONE, +} VADisplayAttribBLEMode; + +typedef enum +{ + VADISPLAYATTRIB_CSC_FORMAT_YCC_BT601 = 0x00, + VADISPLAYATTRIB_CSC_FORMAT_YCC_BT709, + VADISPLAYATTRIB_CSC_FORMAT_YCC_SMPTE_240, + VADISPLAYATTRIB_CSC_FORMAT_RGB, + VADISPLAYATTRIB_CSC_FORMAT_NONE, +} VADisplayAttribCSCFormat; + +/* attribute value for VADisplayAttribRotation */ +#define VA_ROTATION_NONE 0x00000000 +#define VA_ROTATION_90 0x00000001 +#define VA_ROTATION_180 0x00000002 +#define VA_ROTATION_270 0x00000004 + +/* attribute value for VADisplayAttribOutOfLoopDeblock */ +#define VA_OOL_DEBLOCKING_FALSE 0x00000000 +#define VA_OOL_DEBLOCKING_TRUE 0x00000001 + + +/* Currently defined display attribute types */ +typedef enum +{ + VADisplayAttribBrightness = 0, + VADisplayAttribContrast = 1, + VADisplayAttribHue = 2, + VADisplayAttribSaturation = 3, + /* client can specifiy a background color for the target window */ + VADisplayAttribBackgroundColor = 4, + /* + * this is a gettable only attribute. For some implementations that use the + * hardware overlay, after PutSurface is called, the surface can not be + * re-used until after the subsequent PutSurface call. If this is the case + * then the value for this attribute will be set to 1 so that the client + * will not attempt to re-use the surface right after returning from a call + * to PutSurface. + */ + VADisplayAttribDirectSurface = 5, + VADisplayAttribRotation = 6, + VADisplayAttribOutofLoopDeblock = 7, + + /* PowerVR IEP Lite specific attributes */ + VADisplayAttribBLEBlackMode = 8, + VADisplayAttribBLEWhiteMode = 9, + VADisplayAttribBlueStretch = 10, + VADisplayAttribSkinColorCorrection = 11, + VADisplayAttribCSCInputColorFormat = 12, + VADisplayAttribCSCHue = 13, + VADisplayAttribCSCSaturation = 14, + VADisplayAttribCSCBrightness = 15, + VADisplayAttribCSCContrast = 16, +} VADisplayAttribType; + +/* flags for VADisplayAttribute */ +#define VA_DISPLAY_ATTRIB_NOT_SUPPORTED 0x0000 +#define VA_DISPLAY_ATTRIB_GETTABLE 0x0001 +#define VA_DISPLAY_ATTRIB_SETTABLE 0x0002 + +typedef struct _VADisplayAttribute +{ + VADisplayAttribType type; + int min_value; + int max_value; + int value; /* used by the set/get attribute functions */ +/* flags can be VA_DISPLAY_ATTRIB_GETTABLE or VA_DISPLAY_ATTRIB_SETTABLE or OR'd together */ + unsigned int flags; +} VADisplayAttribute; + +/* Get maximum number of display attributs supported by the implementation */ +int vaMaxNumDisplayAttributes ( + VADisplay dpy +); + +/* + * Query display attributes + * The caller must provide a "attr_list" array that can hold at + * least vaMaxNumDisplayAttributes() entries. The actual number of attributes + * returned in "attr_list" is returned in "num_attributes". + */ +VAStatus vaQueryDisplayAttributes ( + VADisplay dpy, + VADisplayAttribute *attr_list, /* out */ + int *num_attributes /* out */ +); + +/* + * Get display attributes + * This function returns the current attribute values in "attr_list". + * Only attributes returned with VA_DISPLAY_ATTRIB_GETTABLE set in the "flags" field + * from vaQueryDisplayAttributes() can have their values retrieved. + */ +VAStatus vaGetDisplayAttributes ( + VADisplay dpy, + VADisplayAttribute *attr_list, /* in/out */ + int num_attributes +); + +/* + * Set display attributes + * Only attributes returned with VA_DISPLAY_ATTRIB_SETTABLE set in the "flags" field + * from vaQueryDisplayAttributes() can be set. If the attribute is not settable or + * the value is out of range, the function returns VA_STATUS_ERROR_ATTR_NOT_SUPPORTED + */ +VAStatus vaSetDisplayAttributes ( + VADisplay dpy, + VADisplayAttribute *attr_list, + int num_attributes +); + +#ifdef __cplusplus +} +#endif + +#endif /* _VA_H_ */ diff -Nru libva-1.0.1/va/va_tpi.c libva-1.0.1-3+0.31.1/va/va_tpi.c --- libva-1.0.1/va/va_tpi.c 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/va/va_tpi.c 2010-06-01 10:57:37.000000000 +0000 @@ -0,0 +1,130 @@ +/* + * Copyright (c) 2007 Intel Corporation. All Rights Reserved. + * + * 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, sub license, 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 (including the + * next paragraph) 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 NON-INFRINGEMENT. + * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +#define _GNU_SOURCE 1 +#include "va.h" +#include "va_backend.h" +#include "va_backend_tpi.h" +#include "config.h" + +#include +#include +#include +#include +#include +#include +#include + +#define CTX(dpy) (((VADisplayContextP)dpy)->pDriverContext) +#define CHECK_DISPLAY(dpy) if( !vaDisplayIsValid(dpy) ) { return VA_STATUS_ERROR_INVALID_DISPLAY; } + +/* Wrap a CI (camera imaging) frame as a VA surface to share captured video between camear + * and VA encode. With frame_id, VA driver need to call CI interfaces to get the information + * of the frame, and to determine if the frame can be wrapped as a VA surface + * + * Application should make sure the frame is idle before the frame is passed into VA stack + * and also a vaSyncSurface should be called before application tries to access the frame + * from CI stack + */ +VAStatus vaCreateSurfaceFromCIFrame ( + VADisplay dpy, + unsigned long frame_id, + VASurfaceID *surface /* out */ +) +{ + VADriverContextP ctx; + struct VADriverVTableTPI *tpi; + CHECK_DISPLAY(dpy); + ctx = CTX(dpy); + + tpi = ( struct VADriverVTableTPI *)ctx->vtable_tpi; + if (tpi && tpi->vaCreateSurfaceFromCIFrame) { + return tpi->vaCreateSurfaceFromCIFrame( ctx, frame_id, surface ); + } else + return VA_STATUS_ERROR_UNIMPLEMENTED; + +} + +/* Wrap a V4L2 buffer as a VA surface, so that V4L2 camera, VA encode + * can share the data without copy + * The VA driver should query the camera device from v4l2_fd to see + * if camera device memory/buffer can be wrapped into a VA surface + * Buffer information is passed in by v4l2_fmt and v4l2_buf structure, + * VA driver also needs do further check if the buffer can meet encode + * hardware requirement, such as dimension, fourcc, stride, etc + * + * Application should make sure the buffer is idle before the frame into VA stack + * and also a vaSyncSurface should be called before application tries to access the frame + * from V4L2 stack + */ +VAStatus vaCreateSurfaceFromV4L2Buf( + VADisplay dpy, + int v4l2_fd, /* file descriptor of V4L2 device */ + struct v4l2_format *v4l2_fmt, /* format of V4L2 */ + struct v4l2_buffer *v4l2_buf, /* V4L2 buffer */ + VASurfaceID *surface /* out */ +) +{ + VADriverContextP ctx; + struct VADriverVTableTPI *tpi; + CHECK_DISPLAY(dpy); + ctx = CTX(dpy); + + tpi = ( struct VADriverVTableTPI *)ctx->vtable_tpi; + if (tpi && tpi->vaCreateSurfaceFromV4L2Buf) { + return tpi->vaCreateSurfaceFromV4L2Buf( ctx, v4l2_fd, v4l2_fmt, v4l2_buf, surface ); + } else + return VA_STATUS_ERROR_UNIMPLEMENTED; +} + +VAStatus vaPutSurfaceBuf ( + VADisplay dpy, + VASurfaceID surface, + unsigned char* data, + int* data_len, + short srcx, + short srcy, + unsigned short srcw, + unsigned short srch, + short destx, + short desty, + unsigned short destw, + unsigned short desth, + VARectangle *cliprects, /* client supplied clip list */ + unsigned int number_cliprects, /* number of clip rects in the clip list */ + unsigned int flags /* de-interlacing flags */ +) +{ + VADriverContextP ctx; + struct VADriverVTableTPI *tpi; + CHECK_DISPLAY(dpy); + ctx = CTX(dpy); + + tpi = ( struct VADriverVTableTPI *)ctx->vtable_tpi; + if (tpi && tpi->vaPutSurfaceBuf) { + return tpi->vaPutSurfaceBuf( ctx, surface, data, data_len, srcx, srcy, srcw, srch, + destx, desty, destw, desth, cliprects, number_cliprects, flags ); + } else + return VA_STATUS_ERROR_UNIMPLEMENTED; +} diff -Nru libva-1.0.1/va/va_tpi.h libva-1.0.1-3+0.31.1/va/va_tpi.h --- libva-1.0.1/va/va_tpi.h 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/va/va_tpi.h 2010-06-01 10:57:37.000000000 +0000 @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2007-2009 Intel Corporation. All Rights Reserved. + * + * 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, sub license, 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 (including the + * next paragraph) 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 NON-INFRINGEMENT. + * IN NO EVENT SHALL INTEL AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +/* Wrap a CI (camera imaging) frame as a VA surface to share captured video between camear + * and VA encode. With frame_id, VA driver need to call CI interfaces to get the information + * of the frame, and to determine if the frame can be wrapped as a VA surface + * + * Application should make sure the frame is idle before the frame is passed into VA stack + * and also a vaSyncSurface should be called before application tries to access the frame + * from CI stack + */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +VAStatus vaCreateSurfaceFromCIFrame ( + VADisplay dpy, + unsigned long frame_id, + VASurfaceID *surface /* out */ +); + +VAStatus vaCreateSurfaceFromV4L2Buf( + VADisplay dpy, + int v4l2_fd, /* file descriptor of V4L2 device */ + struct v4l2_format *v4l2_fmt, /* format of V4L2 */ + struct v4l2_buffer *v4l2_buf, /* V4L2 buffer */ + VASurfaceID *surface /* out */ +); + +VAStatus vaPutSurfaceBuf ( + VADisplay dpy, + VASurfaceID surface, + unsigned char* data, + int* data_len, + short srcx, + short srcy, + unsigned short srcw, + unsigned short srch, + short destx, + short desty, + unsigned short destw, + unsigned short desth, + VARectangle *cliprects, /* client supplied clip list */ + unsigned int number_cliprects, /* number of clip rects in the clip list */ + unsigned int flags /* de-interlacing flags */ +); + +#ifdef __cplusplus +} +#endif diff -Nru libva-1.0.1/va/va_trace.c libva-1.0.1-3+0.31.1/va/va_trace.c --- libva-1.0.1/va/va_trace.c 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/va/va_trace.c 2010-06-02 09:03:43.000000000 +0000 @@ -0,0 +1,1115 @@ +/* + * Copyright (c) 2009 Intel Corporation. All Rights Reserved. + * + * 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, sub license, 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 (including the + * next paragraph) 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 NON-INFRINGEMENT. + * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +#define _GNU_SOURCE 1 +#include "va.h" +#include "va_backend.h" + +#include +#include +#include +#include +#include +#include +#include + +unsigned int trace_flag = 0; + +static const char *trace_file = 0; +static FILE *trace_fp = 0; + +static VASurfaceID trace_rendertarget; /* current render target */ +static VAProfile trace_profile; /* current entrypoint for buffers */ + +static unsigned int trace_frame; +static unsigned int trace_slice; + +static unsigned int trace_width; +static unsigned int trace_height; + +int va_TraceInit(void) +{ + trace_file = (const char *)getenv("LIBVA_TRACE"); + if (trace_file) { + trace_fp = fopen(trace_file, "w"); + if (trace_fp) + trace_flag = 1; + } +} + +int va_TraceEnd(void) +{ + if (trace_file && trace_fp) { + fclose(trace_fp); + + trace_file = NULL; + trace_fp = NULL; + + trace_flag = 0; + + trace_width = 0; + trace_height = 0; + } +} + +int va_TraceMsg(const char *msg, ...) +{ + va_list args; + + if (msg) { + va_start(args, msg); + vfprintf(trace_fp, msg, args); + va_end(args); + } else { + fflush(trace_fp); + } +} + + +int va_TraceCreateConfig( + VADisplay dpy, + VAProfile profile, + VAEntrypoint entrypoint, + VAConfigAttrib *attrib_list, + int num_attribs, + VAConfigID *config_id /* out */ + ) +{ + int i; + + va_TraceMsg("\tprofile = %d\n", profile); + va_TraceMsg("\tentrypoint = %d\n", entrypoint); + va_TraceMsg("\tnum_attribs = %d\n", num_attribs); + for (i = 0; i < num_attribs; i++) { + va_TraceMsg("\t\tattrib_list[%d].type = 0x%08x\n", i, attrib_list[i].type); + va_TraceMsg("\t\tattrib_list[%d].value = 0x%08x\n", i, attrib_list[i].value); + } + + trace_profile = profile; +} + + +int va_TraceCreateSurface( + VADisplay dpy, + int width, + int height, + int format, + int num_surfaces, + VASurfaceID *surfaces /* out */ + ) +{ + int i; + + va_TraceMsg("\twidth = %d\n", width); + va_TraceMsg("\theight = %d\n", height); + va_TraceMsg("\tformat = %d\n", format); + va_TraceMsg("\tnum_surfaces = %d\n", num_surfaces); + + for (i = 0; i < num_surfaces; i++) + va_TraceMsg("\t\tsurfaces[%d] = 0x%08x\n", i, surfaces[i]); +} + + +int va_TraceCreateContext( + VADisplay dpy, + VAConfigID config_id, + int picture_width, + int picture_height, + int flag, + VASurfaceID *render_targets, + int num_render_targets, + VAContextID *context /* out */ + ) +{ + int i; + + va_TraceMsg("\twidth = %d\n", picture_width); + va_TraceMsg("\theight = %d\n", picture_height); + va_TraceMsg("\tflag = 0x%08x\n", flag); + va_TraceMsg("\tnum_render_targets = %d\n", num_render_targets); + for (i=0; inum_ref_frames > 4) + { + int num = 0; + for (i = 15; i >= 0; i--) + { + if (p->ReferenceFrames[i].flags != VA_PICTURE_H264_INVALID) + { + num++; + } + if (num > 4) + { + p->ReferenceFrames[i].flags = VA_PICTURE_H264_INVALID; + } + } + p->num_ref_frames = 4; + } +#endif + +#if 1 + va_TraceMsg("picture id: %d\n", p->CurrPic.picture_id); + va_TraceMsg("frame idx: %d\n", p->CurrPic.frame_idx); + va_TraceMsg("picture flags: %d\n", p->CurrPic.flags); + va_TraceMsg("top field order count: %d\n", p->CurrPic.TopFieldOrderCnt); + va_TraceMsg("bottom field order count: %d\n", p->CurrPic.BottomFieldOrderCnt); + + + va_TraceMsg("Reference frames: \n"); + for (i = 0; i < 16; i++) + { + if (p->ReferenceFrames[i].flags != VA_PICTURE_H264_INVALID) + { + //va_TraceMsg("%d-%d; ", p->ReferenceFrames[i].TopFieldOrderCnt, p->ReferenceFrames[i].BottomFieldOrderCnt); + va_TraceMsg("%d-%d-%d-%d; ", p->ReferenceFrames[i].TopFieldOrderCnt, p->ReferenceFrames[i].BottomFieldOrderCnt, p->ReferenceFrames[i].picture_id, p->ReferenceFrames[i].frame_idx); + } + } + va_TraceMsg("\n"); +#endif + va_TraceMsg("picture_width_in_mbs_minus1: %d\n", p->picture_width_in_mbs_minus1); + va_TraceMsg("picture_height_in_mbs_minus1: %d\n", p->picture_height_in_mbs_minus1); + va_TraceMsg("bit_depth_luma_minus8: %d\n", p->bit_depth_luma_minus8); + va_TraceMsg("bit_depth_chroma_minus8: %d\n", p->bit_depth_chroma_minus8); + va_TraceMsg("num_ref_frames: %d\n", p->num_ref_frames); + va_TraceMsg("seq fields: %d\n", p->seq_fields.value); + va_TraceMsg("\t chroma_format_idc: %d\n", p->seq_fields.bits.chroma_format_idc); + va_TraceMsg("\t residual_colour_transform_flag: %d\n", p->seq_fields.bits.residual_colour_transform_flag); + va_TraceMsg("\t frame_mbs_only_flag: %d\n", p->seq_fields.bits.frame_mbs_only_flag); + va_TraceMsg("\t mb_adaptive_frame_field_flag: %d\n", p->seq_fields.bits.mb_adaptive_frame_field_flag); + va_TraceMsg("\t direct_8x8_inference_flag: %d\n", p->seq_fields.bits.direct_8x8_inference_flag); + va_TraceMsg("\t MinLumaBiPredSize8x8: %d\n", p->seq_fields.bits.MinLumaBiPredSize8x8); + va_TraceMsg("num_slice_groups_minus1: %d\n", p->num_slice_groups_minus1); + va_TraceMsg("slice_group_map_type: %d\n", p->slice_group_map_type); + va_TraceMsg("slice_group_change_rate_minus1: %d\n", p->slice_group_change_rate_minus1); + va_TraceMsg("pic_init_qp_minus26: %d\n", p->pic_init_qp_minus26); + va_TraceMsg("pic_init_qs_minus26: %d\n", p->pic_init_qs_minus26); + va_TraceMsg("chroma_qp_index_offset: %d\n", p->chroma_qp_index_offset); + va_TraceMsg("second_chroma_qp_index_offset: %d\n", p->second_chroma_qp_index_offset); + va_TraceMsg("pic_fields: %d\n", p->pic_fields.value); + va_TraceMsg("\t entropy_coding_mode_flag: %d\n", p->pic_fields.bits.entropy_coding_mode_flag); + va_TraceMsg("\t weighted_pred_flag: %d\n", p->pic_fields.bits.weighted_pred_flag); + va_TraceMsg("\t weighted_bipred_idc: %d\n", p->pic_fields.bits.weighted_bipred_idc); + va_TraceMsg("\t transform_8x8_mode_flag: %d\n", p->pic_fields.bits.transform_8x8_mode_flag); + va_TraceMsg("\t field_pic_flag: %d\n", p->pic_fields.bits.field_pic_flag); + va_TraceMsg("\t constrained_intra_pred_flag: %d\n", p->pic_fields.bits.constrained_intra_pred_flag); + va_TraceMsg("frame_num: %d\n", p->frame_num); + + return; +} + +static void va_TraceVASliceParameterBufferH264( + VADisplay dpy, + VAContextID context, + VABufferID buffer, + VABufferType type, + unsigned int size, + unsigned int num_elements, + void *data) +{ + int i; + VASliceParameterBufferH264* p = (VASliceParameterBufferH264*)data; + + va_TraceMsg ("========== SLICE HEADER ============.\n"); + va_TraceMsg("slice_data_size: %d\n", p->slice_data_size); + va_TraceMsg("slice_data_offset: %d\n", p->slice_data_offset); + va_TraceMsg("slice_data_flag: %d\n", p->slice_data_flag); + va_TraceMsg("slice_data_bit_offset: %d\n", p->slice_data_bit_offset); + va_TraceMsg("first_mb_in_slice: %d\n", p->first_mb_in_slice); + va_TraceMsg("slice_type: %d\n", p->slice_type); + va_TraceMsg("direct_spatial_mv_pred_flag: %d\n", p->direct_spatial_mv_pred_flag); + va_TraceMsg("num_ref_idx_l0_active_minus1: %d\n", p->num_ref_idx_l0_active_minus1); + va_TraceMsg("num_ref_idx_l1_active_minus1: %d\n", p->num_ref_idx_l1_active_minus1); + va_TraceMsg("cabac_init_idc: %d\n", p->cabac_init_idc); + va_TraceMsg("slice_qp_delta: %d\n", p->slice_qp_delta); + va_TraceMsg("disable_deblocking_filter_idc: %d\n", p->disable_deblocking_filter_idc); + va_TraceMsg("slice_alpha_c0_offset_div2: %d\n", p->slice_alpha_c0_offset_div2); + va_TraceMsg("slice_beta_offset_div2: %d\n", p->slice_beta_offset_div2); + +#if 1 + if (p->slice_type == 0 || p->slice_type == 1) + { + va_TraceMsg("RefPicList0:\n"); + for (i = 0; i < p->num_ref_idx_l0_active_minus1 + 1; i++) + { + //va_TraceMsg("%d-%d; ", p->RefPicList0[i].TopFieldOrderCnt, p->RefPicList0[i].BottomFieldOrderCnt); + va_TraceMsg("%d-%d-%d-%d; ", p->RefPicList0[i].TopFieldOrderCnt, p->RefPicList0[i].BottomFieldOrderCnt, p->RefPicList0[i].picture_id, p->RefPicList0[i].frame_idx); + } + va_TraceMsg("\n"); + if (p->slice_type == 1) + { + va_TraceMsg("RefPicList1:\n"); + for (i = 0; i < p->num_ref_idx_l1_active_minus1 + 1; i++) + { + //va_TraceMsg("%d-%d; ", p->RefPicList1[i].TopFieldOrderCnt, p->RefPicList1[i].BottomFieldOrderCnt); + va_TraceMsg("%d-%d-%d-%d; ", p->RefPicList1[i].TopFieldOrderCnt, p->RefPicList1[i].BottomFieldOrderCnt, p->RefPicList1[i].picture_id, p->RefPicList1[i].frame_idx); + } + } + va_TraceMsg("\n"); + } +#endif + + va_TraceMsg("luma_log2_weight_denom: %d\n", p->luma_log2_weight_denom); + va_TraceMsg("chroma_log2_weight_denom: %d\n", p->chroma_log2_weight_denom); + va_TraceMsg("luma_weight_l0_flag: %d\n", p->luma_weight_l0_flag); + if (p->luma_weight_l0_flag) + { + for (i = 0; i <= p->num_ref_idx_l0_active_minus1; i++) + { + va_TraceMsg("%d ", p->luma_weight_l0[i]); + va_TraceMsg("%d ", p->luma_offset_l0[i]); + } + va_TraceMsg("\n"); + } + + + va_TraceMsg("chroma_weight_l0_flag: %d\n", p->chroma_weight_l0_flag); + if (p->chroma_weight_l0_flag) + { + for (i = 0; i <= p->num_ref_idx_l0_active_minus1; i++) + { + va_TraceMsg("%d ", p->chroma_weight_l0[i][0]); + va_TraceMsg("%d ", p->chroma_offset_l0[i][0]); + va_TraceMsg("%d ", p->chroma_weight_l0[i][1]); + va_TraceMsg("%d ", p->chroma_offset_l0[i][1]); + } + va_TraceMsg("\n"); + } + va_TraceMsg("luma_weight_l1_flag: %d\n", p->luma_weight_l1_flag); + if (p->luma_weight_l1_flag) + { + for (i = 0; i <= p->num_ref_idx_l1_active_minus1; i++) + { + va_TraceMsg("%d ", p->luma_weight_l1[i]); + va_TraceMsg("%d ", p->luma_offset_l1[i]); + } + va_TraceMsg("\n"); + } + va_TraceMsg("chroma_weight_l1_flag: %d\n", p->chroma_weight_l1_flag); + if (p->chroma_weight_l1_flag) + { + for (i = 0; i <= p->num_ref_idx_l1_active_minus1; i++) + { + va_TraceMsg("%d ", p->chroma_weight_l1[i][0]); + va_TraceMsg("%d ", p->chroma_offset_l1[i][0]); + va_TraceMsg("%d ", p->chroma_weight_l1[i][1]); + va_TraceMsg("%d ", p->chroma_offset_l1[i][1]); + } + va_TraceMsg("\n"); + } +} + +static void va_TraceVAIQMatrixBufferH264( + VADisplay dpy, + VAContextID context, + VABufferID buffer, + VABufferType type, + unsigned int size, + unsigned int num_elements, + void *data +) +{ + va_TraceMsg("========== IQMatrix ============.\n"); + VAIQMatrixBufferH264* p = (VAIQMatrixBufferH264* )data; + int i, j; + for (i = 0; i < 6; i++) + { + for (j = 0; j < 16; j++) + { + va_TraceMsg("%d\t", p->ScalingList4x4[i][j]); + if ((j + 1) % 8 == 0) + va_TraceMsg("\n"); + } + } + + for (i = 0; i < 2; i++) + { + for (j = 0; j < 64; j++) + { + va_TraceMsg("%d\t", p->ScalingList8x8[i][j]); + if ((j + 1) % 8 == 0) + va_TraceMsg("\n"); + } + } +} + +static void va_TraceVAPictureParameterBufferVC1( + VADisplay dpy, + VAContextID context, + VABufferID buffer, + VABufferType type, + unsigned int size, + unsigned int num_elements, + void *data +) +{ + VAPictureParameterBufferVC1* p = (VAPictureParameterBufferVC1*)data; + + va_TraceMsg("\tforward_reference_picture = 0x%08x\n", p->forward_reference_picture); + va_TraceMsg("\tbackward_reference_picture = 0x%08x\n", p->backward_reference_picture); + va_TraceMsg("\tinloop_decoded_picture = 0x%08x\n", p->inloop_decoded_picture); + + va_TraceMsg("\tpulldown = %d\n", p->sequence_fields.bits.pulldown); + va_TraceMsg("\tinterlace = %d\n", p->sequence_fields.bits.interlace); + va_TraceMsg("\ttfcntrflag = %d\n", p->sequence_fields.bits.tfcntrflag); + va_TraceMsg("\tfinterpflag = %d\n", p->sequence_fields.bits.finterpflag); + va_TraceMsg("\tpsf = %d.\n", + p->sequence_fields.bits.psf); + va_TraceMsg("\tmultires = %d.\n", + p->sequence_fields.bits.multires); + va_TraceMsg("\toverlap = %d.\n", + p->sequence_fields.bits.overlap); + va_TraceMsg("\tsyncmarker = %d.\n", + p->sequence_fields.bits.syncmarker); + va_TraceMsg("\trangered = %d.\n", + p->sequence_fields.bits.rangered); + va_TraceMsg("\tmax_b_frames = %d.\n", + p->sequence_fields.bits.max_b_frames); + va_TraceMsg("\tcoded_width = %d.\n", + p->coded_width); + va_TraceMsg("\tcoded_height = %d.\n", + p->coded_height); + va_TraceMsg("\tclosed_entry = %d.\n", + p->entrypoint_fields.bits.closed_entry); + va_TraceMsg("\tbroken_link = %d.\n", + p->entrypoint_fields.bits.broken_link); + va_TraceMsg("\tclosed_entry = %d.\n", + p->entrypoint_fields.bits.closed_entry); + va_TraceMsg("\tpanscan_flag = %d.\n", + p->entrypoint_fields.bits.panscan_flag); + va_TraceMsg("\tloopfilter = %d.\n", + p->entrypoint_fields.bits.loopfilter); + va_TraceMsg("\tconditional_overlap_flag = %d.\n", + p->conditional_overlap_flag); + va_TraceMsg("\tfast_uvmc_flag = %d.\n", + p->fast_uvmc_flag); + va_TraceMsg("\trange_mapping_luma_flag = %d.\n", + p->range_mapping_fields.bits.luma_flag); + va_TraceMsg("\trange_mapping_luma = %d.\n", + p->range_mapping_fields.bits.luma); + va_TraceMsg("\trange_mapping_chroma_flag = %d.\n", + p->range_mapping_fields.bits.chroma_flag); + va_TraceMsg("\trange_mapping_chroma = %d.\n", + p->range_mapping_fields.bits.chroma); + va_TraceMsg("\tb_picture_fraction = %d.\n", + p->b_picture_fraction); + va_TraceMsg("\tcbp_table = %d.\n", + p->cbp_table); + va_TraceMsg("\tmb_mode_table = %d.\n", + p->mb_mode_table); + va_TraceMsg("\trange_reduction_frame = %d.\n", + p->range_reduction_frame); + va_TraceMsg("\trounding_control = %d.\n", + p->rounding_control); + va_TraceMsg("\tpost_processing = %d.\n", + p->post_processing); + va_TraceMsg("\tpicture_resolution_index = %d.\n", + p->picture_resolution_index); + va_TraceMsg("\tluma_scale = %d.\n", + p->luma_scale); + va_TraceMsg("\tluma_shift = %d.\n", + p->luma_shift); + va_TraceMsg("\tpicture_type = %d.\n", + p->picture_fields.bits.picture_type); + va_TraceMsg("\tframe_coding_mode = %d.\n", + p->picture_fields.bits.frame_coding_mode); + va_TraceMsg("\ttop_field_first = %d.\n", + p->picture_fields.bits.top_field_first); + va_TraceMsg("\tis_first_field = %d.\n", + p->picture_fields.bits.is_first_field); + va_TraceMsg("\tintensity_compensation = %d.\n", + p->picture_fields.bits.intensity_compensation); + va_TraceMsg(" ---------------------------------\n"); + va_TraceMsg("\tmv_type_mb = %d.\n", + p->raw_coding.flags.mv_type_mb); + va_TraceMsg("\tdirect_mb = %d.\n", + p->raw_coding.flags.direct_mb); + va_TraceMsg("\tskip_mb = %d.\n", + p->raw_coding.flags.skip_mb); + va_TraceMsg("\tfield_tx = %d.\n", + p->raw_coding.flags.field_tx); + va_TraceMsg("\tforward_mb = %d.\n", + p->raw_coding.flags.forward_mb); + va_TraceMsg("\tac_pred = %d.\n", + p->raw_coding.flags.ac_pred); + va_TraceMsg("\toverflags = %d.\n", + p->raw_coding.flags.overflags); + va_TraceMsg(" ---------------------------------\n"); + va_TraceMsg("\tbp_mv_type_mb = %d.\n", + p->bitplane_present.flags.bp_mv_type_mb); + va_TraceMsg("\tbp_direct_mb = %d.\n", + p->bitplane_present.flags.bp_direct_mb); + va_TraceMsg("\tbp_skip_mb = %d.\n", + p->bitplane_present.flags.bp_skip_mb); + va_TraceMsg("\tbp_field_tx = %d.\n", + p->bitplane_present.flags.bp_field_tx); + va_TraceMsg("\tbp_forward_mb = %d.\n", + p->bitplane_present.flags.bp_forward_mb); + va_TraceMsg("\tbp_ac_pred = %d.\n", + p->bitplane_present.flags.bp_ac_pred); + va_TraceMsg("\tbp_overflags = %d.\n", + p->bitplane_present.flags.bp_overflags); + va_TraceMsg(" ---------------------------------\n"); + va_TraceMsg("\treference_distance_flag = %d.\n", + p->reference_fields.bits.reference_distance_flag); + va_TraceMsg("\treference_distance = %d.\n", + p->reference_fields.bits.reference_distance); + va_TraceMsg("\tnum_reference_pictures = %d.\n", + p->reference_fields.bits.num_reference_pictures); + va_TraceMsg("\treference_field_pic_indicator = %d.\n", + p->reference_fields.bits.reference_field_pic_indicator); + va_TraceMsg("\tmv_mode = %d.\n", + p->mv_fields.bits.mv_mode); + va_TraceMsg("\tmv_mode2 = %d.\n", + p->mv_fields.bits.mv_mode2); + va_TraceMsg("\tmv_table = %d.\n", + p->mv_fields.bits.mv_table); + va_TraceMsg("\ttwo_mv_block_pattern_table = %d.\n", + p->mv_fields.bits.two_mv_block_pattern_table); + va_TraceMsg("\tfour_mv_switch = %d.\n", + p->mv_fields.bits.four_mv_switch); + va_TraceMsg("\tfour_mv_block_pattern_table = %d.\n", + p->mv_fields.bits.four_mv_block_pattern_table); + va_TraceMsg("\textended_mv_flag = %d.\n", + p->mv_fields.bits.extended_mv_flag); + va_TraceMsg("\textended_mv_range = %d.\n", + p->mv_fields.bits.extended_mv_range); + va_TraceMsg("\textended_dmv_flag = %d.\n", + p->mv_fields.bits.extended_dmv_flag); + va_TraceMsg("\textended_dmv_range = %d.\n", + p->mv_fields.bits.extended_dmv_range); + va_TraceMsg("\tdquant = %d.\n", + p->pic_quantizer_fields.bits.dquant); + va_TraceMsg("\tquantizer = %d.\n", + p->pic_quantizer_fields.bits.quantizer); + va_TraceMsg("\thalf_qp = %d.\n", + p->pic_quantizer_fields.bits.half_qp); + va_TraceMsg("\tpic_quantizer_scale = %d.\n", + p->pic_quantizer_fields.bits.pic_quantizer_scale); + va_TraceMsg("\tpic_quantizer_type = %d.\n", + p->pic_quantizer_fields.bits.pic_quantizer_type); + va_TraceMsg("\tdq_frame = %d.\n", + p->pic_quantizer_fields.bits.dq_frame); + va_TraceMsg("\tdq_profile = %d.\n", + p->pic_quantizer_fields.bits.dq_profile); + va_TraceMsg("\tdq_sb_edge = %d.\n", + p->pic_quantizer_fields.bits.dq_sb_edge); + va_TraceMsg("\tdq_db_edge = %d.\n", + p->pic_quantizer_fields.bits.dq_db_edge); + va_TraceMsg("\tdq_binary_level = %d.\n", + p->pic_quantizer_fields.bits.dq_binary_level); + va_TraceMsg("\talt_pic_quantizer = %d.\n", + p->pic_quantizer_fields.bits.alt_pic_quantizer); + va_TraceMsg("\tvariable_sized_transform_flag = %d.\n", + p->transform_fields.bits.variable_sized_transform_flag); + va_TraceMsg("\tmb_level_transform_type_flag = %d.\n", + p->transform_fields.bits.mb_level_transform_type_flag); + va_TraceMsg("\tframe_level_transform_type = %d.\n", + p->transform_fields.bits.frame_level_transform_type); + va_TraceMsg("\ttransform_ac_codingset_idx1 = %d.\n", + p->transform_fields.bits.transform_ac_codingset_idx1); + va_TraceMsg("\ttransform_ac_codingset_idx2 = %d.\n", + p->transform_fields.bits.transform_ac_codingset_idx2); + va_TraceMsg("\tintra_transform_dc_table = %d.\n", + p->transform_fields.bits.intra_transform_dc_table); +} + +static void va_TraceVASliceParameterBufferVC1( + VADisplay dpy, + VAContextID context, + VABufferID buffer, + VABufferType type, + unsigned int size, + unsigned int num_elements, + void* data +) +{ + VASliceParameterBufferVC1 *p = (VASliceParameterBufferVC1*)data; + + va_TraceMsg ("========== SLICE NUMBER ==========\n"); + va_TraceMsg (" slice_data_size = %d\n", p->slice_data_size); + va_TraceMsg (" slice_data_offset = %d\n", p->slice_data_offset); + va_TraceMsg (" slice_data_flag = %d\n", p->slice_data_flag); + va_TraceMsg (" macroblock_offset = %d\n", p->macroblock_offset); + va_TraceMsg (" slice_vertical_position = %d\n", p->slice_vertical_position); +} + +int va_TraceBeginPicture( + VADisplay dpy, + VAContextID context, + VASurfaceID render_target +) +{ + int i; + + va_TraceMsg("\tcontext = 0x%08x\n", context); + va_TraceMsg("\t\trender_targets = 0x%08x\n", render_target); + + trace_rendertarget = render_target; /* for surface data dump after vaEndPicture */ + + trace_frame++; + trace_slice = 0; +} + +VAStatus vaBufferInfo ( + VADisplay dpy, + VAContextID context, /* in */ + VABufferID buf_id, /* in */ + VABufferType *type, /* out */ + unsigned int *size, /* out */ + unsigned int *num_elements /* out */ +); + +static int va_TraceMPEG2Buf( + VADisplay dpy, + VAContextID context, + VABufferID buffer, + VABufferType type, + unsigned int size, + unsigned int num_elements, + void *pbuf +) +{ + switch (type) { + case VAPictureParameterBufferType: + va_TraceVAPictureParameterBufferMPEG2(dpy, context, buffer, type, size, num_elements, pbuf); + break; + case VAIQMatrixBufferType: + va_TraceVAIQMatrixBufferMPEG2(dpy, context, buffer, type, size, num_elements, pbuf); + break; + case VABitPlaneBufferType: + break; + case VASliceGroupMapBufferType: + break; + case VASliceParameterBufferType: + trace_slice++; + va_TraceVASliceParameterBufferMPEG2(dpy, context, buffer, type, size, num_elements, pbuf); + break; + case VASliceDataBufferType: + va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf); + break; + case VAMacroblockParameterBufferType: + break; + case VAResidualDataBufferType: + break; + case VADeblockingParameterBufferType: + break; + case VAImageBufferType: + break; + case VAProtectedSliceDataBufferType: + break; + case VAEncCodedBufferType: + break; + case VAEncSequenceParameterBufferType: + break; + case VAEncPictureParameterBufferType: + break; + case VAEncSliceParameterBufferType: + break; + case VAEncH264VUIBufferType: + break; + case VAEncH264SEIBufferType: + break; + } + + return 0; +} + + +static int va_TraceMPEG4Buf( + VADisplay dpy, + VAContextID context, + VABufferID buffer, + VABufferType type, + unsigned int size, + unsigned int num_elements, + void *pbuf +) +{ + switch (type) { + case VAPictureParameterBufferType: + va_TraceVAPictureParameterBufferMPEG4(dpy, context, buffer, type, size, num_elements, pbuf); + break; + case VAIQMatrixBufferType: + va_TraceVAIQMatrixBufferMPEG4(dpy, context, buffer, type, size, num_elements, pbuf); + break; + case VABitPlaneBufferType: + break; + case VASliceGroupMapBufferType: + break; + case VASliceParameterBufferType: + va_TraceVASliceParameterBufferMPEG4(dpy, context, buffer, type, size, num_elements, pbuf); + break; + case VASliceDataBufferType: + va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf); + break; + case VAMacroblockParameterBufferType: + break; + case VAResidualDataBufferType: + break; + case VADeblockingParameterBufferType: + break; + case VAImageBufferType: + break; + case VAProtectedSliceDataBufferType: + va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf); + break; + case VAEncCodedBufferType: + break; + case VAEncSequenceParameterBufferType: + break; + case VAEncPictureParameterBufferType: + break; + case VAEncSliceParameterBufferType: + break; + case VAEncH264VUIBufferType: + break; + case VAEncH264SEIBufferType: + break; + default: + break; + } + + + return 0; +} + + +static int va_TraceH264Buf( + VADisplay dpy, + VAContextID context, + VABufferID buffer, + VABufferType type, + unsigned int size, + unsigned int num_elements, + void *pbuf +) +{ + switch (type) { + case VAPictureParameterBufferType: + va_TraceVAPictureParameterBufferMPEG2(dpy, context, buffer, type, size, num_elements, pbuf); + break; + case VAIQMatrixBufferType: + va_TraceVAIQMatrixBufferH264(dpy, context, buffer, type, size, num_elements, pbuf); + break; + case VABitPlaneBufferType: + break; + case VASliceGroupMapBufferType: + break; + case VASliceParameterBufferType: + va_TraceVASliceParameterBufferH264(dpy, context, buffer, type, size, num_elements, pbuf); + break; + case VASliceDataBufferType: + va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf); + break; + case VAMacroblockParameterBufferType: + break; + case VAResidualDataBufferType: + break; + case VADeblockingParameterBufferType: + break; + case VAImageBufferType: + break; + case VAProtectedSliceDataBufferType: + va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf); + break; + case VAEncCodedBufferType: + break; + case VAEncSequenceParameterBufferType: + break; + case VAEncPictureParameterBufferType: + break; + case VAEncSliceParameterBufferType: + break; + case VAEncH264VUIBufferType: + break; + case VAEncH264SEIBufferType: + break; + default: + break; + } + + + return 0; +} + + +static int va_TraceVC1Buf( + VADisplay dpy, + VAContextID context, + VABufferID buffer, + VABufferType type, + unsigned int size, + unsigned int num_elements, + void *pbuf +) +{ + switch (type) { + case VAPictureParameterBufferType: + va_TraceVAPictureParameterBufferVC1(dpy, context, buffer, type, size, num_elements, pbuf); + break; + case VAIQMatrixBufferType: + break; + case VABitPlaneBufferType: + va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf); + break; + case VASliceGroupMapBufferType: + break; + case VASliceParameterBufferType: + va_TraceVASliceParameterBufferVC1(dpy, context, buffer, type, size, num_elements, pbuf); + break; + case VASliceDataBufferType: + va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf); + break; + case VAMacroblockParameterBufferType: + break; + case VAResidualDataBufferType: + break; + case VADeblockingParameterBufferType: + break; + case VAImageBufferType: + break; + case VAProtectedSliceDataBufferType: + va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf); + break; + case VAEncCodedBufferType: + break; + case VAEncSequenceParameterBufferType: + break; + case VAEncPictureParameterBufferType: + break; + case VAEncSliceParameterBufferType: + break; + case VAEncH264VUIBufferType: + break; + case VAEncH264SEIBufferType: + break; + default: + break; + } + + return 0; +} + +int va_TraceRenderPicture( + VADisplay dpy, + VAContextID context, + VABufferID *buffers, + int num_buffers +) +{ + VABufferType type; + unsigned int size; + unsigned int num_elements; + int i; + + va_TraceMsg("\tcontext = 0x%08x\n", context); + va_TraceMsg("\tnum_buffers = %d\n", num_buffers); + for (i = 0; i < num_buffers; i++) { + void *pbuf; + + /* get buffer type information */ + vaBufferInfo(dpy, context, buffers[i], &type, &size, &num_elements); + + va_TraceMsg("\t\tbuffers[%d] = 0x%08x\n", i, buffers[i]); + va_TraceMsg("\t\t\ttype = %s\n", buffer_type_to_string(type)); + va_TraceMsg("\t\t\tsize = %d\n", size); + va_TraceMsg("\t\t\tnum_elements = %d\n", num_elements); + + + vaMapBuffer(dpy, buffers[i], &pbuf); + + switch (trace_profile) { + case VAProfileMPEG2Simple: + case VAProfileMPEG2Main: + va_TraceMPEG2Buf(dpy, context, buffers[i], type, size, num_elements, pbuf); + break; + case VAProfileMPEG4Simple: + case VAProfileMPEG4AdvancedSimple: + case VAProfileMPEG4Main: + va_TraceMPEG4Buf(dpy, context, buffers[i], type, size, num_elements, pbuf); + break; + case VAProfileH264Baseline: + case VAProfileH264Main: + case VAProfileH264High: + va_TraceH264Buf(dpy, context, buffers[i], type, size, num_elements, pbuf); + break; + case VAProfileVC1Simple: + case VAProfileVC1Main: + case VAProfileVC1Advanced: + va_TraceVC1Buf(dpy, context, buffers[i], type, size, num_elements, pbuf); + break; + case VAProfileH263Baseline: + break; + } + + vaUnmapBuffer(dpy, buffers[i]); + } +} + + +int va_TraceEndPicture( + VADisplay dpy, + VAContextID context +) +{ + int i, j; + unsigned int fourcc; /* following are output argument */ + unsigned int luma_stride; + unsigned int chroma_u_stride; + unsigned int chroma_v_stride; + unsigned int luma_offset; + unsigned int chroma_u_offset; + unsigned int chroma_v_offset; + unsigned int buffer_name; + void *buffer; + char *Y_data, *UV_data, *tmp; + + VAStatus va_status; + + va_TraceMsg("\tcontext = 0x%08x\n", context); + va_TraceMsg("\t\trender_targets = 0x%08x\n", trace_rendertarget); + + /* force the pipleline finish rendering */ + vaSyncSurface(dpy, trace_rendertarget); + + va_TraceMsg("***dump surface data***\n", trace_rendertarget); + + va_status = vaLockSurface(dpy, trace_rendertarget, &fourcc, &luma_stride, &chroma_u_stride, &chroma_v_stride, + &luma_offset, &chroma_u_offset, &chroma_v_offset, &buffer_name, &buffer); + + if (va_status != VA_STATUS_SUCCESS) + return va_status; + + va_TraceMsg("\tfourcc=0x%08x\n", fourcc); + va_TraceMsg("\twidth=%d\n", trace_width); + va_TraceMsg("\theight=%d\n", trace_height); + va_TraceMsg("\tluma_stride=%d\n", luma_stride); + va_TraceMsg("\tchroma_u_stride=%d\n", chroma_u_stride); + va_TraceMsg("\tchroma_v_stride=%d\n", chroma_v_stride); + va_TraceMsg("\tluma_offset=%d\n", luma_offset); + va_TraceMsg("\tchroma_u_offset=%d\n", chroma_u_offset); + va_TraceMsg("\tchroma_v_offset=%d\n", chroma_v_offset); + + if (!buffer) + return; + + Y_data = buffer; + UV_data = buffer + luma_offset; + + tmp = Y_data; + va_TraceMsg("**Y data**\n"); + for (i=0; i (major) || \ + (VA_MAJOR_VERSION == (major) && VA_MINOR_VERSION > (minor)) || \ + (VA_MAJOR_VERSION == (major) && VA_MINOR_VERSION == (minor) && VA_MICRO_VERSION >= (micro))) + +#endif /* VA_VERSION_H */ diff -Nru libva-1.0.1/va/va_x11.h libva-1.0.1-3+0.31.1/va/va_x11.h --- libva-1.0.1/va/va_x11.h 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/va/va_x11.h 2010-03-08 11:52:42.000000000 +0000 @@ -0,0 +1,47 @@ +#ifndef _VA_X11_H_ +#define _VA_X11_H_ + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Returns a suitable VADisplay for VA API + */ +VADisplay vaGetDisplay ( + Display *dpy +); + +/* + * Output rendering + * Following is the rendering interface for X windows, + * to get the decode output surface to a X drawable + * It basically performs a de-interlacing (if needed), + * color space conversion and scaling to the destination + * rectangle + */ +VAStatus vaPutSurface ( + VADisplay dpy, + VASurfaceID surface, + Drawable draw, /* X Drawable */ + short srcx, + short srcy, + unsigned short srcw, + unsigned short srch, + short destx, + short desty, + unsigned short destw, + unsigned short desth, + VARectangle *cliprects, /* client supplied destination clip list */ + unsigned int number_cliprects, /* number of clip rects in the clip list */ + unsigned int flags /* PutSurface flags */ +); + +#ifdef __cplusplus +} +#endif + +#endif /* _VA_X11_H_ */ diff -Nru libva-1.0.1/va/x11/dri1_util.c libva-1.0.1-3+0.31.1/va/x11/dri1_util.c --- libva-1.0.1/va/x11/dri1_util.c 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/va/x11/dri1_util.c 2010-06-01 10:57:37.000000000 +0000 @@ -0,0 +1,157 @@ +#include +#include +#include +#include +#include + +#include + +#include "X11/Xlib.h" +#include "va.h" +#include "va_backend.h" + +#include "va_dri.h" +#include "va_dricommon.h" + +struct dri1_drawable +{ + struct dri_drawable base; + union dri_buffer buffer; + int width; + int height; +}; + +static struct dri_drawable * +dri1CreateDrawable(VADriverContextP ctx, XID x_drawable) +{ + struct dri1_drawable *dri1_drawable; + + dri1_drawable = calloc(1, sizeof(*dri1_drawable)); + + if (!dri1_drawable) + return NULL; + + dri1_drawable->base.x_drawable = x_drawable; + + return &dri1_drawable->base; +} + +static void +dri1DestroyDrawable(VADriverContextP ctx, struct dri_drawable *dri_drawable) +{ + free(dri_drawable); +} + +static void +dri1SwapBuffer(VADriverContextP ctx, struct dri_drawable *dri_drawable) +{ + +} + +static union dri_buffer * +dri1GetRenderingBuffer(VADriverContextP ctx, struct dri_drawable *dri_drawable) +{ + struct dri1_drawable *dri1_drawable = (struct dri1_drawable *)dri_drawable; + + return &dri1_drawable->buffer; +} + +static void +dri1Close(VADriverContextP ctx) +{ + struct dri_state *dri_state = (struct dri_state *)ctx->dri_state; + + free_drawable_hashtable(ctx); + VA_DRIDestroyContext((Display *)ctx->native_dpy, ctx->x11_screen, dri_state->hwContextID); + assert(dri_state->pSAREA != MAP_FAILED); + drmUnmap(dri_state->pSAREA, SAREA_MAX); + assert(dri_state->fd >= 0); + drmCloseOnce(dri_state->fd); + VA_DRICloseConnection((Display *)ctx->native_dpy, ctx->x11_screen); +} + +Bool +isDRI1Connected(VADriverContextP ctx, char **driver_name) +{ + struct dri_state *dri_state = (struct dri_state *)ctx->dri_state; + int direct_capable; + int driver_major; + int driver_minor; + int driver_patch; + int newlyopened; + char *BusID; + drm_magic_t magic; + + *driver_name = NULL; + dri_state->fd = -1; + dri_state->pSAREA = MAP_FAILED; + dri_state->driConnectedFlag = VA_NONE; + + if (!VA_DRIQueryDirectRenderingCapable((Display *)ctx->native_dpy, + ctx->x11_screen, + &direct_capable)) + goto err_out0; + + if (!direct_capable) + goto err_out0; + + if (!VA_DRIGetClientDriverName((Display *)ctx->native_dpy, ctx->x11_screen, + &driver_major, &driver_minor, + &driver_patch, driver_name)) + goto err_out0; + + if (!VA_DRIOpenConnection((Display *)ctx->native_dpy, ctx->x11_screen, + &dri_state->hSAREA, &BusID)) + goto err_out0; + + + dri_state->fd = drmOpenOnce(NULL, BusID, &newlyopened); + XFree(BusID); + + if (dri_state->fd < 0) + goto err_out1; + + + if (drmGetMagic(dri_state->fd, &magic)) + goto err_out1; + + if (newlyopened && !VA_DRIAuthConnection((Display *)ctx->native_dpy, ctx->x11_screen, magic)) + goto err_out1; + + if (drmMap(dri_state->fd, dri_state->hSAREA, SAREA_MAX, &dri_state->pSAREA)) + goto err_out1; + + if (!VA_DRICreateContext((Display *)ctx->native_dpy, ctx->x11_screen, + DefaultVisual((Display *)ctx->native_dpy, ctx->x11_screen), + &dri_state->hwContextID, &dri_state->hwContext)) + goto err_out1; + + dri_state->driConnectedFlag = VA_DRI1; + dri_state->createDrawable = dri1CreateDrawable; + dri_state->destroyDrawable = dri1DestroyDrawable; + dri_state->swapBuffer = dri1SwapBuffer; + dri_state->getRenderingBuffer = dri1GetRenderingBuffer; + dri_state->close = dri1Close; + + return True; + +err_out1: + if (dri_state->pSAREA != MAP_FAILED) + drmUnmap(dri_state->pSAREA, SAREA_MAX); + + if (dri_state->fd >= 0) + drmCloseOnce(dri_state->fd); + + VA_DRICloseConnection((Display *)ctx->native_dpy, ctx->x11_screen); + +err_out0: + if (*driver_name) + XFree(*driver_name); + + dri_state->pSAREA = MAP_FAILED; + dri_state->fd = -1; + *driver_name = NULL; + + return False; +} + diff -Nru libva-1.0.1/va/x11/dri2_util.c libva-1.0.1-3+0.31.1/va/x11/dri2_util.c --- libva-1.0.1/va/x11/dri2_util.c 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/va/x11/dri2_util.c 2010-07-07 12:20:30.000000000 +0000 @@ -0,0 +1,212 @@ +#include +#include +#include +#include + +#include + +#include +#include +#include "va.h" +#include "va_backend.h" + +#include "va_dri2.h" +#include "va_dri2tokens.h" +#include "va_dricommon.h" + +#define __DRI_BUFFER_FRONT_LEFT 0 +#define __DRI_BUFFER_BACK_LEFT 1 +#define __DRI_BUFFER_FRONT_RIGHT 2 +#define __DRI_BUFFER_BACK_RIGHT 3 +#define __DRI_BUFFER_DEPTH 4 +#define __DRI_BUFFER_STENCIL 5 +#define __DRI_BUFFER_ACCUM 6 +#define __DRI_BUFFER_FAKE_FRONT_LEFT 7 +#define __DRI_BUFFER_FAKE_FRONT_RIGHT 8 + +struct dri2_drawable +{ + struct dri_drawable base; + union dri_buffer buffers[5]; + int width; + int height; + int has_backbuffer; + int back_index; + int front_index; +}; + +static int gsDRI2SwapAvailable; + +static struct dri_drawable * +dri2CreateDrawable(VADriverContextP ctx, XID x_drawable) +{ + struct dri2_drawable *dri2_drawable; + + dri2_drawable = calloc(1, sizeof(*dri2_drawable)); + + if (!dri2_drawable) + return NULL; + + dri2_drawable->base.x_drawable = x_drawable; + dri2_drawable->base.x = 0; + dri2_drawable->base.y = 0; + VA_DRI2CreateDrawable((Display *)ctx->native_dpy, x_drawable); + + return &dri2_drawable->base; +} + +static void +dri2DestroyDrawable(VADriverContextP ctx, struct dri_drawable *dri_drawable) +{ + VA_DRI2DestroyDrawable((Display *)ctx->native_dpy, dri_drawable->x_drawable); + free(dri_drawable); +} + +static void +dri2SwapBuffer(VADriverContextP ctx, struct dri_drawable *dri_drawable) +{ + struct dri2_drawable *dri2_drawable = (struct dri2_drawable *)dri_drawable; + XRectangle xrect; + XserverRegion region; + + if (dri2_drawable->has_backbuffer) { + if (gsDRI2SwapAvailable) { + CARD64 ret; + VA_DRI2SwapBuffers(ctx->native_dpy, dri_drawable->x_drawable, 0, 0, + 0, &ret); + } else { + xrect.x = 0; + xrect.y = 0; + xrect.width = dri2_drawable->width; + xrect.height = dri2_drawable->height; + + region = XFixesCreateRegion(ctx->native_dpy, &xrect, 1); + VA_DRI2CopyRegion(ctx->native_dpy, dri_drawable->x_drawable, region, + DRI2BufferFrontLeft, DRI2BufferBackLeft); + XFixesDestroyRegion(ctx->native_dpy, region); + } + } +} + +static union dri_buffer * +dri2GetRenderingBuffer(VADriverContextP ctx, struct dri_drawable *dri_drawable) +{ + struct dri2_drawable *dri2_drawable = (struct dri2_drawable *)dri_drawable; + int i; + int count; + unsigned int attachments[5]; + VA_DRI2Buffer *buffers; + + i = 0; + if (dri_drawable->is_window) + attachments[i++] = __DRI_BUFFER_BACK_LEFT; + else + attachments[i++] = __DRI_BUFFER_FRONT_LEFT; + + buffers = VA_DRI2GetBuffers(ctx->native_dpy, dri_drawable->x_drawable, + &dri2_drawable->width, &dri2_drawable->height, + attachments, i, &count); + assert(buffers); + if (buffers == NULL) + return NULL; + + dri2_drawable->has_backbuffer = 0; + + for (i = 0; i < count; i++) { + dri2_drawable->buffers[i].dri2.attachment = buffers[i].attachment; + dri2_drawable->buffers[i].dri2.name = buffers[i].name; + dri2_drawable->buffers[i].dri2.pitch = buffers[i].pitch; + dri2_drawable->buffers[i].dri2.cpp = buffers[i].cpp; + dri2_drawable->buffers[i].dri2.flags = buffers[i].flags; + + if (buffers[i].attachment == __DRI_BUFFER_BACK_LEFT) { + dri2_drawable->has_backbuffer = 1; + dri2_drawable->back_index = i; + } + + if (buffers[i].attachment == __DRI_BUFFER_FRONT_LEFT) + dri2_drawable->front_index = i; + } + + dri_drawable->width = dri2_drawable->width; + dri_drawable->height = dri2_drawable->height; + Xfree(buffers); + + if (dri2_drawable->has_backbuffer) + return &dri2_drawable->buffers[dri2_drawable->back_index]; + + return &dri2_drawable->buffers[dri2_drawable->front_index]; +} + +static void +dri2Close(VADriverContextP ctx) +{ + struct dri_state *dri_state = (struct dri_state *)ctx->dri_state; + + free_drawable_hashtable(ctx); + assert(dri_state->fd >= 0); + close(dri_state->fd); +} + +Bool +isDRI2Connected(VADriverContextP ctx, char **driver_name) +{ + struct dri_state *dri_state = (struct dri_state *)ctx->dri_state; + int major, minor; + int error_base; + int event_base; + char *device_name = NULL; + drm_magic_t magic; + *driver_name = NULL; + dri_state->fd = -1; + dri_state->driConnectedFlag = VA_NONE; + if (!VA_DRI2QueryExtension((Display *)ctx->native_dpy, &event_base, &error_base)) + goto err_out; + + if (!VA_DRI2QueryVersion((Display *)ctx->native_dpy, &major, &minor)) + goto err_out; + + + if (!VA_DRI2Connect((Display *)ctx->native_dpy, RootWindow((Display *)ctx->native_dpy, ctx->x11_screen), + driver_name, &device_name)) + goto err_out; + + dri_state->fd = open(device_name, O_RDWR); + assert(dri_state->fd >= 0); + + if (dri_state->fd < 0) + goto err_out; + + if (drmGetMagic(dri_state->fd, &magic)) + goto err_out; + + if (!VA_DRI2Authenticate((Display *)ctx->native_dpy, RootWindow((Display *)ctx->native_dpy, ctx->x11_screen), + magic)) + goto err_out; + + dri_state->driConnectedFlag = VA_DRI2; + dri_state->createDrawable = dri2CreateDrawable; + dri_state->destroyDrawable = dri2DestroyDrawable; + dri_state->swapBuffer = dri2SwapBuffer; + dri_state->getRenderingBuffer = dri2GetRenderingBuffer; + dri_state->close = dri2Close; + gsDRI2SwapAvailable = (minor >= 2); + + return True; + +err_out: + if (device_name) + Xfree(device_name); + + if (*driver_name) + Xfree(*driver_name); + + if (dri_state->fd >= 0) + close(dri_state->fd); + + *driver_name = NULL; + dri_state->fd = -1; + + return False; +} + diff -Nru libva-1.0.1/va/x11/Makefile.am libva-1.0.1-3+0.31.1/va/x11/Makefile.am --- libva-1.0.1/va/x11/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/va/x11/Makefile.am 2010-04-06 06:06:26.000000000 +0000 @@ -0,0 +1,30 @@ +# INTEL CONFIDENTIAL +# Copyright 2007 Intel Corporation. All Rights Reserved. +# +# The source code contained or described herein and all documents related to +# the source code ("Material") are owned by Intel Corporation or its suppliers +# or licensors. Title to the Material remains with Intel Corporation or its +# suppliers and licensors. The Material may contain trade secrets and +# proprietary and confidential information of Intel Corporation and its +# suppliers and licensors, and is protected by worldwide copyright and trade +# secret laws and treaty provisions. No part of the Material may be used, +# copied, reproduced, modified, published, uploaded, posted, transmitted, +# distributed, or disclosed in any way without Intel's prior express written +# permission. +# +# No license under any patent, copyright, trade secret or other intellectual +# property right is granted to or conferred upon you by disclosure or delivery +# of the Materials, either expressly, by implication, inducement, estoppel or +# otherwise. Any license under such intellectual property rights must be +# express and approved by Intel in writing. + +AM_CFLAGS = -DLINUX -I$(top_srcdir)/va $(DRM_CFLAGS) + +noinst_LTLIBRARIES = libva_x11.la + +libva_x11includedir = ${includedir}/va +libva_x11include_HEADERS = va_dri.h va_dri2.h va_dricommon.h + +libva_x11_la_SOURCES = va_x11.c va_dri.c va_dri2.c va_dricommon.c dri2_util.c dri1_util.c va_nvctrl.c + +EXTRA_DIST = va_dristr.h va_dri2str.h va_dri2tokens.h va_nvctrl.h diff -Nru libva-1.0.1/va/x11/va_dri2.c libva-1.0.1-3+0.31.1/va/x11/va_dri2.c --- libva-1.0.1/va/x11/va_dri2.c 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/va/x11/va_dri2.c 2010-07-07 12:20:30.000000000 +0000 @@ -0,0 +1,349 @@ +/* + * Copyright © 2008 Red Hat, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Soft- + * ware"), to deal in the Software without restriction, including without + * limitation the rights to use, copy, modify, merge, publish, distribute, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, provided that the above copyright + * notice(s) and this permission notice appear in all copies of the Soft- + * ware and that both the above copyright notice(s) and this permission + * notice appear in supporting documentation. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- + * ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY + * RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN + * THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSE- + * QUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFOR- + * MANCE OF THIS SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder shall + * not be used in advertising or otherwise to promote the sale, use or + * other dealings in this Software without prior written authorization of + * the copyright holder. + * + * Authors: + * Kristian Høgsberg (krh@redhat.com) + */ + + +#define NEED_REPLIES +#include +#include +#include +#include "xf86drm.h" +#include "va_dri2.h" +#include "va_dri2str.h" +#include "va_dri2tokens.h" + +#ifndef DRI2DriverDRI +#define DRI2DriverDRI 0 +#endif + +static char va_dri2ExtensionName[] = DRI2_NAME; +static XExtensionInfo _va_dri2_info_data; +static XExtensionInfo *va_dri2Info = &_va_dri2_info_data; +static XEXT_GENERATE_CLOSE_DISPLAY (VA_DRI2CloseDisplay, va_dri2Info) +static /* const */ XExtensionHooks va_dri2ExtensionHooks = { + NULL, /* create_gc */ + NULL, /* copy_gc */ + NULL, /* flush_gc */ + NULL, /* free_gc */ + NULL, /* create_font */ + NULL, /* free_font */ + VA_DRI2CloseDisplay, /* close_display */ + NULL, /* wire_to_event */ + NULL, /* event_to_wire */ + NULL, /* error */ + NULL, /* error_string */ +}; + +static XEXT_GENERATE_FIND_DISPLAY (DRI2FindDisplay, va_dri2Info, + va_dri2ExtensionName, + &va_dri2ExtensionHooks, + 0, NULL) + +Bool VA_DRI2QueryExtension(Display *dpy, int *eventBase, int *errorBase) +{ + XExtDisplayInfo *info = DRI2FindDisplay(dpy); + + if (XextHasExtension(info)) { + *eventBase = info->codes->first_event; + *errorBase = info->codes->first_error; + return True; + } + + return False; +} + +Bool VA_DRI2QueryVersion(Display *dpy, int *major, int *minor) +{ + XExtDisplayInfo *info = DRI2FindDisplay (dpy); + xDRI2QueryVersionReply rep; + xDRI2QueryVersionReq *req; + + XextCheckExtension (dpy, info, va_dri2ExtensionName, False); + + LockDisplay(dpy); + GetReq(DRI2QueryVersion, req); + req->reqType = info->codes->major_opcode; + req->dri2ReqType = X_DRI2QueryVersion; + req->majorVersion = DRI2_MAJOR; + req->minorVersion = DRI2_MINOR; + if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { + UnlockDisplay(dpy); + SyncHandle(); + return False; + } + *major = rep.majorVersion; + *minor = rep.minorVersion; + UnlockDisplay(dpy); + SyncHandle(); + + return True; +} + +Bool VA_DRI2Connect(Display *dpy, XID window, + char **driverName, char **deviceName) +{ + XExtDisplayInfo *info = DRI2FindDisplay(dpy); + xDRI2ConnectReply rep; + xDRI2ConnectReq *req; + + XextCheckExtension (dpy, info, va_dri2ExtensionName, False); + + LockDisplay(dpy); + GetReq(DRI2Connect, req); + req->reqType = info->codes->major_opcode; + req->dri2ReqType = X_DRI2Connect; + req->window = window; + req->driverType = DRI2DriverDRI; + if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { + UnlockDisplay(dpy); + SyncHandle(); + return False; + } + + if (rep.driverNameLength == 0 && rep.deviceNameLength == 0) { + UnlockDisplay(dpy); + SyncHandle(); + return False; + } + + *driverName = Xmalloc(rep.driverNameLength + 1); + if (*driverName == NULL) { + _XEatData(dpy, + ((rep.driverNameLength + 3) & ~3) + + ((rep.deviceNameLength + 3) & ~3)); + UnlockDisplay(dpy); + SyncHandle(); + return False; + } + _XReadPad(dpy, *driverName, rep.driverNameLength); + (*driverName)[rep.driverNameLength] = '\0'; + + *deviceName = Xmalloc(rep.deviceNameLength + 1); + if (*deviceName == NULL) { + Xfree(*driverName); + _XEatData(dpy, ((rep.deviceNameLength + 3) & ~3)); + UnlockDisplay(dpy); + SyncHandle(); + return False; + } + _XReadPad(dpy, *deviceName, rep.deviceNameLength); + (*deviceName)[rep.deviceNameLength] = '\0'; + + UnlockDisplay(dpy); + SyncHandle(); + + return True; +} + +Bool VA_DRI2Authenticate(Display *dpy, XID window, drm_magic_t magic) +{ + XExtDisplayInfo *info = DRI2FindDisplay(dpy); + xDRI2AuthenticateReq *req; + xDRI2AuthenticateReply rep; + + XextCheckExtension (dpy, info, va_dri2ExtensionName, False); + + LockDisplay(dpy); + GetReq(DRI2Authenticate, req); + req->reqType = info->codes->major_opcode; + req->dri2ReqType = X_DRI2Authenticate; + req->window = window; + req->magic = magic; + + if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { + UnlockDisplay(dpy); + SyncHandle(); + return False; + } + + UnlockDisplay(dpy); + SyncHandle(); + + return rep.authenticated; +} + +void VA_DRI2CreateDrawable(Display *dpy, XID drawable) +{ + XExtDisplayInfo *info = DRI2FindDisplay(dpy); + xDRI2CreateDrawableReq *req; + + XextSimpleCheckExtension (dpy, info, va_dri2ExtensionName); + + LockDisplay(dpy); + GetReq(DRI2CreateDrawable, req); + req->reqType = info->codes->major_opcode; + req->dri2ReqType = X_DRI2CreateDrawable; + req->drawable = drawable; + UnlockDisplay(dpy); + SyncHandle(); +} + +void VA_DRI2DestroyDrawable(Display *dpy, XID drawable) +{ + XExtDisplayInfo *info = DRI2FindDisplay(dpy); + xDRI2DestroyDrawableReq *req; + + XextSimpleCheckExtension (dpy, info, va_dri2ExtensionName); + + XSync(dpy, False); + + LockDisplay(dpy); + GetReq(DRI2DestroyDrawable, req); + req->reqType = info->codes->major_opcode; + req->dri2ReqType = X_DRI2DestroyDrawable; + req->drawable = drawable; + UnlockDisplay(dpy); + SyncHandle(); +} + +VA_DRI2Buffer *VA_DRI2GetBuffers(Display *dpy, XID drawable, + int *width, int *height, + unsigned int *attachments, int count, + int *outCount) +{ + XExtDisplayInfo *info = DRI2FindDisplay(dpy); + xDRI2GetBuffersReply rep; + xDRI2GetBuffersReq *req; + VA_DRI2Buffer *buffers; + xDRI2Buffer repBuffer; + CARD32 *p; + int i; + + XextCheckExtension (dpy, info, va_dri2ExtensionName, False); + + LockDisplay(dpy); + GetReqExtra(DRI2GetBuffers, count * 4, req); + req->reqType = info->codes->major_opcode; + req->dri2ReqType = X_DRI2GetBuffers; + req->drawable = drawable; + req->count = count; + p = (CARD32 *) &req[1]; + for (i = 0; i < count; i++) + p[i] = attachments[i]; + + if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { + UnlockDisplay(dpy); + SyncHandle(); + return NULL; + } + + *width = rep.width; + *height = rep.height; + *outCount = rep.count; + + buffers = Xmalloc(rep.count * sizeof buffers[0]); + if (buffers == NULL) { + _XEatData(dpy, rep.count * sizeof repBuffer); + UnlockDisplay(dpy); + SyncHandle(); + return NULL; + } + + for (i = 0; i < rep.count; i++) { + _XReadPad(dpy, (char *) &repBuffer, sizeof repBuffer); + buffers[i].attachment = repBuffer.attachment; + buffers[i].name = repBuffer.name; + buffers[i].pitch = repBuffer.pitch; + buffers[i].cpp = repBuffer.cpp; + buffers[i].flags = repBuffer.flags; + } + + UnlockDisplay(dpy); + SyncHandle(); + + return buffers; +} + +void VA_DRI2CopyRegion(Display *dpy, XID drawable, XserverRegion region, + CARD32 dest, CARD32 src) +{ + XExtDisplayInfo *info = DRI2FindDisplay(dpy); + xDRI2CopyRegionReq *req; + xDRI2CopyRegionReply rep; + + XextSimpleCheckExtension (dpy, info, va_dri2ExtensionName); + + LockDisplay(dpy); + GetReq(DRI2CopyRegion, req); + req->reqType = info->codes->major_opcode; + req->dri2ReqType = X_DRI2CopyRegion; + req->drawable = drawable; + req->region = region; + req->dest = dest; + req->src = src; + + _XReply(dpy, (xReply *)&rep, 0, xFalse); + + UnlockDisplay(dpy); + SyncHandle(); +} + +static void +load_swap_req(xDRI2SwapBuffersReq *req, CARD64 target, CARD64 divisor, + CARD64 remainder) +{ + req->target_msc_hi = target >> 32; + req->target_msc_lo = target & 0xffffffff; + req->divisor_hi = divisor >> 32; + req->divisor_lo = divisor & 0xffffffff; + req->remainder_hi = remainder >> 32; + req->remainder_lo = remainder & 0xffffffff; +} + +static CARD64 +vals_to_card64(CARD32 lo, CARD32 hi) +{ + return (CARD64)hi << 32 | lo; +} + +void VA_DRI2SwapBuffers(Display *dpy, XID drawable, CARD64 target_msc, + CARD64 divisor, CARD64 remainder, CARD64 *count) +{ + XExtDisplayInfo *info = DRI2FindDisplay(dpy); + xDRI2SwapBuffersReq *req; + xDRI2SwapBuffersReply rep; + + XextSimpleCheckExtension (dpy, info, va_dri2ExtensionName); + + LockDisplay(dpy); + GetReq(DRI2SwapBuffers, req); + req->reqType = info->codes->major_opcode; + req->dri2ReqType = X_DRI2SwapBuffers; + req->drawable = drawable; + load_swap_req(req, target_msc, divisor, remainder); + + _XReply(dpy, (xReply *)&rep, 0, xFalse); + + *count = vals_to_card64(rep.swap_lo, rep.swap_hi); + + UnlockDisplay(dpy); + SyncHandle(); +} diff -Nru libva-1.0.1/va/x11/va_dri2.h libva-1.0.1-3+0.31.1/va/x11/va_dri2.h --- libva-1.0.1/va/x11/va_dri2.h 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/va/x11/va_dri2.h 2010-07-07 12:20:30.000000000 +0000 @@ -0,0 +1,73 @@ +/* + * Copyright © 2007,2008 Red Hat, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Soft- + * ware"), to deal in the Software without restriction, including without + * limitation the rights to use, copy, modify, merge, publish, distribute, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, provided that the above copyright + * notice(s) and this permission notice appear in all copies of the Soft- + * ware and that both the above copyright notice(s) and this permission + * notice appear in supporting documentation. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- + * ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY + * RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN + * THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSE- + * QUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFOR- + * MANCE OF THIS SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder shall + * not be used in advertising or otherwise to promote the sale, use or + * other dealings in this Software without prior written authorization of + * the copyright holder. + * + * Authors: + * Kristian Høgsberg (krh@redhat.com) + */ + +#ifndef _VA_DRI2_H_ +#define _VA_DRI2_H_ + +#include +#include +#include +#include + +typedef struct { + unsigned int attachment; + unsigned int name; + unsigned int pitch; + unsigned int cpp; + unsigned int flags; +} VA_DRI2Buffer; + +extern Bool +VA_DRI2QueryExtension(Display *display, int *eventBase, int *errorBase); +extern Bool +VA_DRI2QueryVersion(Display *display, int *major, int *minor); +extern Bool +VA_DRI2Connect(Display *display, XID window, + char **driverName, char **deviceName); +extern Bool +VA_DRI2Authenticate(Display *display, XID window, drm_magic_t magic); +extern void +VA_DRI2CreateDrawable(Display *display, XID drawable); +extern void +VA_DRI2DestroyDrawable(Display *display, XID handle); +extern VA_DRI2Buffer * +VA_DRI2GetBuffers(Display *dpy, XID drawable, + int *width, int *height, + unsigned int *attachments, int count, + int *outCount); +extern void +VA_DRI2CopyRegion(Display *dpy, XID drawable, XserverRegion region, + CARD32 dest, CARD32 src); +extern void +VA_DRI2SwapBuffers(Display *dpy, XID drawable, CARD64 target_msc, CARD64 divisor, + CARD64 remainder, CARD64 *count); +#endif diff -Nru libva-1.0.1/va/x11/va_dri2str.h libva-1.0.1-3+0.31.1/va/x11/va_dri2str.h --- libva-1.0.1/va/x11/va_dri2str.h 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/va/x11/va_dri2str.h 2010-07-07 12:20:30.000000000 +0000 @@ -0,0 +1,227 @@ +/* + * Copyright © 2008 Red Hat, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Soft- + * ware"), to deal in the Software without restriction, including without + * limitation the rights to use, copy, modify, merge, publish, distribute, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, provided that the above copyright + * notice(s) and this permission notice appear in all copies of the Soft- + * ware and that both the above copyright notice(s) and this permission + * notice appear in supporting documentation. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- + * ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY + * RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN + * THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSE- + * QUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFOR- + * MANCE OF THIS SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder shall + * not be used in advertising or otherwise to promote the sale, use or + * other dealings in this Software without prior written authorization of + * the copyright holder. + * + * Authors: + * Kristian Høgsberg (krh@redhat.com) + */ + +#ifndef _DRI2_PROTO_H_ +#define _DRI2_PROTO_H_ + +#define DRI2_NAME "DRI2" +#define DRI2_MAJOR 1 +#define DRI2_MINOR 2 + +#define DRI2NumberErrors 0 +#define DRI2NumberEvents 2 +#define DRI2NumberRequests 13 + +#define X_DRI2QueryVersion 0 +#define X_DRI2Connect 1 +#define X_DRI2Authenticate 2 +#define X_DRI2CreateDrawable 3 +#define X_DRI2DestroyDrawable 4 +#define X_DRI2GetBuffers 5 +#define X_DRI2CopyRegion 6 +#define X_DRI2GetBuffersWithFormat 7 +#define X_DRI2SwapBuffers 8 +#define X_DRI2GetMSC 9 +#define X_DRI2WaitMSC 10 +#define X_DRI2WaitSBC 11 +#define X_DRI2SwapInterval 12 + +typedef struct { + CARD32 attachment B32; + CARD32 name B32; + CARD32 pitch B32; + CARD32 cpp B32; + CARD32 flags B32; +} xDRI2Buffer; + +typedef struct { + CARD8 reqType; + CARD8 dri2ReqType; + CARD16 length B16; + CARD32 majorVersion B32; + CARD32 minorVersion B32; +} xDRI2QueryVersionReq; +#define sz_xDRI2QueryVersionReq 12 + +typedef struct { + BYTE type; /* X_Reply */ + BYTE pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 majorVersion B32; + CARD32 minorVersion B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; +} xDRI2QueryVersionReply; +#define sz_xDRI2QueryVersionReply 32 + +typedef struct { + CARD8 reqType; + CARD8 dri2ReqType; + CARD16 length B16; + CARD32 window B32; + CARD32 driverType B32; +} xDRI2ConnectReq; +#define sz_xDRI2ConnectReq 12 + +typedef struct { + BYTE type; /* X_Reply */ + BYTE pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 driverNameLength B32; + CARD32 deviceNameLength B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; +} xDRI2ConnectReply; +#define sz_xDRI2ConnectReply 32 + +typedef struct { + CARD8 reqType; + CARD8 dri2ReqType; + CARD16 length B16; + CARD32 window B32; + CARD32 magic B32; +} xDRI2AuthenticateReq; +#define sz_xDRI2AuthenticateReq 12 + +typedef struct { + BYTE type; /* X_Reply */ + BYTE pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 authenticated B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xDRI2AuthenticateReply; +#define sz_xDRI2AuthenticateReply 32 + +typedef struct { + CARD8 reqType; + CARD8 dri2ReqType; + CARD16 length B16; + CARD32 drawable B32; +} xDRI2CreateDrawableReq; +#define sz_xDRI2CreateDrawableReq 8 + +typedef struct { + CARD8 reqType; + CARD8 dri2ReqType; + CARD16 length B16; + CARD32 drawable B32; +} xDRI2DestroyDrawableReq; +#define sz_xDRI2DestroyDrawableReq 8 + +typedef struct { + CARD8 reqType; + CARD8 dri2ReqType; + CARD16 length B16; + CARD32 drawable B32; + CARD32 count B32; +} xDRI2GetBuffersReq; +#define sz_xDRI2GetBuffersReq 12 + +typedef struct { + BYTE type; /* X_Reply */ + BYTE pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 width B32; + CARD32 height B32; + CARD32 count B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; +} xDRI2GetBuffersReply; +#define sz_xDRI2GetBuffersReply 32 + +typedef struct { + CARD8 reqType; + CARD8 dri2ReqType; + CARD16 length B16; + CARD32 drawable B32; + CARD32 region B32; + CARD32 dest B32; + CARD32 src B32; +} xDRI2CopyRegionReq; +#define sz_xDRI2CopyRegionReq 20 + +typedef struct { + BYTE type; /* X_Reply */ + BYTE pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; + CARD32 pad7 B32; +} xDRI2CopyRegionReply; +#define sz_xDRI2CopyRegionReply 32 + +typedef struct { + CARD8 reqType; + CARD8 dri2ReqType; + CARD16 length B16; + CARD32 drawable B32; + CARD32 target_msc_hi B32; + CARD32 target_msc_lo B32; + CARD32 divisor_hi B32; + CARD32 divisor_lo B32; + CARD32 remainder_hi B32; + CARD32 remainder_lo B32; +} xDRI2SwapBuffersReq; +#define sz_xDRI2SwapBuffersReq 32 + +typedef struct { + BYTE type; /* X_Reply */ + BYTE pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 swap_hi B32; + CARD32 swap_lo B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; +} xDRI2SwapBuffersReply; +#define sz_xDRI2SwapBuffersReply 32 + +#endif diff -Nru libva-1.0.1/va/x11/va_dri2tokens.h libva-1.0.1-3+0.31.1/va/x11/va_dri2tokens.h --- libva-1.0.1/va/x11/va_dri2tokens.h 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/va/x11/va_dri2tokens.h 2010-03-08 11:52:42.000000000 +0000 @@ -0,0 +1,48 @@ +/* + * Copyright © 2008 Red Hat, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Soft- + * ware"), to deal in the Software without restriction, including without + * limitation the rights to use, copy, modify, merge, publish, distribute, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, provided that the above copyright + * notice(s) and this permission notice appear in all copies of the Soft- + * ware and that both the above copyright notice(s) and this permission + * notice appear in supporting documentation. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- + * ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY + * RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN + * THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSE- + * QUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFOR- + * MANCE OF THIS SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder shall + * not be used in advertising or otherwise to promote the sale, use or + * other dealings in this Software without prior written authorization of + * the copyright holder. + * + * Authors: + * Kristian Høgsberg (krh@redhat.com) + */ + +#ifndef _DRI2_TOKENS_H_ +#define _DRI2_TOKENS_H_ + +#define DRI2BufferFrontLeft 0 +#define DRI2BufferBackLeft 1 +#define DRI2BufferFrontRight 2 +#define DRI2BufferBackRight 3 +#define DRI2BufferDepth 4 +#define DRI2BufferStencil 5 +#define DRI2BufferAccum 6 +#define DRI2BufferFakeFrontLeft 7 +#define DRI2BufferFakeFrontRight 8 + +#define DRI2DriverDRI 0 + +#endif diff -Nru libva-1.0.1/va/x11/va_dri.c libva-1.0.1-3+0.31.1/va/x11/va_dri.c --- libva-1.0.1/va/x11/va_dri.c 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/va/x11/va_dri.c 2010-03-08 11:52:42.000000000 +0000 @@ -0,0 +1,624 @@ +/* $XFree86: xc/lib/GL/dri/XF86dri.c,v 1.13 2002/10/30 12:51:25 alanh Exp $ */ +/************************************************************************** + +Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. +Copyright 2000 VA Linux Systems, Inc. +Copyright 2007 Intel Corporation +All Rights Reserved. + +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, sub license, 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 (including the +next paragraph) 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 NON-INFRINGEMENT. +IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +/* + * Authors: + * Kevin E. Martin + * Jens Owen + * Rickard E. (Rik) Faith + * + */ + +/* THIS IS NOT AN X CONSORTIUM STANDARD */ + +#define NEED_REPLIES +#include +#include +#include +#include "va_dristr.h" + +#define PUBLIC + +static XExtensionInfo _va_dri_info_data; +static XExtensionInfo *va_dri_info = &_va_dri_info_data; +static char va_dri_extension_name[] = VA_DRINAME; + +#define VA_DRICheckExtension(dpy,i,val) \ + XextCheckExtension (dpy, i, va_dri_extension_name, val) + +/***************************************************************************** + * * + * private utility routines * + * * + *****************************************************************************/ + +static int close_display(Display *dpy, XExtCodes *extCodes); +static /* const */ XExtensionHooks va_dri_extension_hooks = { + NULL, /* create_gc */ + NULL, /* copy_gc */ + NULL, /* flush_gc */ + NULL, /* free_gc */ + NULL, /* create_font */ + NULL, /* free_font */ + close_display, /* close_display */ + NULL, /* wire_to_event */ + NULL, /* event_to_wire */ + NULL, /* error */ + NULL, /* error_string */ +}; + +static XEXT_GENERATE_FIND_DISPLAY (find_display, va_dri_info, + va_dri_extension_name, + &va_dri_extension_hooks, + 0, NULL) + +static XEXT_GENERATE_CLOSE_DISPLAY (close_display, va_dri_info) + + +/***************************************************************************** + * * + * public XFree86-DRI Extension routines * + * * + *****************************************************************************/ + +#if 0 +#include +#define TRACE(msg) fprintf(stderr,"XF86DRI%s\n", msg); +#else +#define TRACE(msg) +#endif + + +PUBLIC Bool VA_DRIQueryExtension (dpy, event_basep, error_basep) + Display *dpy; + int *event_basep, *error_basep; +{ + XExtDisplayInfo *info = find_display (dpy); + + TRACE("QueryExtension..."); + if (XextHasExtension(info)) { + *event_basep = info->codes->first_event; + *error_basep = info->codes->first_error; + TRACE("QueryExtension... return True"); + return True; + } else { + TRACE("QueryExtension... return False"); + return False; + } +} + +PUBLIC Bool VA_DRIQueryVersion(dpy, majorVersion, minorVersion, patchVersion) + Display* dpy; + int* majorVersion; + int* minorVersion; + int* patchVersion; +{ + XExtDisplayInfo *info = find_display (dpy); + xVA_DRIQueryVersionReply rep; + xVA_DRIQueryVersionReq *req; + + TRACE("QueryVersion..."); + VA_DRICheckExtension (dpy, info, False); + + LockDisplay(dpy); + GetReq(VA_DRIQueryVersion, req); + req->reqType = info->codes->major_opcode; + req->driReqType = X_VA_DRIQueryVersion; + if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { + UnlockDisplay(dpy); + SyncHandle(); + TRACE("QueryVersion... return False"); + return False; + } + *majorVersion = rep.majorVersion; + *minorVersion = rep.minorVersion; + *patchVersion = rep.patchVersion; + UnlockDisplay(dpy); + SyncHandle(); + TRACE("QueryVersion... return True"); + return True; +} + +PUBLIC Bool VA_DRIQueryDirectRenderingCapable(dpy, screen, isCapable) + Display* dpy; + int screen; + Bool* isCapable; +{ + XExtDisplayInfo *info = find_display (dpy); + xVA_DRIQueryDirectRenderingCapableReply rep; + xVA_DRIQueryDirectRenderingCapableReq *req; + + TRACE("QueryDirectRenderingCapable..."); + VA_DRICheckExtension (dpy, info, False); + + LockDisplay(dpy); + GetReq(VA_DRIQueryDirectRenderingCapable, req); + req->reqType = info->codes->major_opcode; + req->driReqType = X_VA_DRIQueryDirectRenderingCapable; + req->screen = screen; + if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { + UnlockDisplay(dpy); + SyncHandle(); + TRACE("QueryDirectRenderingCapable... return False"); + return False; + } + *isCapable = rep.isCapable; + UnlockDisplay(dpy); + SyncHandle(); + TRACE("QueryDirectRenderingCapable... return True"); + return True; +} + +PUBLIC Bool VA_DRIOpenConnection(dpy, screen, hSAREA, busIdString) + Display* dpy; + int screen; + drm_handle_t * hSAREA; + char **busIdString; +{ + XExtDisplayInfo *info = find_display (dpy); + xVA_DRIOpenConnectionReply rep; + xVA_DRIOpenConnectionReq *req; + + TRACE("OpenConnection..."); + VA_DRICheckExtension (dpy, info, False); + + LockDisplay(dpy); + GetReq(VA_DRIOpenConnection, req); + req->reqType = info->codes->major_opcode; + req->driReqType = X_VA_DRIOpenConnection; + req->screen = screen; + if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { + UnlockDisplay(dpy); + SyncHandle(); + TRACE("OpenConnection... return False"); + return False; + } + + *hSAREA = rep.hSAREALow; + if (sizeof(drm_handle_t) == 8) { + int shift = 32; /* var to prevent warning on next line */ + *hSAREA |= ((drm_handle_t) rep.hSAREAHigh) << shift; + } + + if (rep.length) { + if (!(*busIdString = (char *)Xcalloc(rep.busIdStringLength + 1, 1))) { + _XEatData(dpy, ((rep.busIdStringLength+3) & ~3)); + UnlockDisplay(dpy); + SyncHandle(); + TRACE("OpenConnection... return False"); + return False; + } + _XReadPad(dpy, *busIdString, rep.busIdStringLength); + } else { + *busIdString = NULL; + } + UnlockDisplay(dpy); + SyncHandle(); + TRACE("OpenConnection... return True"); + return True; +} + +PUBLIC Bool VA_DRIAuthConnection(dpy, screen, magic) + Display* dpy; + int screen; + drm_magic_t magic; +{ + XExtDisplayInfo *info = find_display (dpy); + xVA_DRIAuthConnectionReq *req; + xVA_DRIAuthConnectionReply rep; + + TRACE("AuthConnection..."); + VA_DRICheckExtension (dpy, info, False); + + LockDisplay(dpy); + GetReq(VA_DRIAuthConnection, req); + req->reqType = info->codes->major_opcode; + req->driReqType = X_VA_DRIAuthConnection; + req->screen = screen; + req->magic = magic; + rep.authenticated = 0; + if (!_XReply(dpy, (xReply *)&rep, 0, xFalse) || !rep.authenticated) { + UnlockDisplay(dpy); + SyncHandle(); + TRACE("AuthConnection... return False"); + return False; + } + UnlockDisplay(dpy); + SyncHandle(); + TRACE("AuthConnection... return True"); + return True; +} + +PUBLIC Bool VA_DRICloseConnection(dpy, screen) + Display* dpy; + int screen; +{ + XExtDisplayInfo *info = find_display (dpy); + xVA_DRICloseConnectionReq *req; + + TRACE("CloseConnection..."); + + VA_DRICheckExtension (dpy, info, False); + + LockDisplay(dpy); + GetReq(VA_DRICloseConnection, req); + req->reqType = info->codes->major_opcode; + req->driReqType = X_VA_DRICloseConnection; + req->screen = screen; + UnlockDisplay(dpy); + SyncHandle(); + TRACE("CloseConnection... return True"); + return True; +} + +PUBLIC Bool VA_DRIGetClientDriverName(dpy, screen, ddxDriverMajorVersion, + ddxDriverMinorVersion, ddxDriverPatchVersion, clientDriverName) + Display* dpy; + int screen; + int* ddxDriverMajorVersion; + int* ddxDriverMinorVersion; + int* ddxDriverPatchVersion; + char** clientDriverName; +{ + XExtDisplayInfo *info = find_display (dpy); + xVA_DRIGetClientDriverNameReply rep; + xVA_DRIGetClientDriverNameReq *req; + + TRACE("GetClientDriverName..."); + VA_DRICheckExtension (dpy, info, False); + + LockDisplay(dpy); + GetReq(VA_DRIGetClientDriverName, req); + req->reqType = info->codes->major_opcode; + req->driReqType = X_VA_DRIGetClientDriverName; + req->screen = screen; + if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { + UnlockDisplay(dpy); + SyncHandle(); + TRACE("GetClientDriverName... return False"); + return False; + } + + *ddxDriverMajorVersion = rep.ddxDriverMajorVersion; + *ddxDriverMinorVersion = rep.ddxDriverMinorVersion; + *ddxDriverPatchVersion = rep.ddxDriverPatchVersion; + + if (rep.length) { + if (!(*clientDriverName = (char *)Xcalloc(rep.clientDriverNameLength + 1, 1))) { + _XEatData(dpy, ((rep.clientDriverNameLength+3) & ~3)); + UnlockDisplay(dpy); + SyncHandle(); + TRACE("GetClientDriverName... return False"); + return False; + } + _XReadPad(dpy, *clientDriverName, rep.clientDriverNameLength); + } else { + *clientDriverName = NULL; + } + UnlockDisplay(dpy); + SyncHandle(); + TRACE("GetClientDriverName... return True"); + return True; +} + +PUBLIC Bool VA_DRICreateContextWithConfig(dpy, screen, configID, context, + hHWContext) + Display* dpy; + int screen; + int configID; + XID* context; + drm_context_t * hHWContext; +{ + XExtDisplayInfo *info = find_display (dpy); + xVA_DRICreateContextReply rep; + xVA_DRICreateContextReq *req; + + TRACE("CreateContext..."); + VA_DRICheckExtension (dpy, info, False); + + LockDisplay(dpy); + GetReq(VA_DRICreateContext, req); + req->reqType = info->codes->major_opcode; + req->driReqType = X_VA_DRICreateContext; + req->visual = configID; + req->screen = screen; + *context = XAllocID(dpy); + req->context = *context; + if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { + UnlockDisplay(dpy); + SyncHandle(); + TRACE("CreateContext... return False"); + return False; + } + *hHWContext = rep.hHWContext; + UnlockDisplay(dpy); + SyncHandle(); + TRACE("CreateContext... return True"); + return True; +} + +PUBLIC Bool VA_DRICreateContext(dpy, screen, visual, context, hHWContext) + Display* dpy; + int screen; + Visual* visual; + XID* context; + drm_context_t * hHWContext; +{ + return VA_DRICreateContextWithConfig( dpy, screen, visual->visualid, + context, hHWContext ); +} + +PUBLIC Bool VA_DRIDestroyContext( __DRInativeDisplay * ndpy, int screen, + __DRIid context ) +{ + Display * const dpy = (Display *) ndpy; + XExtDisplayInfo *info = find_display (dpy); + xVA_DRIDestroyContextReq *req; + + TRACE("DestroyContext..."); + VA_DRICheckExtension (dpy, info, False); + + LockDisplay(dpy); + GetReq(VA_DRIDestroyContext, req); + req->reqType = info->codes->major_opcode; + req->driReqType = X_VA_DRIDestroyContext; + req->screen = screen; + req->context = context; + UnlockDisplay(dpy); + SyncHandle(); + TRACE("DestroyContext... return True"); + return True; +} + +PUBLIC Bool VA_DRICreateDrawable( __DRInativeDisplay * ndpy, int screen, + __DRIid drawable, drm_drawable_t * hHWDrawable ) +{ + Display * const dpy = (Display *) ndpy; + XExtDisplayInfo *info = find_display (dpy); + xVA_DRICreateDrawableReply rep; + xVA_DRICreateDrawableReq *req; + + TRACE("CreateDrawable..."); + VA_DRICheckExtension (dpy, info, False); + + LockDisplay(dpy); + GetReq(VA_DRICreateDrawable, req); + req->reqType = info->codes->major_opcode; + req->driReqType = X_VA_DRICreateDrawable; + req->screen = screen; + req->drawable = drawable; + if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { + UnlockDisplay(dpy); + SyncHandle(); + TRACE("CreateDrawable... return False"); + return False; + } + *hHWDrawable = rep.hHWDrawable; + UnlockDisplay(dpy); + SyncHandle(); + TRACE("CreateDrawable... return True"); + return True; +} + +PUBLIC Bool VA_DRIDestroyDrawable( __DRInativeDisplay * ndpy, int screen, + __DRIid drawable ) +{ + Display * const dpy = (Display *) ndpy; + XExtDisplayInfo *info = find_display (dpy); + xVA_DRIDestroyDrawableReq *req; + + TRACE("DestroyDrawable..."); + VA_DRICheckExtension (dpy, info, False); + + LockDisplay(dpy); + GetReq(VA_DRIDestroyDrawable, req); + req->reqType = info->codes->major_opcode; + req->driReqType = X_VA_DRIDestroyDrawable; + req->screen = screen; + req->drawable = drawable; + UnlockDisplay(dpy); + SyncHandle(); + TRACE("DestroyDrawable... return True"); + return True; +} + +PUBLIC Bool VA_DRIGetDrawableInfo(Display* dpy, int screen, Drawable drawable, + unsigned int* index, unsigned int* stamp, + int* X, int* Y, int* W, int* H, + int* numClipRects, drm_clip_rect_t ** pClipRects, + int* backX, int* backY, + int* numBackClipRects, drm_clip_rect_t ** pBackClipRects ) +{ + XExtDisplayInfo *info = find_display (dpy); + xVA_DRIGetDrawableInfoReply rep; + xVA_DRIGetDrawableInfoReq *req; + int total_rects; + + TRACE("GetDrawableInfo..."); + VA_DRICheckExtension (dpy, info, False); + + LockDisplay(dpy); + GetReq(VA_DRIGetDrawableInfo, req); + req->reqType = info->codes->major_opcode; + req->driReqType = X_VA_DRIGetDrawableInfo; + req->screen = screen; + req->drawable = drawable; + + if (!_XReply(dpy, (xReply *)&rep, 1, xFalse)) + { + UnlockDisplay(dpy); + SyncHandle(); + TRACE("GetDrawableInfo... return False"); + return False; + } + *index = rep.drawableTableIndex; + *stamp = rep.drawableTableStamp; + *X = (int)rep.drawableX; + *Y = (int)rep.drawableY; + *W = (int)rep.drawableWidth; + *H = (int)rep.drawableHeight; + *numClipRects = rep.numClipRects; + total_rects = *numClipRects; + + *backX = rep.backX; + *backY = rep.backY; + *numBackClipRects = rep.numBackClipRects; + total_rects += *numBackClipRects; + +#if 0 + /* Because of the fix in Xserver/GL/dri/xf86dri.c, this check breaks + * backwards compatibility (Because of the >> 2 shift) but the fix + * enables multi-threaded apps to work. + */ + if (rep.length != ((((SIZEOF(xVA_DRIGetDrawableInfoReply) - + SIZEOF(xGenericReply) + + total_rects * sizeof(drm_clip_rect_t)) + 3) & ~3) >> 2)) { + _XEatData(dpy, rep.length); + UnlockDisplay(dpy); + SyncHandle(); + TRACE("GetDrawableInfo... return False"); + return False; + } +#endif + + if (*numClipRects) { + int len = sizeof(drm_clip_rect_t) * (*numClipRects); + + *pClipRects = (drm_clip_rect_t *)Xcalloc(len, 1); + if (*pClipRects) + _XRead(dpy, (char*)*pClipRects, len); + } else { + *pClipRects = NULL; + } + + if (*numBackClipRects) { + int len = sizeof(drm_clip_rect_t) * (*numBackClipRects); + + *pBackClipRects = (drm_clip_rect_t *)Xcalloc(len, 1); + if (*pBackClipRects) + _XRead(dpy, (char*)*pBackClipRects, len); + } else { + *pBackClipRects = NULL; + } + + UnlockDisplay(dpy); + SyncHandle(); + TRACE("GetDrawableInfo... return True"); + return True; +} + +PUBLIC Bool VA_DRIGetDeviceInfo(dpy, screen, hFrameBuffer, + fbOrigin, fbSize, fbStride, devPrivateSize, pDevPrivate) + Display* dpy; + int screen; + drm_handle_t * hFrameBuffer; + int* fbOrigin; + int* fbSize; + int* fbStride; + int* devPrivateSize; + void** pDevPrivate; +{ + XExtDisplayInfo *info = find_display (dpy); + xVA_DRIGetDeviceInfoReply rep; + xVA_DRIGetDeviceInfoReq *req; + + TRACE("GetDeviceInfo..."); + VA_DRICheckExtension (dpy, info, False); + + LockDisplay(dpy); + GetReq(VA_DRIGetDeviceInfo, req); + req->reqType = info->codes->major_opcode; + req->driReqType = X_VA_DRIGetDeviceInfo; + req->screen = screen; + if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { + UnlockDisplay(dpy); + SyncHandle(); + TRACE("GetDeviceInfo... return False"); + return False; + } + + *hFrameBuffer = rep.hFrameBufferLow; + if (sizeof(drm_handle_t) == 8) { + int shift = 32; /* var to prevent warning on next line */ + *hFrameBuffer |= ((drm_handle_t) rep.hFrameBufferHigh) << shift; + } + + *fbOrigin = rep.framebufferOrigin; + *fbSize = rep.framebufferSize; + *fbStride = rep.framebufferStride; + *devPrivateSize = rep.devPrivateSize; + + if (rep.length) { + if (!(*pDevPrivate = (void *)Xcalloc(rep.devPrivateSize, 1))) { + _XEatData(dpy, ((rep.devPrivateSize+3) & ~3)); + UnlockDisplay(dpy); + SyncHandle(); + TRACE("GetDeviceInfo... return False"); + return False; + } + _XRead(dpy, (char*)*pDevPrivate, rep.devPrivateSize); + } else { + *pDevPrivate = NULL; + } + + UnlockDisplay(dpy); + SyncHandle(); + TRACE("GetDeviceInfo... return True"); + return True; +} + +PUBLIC Bool VA_DRIOpenFullScreen(dpy, screen, drawable) + Display* dpy; + int screen; + Drawable drawable; +{ + /* This function and the underlying X protocol are deprecated. + */ + (void) dpy; + (void) screen; + (void) drawable; + return False; +} + +PUBLIC Bool VA_DRICloseFullScreen(dpy, screen, drawable) + Display* dpy; + int screen; + Drawable drawable; +{ + /* This function and the underlying X protocol are deprecated. + */ + (void) dpy; + (void) screen; + (void) drawable; + return True; +} + +#undef TRACE + diff -Nru libva-1.0.1/va/x11/va_dricommon.c libva-1.0.1-3+0.31.1/va/x11/va_dricommon.c --- libva-1.0.1/va/x11/va_dricommon.c 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/va/x11/va_dricommon.c 2010-07-07 12:20:30.000000000 +0000 @@ -0,0 +1,98 @@ +#include "va_dricommon.h" + +// X error trap +static int x11_error_code = 0; +static int (*old_error_handler)(Display *, XErrorEvent *); + +static int +error_handler(Display *dpy, XErrorEvent *error) +{ + x11_error_code = error->error_code; + return 0; +} + +static void +x11_trap_errors(void) +{ + x11_error_code = 0; + old_error_handler = XSetErrorHandler(error_handler); +} + +static int +x11_untrap_errors(void) +{ + XSetErrorHandler(old_error_handler); + return x11_error_code; +} + +static int +is_window(Display *dpy, Drawable drawable) +{ + XWindowAttributes wattr; + + x11_trap_errors(); + XGetWindowAttributes(dpy, drawable, &wattr); + return x11_untrap_errors() == 0; +} + +static struct dri_drawable * +do_drawable_hash(VADriverContextP ctx, XID drawable) +{ + struct dri_state *dri_state = (struct dri_state *)ctx->dri_state; + int index = drawable % DRAWABLE_HASH_SZ; + struct dri_drawable *dri_drawable = dri_state->drawable_hash[index]; + + while (dri_drawable) { + if (dri_drawable->x_drawable == drawable) + return dri_drawable; + dri_drawable = dri_drawable->next; + } + + dri_drawable = dri_state->createDrawable(ctx, drawable); + dri_drawable->x_drawable = drawable; + dri_drawable->is_window = is_window((Display *)ctx->native_dpy, drawable); + dri_drawable->next = dri_state->drawable_hash[index]; + dri_state->drawable_hash[index] = dri_drawable; + + return dri_drawable; +} + +void +free_drawable_hashtable(VADriverContextP ctx) +{ + struct dri_state *dri_state = (struct dri_state *)ctx->dri_state; + int i; + struct dri_drawable *dri_drawable, *prev; + + for (i = 0; i < DRAWABLE_HASH_SZ; i++) { + dri_drawable = dri_state->drawable_hash[i]; + + while (dri_drawable) { + prev = dri_drawable; + dri_drawable = prev->next; + dri_state->destroyDrawable(ctx, prev); + } + } +} + +struct dri_drawable * +dri_get_drawable(VADriverContextP ctx, XID drawable) +{ + return do_drawable_hash(ctx, drawable); +} + +void +dri_swap_buffer(VADriverContextP ctx, struct dri_drawable *dri_drawable) +{ + struct dri_state *dri_state = (struct dri_state *)ctx->dri_state; + + dri_state->swapBuffer(ctx, dri_drawable); +} + +union dri_buffer * +dri_get_rendering_buffer(VADriverContextP ctx, struct dri_drawable *dri_drawable) +{ + struct dri_state *dri_state = (struct dri_state *)ctx->dri_state; + + return dri_state->getRenderingBuffer(ctx, dri_drawable); +} diff -Nru libva-1.0.1/va/x11/va_dricommon.h libva-1.0.1-3+0.31.1/va/x11/va_dricommon.h --- libva-1.0.1/va/x11/va_dricommon.h 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/va/x11/va_dricommon.h 2010-07-07 12:20:30.000000000 +0000 @@ -0,0 +1,78 @@ +#ifndef _VA_DRICOMMON_H_ +#define _VA_DRICOMMON_H_ + +#ifndef ANDROID +#include +#include +#include +#include +#endif + +#include + +#ifdef ANDROID +#define XID unsigned int +#define Bool int +#endif + +enum +{ + VA_NONE = 0, + VA_DRI1 = 1, + VA_DRI2 = 2, + VA_DUMMY = 3 +}; + +union dri_buffer +{ + struct { + unsigned int attachment; + unsigned int name; + unsigned int pitch; + unsigned int cpp; + unsigned int flags; + } dri2; + + struct { + } dri1; +}; + +struct dri_drawable +{ + XID x_drawable; + int is_window; + int x; + int y; + unsigned int width; + unsigned int height; + struct dri_drawable *next; +}; + +#define DRAWABLE_HASH_SZ 32 +struct dri_state +{ + int fd; + int driConnectedFlag; /* 0: disconnected, 1: DRI, 2: DRI2 */ +#ifndef ANDROID + drm_handle_t hSAREA; + drm_context_t hwContext; + drmAddress pSAREA; + XID hwContextID; + struct dri_drawable *drawable_hash[DRAWABLE_HASH_SZ]; + + struct dri_drawable *(*createDrawable)(VADriverContextP ctx, XID x_drawable); + void (*destroyDrawable)(VADriverContextP ctx, struct dri_drawable *dri_drawable); + void (*swapBuffer)(VADriverContextP ctx, struct dri_drawable *dri_drawable); + union dri_buffer *(*getRenderingBuffer)(VADriverContextP ctx, struct dri_drawable *dri_drawable); + void (*close)(VADriverContextP ctx); +#endif +}; + +Bool isDRI2Connected(VADriverContextP ctx, char **driver_name); +Bool isDRI1Connected(VADriverContextP ctx, char **driver_name); +void free_drawable_hashtable(VADriverContextP ctx); +struct dri_drawable *dri_get_drawable(VADriverContextP ctx, XID drawable); +void dri_swap_buffer(VADriverContextP ctx, struct dri_drawable *dri_drawable); +union dri_buffer *dri_get_rendering_buffer(VADriverContextP ctx, struct dri_drawable *dri_drawable); + +#endif /* _VA_DRICOMMON_H_ */ diff -Nru libva-1.0.1/va/x11/va_dri.h libva-1.0.1-3+0.31.1/va/x11/va_dri.h --- libva-1.0.1/va/x11/va_dri.h 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/va/x11/va_dri.h 2010-03-08 11:52:42.000000000 +0000 @@ -0,0 +1,120 @@ +/* $XFree86: xc/lib/GL/dri/xf86dri.h,v 1.8 2002/10/30 12:51:25 alanh Exp $ */ +/************************************************************************** + +Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. +Copyright 2000 VA Linux Systems, Inc. +Copyright 2007 Intel Corporation +All Rights Reserved. + +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, sub license, 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 (including the +next paragraph) 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 NON-INFRINGEMENT. +IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +/** + * \file xf86dri.h + * Protocol numbers and function prototypes for DRI X protocol. + * + * \author Kevin E. Martin + * \author Jens Owen + * \author Rickard E. (Rik) Faith + */ + +#ifndef _VA_DRI_H_ +#define _VA_DRI_H_ + +#include +#include + +#define X_VA_DRIQueryVersion 0 +#define X_VA_DRIQueryDirectRenderingCapable 1 +#define X_VA_DRIOpenConnection 2 +#define X_VA_DRICloseConnection 3 +#define X_VA_DRIGetClientDriverName 4 +#define X_VA_DRICreateContext 5 +#define X_VA_DRIDestroyContext 6 +#define X_VA_DRICreateDrawable 7 +#define X_VA_DRIDestroyDrawable 8 +#define X_VA_DRIGetDrawableInfo 9 +#define X_VA_DRIGetDeviceInfo 10 +#define X_VA_DRIAuthConnection 11 +#define X_VA_DRIOpenFullScreen 12 /* Deprecated */ +#define X_VA_DRICloseFullScreen 13 /* Deprecated */ + +#define VA_DRINumberEvents 0 + +#define VA_DRIClientNotLocal 0 +#define VA_DRIOperationNotSupported 1 +#define VA_DRINumberErrors (VA_DRIOperationNotSupported + 1) + +typedef unsigned long __DRIid; +typedef void __DRInativeDisplay; + +_XFUNCPROTOBEGIN + +Bool VA_DRIQueryExtension( Display *dpy, int *event_base, int *error_base ); + +Bool VA_DRIQueryVersion( Display *dpy, int *majorVersion, int *minorVersion, + int *patchVersion ); + +Bool VA_DRIQueryDirectRenderingCapable( Display *dpy, int screen, + Bool *isCapable ); + +Bool VA_DRIOpenConnection( Display *dpy, int screen, drm_handle_t *hSAREA, + char **busIDString ); + +Bool VA_DRIAuthConnection( Display *dpy, int screen, drm_magic_t magic ); + +Bool VA_DRICloseConnection( Display *dpy, int screen ); + +Bool VA_DRIGetClientDriverName( Display *dpy, int screen, + int *ddxDriverMajorVersion, int *ddxDriverMinorVersion, + int *ddxDriverPatchVersion, char **clientDriverName ); + +Bool VA_DRICreateContext( Display *dpy, int screen, Visual *visual, + XID *ptr_to_returned_context_id, drm_context_t *hHWContext ); + +Bool VA_DRICreateContextWithConfig( Display *dpy, int screen, int configID, + XID *ptr_to_returned_context_id, drm_context_t *hHWContext ); + +Bool VA_DRIDestroyContext( __DRInativeDisplay *dpy, int screen, + __DRIid context_id ); + +Bool VA_DRICreateDrawable( __DRInativeDisplay *dpy, int screen, + __DRIid drawable, drm_drawable_t *hHWDrawable ); + +Bool VA_DRIDestroyDrawable( __DRInativeDisplay *dpy, int screen, + __DRIid drawable); + +Bool VA_DRIGetDrawableInfo( Display *dpy, int screen, Drawable drawable, + unsigned int *index, unsigned int *stamp, + int *X, int *Y, int *W, int *H, + int *numClipRects, drm_clip_rect_t ** pClipRects, + int *backX, int *backY, + int *numBackClipRects, drm_clip_rect_t **pBackClipRects ); + +Bool VA_DRIGetDeviceInfo( Display *dpy, int screen, + drm_handle_t *hFrameBuffer, int *fbOrigin, int *fbSize, + int *fbStride, int *devPrivateSize, void **pDevPrivate ); + +_XFUNCPROTOEND + +#endif /* _VA_DRI_H_ */ + diff -Nru libva-1.0.1/va/x11/va_dristr.h libva-1.0.1-3+0.31.1/va/x11/va_dristr.h --- libva-1.0.1/va/x11/va_dristr.h 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/va/x11/va_dristr.h 2010-03-08 11:52:42.000000000 +0000 @@ -0,0 +1,344 @@ +/* $XFree86: xc/lib/GL/dri/xf86dristr.h,v 1.10 2002/10/30 12:51:25 alanh Exp $ */ +/************************************************************************** + +Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. +Copyright 2000 VA Linux Systems, Inc. +Copyright 2007 Intel Corporation +All Rights Reserved. + +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, sub license, 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 (including the +next paragraph) 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 NON-INFRINGEMENT. +IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +/* + * Authors: + * Kevin E. Martin + * Jens Owen + * Rickard E. (Rik) Fiath + * + */ + +#ifndef _VA_DRISTR_H_ +#define _VA_DRISTR_H_ + +#include "va_dri.h" + +#define VA_DRINAME "XFree86-DRI" + +/* The DRI version number. This was originally set to be the same of the + * XFree86 version number. However, this version is really indepedent of + * the XFree86 version. + * + * Version History: + * 4.0.0: Original + * 4.0.1: Patch to bump clipstamp when windows are destroyed, 28 May 02 + * 4.1.0: Add transition from single to multi in DRMInfo rec, 24 Jun 02 + */ +#define VA_DRI_MAJOR_VERSION 4 +#define VA_DRI_MINOR_VERSION 1 +#define VA_DRI_PATCH_VERSION 0 + +typedef struct _VA_DRIQueryVersion { + CARD8 reqType; /* always DRIReqCode */ + CARD8 driReqType; /* always X_DRIQueryVersion */ + CARD16 length B16; +} xVA_DRIQueryVersionReq; +#define sz_xVA_DRIQueryVersionReq 4 + +typedef struct { + BYTE type; /* X_Reply */ + BOOL pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD16 majorVersion B16; /* major version of DRI protocol */ + CARD16 minorVersion B16; /* minor version of DRI protocol */ + CARD32 patchVersion B32; /* patch version of DRI protocol */ + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xVA_DRIQueryVersionReply; +#define sz_xVA_DRIQueryVersionReply 32 + +typedef struct _VA_DRIQueryDirectRenderingCapable { + CARD8 reqType; /* always DRIReqCode */ + CARD8 driReqType; /* X_DRIQueryDirectRenderingCapable */ + CARD16 length B16; + CARD32 screen B32; +} xVA_DRIQueryDirectRenderingCapableReq; +#define sz_xVA_DRIQueryDirectRenderingCapableReq 8 + +typedef struct { + BYTE type; /* X_Reply */ + BOOL pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + BOOL isCapable; + BOOL pad2; + BOOL pad3; + BOOL pad4; + CARD32 pad5 B32; + CARD32 pad6 B32; + CARD32 pad7 B32; + CARD32 pad8 B32; + CARD32 pad9 B32; +} xVA_DRIQueryDirectRenderingCapableReply; +#define sz_xVA_DRIQueryDirectRenderingCapableReply 32 + +typedef struct _VA_DRIOpenConnection { + CARD8 reqType; /* always DRIReqCode */ + CARD8 driReqType; /* always X_DRIOpenConnection */ + CARD16 length B16; + CARD32 screen B32; +} xVA_DRIOpenConnectionReq; +#define sz_xVA_DRIOpenConnectionReq 8 + +typedef struct { + BYTE type; /* X_Reply */ + BOOL pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 hSAREALow B32; + CARD32 hSAREAHigh B32; + CARD32 busIdStringLength B32; + CARD32 pad6 B32; + CARD32 pad7 B32; + CARD32 pad8 B32; +} xVA_DRIOpenConnectionReply; +#define sz_xVA_DRIOpenConnectionReply 32 + +typedef struct _VA_DRIAuthConnection { + CARD8 reqType; /* always DRIReqCode */ + CARD8 driReqType; /* always X_DRICloseConnection */ + CARD16 length B16; + CARD32 screen B32; + CARD32 magic B32; +} xVA_DRIAuthConnectionReq; +#define sz_xVA_DRIAuthConnectionReq 12 + +typedef struct { + BYTE type; + BOOL pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 authenticated B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xVA_DRIAuthConnectionReply; +#define zx_xVA_DRIAuthConnectionReply 32 + +typedef struct _VA_DRICloseConnection { + CARD8 reqType; /* always DRIReqCode */ + CARD8 driReqType; /* always X_DRICloseConnection */ + CARD16 length B16; + CARD32 screen B32; +} xVA_DRICloseConnectionReq; +#define sz_xVA_DRICloseConnectionReq 8 + +typedef struct _VA_DRIGetClientDriverName { + CARD8 reqType; /* always DRIReqCode */ + CARD8 driReqType; /* always X_DRIGetClientDriverName */ + CARD16 length B16; + CARD32 screen B32; +} xVA_DRIGetClientDriverNameReq; +#define sz_xVA_DRIGetClientDriverNameReq 8 + +typedef struct { + BYTE type; /* X_Reply */ + BOOL pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 ddxDriverMajorVersion B32; + CARD32 ddxDriverMinorVersion B32; + CARD32 ddxDriverPatchVersion B32; + CARD32 clientDriverNameLength B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xVA_DRIGetClientDriverNameReply; +#define sz_xVA_DRIGetClientDriverNameReply 32 + +typedef struct _VA_DRICreateContext { + CARD8 reqType; /* always DRIReqCode */ + CARD8 driReqType; /* always X_DRICreateContext */ + CARD16 length B16; + CARD32 screen B32; + CARD32 visual B32; + CARD32 context B32; +} xVA_DRICreateContextReq; +#define sz_xVA_DRICreateContextReq 16 + +typedef struct { + BYTE type; /* X_Reply */ + BOOL pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 hHWContext B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xVA_DRICreateContextReply; +#define sz_xVA_DRICreateContextReply 32 + +typedef struct _VA_DRIDestroyContext { + CARD8 reqType; /* always DRIReqCode */ + CARD8 driReqType; /* always X_DRIDestroyContext */ + CARD16 length B16; + CARD32 screen B32; + CARD32 context B32; +} xVA_DRIDestroyContextReq; +#define sz_xVA_DRIDestroyContextReq 12 + +typedef struct _VA_DRICreateDrawable { + CARD8 reqType; /* always DRIReqCode */ + CARD8 driReqType; /* always X_DRICreateDrawable */ + CARD16 length B16; + CARD32 screen B32; + CARD32 drawable B32; +} xVA_DRICreateDrawableReq; +#define sz_xVA_DRICreateDrawableReq 12 + +typedef struct { + BYTE type; /* X_Reply */ + BOOL pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 hHWDrawable B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xVA_DRICreateDrawableReply; +#define sz_xVA_DRICreateDrawableReply 32 + +typedef struct _VA_DRIDestroyDrawable { + CARD8 reqType; /* always DRIReqCode */ + CARD8 driReqType; /* always X_DRIDestroyDrawable */ + CARD16 length B16; + CARD32 screen B32; + CARD32 drawable B32; +} xVA_DRIDestroyDrawableReq; +#define sz_xVA_DRIDestroyDrawableReq 12 + +typedef struct _VA_DRIGetDrawableInfo { + CARD8 reqType; /* always DRIReqCode */ + CARD8 driReqType; /* always X_DRIGetDrawableInfo */ + CARD16 length B16; + CARD32 screen B32; + CARD32 drawable B32; +} xVA_DRIGetDrawableInfoReq; +#define sz_xVA_DRIGetDrawableInfoReq 12 + +typedef struct { + BYTE type; /* X_Reply */ + BOOL pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 drawableTableIndex B32; + CARD32 drawableTableStamp B32; + INT16 drawableX B16; + INT16 drawableY B16; + INT16 drawableWidth B16; + INT16 drawableHeight B16; + CARD32 numClipRects B32; + INT16 backX B16; + INT16 backY B16; + CARD32 numBackClipRects B32; +} xVA_DRIGetDrawableInfoReply; + +#define sz_xVA_DRIGetDrawableInfoReply 36 + + +typedef struct _VA_DRIGetDeviceInfo { + CARD8 reqType; /* always DRIReqCode */ + CARD8 driReqType; /* always X_DRIGetDeviceInfo */ + CARD16 length B16; + CARD32 screen B32; +} xVA_DRIGetDeviceInfoReq; +#define sz_xVA_DRIGetDeviceInfoReq 8 + +typedef struct { + BYTE type; /* X_Reply */ + BOOL pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 hFrameBufferLow B32; + CARD32 hFrameBufferHigh B32; + CARD32 framebufferOrigin B32; + CARD32 framebufferSize B32; + CARD32 framebufferStride B32; + CARD32 devPrivateSize B32; +} xVA_DRIGetDeviceInfoReply; +#define sz_xVA_DRIGetDeviceInfoReply 32 + +typedef struct _VA_DRIOpenFullScreen { + CARD8 reqType; /* always DRIReqCode */ + CARD8 driReqType; /* always X_DRIOpenFullScreen */ + CARD16 length B16; + CARD32 screen B32; + CARD32 drawable B32; +} xVA_DRIOpenFullScreenReq; +#define sz_xVA_DRIOpenFullScreenReq 12 + +typedef struct { + BYTE type; + BOOL pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 isFullScreen B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xVA_DRIOpenFullScreenReply; +#define sz_xVA_DRIOpenFullScreenReply 32 + +typedef struct _VA_DRICloseFullScreen { + CARD8 reqType; /* always DRIReqCode */ + CARD8 driReqType; /* always X_DRICloseFullScreen */ + CARD16 length B16; + CARD32 screen B32; + CARD32 drawable B32; +} xVA_DRICloseFullScreenReq; +#define sz_xVA_DRICloseFullScreenReq 12 + +typedef struct { + BYTE type; + BOOL pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; + CARD32 pad7 B32; +} xVA_DRICloseFullScreenReply; +#define sz_xVA_DRICloseFullScreenReply 32 + + +#endif /* _VA_DRISTR_H_ */ diff -Nru libva-1.0.1/va/x11/va_nvctrl.c libva-1.0.1-3+0.31.1/va/x11/va_nvctrl.c --- libva-1.0.1/va/x11/va_nvctrl.c 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/va/x11/va_nvctrl.c 2010-03-08 11:52:42.000000000 +0000 @@ -0,0 +1,399 @@ +/* + * Copyright (c) 2008 NVIDIA, Corporation + * + * 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 (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#define _GNU_SOURCE 1 +#include + +#define NEED_REPLIES +#include +#include +#include +#include +#include +#include "va_nvctrl.h" + +#define NV_CONTROL_ERRORS 0 +#define NV_CONTROL_EVENTS 5 +#define NV_CONTROL_NAME "NV-CONTROL" + +#define NV_CTRL_TARGET_TYPE_X_SCREEN 0 +#define NV_CTRL_TARGET_TYPE_GPU 1 +#define NV_CTRL_TARGET_TYPE_FRAMELOCK 2 +#define NV_CTRL_TARGET_TYPE_VCSC 3 /* Visual Computing System */ + +#define NV_CTRL_STRING_NVIDIA_DRIVER_VERSION 3 /* R--G */ + +#define X_nvCtrlQueryExtension 0 +#define X_nvCtrlIsNv 1 +#define X_nvCtrlQueryStringAttribute 4 + +typedef struct { + CARD8 reqType; + CARD8 nvReqType; + CARD16 length B16; +} xnvCtrlQueryExtensionReq; +#define sz_xnvCtrlQueryExtensionReq 4 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 padb1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD16 major B16; + CARD16 minor B16; + CARD32 padl4 B32; + CARD32 padl5 B32; + CARD32 padl6 B32; + CARD32 padl7 B32; + CARD32 padl8 B32; +} xnvCtrlQueryExtensionReply; +#define sz_xnvCtrlQueryExtensionReply 32 + +typedef struct { + CARD8 reqType; + CARD8 nvReqType; + CARD16 length B16; + CARD32 screen B32; +} xnvCtrlIsNvReq; +#define sz_xnvCtrlIsNvReq 8 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 padb1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 isnv B32; + CARD32 padl4 B32; + CARD32 padl5 B32; + CARD32 padl6 B32; + CARD32 padl7 B32; + CARD32 padl8 B32; +} xnvCtrlIsNvReply; +#define sz_xnvCtrlIsNvReply 32 + +typedef struct { + CARD8 reqType; + CARD8 nvReqType; + CARD16 length B16; + CARD16 target_id B16; /* X screen number or GPU number */ + CARD16 target_type B16; /* X screen or GPU */ + CARD32 display_mask B32; + CARD32 attribute B32; +} xnvCtrlQueryStringAttributeReq; +#define sz_xnvCtrlQueryStringAttributeReq 16 + +typedef struct { + BYTE type; + BYTE pad0; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 flags B32; + CARD32 n B32; /* Length of string */ + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; + CARD32 pad7 B32; +} xnvCtrlQueryStringAttributeReply; +#define sz_xnvCtrlQueryStringAttributeReply 32 + +#define NVCTRL_EXT_NEED_CHECK (XPointer)(~0) +#define NVCTRL_EXT_NEED_NOTHING (XPointer)(0) +#define NVCTRL_EXT_NEED_TARGET_SWAP (XPointer)(1) + +static XExtensionInfo _nvctrl_ext_info_data; +static XExtensionInfo *nvctrl_ext_info = &_nvctrl_ext_info_data; +static /* const */ char *nvctrl_extension_name = NV_CONTROL_NAME; + +#define XNVCTRLCheckExtension(dpy,i,val) \ + XextCheckExtension (dpy, i, nvctrl_extension_name, val) +#define XNVCTRLSimpleCheckExtension(dpy,i) \ + XextSimpleCheckExtension (dpy, i, nvctrl_extension_name) + +static int close_display(); +static /* const */ XExtensionHooks nvctrl_extension_hooks = { + NULL, /* create_gc */ + NULL, /* copy_gc */ + NULL, /* flush_gc */ + NULL, /* free_gc */ + NULL, /* create_font */ + NULL, /* free_font */ + close_display, /* close_display */ + NULL, /* wire_to_event */ + NULL, /* event_to_wire */ + NULL, /* error */ + NULL, /* error_string */ +}; + +static XEXT_GENERATE_FIND_DISPLAY (find_display, nvctrl_ext_info, + nvctrl_extension_name, + &nvctrl_extension_hooks, + NV_CONTROL_EVENTS, NVCTRL_EXT_NEED_CHECK) + +static XEXT_GENERATE_CLOSE_DISPLAY (close_display, nvctrl_ext_info) + +static Bool XNVCTRLQueryVersion (Display *dpy, int *major, int *minor); + +/* + * NV-CONTROL versions 1.8 and 1.9 pack the target_type and target_id + * fields in reversed order. In order to talk to one of these servers, + * we need to swap these fields. + */ +static void XNVCTRLCheckTargetData(Display *dpy, XExtDisplayInfo *info, + int *target_type, int *target_id) +{ + /* Find out what the server's NV-CONTROL version is and + * setup for swapping if we need to. + */ + if (info->data == NVCTRL_EXT_NEED_CHECK) { + int major, minor; + + if (XNVCTRLQueryVersion(dpy, &major, &minor)) { + if (major == 1 && + (minor == 8 || minor == 9)) { + info->data = NVCTRL_EXT_NEED_TARGET_SWAP; + } else { + info->data = NVCTRL_EXT_NEED_NOTHING; + } + } else { + info->data = NVCTRL_EXT_NEED_NOTHING; + } + } + + /* We need to swap the target_type and target_id */ + if (info->data == NVCTRL_EXT_NEED_TARGET_SWAP) { + int tmp; + tmp = *target_type; + *target_type = *target_id; + *target_id = tmp; + } +} + + +static Bool XNVCTRLQueryExtension ( + Display *dpy, + int *event_basep, + int *error_basep +){ + XExtDisplayInfo *info = find_display (dpy); + + if (XextHasExtension(info)) { + if (event_basep) *event_basep = info->codes->first_event; + if (error_basep) *error_basep = info->codes->first_error; + return True; + } else { + return False; + } +} + + +static Bool XNVCTRLQueryVersion ( + Display *dpy, + int *major, + int *minor +){ + XExtDisplayInfo *info = find_display (dpy); + xnvCtrlQueryExtensionReply rep; + xnvCtrlQueryExtensionReq *req; + + if(!XextHasExtension(info)) + return False; + + XNVCTRLCheckExtension (dpy, info, False); + + LockDisplay (dpy); + GetReq (nvCtrlQueryExtension, req); + req->reqType = info->codes->major_opcode; + req->nvReqType = X_nvCtrlQueryExtension; + if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) { + UnlockDisplay (dpy); + SyncHandle (); + return False; + } + if (major) *major = rep.major; + if (minor) *minor = rep.minor; + UnlockDisplay (dpy); + SyncHandle (); + return True; +} + + +static Bool XNVCTRLIsNvScreen ( + Display *dpy, + int screen +){ + XExtDisplayInfo *info = find_display (dpy); + xnvCtrlIsNvReply rep; + xnvCtrlIsNvReq *req; + Bool isnv; + + if(!XextHasExtension(info)) + return False; + + XNVCTRLCheckExtension (dpy, info, False); + + LockDisplay (dpy); + GetReq (nvCtrlIsNv, req); + req->reqType = info->codes->major_opcode; + req->nvReqType = X_nvCtrlIsNv; + req->screen = screen; + if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) { + UnlockDisplay (dpy); + SyncHandle (); + return False; + } + isnv = rep.isnv; + UnlockDisplay (dpy); + SyncHandle (); + return isnv; +} + + +static Bool XNVCTRLQueryTargetStringAttribute ( + Display *dpy, + int target_type, + int target_id, + unsigned int display_mask, + unsigned int attribute, + char **ptr +){ + XExtDisplayInfo *info = find_display (dpy); + xnvCtrlQueryStringAttributeReply rep; + xnvCtrlQueryStringAttributeReq *req; + Bool exists; + int length, numbytes, slop; + + if (!ptr) return False; + + if(!XextHasExtension(info)) + return False; + + XNVCTRLCheckExtension (dpy, info, False); + XNVCTRLCheckTargetData(dpy, info, &target_type, &target_id); + + LockDisplay (dpy); + GetReq (nvCtrlQueryStringAttribute, req); + req->reqType = info->codes->major_opcode; + req->nvReqType = X_nvCtrlQueryStringAttribute; + req->target_type = target_type; + req->target_id = target_id; + req->display_mask = display_mask; + req->attribute = attribute; + if (!_XReply (dpy, (xReply *) &rep, 0, False)) { + UnlockDisplay (dpy); + SyncHandle (); + return False; + } + length = rep.length; + numbytes = rep.n; + slop = numbytes & 3; + *ptr = (char *) Xmalloc(numbytes); + if (! *ptr) { + _XEatData(dpy, length); + UnlockDisplay (dpy); + SyncHandle (); + return False; + } else { + _XRead(dpy, (char *) *ptr, numbytes); + if (slop) _XEatData(dpy, 4-slop); + } + exists = rep.flags; + UnlockDisplay (dpy); + SyncHandle (); + return exists; +} + +static Bool XNVCTRLQueryStringAttribute ( + Display *dpy, + int screen, + unsigned int display_mask, + unsigned int attribute, + char **ptr +){ + return XNVCTRLQueryTargetStringAttribute(dpy, NV_CTRL_TARGET_TYPE_X_SCREEN, + screen, display_mask, + attribute, ptr); +} + + +Bool VA_NVCTRLQueryDirectRenderingCapable( Display *dpy, int screen, + Bool *isCapable ) +{ + int event_base; + int error_base; + + if (isCapable) + *isCapable = False; + + if (!XNVCTRLQueryExtension(dpy, &event_base, &error_base)) + return False; + + if (isCapable && XNVCTRLIsNvScreen(dpy, screen)) + *isCapable = True; + + return True; +} + +Bool VA_NVCTRLGetClientDriverName( Display *dpy, int screen, + int *ddxDriverMajorVersion, int *ddxDriverMinorVersion, + int *ddxDriverPatchVersion, char **clientDriverName ) +{ + if (ddxDriverMajorVersion) + *ddxDriverMajorVersion = 0; + if (ddxDriverMinorVersion) + *ddxDriverMinorVersion = 0; + if (ddxDriverPatchVersion) + *ddxDriverPatchVersion = 0; + if (clientDriverName) + *clientDriverName = NULL; + + char *nvidia_driver_version = NULL; + if (!XNVCTRLQueryStringAttribute(dpy, screen, 0, NV_CTRL_STRING_NVIDIA_DRIVER_VERSION, &nvidia_driver_version)) + return False; + + char *end, *str = nvidia_driver_version; + unsigned long v = strtoul(str, &end, 10); + if (end && end != str) { + if (ddxDriverMajorVersion) + *ddxDriverMajorVersion = v; + if (*(str = end) == '.') { + v = strtoul(str + 1, &end, 10); + if (end && end != str && (*end == '.' || *end == '\0')) { + if (ddxDriverMinorVersion) + *ddxDriverMinorVersion = v; + if (*(str = end) == '.') { + v = strtoul(str + 1, &end, 10); + if (end && end != str && *end == '\0') { + if (ddxDriverPatchVersion) + *ddxDriverPatchVersion = v; + } + } + } + } + } + Xfree(nvidia_driver_version); + + if (clientDriverName) + *clientDriverName = strdup("nvidia"); + + return True; +} diff -Nru libva-1.0.1/va/x11/va_nvctrl.h libva-1.0.1-3+0.31.1/va/x11/va_nvctrl.h --- libva-1.0.1/va/x11/va_nvctrl.h 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/va/x11/va_nvctrl.h 2010-03-08 11:52:42.000000000 +0000 @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2008 NVIDIA, Corporation + * + * 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 (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#ifndef VA_NVCTRLLIB_H +#define VA_NVCTRLLIB_H + +#include + +Bool VA_NVCTRLQueryDirectRenderingCapable( Display *dpy, int screen, + Bool *isCapable ); + +Bool VA_NVCTRLGetClientDriverName( Display *dpy, int screen, + int *ddxDriverMajorVersion, int *ddxDriverMinorVersion, + int *ddxDriverPatchVersion, char **clientDriverName ); + +#endif /* VA_NVCTRLLIB_H */ diff -Nru libva-1.0.1/va/x11/va_x11.c libva-1.0.1-3+0.31.1/va/x11/va_x11.c --- libva-1.0.1/va/x11/va_x11.c 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.0.1-3+0.31.1/va/x11/va_x11.c 2010-06-04 07:42:00.000000000 +0000 @@ -0,0 +1,239 @@ +/* + * Copyright (c) 2007 Intel Corporation. All Rights Reserved. + * + * 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, sub license, 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 (including the + * next paragraph) 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 NON-INFRINGEMENT. + * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +#define _GNU_SOURCE 1 +#include "config.h" +#include "va.h" +#include "va_backend.h" +#include "va_x11.h" +#include "va_dri.h" +#include "va_dri2.h" +#include "va_dricommon.h" +#include "va_nvctrl.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static VADisplayContextP pDisplayContexts = NULL; + +static int va_DisplayContextIsValid ( + VADisplayContextP pDisplayContext +) +{ + VADisplayContextP ctx = pDisplayContexts; + + while (ctx) + { + if (ctx == pDisplayContext && pDisplayContext->pDriverContext) + return 1; + ctx = ctx->pNext; + } + return 0; +} + +static void va_DisplayContextDestroy ( + VADisplayContextP pDisplayContext +) +{ + VADisplayContextP *ctx = &pDisplayContexts; + + /* Throw away pDisplayContext */ + while (*ctx) + { + if (*ctx == pDisplayContext) + { + *ctx = pDisplayContext->pNext; + pDisplayContext->pNext = NULL; + break; + } + ctx = &((*ctx)->pNext); + } + free(pDisplayContext->pDriverContext->dri_state); + free(pDisplayContext->pDriverContext); + free(pDisplayContext); +} + + +static VAStatus va_DRI2GetDriverName ( + VADisplayContextP pDisplayContext, + char **driver_name +) +{ + VADriverContextP ctx = pDisplayContext->pDriverContext; + + if (!isDRI2Connected(ctx, driver_name)) + return VA_STATUS_ERROR_UNKNOWN; + + return VA_STATUS_SUCCESS; +} + +static VAStatus va_DRIGetDriverName ( + VADisplayContextP pDisplayContext, + char **driver_name +) +{ + VADriverContextP ctx = pDisplayContext->pDriverContext; + + if (!isDRI1Connected(ctx, driver_name)) + return VA_STATUS_ERROR_UNKNOWN; + + return VA_STATUS_SUCCESS; +} + +static VAStatus va_NVCTRL_GetDriverName ( + VADisplayContextP pDisplayContext, + char **driver_name +) +{ + VADriverContextP ctx = pDisplayContext->pDriverContext; + int direct_capable, driver_major, driver_minor, driver_patch; + Bool result; + + result = VA_NVCTRLQueryDirectRenderingCapable((Display *)ctx->native_dpy, ctx->x11_screen, + &direct_capable); + if (!result || !direct_capable) + return VA_STATUS_ERROR_UNKNOWN; + + result = VA_NVCTRLGetClientDriverName((Display *)ctx->native_dpy, ctx->x11_screen, + &driver_major, &driver_minor, + &driver_patch, driver_name); + if (!result) + return VA_STATUS_ERROR_UNKNOWN; + + return VA_STATUS_SUCCESS; +} + +static VAStatus va_DisplayContextGetDriverName ( + VADisplayContextP pDisplayContext, + char **driver_name +) +{ + VAStatus vaStatus; + + if (driver_name) + *driver_name = NULL; + + vaStatus = va_DRI2GetDriverName(pDisplayContext, driver_name); + if (vaStatus != VA_STATUS_SUCCESS) + vaStatus = va_DRIGetDriverName(pDisplayContext, driver_name); + if (vaStatus != VA_STATUS_SUCCESS) + vaStatus = va_NVCTRL_GetDriverName(pDisplayContext, driver_name); + + return vaStatus; +} + + +VADisplay vaGetDisplay ( + Display *native_dpy /* implementation specific */ +) +{ + VADisplay dpy = NULL; + VADisplayContextP pDisplayContext = pDisplayContexts; + + if (!native_dpy) + return NULL; + + while (pDisplayContext) + { + if (pDisplayContext->pDriverContext && + pDisplayContext->pDriverContext->native_dpy == (void *)native_dpy) + { + dpy = (VADisplay)pDisplayContext; + break; + } + pDisplayContext = pDisplayContext->pNext; + } + + if (!dpy) + { + /* create new entry */ + VADriverContextP pDriverContext; + struct dri_state *dri_state; + pDisplayContext = calloc(1, sizeof(*pDisplayContext)); + pDriverContext = calloc(1, sizeof(*pDriverContext)); + dri_state = calloc(1, sizeof(*dri_state)); + if (pDisplayContext && pDriverContext && dri_state) + { + pDisplayContext->vadpy_magic = VA_DISPLAY_MAGIC; + + pDriverContext->native_dpy = (void *)native_dpy; + pDisplayContext->pNext = pDisplayContexts; + pDisplayContext->pDriverContext = pDriverContext; + pDisplayContext->vaIsValid = va_DisplayContextIsValid; + pDisplayContext->vaDestroy = va_DisplayContextDestroy; + pDisplayContext->vaGetDriverName = va_DisplayContextGetDriverName; + pDisplayContext->opaque = NULL; + pDisplayContexts = pDisplayContext; + pDriverContext->dri_state = dri_state; + dpy = (VADisplay)pDisplayContext; + } + else + { + if (pDisplayContext) + free(pDisplayContext); + if (pDriverContext) + free(pDriverContext); + if (dri_state) + free(dri_state); + } + } + + return dpy; +} + +#define CTX(dpy) (((VADisplayContextP)dpy)->pDriverContext) +#define CHECK_DISPLAY(dpy) if( !vaDisplayIsValid(dpy) ) { return VA_STATUS_ERROR_INVALID_DISPLAY; } + +VAStatus vaPutSurface ( + VADisplay dpy, + VASurfaceID surface, + Drawable draw, /* X Drawable */ + short srcx, + short srcy, + unsigned short srcw, + unsigned short srch, + short destx, + short desty, + unsigned short destw, + unsigned short desth, + VARectangle *cliprects, /* client supplied clip list */ + unsigned int number_cliprects, /* number of clip rects in the clip list */ + unsigned int flags /* de-interlacing flags */ +) +{ + VADriverContextP ctx; + + CHECK_DISPLAY(dpy); + ctx = CTX(dpy); + + return ctx->vtable.vaPutSurface( ctx, surface, (void *)draw, srcx, srcy, srcw, srch, + destx, desty, destw, desth, + cliprects, number_cliprects, flags ); +}