diff -Nru xserver-xorg-video-openchrome-0.5.0/aclocal.m4 xserver-xorg-video-openchrome-0.6.0/aclocal.m4 --- xserver-xorg-video-openchrome-0.5.0/aclocal.m4 2016-07-06 16:22:00.000000000 +0000 +++ xserver-xorg-video-openchrome-0.6.0/aclocal.m4 2017-03-07 11:18:19.000000000 +0000 @@ -1,7 +1,8 @@ -# generated automatically by aclocal 1.15 -*- Autoconf -*- - -# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# generated automatically by aclocal 1.11.3 -*- Autoconf -*- +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, +# Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -11,18 +12,19 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. -m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, -[m4_warning([this file was generated for autoconf 2.69. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, +[m4_warning([this file was generated for autoconf 2.68. 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'.])]) +To do so, use the procedure documented by the package, typically `autoreconf'.])]) # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # -# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives @@ -30,30 +32,36 @@ # modifications, as long as this notice is preserved. m4_define([_LT_COPYING], [dnl -# Copyright (C) 2014 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# GNU Libtool is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of of the License, or -# (at your option) any later version. +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 # -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program or library that is built -# using GNU Libtool, you may include this file under the same -# distribution terms that you use for the rest of that program. +# This file is part of GNU Libtool. # -# GNU Libtool is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of +# 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 this program. If not, see . +# 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 58 LT_INIT +# serial 57 LT_INIT # LT_PREREQ(VERSION) @@ -81,7 +89,7 @@ # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], -[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK +[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl @@ -105,7 +113,7 @@ _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed -LIBTOOL_DEPS=$ltmain +LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' @@ -125,43 +133,26 @@ dnl AC_DEFUN([AM_PROG_LIBTOOL], []) -# _LT_PREPARE_CC_BASENAME -# ----------------------- -m4_defun([_LT_PREPARE_CC_BASENAME], [ -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -func_cc_basename () -{ - for cc_temp in @S|@*""; do - case $cc_temp in - compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; - distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; - \-*) ;; - *) break;; - esac - done - func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` -} -])# _LT_PREPARE_CC_BASENAME - - # _LT_CC_BASENAME(CC) # ------------------- -# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, -# but that macro is also expanded into generated libtool script, which -# arranges for $SED and $ECHO to be set by different means. +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. m4_defun([_LT_CC_BASENAME], -[m4_require([_LT_PREPARE_CC_BASENAME])dnl -AC_REQUIRE([_LT_DECL_SED])dnl -AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl -func_cc_basename $1 -cc_basename=$func_cc_basename_result +[for cc_temp in $1""; do + case $cc_temp in + compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; + distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set -# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. +# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} @@ -208,16 +199,15 @@ m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_WITH_SYSROOT])dnl -m4_require([_LT_CMD_TRUNCATE])dnl _LT_CONFIG_LIBTOOL_INIT([ -# See if we are running on zsh, and set the options that allow our +# 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 +if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi ]) -if test -n "${ZSH_VERSION+set}"; then +if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi @@ -230,7 +220,7 @@ # 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 set != "${COLLECT_NAMES+set}"; then + if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi @@ -241,14 +231,14 @@ ofile=libtool can_build_shared=yes -# All known linkers require a '.a' archive for static linking (except MSVC, +# All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a -with_gnu_ld=$lt_cv_prog_gnu_ld +with_gnu_ld="$lt_cv_prog_gnu_ld" -old_CC=$CC -old_CFLAGS=$CFLAGS +old_CC="$CC" +old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc @@ -301,21 +291,21 @@ # _LT_PROG_LTMAIN # --------------- -# Note that this code is called both from 'configure', and 'config.status' +# 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, +# `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 +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' +# in macros and then make a single call at the end using the `libtool' # label. @@ -447,8 +437,8 @@ # _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 +# Quote a variable value, and forward it to `config.status' so that its +# declaration there will have the same value as in `configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) @@ -472,7 +462,7 @@ # 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 +available_tags="_LT_TAGS"dnl ]) @@ -500,7 +490,7 @@ # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables -# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' +# 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], @@ -526,8 +516,8 @@ # 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 +# 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], @@ -573,7 +563,7 @@ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" @@ -586,7 +576,7 @@ ]], lt_decl_dquote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" @@ -602,7 +592,7 @@ # Generate a child script FILE with all initialization necessary to # reuse the environment learned by the parent script, and make the # file executable. If COMMENT is supplied, it is inserted after the -# '#!' sequence but before initialization text begins. After this +# `#!' sequence but before initialization text begins. After this # macro, additional text can be appended to FILE to form the body of # the child script. The macro ends with non-zero status if the # file could not be fully written (such as if the disk is full). @@ -624,7 +614,7 @@ _AS_PREPARE exec AS_MESSAGE_FD>&1 _ASEOF -test 0 = "$lt_write_fail" && chmod +x $1[]dnl +test $lt_write_fail = 0 && chmod +x $1[]dnl m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT @@ -647,7 +637,7 @@ } >&AS_MESSAGE_LOG_FD lt_cl_help="\ -'$as_me' creates a local libtool stub from the current configuration, +\`$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. @@ -669,7 +659,7 @@ This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." -while test 0 != $[#] +while test $[#] != 0 do case $[1] in --version | --v* | -V ) @@ -682,10 +672,10 @@ lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] -Try '$[0] --help' for more information.]) ;; +Try \`$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] -Try '$[0] --help' for more information.]) ;; +Try \`$[0] --help' for more information.]) ;; esac shift done @@ -711,7 +701,7 @@ # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. lt_cl_success=: -test yes = "$silent" && +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 @@ -731,31 +721,27 @@ _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 that allow our + # 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 + if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi - cfgfile=${ofile}T + cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL -# Generated automatically by $as_me ($PACKAGE) $VERSION + +# `$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. - -# Provide generalized library-building support services. -# Written by Gordon Matzigkeit, 1996 - +# _LT_COPYING _LT_LIBTOOL_TAGS -# Configured defaults for sys_lib_dlsearch_path munging. -: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} - # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS @@ -763,24 +749,13 @@ _LT_EOF - cat <<'_LT_EOF' >> "$cfgfile" - -# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE - -_LT_PREPARE_MUNGE_PATH_LIST -_LT_PREPARE_CC_BASENAME - -# ### END FUNCTIONS SHARED WITH CONFIGURE - -_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 set != "${COLLECT_NAMES+set}"; then +if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi @@ -797,6 +772,8 @@ sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) + _LT_PROG_REPLACE_SHELLFNS + mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" @@ -814,6 +791,7 @@ [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' + TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS @@ -1010,7 +988,7 @@ 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 + 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 @@ -1028,7 +1006,7 @@ cat conftest.err >&AS_MESSAGE_LOG_FD # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. - elif test -f libconftest.dylib && test 0 = "$_lt_result"; then + elif test -f libconftest.dylib && test $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD @@ -1046,7 +1024,7 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) - LDFLAGS=$save_LDFLAGS + LDFLAGS="$save_LDFLAGS" ]) AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], @@ -1068,7 +1046,7 @@ _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD - elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then + elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD @@ -1078,32 +1056,32 @@ ]) case $host_os in rhapsody* | darwin1.[[012]]) - _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; - 10.[[012]][[,.]]*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; + _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' ;; + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac - if test yes = "$lt_cv_apple_cc_single_mod"; then + if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi - if test yes = "$lt_cv_ld_exported_symbols_list"; then - _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' + 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" && test no = "$lt_cv_ld_force_load"; then + if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= @@ -1123,29 +1101,29 @@ _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - if test yes = "$lt_cv_ld_force_load"; then - _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + if test "$lt_cv_ld_force_load" = "yes"; then + _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined + _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" case $cc_basename in - ifort*|nagfor*) _lt_dar_can_shared=yes ;; + ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac - if test yes = "$_lt_dar_can_shared"; then + if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all - _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" - _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" - _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" + _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 yes != "$lt_cv_apple_cc_single_mod"; 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" +[ 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 @@ -1165,7 +1143,7 @@ # Allow to override them for all tags through lt_cv_aix_libpath. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl -if test set = "${lt_cv_aix_libpath+set}"; then +if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], @@ -1183,7 +1161,7 @@ _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then - _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib + _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" fi ]) aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) @@ -1203,8 +1181,8 @@ # ----------------------- # Find how we can fake an echo command that does not interpret backslash. # In particular, with Autoconf 2.60 or later we add some code to the start -# of the generated configure script that will find a shell with a builtin -# printf (that we can use as an echo command). +# of the generated configure script which will find a shell with a builtin +# printf (which we can use as an echo command). m4_defun([_LT_PROG_ECHO_BACKSLASH], [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO @@ -1232,10 +1210,10 @@ # Invoke $ECHO with all args, space-separated. func_echo_all () { - $ECHO "$*" + $ECHO "$*" } -case $ECHO in +case "$ECHO" in printf*) AC_MSG_RESULT([printf]) ;; print*) AC_MSG_RESULT([print -r]) ;; *) AC_MSG_RESULT([cat]) ;; @@ -1261,17 +1239,16 @@ AC_DEFUN([_LT_WITH_SYSROOT], [AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], -[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], - [Search for dependent libraries within DIR (or the compiler's sysroot - if not specified).])], +[ --with-sysroot[=DIR] Search for dependent libraries within DIR + (or the compiler's sysroot if not specified).], [], [with_sysroot=no]) dnl lt_sysroot will always be passed unquoted. We quote it here dnl in case the user passed a directory name. lt_sysroot= -case $with_sysroot in #( +case ${with_sysroot} in #( yes) - if test yes = "$GCC"; then + if test "$GCC" = yes; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( @@ -1281,14 +1258,14 @@ no|'') ;; #( *) - AC_MSG_RESULT([$with_sysroot]) + AC_MSG_RESULT([${with_sysroot}]) AC_MSG_ERROR([The sysroot must be an absolute path.]) ;; esac AC_MSG_RESULT([${lt_sysroot:-no}]) _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl -[dependent libraries, and where our libraries should be installed.])]) +[dependent libraries, and in which our libraries should be installed.])]) # _LT_ENABLE_LOCK # --------------- @@ -1296,33 +1273,31 @@ [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) -test no = "$enable_libtool_lock" || enable_libtool_lock=yes +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 what ABI is being produced by ac_compile, and set mode - # options accordingly. + # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) - HPUX_IA64_MODE=32 + HPUX_IA64_MODE="32" ;; *ELF-64*) - HPUX_IA64_MODE=64 + HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. + # Find out which ABI we are using. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then - if test yes = "$lt_cv_prog_gnu_ld"; then + if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" @@ -1351,46 +1326,9 @@ rm -rf conftest* ;; -mips64*-*linux*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. - echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - emul=elf - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - emul="${emul}32" - ;; - *64-bit*) - emul="${emul}64" - ;; - esac - case `/usr/bin/file conftest.$ac_objext` in - *MSB*) - emul="${emul}btsmip" - ;; - *LSB*) - emul="${emul}ltsmip" - ;; - esac - case `/usr/bin/file conftest.$ac_objext` in - *N32*) - emul="${emul}n32" - ;; - esac - LD="${LD-ld} -m $emul" - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ +x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. Note that the listed cases only cover the - # situations where additional linker options are needed (such as when - # doing 32-bit compilation for a host where ld defaults to 64-bit, or - # vice versa); the common cases where no linker options are needed do - # not appear in the list. + # 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 @@ -1400,19 +1338,9 @@ LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) - case `/usr/bin/file conftest.o` in - *x86-64*) - LD="${LD-ld} -m elf32_x86_64" - ;; - *) - LD="${LD-ld} -m elf_i386" - ;; - esac + LD="${LD-ld} -m elf_i386" ;; - powerpc64le-*linux*) - LD="${LD-ld} -m elf32lppclinux" - ;; - powerpc64-*linux*) + ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) @@ -1431,10 +1359,7 @@ x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; - powerpcle-*linux*) - LD="${LD-ld} -m elf64lppc" - ;; - powerpc-*linux*) + ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) @@ -1452,20 +1377,19 @@ *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS=$CFLAGS + SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) - if test yes != "$lt_cv_cc_needs_belf"; then + 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 + CFLAGS="$SAVE_CFLAGS" fi ;; *-*solaris*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. + # 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 @@ -1473,7 +1397,7 @@ case $lt_cv_prog_gnu_ld in yes*) case $host in - i?86-*-solaris*|x86_64-*-solaris*) + i?86-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) @@ -1482,7 +1406,7 @@ esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then - LD=${LD-ld}_sol2 + LD="${LD-ld}_sol2" fi ;; *) @@ -1498,7 +1422,7 @@ ;; esac -need_locks=$enable_libtool_lock +need_locks="$enable_libtool_lock" ])# _LT_ENABLE_LOCK @@ -1517,11 +1441,11 @@ [echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([lt_ar_try]) - if test 0 -eq "$ac_status"; then + if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a AC_TRY_EVAL([lt_ar_try]) - if test 0 -ne "$ac_status"; then + if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi @@ -1529,7 +1453,7 @@ ]) ]) -if test no = "$lt_cv_ar_at_file"; then +if test "x$lt_cv_ar_at_file" = xno; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file @@ -1560,7 +1484,7 @@ if test -n "$RANLIB"; then case $host_os in - bitrig* | openbsd*) + openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) @@ -1596,7 +1520,7 @@ [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment + lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins @@ -1623,7 +1547,7 @@ $RM conftest* ]) -if test yes = "[$]$2"; then +if test x"[$]$2" = xyes; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) @@ -1645,7 +1569,7 @@ m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no - save_LDFLAGS=$LDFLAGS + save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then @@ -1664,10 +1588,10 @@ fi fi $RM -r conftest* - LDFLAGS=$save_LDFLAGS + LDFLAGS="$save_LDFLAGS" ]) -if test yes = "[$]$2"; then +if test x"[$]$2" = xyes; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) @@ -1688,7 +1612,7 @@ AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 - teststring=ABCD + teststring="ABCD" case $build_os in msdosdjgpp*) @@ -1728,7 +1652,7 @@ lt_cv_sys_max_cmd_len=8192; ;; - bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) + 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` @@ -1778,23 +1702,22 @@ ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len" && \ - test undefined != "$lt_cv_sys_max_cmd_len"; then + 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 + for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. - while { test X`env echo "$teststring$teststring" 2>/dev/null` \ + while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && - test 17 != "$i" # 1/2 MB should be enough + test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring @@ -1810,7 +1733,7 @@ ;; esac ]) -if test -n "$lt_cv_sys_max_cmd_len"; then +if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) @@ -1838,7 +1761,7 @@ # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl -if test yes = "$cross_compiling"; then : +if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 @@ -1885,9 +1808,9 @@ # endif #endif -/* When -fvisibility=hidden is used, assume the code has been annotated +/* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ -#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif @@ -1913,7 +1836,7 @@ return status; }] _LT_EOF - if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in @@ -1934,7 +1857,7 @@ # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl -if test yes != "$enable_dlopen"; then +if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown @@ -1944,52 +1867,44 @@ case $host_os in beos*) - lt_cv_dlopen=load_add_on + lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) - lt_cv_dlopen=LoadLibrary + lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) - lt_cv_dlopen=dlopen + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) - # if libdl is installed we need to link against it + # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ - lt_cv_dlopen=dyld + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ + lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; - tpf*) - # Don't try to run any link tests for TPF. We know it's impossible - # because TPF is a cross-compiler, and we know how we open DSOs. - lt_cv_dlopen=dlopen - lt_cv_dlopen_libs= - lt_cv_dlopen_self=no - ;; - *) AC_CHECK_FUNC([shl_load], - [lt_cv_dlopen=shl_load], + [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], - [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], + [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], [AC_CHECK_FUNC([dlopen], - [lt_cv_dlopen=dlopen], + [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], - [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], - [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) + [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) ]) ]) ]) @@ -1998,21 +1913,21 @@ ;; esac - if test no = "$lt_cv_dlopen"; then - enable_dlopen=no - else + 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 yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - save_LDFLAGS=$LDFLAGS + save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - save_LIBS=$LIBS + save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], @@ -2022,7 +1937,7 @@ lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) - if test yes = "$lt_cv_dlopen_self"; then + 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 @@ -2032,9 +1947,9 @@ ]) fi - CPPFLAGS=$save_CPPFLAGS - LDFLAGS=$save_LDFLAGS - LIBS=$save_LIBS + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" ;; esac @@ -2126,8 +2041,8 @@ m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) -hard_links=nottested -if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then +hard_links="nottested" +if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes @@ -2137,8 +2052,8 @@ ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) - if test no = "$hard_links"; then - AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) + if test "$hard_links" = no; then + AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else @@ -2165,8 +2080,8 @@ _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 where libtool stores uninstalled libraries.]) +AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", + [Define to the sub-directory in which libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR @@ -2178,15 +2093,15 @@ _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || - test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then + test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existent directories. - if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && + if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one - ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && - test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then + ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && + test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else @@ -2200,12 +2115,12 @@ fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) -if test relink = "$_LT_TAGVAR(hardcode_action, $1)" || - test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then +if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || + test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then # Fast installation is not supported enable_fast_install=no -elif test yes = "$shlibpath_overrides_runpath" || - test no = "$enable_shared"; then +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi @@ -2229,7 +2144,7 @@ # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) - if test -n "$STRIP"; then + if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) @@ -2247,47 +2162,6 @@ ])# _LT_CMD_STRIPLIB -# _LT_PREPARE_MUNGE_PATH_LIST -# --------------------------- -# Make sure func_munge_path_list() is defined correctly. -m4_defun([_LT_PREPARE_MUNGE_PATH_LIST], -[[# func_munge_path_list VARIABLE PATH -# ----------------------------------- -# VARIABLE is name of variable containing _space_ separated list of -# directories to be munged by the contents of PATH, which is string -# having a format: -# "DIR[:DIR]:" -# string "DIR[ DIR]" will be prepended to VARIABLE -# ":DIR[:DIR]" -# string "DIR[ DIR]" will be appended to VARIABLE -# "DIRP[:DIRP]::[DIRA:]DIRA" -# string "DIRP[ DIRP]" will be prepended to VARIABLE and string -# "DIRA[ DIRA]" will be appended to VARIABLE -# "DIR[:DIR]" -# VARIABLE will be replaced by "DIR[ DIR]" -func_munge_path_list () -{ - case x@S|@2 in - x) - ;; - *:) - eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" - ;; - x:*) - eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" - ;; - *::*) - eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" - eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" - ;; - *) - eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" - ;; - esac -} -]])# _LT_PREPARE_PATH_LIST - - # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics @@ -2298,18 +2172,17 @@ m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl -m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ -if test yes = "$GCC"; then +if test "$GCC" = yes; then case $host_os in - darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; - *) lt_awk_arg='/^libraries:/' ;; + darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; + *) lt_awk_arg="/^libraries:/" ;; esac case $host_os in - mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; - *) lt_sed_strip_eq='s|=/|/|g' ;; + mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; + *) lt_sed_strip_eq="s,=/,/,g" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in @@ -2325,35 +2198,28 @@ ;; esac # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary... + # 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` - # ...but if some path component already ends with the multilib dir we assume - # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). - case "$lt_multi_os_dir; $lt_search_path_spec " in - "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) - lt_multi_os_dir= - ;; - esac + 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" - elif test -n "$lt_multi_os_dir"; then + 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; +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; + lt_foo="/" $lt_i lt_foo; } else { lt_count--; } @@ -2367,7 +2233,7 @@ # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ - $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; + $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else @@ -2376,7 +2242,7 @@ library_names_spec= libname_spec='lib$name' soname_spec= -shrext_cmds=.so +shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= @@ -2393,17 +2259,14 @@ # flags to be left without arguments need_version=unknown -AC_ARG_VAR([LT_SYS_LIBRARY_PATH], -[User-defined run-time library search path.]) - case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname.a' + 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' + soname_spec='${libname}${release}${shared_ext}$major' ;; aix[[4-9]]*) @@ -2411,91 +2274,41 @@ need_lib_prefix=no need_version=no hardcode_into_libs=yes - if test ia64 = "$host_cpu"; then + 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' + 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 + # 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 + echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac - # Using Import Files as archive members, it is possible to support - # filename-based versioning of shared library archives on AIX. While - # this would work for both with and without runtime linking, it will - # prevent static linking of such archives. So we do filename-based - # shared library versioning with .so extension only, which is used - # when both runtime linking and shared linking is enabled. - # Unfortunately, runtime linking may impact performance, so we do - # not want this to be the default eventually. Also, we use the - # versioned .so libs for executables only if there is the -brtl - # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. - # To allow for filename-based versioning support, we need to create - # libNAME.so.V as an archive file, containing: - # *) an Import File, referring to the versioned filename of the - # archive as well as the shared archive member, telling the - # bitwidth (32 or 64) of that shared object, and providing the - # list of exported symbols of that shared object, eventually - # decorated with the 'weak' keyword - # *) the shared object with the F_LOADONLY flag set, to really avoid - # it being seen by the linker. - # At run time we better use the real file rather than another symlink, - # but for link time we create the symlink libNAME.so -> libNAME.so.V - - case $with_aix_soname,$aix_use_runtimelinking in - # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct + # 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. - aix,yes) # traditional libtool - dynamic_linker='AIX unversionable lib.so' + 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' - ;; - aix,no) # traditional AIX only - dynamic_linker='AIX lib.a[(]lib.so.V[)]' + 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' - ;; - svr4,*) # full svr4 only - dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" - library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' - # We do not specify a path in Import Files, so LIBPATH fires. - shlibpath_overrides_runpath=yes - ;; - *,yes) # both, prefer svr4 - dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" - library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' - # unpreferred sharedlib libNAME.a needs extra handling - postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' - postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' - # We do not specify a path in Import Files, so LIBPATH fires. - shlibpath_overrides_runpath=yes - ;; - *,no) # both, prefer aix - dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" - library_names_spec='$libname$release.a $libname.a' - soname_spec='$libname$release$shared_ext$major' - # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling - postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' - postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' - ;; - esac + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi shlibpath_var=LIBPATH fi ;; @@ -2505,18 +2318,18 @@ 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' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $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' + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) - library_names_spec='$libname$shared_ext' + library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; @@ -2524,8 +2337,8 @@ bsdi[[45]]*) version_type=linux # correct to gnu/linux during the next big refactor 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' + 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" @@ -2537,7 +2350,7 @@ cygwin* | mingw* | pw32* | cegcc*) version_type=windows - shrext_cmds=.dll + shrext_cmds=".dll" need_version=no need_lib_prefix=no @@ -2546,8 +2359,8 @@ # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ + 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~ @@ -2563,17 +2376,17 @@ case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix - soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' + soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' @@ -2582,8 +2395,8 @@ *,cl*) # Native MSVC libname_spec='$name' - soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' - library_names_spec='$libname.dll.lib' + soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' case $build_os in mingw*) @@ -2610,7 +2423,7 @@ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) - sys_lib_search_path_spec=$LIB + sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` @@ -2623,8 +2436,8 @@ esac # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ + 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' @@ -2637,7 +2450,7 @@ *) # Assume MSVC wrapper - library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' + library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac @@ -2650,8 +2463,8 @@ version_type=darwin need_lib_prefix=no need_version=no - library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' - soname_spec='$libname$release$major$shared_ext' + library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' @@ -2664,8 +2477,8 @@ version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' + 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 ;; @@ -2683,13 +2496,12 @@ version_type=freebsd-$objformat case $version_type in freebsd-elf*) - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' + 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' + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac @@ -2714,15 +2526,26 @@ esac ;; +gnu*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=no + shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; @@ -2740,15 +2563,14 @@ 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 32 = "$HPUX_IA64_MODE"; then + 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" - sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' @@ -2756,8 +2578,8 @@ 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' + 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 ;; @@ -2766,8 +2588,8 @@ 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' + 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, ... @@ -2780,8 +2602,8 @@ version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' + 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 @@ -2792,7 +2614,7 @@ case $host_os in nonstopux*) version_type=nonstopux ;; *) - if test yes = "$lt_cv_prog_gnu_ld"; then + if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix @@ -2800,8 +2622,8 @@ 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' + 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= @@ -2820,8 +2642,8 @@ 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" + 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 ;; @@ -2830,33 +2652,13 @@ dynamic_linker=no ;; -linux*android*) - version_type=none # Android doesn't support versioned libraries. - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext' - soname_spec='$libname$release$shared_ext' - finish_cmds= - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - - # 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 - - dynamic_linker='Android linker' - # Don't embed -rpath directories since the linker doesn't support them. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - ;; - # This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) +linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' + 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 @@ -2881,18 +2683,10 @@ # before this can be enabled. hardcode_into_libs=yes - # Add ABI-specific directories to the system library path. - sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" - - # Ideally, we could use ldconfig to report *all* directores which are - # searched for libraries, however this is still not possible. Aside from not - # being certain /sbin/ldconfig is available, command - # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, - # even though it is searched at run-time. Try to do the best guess by - # appending ld.so.conf contents (and includes) to the search path. + # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" + 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 @@ -2904,17 +2698,29 @@ 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' + 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' + 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 @@ -2924,7 +2730,7 @@ newsos6) version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + 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 ;; @@ -2933,68 +2739,58 @@ version_type=qnx need_lib_prefix=no need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; -openbsd* | bitrig*) +openbsd*) version_type=sunos - sys_lib_dlsearch_path_spec=/usr/lib + sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - need_version=no - else - need_version=yes - fi - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' + # 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 - shlibpath_overrides_runpath=yes + 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' - version_type=windows - shrext_cmds=.dll - need_version=no + shrext_cmds=".dll" need_lib_prefix=no - # OS/2 can only load a DLL with a base name of 8 characters or less. - soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; - v=$($ECHO $release$versuffix | tr -d .-); - n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); - $ECHO $n$v`$shared_ext' - library_names_spec='${libname}_dll.$libext' + library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' - shlibpath_var=BEGINLIBPATH - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' + shlibpath_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' + 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 + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) @@ -3005,8 +2801,8 @@ version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' + 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 @@ -3016,11 +2812,11 @@ sunos4*) version_type=sunos - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' + 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 yes = "$with_gnu_ld"; then + if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes @@ -3028,8 +2824,8 @@ sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' + 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) @@ -3050,24 +2846,24 @@ ;; sysv4*MP*) - if test -d /usr/nec; then + if test -d /usr/nec ;then version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' - soname_spec='$libname$shared_ext.$major' + 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=sco + 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' + 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 yes = "$with_gnu_ld"; then + 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' @@ -3085,7 +2881,7 @@ version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + 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 @@ -3093,8 +2889,8 @@ uts4*) version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' + 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 ;; @@ -3103,30 +2899,20 @@ ;; esac AC_MSG_RESULT([$dynamic_linker]) -test no = "$dynamic_linker" && can_build_shared=no +test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test yes = "$GCC"; then +if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi -if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then - sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec +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 set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then - sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec +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 -# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... -configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec - -# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code -func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" - -# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool -configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH - _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) @@ -3159,41 +2945,39 @@ [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], [configure_time_dlsearch_path], [2], - [Detected run-time system search path for libraries]) -_LT_DECL([], [configure_time_lt_sys_library_path], [2], - [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) +_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], + [Run-time system search path for libraries]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- -# find a file program that can recognize shared library +# 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_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 + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do - IFS=$lt_save_ifs + IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$1"; then - lt_cv_path_MAGIC_CMD=$ac_dir/"$1" + if test -f $ac_dir/$1; then + lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD=$lt_cv_path_MAGIC_CMD + 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 : @@ -3216,11 +3000,11 @@ break fi done - IFS=$lt_save_ifs - MAGIC_CMD=$lt_save_MAGIC_CMD + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) -MAGIC_CMD=$lt_cv_path_MAGIC_CMD +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else @@ -3238,7 +3022,7 @@ # _LT_PATH_MAGIC # -------------- -# find a file program that can recognize a shared library +# find a file program which can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then @@ -3265,16 +3049,16 @@ AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], - [test no = "$withval" || with_gnu_ld=yes], + [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld -if test yes = "$GCC"; then +if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) - # gcc leaves a trailing carriage return, which upsets mingw + # 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` ;; @@ -3288,7 +3072,7 @@ 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 + test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. @@ -3299,37 +3083,37 @@ with_gnu_ld=unknown ;; esac -elif test yes = "$with_gnu_ld"; then +elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do - IFS=$lt_save_ifs + 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 + 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 conftest.i -cat conftest.i conftest.i >conftest2.i -: ${lt_DD:=$DD} -AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], -[if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then - cmp -s conftest.i conftest.out \ - && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: -fi]) -rm -f conftest.i conftest2.i conftest.out]) -])# _LT_PATH_DD - - -# _LT_CMD_TRUNCATE -# ---------------- -# find command to truncate a binary pipe -m4_defun([_LT_CMD_TRUNCATE], -[m4_require([_LT_PATH_DD]) -AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], -[printf 0123456789abcdef0123456789abcdef >conftest.i -cat conftest.i conftest.i >conftest2.i -lt_cv_truncate_bin= -if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then - cmp -s conftest.i conftest.out \ - && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" -fi -rm -f conftest.i conftest2.i conftest.out -test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) -_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], - [Command to truncate a binary pipe]) -])# _LT_CMD_TRUNCATE - - # _LT_CHECK_MAGIC_METHOD # ---------------------- # how to check for library dependencies @@ -3452,13 +3199,13 @@ # 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. +# `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path -# that responds to the $file_magic_cmd with a given extended regex. -# If you have 'file' or equivalent on your system and you're not sure -# whether 'pass_all' will *always* work, you probably want this one. +# which responds to the $file_magic_cmd with a given extended regex. +# If you have `file' or equivalent on your system and you're not sure +# whether `pass_all' will *always* work, you probably want this one. case $host_os in aix[[4-9]]*) @@ -3485,7 +3232,8 @@ # 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 + # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. + if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else @@ -3521,6 +3269,10 @@ fi ;; +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + haiku*) lt_cv_deplibs_check_method=pass_all ;; @@ -3559,11 +3311,11 @@ ;; # This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) +linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; -netbsd*) +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 @@ -3581,8 +3333,8 @@ lt_cv_deplibs_check_method=pass_all ;; -openbsd* | bitrig*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then +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)$' @@ -3635,9 +3387,6 @@ tpf*) lt_cv_deplibs_check_method=pass_all ;; -os2*) - lt_cv_deplibs_check_method=pass_all - ;; esac ]) @@ -3678,38 +3427,33 @@ AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. - lt_cv_path_NM=$NM + lt_cv_path_NM="$NM" else - lt_nm_to_check=${ac_tool_prefix}nm + lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS=$lt_save_ifs + IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. - tmp_nm=$ac_dir/$lt_tmp_nm - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. - # Adding the 'sed 1q' prevents false positives on HP-UX, which says: + # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file - # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty - case $build_os in - mingw*) lt_bad_file=conftest.nm/nofile ;; - *) lt_bad_file=/dev/null ;; - esac - case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in - *$lt_bad_file* | *'Invalid file or object type'*) + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" - break 2 + break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" - break 2 + break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but @@ -3720,21 +3464,21 @@ esac fi done - IFS=$lt_save_ifs + IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi]) -if test no != "$lt_cv_path_NM"; then - NM=$lt_cv_path_NM +if test "$lt_cv_path_NM" != "no"; then + NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) - case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in + case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) - DUMPBIN="$DUMPBIN -symbols -headers" + DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: @@ -3742,8 +3486,8 @@ esac fi AC_SUBST([DUMPBIN]) - if test : != "$DUMPBIN"; then - NM=$DUMPBIN + if test "$DUMPBIN" != ":"; then + NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm @@ -3789,8 +3533,8 @@ case $host_os in cygwin* | mingw* | pw32* | cegcc*) - # two different shell functions defined in ltmain.sh; - # decide which one to use based on capabilities of $DLLTOOL + # two different shell functions defined in ltmain.sh + # decide which to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib @@ -3802,7 +3546,7 @@ ;; *) # fallback: assume linklib IS sharedlib - lt_cv_sharedlib_from_linklib_cmd=$ECHO + lt_cv_sharedlib_from_linklib_cmd="$ECHO" ;; esac ]) @@ -3829,28 +3573,13 @@ lt_cv_path_mainfest_tool=yes fi rm -f conftest*]) -if test yes != "$lt_cv_path_mainfest_tool"; then +if test "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ])# _LT_PATH_MANIFEST_TOOL -# _LT_DLL_DEF_P([FILE]) -# --------------------- -# True iff FILE is a Windows DLL '.def' file. -# Keep in sync with func_dll_def_p in the libtool script -AC_DEFUN([_LT_DLL_DEF_P], -[dnl - test DEF = "`$SED -n dnl - -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace - -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments - -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl - -e q dnl Only consider the first "real" line - $1`" dnl -])# _LT_DLL_DEF_P - - # LT_LIB_M # -------- # check for math library @@ -3862,11 +3591,11 @@ # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) - AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) + AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) - AC_CHECK_LIB(m, cos, LIBM=-lm) + AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac AC_SUBST([LIBM]) @@ -3885,7 +3614,7 @@ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= -if test yes = "$GCC"; then +if test "$GCC" = yes; then case $cc_basename in nvcc*) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; @@ -3937,7 +3666,7 @@ symcode='[[ABCDGISTW]]' ;; hpux*) - if test ia64 = "$host_cpu"; then + if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi ;; @@ -3970,44 +3699,14 @@ symcode='[[ABCDGIRSTW]]' ;; esac -if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Gets list of data symbols to import. - lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" - # Adjust the below global symbol transforms to fixup imported variables. - lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" - lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" - lt_c_name_lib_hook="\ - -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ - -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" -else - # Disable hooks by default. - lt_cv_sys_global_symbol_to_import= - lt_cdecl_hook= - lt_c_name_hook= - lt_c_name_lib_hook= -fi - # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n"\ -$lt_cdecl_hook\ -" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ -$lt_c_name_hook\ -" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" - -# Transform an extracted symbol line into symbol name with lib prefix and -# symbol address. -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ -$lt_c_name_lib_hook\ -" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ -" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" +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= @@ -4025,24 +3724,21 @@ # 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, - # D for any global variable and I for any imported variable. + # 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};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ -" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ -" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ -" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ -" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ -" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ -" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ +" {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'" @@ -4082,11 +3778,11 @@ if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE -/* DATA imports from DLLs on WIN32 can't be const, because runtime +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT@&t@_DLSYM_CONST -#elif defined __osf__ +#elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT@&t@_DLSYM_CONST #else @@ -4112,7 +3808,7 @@ { { "@PROGRAM@", (void *) 0 }, _LT_EOF - $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; @@ -4132,9 +3828,9 @@ mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS - LIBS=conftstm.$ac_objext + 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 + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS @@ -4155,7 +3851,7 @@ rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. - if test yes = "$pipe_works"; then + if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= @@ -4182,16 +3878,12 @@ [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_import], [lt_cv_sys_global_symbol_to_import], [1], - [Transform the output of nm into a list of symbols to manually relocate]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) -_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], - [The name lister interface]) _LT_DECL([], [nm_file_list_spec], [1], [Specify filename containing input files for $NM]) ]) # _LT_CMD_GLOBAL_SYMBOLS @@ -4207,18 +3899,17 @@ m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. - if test yes = "$GXX"; then + if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. - if test ia64 = "$host_cpu"; then + if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; amigaos*) @@ -4229,8 +3920,8 @@ ;; 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'. + # 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 @@ -4246,11 +3937,6 @@ # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - case $host_os in - os2*) - _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' - ;; - esac ;; darwin* | rhapsody*) # PIC is the default on this platform @@ -4300,7 +3986,7 @@ case $host_os in aix[[4-9]]*) # All AIX code is PIC. - if test ia64 = "$host_cpu"; then + if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else @@ -4341,14 +4027,14 @@ 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 ia64 != "$host_cpu"; then + _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' + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default @@ -4377,7 +4063,7 @@ ;; esac ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler @@ -4385,7 +4071,7 @@ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) - # old Intel C++ for x86_64, which still supported -KPIC. + # 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' @@ -4441,7 +4127,7 @@ ;; esac ;; - netbsd*) + netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise @@ -4530,18 +4216,17 @@ fi ], [ - if test yes = "$GCC"; then + 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 ia64 = "$host_cpu"; then + if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; amigaos*) @@ -4552,8 +4237,8 @@ ;; 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'. + # 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 @@ -4570,11 +4255,6 @@ # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - case $host_os in - os2*) - _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' - ;; - esac ;; darwin* | rhapsody*) @@ -4645,7 +4325,7 @@ case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - if test ia64 = "$host_cpu"; then + if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else @@ -4653,30 +4333,11 @@ fi ;; - 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' - case $cc_basename in - nagfor*) - # NAG Fortran compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - esac - ;; - 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']) - case $host_os in - os2*) - _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' - ;; - esac ;; hpux9* | hpux10* | hpux11*) @@ -4692,7 +4353,7 @@ ;; 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' + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) @@ -4701,9 +4362,9 @@ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in - # old Intel for x86_64, which still supported -KPIC. + # 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' @@ -4728,12 +4389,6 @@ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; - tcc*) - # Fabrice Bellard et al's Tiny 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)='-static' - ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) @@ -4831,7 +4486,7 @@ ;; sysv4*MP*) - if test -d /usr/nec; then + if test -d /usr/nec ;then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi @@ -4860,7 +4515,7 @@ fi ]) case $host_os in - # For platforms that do not support PIC, -DPIC is meaningless: + # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; @@ -4926,21 +4581,17 @@ 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 GNU nm, but means don't demangle to AIX nm. - # Without the "-l" option, or with the "-B" option, AIX nm treats - # weak defined symbols like other global defined symbols, whereas - # GNU nm marks them as "W". - # While the 'weak' keyword is ignored in the Export File, we need - # it in the Import File for the 'aix-soname' feature, so we have - # to replace the "-B" option with "-P" for AIX nm. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global defined + # symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else - _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' + _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 + _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) case $cc_basename in @@ -4953,6 +4604,9 @@ ;; esac ;; + linux* | k*bsd*-gnu | 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' ;; @@ -4986,9 +4640,9 @@ # 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'. + # 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 @@ -5004,7 +4658,7 @@ # 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 yes != "$GCC"; then + if test "$GCC" != yes; then with_gnu_ld=no fi ;; @@ -5012,9 +4666,12 @@ # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; - openbsd* | bitrig*) + openbsd*) with_gnu_ld=no ;; + linux* | k*bsd*-gnu | gnu*) + _LT_TAGVAR(link_all_deplibs, $1)=no + ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes @@ -5022,7 +4679,7 @@ # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no - if test yes = "$with_gnu_ld"; then + if test "$with_gnu_ld" = yes; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility @@ -5044,24 +4701,24 @@ esac fi - if test yes = "$lt_use_gnu_ld_interface"; then + if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='$wl' + wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' + _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' + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no - case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in + 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 ... @@ -5074,7 +4731,7 @@ case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken - if test ia64 != "$host_cpu"; then + if test "$host_cpu" != ia64; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 @@ -5093,7 +4750,7 @@ 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_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) @@ -5109,7 +4766,7 @@ _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' + _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 @@ -5119,7 +4776,7 @@ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes @@ -5127,89 +4784,61 @@ _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file, use it as - # is; otherwise, prepend EXPORTS... - _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); 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' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; haiku*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; - os2*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - shrext_cmds=.dll - _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - prefix_cmds="$SED"~ - if test EXPORTS = "`$SED 1q $export_symbols`"; then - prefix_cmds="$prefix_cmds -e 1d"; - fi~ - prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ - cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - ;; - interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' + _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' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no - if test linux-dietlibc = "$host_os"; then + 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 no = "$tmp_diet" + && test "$tmp_diet" = no then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; @@ -5220,47 +4849,42 @@ lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; - nagfor*) # NAGFOR 5.3 - tmp_sharedflag='-Wl,-shared' ;; xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac - _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - if test yes = "$supports_anon_versioning"; then + 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' + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in - tcc*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' - ;; xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' - if test yes = "$supports_anon_versioning"; then + if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac @@ -5269,13 +4893,13 @@ fi ;; - netbsd*) + 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 $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; @@ -5293,8 +4917,8 @@ _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi @@ -5306,7 +4930,7 @@ _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot +*** 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 @@ -5321,9 +4945,9 @@ # 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' + _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 @@ -5340,15 +4964,15 @@ *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac - if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then + 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)= @@ -5364,7 +4988,7 @@ # 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 yes = "$GCC" && test -z "$lt_prog_compiler_static"; then + 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 @@ -5372,57 +4996,34 @@ ;; aix[[4-9]]*) - if test ia64 = "$host_cpu"; then + 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= + no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to GNU nm, but means don't demangle to AIX nm. - # Without the "-l" option, or with the "-B" option, AIX nm treats - # weak defined symbols like other global defined symbols, whereas - # GNU nm marks them as "W". - # While the 'weak' keyword is ignored in the Export File, we need - # it in the Import File for the 'aix-soname' feature, so we have - # to replace the "-B" option with "-P" for AIX nm. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global + # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else - _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' + _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 - # have runtime linking enabled, and use it for executables. - # For shared libraries, we enable/disable runtime linking - # depending on the kind of the shared library created - - # when "with_aix_soname,aix_use_runtimelinking" is: - # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables - # "aix,yes" lib.so shared, rtl:yes, for executables - # lib.a static archive - # "both,no" lib.so.V(shr.o) shared, rtl:yes - # lib.a(lib.so.V) shared, rtl:no, for executables - # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a(lib.so.V) shared, rtl:no - # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a static archive + # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do - if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done - if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then - # With aix-soname=svr4, we create the lib.so.V shared archives only, - # so we don't have lib.a shared libs to link our executables. - # We have to force runtime linking in this case. - aix_use_runtimelinking=yes - LDFLAGS="$LDFLAGS -Wl,-brtl" - fi ;; esac @@ -5441,21 +5042,13 @@ _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,' - case $with_aix_soname,$aix_use_runtimelinking in - aix,*) ;; # traditional, no import file - svr4,* | *,yes) # use import file - # The Import File defines what to hardcode. - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=no - ;; - esac + _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' - if test yes = "$GCC"; then + 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` + collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then @@ -5474,80 +5067,62 @@ ;; esac shared_flag='-shared' - if test yes = "$aix_use_runtimelinking"; then - shared_flag="$shared_flag "'$wl-G' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' fi - # Need to ensure runtime linking is disabled for the traditional - # shared library, or the linker may eventually find shared libraries - # /with/ Import File - we do not want to mix them. - shared_flag_aix='-shared' - shared_flag_svr4='-shared $wl-G' + _LT_TAGVAR(link_all_deplibs, $1)=no else # not using gcc - if test ia64 = "$host_cpu"; then + 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 yes = "$aix_use_runtimelinking"; then - shared_flag='$wl-G' + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' else - shared_flag='$wl-bM:SRE' + shared_flag='${wl}-bM:SRE' fi - shared_flag_aix='$wl-bM:SRE' - shared_flag_svr4='$wl-G' fi fi - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' + _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,yes = "$with_aix_soname,$aix_use_runtimelinking"; then + if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else - if test ia64 = "$host_cpu"; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' + 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" + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' - if test yes = "$with_gnu_ld"; then + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' - # -brtl affects multiple linker settings, -berok does not and is overridden later - compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' - if test svr4 != "$with_aix_soname"; then - # This is similar to how AIX traditionally builds its shared libraries. - _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' - fi - if test aix != "$with_aix_soname"; then - _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' - else - # used by -dlpreopen to get the symbols - _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' - fi - _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' + # 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 ;; @@ -5556,7 +5131,7 @@ 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_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) @@ -5586,17 +5161,16 @@ # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. - shrext_cmds=.dll + shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' - _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then - cp "$export_symbols" "$output_objdir/$soname.def"; - echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; - else - $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' + _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes @@ -5605,18 +5179,18 @@ # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile=$lt_outputfile.exe - lt_tool_outputfile=$lt_tool_outputfile.exe - ;; - esac~ - if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' ;; *) # Assume MSVC wrapper @@ -5625,7 +5199,7 @@ # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. - shrext_cmds=.dll + shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. @@ -5675,33 +5249,33 @@ ;; hpux9*) - if test yes = "$GCC"; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' + _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_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10*) - if test yes,no = "$GCC,$with_gnu_ld"; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + if test "$GCC" = yes && test "$with_gnu_ld" = no; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi - if test no = "$with_gnu_ld"; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' + if test "$with_gnu_ld" = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$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' + _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 @@ -5709,25 +5283,25 @@ ;; hpux11*) - if test yes,no = "$GCC,$with_gnu_ld"; then + if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' + _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}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) m4_if($1, [], [ @@ -5735,14 +5309,14 @@ # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) _LT_LINKER_OPTION([if $CC understands -b], _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], - [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], + [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], - [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) + [_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 no = "$with_gnu_ld"; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' + 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 @@ -5753,7 +5327,7 @@ *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' + _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. @@ -5764,16 +5338,16 @@ ;; irix5* | irix6* | nonstopux*) - if test yes = "$GCC"; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], [lt_cv_irix_exported_symbol], - [save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" + [save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" AC_LINK_IFELSE( [AC_LANG_SOURCE( [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], @@ -5786,32 +5360,22 @@ end]])])], [lt_cv_irix_exported_symbol=yes], [lt_cv_irix_exported_symbol=no]) - LDFLAGS=$save_LDFLAGS]) - if test yes = "$lt_cv_irix_exported_symbol"; then - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' + LDFLAGS="$save_LDFLAGS"]) + if test "$lt_cv_irix_exported_symbol" = yes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + _LT_TAGVAR(hardcode_libdir_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 ;; - linux*) - case $cc_basename in - tcc*) - # Fabrice Bellard et al's Tiny C Compiler - _LT_TAGVAR(ld_shlibs, $1)=yes - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - netbsd*) + 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 @@ -5825,7 +5389,7 @@ 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_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; @@ -5833,19 +5397,27 @@ *nto* | *qnx*) ;; - openbsd* | bitrig*) + 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__`"; then + 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' + _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 - _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' + 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 @@ -5856,53 +5428,33 @@ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - shrext_cmds=.dll - _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - prefix_cmds="$SED"~ - if test EXPORTS = "`$SED 1q $export_symbols`"; then - prefix_cmds="$prefix_cmds -e 1d"; - fi~ - prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ - cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) - if test yes = "$GCC"; then - _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + if test "$GCC" = yes; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag - if test yes = "$GCC"; then - _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + if test "$GCC" = yes; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' + $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' @@ -5913,24 +5465,24 @@ solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' - if test yes = "$GCC"; then - wlarc='$wl' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' + if test "$GCC" = yes; then + wlarc='${wl}' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' - _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(archive_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' + $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' + 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' + $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi @@ -5940,11 +5492,11 @@ 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 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 yes = "$GCC"; then - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' + 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 @@ -5954,10 +5506,10 @@ ;; sunos4*) - if test sequent = "$host_vendor"; then + 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' + _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 @@ -6006,43 +5558,43 @@ ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' - if test yes = "$GCC"; 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' + 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' + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) - # Note: We CANNOT use -z defs as we might desire, because we do not + # 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(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_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' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' - if test yes = "$GCC"; 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' + 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' + _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 ;; @@ -6057,17 +5609,17 @@ ;; esac - if test sni = "$host_vendor"; then + 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' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) -test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no +test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld @@ -6084,7 +5636,7 @@ # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - if test yes,yes = "$GCC,$enable_shared"; then + 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. @@ -6164,12 +5716,12 @@ _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 + [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 + [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary and the resulting library dependency is - "absolute", i.e impossible to change by setting $shlibpath_var if the + "absolute", i.e impossible to change by setting ${shlibpath_var} if the library is relocated]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR @@ -6210,10 +5762,10 @@ # ------------------------ # 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'. +# the compiler configuration to `libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl -lt_save_CC=$CC +lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. @@ -6249,18 +5801,18 @@ LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB - # Report what library types will actually be built + # 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 no = "$can_build_shared" && enable_shared=no + 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 yes = "$enable_shared" && enable_static=no + test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' @@ -6268,12 +5820,8 @@ ;; aix[[4-9]]*) - if test ia64 != "$host_cpu"; then - case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in - yes,aix,yes) ;; # shared object as lib.so file only - yes,svr4,*) ;; # shared object as lib.so archive member only - yes,*) enable_static=no ;; # shared object in lib.a archive as well - esac + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no fi ;; esac @@ -6281,13 +5829,13 @@ AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. - test yes = "$enable_shared" || enable_static=yes + test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP -CC=$lt_save_CC +CC="$lt_save_CC" ])# _LT_LANG_C_CONFIG @@ -6295,14 +5843,14 @@ # -------------------------- # 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'. +# the compiler configuration to `libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl -if test -n "$CXX" && ( test no != "$CXX" && - ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || - (test g++ != "$CXX"))); then +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 @@ -6344,7 +5892,7 @@ # 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 yes != "$_lt_caught_CXX_error"; then +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;" @@ -6386,35 +5934,35 @@ if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately - if test yes = "$GXX"; then + if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi - if test yes = "$GXX"; then + if test "$GXX" = yes; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. - if test yes = "$with_gnu_ld"; then - _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + if test "$with_gnu_ld" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' + _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' + 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' + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi @@ -6450,30 +5998,18 @@ _LT_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) - if test ia64 = "$host_cpu"; then + 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= + 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 - # have runtime linking enabled, and use it for executables. - # For shared libraries, we enable/disable runtime linking - # depending on the kind of the shared library created - - # when "with_aix_soname,aix_use_runtimelinking" is: - # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables - # "aix,yes" lib.so shared, rtl:yes, for executables - # lib.a static archive - # "both,no" lib.so.V(shr.o) shared, rtl:yes - # lib.a(lib.so.V) shared, rtl:no, for executables - # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a(lib.so.V) shared, rtl:no - # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a static archive + # 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 @@ -6483,13 +6019,6 @@ ;; esac done - if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then - # With aix-soname=svr4, we create the lib.so.V shared archives only, - # so we don't have lib.a shared libs to link our executables. - # We have to force runtime linking in this case. - aix_use_runtimelinking=yes - LDFLAGS="$LDFLAGS -Wl,-brtl" - fi ;; esac @@ -6508,21 +6037,13 @@ _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,' - case $with_aix_soname,$aix_use_runtimelinking in - aix,*) ;; # no import file - svr4,* | *,yes) # use import file - # The Import File defines what to hardcode. - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=no - ;; - esac + _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' - if test yes = "$GXX"; then + 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` + collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then @@ -6540,84 +6061,64 @@ fi esac shared_flag='-shared' - if test yes = "$aix_use_runtimelinking"; then - shared_flag=$shared_flag' $wl-G' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' fi - # Need to ensure runtime linking is disabled for the traditional - # shared library, or the linker may eventually find shared libraries - # /with/ Import File - we do not want to mix them. - shared_flag_aix='-shared' - shared_flag_svr4='-shared $wl-G' else # not using gcc - if test ia64 = "$host_cpu"; then + 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 yes = "$aix_use_runtimelinking"; then - shared_flag='$wl-G' + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' else - shared_flag='$wl-bM:SRE' + shared_flag='${wl}-bM:SRE' fi - shared_flag_aix='$wl-bM:SRE' - shared_flag_svr4='$wl-G' fi fi - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' + _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,yes = "$with_aix_soname,$aix_use_runtimelinking"; then + 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. - # The "-G" linker flag allows undefined symbols. - _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' + _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" + _LT_TAGVAR(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 -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else - if test ia64 = "$host_cpu"; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' + 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" + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' - if test yes = "$with_gnu_ld"; then + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' - # -brtl affects multiple linker settings, -berok does not and is overridden later - compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' - if test svr4 != "$with_aix_soname"; then - # This is similar to how AIX traditionally builds its shared - # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. - _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' - fi - if test aix != "$with_aix_soname"; then - _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' - else - # used by -dlpreopen to get the symbols - _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' - fi - _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' + # 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 ;; @@ -6627,7 +6128,7 @@ _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' + _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 @@ -6655,58 +6156,57 @@ # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. - shrext_cmds=.dll + shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' - _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then - cp "$export_symbols" "$output_objdir/$soname.def"; - echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; - else - $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' + _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile=$lt_outputfile.exe - lt_tool_outputfile=$lt_tool_outputfile.exe - ;; - esac~ - func_to_tool_file "$lt_outputfile"~ - if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + func_to_tool_file "$lt_outputfile"~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file, use it as - # is; otherwise, prepend EXPORTS... - _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); 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' + _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 @@ -6717,34 +6217,6 @@ _LT_DARWIN_LINKER_FEATURES($1) ;; - os2*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - shrext_cmds=.dll - _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - prefix_cmds="$SED"~ - if test EXPORTS = "`$SED 1q $export_symbols`"; then - prefix_cmds="$prefix_cmds -e 1d"; - fi~ - prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ - cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - ;; - dgux*) case $cc_basename in ec++*) @@ -6779,15 +6251,18 @@ _LT_TAGVAR(ld_shlibs, $1)=yes ;; + gnu*) + ;; + haiku*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; hpux9*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' + _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 @@ -6799,7 +6274,7 @@ _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 "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' + _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. @@ -6808,11 +6283,11 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) - if test yes = "$GXX"; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' + if test "$GXX" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no @@ -6822,15 +6297,15 @@ ;; hpux10*|hpux11*) - if test no = "$with_gnu_ld"; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' + 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' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi @@ -6856,13 +6331,13 @@ 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' + _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}+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' + _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 @@ -6873,20 +6348,20 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) - if test yes = "$GXX"; then - if test no = "$with_gnu_ld"; then + 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' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi @@ -6901,22 +6376,22 @@ 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' + _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' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is @@ -6925,22 +6400,22 @@ _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) - if test yes = "$GXX"; then - if test no = "$with_gnu_ld"; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler @@ -6948,8 +6423,8 @@ # 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' + _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. @@ -6958,10 +6433,10 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' + _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. @@ -6975,59 +6450,59 @@ # 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' + _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' + _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' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ - compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ + compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ - $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ - $RANLIB $oldlib' + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ + $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ + $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' @@ -7041,18 +6516,18 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' - _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - if test yes = "$supports_anon_versioning"; then + _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' + 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 ;; *) @@ -7060,10 +6535,10 @@ *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(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on @@ -7121,17 +6596,22 @@ _LT_TAGVAR(ld_shlibs, $1)=yes ;; - openbsd* | bitrig*) + 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__`"; 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' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else @@ -7147,9 +6627,9 @@ # 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_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_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using @@ -7167,17 +6647,17 @@ cxx*) case $host in osf3*) - _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~ - $RM $lib.exp' + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ + $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac @@ -7192,21 +6672,21 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) - if test yes,no = "$GXX,$with_gnu_ld"; then - _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists @@ -7252,9 +6732,9 @@ # 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_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' + $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 @@ -7262,7 +6742,7 @@ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, - # but understands '-z linker_flag'. + # 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' ;; @@ -7279,30 +6759,30 @@ ;; 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' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker - if test yes,no = "$GXX,$with_gnu_ld"; then - _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else - # g++ 2.7 appears to require '-G' NOT '-shared' on this + # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. - _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' + _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 $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $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 @@ -7310,11 +6790,11 @@ output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' + _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' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi @@ -7323,52 +6803,52 @@ ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -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' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) - # Note: We CANNOT use -z defs as we might desire, because we do not + # 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(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_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' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ - '"$_LT_TAGVAR(old_archive_cmds, $1)" + '"$_LT_TAGVAR(old_archive_cmds, $1)" _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ - '"$_LT_TAGVAR(reload_cmds, $1)" + '"$_LT_TAGVAR(reload_cmds, $1)" ;; *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _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 ;; @@ -7399,10 +6879,10 @@ esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) - test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no + test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - _LT_TAGVAR(GCC, $1)=$GXX - _LT_TAGVAR(LD, $1)=$LD + _LT_TAGVAR(GCC, $1)="$GXX" + _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change @@ -7429,7 +6909,7 @@ 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 yes != "$_lt_caught_CXX_error" +fi # test "$_lt_caught_CXX_error" != yes AC_LANG_POP ])# _LT_LANG_CXX_CONFIG @@ -7451,14 +6931,13 @@ AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) func_stripname_cnf () { - case @S|@2 in - .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; - *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; + case ${2} in + .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname_cnf ])# _LT_FUNC_STRIPNAME_CNF - # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose @@ -7542,13 +7021,13 @@ pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do - case $prev$p in + case ${prev}${p} in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. - if test x-L = "$p" || - test x-R = "$p"; then + if test $p = "-L" || + test $p = "-R"; then prev=$p continue fi @@ -7564,16 +7043,16 @@ case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac - if test no = "$pre_test_object_deps_done"; then - case $prev in + if test "$pre_test_object_deps_done" = no; then + case ${prev} in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then - _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p + _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" + _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 @@ -7581,9 +7060,9 @@ esac else if test -z "$_LT_TAGVAR(postdeps, $1)"; then - _LT_TAGVAR(postdeps, $1)=$prev$p + _LT_TAGVAR(postdeps, $1)="${prev}${p}" else - _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" + _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" fi fi prev= @@ -7598,15 +7077,15 @@ continue fi - if test no = "$pre_test_object_deps_done"; then + if test "$pre_test_object_deps_done" = no; then if test -z "$_LT_TAGVAR(predep_objects, $1)"; then - _LT_TAGVAR(predep_objects, $1)=$p + _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 + _LT_TAGVAR(postdep_objects, $1)="$p" else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi @@ -7637,6 +7116,51 @@ _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; + +linux*) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + if test "$solaris_use_stlport4" != yes; then + _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi + ;; + esac + ;; + +solaris*) + case $cc_basename in + CC* | sunCC*) + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + # Adding this requires a known-good setup of shared libraries for + # Sun compiler versions before 5.6, else PIC objects from an old + # archive will be linked into the output, leading to subtle bugs. + if test "$solaris_use_stlport4" != yes; then + _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi + ;; + esac + ;; esac ]) @@ -7645,7 +7169,7 @@ 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!^ !!'` + _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]) @@ -7665,10 +7189,10 @@ # -------------------------- # 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'. +# to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_LANG_PUSH(Fortran 77) -if test -z "$F77" || test no = "$F77"; then +if test -z "$F77" || test "X$F77" = "Xno"; then _lt_disable_F77=yes fi @@ -7705,7 +7229,7 @@ # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. -if test yes != "$_lt_disable_F77"; then +if test "$_lt_disable_F77" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t @@ -7727,7 +7251,7 @@ _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. - lt_save_CC=$CC + lt_save_CC="$CC" lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} @@ -7741,25 +7265,21 @@ AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) - test no = "$can_build_shared" && enable_shared=no + 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 yes = "$enable_shared" && enable_static=no + 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 ia64 != "$host_cpu"; then - case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in - yes,aix,yes) ;; # shared object as lib.so file only - yes,svr4,*) ;; # shared object as lib.so archive member only - yes,*) enable_static=no ;; # shared object in lib.a archive as well - esac + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no fi ;; esac @@ -7767,11 +7287,11 @@ AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. - test yes = "$enable_shared" || enable_static=yes + test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) - _LT_TAGVAR(GCC, $1)=$G77 - _LT_TAGVAR(LD, $1)=$LD + _LT_TAGVAR(GCC, $1)="$G77" + _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change @@ -7788,9 +7308,9 @@ fi # test -n "$compiler" GCC=$lt_save_GCC - CC=$lt_save_CC - CFLAGS=$lt_save_CFLAGS -fi # test yes != "$_lt_disable_F77" + CC="$lt_save_CC" + CFLAGS="$lt_save_CFLAGS" +fi # test "$_lt_disable_F77" != yes AC_LANG_POP ])# _LT_LANG_F77_CONFIG @@ -7800,11 +7320,11 @@ # ------------------------- # 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'. +# to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_LANG_PUSH(Fortran) -if test -z "$FC" || test no = "$FC"; then +if test -z "$FC" || test "X$FC" = "Xno"; then _lt_disable_FC=yes fi @@ -7841,7 +7361,7 @@ # 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 yes != "$_lt_disable_FC"; then +if test "$_lt_disable_FC" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t @@ -7863,7 +7383,7 @@ _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. - lt_save_CC=$CC + lt_save_CC="$CC" lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${FC-"f95"} @@ -7879,25 +7399,21 @@ AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) - test no = "$can_build_shared" && enable_shared=no + 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 yes = "$enable_shared" && enable_static=no + 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 ia64 != "$host_cpu"; then - case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in - yes,aix,yes) ;; # shared object as lib.so file only - yes,svr4,*) ;; # shared object as lib.so archive member only - yes,*) enable_static=no ;; # shared object in lib.a archive as well - esac + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no fi ;; esac @@ -7905,11 +7421,11 @@ AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. - test yes = "$enable_shared" || enable_static=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 + _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 @@ -7929,7 +7445,7 @@ GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS -fi # test yes != "$_lt_disable_FC" +fi # test "$_lt_disable_FC" != yes AC_LANG_POP ])# _LT_LANG_FC_CONFIG @@ -7939,7 +7455,7 @@ # -------------------------- # 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'. +# to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE @@ -7973,7 +7489,7 @@ CFLAGS=$GCJFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC -_LT_TAGVAR(LD, $1)=$LD +_LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. @@ -8006,7 +7522,7 @@ # -------------------------- # Ensure that the configuration variables for the GNU Go compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to 'libtool'. +# to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GO_CONFIG], [AC_REQUIRE([LT_PROG_GO])dnl AC_LANG_SAVE @@ -8040,7 +7556,7 @@ CFLAGS=$GOFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC -_LT_TAGVAR(LD, $1)=$LD +_LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # Go did not exist at the time GCC didn't implicitly link libc in. @@ -8073,7 +7589,7 @@ # ------------------------- # 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'. +# to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE @@ -8089,7 +7605,7 @@ 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 +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 @@ -8099,7 +7615,7 @@ _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. -lt_save_CC=$CC +lt_save_CC="$CC" lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC= @@ -8128,7 +7644,7 @@ [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) - test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" + test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) @@ -8237,7 +7753,7 @@ # 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 + test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in @@ -8254,9 +7770,9 @@ $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 10 -lt "$lt_ac_count" && break + 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 + if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi @@ -8280,7 +7796,27 @@ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], -[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then +[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) +# Try some XSI features +xsi_shell=no +( _lt_dummy="a/b/c" + test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,b/c, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +AC_MSG_RESULT([$xsi_shell]) +_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) + +AC_MSG_CHECKING([whether the shell understands "+="]) +lt_shell_append=no +( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ + >/dev/null 2>&1 \ + && lt_shell_append=yes +AC_MSG_RESULT([$lt_shell_append]) +_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) + +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false @@ -8304,9 +7840,102 @@ ])# _LT_CHECK_SHELL_FEATURES +# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) +# ------------------------------------------------------ +# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and +# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. +m4_defun([_LT_PROG_FUNCTION_REPLACE], +[dnl { +sed -e '/^$1 ()$/,/^} # $1 /c\ +$1 ()\ +{\ +m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) +} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: +]) + + +# _LT_PROG_REPLACE_SHELLFNS +# ------------------------- +# Replace existing portable implementations of several shell functions with +# equivalent extended shell implementations where those features are available.. +m4_defun([_LT_PROG_REPLACE_SHELLFNS], +[if test x"$xsi_shell" = xyes; then + _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac]) + + _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl + func_basename_result="${1##*/}"]) + + _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac + func_basename_result="${1##*/}"]) + + _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl + # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are + # positional parameters, so assign one to ordinary parameter first. + func_stripname_result=${3} + func_stripname_result=${func_stripname_result#"${1}"} + func_stripname_result=${func_stripname_result%"${2}"}]) + + _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl + func_split_long_opt_name=${1%%=*} + func_split_long_opt_arg=${1#*=}]) + + _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl + func_split_short_opt_arg=${1#??} + func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) + + _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl + case ${1} in + *.lo) func_lo2o_result=${1%.lo}.${objext} ;; + *) func_lo2o_result=${1} ;; + esac]) + + _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) + + _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) + + _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) +fi + +if test x"$lt_shell_append" = xyes; then + _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) + + _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl + func_quote_for_eval "${2}" +dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ + eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) + + # Save a `func_append' function call where possible by direct use of '+=' + sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +else + # Save a `func_append' function call even when '+=' is not available + sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +fi + +if test x"$_lt_function_replace_fail" = x":"; then + AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) +fi +]) + # _LT_PATH_CONVERSION_FUNCTIONS # ----------------------------- -# Determine what file name conversion functions should be used by +# Determine which file name conversion functions should be used by # func_to_host_file (and, implicitly, by func_to_host_path). These are needed # for certain cross-compile configurations and native mingw. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], @@ -8373,15 +8002,15 @@ # Helper functions for option handling. -*- Autoconf -*- # -# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software -# Foundation, Inc. +# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, +# Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. -# serial 8 ltoptions.m4 +# serial 7 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) @@ -8402,7 +8031,7 @@ [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 + [m4_warning([Unknown $1 option `$2'])])[]dnl ]) @@ -8448,15 +8077,13 @@ 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 `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_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], - [_LT_WITH_AIX_SONAME([aix])]) + [_LT_ENABLE_FAST_INSTALL]) ]) ])# _LT_SET_OPTIONS @@ -8484,7 +8111,7 @@ [_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.]) +put the `dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: @@ -8520,7 +8147,7 @@ _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.]) +put the `win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: @@ -8529,9 +8156,9 @@ # _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'. +# 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], @@ -8544,14 +8171,14 @@ *) enable_shared=no # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do - IFS=$lt_save_ifs + IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done - IFS=$lt_save_ifs + IFS="$lt_save_ifs" ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) @@ -8583,9 +8210,9 @@ # _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'. +# 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], @@ -8598,14 +8225,14 @@ *) enable_static=no # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do - IFS=$lt_save_ifs + IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done - IFS=$lt_save_ifs + IFS="$lt_save_ifs" ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) @@ -8637,9 +8264,9 @@ # _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'. +# 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], @@ -8652,14 +8279,14 @@ *) 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, + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do - IFS=$lt_save_ifs + IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done - IFS=$lt_save_ifs + IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) @@ -8676,14 +8303,14 @@ [_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.]) +the `fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put -the 'disable-fast-install' option into LT_INIT's first parameter.]) +the `disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: @@ -8691,64 +8318,11 @@ dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) -# _LT_WITH_AIX_SONAME([DEFAULT]) -# ---------------------------------- -# implement the --with-aix-soname flag, and support the `aix-soname=aix' -# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT -# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. -m4_define([_LT_WITH_AIX_SONAME], -[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl -shared_archive_member_spec= -case $host,$enable_shared in -power*-*-aix[[5-9]]*,yes) - AC_MSG_CHECKING([which variant of shared library versioning to provide]) - AC_ARG_WITH([aix-soname], - [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], - [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], - [case $withval in - aix|svr4|both) - ;; - *) - AC_MSG_ERROR([Unknown argument to --with-aix-soname]) - ;; - esac - lt_cv_with_aix_soname=$with_aix_soname], - [AC_CACHE_VAL([lt_cv_with_aix_soname], - [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) - with_aix_soname=$lt_cv_with_aix_soname]) - AC_MSG_RESULT([$with_aix_soname]) - if test aix != "$with_aix_soname"; then - # For the AIX way of multilib, we name the shared archive member - # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', - # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. - # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, - # the AIX toolchain works better with OBJECT_MODE set (default 32). - if test 64 = "${OBJECT_MODE-32}"; then - shared_archive_member_spec=shr_64 - else - shared_archive_member_spec=shr - fi - fi - ;; -*) - with_aix_soname=aix - ;; -esac - -_LT_DECL([], [shared_archive_member_spec], [0], - [Shared archive member basename, for filename based shared library versioning on AIX])dnl -])# _LT_WITH_AIX_SONAME - -LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) -LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) -LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) - - # _LT_WITH_PIC([MODE]) # -------------------- -# implement the --with-pic flag, and support the 'pic-only' and 'no-pic' +# 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'. +# 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@<:@=PKGS@:>@], @@ -8759,17 +8333,19 @@ *) pic_mode=default # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for lt_pkg in $withval; do - IFS=$lt_save_ifs + IFS="$lt_save_ifs" if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done - IFS=$lt_save_ifs + IFS="$lt_save_ifs" ;; esac], - [pic_mode=m4_default([$1], [default])]) + [pic_mode=default]) + +test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC @@ -8782,7 +8358,7 @@ [_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.]) +put the `pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: @@ -8805,8 +8381,7 @@ # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # -# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software -# Foundation, Inc. +# 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 @@ -8839,7 +8414,7 @@ # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support -# Autoconf-2.59, which quotes differently. +# 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])], @@ -8850,7 +8425,7 @@ # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ -# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. +# 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 @@ -8930,7 +8505,7 @@ # ltversion.m4 -- version numbers -*- Autoconf -*- # -# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. +# Copyright (C) 2004 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # This file is free software; the Free Software Foundation gives @@ -8939,23 +8514,22 @@ # @configure_input@ -# serial 4179 ltversion.m4 +# serial 3337 ltversion.m4 # This file is part of GNU Libtool -m4_define([LT_PACKAGE_VERSION], [2.4.6]) -m4_define([LT_PACKAGE_REVISION], [2.4.6]) +m4_define([LT_PACKAGE_VERSION], [2.4.2]) +m4_define([LT_PACKAGE_REVISION], [1.3337]) AC_DEFUN([LTVERSION_VERSION], -[macro_version='2.4.6' -macro_revision='2.4.6' +[macro_version='2.4.2' +macro_revision='1.3337' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # -# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software -# Foundation, Inc. +# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file is free software; the Free Software Foundation gives @@ -8966,7 +8540,7 @@ # These exist entirely to fool aclocal when bootstrapping libtool. # -# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), +# 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. # @@ -8980,7 +8554,7 @@ # 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. +# 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 @@ -9052,63 +8626,32 @@ m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) -dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- -dnl serial 11 (pkg-config-0.29) -dnl -dnl Copyright © 2004 Scott James Remnant . -dnl Copyright © 2012-2015 Dan Nicholson -dnl -dnl This program is free software; you can redistribute it and/or modify -dnl it under the terms of the GNU General Public License as published by -dnl the Free Software Foundation; either version 2 of the License, or -dnl (at your option) any later version. -dnl -dnl This program is distributed in the hope that it will be useful, but -dnl WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl General Public License for more details. -dnl -dnl You should have received a copy of the GNU General Public License -dnl along with this program; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -dnl 02111-1307, USA. -dnl -dnl As a special exception to the GNU General Public License, if you -dnl distribute this file as part of a program that contains a -dnl configuration script generated by Autoconf, you may include it under -dnl the same distribution terms that you use for the rest of that -dnl program. - -dnl PKG_PREREQ(MIN-VERSION) -dnl ----------------------- -dnl Since: 0.29 -dnl -dnl Verify that the version of the pkg-config macros are at least -dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's -dnl installed version of pkg-config, this checks the developer's version -dnl of pkg.m4 when generating configure. -dnl -dnl To ensure that this macro is defined, also add: -dnl m4_ifndef([PKG_PREREQ], -dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) -dnl -dnl See the "Since" comment for each macro you use to see what version -dnl of the macros you require. -m4_defun([PKG_PREREQ], -[m4_define([PKG_MACROS_VERSION], [0.29]) -m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, - [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) -])dnl PKG_PREREQ - -dnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) -dnl ---------------------------------- -dnl Since: 0.16 -dnl -dnl Search for the pkg-config tool and set the PKG_CONFIG variable to -dnl first found in the path. Checks that the version of pkg-config found -dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is -dnl used since that's the first version where most current features of -dnl pkg-config existed. +# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- +# serial 1 (pkg-config-0.24) +# +# Copyright © 2004 Scott James Remnant . +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# PKG_PROG_PKG_CONFIG([MIN-VERSION]) +# ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) @@ -9130,19 +8673,18 @@ PKG_CONFIG="" fi fi[]dnl -])dnl PKG_PROG_PKG_CONFIG +])# PKG_PROG_PKG_CONFIG -dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -dnl ------------------------------------------------------------------- -dnl Since: 0.18 -dnl -dnl Check to see whether a particular set of modules exists. Similar to -dnl PKG_CHECK_MODULES(), but does not set variables or print errors. -dnl -dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) -dnl only at the first occurence in configure.ac, so if the first place -dnl it's called might be skipped (such as if it is within an "if", you -dnl have to call PKG_CHECK_EXISTS manually +# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +# +# Check to see whether a particular set of modules exists. Similar +# to PKG_CHECK_MODULES(), but does not set variables or print errors. +# +# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) +# only at the first occurence in configure.ac, so if the first place +# it's called might be skipped (such as if it is within an "if", you +# have to call PKG_CHECK_EXISTS manually +# -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ @@ -9152,10 +8694,8 @@ $3])dnl fi]) -dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) -dnl --------------------------------------------- -dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting -dnl pkg_failed based on the result. +# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) +# --------------------------------------------- m4_define([_PKG_CONFIG], [if test -n "$$1"; then pkg_cv_[]$1="$$1" @@ -9167,11 +8707,10 @@ else pkg_failed=untried fi[]dnl -])dnl _PKG_CONFIG +])# _PKG_CONFIG -dnl _PKG_SHORT_ERRORS_SUPPORTED -dnl --------------------------- -dnl Internal check to see if pkg-config supports short errors. +# _PKG_SHORT_ERRORS_SUPPORTED +# ----------------------------- AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then @@ -9179,17 +8718,19 @@ else _pkg_short_errors_supported=no fi[]dnl -])dnl _PKG_SHORT_ERRORS_SUPPORTED +])# _PKG_SHORT_ERRORS_SUPPORTED -dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], -dnl [ACTION-IF-NOT-FOUND]) -dnl -------------------------------------------------------------- -dnl Since: 0.4.0 -dnl -dnl Note that if there is a possibility the first call to -dnl PKG_CHECK_MODULES might not happen, you should be sure to include an -dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac +# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], +# [ACTION-IF-NOT-FOUND]) +# +# +# Note that if there is a possibility the first call to +# PKG_CHECK_MODULES might not happen, you should be sure to include an +# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac +# +# +# -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl @@ -9243,95 +8784,12 @@ AC_MSG_RESULT([yes]) $3 fi[]dnl -])dnl PKG_CHECK_MODULES - - -dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], -dnl [ACTION-IF-NOT-FOUND]) -dnl --------------------------------------------------------------------- -dnl Since: 0.29 -dnl -dnl Checks for existence of MODULES and gathers its build flags with -dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags -dnl and VARIABLE-PREFIX_LIBS from --libs. -dnl -dnl Note that if there is a possibility the first call to -dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to -dnl include an explicit call to PKG_PROG_PKG_CONFIG in your -dnl configure.ac. -AC_DEFUN([PKG_CHECK_MODULES_STATIC], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl -_save_PKG_CONFIG=$PKG_CONFIG -PKG_CONFIG="$PKG_CONFIG --static" -PKG_CHECK_MODULES($@) -PKG_CONFIG=$_save_PKG_CONFIG[]dnl -])dnl PKG_CHECK_MODULES_STATIC - - -dnl PKG_INSTALLDIR([DIRECTORY]) -dnl ------------------------- -dnl Since: 0.27 -dnl -dnl Substitutes the variable pkgconfigdir as the location where a module -dnl should install pkg-config .pc files. By default the directory is -dnl $libdir/pkgconfig, but the default can be changed by passing -dnl DIRECTORY. The user can override through the --with-pkgconfigdir -dnl parameter. -AC_DEFUN([PKG_INSTALLDIR], -[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) -m4_pushdef([pkg_description], - [pkg-config installation directory @<:@]pkg_default[@:>@]) -AC_ARG_WITH([pkgconfigdir], - [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, - [with_pkgconfigdir=]pkg_default) -AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) -m4_popdef([pkg_default]) -m4_popdef([pkg_description]) -])dnl PKG_INSTALLDIR - - -dnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) -dnl -------------------------------- -dnl Since: 0.27 -dnl -dnl Substitutes the variable noarch_pkgconfigdir as the location where a -dnl module should install arch-independent pkg-config .pc files. By -dnl default the directory is $datadir/pkgconfig, but the default can be -dnl changed by passing DIRECTORY. The user can override through the -dnl --with-noarch-pkgconfigdir parameter. -AC_DEFUN([PKG_NOARCH_INSTALLDIR], -[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) -m4_pushdef([pkg_description], - [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) -AC_ARG_WITH([noarch-pkgconfigdir], - [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, - [with_noarch_pkgconfigdir=]pkg_default) -AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) -m4_popdef([pkg_default]) -m4_popdef([pkg_description]) -])dnl PKG_NOARCH_INSTALLDIR - - -dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, -dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -dnl ------------------------------------------- -dnl Since: 0.28 -dnl -dnl Retrieves the value of the pkg-config variable for the given module. -AC_DEFUN([PKG_CHECK_VAR], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl -AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl - -_PKG_CONFIG([$1], [variable="][$3]["], [$2]) -AS_VAR_COPY([$1], [pkg_cv_][$1]) - -AS_VAR_IF([$1], [""], [$5], [$4])dnl -])dnl PKG_CHECK_VAR +])# PKG_CHECK_MODULES dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. dnl dnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. -dnl +dnl dnl Permission is hereby granted, free of charge, to any person obtaining a dnl copy of this software and associated documentation files (the "Software"), dnl to deal in the Software without restriction, including without limitation @@ -9364,10 +8822,10 @@ # [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) # # -# See the "minimum version" comment for each macro you use to see what +# See the "minimum version" comment for each macro you use to see what # version you require. m4_defun([XORG_MACROS_VERSION],[ -m4_define([vers_have], [1.19.0]) +m4_define([vers_have], [1.17]) m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) m4_if(m4_cmp(maj_have, maj_needed), 0,, @@ -9387,7 +8845,7 @@ # such as man pages and config files AC_DEFUN([XORG_PROG_RAWCPP],[ AC_REQUIRE([AC_PROG_CPP]) -AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], +AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) # Check for flag to avoid builtin definitions - assumes unix is predefined, @@ -9417,7 +8875,6 @@ AC_MSG_RESULT([no]) else if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then - TRADITIONALCPPFLAGS="-traditional" RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" AC_MSG_RESULT([yes]) else @@ -9426,7 +8883,6 @@ fi rm -f conftest.$ac_ext AC_SUBST(RAWCPPFLAGS) -AC_SUBST(TRADITIONALCPPFLAGS) ]) # XORG_PROG_RAWCPP # XORG_MANPAGE_SECTIONS() @@ -9951,10 +9407,9 @@ ]) # XORG_WITH_ASCIIDOC # XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) -# ------------------------------------------- +# -------------------------------- # Minimum version: 1.5.0 # Minimum version for optional DEFAULT argument: 1.11.0 -# Minimum version for optional DOT checking: 1.18.0 # # Documentation tools are not always available on all platforms and sometimes # not at the appropriate level. This macro enables a module to test for the @@ -9974,7 +9429,6 @@ # AC_DEFUN([XORG_WITH_DOXYGEN],[ AC_ARG_VAR([DOXYGEN], [Path to doxygen command]) -AC_ARG_VAR([DOT], [Path to the dot graphics utility]) m4_define([_defopt], m4_default([$2], [auto])) AC_ARG_WITH(doxygen, AS_HELP_STRING([--with-doxygen], @@ -10018,20 +9472,6 @@ AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) fi]) fi]) - -dnl Check for DOT if we have doxygen. The caller decides if it is mandatory -dnl HAVE_DOT is a variable that can be used in your doxygen.in config file: -dnl HAVE_DOT = @HAVE_DOT@ -HAVE_DOT=no -if test "x$have_doxygen" = "xyes"; then - AC_PATH_PROG([DOT], [dot]) - if test "x$DOT" != "x"; then - HAVE_DOT=yes - fi -fi - -AC_SUBST([HAVE_DOT]) -AM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"]) AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) ]) # XORG_WITH_DOXYGEN @@ -10214,29 +9654,6 @@ AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) ]) # XORG_WITH_FOP -# XORG_WITH_M4([MIN-VERSION]) -# --------------------------- -# Minimum version: 1.19.0 -# -# This macro attempts to locate an m4 macro processor which supports -# -I option and is only useful for modules relying on M4 in order to -# expand macros in source code files. -# -# Interface to module: -# M4: returns the path of the m4 program found -# returns the path set by the user in the environment -# -AC_DEFUN([XORG_WITH_M4], [ -AC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4], - [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4], - [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \ - ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]], - [AC_MSG_ERROR([could not find m4 that supports -I option])], - [$PATH:/usr/gnu/bin])]) - -AC_SUBST([M4], [$ac_cv_path_M4]) -]) # XORG_WITH_M4 - # XORG_WITH_PS2PDF([DEFAULT]) # ---------------- # Minimum version: 1.6.0 @@ -10691,8 +10108,7 @@ AC_MSG_CHECKING([whether malloc(0) returns NULL]) if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then -AC_CACHE_VAL([xorg_cv_malloc0_returns_null], - [AC_RUN_IFELSE([AC_LANG_PROGRAM([ + AC_RUN_IFELSE([AC_LANG_PROGRAM([ #include ],[ char *m0, *r0, *c0, *p; @@ -10702,9 +10118,9 @@ c0 = calloc(0,10); exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); ])], - [xorg_cv_malloc0_returns_null=yes], - [xorg_cv_malloc0_returns_null=no])]) -MALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null + [MALLOC_ZERO_RETURNS_NULL=yes], + [MALLOC_ZERO_RETURNS_NULL=no], + [MALLOC_ZERO_RETURNS_NULL=yes]) fi AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) @@ -10915,18 +10331,18 @@ found="no" m4_foreach([flag], m4_cdr($@), [ if test $found = "no" ; then - if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" fi - if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" fi PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname - AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) + AC_MSG_CHECKING([if ]COMPILER[ supports]flag[]) cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) AC_CACHE_VAL($cacheid, [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], @@ -10993,7 +10409,7 @@ XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) - XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd]) + XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) ] ) @@ -11002,17 +10418,17 @@ XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) -XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) # These are currently disabled because they are noisy. They will be enabled # in the future once the codebase is sufficiently modernized to silence # them. For now, I don't want them to drown out the other warnings. +# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) # XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) # XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) -# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) # Turn some warnings into errors, so we don't accidently get successful builds # when there are problems that should be fixed. @@ -11186,7 +10602,7 @@ # XORG_RELEASE_VERSION # -------------------- # Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. - + AC_DEFUN([XORG_RELEASE_VERSION],[ AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], [`echo $PACKAGE_VERSION | cut -d . -f 1`], @@ -11223,22 +10639,25 @@ AC_SUBST([CHANGELOG_CMD]) ]) # XORG_CHANGELOG -# Copyright (C) 2002-2014 Free Software Foundation, Inc. +# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software +# Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 1 + # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.15' +[am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.15], [], +m4_if([$1], [1.11.3], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -11254,22 +10673,24 @@ # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.15])dnl +[AM_AUTOMAKE_VERSION([1.11.3])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 1 + # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets -# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to -# '$srcdir', '$srcdir/..', or '$srcdir/../..'. +# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to +# `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and @@ -11288,7 +10709,7 @@ # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually -# harmless because $srcdir is '.', but things will broke when you +# harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, @@ -11306,26 +10727,30 @@ # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], -[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl -# Expand $ac_aux_dir to an absolute path. -am_aux_dir=`cd "$ac_aux_dir" && pwd` +[dnl Rely on autoconf to set up CDPATH properly. +AC_PREREQ([2.50])dnl +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997-2014 Free Software Foundation, Inc. +# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 +# Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 9 + # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], -[AC_PREREQ([2.52])dnl - m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], - [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +[AC_PREREQ(2.52)dnl + ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl @@ -11344,14 +10769,16 @@ Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, +# 2010, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 12 -# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be +# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing @@ -11361,7 +10788,7 @@ # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. -# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". +# NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was @@ -11374,13 +10801,12 @@ AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl -m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], - [$1], [CXX], [depcc="$CXX" am_compiler_list=], - [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], - [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], - [$1], [UPC], [depcc="$UPC" am_compiler_list=], - [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], - [depcc="$$1" am_compiler_list=]) +ifelse([$1], CC, [depcc="$CC" am_compiler_list=], + [$1], CXX, [depcc="$CXX" am_compiler_list=], + [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], UPC, [depcc="$UPC" am_compiler_list=], + [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], @@ -11388,8 +10814,8 @@ # 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". + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're @@ -11429,16 +10855,16 @@ : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with - # Solaris 10 /bin/sh. - echo '/* dummy */' > sub/conftst$i.h + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - # We check with '-c' and '-o' for the sake of the "dashmstdout" + # 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. + # 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 @@ -11447,8 +10873,8 @@ test "$am__universal" = false || continue ;; nosideeffect) - # After this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested. + # 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 @@ -11456,7 +10882,7 @@ fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok '-c -o', but also, the minuso test has + # 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} @@ -11504,7 +10930,7 @@ # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. -# This macro is AC_REQUIREd in _AM_DEPENDENCIES. +# This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl @@ -11514,13 +10940,9 @@ # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], -[AC_ARG_ENABLE([dependency-tracking], [dnl -AS_HELP_STRING( - [--enable-dependency-tracking], - [do not reject slow dependency extractors]) -AS_HELP_STRING( - [--disable-dependency-tracking], - [speeds up one-time build])]) +[AC_ARG_ENABLE(dependency-tracking, +[ --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' @@ -11535,18 +10957,20 @@ # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 +# Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +#serial 5 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ - # Older Autoconf quotes --file arguments for eval, but not when files + # 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 @@ -11559,7 +10983,7 @@ # 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 + # 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. @@ -11571,19 +10995,21 @@ continue fi # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running 'make'. + # 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 + 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'`; do + 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"])` @@ -11601,7 +11027,7 @@ # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking -# is enabled. FIXME. This creates each '.P' file that we will +# is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], @@ -11611,21 +11037,18 @@ # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 16 + # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. -dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. -m4_define([AC_PROG_CC], -m4_defn([AC_PROG_CC]) -[_AM_PROG_CC_C_O -]) - # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- @@ -11638,7 +11061,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.65])dnl +[AC_PREREQ([2.62])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl @@ -11667,42 +11090,33 @@ # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], -[AC_DIAGNOSE([obsolete], - [$0: two- and three-arguments forms are deprecated.]) -m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl +[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. -m4_if( - m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), - [ok:ok],, +m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, -[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) - AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl +[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) + AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl -AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) -AM_MISSING_PROG([AUTOCONF], [autoconf]) -AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) -AM_MISSING_PROG([AUTOHEADER], [autoheader]) -AM_MISSING_PROG([MAKEINFO], [makeinfo]) +AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) +AM_MISSING_PROG(AUTOCONF, autoconf) +AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) +AM_MISSING_PROG(AUTOHEADER, autoheader) +AM_MISSING_PROG(MAKEINFO, makeinfo) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl -AC_REQUIRE([AC_PROG_MKDIR_P])dnl -# For better backward compatibility. To be removed once Automake 1.9.x -# dies out for good. For more background, see: -# -# -AC_SUBST([mkdir_p], ['$(MKDIR_P)']) -# We need awk for the "check" target (and possibly the TAP driver). The -# system "awk" is bad on some platforms. +AC_REQUIRE([AM_PROG_MKDIR_P])dnl +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl @@ -11711,82 +11125,34 @@ [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], - [_AM_DEPENDENCIES([CC])], - [m4_define([AC_PROG_CC], - m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl + [_AM_DEPENDENCIES(CC)], + [define([AC_PROG_CC], + defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], - [_AM_DEPENDENCIES([CXX])], - [m4_define([AC_PROG_CXX], - m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl + [_AM_DEPENDENCIES(CXX)], + [define([AC_PROG_CXX], + defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], - [_AM_DEPENDENCIES([OBJC])], - [m4_define([AC_PROG_OBJC], - m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl -AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], - [_AM_DEPENDENCIES([OBJCXX])], - [m4_define([AC_PROG_OBJCXX], - m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl -]) -AC_REQUIRE([AM_SILENT_RULES])dnl -dnl The testsuite driver may need to know about EXEEXT, so add the -dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This -dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. + [_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 - -# POSIX will say in a future version that running "rm -f" with no argument -# is OK; and we want to be able to make that assumption in our Makefile -# recipes. So use an aggressive probe to check that the usage we want is -# actually supported "in the wild" to an acceptable degree. -# See automake bug#10828. -# To make any issue more visible, cause the running configure to be aborted -# by default if the 'rm' program in use doesn't match our expectations; the -# user can still override this though. -if rm -f && rm -fr && rm -rf; then : OK; else - cat >&2 <<'END' -Oops! - -Your 'rm' program seems unable to run without file operands specified -on the command line, even when the '-f' option is present. This is contrary -to the behaviour of most rm programs out there, and not conforming with -the upcoming POSIX standard: - -Please tell bug-automake@gnu.org about your system, including the value -of your $PATH and any error possibly output before this message. This -can help us improve future automake versions. - -END - if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then - echo 'Configuration will proceed anyway, since you have set the' >&2 - echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 - echo >&2 - else - cat >&2 <<'END' -Aborting the configuration process, to ensure you take notice of the issue. - -You can download and install GNU coreutils to get an 'rm' implementation -that behaves properly: . - -If you want to complete the configuration process using your problematic -'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM -to "yes", and re-run configure. - -END - AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) - fi -fi -dnl The trailing newline in this macro's definition is deliberate, for -dnl backward compatibility and to allow trailing 'dnl'-style comments -dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. ]) -dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not +dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) + # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. @@ -11808,18 +11174,21 @@ done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation, +# Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 1 + # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -if test x"${install_sh+set}" != xset; then +if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; @@ -11827,14 +11196,16 @@ install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi -AC_SUBST([install_sh])]) +AC_SUBST(install_sh)]) -# Copyright (C) 2003-2014 Free Software Foundation, Inc. +# Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 2 + # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], @@ -11851,17 +11222,20 @@ # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering -# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008, +# 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 5 + # AM_MAINTAINER_MODE([DEFAULT-MODE]) # ---------------------------------- # Control maintainer-specific portions of Makefiles. -# Default is to disable them, unless 'enable' is passed literally. -# For symmetry, 'disable' may be passed as well. Anyway, the user +# Default is to disable them, unless `enable' is passed literally. +# For symmetry, `disable' may be passed as well. Anyway, the user # can override the default with the --enable/--disable switch. AC_DEFUN([AM_MAINTAINER_MODE], [m4_case(m4_default([$1], [disable]), @@ -11872,11 +11246,10 @@ AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) dnl maintainer-mode's default is 'disable' unless 'enable' is passed AC_ARG_ENABLE([maintainer-mode], - [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], - am_maintainer_other[ make rules and dependencies not useful - (and sometimes confusing) to the casual installer])], - [USE_MAINTAINER_MODE=$enableval], - [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) +[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful + (and sometimes confusing) to the casual installer], + [USE_MAINTAINER_MODE=$enableval], + [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) AC_MSG_RESULT([$USE_MAINTAINER_MODE]) AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE @@ -11884,14 +11257,18 @@ ] ) +AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) + # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 4 + # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. @@ -11909,7 +11286,7 @@ _am_result=none # First try GNU make style include. echo "include confinc" > confmf -# Ignore all kinds of additional output from 'make'. +# 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 @@ -11936,12 +11313,15 @@ # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997-2014 Free Software Foundation, Inc. +# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 +# Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 6 + # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], @@ -11949,10 +11329,11 @@ $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) + # AM_MISSING_HAS_RUN # ------------------ -# Define MISSING if not defined so far and test if it is modern enough. -# If it is, set am_missing_run to use it, otherwise, to nothing. +# Define MISSING if not defined so far and test if it supports --run. +# If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl @@ -11965,22 +11346,54 @@ esac fi # Use eval to expand $SHELL -if eval "$MISSING --is-lightweight"; then - am_missing_run="$MISSING " +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " else am_missing_run= - AC_MSG_WARN(['missing' script is too old or missing]) + AC_MSG_WARN([`missing' script is too old or missing]) fi ]) +# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation, +# Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 1 + +# AM_PROG_MKDIR_P +# --------------- +# Check for `mkdir -p'. +AC_DEFUN([AM_PROG_MKDIR_P], +[AC_PREREQ([2.60])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, +dnl while keeping a definition of mkdir_p for backward compatibility. +dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. +dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of +dnl Makefile.ins that do not define MKDIR_P, so we do our own +dnl adjustment using top_builddir (which is defined more often than +dnl MKDIR_P). +AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl +case $mkdir_p in + [[\\/$]]* | ?:[[\\/]]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac +]) + # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software +# Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 5 + # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], @@ -11990,7 +11403,7 @@ # -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], -[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) +[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ------------------------ @@ -12004,82 +11417,24 @@ AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 1999-2014 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# _AM_PROG_CC_C_O -# --------------- -# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC -# to automatically call this. -AC_DEFUN([_AM_PROG_CC_C_O], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([compile])dnl -AC_LANG_PUSH([C])dnl -AC_CACHE_CHECK( - [whether $CC understands -c and -o together], - [am_cv_prog_cc_c_o], - [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) - # Make sure it works both with $CC and with simple cc. - # Following AC_PROG_CC_C_O, we do the test twice because some - # compilers refuse to overwrite an existing .o file with -o, - # though they will create one. - am_cv_prog_cc_c_o=yes - for am_i in 1 2; do - if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ - && test -f conftest2.$ac_objext; then - : OK - else - am_cv_prog_cc_c_o=no - break - fi - done - rm -f core conftest* - unset am_i]) -if test "$am_cv_prog_cc_c_o" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi -AC_LANG_POP([C])]) - -# For backward compatibility. -AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) - -# Copyright (C) 2001-2014 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_RUN_LOG(COMMAND) -# ------------------- -# Run COMMAND, save the exit status in ac_status, and log it. -# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) -AC_DEFUN([AM_RUN_LOG], -[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD - ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - (exit $ac_status); }]) - # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 +# Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 5 + # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) +# Just in case +sleep 1 +echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' @@ -12090,40 +11445,32 @@ esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) - AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; + AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; esac -# Do 'set' in a subshell so we don't clobber the current shell's +# Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( - am_has_slept=no - for am_try in 1 2; do - echo "timestamp, slept: $am_has_slept" > conftest.file - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$[*]" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - if test "$[*]" != "X $srcdir/configure conftest.file" \ - && test "$[*]" != "X conftest.file $srcdir/configure"; then + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + rm -f conftest.file + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken +alias in your environment]) + fi - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken - alias in your environment]) - fi - if test "$[2]" = conftest.file || test $am_try -eq 2; then - break - fi - # Just in case. - sleep 1 - am_has_slept=yes - done test "$[2]" = conftest.file ) then @@ -12133,118 +11480,46 @@ AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi -AC_MSG_RESULT([yes]) -# If we didn't sleep, we still need to ensure time stamps of config.status and -# generated files are strictly newer. -am_sleep_pid= -if grep 'slept: no' conftest.file >/dev/null 2>&1; then - ( sleep 1 ) & - am_sleep_pid=$! -fi -AC_CONFIG_COMMANDS_PRE( - [AC_MSG_CHECKING([that generated files are newer than configure]) - if test -n "$am_sleep_pid"; then - # Hide warnings about reused PIDs. - wait $am_sleep_pid 2>/dev/null - fi - AC_MSG_RESULT([done])]) -rm -f conftest.file -]) +AC_MSG_RESULT(yes)]) -# Copyright (C) 2009-2014 Free Software Foundation, Inc. +# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# AM_SILENT_RULES([DEFAULT]) -# -------------------------- -# Enable less verbose build rules; with the default set to DEFAULT -# ("yes" being less verbose, "no" or empty being verbose). -AC_DEFUN([AM_SILENT_RULES], -[AC_ARG_ENABLE([silent-rules], [dnl -AS_HELP_STRING( - [--enable-silent-rules], - [less verbose build output (undo: "make V=1")]) -AS_HELP_STRING( - [--disable-silent-rules], - [verbose build output (undo: "make V=0")])dnl -]) -case $enable_silent_rules in @%:@ ((( - yes) AM_DEFAULT_VERBOSITY=0;; - no) AM_DEFAULT_VERBOSITY=1;; - *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; -esac -dnl -dnl A few 'make' implementations (e.g., NonStop OS and NextStep) -dnl do not support nested variable expansions. -dnl See automake bug#9928 and bug#10237. -am_make=${MAKE-make} -AC_CACHE_CHECK([whether $am_make supports nested variables], - [am_cv_make_support_nested_variables], - [if AS_ECHO([['TRUE=$(BAR$(V)) -BAR0=false -BAR1=true -V=1 -am__doit: - @$(TRUE) -.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then - am_cv_make_support_nested_variables=yes -else - am_cv_make_support_nested_variables=no -fi]) -if test $am_cv_make_support_nested_variables = yes; then - dnl Using '$V' instead of '$(V)' breaks IRIX make. - AM_V='$(V)' - AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' -else - AM_V=$AM_DEFAULT_VERBOSITY - AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY -fi -AC_SUBST([AM_V])dnl -AM_SUBST_NOTMAKE([AM_V])dnl -AC_SUBST([AM_DEFAULT_V])dnl -AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl -AC_SUBST([AM_DEFAULT_VERBOSITY])dnl -AM_BACKSLASH='\' -AC_SUBST([AM_BACKSLASH])dnl -_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl -]) - -# Copyright (C) 2001-2014 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. +# serial 1 # AM_PROG_INSTALL_STRIP # --------------------- -# One issue with vendor 'install' (even GNU) is that you can't +# One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we -# always use install-sh in "make install-strip", and initialize +# always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -# Installed binaries are usually stripped using 'strip' when the user -# run "make install-strip". However 'strip' might not be the right +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake -# will honor the 'STRIP' environment variable to overrule this program. -dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. +# will honor the `STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006-2014 Free Software Foundation, Inc. +# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 3 + # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. @@ -12258,16 +11533,18 @@ # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004-2014 Free Software Foundation, Inc. +# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 2 + # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. -# FORMAT should be one of 'v7', 'ustar', or 'pax'. +# FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory @@ -12277,114 +11554,76 @@ # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar -# AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) - -# We'll loop over all known methods to create a tar archive until one works. -_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' - m4_if([$1], [v7], - [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], + [m4_case([$1], [ustar],, [pax],, + [m4_fatal([Unknown tar format])]) +AC_MSG_CHECKING([how to create a $1 tar archive]) +# Loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' +_am_tools=${am_cv_prog_tar_$1-$_am_tools} +# Do not fold the above two line into one, because Tru64 sh and +# Solaris sh will not grok spaces in the rhs of `-'. +for _am_tool in $_am_tools +do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; + do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac - [m4_case([$1], - [ustar], - [# The POSIX 1988 'ustar' format is defined with fixed-size fields. - # There is notably a 21 bits limit for the UID and the GID. In fact, - # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 - # and bug#13588). - am_max_uid=2097151 # 2^21 - 1 - am_max_gid=$am_max_uid - # The $UID and $GID variables are not portable, so we need to resort - # to the POSIX-mandated id(1) utility. Errors in the 'id' calls - # below are definitely unexpected, so allow the users to see them - # (that is, avoid stderr redirection). - am_uid=`id -u || echo unknown` - am_gid=`id -g || echo unknown` - AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) - if test $am_uid -le $am_max_uid; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - _am_tools=none - fi - AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) - if test $am_gid -le $am_max_gid; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - _am_tools=none - fi], - - [pax], - [], - - [m4_fatal([Unknown tar format])]) - - AC_MSG_CHECKING([how to create a $1 tar archive]) - - # Go ahead even if we have the value already cached. We do so because we - # need to set the values for the 'am__tar' and 'am__untar' variables. - _am_tools=${am_cv_prog_tar_$1-$_am_tools} - - for _am_tool in $_am_tools; do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; do - AM_RUN_LOG([$_am_tar --version]) && break - done - am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x $1 -w "$$tardir"' - am__tar_='pax -L -x $1 -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H $1 -L' - am__tar_='find "$tardir" -print | cpio -o -H $1 -L' - am__untar='cpio -i -H $1 -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_$1}" && break - - # tar/untar a dummy directory, and stop if the command works. - rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) - rm -rf conftest.dir - if test -s conftest.tar; then - AM_RUN_LOG([$am__untar /dev/null 2>&1 && break - fi - done + # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi +done +rm -rf conftest.dir - AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) - AC_MSG_RESULT([$am_cv_prog_tar_$1])]) - +AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) +AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR diff -Nru xserver-xorg-video-openchrome-0.5.0/ChangeLog xserver-xorg-video-openchrome-0.6.0/ChangeLog --- xserver-xorg-video-openchrome-0.5.0/ChangeLog 2017-11-03 09:39:29.000000000 +0000 +++ xserver-xorg-video-openchrome-0.6.0/ChangeLog 2017-11-03 09:39:29.000000000 +0000 @@ -1,3 +1,7175 @@ +commit 5e158c76eb3a0fb0db207229697139f8da2faaae +Author: Kevin Brace +Date: Tue Mar 7 00:06:37 2017 -0800 + + Version bumped to 0.6 + + Signed-off-by: Kevin Brace + +commit 8c819edb95880c6726f9bc80cae6ac3b3bd0f6a8 +Author: Kevin Brace +Date: Mon Feb 27 15:59:10 2017 -0800 + + Version bumped to 0.5.900 (Version 0.6 RC1) + + This is the first release candidate of OpenChrome DDX Version 0.6. It + will be nice if people who own VIA Technologies Chrome IGP based + hardware can dust off their long unused hardware, and let the + developer know how it performs. If there are no serious problems, this + version will be the Version 0.6 official release version. + + Signed-off-by: Kevin Brace + +commit f50e55fc7e70a3bc1ed688bb7c1746de67da203d +Author: Kevin Brace +Date: Mon Feb 27 15:57:01 2017 -0800 + + Faking integrated TMDS (DVI) transmitter DVI detection + + Probably not a good idea, but do not have a choice for now. + Integrated TMDS transmitter based DVI's detection pin does not really + work, so this is how detection needs to be faked. This issue does not + affect those where the DVI is coming from an external TMDS transmitter + like SiI 164 or VT1632(A). + + Signed-off-by: Kevin Brace + +commit d2b60273cc69f382f9616718c61ca36a23f4210b +Author: Kevin Brace +Date: Mon Feb 27 15:47:54 2017 -0800 + + Minor reduction of unused variables + + Signed-off-by: Kevin Brace + +commit 770d5c08bdbd8d115f16f29d23ed4bf9390b5328 +Author: Kevin Brace +Date: Mon Feb 27 15:34:24 2017 -0800 + + Improving DVI connector availability + + Signed-off-by: Kevin Brace + +commit 5e5c8da481050b235fce5dd80527b84a3ddf25a6 +Author: Kevin Brace +Date: Sun Feb 26 16:41:52 2017 -0800 + + Version bumped to 0.5.187 + + Signed-off-by: Kevin Brace + +commit 97db7a46ca94778d5de6beab16af0d8d2897bb76 +Author: Kevin Brace +Date: Sun Feb 26 16:31:31 2017 -0800 + + Changing via_lvds.c to via_fp.c + + Signed-off-by: Kevin Brace + +commit 3f22d9394479bff8fcb57b5c8347818b725e0ecf +Author: Dylan Aïssi +Date: Sun Feb 26 16:20:28 2017 -0800 + + Switch to https for all links to freedesktop.org + + Signed-off-by: Dylan Aïssi + +commit b39bbcc7bff588b6faaff6b096442cd0d8910fba +Author: Kevin Brace +Date: Sun Feb 26 15:47:38 2017 -0800 + + Preserving Scratch Pad registers (CR3B through CR3F) + + This is necessary due to Scratch Pad registers passed from VIA + Technologies Chrome VGA BIOS get corrupted when resuming from standby + on some platforms. + + Signed-off-by: Kevin Brace + +commit 9f70120874e48987baa62ce2ffd8f1a83b9a8194 +Author: Kevin Brace +Date: Sat Feb 25 14:42:42 2017 -0800 + + Version bumped to 0.5.186 + + Signed-off-by: Kevin Brace + +commit e2c3873e05d483141ac8c2258ec7b4d427db9882 +Author: Kevin Brace +Date: Sat Feb 25 14:24:19 2017 -0800 + + Checking display controller memory alignment before mode setting + + Signed-off-by: Kevin Brace + +commit fa5bbc20f8144acf36a321cc2cf068f071575e73 +Author: Kevin Brace +Date: Fri Feb 24 19:46:42 2017 -0800 + + Version bumped to 0.5.185 + + Signed-off-by: Kevin Brace + +commit 3f838a61a282dd153b65ad8084bc382c4ad1ba48 +Author: Kevin Brace +Date: Fri Feb 24 19:39:08 2017 -0800 + + Adding additional integrated TMDS turn on / off code + + When testing the code with Xfce, it was observed that integrated TMDS + transmitter was not being turned on correctly. This commit will fix + this bug. + + Signed-off-by: Kevin Brace + +commit 9a27dc4f9aab50d7c792f8c7a4acaa28a2e43acd +Author: Kevin Brace +Date: Thu Feb 23 19:59:29 2017 -0800 + + Version bumped to 0.5.184 + + This version fixes FIC CE260 / CE261 netbook integrated TMDS interface + (DVI) on / off. This fix also aids CX700 or later chipsets that have + the proper strapping resistor values set for DVI use. Another major bug + fix for OpenChrome DDX. + + Signed-off-by: Kevin Brace + +commit 1bfe1ad714051b6acc7fbc0af715371aa47f2d2b +Author: Kevin Brace +Date: Thu Feb 23 19:54:49 2017 -0800 + + Improvement in initializing integrated TMDS (DVI) + + Had to add a special handling case in order to properly handle FIC CE260 / + CE261 netbook integrated TMDS interface (DVI) turn on / off. This fix aids + reinitialization when resuming from standby. FIC CE260 / CE261 were sold as + Everex CloudBook and Sylvania g netbook. This fix also aids CX700 or later + chipsets that have the proper strapping resistor values set for DVI use. + + Signed-off-by: Kevin Brace + +commit 84193485247e7a0cc871b1e003ba596026768cf5 +Author: Kevin Brace +Date: Thu Feb 23 13:24:08 2017 -0800 + + Version bumped to 0.5.183 + + This version fixes FIC CE260 / CE261 netbook FP LVDS interface turn + on / off. Another major bug fix for OpenChrome DDX. + + Signed-off-by: Kevin Brace + +commit 41c4beb6000c154b5920c715fadd86ca2da197f0 +Author: Kevin Brace +Date: Thu Feb 23 13:21:14 2017 -0800 + + Improvement in initializing FIC CE260 / CE261 netbook FP + + Had to add a special handling case in order to properly handle FIC CE260 / + CE261 netbook FP LVDS interface turn on / off. In particular, this fix aids FP + reinitialization when resuming from standby. FIC CE260 / CE261 were sold as + Everex CloudBook and Sylvania g netbook. + + Signed-off-by: Kevin Brace + +commit b84e4e61d7ba309ecac58efbb690c050ef8daeda +Author: Kevin Brace +Date: Wed Feb 15 00:16:33 2017 -0800 + + Version bumped to 0.5.182 + + This version fixes HP 2133 Mini-Note's PCI WLAN going dead when X.Org + Server starts. It also helps to restore the FP (Flat Panel) correctly + when resuming from standby. (i.e., ACPI S3 State) This is a huge fix + for OpenChrome DDX. + + Signed-off-by: Kevin Brace + +commit 1f7898969a38f3e350871168338deb1dfbb1cc18 +Author: Kevin Brace +Date: Wed Feb 15 00:12:12 2017 -0800 + + Permanent fix for HP 2133 PCIe WLAN not working + + Using strapping pins for Chrome IGP help figure out whether or not to + activate DVP0. Tested the fix with 3 different VN896 chipset based + laptops, but all of these have a 12-bit FP interface. The fix is untested + with a 24-bit FP interface. This fix also helps to restore the FP + correctly when coming out of standby in HP 2133 Mini-Note. + + Signed-off-by: Kevin Brace + +commit 5acbb0a71aa639e381829d15b3a34145752d7ac5 +Author: Kevin Brace +Date: Fri Jan 13 11:40:31 2017 -0600 + + Version bumped to 0.5.181 + + This version restricts the horizontal screen resolution slightly (4 dots + in 32-bit color mode) to avoid display issues on the right side screen + in dual screen mode. + + Signed-off-by: Kevin Brace + +commit 1496cc2f5f6ea94ceb4679a8a87b3369045b192a +Author: Kevin Brace +Date: Fri Jan 13 11:36:27 2017 -0600 + + Limit horizontal direction screen resolution slightly + + Allowing 2048 horizontal screen resolution in 32-bit color mode causes + a problem displaying the correct image on the right side screen, so the + allowed horizontal screen resolution will now be restricted by a few + dots. + + Signed-off-by: Kevin Brace + +commit 0f34b8d53e60e02a844f0f8eb039207f11f24bf2 +Author: Kevin Brace +Date: Fri Jan 13 11:25:13 2017 -0600 + + Made corrections to IGA2 display read count and starting address + + Signed-off-by: Kevin Brace + +commit 72933a40be8764d2ed09b168e1895ad5f730e707 +Author: Kevin Brace +Date: Fri Jan 13 10:44:17 2017 -0600 + + Made corrections to IGA1 display read count and starting address + + Signed-off-by: Kevin Brace + +commit 0ea654c1d0a786b2392773ac33b2b7adc556a947 +Author: Kevin Brace +Date: Tue Jan 10 13:19:11 2017 -0600 + + Version bumped to 0.5.180 + + This version implements a temporary fix to HP 2133 Mini-Note's + Broadcom PCIe WLAN going dead when used with OpenChrome. + + Signed-off-by: Kevin Brace + +commit 864c32daa5cb86e5d15447a8caf9f268f0573bfc +Author: Kevin Brace +Date: Tue Jan 10 13:15:40 2017 -0600 + + Temporary fix for HP 2133 PCIe WLAN not working + + Changing 3C5.2A[3:2] bits to on state was causing HP 2133 Mini-Note's + PCI Express WLAN to stop working. In VN896 chipset, DVP0 (Digital Video + Port 0) is pin multiplexed with PCIe Lane 0 through 7, so blindly + turning on DVP0 was leading to Broadcom PCIe WLAN that comes with HP + 2133 Mini-Note to turn off. For now, not touching 3C5.2A resolves the + matter. A permanent solution to resolve this issue will be implemented + soon. + + Signed-off-by: Kevin Brace + +commit 1fae0509dafa9125ba2170d0bf0f66da43fc0e7c +Author: Kevin Brace +Date: Tue Jan 10 13:14:39 2017 -0600 + + Removing access to 3C5.2A from viaIGA2SetDisplayRegister + + This code was put in to resolve standby resume issue, but turning on + FPDP / DVP / LVDS channel should not be done from + viaIGA2SetDisplayRegister function. + + Signed-off-by: Kevin Brace + +commit 2cb8c637ea1e7ff028734bcbeceffe05500fd0b9 +Author: Kevin Brace +Date: Sat Jan 7 22:17:53 2017 -0600 + + Version bumped to 0.5.179 + + This version hopefully fixes the VT switch screen corruption for good. + + Signed-off-by: Kevin Brace + +commit 3930206751906c35f75b7f18fd36504fe8002598 +Author: Kevin Brace +Date: Sat Jan 7 22:14:10 2017 -0600 + + Fix for VT switch screen corruption bug + + This fix is a more of a permanent fix of the VT switch screen + corruption bug. + + Signed-off-by: Kevin Brace + +commit 7a3ba8e9567a51d3420955162b05b7059d1e9e34 +Author: Kevin Brace +Date: Sat Jan 7 03:59:24 2017 -0600 + + Version bumped to 0.5.178 + + Signed-off-by: Kevin Brace + +commit 4d1d48004b7fb21e1e72f95cd7362dbe537cf958 +Author: Kevin Brace +Date: Sat Jan 7 03:56:46 2017 -0600 + + Changed the 3C5.15 restore behavior + + It appears that the previous way of restoring the register was not + desirable, so it was changed to a more mainstream way of restoring it. + + Signed-off-by: Kevin Brace + +commit 8457d2d71cf9f33dab42c76783e9de8788a7cc3e +Author: Kevin Brace +Date: Fri Jan 6 04:22:15 2017 -0600 + + Version bumped to 0.5.177 + + This version has a partial fix for the screen getting corrupted + when switching to virtual terminal. + + Signed-off-by: Kevin Brace + +commit f6b06ec8aab825eb5bdc65d27f8ebecb557a3919 +Author: Kevin Brace +Date: Fri Jan 6 04:20:25 2017 -0600 + + Minor adjustments to viaIGA1Restore function + + Signed-off-by: Kevin Brace + +commit 6f1191c56f31f6ed851ef28c1eca237eae994a4c +Author: Kevin Brace +Date: Fri Jan 6 04:19:07 2017 -0600 + + Partial fix for save / restore functions + + The fix is still not perfect, but not restoring 3X5.6A, 3X5.6B, + and 3X5.6C was the reason why the screen was getting messed up + when switching to virtual terminal. + + Signed-off-by: Kevin Brace + +commit f8551e0e07366a70cf6aa8c3801d2965a86e170f +Author: Kevin Brace +Date: Fri Jan 6 04:17:32 2017 -0600 + + Preparation for the partial fix of save / restore functions + + Signed-off-by: Kevin Brace + +commit e9ba93c8b625266bbcbc8879eea9d6a65e9d1e93 +Author: Kevin Brace +Date: Thu Jan 5 02:35:29 2017 -0600 + + Version bumped to 0.5.176 + + Signed-off-by: Kevin Brace + +commit 97dada03eeaafb1069ac0fb9ea89914928b7f3d9 +Author: Kevin Brace +Date: Thu Jan 5 02:33:42 2017 -0600 + + Another whitespace fix for via_display.c + + Signed-off-by: Kevin Brace + +commit 5e89b1a18d7223525138747e8faaefcb64ccb7e6 +Author: Kevin Brace +Date: Thu Jan 5 02:30:47 2017 -0600 + + Temporary fix to virtual terminal screen getting corrupted + + This regression was discovered when Ubuntu 14.04's GRUB 2 boot + loader was installed, and it has been broken since Version + 0.4.147. This commit will temporarily fix the bug for now. + + Signed-off-by: Kevin Brace + +commit 5e8456461a80a4d19361220c7d27bc99a5e0f896 +Author: Kevin Brace +Date: Thu Jan 5 00:43:11 2017 -0600 + + Whitespace fix for via_display.c + + Signed-off-by: Kevin Brace + +commit 3e707fa384ad643ab484d823cfbe0c41937e25f3 +Author: Kevin Brace +Date: Fri Dec 23 22:49:07 2016 -0800 + + Version bumped to 0.5.175 + + Signed-off-by: Kevin Brace + +commit 110260cbbb05f382834e6f27c7be0e58e9efc757 +Author: Adam Jackson +Date: Wed Dec 21 21:41:34 2016 -0800 + + Check ABI major not encoded ABI + + Signed-off-by: Adam Jackson + +commit aa7e5477346e25616996a3de0d6f4537f603ab96 +Author: Kevin Brace +Date: Wed Dec 21 21:01:39 2016 -0800 + + Version bumped to 0.5.174 + + Now, OpenChrome DDX is compatible with ABI 23. + + Signed-off-by: Kevin Brace + +commit bbbf0bb27ecc976e3018724dc4bd3273d98c0d8c +Author: Adam Jackson +Date: Wed Dec 21 20:53:21 2016 -0800 + + Adapt Block/WakeupHandler signature for ABI 23 + + Signed-off-by: Adam Jackson + +commit f624a55a34083f76c1351da1574f1cae7f11cb55 +Author: Kevin Brace +Date: Wed Dec 21 20:35:06 2016 -0800 + + Version bumped to 0.5.173 + + Signed-off-by: Kevin Brace + +commit 56b3faff8e831a82f462db0f8835db591b4ef913 +Author: Dylan Aïssi +Date: Wed Dec 21 20:31:19 2016 -0800 + + Fix a spelling error inside via_xv.c + + Signed-off-by: Dylan Aïssi + Acked-by: Kevin Brace + +commit 25ba0a409bf0676039b42aca2226acd8af64e9f6 +Author: Chris Lamb +Date: Wed Dec 21 20:25:57 2016 -0800 + + Altering the compilation build script to make it reproducible. + + Signed-off-by: Chris Lamb + Reviewed-by: Dylan Aïssi + Acked-by: Kevin Brace + +commit 62de0cfac2cd5db74ea0a6ab61066d48af95b027 +Author: Kevin Brace +Date: Thu Nov 17 19:16:31 2016 -0800 + + Version bumped to 0.5.172 + + Signed-off-by: Kevin Brace + +commit 2a7918b1f8c97b17cec91bf357a8dd5a8ce1812a +Author: Kevin Brace +Date: Thu Nov 17 19:14:25 2016 -0800 + + Minor adjustments made to log messages + + Signed-off-by: Kevin Brace + +commit 9c5c436d1ee9f156859f35d7a5d1c604a9b5ad9c +Author: Kevin Brace +Date: Thu Nov 17 19:09:21 2016 -0800 + + Removing debug messages related to hardware cursor + + Putting debug messages inside functions that handle hardware cursor + clutters up Xorg.n.log. (i.e., Xorg.0.log) + + Signed-off-by: Kevin Brace + +commit 59eacc65e17715060f486e5ee2da6de962545e63 +Author: Kevin Brace +Date: Fri Nov 4 20:23:47 2016 -0700 + + Version bumped to 0.5.171 + + Signed-off-by: Kevin Brace + +commit 7a55ef113d0c17ca34ca7d43edb493eb5c63b979 +Author: Kevin Brace +Date: Fri Nov 4 20:22:41 2016 -0700 + + Turning off gamma correction for both IGA1 and IGA2 + + Turning on gamma correction for 16-bit and 32-bit (24-bit) color + depth caused the screen color to get completely messed up in + some models and / or OS combinations, so it will be turned off + to remedy this regression. + + Signed-off-by: Kevin Brace + +commit c793eeaec4496c4eeae73223d9722b9b3615fec1 +Author: Kevin Brace +Date: Fri Nov 4 19:56:05 2016 -0700 + + Version bumped to 0.5.170 + + Signed-off-by: Kevin Brace + +commit d04170d5f2245bd1276e7221f9c26ebdd17f1006 +Author: Kevin Brace +Date: Fri Nov 4 19:55:07 2016 -0700 + + Not touching palette LUT resolution bit from viaIGA1SetColorDepth + + Signed-off-by: Kevin Brace + +commit af80fba649c30a0b5011cf34a572b8bbf9b452bb +Author: Kevin Brace +Date: Wed Nov 2 21:03:11 2016 -0700 + + Version bumped to 0.5.169 + + Signed-off-by: Kevin Brace + +commit 56960c27ca176e6eff1844a418bfad077aeb75e6 +Author: Kevin Brace +Date: Wed Nov 2 21:02:05 2016 -0700 + + Removing code that will reinitialize VGA registers from IGA2 + + Signed-off-by: Kevin Brace + +commit 8c51f6779b91978919183a6cacdc3252cc4cb744 +Author: Kevin Brace +Date: Wed Nov 2 17:16:38 2016 -0700 + + Setting IGA2 color depth atomically + + Removed the code that sets IGA2 color depth (i.e., 8-bit, 16-bit, or + 32-bit) from viaIGA2SetDisplayRegister function. + + Signed-off-by: Kevin Brace + +commit f38fa790cea900c72e0a518ea0f5463d75dbc647 +Author: Kevin Brace +Date: Wed Nov 2 13:43:00 2016 -0700 + + Version bumped to 0.5.168 + + Signed-off-by: Kevin Brace + +commit a5c8b5927bae2f75a587a0c8fa957918198cfdf1 +Author: Kevin Brace +Date: Wed Nov 2 13:41:58 2016 -0700 + + Merging the contents of via_bandwidth.c into via_display.c + + Signed-off-by: Kevin Brace + +commit a0aecea4fe2850e7a75a0f84c65ab0c1f35f176c +Author: Kevin Brace +Date: Tue Nov 1 00:25:14 2016 -0700 + + Version bumped to 0.5.167 + + With this version, 16-bit color depth is now finally useful. If the + user wants to use two monitors side by side, 16-bit color depth + will allow combined horizontal screen resolution greater than 2048 + dots. + + Signed-off-by: Kevin Brace + +commit f39b78d2b65dc3790d3bf9e62cd021fdb7983d4f +Author: Kevin Brace +Date: Tue Nov 1 00:24:23 2016 -0700 + + Rewrite of palette setting code + + While the code still has issues with color tone in 16-bit color + depth and completely messed up palette in 8-bit color depth, + the rewritten code now makes 16-bit color depth useful to the + user. + + Signed-off-by: Kevin Brace + +commit 683b56565eb032b964a11caed562530d6d488497 +Author: Kevin Brace +Date: Tue Oct 25 20:10:34 2016 -0700 + + Version bumped to 0.5.166 + + Signed-off-by: Kevin Brace + +commit 0d241f85626da7f3942c681ec9b5d8d1523f8997 +Author: Kevin Brace +Date: Tue Oct 25 20:08:55 2016 -0700 + + Setting IGA1 color depth and LUT output atomically + + Removed the code that sets IGA1 color depth (i.e., 8-bit, 16-bit, or + 32-bit) and LUT output (6-bit or 8-bit) from viaIGA1SetDisplayRegister + function. + + Signed-off-by: Kevin Brace + +commit dc83f3f70b32de616ca03ef5d2dfcf1b95c58b9a +Author: Kevin Brace +Date: Fri Oct 21 17:55:38 2016 -0700 + + Version bumped to 0.5.165 + + Signed-off-by: Kevin Brace + +commit 6f8cd73f7ad83ec21735d0b3c288a34910ad76f2 +Author: Kevin Brace +Date: Fri Oct 21 17:54:29 2016 -0700 + + Altered the IGA2 HW reset sequence during mode setting + + Signed-off-by: Kevin Brace + +commit 64d6672c02e0bae65c52418e8e9fe689c4149ae3 +Author: Kevin Brace +Date: Wed Oct 12 20:13:15 2016 -0700 + + Version bumped to 0.5.164 + + Signed-off-by: Kevin Brace + +commit 166c3eea5688d7e97edf392ec8ad778bfe0bbbc8 +Author: Kevin Brace +Date: Wed Oct 12 20:05:53 2016 -0700 + + Controlling IGA1 and IGA2 output state from *_commit and *_prepare + + The code was updated so that IGA1 and IGA2 output state is controlled + from *_commit and *_prepare callback functions. Previously, display + controller output state was set from the a mode setting callback + function. + + Signed-off-by: Kevin Brace + +commit 2fd9ff49e2144f3850269e2e03a6075927774707 +Author: Kevin Brace +Date: Fri Oct 7 00:10:54 2016 -0700 + + Altered the IGA1 HW reset sequence during mode setting + + Signed-off-by: Kevin Brace + +commit f20b152ec493baad331ee9efa7e715c042c25f92 +Author: Kevin Brace +Date: Thu Oct 6 23:12:11 2016 -0700 + + Version bumped to 0.5.163 + + Signed-off-by: Kevin Brace + +commit a4b1285655e569893d4cabfe391c29a519b4af3a +Author: Kevin Brace +Date: Thu Oct 6 23:10:28 2016 -0700 + + Rewriting of via_lvds_detect + + Signed-off-by: Kevin Brace + +commit eb02101c4d9b41bebac51813750d7cba4046dac9 +Author: Kevin Brace +Date: Thu Oct 6 14:03:05 2016 -0700 + + Version bumped to 0.5.162 + + Signed-off-by: Kevin Brace + +commit 7c15ee25d0c4fd37dc0b07dc68ffb849dcf50ba0 +Author: Kevin Brace +Date: Thu Oct 6 14:01:10 2016 -0700 + + Change how AGP based UniChrome IGP's FP display source is set + + This change affects KM400, K8M800, PM800, and P4M800 Pro chipset + families and their derivatives. The newer devices (PCI Express + based Chrome9 IGPs and single chip type chipsets) are not affected. + + Signed-off-by: Kevin Brace + +commit 97df49c4abce98b44ad4fef964cc81d620f70aab +Author: Kevin Brace +Date: Tue Oct 4 15:53:02 2016 -0700 + + Version bumped to 0.5.161 + + Signed-off-by: Kevin Brace + +commit 17d7e94b437988497fc60a3f1f10824bd7a0048d +Author: Kevin Brace +Date: Tue Oct 4 15:44:22 2016 -0700 + + Discontinued the use of viaSetLVDSOutput + + Signed-off-by: Kevin Brace + +commit 8285de827c752e32f732cbd0814bcf39d48c1072 +Author: Kevin Brace +Date: Tue Oct 4 11:43:11 2016 -0700 + + Added viaLVDS1SetFormat + + viaLVDS1SetFormat function sets the format (SPWG or OPENLDI) for + LVDS1 (LVDS Channel 1) integrated LVDS transmitter. This function + is located inside via_lvds.c. + + Signed-off-by: Kevin Brace + +commit 46f5fcc6b0810fb0ddbd947f89ce22f7281071bc +Author: Kevin Brace +Date: Tue Oct 4 11:37:13 2016 -0700 + + Added viaLVDS2SetFormat + + viaLVDS2SetFormat function sets the format (SPWG or OPENLDI) for + LVDS2 (LVDS Channel 2) integrated LVDS transmitter. This function + is located inside via_lvds.c. + + Signed-off-by: Kevin Brace + +commit 8f01595b71ffed8d528ad58bb64348e918980eb0 +Author: Kevin Brace +Date: Tue Sep 27 18:04:37 2016 -0700 + + Version bumped to 0.5.160 + + Signed-off-by: Kevin Brace + +commit 1a0d4c733ad90e67cae44f5eca349a782047ff92 +Author: Kevin Brace +Date: Tue Sep 27 18:03:16 2016 -0700 + + Updated SiI 164 register settings to suggested settings + + Changed the register settings of Silicon Image SiI 164 to follow + the settings suggested by the datasheet. + + Tested-by: Justin Chevrier + Signed-off-by: Kevin Brace + +commit c4c17e8e3395221dccb8e6f922e55b7fc3037ea0 +Author: Kevin Brace +Date: Thu Sep 22 01:07:52 2016 -0700 + + Version bumped to 0.5.159 + + Signed-off-by: Kevin Brace + +commit e43dc9078336ea6f2ede9d48f0f5159eb92dede1 +Author: Kevin Brace +Date: Thu Sep 22 01:06:37 2016 -0700 + + Changed the way integrated TMDS transmitter detects DVI presence + + Signed-off-by: Kevin Brace + +commit c907c1c8552a814d9f4a183d9851b3b39255c86d +Author: Kevin Brace +Date: Thu Sep 22 00:32:54 2016 -0700 + + Version bumped to 0.5.158 + + Signed-off-by: Kevin Brace + +commit 5f01c7e1df141f6fb1a62041950fdf3113abab89 +Author: Kevin Brace +Date: Thu Sep 22 00:28:27 2016 -0700 + + Created viaExtTMDSSetDataDriveStrength + + viaExtTMDSSetDataDriveStrength function is meant to replace + viaVT1632SetDataDriveStrength and viaSiI164SetDataDriveStrength + functions. + + Signed-off-by: Kevin Brace + +commit ac234b827c899613e900a7baeb64ec8f09c4cd2d +Author: Kevin Brace +Date: Thu Sep 22 00:09:01 2016 -0700 + + Created viaExtTMDSSetClockDriveStrength + + viaExtTMDSSetClockDriveStrength function is meant to replace + viaVT1632SetClockDriveStrength and viaSiI164SetClockDriveStrength + functions. + + Signed-off-by: Kevin Brace + +commit 64f1dc0a974906a99448294c57378eacbacecccf +Author: Kevin Brace +Date: Wed Sep 21 23:54:26 2016 -0700 + + Created viaExtTMDSEnableIOPads + + viaExtTMDSEnableIOPads function is meant to replace + viaVT1632EnableIOPads and viaSiI164EnableIOPads functions. + + Signed-off-by: Kevin Brace + +commit d00f60c800e65d3e93bac8fb3cf169209d629bc5 +Author: Kevin Brace +Date: Wed Sep 21 22:22:03 2016 -0700 + + Created viaExtTMDSSetDisplaySource + + viaExtTMDSSetDisplaySource function is meant to replace + viaVT1632SetDisplaySource and viaSiI164SetDisplaySource functions. + + Signed-off-by: Kevin Brace + +commit 9eaa439a2277ffcb1040c4cc461b4ed4e2c34c52 +Author: Kevin Brace +Date: Wed Sep 21 22:01:21 2016 -0700 + + Changed via_sii164_dump_registers to viaSiI164DumpRegisters + + Signed-off-by: Kevin Brace + +commit 2ff109247c597cabf02134914ac83254528de020 +Author: Kevin Brace +Date: Wed Sep 21 21:57:58 2016 -0700 + + Changed the hardware resource initialization sequence for SiI 164 + + Signed-off-by: Kevin Brace + +commit df1dfeaf8d3d66f586b691589989522dd3b72989 +Author: Kevin Brace +Date: Wed Sep 21 21:54:10 2016 -0700 + + Changed the hardware resource initialization sequence for VT1632(A) + + Signed-off-by: Kevin Brace + +commit f699c172910de0049e433023fd9f4aababe5da9b +Author: Kevin Brace +Date: Wed Sep 21 21:10:08 2016 -0700 + + Eliminated new compilation warnings + + Signed-off-by: Kevin Brace + +commit eef0b90793b7dd59daa3db8afb01a9a3272646f4 +Author: Kevin Brace +Date: Wed Sep 21 21:05:30 2016 -0700 + + Changed viaAnalogSource to viaAnalogSetDisplaySource + + Also, made updates to the log message displayed by + viaAnalogSetDisplaySource function. + + Signed-off-by: Kevin Brace + +commit e6c5030252a85205fe0f0f3ad4c757eacd711aac +Author: Kevin Brace +Date: Sat Sep 17 15:40:09 2016 -0700 + + Version bumped to 0.5.157 + + Signed-off-by: Kevin Brace + +commit c6a65f409044bbb5c809e762b3b5f8ea443ad056 +Author: Kevin Brace +Date: Sat Sep 17 15:39:06 2016 -0700 + + Moving the code that sets sync polarity of analog VGA + + Rather than setting the sync polarity of analog VGA when + initializing IGA1, it was moved to where analog VGA is + specifically initialized. + + Signed-off-by: Kevin Brace + +commit cdc5d9617646ecc6a83cdd1e9229a6b8be1e2f4f +Author: Kevin Brace +Date: Sat Sep 17 14:12:43 2016 -0700 + + Version bumped to 0.5.156 + + Signed-off-by: Kevin Brace + +commit f548b2991e3fe1c25a4a4c1e6cc694ea0592a22d +Author: Kevin Brace +Date: Sat Sep 17 14:11:37 2016 -0700 + + Correcting a bug in DVI presence detection + + The bit position used to test the presence of a DVI monitor was + referring the wrong bit position. This only affects those with + an integrated TMDS transmitter. + + Signed-off-by: Kevin Brace + +commit fa16bcf077c8f78c3b884b14bd4bfdbd037eadc4 +Author: Kevin Brace +Date: Sat Sep 17 13:21:33 2016 -0700 + + Version bumped to 0.5.155 + + Signed-off-by: Kevin Brace + +commit 30cd7cd0b71da188ff29fb212a0afa97207a6709 +Author: Kevin Brace +Date: Sat Sep 17 13:20:21 2016 -0700 + + Improvement in standard VGA register initialization + + Signed-off-by: Kevin Brace + +commit 1ab304a9c23d7abfcbc035859c52933c5dc9e0de +Author: Kevin Brace +Date: Sun Sep 11 00:49:48 2016 -0700 + + Changed via_vt1632_dump_registers to viaVT1632DumpRegisters + + Also, made small changes to the log messages. + + Signed-off-by: Kevin Brace + +commit 10666db104e7a2a8dec3bd8176f2adf0fb355e6e +Author: Kevin Brace +Date: Sun Sep 11 00:09:49 2016 -0700 + + Fixing incorrect logical AND + + The previous way the if statements were written will cause + malfunctions. + + Suggested-by: Benno Schulenberg + Signed-off-by: Kevin Brace + +commit 22eb39ff3e33ff8f9b59fccc7ff2c329a67b3993 +Author: Kevin Brace +Date: Sat Sep 10 23:43:56 2016 -0700 + + Version bumped to 0.5.154 + + Signed-off-by: Kevin Brace + +commit 8932f036cc832982c1aa778237ae2303b8268fab +Author: Kevin Brace +Date: Sat Sep 10 23:42:07 2016 -0700 + + Setting I/O driver strength from the relevant code that needs it + + The code to set I/O driver strength for clock and data I/O pads + were transferred to the sections where they actually handle the + external device screen mode setting. This affects VIA Technologies + VT1632(A) TMDS transmitter, Silicon Image SiI 164 TMDS transmitter, + and various external TV encoders. + + Signed-off-by: Kevin Brace + +commit 6f5b77320edd3ab1a644f2aa6e18db1d316944ba +Author: Kevin Brace +Date: Fri Sep 9 16:12:28 2016 -0700 + + Version bumped to 0.5.153 + + Signed-off-by: Kevin Brace + +commit 3ae673418b207c17fe452ba9ab524a60293a6d9d +Author: Kevin Brace +Date: Fri Sep 9 16:09:18 2016 -0700 + + Remove initialization of DVP0 from viaIGA2Init + + The initialization of DVP0 will now be done at the code that initializes + the output device. + + Signed-off-by: Kevin Brace + +commit 32f146a8b6f0164ec0cce1124ee055d0b2fd8141 +Author: Kevin Brace +Date: Fri Sep 9 16:02:31 2016 -0700 + + Improved SiI 164 display source and I/O pad initialization + + This improvement affects CLE266 through P4M900 chipsets. + + Signed-off-by: Kevin Brace + +commit bd569c03883f2552fc168dd22285b8ab99bd5a39 +Author: Kevin Brace +Date: Fri Sep 9 15:40:19 2016 -0700 + + Improved VT1632(A) display source and I/O pad initialization + + This improvement affects CLE266 through P4M900 chipsets. + + Signed-off-by: Kevin Brace + +commit bedc6badd3ae24e82e8de803b818bb54d327bc13 +Author: Kevin Brace +Date: Wed Sep 7 13:41:38 2016 -0700 + + Version bumped to 0.5.152 + + Signed-off-by: Kevin Brace + +commit a34b1919a7b9aebd9c53c7db534543cfc3b44b11 +Author: Kevin Brace +Date: Wed Sep 7 13:18:25 2016 -0700 + + Fixing incorrect logical negation + + The previous way if statements with negation was written will + cause malfunctions. + + Signed-off-by: Kevin Brace + +commit 04370eb04e7cf8e4f90f574b3d96a414db0fdd40 +Author: Kevin Brace +Date: Fri Sep 2 22:18:45 2016 -0700 + + Version bumped to 0.5.151 + + This version fixes a bug that existed since Version 0.5.103 that + made ASUS P5VD2-MX SE (P4M890 chipset) not be able to switch to + tty1 through tty6. I thank Max Rus for tracking down the bad + commit, and fixed the bug. + + Signed-off-by: Kevin Brace + +commit 9da49a3a4d568ee341d7d4677106a14d17596ab9 +Author: Max Rus +Date: Fri Sep 2 22:14:54 2016 -0700 + + Fix for tty1 through tty6 not working + + There was a bug with commit f4166d6 that made ASUS P5VD2-MX SE + (P4M890 chipset) not be able to switch to tty1 through tty6. + + Signed-off-by: Max Rus + Tested-by: Kevin Brace + +commit daadf39ae6e2207a9dd6eb573f3d203e9f84b0a7 +Author: Kevin Brace +Date: Thu Sep 1 23:40:38 2016 -0700 + + Version bumped to 0.5.150 + + This version fixes a bug where turning off an LVDS FP (Flat Panel) + when the DVI coming off of an integrated TMDS transmitter is in + use will turn off both display devices. Also, older chipsets like + CLE266, KM400, and K8M800 chipset families will now execute a + different code path (legacy code) when turning on / off the FP + than the newer devices. + + Signed-off-by: Kevin Brace + +commit fab6c684086da1ab3e3ee3806da0208becddbf80 +Author: Kevin Brace +Date: Thu Sep 1 23:20:35 2016 -0700 + + Changes in FP turn on / off code behavior + + There are still number of issues with the FP (Flat Panel) code, but + did a temporary fix to relegate the use of old FP turn on / off code + to CLE266, KM400, and K8M800 chipset families. + + Signed-off-by: Kevin Brace + +commit 4715d9661ffbdd4499200b0e751c6c72621eeee9 +Author: Kevin Brace +Date: Thu Sep 1 23:18:40 2016 -0700 + + Not turning on / off integrated TMDS / LVDS1 if TMDS is in use + + While this code is somewhat of a short term fix, if the integrated + TMDS / LVDS1 transmitter is not in use, the FP (Flat Panel) code + will not manage turning the circuitry on / off. This affects CX700 + chipset through VX900 chipset. + + Signed-off-by: Kevin Brace + +commit 5813b10aeff86ec139ca2c7db156fdae5ff711d5 +Author: Kevin Brace +Date: Thu Sep 1 16:09:45 2016 -0700 + + Integrated TMDS (DVI) code will now manage power on / off + + Previously, the integrated TMDS code was relying on the FP (Flat + Panel) code to turn on the relevant circuitry. This will become + a problem if the system does not have a FP. Now, integrated TMDS + code will manage power on / off of the integrated TMDS transmitter. + + Signed-off-by: Kevin Brace + +commit db9e2ddd7df7ab66310938c006cd1867a95beb33 +Author: Kevin Brace +Date: Tue Aug 30 12:56:38 2016 -0700 + + Version bumped to 0.5.149 + + Signed-off-by: Kevin Brace + +commit 2893cf3de569848895430d0952965bcfb1eb183d +Author: Kevin Brace +Date: Tue Aug 30 12:55:01 2016 -0700 + + Adding VX900 chipset to VT1625 TV encoder initialization + + Considering that VX900 chipset is a superset of VX855 chipset, + there is probably no harm in adding it when the code runs through + ViaSetTVClockSource function. + + Signed-off-by: Kevin Brace + +commit 5b661b1de758270643a453d9dbddc4d220696380 +Author: Kevin Brace +Date: Tue Aug 30 09:53:09 2016 -0700 + + Moved via_sii164_mode_set inside via_sii164.c + + Signed-off-by: Kevin Brace + +commit b15034b73d2e35899b74a0c9c733cdb72de1a324 +Author: Kevin Brace +Date: Tue Aug 30 09:41:11 2016 -0700 + + Moved via_vt1632_mode_set inside via_vt1632.c + + Signed-off-by: Kevin Brace + +commit c3a6a64cf31606360ca54bcac2e2527a87dcadf5 +Author: Kevin Brace +Date: Tue Aug 30 09:35:21 2016 -0700 + + Proactively turn on DVP1 I/O pads when using DVI in new devices + + When an external TMDS transmitter is being utilized, turn on DVP1 + (Digital Video Port 1) I/O pads in CX700 chipset through VX900 + chipset. + + Signed-off-by: Kevin Brace + +commit 068f0c8d5b8bd99b00d3a0a7105aaca1f618a9db +Author: Kevin Brace +Date: Mon Aug 29 21:49:17 2016 -0700 + + Version bumped to 0.5.148 + + Made major improvements in supporting an external TV encoder + automatic detection and initialization, but since the TV output + code is in a very poor shape, more works needs to be done to fix + its issues. + + Signed-off-by: Kevin Brace + +commit aff46f24fab98d6f2fb800159b82c6883202f9e8 +Author: Kevin Brace +Date: Mon Aug 29 21:44:35 2016 -0700 + + Got DIP0 and DIP1 confused for CLE266 chipset + + DIP0 (Digital Interface Port 0) is the port that can connect to an + external TV encoder in CLE266 chipset, not DIP1. DIPx is equivalent + to DVPx (Digital Video Port x) in newer devices. + + Signed-off-by: Kevin Brace + +commit 9ee41a948d655561ad9411e6daa86c1b49347310 +Author: Kevin Brace +Date: Mon Aug 29 21:29:46 2016 -0700 + + Discontinuing TVPort option + + Since the detection of an external TV encoder can now be done + automatically, manual option to set the port (i.e., DVP0, DVP1, + DFP Low, and DFP High) is discontinued since there is no more + use for it. + + Signed-off-by: Kevin Brace + +commit 140183cf11075668080cf3eda64a273a8af7ba9e +Author: Kevin Brace +Date: Mon Aug 29 20:44:10 2016 -0700 + + Support for automatic TV encoder I/O pad turn on + + Code was added to perform automatic TV encoder I/O pad turn on. + The code was written in a way it can detect which external interface + has the TV encoder attached to it, and select the correct external + interface automatically. The code supports all Chrome IGPs. (from + CLE266 chipset all the way to VX900 chipset) + + Signed-off-by: Kevin Brace + +commit fb2a3e59ed6cf8ef37abbc4707d10304f2716a56 +Author: Kevin Brace +Date: Mon Aug 29 13:07:02 2016 -0700 + + Improvement in CLE266 chipset pin strapping diagnostic log messages + + While the pin strapping diagnostic log messages do not really do + anything other than leave log messages, there were several + implementation flaws in the way it was implemented for CLE266 + chipset. It should leave more accurate information with the new + fixes. + + Signed-off-by: Kevin Brace + +commit 6b073aa1645eb76d75db297ac700bd5fc3a34696 +Author: Kevin Brace +Date: Sun Aug 28 19:39:38 2016 -0700 + + Version bumped to 0.5.147 + + Support for automatic external TV encoder display source assignment + was added in this version. Additional work needs to be done to make + the external TV encoder detection and initialization fully automatic, + but at least this is the first step in the right direction. + + Signed-off-by: Kevin Brace + +commit 35e4ae7b0322cc93b14d79a2ee7c05c86224cae6 +Author: Kevin Brace +Date: Sun Aug 28 19:37:55 2016 -0700 + + Support for automatic TV encoder display source assignment + + Code was added to perform automatic display source assignment + (i.e., IGA1 or IGA2) when an external TV encoder is attached. The + code was written in a way it can detect which external interface + has the TV encoder attached to it, and select the correct external + interface automatically. The code supports all Chrome IGPs. (from + CLE266 chipset all the way to VX900 chipset) + + Signed-off-by: Kevin Brace + +commit 70591e15807ebcc4f0baf1afd29d0373b8734d82 +Author: Kevin Brace +Date: Sun Aug 28 19:37:02 2016 -0700 + + Moved several functions inside via_tv.c + + Signed-off-by: Kevin Brace + +commit 2437513c359b1f6a29fe7b2742f2e1aa17bf4f90 +Author: Kevin Brace +Date: Fri Aug 26 23:54:06 2016 -0700 + + Version bumped to 0.5.146 + + Signed-off-by: Kevin Brace + +commit 9340d6cb8b67e35d38d98410407de0c10e5966fe +Author: Kevin Brace +Date: Fri Aug 26 23:49:51 2016 -0700 + + Removed unused variable warnings from via_exa_h6.c + + Signed-off-by: Kevin Brace + +commit d0ef79cf8867fd7f0e72c8569c3be87cfd7279f1 +Author: Kevin Brace +Date: Fri Aug 26 23:42:36 2016 -0700 + + Removed unused variable warnings from via_exa_h2.c + + Signed-off-by: Kevin Brace + +commit 03b8601af8df02ab9f67462b508bf9f177cc6078 +Author: Kevin Brace +Date: Fri Aug 26 23:35:53 2016 -0700 + + Moved xf86I2CMaskByte inside via_i2c.c + + The idea was borrowed from Luc Verhaegen's xf86-video-unichrome DDX. + + Signed-off-by: Kevin Brace + +commit 15126d411328c037ef85ec3d252aaf4751512825 +Author: Kevin Brace +Date: Fri Aug 26 23:09:49 2016 -0700 + + Version bumped to 0.5.145 + + Signed-off-by: Kevin Brace + +commit 45b88688c971233bbbb2c57ed93673d0cbdde228 +Author: Kevin Brace +Date: Fri Aug 26 22:47:02 2016 -0700 + + Giving the original author of external TMDS transmitter code credit + + Luc Verhaegen notified that the code to support Silicon Image SiI 164 + and VIA Technologies VT1632(A) closely resembles the code he wrote + for xf86-video-unichrome. After examining the code, portions of it + appears to resemble Luc's original code. Christian Jung who was the + author of the VIA Technologies VT1632(A) code acknowledged the lack + of Luc's copyright in the code he submitted. + + Suggested-by: Luc Verhaegen + Acked-by: JUNG, Christian + Signed-off-by: Kevin Brace + +commit 4b62252c5a2839b82013a3d21407ac0269679fb5 +Author: Kevin Brace +Date: Thu Aug 25 08:22:26 2016 -0700 + + Version bumped to 0.5.144 + + For initial testing of Silicon Image SiI 164, please use this + version rather than the older versions. + + Signed-off-by: Kevin Brace + +commit 60f27a179bfa3ea8943cfa2c8416d1a35e30f17f +Author: Kevin Brace +Date: Thu Aug 25 08:20:54 2016 -0700 + + Forgot to include via_sii164.h inside via_tmds.c + + Signed-off-by: Kevin Brace + +commit f030c70f1aeb8e48a20bc6a5fc8f7f54336b602a +Author: Kevin Brace +Date: Thu Aug 25 08:15:01 2016 -0700 + + Version bumped to 0.5.143 + + Signed-off-by: Kevin Brace + +commit 73567fa0160012641e48168b8fec89d282a99462 +Author: Kevin Brace +Date: Thu Aug 25 08:09:56 2016 -0700 + + Moving HI access code to various functions + + Previously, the cursor control related callback functions were + directly accessing HI (Hardware Icon) registers, but that will now + be moved to various functions that are specifically designed to + handle them. + + Signed-off-by: Kevin Brace + +commit 4546c5f470712c2534c81d17078ab98f30bce02d +Author: Kevin Brace +Date: Thu Aug 25 05:19:43 2016 -0700 + + Version bumped to 0.5.142 + + There was a problem with Version 0.5.141 where the files to support + Silicon Image SiI 164 were not registered with the repository. This + issue should be resolved by this commit. This version is really the + initial code support for SiI 164. At this point, the code is unproven. + + Signed-off-by: Kevin Brace + +commit edfac9689b9b9d826ba5852ac0f1e5988402664c +Author: Kevin Brace +Date: Thu Aug 25 05:06:19 2016 -0700 + + Version bumped to 0.5.141 + + Signed-off-by: Kevin Brace + +commit 23f83d2a6ac64fe43949896104778dd896f97619 +Author: Kevin Brace +Date: Thu Aug 25 05:01:07 2016 -0700 + + Silicon Image SiI 164 initial code inclusion + + This is the initial code inclusion to support Silicon Image SiI 164 + external TMDS transmitter. The code to support SiI 164 was borrowed + from the proven VIA Technologies VT1632(A) external TMDS transmitter + code. The code is not likely to work at this point since it has not + been tested due to lack of equipment availability. + + Signed-off-by: Kevin Brace + +commit adf0d6c31f686706bc92f7ce3770d6a864fb385a +Author: Kevin Brace +Date: Thu Aug 25 04:05:15 2016 -0700 + + Version bumped to 0.5.140 + + Signed-off-by: Kevin Brace + +commit aaa432cb5312f4bef85261c481cae5af32822cc6 +Author: Kevin Brace +Date: Thu Aug 25 03:58:24 2016 -0700 + + Changing xrandr designation for a flat panel from LVDS to FP + + The term LVDS (Low Voltage Differential Signaling) is a technical + term for signal transmission. It is a confusing word for describing + a flat panel. The term, FP (Flat Panel), will be the new term used + from now on. + + Signed-off-by: Kevin Brace + +commit 2bcae133f067e5eba601f72322e5fb6cfc3290c7 +Author: Kevin Brace +Date: Thu Aug 25 03:54:44 2016 -0700 + + Designating FP dynamically for xrandr + + The code was updated so that FP (Flat Panel) designation for xrandr + will be assigned dynamically. The code to facilitate this was + borrowed from xf86-video-r128 DDX. + + Signed-off-by: Kevin Brace + +commit 6fe9fef6b49a69e7e8ed6d50e98f2dcb69341cfc +Author: Kevin Brace +Date: Thu Aug 25 03:38:59 2016 -0700 + + Forgot to increment the number of VGA connectors + + Signed-off-by: Kevin Brace + +commit 58f9d89aed55aa41b878943a91abfb06281fd951 +Author: Kevin Brace +Date: Thu Aug 25 03:28:53 2016 -0700 + + Designating analog VGA dynamically for xrandr + + The code was updated so that analog VGA designation for xrandr will be + assigned dynamically. The code to facilitate this was borrowed from + xf86-video-r128 DDX. + + Signed-off-by: Kevin Brace + +commit 60b8773e1d7a25ac0f62331d2238b90b0b88404e +Author: Kevin Brace +Date: Thu Aug 25 03:15:40 2016 -0700 + + Version bumped to 0.5.139 + + Signed-off-by: Kevin Brace + +commit 433d2a06bd169e93ed38d1cd06552697752e7dc1 +Author: Kevin Brace +Date: Wed Aug 24 18:21:52 2016 -0700 + + Removing ViaDisplayDisableDVO from via_tv.c + + Signed-off-by: Kevin Brace + +commit 90077cd187657b5207a98be1361878b842a36318 +Author: Kevin Brace +Date: Wed Aug 24 18:16:50 2016 -0700 + + Moving ViaPrintMode from via_outputs.c to via_display.c + + Signed-off-by: Kevin Brace + +commit 28c2e12f89b81bf345d6ca3740a4c08197bdc3fb +Author: Kevin Brace +Date: Wed Aug 24 18:12:13 2016 -0700 + + Removing ViaPrintMode from via_analog.c + + Signed-off-by: Kevin Brace + +commit e9b14c38ac4b36e62d2dbe66bee06cd9b3be9719 +Author: Kevin Brace +Date: Wed Aug 24 17:58:35 2016 -0700 + + Discontinued ViaPanelLookUpModeIndex + + This function is located inside via_lvds.c. + + Signed-off-by: Kevin Brace + +commit 140a0c726aef13f3a7cb7354dca6499e3fdbd1ba +Author: Kevin Brace +Date: Wed Aug 24 17:56:22 2016 -0700 + + Removed a compilation warning from viaVidCopyInit + + Signed-off-by: Kevin Brace + +commit 4243c19abe933efe7abdfef979ae7eeece29c91a +Author: Kevin Brace +Date: Wed Aug 24 17:53:32 2016 -0700 + + Removed a compilation warning from via_tv_mode_valid + + Signed-off-by: Kevin Brace + +commit 1a680374b48c2b8914f028f2c7e06ed1c41b3387 +Author: Kevin Brace +Date: Wed Aug 24 17:45:34 2016 -0700 + + Version bumped to 0.5.138 + + Signed-off-by: Kevin Brace + +commit dd809da78fd302bf5c8095e6a7164052b6f170a1 +Author: Kevin Brace +Date: Wed Aug 24 17:43:58 2016 -0700 + + Major rewriting of via_lvds_detect callback function + + Signed-off-by: Kevin Brace + +commit dc57b925d0b75bdd43635b07783d3af968650092 +Author: Kevin Brace +Date: Wed Aug 24 17:13:03 2016 -0700 + + Added missing RANDR_13_INTERFACE conditional compilation + + It was added to via_analog_get_property callback function. + + Signed-off-by: Kevin Brace + +commit f3ab6ae7e1e2803a9bca84f0bf9a6bb4db058a86 +Author: Kevin Brace +Date: Wed Aug 24 17:10:40 2016 -0700 + + Rearranging code inside via_analog.c + + Signed-off-by: Kevin Brace + +commit fe530e16e79219024cc3dd08854de73be5443dc0 +Author: Kevin Brace +Date: Wed Aug 24 17:04:51 2016 -0700 + + Removed more legacy panel table code + + Signed-off-by: Kevin Brace + +commit 37147d9e42cc6a2a8935e36b7f52ee85b60e51db +Author: Kevin Brace +Date: Wed Aug 24 16:39:51 2016 -0700 + + Removing a compilation warning from via_ums.c + + Signed-off-by: Kevin Brace + +commit 24d8ddc7ea1639250bbea0d15969726ba1ab0c15 +Author: Kevin Brace +Date: Wed Aug 24 16:23:45 2016 -0700 + + Version bumped to 0.5.137 + + Signed-off-by: Kevin Brace + +commit 6b66a9ec3c0c3caf75e804f0abe19871df014c4b +Author: Kevin Brace +Date: Wed Aug 24 16:21:22 2016 -0700 + + Fixing FP (Flat Panel) display controller to IGA2 + + Signed-off-by: Kevin Brace + +commit 87319d7d54fa548ab48b1b156a43caa3e588a0e9 +Author: Kevin Brace +Date: Wed Aug 24 16:15:22 2016 -0700 + + Removed unused variable and comment warning from via_lvds.c + + Signed-off-by: Kevin Brace + +commit d6ea17c6a701c31cdb263a595ec9e09c9e59a21d +Author: Kevin Brace +Date: Wed Aug 24 15:40:59 2016 -0700 + + Removed the last known compilation warnings from via_display.c. + + Signed-off-by: Kevin Brace + +commit 95f23d34819debb6beb008ce4e67af752614450c +Author: Kevin Brace +Date: Wed Aug 24 15:18:10 2016 -0700 + + Removed most compilation warnings inside via_display.c + + A few more remain. + + Signed-off-by: Kevin Brace + +commit 490bb555517cb045a126a4b1eab7d29ac61cdf88 +Author: Kevin Brace +Date: Tue Aug 23 16:51:57 2016 -0700 + + Set LVDS2 output format from via_lvds_mode_set + + Rather than setting LVDS2 output format from viaSetLVDSOutput + function, it will now be set from via_lvds_mode_set callback + function. + + Signed-off-by: Kevin Brace + +commit 941098ae9afae311a5ecc1ed589636ce9de03657 +Author: Kevin Brace +Date: Tue Aug 23 16:20:01 2016 -0700 + + Added viaLVDS2SetOutputFormat + + viaLVDS2SetOutputFormat function sets output format of LVDS2 + (LVDS Channel 2) integrated LVDS transmitter to rotation or + sequential mode. This function is located inside via_lvds.c. + + Signed-off-by: Kevin Brace + +commit 79860b7e95218dbfe19bdc6634042d4d4809b999 +Author: Kevin Brace +Date: Tue Aug 23 11:58:45 2016 -0700 + + Reorganizing via_lvds.c + + Signed-off-by: Kevin Brace + +commit 710a8a15a8ff5ac7693e24c7f339d0ead7108b02 +Author: Kevin Brace +Date: Mon Aug 22 20:31:02 2016 -0700 + + Version bumped to 0.5.136 + + Signed-off-by: Kevin Brace + +commit ef42c82ede738d064d8bf6285fbb780d41afc3a4 +Author: Kevin Brace +Date: Mon Aug 22 20:25:52 2016 -0700 + + Designating DVI dynamically for xrandr + + The code was updated so that DVI designation for xrandr will have + a numbering convention that will look like, DVI-1, DVI-2, etc. If + both integrated and external TMDS transmitters are detected in the + same system, the integrated one will be assigned DVI-1 first. The + code to facilitate this was borrowed from xf86-video-r128 DDX. + + Suggested-by: Eric Kudzin + Signed-off-by: Kevin Brace + +commit 288a47e2e66e3ca61c971c68b64fa354f210cb46 +Author: Kevin Brace +Date: Sat Aug 20 19:54:53 2016 -0700 + + Changed KM400 chipset family pin strapping message + + KM400 chipset family (KM400, KM400A, KN400, and P4M800) has FPDP + (Flat Panel Display Port), DVP0 (Digital Video Port 0), and DVP1, + hence, pin strapping information is same as other AGP based VIA + Chrome IGPs like P4M800 Pro and CN400 chipsets. Currently, pin + strapping is not really used by the code. + + Signed-off-by: Kevin Brace + +commit 4212ab0ca3899b35075bffa9ecf8535894e27441 +Author: Kevin Brace +Date: Sat Aug 20 19:22:23 2016 -0700 + + Version bumped to 0.5.135 + + This version adds IGA2 > 2048 horizontal resolution support for + VX900 chipset. + + Signed-off-by: Kevin Brace + +commit ce58120e2ad187298ba98e29e01c0d8701141bdb +Author: Kevin Brace +Date: Sat Aug 20 19:20:24 2016 -0700 + + IGA2 > 2048 horizontal resolution support for VX900 chipset + + Patrick Chen of VIA Technologies in December 2011 suggested that + VX900 chipset supports horizontal resolution > 2048, but no one + bothered to implement it for OpenChrome UMS code until now. + + Suggested-by: Patrick Chen + Signed-off-by: Kevin Brace + +commit 4450edfe85ebacb2d03202a212164cfaf4121006 +Author: Kevin Brace +Date: Sat Aug 20 16:58:56 2016 -0700 + + Version bumped to 0.5.134 + + This version adds IGA1 > 2048 horizontal resolution support for + VX900 chipset. + + Signed-off-by: Kevin Brace + +commit cd19542df40afcbd2f85de41b514355df72c5c36 +Author: Kevin Brace +Date: Sat Aug 20 16:50:00 2016 -0700 + + IGA1 > 2048 horizontal resolution support for VX900 chipset + + Patrick Chen of VIA Technologies in December 2011 suggested that + VX900 chipset supports horizontal resolution > 2048, but no one + bothered to implement it for OpenChrome UMS code until now. + + Suggested-by: Patrick Chen + Signed-off-by: Kevin Brace + +commit 9812c7bc26888fe9a0d4d3e0d8c4fcbbb383d2a7 +Author: Kevin Brace +Date: Fri Aug 19 23:55:07 2016 -0700 + + Version bumped to 0.5.133 + + This version fixes a potential bug where CRTC registers might not be + accessible in VX855 and VX900 chipsets. This fix was suggested by + Patrick Chen of VIA Technologies in December 2011, but no one really + followed up on it until now. + + Signed-off-by: Kevin Brace + +commit 292ff4adfa622335c24480fed69f7ef4474163ce +Author: Kevin Brace +Date: Fri Aug 19 23:47:41 2016 -0700 + + Handling CRTC register protect bit correctly for VX855 and VX900 + + According to what Patrick Chen of VIA Technologies wrote in December + 2011, CR47[4] (3X5.47[4]) is now CRTC register protect bit for VX855 + and VX900 chipsets. + + Suggested-by: Patrick Chen + Signed-off-by: Kevin Brace + +commit 27926279640476aee9b8feee970b7b39e31e719d +Author: Kevin Brace +Date: Fri Aug 19 23:10:57 2016 -0700 + + Version bumped to 0.5.132 + + Signed-off-by: Kevin Brace + +commit 2e5f975529f8a105a9fb079bb54222c00d528040 +Author: Kevin Brace +Date: Fri Aug 19 23:03:56 2016 -0700 + + Altered the names related to viaVT1632Rec + + Signed-off-by: Kevin Brace + +commit 72af9f6d263b671fd1c6be0a1ec53d9178949f67 +Author: Kevin Brace +Date: Fri Aug 19 22:28:48 2016 -0700 + + Moved via_vt1632_set_property and via_vt1632_get_property + + Moved the location of via_vt1632_set_property and + via_vt1632_get_property functions. + + Signed-off-by: Kevin Brace + +commit 334b3c241f162a82fa325d196a17e38e45791f6b +Author: Kevin Brace +Date: Fri Aug 19 14:57:58 2016 -0700 + + Rewrote viaVT1632CheckModeValidity + + Signed-off-by: Kevin Brace + +commit f13b361642478d76fdcf995ef266b53eb000b63a +Author: Kevin Brace +Date: Fri Aug 19 14:50:08 2016 -0700 + + Changed via_dvi_* to via_vt1632_* in via_vt1632.c + + Signed-off-by: Kevin Brace + +commit f0530262dc1e5aa07d8b71b0d93428a5789951fd +Author: Kevin Brace +Date: Fri Aug 19 14:44:11 2016 -0700 + + Changed via_vt1632_mode_valid to viaVT1632CheckModeValidity + + Signed-off-by: Kevin Brace + +commit b0cea97d2a5a9f405ff4ed893bb03fe4031f4ea7 +Author: Kevin Brace +Date: Thu Aug 18 21:27:50 2016 -0700 + + Version bumped to 0.5.131 + + Signed-off-by: Kevin Brace + +commit 01d1862252ff0aa93cafb8a20e6f8182cfa3dded +Author: Kevin Brace +Date: Thu Aug 18 21:24:24 2016 -0700 + + Added debug messages to via_vt1632_restore + + Signed-off-by: Kevin Brace + +commit 4ca31806c5acbd0493dc6f758692fbb837dee006 +Author: Kevin Brace +Date: Thu Aug 18 21:17:20 2016 -0700 + + Rewrite of viaVT1632RestoreRegisters + + Signed-off-by: Kevin Brace + +commit a086c6d4721c9b6a075f2d69bfc58ae8f2d3f116 +Author: Kevin Brace +Date: Thu Aug 18 14:53:37 2016 -0700 + + Changing via_dvi_restore to via_vt1632_restore + + Signed-off-by: Kevin Brace + +commit b3a2e455c5ec0af11b07d947f35507a680833fb2 +Author: Kevin Brace +Date: Thu Aug 18 14:17:11 2016 -0700 + + Changing via_vt1632_restore to viaVT1632RestoreRegisters + + This function is located inside via_vt1632.c. + + Signed-off-by: Kevin Brace + +commit 3b6163684f08007d4ed52b2c22ffc90bc14b3ec8 +Author: Kevin Brace +Date: Mon Aug 15 17:13:33 2016 -0700 + + Version bumped to 0.5.130 + + Signed-off-by: Kevin Brace + +commit 01eea49cc2e6e54dc8473a6d216bcfcc9b15058c +Author: Kevin Brace +Date: Mon Aug 15 17:11:55 2016 -0700 + + Added debug messages to via_vt1632_save + + Signed-off-by: Kevin Brace + +commit c0e9120c9dc04362b3fd12b9c28b8009ae187b50 +Author: Kevin Brace +Date: Mon Aug 15 16:41:29 2016 -0700 + + Rewrite of viaVT1632SaveRegisters + + Signed-off-by: Kevin Brace + +commit b150e2ecdd28f5b78d1b912d69ddaab94c8bce74 +Author: Kevin Brace +Date: Mon Aug 15 15:00:31 2016 -0700 + + Changing via_dvi_save to via_vt1632_save + + Signed-off-by: Kevin Brace + +commit c6250088df61d98fd5c7223b0b2d63d575fa9fb2 +Author: Kevin Brace +Date: Mon Aug 15 14:54:00 2016 -0700 + + Changing via_vt1632_save to viaVT1632SaveRegisters + + This function is located inside via_vt1632.c. + + Signed-off-by: Kevin Brace + +commit 0fa5ca2d154fa1b1bd799e6f9bfb40c59f308e5c +Author: Kevin Brace +Date: Sat Aug 13 02:18:23 2016 -0700 + + Version bumped to 0.5.129 + + Signed-off-by: Kevin Brace + +commit 944563e5b28db2cc0c8d71bb491e3ea3d27d5a1c +Author: Kevin Brace +Date: Fri Aug 12 22:59:22 2016 -0700 + + Set LVDS2 delay tap for CX700 family from via_lvds_mode_set + + Rather than setting LVDS2 (LVDS Channel 2) integrated LVDS + transmitter delay tap value from viaSetLVDSOutput function, it will + now be set from via_lvds_mode_set callback function. This change is + only applicable to CX700 / VX700 chipsets. + + Signed-off-by: Kevin Brace + +commit 281fc84bcb47c87cc7d452f549e571d0628fb5fd +Author: Kevin Brace +Date: Fri Aug 12 22:47:14 2016 -0700 + + Added viaLVDS2SetDelayTap + + viaLVDS2SetDelayTap function sets the delay tap value for LVDS2 + (LVDS Channel 2) integrated LVDS transmitter. This function is + located inside via_lvds.c. + + Signed-off-by: Kevin Brace + +commit da9844c6ba255cb4db98bf40e1c2bbca8cf4d9ce +Author: Kevin Brace +Date: Fri Aug 12 22:25:34 2016 -0700 + + Version bumped to 0.5.128 + + Signed-off-by: Kevin Brace + +commit c2c915e351d2345b36eefae8d89c4e3ec8e925cf +Author: Kevin Brace +Date: Fri Aug 12 22:24:28 2016 -0700 + + Make LVDS2 dithering programmable + + Now, LVDS2 output color dithering is set based on the information + provided by flat panel screen resolution table. + + Signed-off-by: Kevin Brace + +commit 80056d18ef4985a87b70a880004d9e847a657728 +Author: Kevin Brace +Date: Fri Aug 12 22:16:59 2016 -0700 + + Changing LVDS FP scratch pad indexing function name + + ViaPanelGetNativeModeFromScratchPad function's name was changed to + viaLVDSGetFPInfoFromScratchPad. + + Signed-off-by: Kevin Brace + +commit 75f7a2826ab11e7190ddc0f103e377802205e463 +Author: Kevin Brace +Date: Fri Aug 12 22:09:15 2016 -0700 + + Rewriting ViaPanelGetNativeModeFromScratchPad function + + Signed-off-by: Kevin Brace + +commit ba5a3fca07867b23808c040ba7b300e8566ba440 +Author: Kevin Brace +Date: Fri Aug 12 21:48:34 2016 -0700 + + Removing several compilation warnings from via_outputs.c + + Signed-off-by: Kevin Brace + +commit b4ccfaa80a482e84b62751ef8bf4eca347c9fbaa +Author: Kevin Brace +Date: Fri Aug 12 21:43:22 2016 -0700 + + Add useDualEdge and useDithering variables to ViaPanelInfo record + + These were added so that LVDS FP registers related to them can be + programmed during screen mode setting. + + Signed-off-by: Kevin Brace + +commit 6850f1964feedecaafe43000ee9da3c47f8c7872 +Author: Kevin Brace +Date: Fri Aug 12 20:51:04 2016 -0700 + + Version bumped to 0.5.127 + + Signed-off-by: Kevin Brace + +commit d90a71c7146470162cb2bd1f76f9c5cfcec09101 +Author: Kevin Brace +Date: Fri Aug 12 20:49:49 2016 -0700 + + Updated VIA Technologies defined flat panel screen resolution table + + The table used to determine the flat panel screen resolution was + updated since it appeared that the some of the table values were + wrong. Also, dual edge transfer flag and dithering (18-bit color) + flag were added to the table, so that LVDS FP (Flat Panel) + initialization code relies less on external code (i.e., VGA BIOS, + viafb frame buffer device driver) initializing LVDS FP related + registers. + + Signed-off-by: Kevin Brace + +commit 0a5c73f281c0cb4513ccd2b1347d7eb59dc9a654 +Author: Kevin Brace +Date: Wed Aug 10 15:44:38 2016 -0700 + + Version bumped to 0.5.126 + + Signed-off-by: Kevin Brace + +commit 189fae8ef421043423b12e82c38d84bb2c8b3c1e +Author: Kevin Brace +Date: Wed Aug 10 15:42:27 2016 -0700 + + Set LVDS2 output color dithering from via_lvds_mode_set + + Rather than setting LVDS2 output color dithering from + viaSetLVDSOutput function, it will now be set from + via_lvds_mode_set callback function. + + Signed-off-by: Kevin Brace + +commit deeea8afa59662fc88481de3130b5a3f5572d95a +Author: Kevin Brace +Date: Wed Aug 10 15:33:09 2016 -0700 + + Added viaLVDS2SetDithering + + viaLVDS2SetDithering function sets the output color dithering state + for LVDS2 integrated LVDS transmitter. This function is located + inside via_lvds.c. + + Signed-off-by: Kevin Brace + +commit c0c87ea43477995ed1284066f8e47a23e6ec1e91 +Author: Kevin Brace +Date: Mon Aug 8 17:11:09 2016 -0700 + + Added viaDFPHighSetDisplaySource + + viaDFPHighSetDisplaySource function sets the display output source + for DFP (Digital Flat Panel) High interface. This function is located + inside via_lvds.c. + + Signed-off-by: Kevin Brace + +commit a94dde4233f1e134f92bb97c9bfd2179fc431f02 +Author: Kevin Brace +Date: Mon Aug 8 16:56:48 2016 -0700 + + Added viaDFPHighSetDelayTap + + viaDFPHighSetDelayTap function sets the delay tap value for + DFP (Digital Flat Panel) High interface. This function is located + inside via_lvds.c. + + Signed-off-by: Kevin Brace + +commit 31a855bee2d51b64de7405b95e635d8f73a6b8b3 +Author: Kevin Brace +Date: Mon Aug 8 01:37:42 2016 -0700 + + Version bumped to 0.5.125 + + The fixes put in for the past several patch levels should allow + integrated TMDS (DVI) to now work simultaneously with an LVDS FP. + + Signed-off-by: Kevin Brace + +commit 1c43a0ac4a8534e217e862dc0b40d709f4a59946 +Author: Kevin Brace +Date: Mon Aug 8 01:34:28 2016 -0700 + + Not setting display output source inside via_lvds_prepare + + This causes a conflict with the new integrated TMDS transmitter + code. Now, setting display output source is done differently, so + removing this functionality should not cause problems. + + Signed-off-by: Kevin Brace + +commit 747879ff9f465f7d216fe80492e6b9a1f9cbe90c +Author: Kevin Brace +Date: Mon Aug 8 01:30:10 2016 -0700 + + Version bumped to 0.5.124 + + Signed-off-by: Kevin Brace + +commit 758928777153b5159754a8574fe7116348afa3e6 +Author: Kevin Brace +Date: Mon Aug 8 01:24:00 2016 -0700 + + LVDS FP and VT1632 are now deciding display output source + + The code was improved so that LVDS FP (Flat Panel) and VT1632 + external TMDS transmitter's mode setting callback functions are + now deciding the display output source. + + Signed-off-by: Kevin Brace + +commit ca0f3e86b5f4c6a9c9e3dddd914fa5404acc0d6b +Author: Kevin Brace +Date: Mon Aug 8 01:08:10 2016 -0700 + + Added viaDVP0SetDisplaySource + + viaDVP0SetDisplaySource function sets the display output source + for DVP0 (Digital Video Port) interface. This function is located + inside via_outputs.c. + + Signed-off-by: Kevin Brace + +commit 7f8ccddce918b2a58a009094d71ae02c27e1de56 +Author: Kevin Brace +Date: Mon Aug 8 00:48:56 2016 -0700 + + Added viaDVP1SetDisplaySource + + viaDVP1SetDisplaySource function sets the display output source + for DVP1 (Digital Video Port) interface. This function is located + inside via_outputs.c. + + Signed-off-by: Kevin Brace + +commit 9214825f893a4e9eccca0d31481962fe34691331 +Author: Kevin Brace +Date: Mon Aug 8 00:30:04 2016 -0700 + + Version bumped to 0.5.123 + + Signed-off-by: Kevin Brace + +commit 894df6c83b5aa103d0806b6f9c42abc782ff0d7c +Author: Kevin Brace +Date: Mon Aug 8 00:07:18 2016 -0700 + + Set DFP Low display output source from via_lvds_mode_set + + Rather than setting DFP (Digital Flat Panel) Low display output + source from viaIGA2SetDisplayRegister function inside via_display.c, + it will now be set from via_lvds_mode_set callback function inside + via_lvds.c. + + Signed-off-by: Kevin Brace + +commit 1acc709791b28d2eee794e261a37e55e3c94b756 +Author: Kevin Brace +Date: Sun Aug 7 23:51:13 2016 -0700 + + Added viaDFPLowSetDisplaySource + + viaDFPLowSetDisplaySource function sets the display output source + for DFP (Digital Flat Panel) Low interface. This function is located + inside via_lvds.c. + + Signed-off-by: Kevin Brace + +commit 7b47fd2a1c3c28a757fdbd709cbb301cddb1866d +Author: Kevin Brace +Date: Sun Aug 7 23:28:32 2016 -0700 + + Version bumped to 0.5.122 + + Signed-off-by: Kevin Brace + +commit 1311c3521e4d73aaaeffc60f528431b6f2d3f5cf +Author: Kevin Brace +Date: Sun Aug 7 22:51:03 2016 -0700 + + Set DFP Low delay tap for P4M900 family from via_lvds_mode_set + + Rather than setting DFP (Digital Flat Panel) delay tap value + from viaIGA2SetDisplayRegister function inside via_display.c, + it will now be set from via_lvds_mode_set callback function + inside via_lvds.c. For now, this is only applicable for + P4M900 / VN896 / CN896 chipsets. + + Signed-off-by: Kevin Brace + +commit da6ac3e90d9d3a7aa8cf491f798c312522946adc +Author: Kevin Brace +Date: Sun Aug 7 22:31:41 2016 -0700 + + Added viaDFPLowSetDelayTap + + viaDFPLowSetDelayTap function sets the delay tap value for + DFP (Digital Flat Panel) Low interface. This function is located + inside via_lvds.c. + + Signed-off-by: Kevin Brace + +commit 8e6ab899c6d5a9eef845bf1170d4c6df9ac4736e +Author: Kevin Brace +Date: Sun Aug 7 14:59:51 2016 -0700 + + Version bumped to 0.5.121 + + Signed-off-by: Kevin Brace + +commit eede2983930e5b9ba36a057cdd798b3a7056cdd7 +Author: Kevin Brace +Date: Sun Aug 7 14:58:16 2016 -0700 + + Rewrite of viaVT1632Power + + Signed-off-by: Kevin Brace + +commit ef6ffc57d9ad7e8ea0990d07949d3f1a0b866ead +Author: Kevin Brace +Date: Sun Aug 7 14:29:52 2016 -0700 + + Rewrite of viaTMDSPower + + Signed-off-by: Kevin Brace + +commit 47419f6edb27bae4fc6dbf56d39b4c8f4410d2d0 +Author: Kevin Brace +Date: Sat Aug 6 22:46:15 2016 -0700 + + Version bumped to 0.5.120 + + Signed-off-by: Kevin Brace + +commit 377c9d73a5544f1833bbd6a7e62e0c052ca9bf84 +Author: Xavier Bachelot +Date: Sat Aug 6 22:44:14 2016 -0700 + + Fix unused-variable warnings in via_tmds.c + + Signed-off-by: Xavier Bachelot + +commit 75915a308cbb6c1cce8aa8d079e188e5d3f63aa5 +Author: Kevin Brace +Date: Sat Aug 6 22:25:07 2016 -0700 + + Moving viaVT1632Sense within the file + + Signed-off-by: Kevin Brace + +commit 1edc5bbd4b115bc1b66fd6a8e25a9a7da4399a09 +Author: Kevin Brace +Date: Sat Aug 6 22:20:33 2016 -0700 + + Changing via_vt1632_power to viaVT1632Power + + Signed-off-by: Kevin Brace + +commit 11b90bee75f474990c12fe48982d863ae9c4b6f0 +Author: Kevin Brace +Date: Sat Aug 6 22:15:56 2016 -0700 + + Made small tweaks to via_vt1632_power + + No change in functionality. + + Signed-off-by: Kevin Brace + +commit 2d12631c0c587ef430c1c49a32ba67305c38b7d0 +Author: Kevin Brace +Date: Sat Aug 6 21:55:33 2016 -0700 + + Version bumped to 0.5.119 + + Signed-off-by: Kevin Brace + +commit f7e393c88e8f11aefdd36e88899530cdb42f7607 +Author: Kevin Brace +Date: Sat Aug 6 21:53:23 2016 -0700 + + Code cleanup of via_vt1632_detect + + Signed-off-by: Kevin Brace + +commit 376cb93ef52f0f204f56917530c174f560ef5665 +Author: Kevin Brace +Date: Sat Aug 6 21:39:17 2016 -0700 + + Rewrite of viaVT1632Sense + + Now the return type is a Bool. + + Signed-off-by: Kevin Brace + +commit 4da8d57883da7a7b29a1e1338ceb1e455f60af54 +Author: Kevin Brace +Date: Sat Aug 6 11:17:18 2016 -0700 + + Changing via_dvi_detect to via_vt1632_detect + + Signed-off-by: Kevin Brace + +commit 5f4e75aa3a75547ee2403383cf5710da2e3fd428 +Author: Kevin Brace +Date: Sat Aug 6 10:55:47 2016 -0700 + + Changing via_vt1632_detect to viaVT1632Sense + + This function is located inside via_vt1632.c. + + Signed-off-by: Kevin Brace + +commit 3ef546266fe6f65acd9376af2f5dcd98cd19cd84 +Author: Xavier Bachelot +Date: Sat Aug 6 10:46:30 2016 -0700 + + Fix unused-variable warning in via_analog.c + + Xavier Bachelot + +commit 291294ec54d8866e20475228e278da46cd1bd57f +Author: Kevin Brace +Date: Sat Aug 6 10:37:51 2016 -0700 + + Added debug messages to via_vt1632_dpms + + This function is located inside via_vt1632.c. + + Signed-off-by: Kevin Brace + +commit accaf53a39c0612a5ed8ff4aadd7ed4c37ec292a +Author: Kevin Brace +Date: Sat Aug 6 10:19:59 2016 -0700 + + Version bumped to 0.5.118 + + Signed-off-by: Kevin Brace + +commit 39b7d9fcba8f4d071872853f0efa4935a233e0df +Author: Kevin Brace +Date: Sat Aug 6 01:56:04 2016 -0700 + + Moving via_vt1632_mode_set functionality into viaVT1632InitRegister + + Signed-off-by: Kevin Brace + +commit f41a57c7b98c32d8c7c8d681ee028deba4951a31 +Author: Kevin Brace +Date: Fri Aug 5 22:47:25 2016 -0700 + + Discontinuing via_dvi_mode_set + + via_vt1632_mode_set callback function will take over the + equivalent functionality. + + Signed-off-by: Kevin Brace + +commit 096f4121173126f950462e1b0f583c7b14d573cb +Author: Kevin Brace +Date: Fri Aug 5 22:31:38 2016 -0700 + + Changing via_dvi_dpms to via_vt1632_dpms + + Signed-off-by: Kevin Brace + +commit 7a4d0be4cf349535331960380f8b2aaac832bf90 +Author: Kevin Brace +Date: Fri Aug 5 22:27:04 2016 -0700 + + Version bumped to 0.5.117 + + Signed-off-by: Kevin Brace + +commit afaccb19d95981b47f3020c72e05d48fb5d3448b +Author: Kevin Brace +Date: Fri Aug 5 22:26:15 2016 -0700 + + Moving VT1632(A) related code to via_vt1632.c + + Signed-off-by: Kevin Brace + +commit 6236417b183feab0e3c27e959661425f87509503 +Author: Kevin Brace +Date: Fri Aug 5 21:54:18 2016 -0700 + + Version bumped to 0.5.116 + + Signed-off-by: Kevin Brace + +commit 4dbed232b342a44d0ce3ff85832de003330b01c5 +Author: Kevin Brace +Date: Fri Aug 5 21:48:16 2016 -0700 + + Reversing most of commit 46f5f3e + + Commit 46f5f3e was a bad commit, and it will lead to a crash if + VT1632(A) is being used. + + Signed-off-by: Kevin Brace + +commit 309386481e2dea3696f35bd814b857af500867e9 +Author: Xavier Bachelot +Date: Fri Aug 5 21:32:30 2016 -0700 + + Fix unused-variable warnings in via_tmds.c + + Signed-off-by: Xavier Bachelot + +commit 42de5b31ef5c7cb3ff11ad692d9c0b2d7a8d3cf2 +Author: Kevin Brace +Date: Fri Aug 5 11:24:53 2016 -0700 + + Version bumped to 0.5.115 + + Signed-off-by: Kevin Brace + +commit 6fd3420b46bdd75bce029a34e1e8993352b950d8 +Author: Kevin Brace +Date: Fri Aug 5 11:23:47 2016 -0700 + + Setting LVDS2 display source from via_lvds_mode_set + + Taking this functionality out of viaSetLVDSOutput function. + + Signed-off-by: Kevin Brace + +commit e4c69d74acef15a023b76d171adce4995fd0ac15 +Author: Kevin Brace +Date: Fri Aug 5 10:11:36 2016 -0700 + + Added viaLVDS2SetDisplaySource + + viaLVDS2SetDisplaySource function sets the display source of LVDS2 + integrated LVDS transmitter. This function is located inside + via_lvds.c. + + Signed-off-by: Kevin Brace + +commit f55d4d76b066c91e9934f3e6182d24f746fb83d9 +Author: Kevin Brace +Date: Fri Aug 5 10:02:55 2016 -0700 + + Added viaLVDS1SetDisplaySource + + viaLVDS1SetDisplaySource function sets the display source of LVDS1 + integrated LVDS transmitter. This function is located inside + via_lvds.c. + + Signed-off-by: Kevin Brace + +commit 14eea5db4fb7a9649b0e9795675d2b9c3ce24be2 +Author: Kevin Brace +Date: Wed Aug 3 21:26:12 2016 -0700 + + Version bumped to 0.5.114 + + Signed-off-by: Kevin Brace + +commit bfb41b507b9f7766e677966ca711b134d084498a +Author: Kevin Brace +Date: Wed Aug 3 21:22:13 2016 -0700 + + Disable I2C bus readout of LVDS FP EDID for now + + When an LVDS FP (Flat Panel) is used simultaneously with DVI, + LVDS FP ends up reading out EDID from a monitor connected to + DVI. This almost always ends up causing the LVDS FP to + erroneously program the associated display controller. The end + result of this is a blank or garbled up screen. Now, LVDS FP + initialization code will only use VIA Technologies VGA BIOS + supplied flat panel code for the purpose of flat panel native + screen resolution detection. The flat panel code is located at + 3X5.3F[3:0]. This is a short term solution, and a more permanent + solution will have to be developed in the future. + + Signed-off-by: Kevin Brace + +commit 072d1c93304ac5ef54e5e66fddd5606d40f628cd +Author: Xavier Bachelot +Date: Wed Aug 3 23:39:20 2016 +0200 + + Fix FSF address + +commit 67ac45b31066f39448ff00fca49e4e132c6faf58 +Author: Kevin Brace +Date: Wed Aug 3 13:55:14 2016 -0700 + + Version bumped to 0.5.113 + + Signed-off-by: Kevin Brace + +commit 144d1429fb9ae3c46e62dc0822f360c12d5b6b6b +Author: Kevin Brace +Date: Wed Aug 3 13:51:54 2016 -0700 + + Fixing analog VGA to IGA1 + + This is being done so that DVI and TV can get assigned to + IGA2 (display controller 2) by X.Org Server. + + Signed-off-by: Kevin Brace + +commit 29f52a9149b2835fd6b65f52f4703b4aa31629f5 +Author: Kevin Brace +Date: Wed Aug 3 13:20:53 2016 -0700 + + Version bumped to 0.5.112 + + I need to thank Xavier Bachelot for catching a bug in the code that + can possibly cause a crash. + + Signed-off-by: Kevin Brace + +commit 46f5f3e181735b23b1eeb4ad84bb0818510cb0f0 +Author: Kevin Brace +Date: Wed Aug 3 13:18:11 2016 -0700 + + Removing redundant code from via_vt1632.c and via_vt1632.h + + via_vt1632_detect function was deleted due to the code inside that + function being transferred to viaVT1632Init function. Also, several + discontinued function prototypes were removed. + + Signed-off-by: Kevin Brace + +commit 980f417665489f5bdfbcd5bf95d8ddfa37a56774 +Author: Kevin Brace +Date: Wed Aug 3 12:56:04 2016 -0700 + + Fix for viaVT1632Init implicit function declaration build warning + + The function prototype declaration was moved to via_vt1632.h where it + is a more appropriate place to be located. + + Signed-off-by: Xavier Bachelot + Signed-off-by: Kevin Brace + +commit 28de9ed296802d10588cede16177890e0bf0fca2 +Author: Kevin Brace +Date: Wed Aug 3 00:41:17 2016 -0700 + + Version bumped to 0.5.111 + + This version adds initial support for VIA Technologies IGP integrated + TMDS transmitter. (DVI) Now, LVDS FP (Flat Panel) and DVI can work + simultaneously. (with some limitations) Testing was done on Sylvania + g netbook. (VIA Technologies NanoBook reference design equivalent; + VX700 chipset) Resume from ACPI S3 State resume appears to work as + well. (i.e., DVI comes back to life after standby resume.) + + Signed-off-by: Kevin Brace + +commit ef66151ee4c4674f63ec3f50a91ca28513700b92 +Author: Kevin Brace +Date: Wed Aug 3 00:14:44 2016 -0700 + + Initial support for integrated TMDS transmitter (DVI) + + This commit incorporates the initial support for VIA Technologies + IGP integrated TMDS transmitter. Previously, the code to support + the integrated TMDS transmitter was reusing the code written for + handling integrated LVDS transmitters. This was causing number of + problems, so totally new code was written to support the integrated + TMDS transmitter only. The integrated TMDS transmitter identifies + itself as DVI (Digital Visual Interface). The code was written in a + way to coexist with the existing code that initializes VIA + Technologies VT1632(A) external TMDS transmitter. + + Signed-off-by: Kevin Brace + +commit 30b7ebb34a76caefad074b7167bfae38c0e2d402 +Author: Kevin Brace +Date: Thu Jul 21 20:49:54 2016 -0700 + + Version bumped to 0.5.110 + + This version moves TV output initialization and management code + to via_tv.c. + + Signed-off-by: Kevin Brace + +commit 308e36e58dba2bc9fcf0de3070a9c5cad6119d9c +Author: Kevin Brace +Date: Thu Jul 21 20:48:18 2016 -0700 + + Added a new file called via_tv.c + + This module handles TV output initialization and management. The + functions came from via_outputs.c. + + Signed-off-by: Kevin Brace + +commit 50ed9076ed367f90f2b65bc979bf19183244172b +Author: Kevin Brace +Date: Wed Jul 20 23:03:18 2016 -0500 + + Version bumped to 0.5.109 + + This version moves analog VGA initialization and management code + to via_analog.c. + + Signed-off-by: Kevin Brace + +commit da9932abab763065da891e9f0a3d607a90ef41f1 +Author: Kevin Brace +Date: Wed Jul 20 22:58:31 2016 -0500 + + Added a new file called via_analog.c + + This module handles analog VGA initialization and management. The + functions came from via_outputs.c. + + Signed-off-by: Kevin Brace + +commit 3a6453a4ac9dd9a2e1cc9bc3ab204f0bffa5d99b +Author: Kevin Brace +Date: Tue Jul 19 21:47:51 2016 -0500 + + Version bumped to 0.5.108 + + This version moves DVI initialization code to via_tmds.c. + + Signed-off-by: Kevin Brace + +commit 551edb809a4f34b75df623574ec0e99fdead697b +Author: Kevin Brace +Date: Tue Jul 19 21:35:19 2016 -0500 + + Added a new file called via_tmds.c + + This module handles DVI initialization. The functions came from + via_outputs.c. + + Signed-off-by: Kevin Brace + +commit 0da9cf2229de4dd702f38e1a29f1bd73267f7435 +Author: Kevin Brace +Date: Sun Jul 10 15:06:10 2016 -0500 + + Version bumped to 0.5.107 + + This version fixes a bug that causes Sylvania g netbook (VIA + Technologies NanoBook reference design equivalent) to lose VGA + (via DVI to VGA converter) and flat panel when resuming from ACPI + S3 State. Both of them are now working correctly. That being said, + DVI of Sylvania g netbook still gets lost when resuming from ACPI + S3 State and DVI and flat panel still do not work simultaneously. + + Signed-off-by: Kevin Brace + +commit 0ced5d8c3c6e751f2d19e1f0fc4c19a0e22690b3 +Author: Kevin Brace +Date: Sun Jul 10 14:49:21 2016 -0500 + + Actively setting certain LVDS related registers from via_lvds_mode_set + + A function named viaSetLVDSOutput was created to handle this task. + viaSetLVDSOutput function is located inside via_lvds.c. + + Signed-off-by: Kevin Brace + +commit 799e5d6ec4489c529b2afbfd4075533d3751c4c8 +Author: Kevin Brace +Date: Sun Jul 10 13:47:10 2016 -0500 + + Version bumped to 0.5.106 + + Signed-off-by: Kevin Brace + +commit bb30d2938c0574ff3a987422a15abf383d557efa +Author: Kevin Brace +Date: Sun Jul 10 13:46:04 2016 -0500 + + Turning off spread spectrum and turning on ROC ECK + + Signed-off-by: Kevin Brace + +commit 3ff683897d3ee33a2db935eee4d5e2ab95a5f2ac +Author: Kevin Brace +Date: Sun Jul 10 13:23:54 2016 -0500 + + Version bumped to 0.5.105 + + Signed-off-by: Kevin Brace + +commit 9696d5de3fea53387faf162e0dec3cca1ad0956a +Author: Kevin Brace +Date: Sun Jul 10 13:13:30 2016 -0500 + + Turning off interlace mode for IGA2 + + Signed-off-by: Kevin Brace + +commit fb3eec11173ad66f543eaca3c74998bbf73340e4 +Author: Kevin Brace +Date: Fri Jul 8 15:28:31 2016 -0500 + + Version bumped to 0.5.104 + + Signed-off-by: Kevin Brace + +commit 014be9171d472255dac5f6e8fba21514261b2237 +Author: Kevin Brace +Date: Fri Jul 8 15:23:25 2016 -0500 + + Changing the way miscellaneous output register is set for IGA1 + + Now only certain bits of miscellaneous output register meant for IGA1 + are set within viaIGA1SetDisplayRegister function. + + Signed-off-by: Kevin Brace + +commit 631780bc2b2c232c9278dfddb06b5eec6997311a +Author: Kevin Brace +Date: Fri Jul 8 14:45:39 2016 -0500 + + Version bumped to 0.5.103 + + Signed-off-by: Kevin Brace + +commit f4166d683aeed6b5e17d8715ca676add112cb2e1 +Author: Kevin Brace +Date: Fri Jul 8 14:43:31 2016 -0500 + + Rewriting iga1_crtc_restore + + Rewrote iga1_crtc_restore callback function, in order to improve + ACPI S3 State resume reliability. + + Signed-off-by: Kevin Brace + +commit 767280fca85b56395d34f78a368172d115d1a50c +Author: Kevin Brace +Date: Fri Jul 8 13:01:57 2016 -0500 + + Rewriting iga1_crtc_save + + Rewrote iga1_crtc_save callback function, in order to improve ACPI S3 + State resume reliability. + + Signed-off-by: Kevin Brace + +commit 32adc0a77c23521b46ccc1821e5eb6359c43c008 +Author: Kevin Brace +Date: Fri Jul 8 00:23:31 2016 -0500 + + Version bumped to 0.5.102 + + I need to thank Eric Kudzin for bringing the equipment to help me + fix this bug. + + Signed-off-by: Kevin Brace + +commit 75843ac59de341bbf727c15a9378274f3b77fab2 +Author: Kevin Brace +Date: Fri Jul 8 00:15:49 2016 -0500 + + Starting IGA2 vertical blank early by 1 count to avoid odd resolution + + Subtracting 1 count from CrtcVlankStart for IGA2 appears to + suppress some monitors from reporting vertical resolution + that is 1 more than the desired vertical resolution. + (i.e., 1201 rather than 1200) + + Signed-off-by: Eric Kudzin + Signed-off-by: Kevin Brace + +commit d623dc8545baf2f6eb4799785d32cdc79eeb4acb +Author: Kevin Brace +Date: Thu Jul 7 23:59:32 2016 -0500 + + Starting IGA2 horizontal blank early by 1 count to avoid odd resolution + + Subtracting 1 count from CrtcHBlankStart for IGA2 appears to + suppress some monitors from reporting horizontal resolution + that is 1 more than the desired horizontal resolution. + (i.e., 1601 rather than 1600) + + Signed-off-by: Eric Kudzin + Signed-off-by: Kevin Brace + +commit c1a633c1ef44e72ea6305c3adb9217b118814e3f +Author: Kevin Brace +Date: Wed Jul 6 22:09:58 2016 -0500 + + Version bumped to 0.5.101 + + Signed-off-by: Kevin Brace + +commit 744eb29abe15fb126613b1711e1870b46a252682 +Author: Kevin Brace +Date: Wed Jul 6 22:02:17 2016 -0500 + + Limiting IGA2 Address Mode Selection bit access to UniChrome Pro or later + + This bit is located at 3X5.62[0]. Linear mode is always used. It is + very likely that UniChrome (CLE266, KM400, P4M800, etc.) does not + implement this bit. + + Signed-off-by: Kevin Brace + +commit 85ed46cd8a94e8382ec0feae9e1dda39246c2fbb +Author: Kevin Brace +Date: Wed Jul 6 22:00:34 2016 -0500 + + Limiting IGA1 Address Mode Selection bit access to UniChrome Pro or later + + This bit is located at 3X5.43[2]. Linear mode is always used. It is + very likely that UniChrome (CLE266, KM400, P4M800, etc.) does not + implement this bit. + + Signed-off-by: Kevin Brace + +commit 12f5ebdd8745beb2953f96a3ac4caf9a619ec3a3 +Author: Kevin Brace +Date: Wed Jul 6 21:05:31 2016 -0500 + + Accessing CRTC after miscellaneous output register initialization + + When screen mode setting is being done for IGA1, VGA's miscellaneous + output register should be initialized before CRTC registers are + initialized. + + Signed-off-by: Kevin Brace + +commit 62bf9ca8057928b49684751de71652022f13fcd2 +Author: Kevin Brace +Date: Wed Jul 6 20:53:47 2016 -0500 + + Version bumped to 0.5.100 + + Signed-off-by: Kevin Brace + +commit 5e7b14608b0870de0bdd74cd1c18c039e267e415 +Author: Kevin Brace +Date: Wed Jul 6 19:30:16 2016 -0500 + + viaIGAInitCommon will now initialize certain legacy VGA registers + + During ACPI S3 State resume functionality testing, Sylvania g netbook + (VIA NanoBook reference design equivalent) was losing analog VGA output + when it resumes from standby. Not initializing legacy VGA's miscellaneous + output register appears to cause this bug. + + Signed-off-by: Kevin Brace + +commit 5b734c8fab0493ee40a5751b1f7a25f2cc1cefe4 +Author: Kevin Brace +Date: Wed Jul 6 02:03:00 2016 -0500 + + Version bumped to 0.5.99 + + Start of a new development cycle. + + Signed-off-by: Kevin Brace + +commit 72589af7b310fccb674d89f26b626dd4694a85af +Author: Kevin Brace +Date: Wed Jul 6 01:25:39 2016 -0500 + + Version bumped to 0.5 + + Signed-off-by: Kevin Brace + +commit a4ad9caf72002b9ba53be85922342074837c5457 +Author: Kevin Brace +Date: Sat Jul 2 08:28:29 2016 -0500 + + Version bumped to 0.4.907 (Version 0.5 RC8) + + Hopefully, this RC will be the Version 0.5 official release version. + + Signed-off-by: Kevin Brace + +commit 0cbd2c440e3cbad851934d0510ed66c5a0aac3e8 +Author: Kevin Brace +Date: Sat Jul 2 08:26:53 2016 -0500 + + Making sure PM800 family can handle multi-monitor hardware cursor + + It appears that PM800 family was the first to support CME video + display engine. This engine appears to support simultaneous display + of hardware cursor on both monitors. PM800 family includes PM800, + PN800, PM880, CN333, and CN400 chipsets. + + Signed-off-by: Kevin Brace + +commit fc1d71f9e086f23048e39e1ac8bc14e72bf2e50c +Author: Kevin Brace +Date: Sat Jul 2 07:45:09 2016 -0500 + + Made small tweaks to viaIGA1DPMSControl + + Signed-off-by: Kevin Brace + +commit 554e8b6b3da1243670a3dcdb8a597465aa8e3dde +Author: Kevin Brace +Date: Sat Jul 2 07:37:27 2016 -0500 + + ViaIGA2DisplayOutput will now log the display state + + Signed-off-by: Kevin Brace + +commit fe00a993997155aa42f3f65ea2d7aac41989c342 +Author: Kevin Brace +Date: Sat Jul 2 07:17:42 2016 -0500 + + Accessing 3X5.47[2] to turn off analog VGA output DAC after all + + It was suggested that 3C5.01[5] does not turn off analog VGA + output DAC, so the code is reverting back to what was committed in + commit 85f99cf. + + Suggested-by: Luc Verhaegen + Signed-off-by: Kevin Brace + +commit 8282c5adcadc3c8b91fef3bc3fcdabb493075ae8 +Author: Kevin Brace +Date: Sat Jul 2 07:06:20 2016 -0500 + + Changing viaAnalogOutput input argument name + + Signed-off-by: Kevin Brace + +commit 17fe5eb0250cc0aeca97e74a0cb088e25347af35 +Author: Kevin Brace +Date: Sat Jul 2 06:57:17 2016 -0500 + + Changing viaIGA2DisplayOutput input argument name + + Suggested-by: Bartosz Kosiorek + Signed-off-by: Kevin Brace + +commit e83daea3a569f9f4c5dd595f23d14dca6922cbd0 +Author: Kevin Brace +Date: Sat Jul 2 06:51:25 2016 -0500 + + Changing viaIGA2DisplayChannel input argument name + + Suggested-by: Bartosz Kosiorek + Signed-off-by: Kevin Brace + +commit 6076e82ed0dafd7d4dd9522ab73124f76ada5ea3 +Author: Kevin Brace +Date: Sat Jul 2 06:22:19 2016 -0500 + + Updating via_outputs.c copyright + + Signed-off-by: Kevin Brace + +commit 0d7ebfe40617adba1f8564c476007c975b9f0087 +Author: Kevin Brace +Date: Sat Jul 2 05:16:31 2016 -0500 + + Version bumped to 0.4.906 (Version 0.5 RC7) + + This seventh release candidate has many substantial VT1632A TMDS (DVI) + transmitter related improvements. + + Signed-off-by: Kevin Brace + +commit 60c76462b4f0f7cd515677310aa5c03f398d70a7 +Author: Kevin Brace +Date: Sat Jul 2 05:15:03 2016 -0500 + + Using DVI presence and the assigned I2C bus to obtain EDID + + Since VT1632A has hardware support to sense DVI presence, this, + along with the assigned I2C bus, should be used to obtain EDID + from the monitor. + + Signed-off-by: Kevin Brace + +commit 609ee95feeaf8d2a37536dab7fa020520c2b842b +Author: Kevin Brace +Date: Sat Jul 2 02:37:01 2016 -0500 + + Record a log message if VT1632A did not detect DVI presence + + Just to make it easier to understand, if VT1632A did not detect DVI + presence, it will record it in the log message. + + Signed-off-by: Kevin Brace + +commit fbad6a979c5946d2479fd354ec3111f47b0e056e +Author: Kevin Brace +Date: Sat Jul 2 02:03:42 2016 -0500 + + Using VT1632A RSEN bit to detect presence, not HTPLG bit + + During testing, DVI detection failure in VT1632A was observed, + and this was due to the code using HTPLG bit to determine DVI + presence, not RSEN bit it should have been using. + + Signed-off-by: Kevin Brace + +commit 6c23391daeae6df66880d07b4e999535ce677ccf +Author: Kevin Brace +Date: Sat Jul 2 02:01:13 2016 -0500 + + Using VT1632A to detect DVI presence, not I2C bus + + Since VT1632A contains the necessary hardware to detect DVI + presence, it is a better way to detect DVI rather than relying on + I2C bus EDID readout. + + Signed-off-by: Kevin Brace + +commit 56ead733a7aeb0af75c36d8dec566c74dd2e5ece +Author: Kevin Brace +Date: Sat Jul 2 01:38:51 2016 -0500 + + Fix for Wyse Vx0 DVI not working + + This temporary fix makes IGA2 to be the source of DVP0 (Digital + Video Port 0). This fix is meant to get Wyse Vx0's DVI to work since + its VT1632A TMDS (DVI) transmitter is connected to DVP0. + + Signed-off-by: Eric Kudzin + Signed-off-by: Kevin Brace + +commit 0cde26be181175169116ff984a8d8609a2cbe7ca +Author: Kevin Brace +Date: Fri Jul 1 20:05:35 2016 -0500 + + Not turning on and off VT1632A within via_dvi_mode_set + + Previously, via_dvi_mode_set callback function was turning off and + then on during mode setting for VT1632A TMDS (DVI) transmitter. + Turning the transmitter on and off should be handled by via_dvi_dpms + callback function. + + Signed-off-by: Kevin Brace + +commit 52568cf3c04679684b7f62f59ae99ee2153ec8b2 +Author: Kevin Brace +Date: Fri Jul 1 01:11:56 2016 -0500 + + Fix for VT1632A not turning off the screen + + Due to the lack of testing when commit a8c2f04 got committed, a monitor + with DVI input was not turning off when the OS tells it to turn it off. + This fix solves this bug by calling the correct function that powers up + or down VT1632A. + + Signed-off-by: Eric Kudzin + Signed-off-by: Kevin Brace + +commit 31c8c2c3a00a2f878939361cd97cafa68f6d3276 +Author: Kevin Brace +Date: Thu Jun 30 23:24:19 2016 -0500 + + Version bumped to 0.4.905 (Version 0.5 RC6) + + This sixth release candidate fixed a bug that prevented Wyse X class + mobile thin client from booting X.Org Server. + + Signed-off-by: Kevin Brace + +commit 7199d8206673d227cd7f2b4332b232d8706773fc +Author: Kevin Brace +Date: Thu Jun 30 12:38:55 2016 -0500 + + Fix to prevent a freeze in Wyse X class mobile thin client + + In Wyse X class mobile thin client, it was observed that setting + SR2E[3:2] (3C5.2E[3:2]; PCI Master / DMA) to 0b11 (clock on / off + according to the engine IDLE status) causes an X.Org Server boot + failure. Setting this register to 0b10 (clock always on) corrects + the problem. + + Signed-off-by: Eric Kudzin + Signed-off-by: Kevin Brace + +commit bf22627745ff2c395ed1211ab72856fa69ec664c +Author: Kevin Brace +Date: Mon Jun 27 23:03:15 2016 -0500 + + Version bumped to 0.4.904 (Version 0.5 RC5) + + This fifth release candidate had lots of changes made to the analog + VGA output control portion of the code. I sure hope there are no + regressions. + + Signed-off-by: Kevin Brace + +commit ed68b1e9428b96b2c3ec4dc56625579bf531bc63 +Author: Kevin Brace +Date: Mon Jun 27 22:58:54 2016 -0500 + + Using SR01[5] to turn off analog VGA output rather than CR47[2] + + CR47[2] (3X5.47[2]) is the “back door” register to turn off analog + VGA output. Will rather use the “front door” version of it located + at SR01[5] (3C5.01[5]). + + Signed-off-by: Kevin Brace + +commit 6ed9ca5a32bfff8908cfa2329e09b66241e819dd +Author: Kevin Brace +Date: Mon Jun 27 22:51:39 2016 -0500 + + Added viaAnalogInit + + This function initializes several analog VGA output DAC related + registers. It is called from via_analog_mode_set callback function + during mode setting for analog VGA output. + + Signed-off-by: Kevin Brace + +commit 676739f6335c45d06da58fc7f0ff7032bb63a00d +Author: Mario J. Rugiero +Date: Mon Jun 27 21:21:00 2016 -0500 + + Small fix to VT1632(A) detection + + via_vt1632_detect was checking the 0x02 flag by using the boolean + and operator instead of the binary one, which causes any non-zero + value to set the status as connected. + + Signed-off-by: Mario J. Rugiero + Reviewed-by: Xavier Bachelot + +commit f75872b24e9220539118d874ee5df8308b51c035 +Author: Kevin Brace +Date: Mon Jun 27 21:13:45 2016 -0500 + + Added the capability for viaAnalogOutput to log analog VGA output state + + Signed-off-by: Kevin Brace + +commit 7363978f3b4f8d4771b0b27ae6bbae59387e36d4 +Author: Kevin Brace +Date: Mon Jun 27 18:32:04 2016 -0500 + + Added viaAnalogSource + + This function selects IGA1 or IGA2 to feed into analog VGA output DAC. + + Signed-off-by: Kevin Brace + +commit 7d8ad906d1d6ed34f09f908c46f88dcac467f179 +Author: Kevin Brace +Date: Mon Jun 27 13:31:16 2016 -0500 + + Not turning on analog VGA output DAC within via_analog_mode_set + + Analog VGA output DAC should be turned on only by via_analog_dpms + callback function, and via_analog_mode_set callback function + should not be touching it. + + Signed-off-by: Kevin Brace + +commit 85f99cf47ab82a941775b627a0259e89985f3b92 +Author: Kevin Brace +Date: Mon Jun 27 12:40:58 2016 -0500 + + Turning off analog VGA output DAC rather than IGA1 DPMS state + + Previously, in order to turn off analog VGA output, the code was + putting IGA1 to DPMS off state. The correct way to turn off analog + VGA output is to control its DAC output state. + + Signed-off-by: Kevin Brace + +commit 18bab1abef97a2aba6c97d235692e1329a11695c +Author: Kevin Brace +Date: Mon Jun 27 12:11:37 2016 -0500 + + Initializing CR47 within viaIGAInitCommon + + Some of the register bits of CR47 (3X5.47) should be initialized + within viaIGAInitCommon function rather than viaIGA1Init function + since viaIGA1Init function will not be called if only IGA2 is used. + (i.e., flat panel only usage) + + Signed-off-by: Kevin Brace + +commit bbdceda662fcb245b33806514d4a3c7b565c9786 +Author: Kevin Brace +Date: Sun Jun 26 16:20:36 2016 -0500 + + Version bumped to 0.4.903 (Version 0.5 RC4) + + Various minor issues were taken cared of in this fourth release + candidate. + + Signed-off-by: Kevin Brace + +commit cec30ecef8115a43474f2dc7946be130237e9436 +Author: Kevin Brace +Date: Sun Jun 26 15:51:47 2016 -0500 + + Removal of questionable lines of code from viaIGA1SetDisplayRegister + + It was access to SR1A (3C5.1A) that was key to this portion of + the code. Removing this line led CLE266 and KM400 to freeze right + after X.Org Server booted. It appears that setting SR1A bit 6 to 0 + resolves the bug. This bit performs reset of VIA IGP from software. + It is likely that this bit was set to 1 in CLE266 and KM400 chipsets + for some reason. Now viaIGAInitCommon function handles the zero + clearing of this bit. + + Signed-off-by: Kevin Brace + +commit 11f03eb040eb4c98342f9e034b0dd10858930fd4 +Author: Xavier Bachelot +Date: Sun Jun 26 15:40:00 2016 -0500 + + Properly use bitwise operators in viaProbePinStrapping + + Signed-off-by: Xavier Bachelot + Suggested-by: Mario J. Rugiero + Acked-by: Kevin Brace + +commit 51a8eb647a52c14bf5a1c53745561b4108d0da7f +Author: Kevin Brace +Date: Sun Jun 26 15:21:17 2016 -0500 + + Updated code comments within viaIGA1Save and viaIGA1Restore + + Signed-off-by: Kevin Brace + +commit 0791acd804f040666cff99217aa57b0aecc8233f +Author: Kevin Brace +Date: Fri Jun 24 02:25:37 2016 -0500 + + Turning off LCD Simultaneous Mode Backdoor Register + + Since this device driver does not use LCD simultaneous + mode, it should be turned off permanently. + + Signed-off-by: Kevin Brace + +commit 54de6f9253aa42ede211b7b3131cd9c818c5d173 +Author: Kevin Brace +Date: Wed Jun 22 14:50:12 2016 -0500 + + Version bumped to 0.4.902 (Version 0.5 RC3) + + The potential memory leak when X Server is being shutdown is + remedied in this third release candidate. + + Signed-off-by: Kevin Brace + +commit e28986aef13129cc22001f0a99c025548bb45659 +Author: Kevin Brace +Date: Wed Jun 22 14:46:09 2016 -0500 + + VIAFreeRec will be called from VIAFreeScreen + + Prior to commit 870d3c7, VIAFreeRec function was being called prior + to the check to see if calling vgaHWFreeHWRec is necessary. + Unfortunately, this check was referencing DDX's private storage area + after it was freed by the call to VIAFreeRec function. This was + leading to a segmentation fault during the X Server shutdown. In order + to remedy this, the call to VIAFreeRec function was removed by commit + 870d3c7. However, according to XFree86 DDX Design document + (ddxDesign.pdf), VIAFreeRec function is expected to be called from + VIAFreeScreen callback function. Not doing so very likely will lead to + memory leak, hence, VIAFreeRec function will now be called from + VIAFreeScreen callback function, but after vgaHWFreeHWRec is called. + + Signed-off-by: Kevin Brace + +commit ae4b3feb089ccf34a62caf51f05055a98b207671 +Author: Kevin Brace +Date: Mon Jun 20 01:41:23 2016 -0500 + + Version bumped to 0.4.901 (Version 0.5 RC2) + + This version is Version 0.5 RC2 (Release Candidate 2). If there + are no major regressions from Version 0.3.3 or 0.4.0, this version + will be released as Version 0.5 shortly. + + Signed-off-by: Kevin Brace + +commit f9d2a880ff2704420b4ec42a23c243780fefff36 +Author: Kevin Brace +Date: Mon Jun 20 01:35:55 2016 -0500 + + Version bumped to 0.4.189 + + Signed-off-by: Kevin Brace + +commit 433e10d7aa948fa503a7b19cd007f50cb67d36e0 +Author: Kevin Brace +Date: Mon Jun 20 01:30:15 2016 -0500 + + Fix when compiling in a build environment without libpciaccess + + Commit 19ad415 introduced a syntax error if the code was compiled + in a build environment without libpciaccess. This was observed on + Ubuntu 8.04.4 LTS. + + Signed-off-by: Kevin Brace + +commit ae62ee78bf6aa7b8f3ba642fc8d5ff55947b5741 +Author: Kevin Brace +Date: Mon Jun 20 01:17:02 2016 -0500 + + Fix for xf86InitFBManager implicit declaration warning + + Commit e73fa19 removed including xf86fbman.h when compiling + via_ums.c, and as a result, if the code was compiled with a + stricter warning compilation option, it will not be able to + successfully compile the code due to it not being able to + resolve the lack of xf86InitFBManager declaration. Including + xf86fbman.h with via_driver.h resolves this problem. + + Reported-by: Benno Schulenberg + Tested-by: Xavier Bachelot + Signed-off-by: Kevin Brace + +commit b4bfc1a4cf1d54e5ec2a9301c7c44433d3afa8a1 +Author: Kevin Brace +Date: Mon Jun 20 00:58:14 2016 -0500 + + Changing viaEnableAgpVQ to viaEnableAGPVQ + + This function is located inside via_ums.c. + + Signed-off-by: Kevin Brace + +commit 2d9e3bfef40147335ab1c387fea50d0c2549ab44 +Author: Kevin Brace +Date: Mon Jun 20 00:54:21 2016 -0500 + + Changing viaInitAgp to viaInitAGP + + This function is located inside via_ums.c. + + Signed-off-by: Kevin Brace + +commit 0cd47a2810ff2ff041b0103717d0d31ed5381e31 +Author: Kevin Brace +Date: Mon Jun 20 00:33:28 2016 -0500 + + Version bumped to 0.4.188 + + Signed-off-by: Kevin Brace + +commit 3083b8126a6aaed8abd9f888e746c6c260fade55 +Author: Kevin Brace +Date: Wed Jun 15 03:38:52 2016 -0500 + + Tweaking comments within viaIGA2SetDisplayRegister function + + Signed-off-by: Kevin Brace + +commit 7a7c5005e4512b9178a2cb8524773a4f6274cd1c +Author: Kevin Brace +Date: Wed Jun 15 03:29:49 2016 -0500 + + Removing unnecessary ANDing when calling ViaCrtcMask + + This was occurring within viaIGA2SetDisplayRegister function. + + Signed-off-by: Kevin Brace + +commit da08fb04d2dfd23b080073be08e65f95c9f0130d +Author: Kevin Brace +Date: Wed Jun 15 03:21:13 2016 -0500 + + Shifting code that sets certain IGA1 registers + + Trying to make the code more consistent. + + Signed-off-by: Kevin Brace + +commit 7764ca3a66a313d473ef69bfdbe1e4dd2c35140e +Author: Kevin Brace +Date: Tue Jun 14 23:52:35 2016 -0500 + + Cleaning up IGA1 code that sets Maximum Scan Line and Underline Location + + Signed-off-by: Kevin Brace + +commit a0a82cf6ad8f1a95a723789c1594ba489c7d166f +Author: Kevin Brace +Date: Tue Jun 14 23:11:42 2016 -0500 + + Getting rid of an unnecessary write to CR33 + + CR33 (3X5.33) is already set to the proper value somewhere else, so + there is no need to tinker near the end of viaIGA1SetDisplayRegister + function. + + Signed-off-by: Kevin Brace + +commit 639ce01f21e3292cbdb1d7a0ec0b2334a5ca975d +Author: Kevin Brace +Date: Tue Jun 14 22:55:32 2016 -0500 + + Version bumped to 0.4.187 + + Signed-off-by: Kevin Brace + +commit 1a12ce7882416f5d4156340f11a90bdb4fa0509a +Author: Kevin Brace +Date: Tue Jun 14 22:52:50 2016 -0500 + + Cleaning up the code that sets IGA1 line compare register + + Signed-off-by: Kevin Brace + +commit 91b0c7d7d5632eb29f0f72f99c675bf1120c5146 +Author: Kevin Brace +Date: Tue Jun 14 18:07:21 2016 -0500 + + Fixing a switch statement within viaProbePinStrapping + + It was pointed out that the evaluated condition of one of the + switch statement within viaProbePinStrapping function was flawed, + and as a result, if a strict compilation option was used for + compilation, the compiler will give out a compilation warning. + + Signed-off-by: Xavier Bachelot + Signed-off-by: Kevin Brace + +commit 773292fd4f8bee0962d9b2eb219329267e240ade +Author: Kevin Brace +Date: Tue Jun 14 04:24:56 2016 -0500 + + Version bumped to 0.4.186 + + Signed-off-by: Kevin Brace + +commit b858f8e1c045b97d1f17cda3386ce83f0d3d9654 +Author: Kevin Brace +Date: Tue Jun 14 04:15:20 2016 -0500 + + Do not reference allocated private memory within VIAFreeScreen + + By the time VIAFreeScreen callback function is executed, allocated + private memory is long released, so the code should not be + referencing it. + + Signed-off-by: Kevin Brace + +commit 75be924013996a65b471d2da6e8d1339749964f9 +Author: Kevin Brace +Date: Tue Jun 14 04:03:06 2016 -0500 + + Version bumped to 0.4.185 + + Signed-off-by: Kevin Brace + +commit 68b0585f18330b11c9b378be64301996c64dbd45 +Author: Kevin Brace +Date: Tue Jun 14 04:01:55 2016 -0500 + + Various debug message tweaks to viaMapMMIO + + Signed-off-by: Kevin Brace + +commit 19ad4151bf85b3fb8ff3be6b380d55c286bf43c9 +Author: Kevin Brace +Date: Tue Jun 14 03:11:16 2016 -0500 + + Making small modifications to viaUnmapMMIO + + Rearranging the code inside the function and adding additional + safeguards like setting the pointers NULL after the memory map is + released. + + Signed-off-by: Kevin Brace + +commit fcacbe26b0df42a570ea373976e8e3e0f6155296 +Author: Kevin Brace +Date: Tue Jun 14 03:00:17 2016 -0500 + + Version bumped to 0.4.184 + + Signed-off-by: Kevin Brace + +commit 2ba02049570ba628cfa086f092afee501e8a3844 +Author: Kevin Brace +Date: Tue Jun 14 02:59:13 2016 -0500 + + Merging viaMapFB into viaMapMMIO + + Since a frame buffer is also memory mapped, the code was merged into + viaMapMMIO function. + + Signed-off-by: Kevin Brace + +commit d581a5fed8666fa83ae74896a754d8fae34e5e14 +Author: Kevin Brace +Date: Tue Jun 14 01:19:03 2016 -0500 + + Version bumped to 0.4.183 + + Signed-off-by: Kevin Brace + +commit 2b8212b4f69302989e830a2ee46f31b36923eea3 +Author: Kevin Brace +Date: Tue Jun 14 01:05:24 2016 -0500 + + Changing the error handling of viaMapFB + + Signed-off-by: Kevin Brace + +commit 8d8bb92f007ae4961ffa27fcb7325d54099adcd0 +Author: Kevin Brace +Date: Tue Jun 14 00:31:10 2016 -0500 + + Merging PCI MMIO mapping code when libpciaccess is not available + + Signed-off-by: Kevin Brace + +commit 8f3e6c6de76c4aa1baf95f8ce5fcf1d62b7cdf5b +Author: Kevin Brace +Date: Mon Jun 13 23:40:42 2016 -0500 + + Version bumped to 0.4.182 + + Signed-off-by: Kevin Brace + +commit 0038440e196d94135003198c8fc27fe14637f8eb +Author: Kevin Brace +Date: Mon Jun 13 23:34:34 2016 -0500 + + Changing viaPreInit error handling + + The previous code for viaPreInit function was not releasing MMIOs + properly when an error occurred. Now, MMIOs are always unmapped + when exiting viaPreInit function if MMIOs were mapped prior to the + error. + + Signed-off-by: Kevin Brace + +commit 63d644da1d445a03f9f9bc533728b3375d1509d6 +Author: Kevin Brace +Date: Mon Jun 13 13:44:57 2016 -0500 + + MemPhysBase was being incorrectly assigned with VX900 chipset + + This is probably not a big issue, but will fix it just in case. + + Signed-off-by: Kevin Brace + +commit 627ce40565f63b80b4ebb1b390afda9b4083ef81 +Author: Kevin Brace +Date: Mon Jun 13 12:10:36 2016 -0500 + + Version bumped to 0.4.181 + + Signed-off-by: Kevin Brace + +commit 16a698e920d41b853995db3407fbdd6a258fe365 +Author: Kevin Brace +Date: Mon Jun 13 12:06:54 2016 -0500 + + No early horizontal synchronization for IGA1 + + This setting is now set to VIA Technologies recommended setting. + This setting affects display screen horizontal alignment to the + right side edge. + + Signed-off-by: Kevin Brace + +commit d234cdf68ea6a27718a948918b3075ad257e8a0f +Author: Kevin Brace +Date: Mon Jun 13 11:17:23 2016 -0500 + + Version bumped to 0.4.180 + + This version fixes a regression that occurred at Version 0.4.177. + IGA1 now works fine with 1920 horizontal (Y direction) screen + resolution. Sorry about the inconvenience. + + Signed-off-by: Kevin Brace + +commit c1a81a30a30d5bc571d9498a52f4780713808de1 +Author: Kevin Brace +Date: Mon Jun 13 11:06:51 2016 -0500 + + IGA1 horizontal total limit is now 4128 + + There was a bad commit with commit c768c86. This broke the screen of + people who used a monitor capable of 1920 X 1080 screen resolution. + The regression is now fixed. + + Signed-off-by: Max Rus + Signed-off-by: Kevin Brace + +commit b57d2f95275f6ef0db098773a48b1cfbb442acac +Author: Kevin Brace +Date: Sat Jun 11 23:16:52 2016 -0500 + + Version bumped to 0.4.179 + + Initial support for VT1632A based DVI attached to VX855 chipset's + DVP1 (Digital Video Port 1). It is possible that the code might also + work with CX700, VX700, VX800, and VX900 chipsets. + + Signed-off-by: Kevin Brace + +commit 7cb19d9843dcb4cd5107c1a0851403c48b6db6be +Author: Kevin Brace +Date: Sat Jun 11 23:15:06 2016 -0500 + + VT1632A is finally working with VX855 chipset! + + The VT1632A register settings might be too specific to Wyse C00X + thin client, but with this commit, DVI is now working with that unit. + VT1632A is connected to DVP1 (Digital Video Port 1), and the device + driver is (somehow) using IGA2 for DVI. It is possible that one might + be able to do use 2 monitors (VGA and DVI) simultaneously in a + non-clone mode. This also means that the current code might also work + with CX700, VX700, VX800, and VX900 chipsets. + + Signed-off-by: Kevin Brace + +commit 411b4af542ac5d7da49bef9f66f9c706c5816a22 +Author: Kevin Brace +Date: Sat Jun 11 02:38:31 2016 -0500 + + Version bumped to 0.4.178 + + Signed-off-by: Kevin Brace + +commit 870d3c7fc8b6953ff50cdf99c49e2b33b3599eef +Author: Kevin Brace +Date: Sat Jun 11 02:32:46 2016 -0500 + + VIAFreeScreen should not be calling VIAFreeRec + + VIAFreeScreen callback function was calling VIAFreeRec function, and + this was leading to a segmentation fault with Linux 4.5 kernel when it + fails to map the frame buffer to the memory. + + Signed-off-by: Kevin Brace + +commit 9877810ccefc2258aafd1f1fe95654e5cb788496 +Author: Kevin Brace +Date: Fri Jun 10 19:07:50 2016 -0500 + + Version bumped to 0.4.177 + + Signed-off-by: Kevin Brace + +commit e60ca86f6b5465976458ba955a532580695a3ef8 +Author: Kevin Brace +Date: Fri Jun 10 19:01:44 2016 -0500 + + Activating VT1632A external TMDS transmitter (DVI) detection + + While the code may not work, it was determined that the detection of + it should be enabled at this point. It is unlikely that it will work + for now, but if it does not, the code will be fixed in the near future. + + Signed-off-by: Kevin Brace + +commit c768c86d044c84504f2b747db2b306c1f041ba44 +Author: Kevin Brace +Date: Fri Jun 10 02:04:11 2016 -0500 + + Limiting IGA1 horizontal total to 2080. + + Previous code was faulty, so it was updated to keep hardware + limitation in mind. + + Signed-off-by: Kevin Brace + +commit 02205c62f6c0154d767ef8b7a6f700344b894287 +Author: Kevin Brace +Date: Fri Jun 10 01:13:15 2016 -0500 + + Version bumped to 0.4.176 + + Signed-off-by: Kevin Brace + +commit c370c3fda473b0160ab4932b7a9b21fe533f5ac4 +Author: Kevin Brace +Date: Fri Jun 10 01:11:23 2016 -0500 + + Initializing CR47 when mode setting is done + + CR47 (3X5.47) was not being initialized previously so it is now + being initialized whenever mode setting is being performed. + + Signed-off-by: Kevin Brace + +commit 7c271cdb935f89982db9501625fb37a53c401aa4 +Author: Kevin Brace +Date: Fri Jun 10 00:25:49 2016 -0500 + + Version bumped to 0.4.175 + + Signed-off-by: Kevin Brace + +commit 1b14cd93c4c149f82840198a561f24d4e17beb54 +Author: Kevin Brace +Date: Fri Jun 10 00:22:07 2016 -0500 + + Disabling LCD scaling for IGA2 + + Making sure that it is always turned off. + + Signed-off-by: Kevin Brace + +commit 0874c7e40a8aa570c2a2b96d5c8950c2aba4f0f6 +Author: Kevin Brace +Date: Thu Jun 9 23:04:24 2016 -0500 + + Version bumped to 0.4.174 + + Signed-off-by: Kevin Brace + +commit 1ffcaaa2535172d2ab47d7bd4c0da55cdb6c6d98 +Author: Kevin Brace +Date: Thu Jun 9 23:00:54 2016 -0500 + + Setting DVP1 clock and data drive strength to the highest + + VIA frame buffer device driver was doing this, we will do it, too. + + Signed-off-by: Kevin Brace + +commit 059371e59dea9233662c7dde419219b18cf51703 +Author: Kevin Brace +Date: Thu Jun 9 21:25:04 2016 -0500 + + Version bumped to 0.4.173 + + Signed-off-by: Kevin Brace + +commit 98027a5ec31d7d0699116384925f677e78e2cb16 +Author: Kevin Brace +Date: Thu Jun 9 21:22:19 2016 -0500 + + Fix for IGA1 having a blue line on the right edge of the screen + + This was a regression that likely occurred with commit 35f964 + where IGA1 display end blanking was being turned off. Previously, + this bit was not being initialized, and it was typically enabled by + VIA frame buffer device driver or VGA BIOS. + + Suggested-by: Eric Kudzin + Signed-off-by: Kevin Brace + +commit 65923277550945a3819c8d5513c390276062e34b +Author: Kevin Brace +Date: Thu Jun 9 20:49:59 2016 -0500 + + Version bumped to 0.4.172 + + Signed-off-by: Kevin Brace + +commit ab8f9ff1cac3de7f92cbeacc9936e8dcadae3fa3 +Author: Kevin Brace +Date: Thu Jun 9 20:46:01 2016 -0500 + + Setting DVP0 clock and data drive strength to the highest + + VIA frame buffer device driver was doing this, we will do it, too. + + Signed-off-by: Kevin Brace + +commit b7fe9e594d4a16764de0661d470bb46053b62fb2 +Author: Kevin Brace +Date: Thu Jun 9 20:11:34 2016 -0500 + + Version bumped to 0.4.171 + + This version fixes a bug where CLE266 was not working properly if + "CRT + TV" was specified in BIOS setup. This bug was observed with + VIA Embedded EPIA-M mainboard (CLE266 + VT1622A). + + Signed-off-by: Kevin Brace + +commit 97b17c6823bdf2b0fe07574da2dea464d1ea3730 +Author: Kevin Brace +Date: Thu Jun 9 20:09:04 2016 -0500 + + Initializing CR6A, CR6B, and CR6C when mode setting is done + + Not all the register fields of CR6A (3X5.6A), CR6B (3X5.6B), and + CR6C (3X5.6C) were being initialized, and as a result, specifying + the availability of TV out in the BIOS setup will lead to analog out + (VGA) not working properly. Specifically, CR6B[7:6] and CR6C[0] + were causing problems. CR6C controls DIP0 (Digital Interface Port 0) + and exists at this address only in CLE266 (DIP0 is called DVP0 since + KM400 chipset, and DVP0 control register is located at CR96.). + This bug was observed with VIA Embedded EPIA-M mainboard (CLE266 chipset + with VT1622 TV encoder), and likely only affects CLE266 chipset. + + Signed-off-by: Xavier Bachelot + Signed-off-by: Kevin Brace + +commit 2d845f3ac9a74ed5dec6729703c16477abe907d4 +Author: Kevin Brace +Date: Tue Jun 7 19:10:12 2016 -0700 + + Version bumped to 0.4.170 + + Signed-off-by: Kevin Brace + +commit 56ceb6dd38683d5ff1f4866e4d4d74f6d11aba09 +Author: Kevin Brace +Date: Tue Jun 7 19:02:13 2016 -0700 + + Set CLE266.Ax IGA2 display LUT to 6-bit for 8-bit color depth + + It was already being done like this for IGA1, and it probably + should be done like this for IGA2 as well. + + Signed-off-by: Kevin Brace + +commit b2d53be4a6b01fd54ea8f9e2f25240bf032f1eb7 +Author: Kevin Brace +Date: Sat Jun 4 09:29:25 2016 -0700 + + Added debug messages to via_analog_dpms. + + This function is located inside via_outputs.c. + + Signed-off-by: Kevin Brace + +commit cbd42e02b1c179056567fd43068c0a4c05e6f5a5 +Author: Kevin Brace +Date: Sat Jun 4 08:57:06 2016 -0700 + + Version bumped to 0.4.169 + + Signed-off-by: Kevin Brace + +commit fbd7ee6809ee864f3de40e39cf6fba17104ac4fa +Author: Kevin Brace +Date: Sat Jun 4 08:48:37 2016 -0700 + + Fixing a mishandling of starting address for IGA1 + + CR48 was not being handled correctly. + + Signed-off-by: Kevin Brace + +commit 564b53dcd0fc5afcb08b9fb0d2d3b672bccdcd77 +Author: Kevin Brace +Date: Sat Jun 4 08:44:49 2016 -0700 + + Making sure certain revisions of CLE266 does not deal with CR48 + + Signed-off-by: Kevin Brace + +commit e9a1e44492cf54167085c0d1ba8a463f2ca9630c +Author: Kevin Brace +Date: Sat Jun 4 08:32:29 2016 -0700 + + Minor tweaks to viaIGA2SetFBStartingAddress debug messages + + Signed-off-by: Kevin Brace + +commit e850740027b80a39a22475ba0b42936d40be7efb +Author: Kevin Brace +Date: Sat Jun 4 08:31:20 2016 -0700 + + Minor tweaks to viaIGA1SetFBStartingAddress debug messages + + Signed-off-by: Kevin Brace + +commit 7db10c37d731e53117de8bb221bc5eba20c5fd81 +Author: Kevin Brace +Date: Sat Jun 4 08:26:54 2016 -0700 + + Updating via_ums.c copyright + + Signed-off-by: Kevin Brace + +commit 915bb90feb7235f4ee3dd701f5c60c31884cb026 +Author: Kevin Brace +Date: Sat Jun 4 08:12:51 2016 -0700 + + Version bumped to 0.4.168 + + Signed-off-by: Kevin Brace + +commit bcfdc5b332528457215d578258755dec4880b24e +Author: Kevin Brace +Date: Sat Jun 4 08:10:24 2016 -0700 + + Setting X and Y origin within iga2_crtc_mode_set differently + + iga2_crtc_mode_set function should not be calling iga2_crtc_set_origin + function directly, and instead equivalent functionality should be + implemented within iga2_crtc_mode_set function. + + Signed-off-by: Kevin Brace + +commit 91c4a07d2c839c3f378dd9c3dc2b2c340fb218c8 +Author: Kevin Brace +Date: Sat Jun 4 08:00:34 2016 -0700 + + Setting X and Y origin within iga1_crtc_mode_set differently + + iga1_crtc_mode_set function should not be calling iga1_crtc_set_origin + function directly, and instead equivalent functionality should be + implemented within iga1_crtc_mode_set function. + + Signed-off-by: Kevin Brace + +commit f0a766353f0e2b6c83c5f6dd3adf52572787884f +Author: Kevin Brace +Date: Sat Jun 4 07:30:40 2016 -0700 + + Changing VIAInitialize3DEngine to viaInitialize3DEngine + + This function is located inside via_ums.c. + + Signed-off-by: Kevin Brace + +commit 417e3125503b5d7c3c814740ec91eb2b66f4763e +Author: Kevin Brace +Date: Sat Jun 4 07:26:53 2016 -0700 + + Changing VIAInitialize2DEngine to viaInitialize2DEngine + + This function is located inside via_ums.c. + + Signed-off-by: Kevin Brace + +commit 0a416399f8071d6043d3d5a6b5ab9129a0fcd808 +Author: Kevin Brace +Date: Sat Jun 4 07:22:51 2016 -0700 + + Changing VIAMapFB to viaMapFB + + This function is located inside via_ums.c. + + Signed-off-by: Kevin Brace + +commit 2797ae3d355b978957d8c2d7bc23d01028283b54 +Author: Kevin Brace +Date: Sat Jun 4 06:48:00 2016 -0700 + + Changing ViaMMIODisable to viaMMIODisable + + This function is located inside via_ums.c. + + Signed-off-by: Kevin Brace + +commit 9e61c4ea94599d9f79777007b377f7fedb484c3d +Author: Kevin Brace +Date: Sat Jun 4 06:42:36 2016 -0700 + + Changing ViaMMIOEnable to viaMMIOEnable + + This function is located inside via_ums.c. + + Signed-off-by: Kevin Brace + +commit 066b939155048d20b75dc8d064761f3637b44a03 +Author: Kevin Brace +Date: Sat Jun 4 06:39:52 2016 -0700 + + Changing VIAUnmapMMIO to viaUnmapMMIO + + This function is located inside via_ums.c. + + Signed-off-by: Kevin Brace + +commit 0949cc344e50c6b2d79a436d8962e339b762ec85 +Author: Kevin Brace +Date: Sat Jun 4 06:17:22 2016 -0700 + + Changing VIAMapMMIO to viaMapMMIO + + This function is located inside via_ums.c. + + Signed-off-by: Kevin Brace + +commit ffe05b7d14cf0de2df8bdb54574b55322fb666bb +Author: Kevin Brace +Date: Thu Jun 2 10:33:17 2016 -0700 + + Version bumped to 0.4.167 + + Signed-off-by: Kevin Brace + +commit d65e558d5ff1767248d1fa949c7d4f9349da573a +Author: Kevin Brace +Date: Thu Jun 2 10:27:49 2016 -0700 + + Removing unnecessary IGA1 related code from viaIGA2SetDisplayRegister + + This function is located inside via_display.c. + + Signed-off-by: Kevin Brace + +commit 96ea9c6b37dfffb552390573cb1760c7a729cb31 +Author: Kevin Brace +Date: Thu Jun 2 10:20:59 2016 -0700 + + Version bumped to 0.4.166 + + Signed-off-by: Kevin Brace + +commit 6f7d73be0aa5c453beab270fadb31dd348fac625 +Author: Kevin Brace +Date: Thu Jun 2 10:04:38 2016 -0700 + + IGA2 vertical retrace end should be obtained differently + + Signed-off-by: Kevin Brace + +commit 4d85e8e01893b395aac3c0931fa0625350021ddc +Author: Kevin Brace +Date: Thu Jun 2 10:00:53 2016 -0700 + + Version bumped to 0.4.165 + + Signed-off-by: Kevin Brace + +commit 071a2c2159179c9db224c0b28aa053f41ea69206 +Author: Kevin Brace +Date: Thu Jun 2 09:53:42 2016 -0700 + + IGA2 vertical blank start should not have 1 subtracted from it + + Signed-off-by: Kevin Brace + +commit 48061dade82eede04efe2bd641a7e3164190d097 +Author: Kevin Brace +Date: Thu Jun 2 09:31:54 2016 -0700 + + Version bumped to 0.4.164 + + Signed-off-by: Kevin Brace + +commit c1bf2ec5cec5782584dce378efa22d1aa8f6a5a1 +Author: Kevin Brace +Date: Thu Jun 2 09:30:51 2016 -0700 + + IGA2 horizontal retrace end should be obtained differently + + Signed-off-by: Kevin Brace + +commit e58c52c0965ab7f34e474f555ead5aa165b40f84 +Author: Kevin Brace +Date: Thu Jun 2 09:05:48 2016 -0700 + + Version bumped to 0.4.163 + + Signed-off-by: Kevin Brace + +commit 8fdf0d61d4447737a166801b570e29464f2c373e +Author: Kevin Brace +Date: Thu Jun 2 08:50:00 2016 -0700 + + IGA2 horizontal blank start should not have 1 subtracted from it + + After thinking about IGA2 horizontal blank start, it should not have + a value of 1 subtracted from it. + + Signed-off-by: Kevin Brace + +commit 049442c4b22edbf14b7b9c5bce18ac0abc3adb15 +Author: Kevin Brace +Date: Thu Jun 2 08:35:39 2016 -0700 + + Version bumped to 0.4.162 + + Signed-off-by: Kevin Brace + +commit 56cdf3507f0fddd5328208a0a1d6ca5688ebe8e4 +Author: Kevin Brace +Date: Thu Jun 2 08:33:34 2016 -0700 + + Removing compilation warnings inside viaIGA2SetFBStartingAddress + + Signed-off-by: Kevin Brace + +commit 6e6d0ce69a822146e30d738e30172e54a7d8b337 +Author: Kevin Brace +Date: Thu Jun 2 08:27:09 2016 -0700 + + Removing compilation warnings inside viaIGA1SetFBStartingAddress + + Signed-off-by: Kevin Brace + +commit ebf0d16a0ca4174578ece1f75789b19eb7b9c58a +Author: Kevin Brace +Date: Thu Jun 2 08:00:54 2016 -0700 + + Added debug code for CR32 (3X5.32) and CR33 (3X5.33) + + Signed-off-by: Kevin Brace + +commit ec7e0e48ad8ef25512772cf286d47c4d3f9d06c4 +Author: Kevin Brace +Date: Thu Jun 2 07:40:18 2016 -0700 + + Moving the location of viaIGA1SetFBStartingAddress + + This function is located inside via_display.c. + + Signed-off-by: Kevin Brace + +commit aa6d4d53adcb15ba4bb4f46952b203148a9a78d4 +Author: Kevin Brace +Date: Thu Jun 2 07:12:41 2016 -0700 + + Version bumped to 0.4.161 + + Signed-off-by: Kevin Brace + +commit df26d0cc1a38961cbab02f6cc69702f15ab371ee +Author: Kevin Brace +Date: Thu Jun 2 07:06:03 2016 -0700 + + Discontinuing functions related to simultaneous display + + Discontinuing ViaDisplayEnableSimultaneous and + ViaDisplayDisableSimultaneous functions. These two functions are + no longer used since the display device driver already has the + capability to control two display controllers. + + Signed-off-by: Kevin Brace + +commit 3e512ac6db2661d74405872fd935c161032638ca +Author: Kevin Brace +Date: Thu Jun 2 06:50:14 2016 -0700 + + Moved IGA1 initialization code away from viaIGA1SetDisplayRegister + + Moved IGA1 initialization code from viaIGA1SetDisplayRegister + function to viaIGA1Init function. These functions are located + inside via_display.c. + + Signed-off-by: Kevin Brace + +commit 03907c23746cbaf418d4364150af4d9375bfd9a8 +Author: Kevin Brace +Date: Thu Jun 2 05:24:26 2016 -0700 + + Version bumped to 0.4.160 + + Signed-off-by: Kevin Brace + +commit 35f964d62f3257ec8d9ba9029865c47fa2af718e +Author: Kevin Brace +Date: Thu Jun 2 05:16:34 2016 -0700 + + Updating the code that initializes various IGA1 characteristics + + viaIGA1SetDisplayRegister function contains the code in question. + This function is located inside via_display.c. + + Signed-off-by: Kevin Brace + +commit fedc9f12574180d7feb99a6f188296b954bb7360 +Author: Kevin Brace +Date: Thu Jun 2 04:49:34 2016 -0700 + + Tweak of the portion that sets IGA1 horizontal display fetch count + + viaIGA1SetDisplayRegister function contains the code in question. + This function is located inside via_display.c. + + Signed-off-by: Kevin Brace + +commit d22b2dd0bf6317bee4afb899363632cf6bb3aeb6 +Author: Kevin Brace +Date: Thu Jun 2 04:27:23 2016 -0700 + + Version bumped to 0.4.159 + + Signed-off-by: Kevin Brace + +commit ec8776a3ae3ba1dfe355d33fe6c919b05e36e895 +Author: Kevin Brace +Date: Thu Jun 2 04:25:39 2016 -0700 + + Cleanup of the code that sets IGA1 horizontal display fetch count + + viaIGA1SetDisplayRegister function contains the code in question. + This function is located inside via_display.c. + + Signed-off-by: Kevin Brace + +commit 71ea18dc52fb63b4f6709403a487acf8c70d399e +Author: Kevin Brace +Date: Thu Jun 2 03:41:36 2016 -0700 + + Cleanup of the code that sets IGA1 horizontal offset + + viaIGA1SetDisplayRegister function contains the code in question. + This function is located inside via_display.c. + + Signed-off-by: Kevin Brace + +commit e520ca27dbb769f34c9828f3fb2d36a172b27a0a +Author: Kevin Brace +Date: Thu Jun 2 03:14:03 2016 -0700 + + Cleanup of the code that sets IGA1 vertical synchronization end + + viaIGA1SetDisplayRegister function contains the code in question. + This function is located inside via_display.c. + + Signed-off-by: Kevin Brace + +commit c10d8fda63641a16b556812bc6f67a74df03109e +Author: Kevin Brace +Date: Thu Jun 2 03:00:26 2016 -0700 + + Cleanup of the code that sets IGA1 vertical synchronization start + + viaIGA1SetDisplayRegister function contains the code in question. + This function is located inside via_display.c. + + Signed-off-by: Kevin Brace + +commit 5fe931e71d85b344048fe8324dc0ead2306190a4 +Author: Kevin Brace +Date: Tue May 31 20:51:47 2016 -0700 + + Cleanup of the code that sets IGA1 vertical blank end + + viaIGA1SetDisplayRegister function contains the code in question. + This function is located inside via_display.c. + + Signed-off-by: Kevin Brace + +commit 5243e4533c01a1208dd684ea26e04f925816f38e +Author: Kevin Brace +Date: Tue May 31 20:29:32 2016 -0700 + + IGA1 vertical blank start should not have 1 subtracted from it + + After thinking about IGA1 vertical blank start, it should not have + a value of 1 subtracted from it. + + Signed-off-by: Kevin Brace + +commit 906afd7c9e0ae213c34d7201158393e7c6904b63 +Author: Kevin Brace +Date: Tue May 31 19:50:42 2016 -0700 + + Cleanup of the code that sets IGA1 vertical blank start + + viaIGA1SetDisplayRegister function contains the code in question. + This function is located inside via_display.c. + + Signed-off-by: Kevin Brace + +commit 81af8431ea9fcb6099513974a23bda7bbf493e9f +Author: Kevin Brace +Date: Mon May 30 23:13:50 2016 -0700 + + Made code improvement to viaProbePinStrapping + + The function is located inside via_outputs.c. + + Signed-off-by: Kevin Brace + +commit 21ae2b4c3c02812a69e9162791c6db2e6ec36842 +Author: Kevin Brace +Date: Sun May 29 00:44:08 2016 -0700 + + Version bumped to 0.4.158 + + This version includes initial support for RandR and a fix for + runtime screen resize bug. Please start testing this version since + there will be a feature freeze for Version 0.5 soon. Enjoy!!! + + Signed-off-by: Kevin Brace + +commit 19065ceb96cce922191121f917f1ce079e7a4876 +Author: Kevin Brace +Date: Sun May 29 00:30:51 2016 -0700 + + Limit X and Y direction screen resolution + + In order to support RandR properly, the supported X direction + total screen size will be limited to 2048 dots for 32-bit color + mode and 4096 dots for 16-bit color mode. For now, Y direction + total screen size will be symmetrical with respect to the X + direction total screen size. With this fix, RandR should work + for most users, and you can now use 2 monitors to display your + extended desktop screen. Enjoy!!! + + Signed-off-by: Kevin Brace + +commit 25787b7ada1e114d5e0f3692ec96e8d0c1420a8b +Author: Kevin Brace +Date: Sun May 29 00:10:47 2016 -0700 + + Fix a fatal regression impacting runtime screen resize + + It was discovered that a commit done between Version 0.3.2 + and Version 0.3.3 broke the screen resize functionality + (Commit cee0a1fab9cade87e6de16c67cd34c84cf697531). This led to + an X Server crash if the screen was resized from a screen resize + utility. With this fix, the screen resolution can now be changed + from the screen resize utility safely. + + Signed-off-by: Kevin Brace + +commit 620cd85f2c15c9359d0dda2caee46987f0e0477c +Author: Kevin Brace +Date: Wed May 25 17:19:55 2016 -0700 + + Version bumped to 0.4.157 + + Signed-off-by: Kevin Brace + +commit 3309f1822984fe150fc227d0b0e859788eb823ac +Author: Kevin Brace +Date: Wed May 25 16:56:31 2016 -0700 + + Removing unnecessary code that sets starting address of IGA1 + + Since the frame buffer starting address of IGA1 can be specified + separately by viaIGA1SetFBStartingAddress function, there is no + need to specify this within viaIGA1SetDisplayRegister function. + Both of these functions are located inside via_display.c. + + Signed-off-by: Kevin Brace + +commit e712b398ee6b690a62351cdcfc7f44185453fdb1 +Author: Kevin Brace +Date: Wed May 25 16:49:20 2016 -0700 + + Cleanup of the code that sets IGA1 vertical display end + + viaIGA1SetDisplayRegister function contains the code in question. + This function is located inside via_display.c. + + Signed-off-by: Kevin Brace + +commit ba8d9f0092339f1e49f05564b2b6f7c4d03514c0 +Author: Kevin Brace +Date: Wed May 25 16:46:18 2016 -0700 + + Cleanup of the code that sets IGA1 vertical total + + viaIGA1SetDisplayRegister function contains the code in question. + This function is located inside via_display.c. + + Signed-off-by: Kevin Brace + +commit 7cf973401d757886a56a92d9bd3c81e5c218812a +Author: Kevin Brace +Date: Tue May 24 03:15:39 2016 -0700 + + Removing a non-existent function called ViaModeSecondCRTC + + This function was being called from via_dvi_mode_set function + located inside via_outputs.c. + + Signed-off-by: Kevin Brace + +commit c3cc925cc175e9faca28df159d6f489b1710e305 +Author: Kevin Brace +Date: Tue May 24 03:12:42 2016 -0700 + + Removing unnecessary write to SR15 (3C5.15) + + This was happening within viaIGA1SetDisplayRegister function. + This function is located inside via_display.c. + + Signed-off-by: Kevin Brace + +commit 7f04f484031547918529e025829b992ff5a3749d +Author: Kevin Brace +Date: Tue May 24 01:49:11 2016 -0700 + + Version bumped to 0.4.156 + + Signed-off-by: Kevin Brace + +commit d6ca7471a3db5b742d399152589fa4c95a213db6 +Author: Kevin Brace +Date: Tue May 24 01:47:49 2016 -0700 + + Rewrite of the code that sets IGA1 color depth + + viaIGA1SetDisplayRegister function contains the code in question. + This function is located inside via_display.c. + + Signed-off-by: Kevin Brace + +commit 75d1c6898175b280419bfa11abdecd3a7663f151 +Author: Kevin Brace +Date: Mon May 23 01:48:47 2016 -0700 + + Version bumped to 0.4.155 + + Signed-off-by: Kevin Brace + +commit f2e844ba5b06aa2976d8f294e322c56bc46e014d +Author: Kevin Brace +Date: Mon May 23 01:47:20 2016 -0700 + + Forgot to add debug code for CR36 (3X5.36) + + Signed-off-by: Kevin Brace + +commit ca7991f3d64bab946941b96ff1005b26a472665e +Author: Kevin Brace +Date: Mon May 23 00:44:45 2016 -0700 + + Making sure PCI Power Management Control bit is turned on + + viaIGAInitCommon function now turns this bit on. This function is + located inside via_display.c. + + Signed-off-by: Kevin Brace + +commit 2e2fb53e1c09d413174000116c4e08d8303a7626 +Author: Kevin Brace +Date: Mon May 23 00:06:27 2016 -0700 + + Version bumped to 0.4.154 + + Signed-off-by: Kevin Brace + +commit 3540e211691ab7676284117dc9dc3c71ed92900e +Author: Kevin Brace +Date: Mon May 23 00:04:46 2016 -0700 + + Added viaIGA2Init + + viaIGA2Init function initializes IGA2 specific registers. + This function is located inside via_display.c. + + Signed-off-by: Kevin Brace + +commit 158ea17e8c0e525f9239706449d2d86b7c168c83 +Author: Kevin Brace +Date: Sun May 22 23:34:25 2016 -0700 + + Version bumped to 0.4.153 + + Signed-off-by: Kevin Brace + +commit 6e8e8dbf3447d049ac5bbfd3551aeb359f664d34 +Author: Kevin Brace +Date: Sun May 22 23:27:17 2016 -0700 + + Added viaIGA1Init + + viaIGA1Init function initializes IGA1 specific registers. + This function is located inside via_display.c. + + Signed-off-by: Kevin Brace + +commit 9243d288410857a8c38d11c391af2734d8d482cf +Author: Kevin Brace +Date: Sun May 22 22:24:16 2016 -0700 + + Version bumped to 0.4.152 + + Signed-off-by: Kevin Brace + +commit 7738d22741cd7cce32b6d3df1e809e7403f74bc5 +Author: Kevin Brace +Date: Sun May 22 22:22:03 2016 -0700 + + Major rewrite of viaIGAInitCommon + + Reorganized viaIGAInitCommon function, and add initialization code + for a few registers. This function is located inside via_display.c. + + Signed-off-by: Kevin Brace + +commit 6a0476bc3aaca391169d752c0220e4ffe615446b +Author: Kevin Brace +Date: Sun May 22 07:35:33 2016 -0700 + + Version bumped to 0.4.151 + + Signed-off-by: Kevin Brace + +commit 525a42a00ca9aa9b43f3e3e87197636b12c59061 +Author: Kevin Brace +Date: Sun May 22 07:34:21 2016 -0700 + + Cleanup of the code that sets IGA1 horizontal synchronization end + + viaIGA1SetDisplayRegister function contains the code in question. + This function is located inside via_display.c. + + Signed-off-by: Kevin Brace + +commit 0543c1b5c9280e2611679376b4441cb495ba104b +Author: Kevin Brace +Date: Sun May 22 07:09:00 2016 -0700 + + Cleanup of the code that sets IGA1 horizontal synchronization start + + viaIGA1SetDisplayRegister function contains the code in question. + This function is located inside via_display.c. + + Signed-off-by: Kevin Brace + +commit c68602c24290361a0e170d15eb4c68b8a2d2c50b +Author: Kevin Brace +Date: Sun May 22 06:58:32 2016 -0700 + + Cleanup of the code that sets IGA1 horizontal blank end + + viaIGA1SetDisplayRegister function contains the code in question. + This function is located inside via_display.c. + + Signed-off-by: Kevin Brace + +commit d48ca55219d935d7d3cd21d342a9d4316a27dd3c +Author: Kevin Brace +Date: Sun May 22 04:32:38 2016 -0700 + + Cleanup of the code that sets IGA1 horizontal blank start + + There is no need for subtracting one from this value, so this + practice was discontinued. viaIGA1SetDisplayRegister function + contains the code in question. This function is located inside + via_display.c. + + Signed-off-by: Kevin Brace + +commit 40f4603c447670c4e4054c50a49abce887eebe8e +Author: Kevin Brace +Date: Sun May 22 04:02:27 2016 -0700 + + Cleanup of the code that sets IGA1 horizontal display end + + viaIGA1SetDisplayRegister function contains the code in question. + This function is located inside via_display.c. + + Signed-off-by: Kevin Brace + +commit 1faf7f76d7decce015f3fa91dd14b3baec5980d5 +Author: Kevin Brace +Date: Fri May 20 11:01:59 2016 -0700 + + Version bumped to 0.4.150 + + Signed-off-by: Kevin Brace + +commit aee942f573d85a22e14a7161b52b5bd01d8d9491 +Author: Kevin Brace +Date: Fri May 20 10:56:04 2016 -0700 + + Removing unnecessary manipulation of IGA1 display FIFO from IGA2 code + + It does not make sense to alter IGA1 display FIFO from IGA2 code that + sets IGA2 display registers. + + Signed-off-by: Kevin Brace + +commit 99838aba5b21accf1d4f12efeca7e088b4ebe3c7 +Author: Kevin Brace +Date: Fri May 20 10:19:52 2016 -0700 + + Cleanup of the code that sets IGA1 horizontal total + + viaIGA1SetDisplayRegister function contains the code in question. + This function is located inside via_display.c. + + Signed-off-by: Kevin Brace + +commit 46ddaceb074794ed0fc67ad12cde827e49ec1354 +Author: Kevin Brace +Date: Fri May 20 00:08:16 2016 -0700 + + Cleanup of the code that sets IGA1 color depth + + viaIGA1SetDisplayRegister function contains the code in question. + This function is located inside via_display.c. + + Signed-off-by: Kevin Brace + +commit e128963631269e5db7294e8a7ba7a5267f818c52 +Author: Kevin Brace +Date: Thu May 19 22:32:40 2016 -0700 + + Version bumped to 0.4.149 + + Signed-off-by: Kevin Brace + +commit cfa95bfa383f3021a4a6183e56cbc7e18f298981 +Author: Kevin Brace +Date: Thu May 19 22:25:37 2016 -0700 + + Discontinuing the use of viaIGA2SetMode + + The equivalent functionality was moved over to iga2_crtc_mode_set + function. + + Signed-off-by: Kevin Brace + +commit 1fbbf0d5573243959c41dedc38c8bf8760296462 +Author: Kevin Brace +Date: Thu May 19 21:10:42 2016 -0700 + + Discontinuing the use of viaIGA1SetMode + + The equivalent functionality was moved over to iga1_crtc_mode_set + function. + + Signed-off-by: Kevin Brace + +commit 2d4067621722c7755351665ae436657c865c0abd +Author: Kevin Brace +Date: Thu May 19 20:46:27 2016 -0700 + + Added debug messages to viaIGA1SetDisplayRegister + + This function is located inside via_display.c. + + Signed-off-by: Kevin Brace + +commit 087c49566b5b30841b29606a559219d34dd1f28b +Author: Kevin Brace +Date: Fri May 13 19:17:52 2016 -0700 + + Version bumped to 0.4.148 + + Signed-off-by: Kevin Brace + +commit ff0a472b7853193ff1d82d47f18d7f40d3e69840 +Author: Kevin Brace +Date: Fri May 13 19:16:38 2016 -0700 + + Removing unwanted leftover code from viaIGA1SetDisplayRegister + + This function is located inside via_display.c. + + Signed-off-by: Kevin Brace + +commit c81bc0aef5bc23508f0f4eb544f4e7e57ea953ec +Author: Kevin Brace +Date: Mon May 9 22:58:21 2016 -0700 + + Adjusting xf86CrtcSetSizeRange max_pitch and max_height + + Signed-off-by: Kevin Brace + +commit 93a0664b9907f97ef572eac2bf9b734a32af689f +Author: Kevin Brace +Date: Mon May 9 22:07:17 2016 -0700 + + Added debug messages to iga2_crtc_set_origin + + This function is located inside via_display.c. + + Signed-off-by: Kevin Brace + +commit 135795372998bd0fa7c7d297a18c3c3effd46d3b +Author: Kevin Brace +Date: Mon May 9 22:05:44 2016 -0700 + + Added debug messages to iga1_crtc_set_origin + + This function is located inside via_display.c. + + Signed-off-by: Kevin Brace + +commit ce962f0dc1c2dacb2854164b10975f29372a571f +Author: Kevin Brace +Date: Mon May 9 21:51:46 2016 -0700 + + Changing viaIGA2Screen to viaIGA2DisplayOutput + + Based on the feedback I received from other developers, the function + name is changing. Furthermore, other small changes were made to the + function's code. This function is located inside via_display.c. + + Suggested-by: Bartosz Kosiorek + Suggested-by: Luc Verhaegen + Signed-off-by: Kevin Brace + +commit f1dc144070678147f69621fabf7b95fd7f2c348f +Author: Kevin Brace +Date: Mon May 9 19:52:07 2016 -0700 + + Version bumped to 0.4.147 + + Signed-off-by: Kevin Brace + +commit 0d3c0deb72f5cce55be18bdf89e389eb4df71e13 +Author: Kevin Brace +Date: Mon May 9 19:51:12 2016 -0700 + + Complete rewriting of save and restore callbacks for IGA1 and IGA2 + + Signed-off-by: Kevin Brace + +commit 2298a4158723f0f408af978c1b2e225581f5e5e2 +Author: Kevin Brace +Date: Tue May 3 01:49:05 2016 -0700 + + Version bumped to 0.4.146 + + Signed-off-by: Kevin Brace + +commit 8c69a4cb9d55041e67d4060e18cadbede44d1f51 +Author: Kevin Brace +Date: Tue May 3 01:48:01 2016 -0700 + + Made code fixes to viaProbePinStrapping + + This function is located inside via_outputs.c. + + Signed-off-by: Kevin Brace + +commit 5a49ff0e7e818c5d9a29c89c64bda8dcbbe3bcdd +Author: Kevin Brace +Date: Mon May 2 23:32:12 2016 -0700 + + Version bumped to 0.4.145 + + Signed-off-by: Kevin Brace + +commit 0137b2efa9dc580802a6a19a18a88ec226b5944e +Author: Kevin Brace +Date: Mon May 2 23:28:52 2016 -0700 + + Added viaProbePinStrapping function + + This function probes the pin strappings of a VIA Technologies IGP. + The information gathered from this function will eventually help + the automatic detection of various display resources. + + Signed-off-by: Kevin Brace + +commit f77a2fa21101322019b5eb426c19a2b0a3ba0df8 +Author: Kevin Brace +Date: Sun May 1 09:17:37 2016 -0700 + + Version bumped to 0.4.144 + + Signed-off-by: Kevin Brace + +commit 70d89a2e02213522ab484c5437178602e4898231 +Author: Kevin Brace +Date: Sun May 1 09:13:57 2016 -0700 + + Added viaIGAInitCommon function + + This function helps initialize the common (shared) registers between + IGA1 and IGA2. Whenever there is a mode set, IGA1 and IGA2 will both + call this function. + + Signed-off-by: Kevin Brace + +commit bed15c0f7f6760884237ce83cca5fb74d386ad2e +Author: Kevin Brace +Date: Sun May 1 09:06:07 2016 -0700 + + Changing ViaOutputsDetect to viaOutputDetect + + This function is located inside via_outputs.c. + + Signed-off-by: Kevin Brace + +commit 1c6684c6ac41faa24aa79ccd4f0c32140baee667 +Author: Kevin Brace +Date: Tue Apr 26 11:21:37 2016 -0700 + + Version bumped to 0.4.143 + + Signed-off-by: Kevin Brace + +commit a3eedc08a4e4824512b2a15c119a24cc45acefc4 +Author: Kevin Brace +Date: Tue Apr 26 11:14:09 2016 -0700 + + Added comments about IGA2 screen state during mode setting + + Signed-off-by: Kevin Brace + +commit 4ab3e96aadd091a3a46874a16ad2c3f6d58dbde9 +Author: Kevin Brace +Date: Tue Apr 26 10:57:10 2016 -0700 + + Eliminating the junk shown on the screen at the boot up for IGA1 + + When display mode setting is being done for IGA1, the screen is now + turned off so that garbage is not shown on the screen. This improves + the user experience. (^_^) + + Signed-off-by: Kevin Brace + +commit 872cc3a5db6b6cbac637657ace8af10cf0d085c4 +Author: Kevin Brace +Date: Tue Apr 26 10:24:37 2016 -0700 + + Eliminating the junk shown on the screen at the boot up for IGA2 + + When display mode setting is being done for IGA2, the screen is now + turned off so that garbage is not shown on the screen. This improves + the user experience. (^_^) + + Signed-off-by: Kevin Brace + +commit 08b350f629c55c5a737bff4a6ea7d63ac0e3c5be +Author: Kevin Brace +Date: Tue Apr 26 09:48:06 2016 -0700 + + Version bumped to 0.4.142 + + Signed-off-by: Kevin Brace + +commit 76d221b2a21d3a2948426e5022e0ecbb6e9fac8a +Author: Kevin Brace +Date: Tue Apr 26 09:38:59 2016 -0700 + + Added debug messages to iga2_crtc_dpms + + This function is located inside via_display.c. + + Signed-off-by: Kevin Brace + +commit 479b2ab119d05c22e1541f4cf25fe816419a86e9 +Author: Kevin Brace +Date: Tue Apr 26 09:31:58 2016 -0700 + + Turning off IGA2 correctly + + Added viaIGA2Screen function to via_display.c. + + Signed-off-by: Kevin Brace + +commit 6e6957840616695221c74c2f08f7e8ba8eaaabc9 +Author: Kevin Brace +Date: Tue Apr 26 08:15:45 2016 -0700 + + Version bumped to 0.4.141 + + Signed-off-by: Kevin Brace + +commit c0e4c70cd76d206868f3bb5e387fe63945e7237b +Author: Kevin Brace +Date: Tue Apr 26 08:13:49 2016 -0700 + + Added debug messages to iga1_crtc_dpms + + This function is located inside via_display.c. + + Signed-off-by: Kevin Brace + +commit b725afd9baebfb9a7c4fa7fb94250537e9ce6d9b +Author: Kevin Brace +Date: Tue Apr 26 08:02:53 2016 -0700 + + Implementing all DPMS modes for IGA1 + + Previously, not all DPMS (Display Power Management Signaling) modes + were implemented for IGA1. + + Signed-off-by: Kevin Brace + +commit ac5a7921e855bd2dba81d11c7caa507efc7f5f29 +Author: Kevin Brace +Date: Mon Apr 25 20:55:02 2016 -0700 + + Version bumped to 0.4.140 + + Signed-off-by: Kevin Brace + +commit 7d57a96f36e38c04c56190849121fb014a7d5fef +Author: Kevin Brace +Date: Mon Apr 25 20:53:19 2016 -0700 + + Removing the call to viaIGA2DisplayChannel within viaDisplayInit + + viaIGA2DisplayChannel function should be called explicitly before + calling viaDisplayInit function. + + Signed-off-by: Kevin Brace + +commit 6f8a61d96acb97f13df055820c3b27447484404c +Author: Kevin Brace +Date: Mon Apr 25 20:48:56 2016 -0700 + + Debug messages quality improvement within viaDisplayInit + + This function is located inside via_display.c. + + Signed-off-by: Kevin Brace + +commit 354d5d9bcf33fa9e13c172b2c32cc5de308d685c +Author: Kevin Brace +Date: Mon Apr 25 20:32:46 2016 -0700 + + Changing ViaDisplayInit to viaDisplayInit + + This function is located inside via_display.c. + + Signed-off-by: Kevin Brace + +commit 7ab80529901f0c7f0b744acc91120b0368cc8ba4 +Author: Kevin Brace +Date: Mon Apr 25 20:02:24 2016 -0700 + + Version bumped to 0.4.139 + + Signed-off-by: Kevin Brace + +commit 824b6862ba18070b7ac270627257324837773621 +Author: Kevin Brace +Date: Mon Apr 25 20:01:12 2016 -0700 + + Code comment improvement for viaIGA2DisplayChannel + + Signed-off-by: Kevin Brace + +commit 71a91539bafeaea334afe0fcb8a8b6a0d1a6d087 +Author: Kevin Brace +Date: Mon Apr 25 19:56:21 2016 -0700 + + Replacing ViaSecondDisplayChannelDisable with viaIGA2DisplayChannel + + This function is located inside via_display.c. + + Signed-off-by: Kevin Brace + +commit 020dd2c12c69a8b7a78ba8740648e7f3e099731a +Author: Kevin Brace +Date: Mon Apr 25 19:51:48 2016 -0700 + + Replacing viaIGA2DisplayChannelEnable with viaIGA2DisplayChannel + + This function is located inside via_display.c. + + Signed-off-by: Kevin Brace + +commit 3bee18389d68d38a16161e9fb7d41d8e6b9a271f +Author: Kevin Brace +Date: Mon Apr 25 18:57:02 2016 -0700 + + Changing ViaSecondDisplayChannelEnable to viaIGA2DisplayChannelEnable + + This function is located inside via_display.c. + + Signed-off-by: Kevin Brace + +commit ba099939a6a8b3cd6ddeaaa0c0c791318bbb40a8 +Author: Kevin Brace +Date: Mon Apr 25 17:12:34 2016 -0700 + + Version bumped to 0.4.138 + + Signed-off-by: Kevin Brace + +commit c1e8206d89b4e9ecf20de2f8864a9da9318f1e65 +Author: Kevin Brace +Date: Mon Apr 25 17:09:00 2016 -0700 + + Getting rid of realMode pointer from viaIGA2SetMode + + mode pointer given by the function is adequate. + + Signed-off-by: Kevin Brace + +commit 0102dc1ab2800feba8b05331c727079bcb292f42 +Author: Kevin Brace +Date: Mon Apr 25 14:59:46 2016 -0700 + + Version bumped to 0.4.137 + + Signed-off-by: Kevin Brace + +commit 12343dd1f0fb5fcd160fa7fea7427a26b93faf27 +Author: Kevin Brace +Date: Mon Apr 25 14:57:32 2016 -0700 + + Fixing bad detection of the current chipset for IGA2 + + It appears that the previous developers made a mistake when trying + to detect the current chipset for viaIGA2SetDisplayRegister. + + Signed-off-by: Kevin Brace + +commit 734b33c4cea7c1d84325e7a67eb824e440658ed3 +Author: Kevin Brace +Date: Mon Apr 25 14:56:39 2016 -0700 + + Version bumped to 0.4.136 + + Signed-off-by: Kevin Brace + +commit a2f8bd91efe52a45f3d6698aa84cb4324fbe65b5 +Author: Kevin Brace +Date: Mon Apr 25 14:55:15 2016 -0700 + + Fixing bad detection of the current chipset for IGA1 + + It appears that the previous developers made a mistake when trying + to detect the current chipset for viaIGA1SetDisplayRegister. + + Signed-off-by: Kevin Brace + +commit 912be38b463fa4fb4c4cd366dfd7ac751caa2147 +Author: Kevin Brace +Date: Sun Apr 24 19:00:08 2016 -0700 + + Added debug messages to viaIGA2SetMode. + + This function is located inside via_display.c. + + Signed-off-by: Kevin Brace + +commit ff0cfff605500c5e17e18011ef2a018ba37690e2 +Author: Kevin Brace +Date: Sun Apr 24 18:54:43 2016 -0700 + + Version bumped to 0.4.135 + + Signed-off-by: Kevin Brace + +commit 1f9e694702c431122cbe7e665308d443bc8428c0 +Author: Kevin Brace +Date: Sun Apr 24 18:51:40 2016 -0700 + + Bad CrtcVSyncStart should be greater than 2048 for IGA2 + + For viaIGA2ModeValid function, a bad CrtcVSyncStart should be greater + than 2048, not 2047. This is based on observing how other parameters + are tested. + + Signed-off-by: Kevin Brace + +commit 2300eebd0f9b38a110a563c27f2568c10e2656d1 +Author: Kevin Brace +Date: Sun Apr 24 18:35:15 2016 -0700 + + Version bumped to 0.4.134 + + Signed-off-by: Kevin Brace + +commit 56aaa87a495603b084a1a91a57f7ec0216df99fc +Author: Kevin Brace +Date: Sun Apr 24 18:31:51 2016 -0700 + + Activating IGA2 specific screen mode setting validation function + + For whatever reason, viaIGA2ModeValid function was not used to check + IGA2 screen mode setting validity, and instead, the one for IGA1 was + also used for IGA2. Since IGA1 and IGA2 have different capabilities, + this is not desirable. + + Signed-off-by: Kevin Brace + +commit 9d2e2c193fd18cd14bcdbdd2d96d5712f9649a6b +Author: Kevin Brace +Date: Sun Apr 24 18:23:38 2016 -0700 + + IGA2 vertical synchronization end maximum is 32 + + Signed-off-by: Kevin Brace + +commit 90ff984a0afcbe539c2bbc8cfc0c7bb622be7787 +Author: Kevin Brace +Date: Sun Apr 24 18:15:25 2016 -0700 + + Limiting CrtcHSyncStart to at or below 2048 for CLE266 and KM400 family + + Horizontal Retrace Start Bits register is only 11 bits for CLE266 + and KM400 family (UniChrome), but is 12 bits for the newer devices + (UniChrome Pro and Chrome9). When the screen mode setting validity + is tested, this will have to be taken into consideration. + + Signed-off-by: Kevin Brace + +commit e75369dbfeda296c51995ae79318c3fb0ead0ff2 +Author: Kevin Brace +Date: Sun Apr 24 12:50:33 2016 -0700 + + Version bumped to 0.4.133 + + Signed-off-by: Kevin Brace + +commit 5a165f2904fe9e3563d7e50007beb777978e2f61 +Author: Kevin Brace +Date: Sun Apr 24 12:48:02 2016 -0700 + + Moving viaIGA2SetMode location + + This function is located inside via_display.c. + + Signed-off-by: Kevin Brace + +commit 6a4a27f7414620a48f6f648ebc134f5c16f5ebc0 +Author: Kevin Brace +Date: Sun Apr 24 12:43:06 2016 -0700 + + Moving viaIGA1ModeValid location + + This function is located inside via_display.c. + + Signed-off-by: Kevin Brace + +commit 4834a9d9c57ff7eba5359da9a4d5597e3c31f89f +Author: Kevin Brace +Date: Sun Apr 24 12:35:48 2016 -0700 + + Added debug messages to viaIGA1ModeValid + + This function is located inside via_display.c. + + Signed-off-by: Kevin Brace + +commit b0cecb3c48039f877d1ed994299ca7b6e12aeb7e +Author: Kevin Brace +Date: Sun Apr 24 12:29:50 2016 -0700 + + Changing ViaFirstCRTCModeValid to viaIGA1ModeValid + + This function is located inside via_display.c. + + Signed-off-by: Kevin Brace + +commit 4ceb752d2075b04b070425d826099310013e9f65 +Author: Kevin Brace +Date: Sun Apr 24 12:21:41 2016 -0700 + + Added debug messages to viaIGA2ModeValid + + This function is located inside via_display.c. + + Signed-off-by: Kevin Brace + +commit df1de1a8ddb243a8d58f94c9d9915bad1366c27b +Author: Kevin Brace +Date: Sun Apr 24 12:13:24 2016 -0700 + + Changing ViaSecondCRTCModeValid to viaIGA2ModeValid + + This function is located inside via_display.c. + + Signed-off-by: Kevin Brace + +commit c7f8743ee99bd275d14abcf3339b8bd05008734a +Author: Kevin Brace +Date: Sun Apr 24 12:05:42 2016 -0700 + + Fixing horizontal and vertical retrace end registers for IGA2 + + It was likely that horizontal and vertical retrace end registers were + never set correctly when the screen mode was set for IGA2. + + Signed-off-by: Kevin Brace + +commit 123a76e4868991f5b38573994ce1929c3484f268 +Author: Kevin Brace +Date: Sun Apr 24 00:15:18 2016 -0700 + + Version bumped to 0.4.132 + + Signed-off-by: Kevin Brace + +commit 7e5512c74af2f217b05e717951973976194fa424 +Author: Kevin Brace +Date: Sun Apr 24 00:12:50 2016 -0700 + + Setting Horizontal Retrace Start Bits[11] correctly + + It appears that the previous developers made a mistake when trying to + detect the current chipset, and as a result, 3X5.5D[7]: Horizontal + Retrace Start Bits[11], was not being set correctly. This same mistake + exists elsewhere in the code, and they will be fixed fairly soon. + + Signed-off-by: Kevin Brace + +commit 6c91b014288cbb41265161f5e0fe8365a5f93ba4 +Author: Kevin Brace +Date: Sat Apr 23 23:10:38 2016 -0700 + + Version bumped to 0.4.131 + + Signed-off-by: Kevin Brace + +commit 988770f88d5d8ffa330c6ad2d0730b0f49717eba +Author: Kevin Brace +Date: Sat Apr 23 23:05:57 2016 -0700 + + Code cleanup of viaIGA2SetDisplayRegister. + + This function is located inside via_display.c. + + Signed-off-by: Kevin Brace + +commit 46fa8e812f13e6cb00f1ec5eee936e089cd9886c +Author: Kevin Brace +Date: Wed Apr 20 23:21:58 2016 -0700 + + Version bumped to 0.4.130 + + Between Version 0.4.127 and 0.4.130, improvements were made to fix a + bug where the LVDS FP (Flat Panel) screen will be lost when the + computer resumes from ACPI S3 State. The fix is still not perfect, and + mouse cursor might disappear after resuming, but this situation does not + seem to occur if a VGA monitor is used simultaneously with an LVDS FP. + + Signed-off-by: Kevin Brace + +commit 7ab39bcfa5f6c9cd99ea7b3ca734efff4c0264fe +Author: Kevin Brace +Date: Wed Apr 20 23:18:12 2016 -0700 + + Setting LCD panel adjustment register for P4M900 / VN896 / CN896 + + 3X5.99[3:0] appears to be a register to adjust an LCD panel + (the official name of the register is unknown). For P4M900 + and related chipsets (i.e., P4M900, VN896, and CN896), 0b1000 (8) + will be set. Without setting this register correctly, when the + computer resumes from ACPI S3 State, the LCD will become discolored. + + Signed-off-by: Kevin Brace + +commit ea604b9e656ad32e4537de6a5ac1b2038916e213 +Author: Kevin Brace +Date: Wed Apr 20 19:20:35 2016 -0700 + + Hexadecimal case change within viaIGA2SetDisplayRegister + + Signed-off-by: Kevin Brace + +commit f19a9ff965039ac0f90c07db3544420d30017b39 +Author: Kevin Brace +Date: Wed Apr 20 18:46:52 2016 -0700 + + Code comment improvement within viaIGA2SetDisplayRegister + + Signed-off-by: Kevin Brace + +commit e00e8524785a1306b0a2e3f6f778c5387824652f +Author: Kevin Brace +Date: Wed Apr 20 02:33:31 2016 -0700 + + Always use IGA2 for DVP1 Data Source Selection 0 + + This is part of an attempt to fix the bug where the LVDS FP + (Flat Panel) screen gets lost after an ACPI S3 State (i.e., Suspend + to RAM or STR) resume. + + Signed-off-by: Kevin Brace + +commit 23c54676e34febe58f088f92637e842fd3fe68d7 +Author: Kevin Brace +Date: Tue Apr 19 22:36:12 2016 -0700 + + Removing ViaLVDSDFPPower + + Due to a poor assumption made by previous developers, this function + turns off LVDS Channel 1 and 2 I/O pads when a laptop with an LVDS FP + (Flat Panel) resumes from ACPI S3 State. Because this function leads + to a loss of the use of an LVDS FP, it is now discontinued. The + equivalent functionality is now implemented within + viaIGA2SetDisplayRegister function inside via_display.c. The I/O pad + on / off state will now be governed by PMS (Power Management Status). + + Signed-off-by: Kevin Brace + +commit f45c5765bac55d69fa9637cea67844e6f95ff25f +Author: Kevin Brace +Date: Tue Apr 19 22:07:19 2016 -0700 + + Version bumped to 0.4.129 + + Signed-off-by: Kevin Brace + +commit 36c0165362d5d27a8f93bc9fcea6cc7b55dc6ef1 +Author: Kevin Brace +Date: Tue Apr 19 22:03:46 2016 -0700 + + Removing ViaGetVesaMode + + VBE is no longer supported, hence, dead code should be removed. + This function was located inside via_lvds.c. + + Signed-off-by: Kevin Brace + +commit 20dbefb930e0ee16bf61a8750690c2392ec49697 +Author: Kevin Brace +Date: Mon Apr 18 14:09:30 2016 -0700 + + Version bumped to 0.4.128 + + Signed-off-by: Kevin Brace + +commit bd3465e9f70b2b365558a1c92f3088945a6b6c32 +Author: Kevin Brace +Date: Mon Apr 18 14:07:23 2016 -0700 + + Specifying linear address mode for IGA2 + + The previous developers were not specifying the address mode for + IGA2 when display mode was being set. The device driver should not + rely on external code to specify the address mode since not setting + the address mode correctly will lead to a garbled display. + + Signed-off-by: Kevin Brace + +commit 9e7865547697fe9cc22f401a292c63440af4ced5 +Author: Kevin Brace +Date: Mon Apr 18 13:15:14 2016 -0700 + + Version bumped to 0.4.127 + + Signed-off-by: Kevin Brace + +commit c3e27b02425cc3617c3ac7cb270fffbcb70a0b3a +Author: Kevin Brace +Date: Mon Apr 18 13:00:13 2016 -0700 + + Specifying linear address mode for IGA1 + + The previous developers were not specifying the address mode for + IGA1 when display mode was being set. The device driver should not + rely on external code to specify the address mode since not setting + the address mode correctly will lead to a garbled display. + + Signed-off-by: Kevin Brace + +commit cb10ac0d0498d7df5e0f5e5e4e99fe9b4d09af07 +Author: Kevin Brace +Date: Sun Apr 17 23:52:47 2016 -0700 + + Version bumped to 0.4.126 + + Signed-off-by: Kevin Brace + +commit f7646d27b18717f2d49407b91aea383e27213ffd +Author: Kevin Brace +Date: Sun Apr 17 23:42:21 2016 -0700 + + Code cleanup of via_analog_mode_set + + This function is located inside via_outputs.c. + + Signed-off-by: Kevin Brace + +commit 0f769f0c7922c0478e831f45eb18f6dd39a379c7 +Author: Kevin Brace +Date: Sun Apr 17 23:34:40 2016 -0700 + + Version bumped to 0.4.125 + + Signed-off-by: Kevin Brace + +commit a48902a1e3bc727bd189d159ba77684772b844ab +Author: Kevin Brace +Date: Sun Apr 17 23:32:43 2016 -0700 + + Expanding extended screen support + + All UniChrome Pro and Chrome9 IGPs will now support a very large + extended screen size + + Signed-off-by: Kevin Brace + +commit 468657c70bebbee7d204e675c64971de278c4a6f +Author: Kevin Brace +Date: Sun Apr 17 21:16:13 2016 -0700 + + Version bumped to 0.4.124 + + Signed-off-by: Kevin Brace + +commit 24fb14d9584ee5288a8ce6ef2fd945f7cc65f079 +Author: Kevin Brace +Date: Sun Apr 17 21:14:25 2016 -0700 + + Removing unnecessary enabling of extended VGA register access + + The change was made to viaIGA1SetMode function inside via_display.c. + + Signed-off-by: Kevin Brace + +commit 4d32b888bd3d2b9ba39f3f70cae4b224b4bb1b68 +Author: Kevin Brace +Date: Sun Apr 17 20:20:31 2016 -0700 + + Version bumped to 0.4.123 + + Signed-off-by: Kevin Brace + +commit d47a3a56eae5bba59ae00014f93eb2c239c99660 +Author: Kevin Brace +Date: Sun Apr 17 20:10:12 2016 -0700 + + Changing ViaSetPrimaryFIFO calling order + + ViaSetPrimaryFIFO should be called right after the call to + viaIGA1SetDisplayRegister within viaIGA1SetMode function. + All these functions are located inside via_display.c. + + Signed-off-by: Kevin Brace + +commit 45d550cfe7e5013c8491a9d5624874742815b3fc +Author: Kevin Brace +Date: Sun Apr 17 20:02:33 2016 -0700 + + Version bumped to 0.4.122 + + Signed-off-by: Kevin Brace + +commit 928611b4c6480c1d56705308eaed65dd0fbd95ec +Author: Kevin Brace +Date: Sun Apr 17 19:54:27 2016 -0700 + + Discontinuing ViaSecondCRTCHorizontalQWCount + + The code within this function was transferred to viaIGA2SetDisplayRegister + function inside via_display.c. + + Signed-off-by: Kevin Brace + +commit 774b37de3dc3ce4c258e2dab99fa39dbeaed3010 +Author: Kevin Brace +Date: Sun Apr 17 19:29:48 2016 -0700 + + Version bumped to 0.4.121 + + Signed-off-by: Kevin Brace + +commit 45487a3a9dfccc1424c478b5f2bac5f03d55fa0e +Author: Kevin Brace +Date: Sun Apr 17 19:23:45 2016 -0700 + + Removing unnecessary double calling of ViaSecondCRTCHorizontalQWCount + + ViaSecondCRTCHorizontalQWCount was being called twice, and this probably + is unnecessary. This function is inside via_display.c. + + Signed-off-by: Kevin Brace + +commit 28b53943be81c4fe5c8600fb4873f92f411d283c +Author: Kevin Brace +Date: Sun Apr 17 19:11:49 2016 -0700 + + Version bumped to 0.4.120 + + Signed-off-by: Kevin Brace + +commit 9fdf7dc22a00d393688a458284df00ff09ce1e89 +Author: Kevin Brace +Date: Sun Apr 17 19:07:47 2016 -0700 + + Discontinuing ViaSecondCRTCHorizontalOffset + + The code within this function was transferred to viaIGA2SetDisplayRegister + function inside via_display.c. + + Signed-off-by: Kevin Brace + +commit 98a2b24282cef04126e6dd6af552fbc8fc94b717 +Author: Kevin Brace +Date: Sun Apr 17 18:24:51 2016 -0700 + + Version bumped to 0.4.119 + + Signed-off-by: Kevin Brace + +commit 980519db4d42552bb6bd2c731f12030fc3121092 +Author: Kevin Brace +Date: Sun Apr 17 18:23:29 2016 -0700 + + Changing UMSAccelInit to umsAccelInit + + This function is located inside via_ums.c. + + Signed-off-by: Kevin Brace + +commit 978825ee16c633e523b3642294e018aee5d77953 +Author: Kevin Brace +Date: Sun Apr 17 18:18:53 2016 -0700 + + Changing ums_create to umsCreate + + This function is located inside via_ums.c. + + Signed-off-by: Kevin Brace + +commit d8bf6fdf169a80e6df466547fe92313916dc1b75 +Author: Kevin Brace +Date: Sun Apr 17 18:13:16 2016 -0700 + + Changing UMSPreInit to umsPreInit + + This function is located inside via_ums.c. + + Signed-off-by: Kevin Brace + +commit e5a06623cb7e56dfb72628f7646399671834deaf +Author: Kevin Brace +Date: Sun Apr 17 18:04:30 2016 -0700 + + Rearranging function prototypes for via_ums.c + + The prototype declarations are located inside via_ums.h. + + Signed-off-by: Kevin Brace + +commit d2976872e7bf99e008e75499b7075dc4224b87d0 +Author: Kevin Brace +Date: Sun Apr 17 12:19:08 2016 -0700 + + Moving via_display.c related prototypes around + + The prototype declarations are located inside via_ums.h. + + Signed-off-by: Kevin Brace + +commit ee2d5d520a503cf3800688084d9904073329f7c1 +Author: Kevin Brace +Date: Sun Apr 17 12:08:22 2016 -0700 + + Moving umsCrtcInit prototype + + The prototype declaration is located inside via_ums.h. + + Signed-off-by: Kevin Brace + +commit 15f5dfe78ba0f5fb399bf2cf990af6b758321e3d +Author: Kevin Brace +Date: Sun Apr 17 11:49:36 2016 -0700 + + Changing UMSCrtcInit to umsCrtcInit + + This function is located inside via_ums.c. + + Signed-off-by: Kevin Brace + +commit 8bbd02b0962a26809b567ec84dd5236ac05edba7 +Author: Kevin Brace +Date: Sun Apr 17 01:48:00 2016 -0700 + + Version bumped to 0.4.118 + + Signed-off-by: Kevin Brace + +commit 27b71e6e6546f52b4134a0574688dfe675249a62 +Author: Kevin Brace +Date: Sun Apr 17 01:40:46 2016 -0700 + + Added debug messages to viaIGA2SetFBStartingAddress + + This function is located inside via_display.c. + + Signed-off-by: Kevin Brace + +commit 556c2e051291884c6583974912f2d4a038c44daf +Author: Kevin Brace +Date: Sat Apr 16 22:45:48 2016 -0700 + + Debug messages quality improvement within viaIGA1SetFBStartingAddress + + Improved the quality of debug messages within viaIGA1SetFBStartingAddress + function inside via_display.c. + + Signed-off-by: Kevin Brace + +commit 40142bac588590f5c6b2e5da0f77929793289292 +Author: Kevin Brace +Date: Fri Apr 15 20:55:03 2016 -0700 + + Changing ViaSecondCRTCSetStartingAddress to viaIGA2SetFBStartingAddress + + This function is located inside via_display.c. + + Signed-off-by: Kevin Brace + +commit 5e00866f8423fd2bfe3fb06fc115a633d542d3ed +Author: Kevin Brace +Date: Fri Apr 15 20:49:49 2016 -0700 + + Changing ViaFirstCRTCSetStartingAddress to viaIGA1SetFBStartingAddress + + This function is located inside via_display.c. + + Signed-off-by: Kevin Brace + +commit 2415e245995c538f1dde3507f404d74d4343b7ff +Author: Kevin Brace +Date: Fri Apr 15 20:11:20 2016 -0700 + + Changing ViaModeSecondCRTC to viaIGA2SetMode + + This function is located inside via_display.c. + + Signed-off-by: Kevin Brace + +commit 24e9828c04832723853302ffa44dd7b75e7a2ca2 +Author: Kevin Brace +Date: Fri Apr 15 19:47:17 2016 -0700 + + Changing ViaModeFirstCRTC to viaIGA1SetMode + + This function is located inside via_display.c. + + Signed-off-by: Kevin Brace + +commit 6e35428886f6ac73548865f1b635a0812e032b28 +Author: Kevin Brace +Date: Fri Apr 15 15:12:30 2016 -0700 + + Version bumped to 0.4.117 + + Signed-off-by: Kevin Brace + +commit 57bb84132fa504158e665c913c4284e8ea9af883 +Author: Kevin Brace +Date: Fri Apr 15 15:06:10 2016 -0700 + + Moving ViaModeSecondCRTC location + + This function is located inside via_display.c. + + Signed-off-by: Kevin Brace + +commit 150bd63ca3b0bce2b83f8b449c01f43ead386941 +Author: Kevin Brace +Date: Fri Apr 15 15:00:11 2016 -0700 + + Changing ViaSecondCRTCSetMode to viaIGA2SetDisplayRegister + + This function is located inside via_display.c. + + Signed-off-by: Kevin Brace + +commit 627b150a5ea02247bba3541a2fcc75691158d0b0 +Author: Kevin Brace +Date: Fri Apr 15 14:33:23 2016 -0700 + + Moving ViaModeFirstCRTC location + + This function is located inside via_display.c. + + Signed-off-by: Kevin Brace + +commit da310b4f330ce0a7b5ad197c2690a8499772c138 +Author: Kevin Brace +Date: Fri Apr 15 14:25:55 2016 -0700 + + Changing ViaFirstCRTCSetMode to viaIGA1SetDisplayRegister + + This function is located inside via_display.c. + + Signed-off-by: Kevin Brace + +commit 154219095daaeaf58dc9dedcabeacc1236e896b9 +Author: Kevin Brace +Date: Fri Apr 15 02:31:17 2016 -0700 + + Version bumped to 0.4.116 + + Signed-off-by: Kevin Brace + +commit 8ca5c7f7dda7c21ee7be32041bcad30ec9160d14 +Author: Kevin Brace +Date: Fri Apr 15 02:09:38 2016 -0700 + + Changed one of the input parameter name for ViaLCDPower + + This function is located inside via_lvds.c. + + Signed-off-by: Kevin Brace + +commit f5679f1d58153e402005372e60ed543bb25df374 +Author: Kevin Brace +Date: Fri Apr 15 01:58:33 2016 -0700 + + Changed one of the input parameter name for ViaLVDSPower + + This function is located inside via_lvds.c. + + Signed-off-by: Kevin Brace + +commit e311f712e619f1098dddfbc854bf4fabd3b16937 +Author: Kevin Brace +Date: Fri Apr 15 00:17:47 2016 -0700 + + Debug messages quality improvement within ViaLCDPower + + Improved the quality of debug messages within ViaLCDPower function + inside via_lvds.c. + + Signed-off-by: Kevin Brace + +commit ca835d7f3dce3e120aa34e3d3bafc2fca0a38e28 +Author: Kevin Brace +Date: Thu Apr 14 22:29:25 2016 -0700 + + Debug messages quality improvement within ViaLVDSPower + + Improved the quality of debug messages within ViaLVDSPower function + inside via_lvds.c. + + Signed-off-by: Kevin Brace + +commit 72df9321baf4ea680525dd91877d45fb4d0fe944 +Author: Kevin Brace +Date: Thu Apr 14 18:03:50 2016 -0700 + + Version bumped to 0.4.115 + + Signed-off-by: Kevin Brace + +commit c1084103a539069a7ea7e94610fe72724c86b9d3 +Author: Kevin Brace +Date: Thu Apr 14 18:02:12 2016 -0700 + + Moving ViaModeSecondCRTC from via_outputs.c to via_display.c + + This function really belongs inside via_display.c. + + Signed-off-by: Kevin Brace + +commit f00732b87730bb7a4d227c2d4deb0e2bed53d5d6 +Author: Kevin Brace +Date: Thu Apr 14 17:47:34 2016 -0700 + + Version bumped to 0.4.114 + + Signed-off-by: Kevin Brace + +commit 609d5cf6d8c2ff06cee0b562f361cc9a858d652d +Author: Kevin Brace +Date: Thu Apr 14 17:44:56 2016 -0700 + + Moving ViaModeFirstCRTC from via_outputs.c to via_display.c + + This function really belongs inside via_display.c. + + Signed-off-by: Kevin Brace + +commit 1ad1309f88fb5054f7a15a10edef02c6f2ba2826 +Author: Kevin Brace +Date: Thu Apr 14 17:04:43 2016 -0700 + + Version bumped to 0.4.113 + + Signed-off-by: Kevin Brace + +commit 7ad40db50129326b96c885ec3157441db011ee70 +Author: Kevin Brace +Date: Thu Apr 14 16:58:47 2016 -0700 + + Dropping an extern keyword from a declaration + + Attaching an extern keyword when declaring iga1_crtc_funcs and + iga2_crtc_funcs was giving out a warning during compilation. The + declarations are located inside via_display.c. + + Signed-off-by: Kevin Brace + +commit acde4a28a155eb98ea55651e744134050de2ad04 +Author: Kevin Brace +Date: Thu Apr 14 16:54:56 2016 -0700 + + Version bumped to 0.4.112 + + Signed-off-by: Kevin Brace + +commit b66f731e3976d3f66dcaeb17a430f3cc84e8bd64 +Author: Kevin Brace +Date: Thu Apr 14 16:50:06 2016 -0700 + + Making ViaSetPrimaryDotclock available from other modules + + This function is located inside via_outputs.c. + + Signed-off-by: Kevin Brace + +commit cf9a6a81fe398068699cbec966c722689504bd06 +Author: Kevin Brace +Date: Thu Apr 14 14:21:33 2016 -0700 + + Version bumped to 0.4.111 + + Signed-off-by: Kevin Brace + +commit 15b1ec777ddc8d22f558b454a0356fb7068af18f +Author: Kevin Brace +Date: Thu Apr 14 14:17:37 2016 -0700 + + Turning off IGA1 before changing the controller parameters + + Signed-off-by: Kevin Brace + +commit 5e02cafee84e077bba6587fada420368b82eca0d +Author: Kevin Brace +Date: Thu Apr 14 02:53:09 2016 -0700 + + Version bumped to 0.4.110 + + Signed-off-by: Kevin Brace + +commit 49e419d6181f7dc662a10638970b3b1d8a89f65d +Author: Kevin Brace +Date: Thu Apr 14 01:34:44 2016 -0700 + + Getting rid of legacy mode setting declarations + + Signed-off-by: Kevin Brace + +commit 3884e096e1d690536e9dd46a876a7f4b1248813f +Author: Kevin Brace +Date: Thu Apr 14 01:23:39 2016 -0700 + + Getting rid of ViaCheckCardId function declaration + + Leftover from the previous version. + + Signed-off-by: Kevin Brace + +commit 83b46597869cae2c163ae52a2999791c5ba1a7e2 +Author: Kevin Brace +Date: Thu Apr 14 01:16:58 2016 -0700 + + Getting rid of ViaCardIdStruct structure + + It was part of that "known device table" from the past version. + + Signed-off-by: Kevin Brace + +commit 2fbf3cc4f2cb60c26e8faaa7f65c0801db047efe +Author: Kevin Brace +Date: Wed Apr 13 21:46:20 2016 -0700 + + Version bumped to 0.4.109 + + The previous commit was a high risk one, so the version should be + bumped up just in case it goes wrong. + + Signed-off-by: Kevin Brace + +commit 30f15813491a4e6fc9bbae6e49e66340c1eecc3c +Author: Kevin Brace +Date: Wed Apr 13 21:42:51 2016 -0700 + + Moving UMSCrtcInit from via_display.c to via_ums.c + + When learning about the structure of the code, it made no sense that + a function named UMSCrtcInit is located inside via_display.c and not + via_ums.c. It is a risky thing to do, but the code appears to be + working fine. + + Signed-off-by: Kevin Brace + +commit 24a7b6e1994cd42a5f60df2d13c5fe2269746859 +Author: Kevin Brace +Date: Wed Apr 13 21:06:55 2016 -0700 + + Version bumped to 0.4.108 + + Signed-off-by: Kevin Brace + +commit cb33c33ea12af82193a1cb84eb82730f5ef00496 +Author: Kevin Brace +Date: Wed Apr 13 16:04:23 2016 -0700 + + Added debug messages to iga2_crtc_mode_set + + This function is located inside via_display.c. + + Signed-off-by: Kevin Brace + +commit 9ff51d02d0e95fea9fbae1c59a636ebee25fc82e +Author: Kevin Brace +Date: Wed Apr 13 14:30:29 2016 -0700 + + Added debug messages to iga1_crtc_mode_set + + This function is located inside via_display.c. + + Signed-off-by: Kevin Brace + +commit 104bf4aca901fec03f03a1bb7f20a0e70e2fb29e +Author: Kevin Brace +Date: Tue Apr 12 13:07:07 2016 -0700 + + Version bumped to 0.4.107 + + Signed-off-by: Kevin Brace + +commit 3eef391ccb73104b89898b148b77b78b5418cb27 +Author: Kevin Brace +Date: Tue Apr 12 13:05:36 2016 -0700 + + Removing possibly unnecessary display channel selection + + The was made within viaTMDSPower function inside via_outputs.c. + + Signed-off-by: Kevin Brace + +commit 654812ab3f3e75c3af1526b0f7ad5bb72e2cfe58 +Author: Kevin Brace +Date: Tue Apr 12 12:48:10 2016 -0700 + + Version bumped to 0.4.106 + + Signed-off-by: Kevin Brace + +commit c4cc08f85d1599f9206e65f2e44477b5a12ac82a +Author: Kevin Brace +Date: Tue Apr 12 12:33:48 2016 -0700 + + Changing ViaDFPPower to viaTMDSPower + + This function is located inside via_outputs.c. + + Signed-off-by: Kevin Brace + +commit 4d36e6736cd36b75a5fa746981af3cd9f4fc1833 +Author: Kevin Brace +Date: Tue Apr 12 12:24:39 2016 -0700 + + Debug messages quality improvement within ViaDFPPower + + Improved the quality of debug messages within ViaDFPPower function + inside via_outputs.c. + + Signed-off-by: Kevin Brace + +commit 86da96c7fc78d54821d8465d3098c88a655c9084 +Author: Kevin Brace +Date: Tue Apr 12 11:57:23 2016 -0700 + + Added debug messages to UMSAccelInit + + This function is located inside via_ums.c. + + Signed-off-by: Kevin Brace + +commit 411a3f9ccaf1859d8d495f4dcd92ff85274077f7 +Author: Kevin Brace +Date: Tue Apr 12 10:44:58 2016 -0700 + + Version bumped to 0.4.105 + + Signed-off-by: Kevin Brace + +commit 229b246d300782ef970b10e1501071c6b77a0cc2 +Author: Kevin Brace +Date: Tue Apr 12 10:40:46 2016 -0700 + + Rearranging VIA Technologies IGP by generation + + Changes were made inside via_regs.h. + + Signed-off-by: Kevin Brace + +commit 4bd4486873fc088d7cb62afeb55a0eb605b093fb +Author: Kevin Brace +Date: Tue Apr 12 10:21:29 2016 -0700 + + Version bumped to 0.4.104 + + Signed-off-by: Kevin Brace + +commit b1985c879d2d92fe80de8fb3198574474b22ed96 +Author: Kevin Brace +Date: Tue Apr 12 10:18:22 2016 -0700 + + Changing VIAPreInit to viaPreInit + + This way of defining the function name is suggested by X.org X server + coding style as of 2013. It is part of the code cleanup work being + conducted to make the code more maintainable. This function is + located inside via_driver.c. + + Signed-off-by: Kevin Brace + +commit bfe0a1da5c934f90e2d129e7fd69270f970be844 +Author: Kevin Brace +Date: Tue Apr 12 10:16:55 2016 -0700 + + Removed a log message from VIAPreInit + + This function is located inside via_driver.c. + + Signed-off-by: Kevin Brace + +commit 7f11ef41823a62fa24b59eca62f4647838bbbe81 +Author: Kevin Brace +Date: Tue Apr 12 10:15:33 2016 -0700 + + Version bumped to 0.4.103 + + Signed-off-by: Kevin Brace + +commit 25675f816326056eb9cd617f09d8dad23f1ae94a +Author: Kevin Brace +Date: Tue Apr 12 10:13:23 2016 -0700 + + Removal of AccelMethod option + + Since EXA is the only X Server acceleration architecture supported + anyway, there is no need for this option anymore. Therefore, this + option for use inside xorg.conf is discontinued. + + Signed-off-by: Kevin Brace + +commit 0c8063c8d4cc080f5c177ae1993ff5f615f0b8eb +Author: Kevin Brace +Date: Tue Apr 12 10:11:20 2016 -0700 + + Removal of ForcePanel variable + + When ForcePanel option was discontinued, the variable in a structure + that stored the state of this option was not removed. It is now gone. + + Signed-off-by: Kevin Brace + +commit 8677096bee772ebef42a536c614163b75a5c302a +Author: Kevin Brace +Date: Tue Apr 12 10:06:07 2016 -0700 + + Removal of BusWidth option + + After analyzing the code, it appears that BusWidth option + was not utilized at all. Therefore, this option for use in + xorg.conf is discontinued. + + Signed-off-by: Kevin Brace + +commit f160074511e8a2b51b72abc962b097fe94f8b71b +Author: Kevin Brace +Date: Sun Apr 10 00:03:38 2016 -0700 + + Version reverted back to 0.4.102 + + Version 0.5.0 RC1 (Release Candidate 1) is canceled due to a bug where + the IGA1 screen freezes when IGA2 is turned off and screen resolution + of IGA1 is changed from the OS. This bug was discovered during testing + after the release of Version 0.5.0 RC1. There needs to be a bug fix, + hence, this version is no longer appropriate to be an RC (i.e., Patch + Level >= 900). The last Patch Level prior to 900 was 101, so 102 is now + the new Patch Level. + + Signed-off-by: Kevin Brace + +commit 9e8c7d366b211e08080f66c6cbe4cd49751eab7b +Author: Kevin Brace +Date: Sat Apr 9 01:10:03 2016 -0700 + + Version bumped to 0.4.900 + + This version is Version 0.5.0 RC1 (Release Candidate 1). There is an + improvement in screen resolution change stability and initial support + for an extended screen (up / down and left / right). This will make VIA + Technologies Chrome IGP based computers more useful as a tool. Enjoy!!! + + Signed-off-by: Kevin Brace + +commit c6fd0017eeafc796124437e7bfc9906433b3f28a +Author: Kevin Brace +Date: Sat Apr 9 00:22:51 2016 -0700 + + Fix for screen resolution change crash and extended screen support + + Not checking the validity of an old screen pointer before freeing the + allocated memory was leading to a crash of X.org X Server in most + cases when the screen resolution was changed. With this fix, extended + screen using 2 monitors appears to be working in some cases. This is + a major bug fix. + + Signed-off-by: Kevin Brace + +commit dc8f9b17614a377b6ab565031d05d72027a1e17f +Author: Kevin Brace +Date: Fri Apr 8 21:36:31 2016 -0700 + + Code clean up of viaDisableVQ + + This function is located inside via_ums.c. + + Signed-off-by: Kevin Brace + +commit e54ef01b3b59eb780e20c374e5a2bf6cdc359846 +Author: Kevin Brace +Date: Fri Apr 8 15:03:22 2016 -0700 + + Version bumped to 0.4.101 + + Signed-off-by: Kevin Brace + +commit 82caf6bf6180ebf85c68b08b2f298142c77504f1 +Author: Kevin Brace +Date: Fri Apr 8 14:55:47 2016 -0700 + + Removing unnecessary double calling of vgaHWSetMmioFuncs + + vgaHWSetMmioFuncs was being called twice within VIAMapMMIO function + inside via_ums.c. This probably is unnecessary. + + Signed-off-by: Kevin Brace + +commit 79437a2929091ea3be522934e5eeb7d6757a3dd5 +Author: Kevin Brace +Date: Fri Apr 8 14:29:47 2016 -0700 + + Version bumped to 0.4.100 + + Signed-off-by: Kevin Brace + +commit bcedcdd2a0717ced1a7cb89d66f262245ab5340f +Author: Kevin Brace +Date: Fri Apr 8 14:27:12 2016 -0700 + + Diagnostic message tweak of VIAMapMMIO + + This function is located inside via_ums.c. + + Signed-off-by: Kevin Brace + +commit 8f0ab029a10fa0c6e20a98b9974716ba18a7b2d9 +Author: Kevin Brace +Date: Fri Apr 8 14:17:52 2016 -0700 + + Code clean up of VIAMapFB + + This function is located inside via_ums.c. + + Signed-off-by: Kevin Brace + +commit c8e01b53e5db785e746e787241616a256a924c91 +Author: Kevin Brace +Date: Fri Apr 8 00:19:44 2016 -0700 + + Final clean up of VIAMapMMIO + + This function is located inside via_ums.c. + + Signed-off-by: Kevin Brace + +commit ed52913a3f5785163fd7baf5df8f88e3da004742 +Author: Kevin Brace +Date: Wed Apr 6 22:31:52 2016 -0700 + + Version bumped to 0.4.99 + + Just trying to follow the X.org version number scheme. + + Signed-off-by: Kevin Brace + +commit f458b864dd0605cc3b191bab2209774de39540c0 +Author: Kevin Brace +Date: Wed Apr 6 19:09:43 2016 -0700 + + Removing dead code from VIAMapMMIO + + Since there already are prior error checks that will catch either pointer + being null (i.e., failed to register the memory address with X Server), this + if statement will never be satisfied. Hence, this if statement block is + removed. + + Signed-off-by: Kevin Brace + +commit 99c94b237d2ec51a7ce477580c0d7459e1c2ed06 +Author: Kevin Brace +Date: Wed Apr 6 19:05:43 2016 -0700 + + Incrementing the copyright year inside via_ums.c + + Signed-off-by: Kevin Brace + +commit 5b8f7fc4cf6a3b7ea35468bda8b3501510e96fd1 +Author: Kevin Brace +Date: Wed Apr 6 19:03:55 2016 -0700 + + Major clean up of debug messages within VIAMapMMIO + + This function is located inside via_ums.c. + + Signed-off-by: Kevin Brace + +commit 834b7bc8e6bd02ec2b84f3c0b109df3c215495f3 +Author: Kevin Brace +Date: Wed Apr 6 17:50:10 2016 -0700 + + Rearranging the position of VIAMapMMIO and VIAUnmapMMIO + + These functions are located inside via_ums.c. + + Signed-off-by: Kevin Brace + +commit 8c2973299dc29406b7f56c2483e7d58e8e86aa3c +Author: Kevin Brace +Date: Wed Apr 6 17:37:05 2016 -0700 + + Rearranging the position of ViaMMIOEnable and ViaMMIODisable + + These functions are located inside via_ums.c. + + Signed-off-by: Kevin Brace + +commit 3ae6dcf8f6033dbee1f1b5b8da2b6e8e675d927c +Author: Kevin Brace +Date: Wed Apr 6 17:11:05 2016 -0700 + + Added debug messages to ViaMMIOEnable and ViaMMIODisable + + These functions are located inside via_ums.c. + + Signed-off-by: Kevin Brace + +commit 52730d1da4019969fb4cbd13152ffd06b1ee75e2 +Author: Kevin Brace +Date: Thu Mar 31 00:04:17 2016 -0700 + + Release of Version 0.4.0 + + After months of hard work, a major new release of OpenChrome. + + Signed-off-by: Kevin Brace + +commit 0748029d3a562283de7aa6120f434a1e80631e05 +Author: Kevin Brace +Date: Wed Mar 30 23:03:33 2016 -0700 + + Disabling the initialization of VT1632A TMDS Transmitter + + Unfortunately, VIA Technologies VT1632A TMDS transmitter is not + functioning, so it is disabled for now. + + Signed-off-by: Kevin Brace + +commit b77de4f3c9e43187aff9c1817b24c8a5fba2f883 +Author: Kevin Brace +Date: Wed Mar 30 22:54:25 2016 -0700 + + Modified debug messages within via_lvds_get_modes + + Modified debug messages within via_lvds_get_modes function inside via_lvds.c. + + Signed-off-by: Kevin Brace + +commit 1203f328f62304e0531ffa88cddeaef03911b998 +Author: Kevin Brace +Date: Tue Mar 29 23:22:03 2016 -0700 + + Removal of ActiveDevice option + + Many display devices can now be detected automatically, there is + no need for this option anymore. + + Signed-off-by: Kevin Brace + +commit 3efd244480f5d05a01432a94e5c754f1f83247bc +Author: Kevin Brace +Date: Tue Mar 29 23:00:17 2016 -0700 + + Renaming variables within via_lvds_get_modes + + Renamed several variable names within via_lvds_get_modes function + inside via_lvds.c. + + Signed-off-by: Kevin Brace + +commit d73b7a639ab0bbaf42dadc1dc48e5c1b66a47339 +Author: Kevin Brace +Date: Tue Mar 29 22:08:05 2016 -0700 + + Removal of PanelSize option + + Since a non-I2C bus flat panel can now be detected automatically, + PanelSize option for use in xorg.conf is discontinued. + + Signed-off-by: Kevin Brace + +commit 730ea106f21afe48e636d37125ff5afb7225a938 +Author: Benno Schulenberg +Date: Tue Mar 29 05:32:29 2016 -0700 + + Complete the recent renaming of VIAUnmapMem to VIAUnmapMMIO + + Also delete the prototype for the non-existent function VIAMapMem. + + Signed-off-by: Benno Schulenberg + Acked-by: Kevin Brace + +commit 76806159d50d40f17f3d3d8177df47c19a1cb692 +Author: Kevin Brace +Date: Tue Mar 29 05:19:30 2016 -0700 + + Fixed a minor debug message imperfection within via_vt1632_probe + + via_vt1632_probe function is located inside via_vt1632.c. + + Signed-off-by: Kevin Brace + +commit aba5302d9017e3ed993909cafdd1ff5b7b39779d +Author: Kevin Brace +Date: Tue Mar 29 05:03:28 2016 -0700 + + Checking the availability of a flat panel before starting the detection + + One method VIA Technologies appears to be using in order to let the + device driver know the availability a flat panel is through CRT + Controller Extended Register - Scratch Pad Register 2 (3X5.3B). While + this method is less than perfect, it appears to be the only method + available that can support all IGPs. Use of this "hint" is necessary + for correctly detecting flat panels that lack I2C bus support. + + Signed-off-by: Kevin Brace + +commit a60b53eb99a3c78ff10ba0a6ea8c5eb439b2879d +Author: Kevin Brace +Date: Tue Mar 29 04:01:18 2016 -0700 + + Modified debug messages within via_lvds_detect + + Modified debug messages within via_lvds_detect function inside via_lvds.c. + + Signed-off-by: Kevin Brace + +commit 6375a34fa3c8e413aafb6f161a19195571da1434 +Author: Kevin Brace +Date: Tue Mar 29 03:26:40 2016 -0700 + + Removal of backdoor flat panel screen resolution detection algorithm + + For those models that do not have their flat panel connected to an + I2C bus, flat panel detection code was referencing their CRTC + horizontal and vertical active data period (screen resolution) + registers to "guess" what their flat panel native screen resolution + is. While this poorly conceived algorithm works fine with certain + models, it causes problems with many other models. Thus, the use of + this detection algorithm is discontinued. + + Signed-off-by: Kevin Brace + +commit d6a65df0e31657495fbdd488c06780b8b33fdccc +Author: Kevin Brace +Date: Fri Mar 18 06:11:00 2016 -0700 + + Removal of VESA BIOS Extension (VBE) support + + VBE support should have been discontinued long time ago, but + remained in the code for some reason. It adds nothing but + unnecessary code maintenance burden on the developers. The support + for VBE is now discontinued. + + Signed-off-by: Kevin Brace + +commit b48fb4176c96b04f5de8b2ee20f55af404ba0db7 +Author: Kevin Brace +Date: Fri Mar 18 05:11:56 2016 -0700 + + Removal of legacy user mode setting + + OpenChrome has had multiple ways to configure the display mode. This + added unnecessary code maintenance burden on the developers. Hence, + the legacy user mode setting is now discontinued. + + Signed-off-by: Kevin Brace + +commit d951436e76ee9ec0ea96091c42ca379ec5ba2f29 +Author: Kevin Brace +Date: Wed Mar 16 17:20:12 2016 -0700 + + Removal of ForcePanel option + + Since the LVDS interface flat panel and DVI monitor are now automatically + detected, ForcePanel option in xorg.conf is now removed. + + Signed-off-by: Kevin Brace + +commit e94d924df7e633b0a339032364573eedd3351c9b +Author: Kevin Brace +Date: Wed Mar 16 04:19:23 2016 -0700 + + OLPC XO-1.5 flat panel height and width physical size + + The flat panel physical height and width sizes for OLPC XO-1.5 should now + be set correctly. Due to equipment availability, this fix was not tested + on OLPC XO-1.5. + + Signed-off-by: Kevin Brace + +commit 9822064f0cf2675fbaa1390b86a83e5bdd61fbf2 +Author: Kevin Brace +Date: Wed Mar 16 04:06:03 2016 -0700 + + Removing the known device table + + The code has had a large known device table that was used to aid the + display device detection for a long time. This is really an awkward way + to decide which display device gets activated. The general direction of + the computing industry is towards automatic detection of devices, hence, + the use of the known device table will be discontinued for good. + + Signed-off-by: Kevin Brace + +commit b4624fdb5be0377736b657371d30ea9dc583a567 +Author: Kevin Brace +Date: Wed Mar 16 03:37:38 2016 -0700 + + Fixing OLPC XO-1.5 flat panel misdetection + + The specific code to handle OLPC XO-1.5 flat panel screen resolution was + not written correctly, and it was causing flat panel detection problems + with other laptops. Due to equipment availability, this fix was not + tested on OLPC XO-1.5. + + Signed-off-by: Kevin Brace + +commit e84260a493b9da98ca8f6468b0f1908b9f94b87e +Author: Kevin Brace +Date: Tue Mar 15 23:27:10 2016 -0700 + + Removing an erroneous call to VIAUnmapMMIO when exiting + + During testing of the code, a crash was occurring when it was in + the process of releasing various memory resources due to the X Server + not being able to detect a screen. In short, VIAUnmapMMIO function was + being called twice when it should be called only once. + + Signed-off-by: Kevin Brace + +commit 0583b4f91266bcf25b2c6629b86a90695e8bf821 +Author: Kevin Brace +Date: Tue Mar 15 21:34:03 2016 -0700 + + Added debug messages to VIAUnmapMMIO + + Added debug messages to VIAUnmapMMIO function inside via_ums.c. + + Signed-off-by: Kevin Brace + +commit 004411ff1937a87b6717a491b28c40d92fd0fd24 +Author: Kevin Brace +Date: Tue Mar 15 16:27:20 2016 -0700 + + Changed VIAUnmapMem to VIAUnmapMMIO + + Changed the function name of VIAUnmapMem to VIAUnmapMMIO inside via_ums.c. + + Signed-off-by: Kevin Brace + +commit b8eb2abacc4ff1bb84c065e06e2d785ab4ea320f +Author: Kevin Brace +Date: Thu Mar 10 17:32:03 2016 -0800 + + Modified debug messages within via_dvi_init + + Modified debug messages within via_dvi_init function inside + via_outputs.c. + + Signed-off-by: Kevin Brace + +commit 37d06773b7e2475e4362937d1b0f7db02244de7b +Author: Kevin Brace +Date: Thu Mar 10 16:20:47 2016 -0800 + + Added debug messages to ViaOutputsDetect + + Added debug messages to ViaOutputsDetect function inside via_outputs.c. + + Signed-off-by: Kevin Brace + +commit a8ac9dee644a2ad3bbdf47320350d04de08c7332 +Author: Kevin Brace +Date: Thu Mar 10 15:40:36 2016 -0800 + + All devices will now go through TV out initialization code + + Signed-off-by: Kevin Brace + +commit babf51f887554743a46a5078832fe4013f02a018 +Author: Kevin Brace +Date: Thu Mar 10 02:47:40 2016 -0800 + + Removing via_dp_* functions + + Removing via_dp_* functions inside via_outputs.c. These functions are + not really doing anything useful, so they will be deleted. Apparently, + they were originally meant for CX700, VX800, VX855, and VX900 chipsets. + via_lvds_* functions are already handling integrated TMDS and LVDS + transmitters for the above chipsets. + + Signed-off-by: Kevin Brace + +commit 0a2f6f3d229f93f29a5112bef635ff4b62d774e8 +Author: Kevin Brace +Date: Wed Mar 9 20:26:25 2016 -0800 + + Added debug messages to via_dp_detect + + Added debug messages to via_dp_detect function inside via_outputs.c. + + Signed-off-by: Kevin Brace + +commit 47323aab2d3b406845dc35ef474a3855c1df1aa7 +Author: Kevin Brace +Date: Wed Mar 9 17:32:54 2016 -0800 + + Modified a debug message within via_vt1632_probe + + Modified a debug message within via_vt1632_probe function inside + via_vt1632.c. + + Signed-off-by: Kevin Brace + +commit a2def1ce285c7329ec3ae9491b63b5f880141d88 +Author: Kevin Brace +Date: Wed Mar 9 17:30:47 2016 -0800 + + Added debug messages to via_vt1632_probe + + Added debug messages to via_vt1632_probe function inside via_vt1632.c. + + Signed-off-by: Kevin Brace + +commit 74e95a634506ab92b4c31ee1423bf9349067e0b5 +Author: Kevin Brace +Date: Wed Mar 9 00:05:44 2016 -0800 + + set_origin callback of xf86CrtcFuncsRec compilation error + + It appears that set_origin callback function of xf86CrtcFuncsRec + structure is available only if ABI_VIDEODRV_VERSION is greater than 2. + + Signed-off-by: Kevin Brace + +commit 8e95e6919263763f64e8e034a88132f71c5b6783 +Author: Kevin Brace +Date: Tue Mar 8 23:26:01 2016 -0800 + + get_property callback of xf86OutputFuncsRec and RandR compilation error + + get_property callback of xf86OutputFuncsRec structure is supported by + RandR version 1.3, not version 1.2. + + Signed-off-by: Kevin Brace + +commit aed2e6648e9d1b95855c64b3a1edf6c0bcc18c9c +Author: Kevin Brace +Date: Tue Mar 8 21:07:11 2016 -0800 + + get_property callback of xf86OutputFuncsRec and RandR compilation error + + get_property callback of xf86OutputFuncsRec structure is supported by + RandR version 1.3, not version 1.2. + + Signed-off-by: Kevin Brace + +commit 9dbd0359a98f5010e3f8fcf6ad411404b434901b +Author: Kevin Brace +Date: Tue Mar 8 02:15:17 2016 -0800 + + Fixing P4M800 chipset detection code compilation error + + Likely due to an overlook, the code to detect P4M800 chipset did not + compile correctly if the code was being compiled against an older + version of x.org X Server. + + Signed-off-by: Kevin Brace + +commit e73fa19fec23d6ec5be836f698d323f89ae48611 +Author: Kevin Brace +Date: Tue Mar 8 01:17:05 2016 -0800 + + Fixing header file compilation errors with an older version gcc + + It was observed with an older version gcc where including xf86Crtc.h and + xf86fbman.h inside via_ums.c causes compilation errors. It appears that + via_driver.h includes necessary header files to correctly compile ums.c, + therefore, xf86Crtc.h and xf86fbman.h will no longer be explicitly included + inside via_ums.c. + + Signed-off-by: Kevin Brace + +commit 7dd217502d91ffecfc857c4337893e826ffd00bd +Author: Kevin Brace +Date: Sun Mar 6 02:27:28 2016 -0800 + + Fixing the misdetection of NanoBook flat panel + + It was observed in a VIA Technologies NanoBook based laptop computer + that the flat panel it contains is not connected to an I2C bus, hence + the supported screen resolution cannot be determined via an I2C bus. + Furthermore, the code was obtaining EDID information via I2C bus 2, but + it was not scrutinizing the interface type. Hence, if a VGA monitor + is connected to the computer, the code was determining the flat panel + screen resolution based on the EDID information obtained from the VGA + monitor via I2C bus 2. Due to all of these issues, the flat panel + screen color was going completely white, making the flat panel + completely useless. Thanks to this fix, the flat panel and a VGA + monitor can now be detected correctly. + + Signed-off-by: Kevin Brace + +commit 802544370dd827ed3488965e39804e3cb630888a +Author: Kevin Brace +Date: Sat Mar 5 19:48:33 2016 -0800 + + Checking the validity of I2C buses before initializing VGA output + + The validity of I2C buses is checked before VGA output is registered + with X Server. + + Reported-by: Christopher Havel + Tested-by: Justin Chevrier + Signed-off-by: Kevin Brace + +commit 7a98f6584fec8dd7d6f516d6718839b5c96342cc +Author: Kevin Brace +Date: Sat Mar 5 11:33:08 2016 -0800 + + Using I2C bus 2 to detect a VGA monitor + + Previously, it was assumed that I2C bus 1 is used to detect only a VGA + monitor. It was also assumed that I2C bus 2 is used to detect a DVI + monitor or TV encoder. However, for devices with a DVI-I connector, + VGA signals come out of the connector as well. What this means is that + I2C bus 2 also has to be used to detect a VGA monitor, in addition to + I2C bus 1. Furthermore, EDID obtained from the monitor via I2C bus + will be used to determine whether or not it is an analog type + (i.e., VGA monitor). + + Reported-by: Christopher Havel + Tested-by: Justin Chevrier + Signed-off-by: Kevin Brace + +commit d45116a689463ada005495d7bdde5f6fc0a072a1 +Author: Kevin Brace +Date: Sun Feb 21 12:15:54 2016 -0800 + + Adding CN333 chipset to the chipset support list + + It is believed to be a feature limited version of CN400 chipset. + + Signed-off-by: Kevin Brace + +commit ab2e08b571ca803d3460b7ec4154f96471673615 +Author: Kevin Brace +Date: Sun Feb 21 12:00:19 2016 -0800 + + Adding VN890 chipset to the chipset support list + + It is believed to be a mobile version of P4M890 chipset. + + Signed-off-by: Kevin Brace + +commit 277ee3e2eb000682df419958f78511da7078c613 +Author: Kevin Brace +Date: Sun Feb 21 02:23:15 2016 -0800 + + Added debug messages to via_dp_init + + Added debug messages to via_dp_init function inside via_outputs.c. + + Signed-off-by: Kevin Brace + +commit 39503b8a0265330769b43a748b49f7201e52c76b +Author: Kevin Brace +Date: Sun Feb 21 01:46:27 2016 -0800 + + Added debug messages to via_analog_init + + Added debug messages to via_analog_init function inside via_outputs.c. + + Signed-off-by: Kevin Brace + +commit df191b9c536a16b527df73cafe76f5527410ebd3 +Author: Kevin Brace +Date: Sun Feb 21 01:32:40 2016 -0800 + + Added debug messages to via_i2c.c + + Signed-off-by: Kevin Brace + +commit 9adfe7711c333f7273b9763db8b0c51bda413565 +Author: Kevin Brace +Date: Sun Feb 21 00:56:22 2016 -0800 + + Converting tab to white spaces inside via_vt1632.c + + Signed-off-by: Kevin Brace + +commit 9b5d454657d4998964af3a660d61bd178b367a05 +Author: Kevin Brace +Date: Sat Feb 20 22:30:28 2016 -0800 + + Added debug messages to via_tv_init + + Added debug messages to via_tv_init function inside via_outputs.c. + + Signed-off-by: Kevin Brace + +commit 54c81b29754ff21ad2fc8f8dcc9affa4b5884b27 +Author: Kevin Brace +Date: Sat Feb 20 21:55:04 2016 -0800 + + Improvement of detected monitor type messages + + The words used for the debug messages sounded awkward, so they were + reworded. Also, since it is in the interest of regular users to let + them know the type of monitor detected, the messages will now be + recorded in Xorg.0.log for the release build as well. + + Signed-off-by: Kevin Brace + +commit 19f47226eba40d2fd5c2c770bc3542d12efa1d57 +Author: Kevin Brace +Date: Sat Feb 20 02:12:57 2016 -0800 + + Added debug messages to via_dvi_init + + Added debug messages to via_dvi_init function inside via_outputs.c. + + Signed-off-by: Kevin Brace + +commit b89cfe5583e02c87ea28384a5f6ace5372ae115f +Author: Kevin Brace +Date: Sat Feb 20 01:51:04 2016 -0800 + + Added debug messages to via_vt1632.c + + Signed-off-by: Kevin Brace + +commit 8bc53d8adad4b8f384bfa6b7fc25319ddf2c2681 +Author: Kevin Brace +Date: Tue Feb 16 13:46:41 2016 -0800 + + Compilation hooks to support ClockRange and ClockRanges + + When compiling OpenChrome for Ubuntu 10.04 LTS, it was discovered that + x.org xserver discontinued the use of a structure with ClockRanges type + within ScrnInfoRec. XORG_VERSION_NUMERIC will now be used to figure out + which version of xserver the compiler is compiling against. Now + OpenChrome can be compiled against Ubuntu 10.04 LTS without warnings or + errors. + + Signed-off-by: Kevin Brace + +commit 3d8aa5d0be2be6e874a11e898cfc0abdf32307dc +Author: Kevin Brace +Date: Wed Feb 10 23:04:10 2016 -0800 + + VIA_K8M890 label case statement position adjustment + + It is really a cosmetic change, but theoretically can cause problems. + + Signed-off-by: Kevin Brace + +commit 02d56af6e26b4fc4c0ddad427754d4b58c066963 +Author: Kevin Brace +Date: Wed Feb 10 22:13:34 2016 -0800 + + A little prettier supported chipset list + + When Xorg.0.log identifies supported VIA Technologies chipsets, the list + will now look a little prettier. + + Signed-off-by: Kevin Brace + +commit 18807c0fe4d4c61d1b4b7bcf8ab899aa967b0d38 +Author: Kevin Brace +Date: Wed Feb 10 21:39:24 2016 -0800 + + VIA_P4M800PRO label code indentation fix + + Code indentation got off in commit 35c6f0c1410247c4eba5fbc2e017561778c3c90d. + No change in the functionality of the code. + + Signed-off-by: Kevin Brace + +commit 46173dfa0e91933270fc0257d080893659c02151 +Author: Kevin Brace +Date: Tue Feb 9 13:33:08 2016 -0800 + + Enabling the detection of DVI for all devices + + When the UMS code to support VT1632A external TMDS transmitter for DVI was + added via commit a8c2f04e2ef21e64f2e91dd6f3e237f80e8c80c6, it limited the + use to P4M800 Pro, VN800, and CN700 chipsets for some reason. This does not + make sense as VT1632A is used with a variety of VIA Technologies chipsets. + + Signed-off-by: Kevin Brace + +commit 6964b889d77422ed16972b0ba849d9d5c6574daa +Author: Kevin Brace +Date: Tue Feb 9 13:10:51 2016 -0800 + + Fixing DVI detection code crash + + The portion of the code responsible for detecting VT1632A external TMDS + transmitter for DVI was causing a crash if VT1632A was not detected on + I2C buses. This was happening due to xf86DestroyI2CDevRec being called + prior to the call to xf86I2CDevInit if VT1632A was not detected. Now the + code will probe I2C buses using xf86I2CProbeAddress to look for VT1632A, + and if VT1632A is not detected, it will stop trying to detect VT1632A + via I2C buses. + + Signed-off-by: Kyle Guinn + Signed-off-by: Kevin Brace + +commit e7be60ee371affe2e91ba8e8b2ea931e311ad26c +Author: Kevin Brace +Date: Mon Feb 8 21:26:02 2016 -0800 + + Preserving PCI Burst Write Wait State Select Bit + + The code was previously setting PCI Burst Write Wait State Select bit + (0x3c5.0x1a[2]) to 1 for no good reasons. Typically, the option to enable + 1 wait state PCI transaction in many VIA Technologies chipset-based + computers is provided in the BIOS setup, therefore, it is prudent for the + graphics device driver not to alter this bit. + + Signed-off-by: Kevin Brace + +commit 35c6f0c1410247c4eba5fbc2e017561778c3c90d +Author: Kevin Brace +Date: Mon Feb 8 20:38:47 2016 -0800 + + Substitution of VIA_VM800 label with VIA_P4M800PRO label + + Replaces VIA_VM800 label with VIA_P4M800PRO label inside via_driver.c + and various files it is referenced due to the fact that there is no + such product called VM800 chipset from VIA Technologies. The VM800 chipset + the code refers to really is P4M800 Pro chipset. Also, the code refers + to a product called VN800 chipset, and this is similar (related) to + P4M800 Pro chipset. + + Signed-off-by: Kevin Brace + +commit 47060a3d770b90ed96924b4260dce38bdafedfde +Author: Xavier Bachelot +Date: Tue May 19 21:30:53 2015 +0200 + + Itona DS35S (Reported by Andrew Colosimo) + +commit 2bc22ea40bd22618bb731accd1e30b8c453c4520 +Author: Xavier Bachelot +Date: Thu May 7 00:23:40 2015 +0200 + + Abit IP-95 (Reported by Alan Polinsky) + +commit c391551492d692b5736f94ab066d9f35aa262bf5 +Author: Xavier Bachelot +Date: Tue Feb 17 21:43:43 2015 +0100 + + Update date and URL in copyright notices + +commit b5f1fd83bace276f8e421127c249b4c6e5374900 +Author: Xavier Bachelot +Date: Tue Feb 17 21:25:14 2015 +0100 + + Update MODULEVENDORSTRING to point at fd.o wiki + +commit 4394a7b8fd38f9439d70d3362c3457be0400702d +Author: Xavier Bachelot +Date: Tue Feb 17 21:18:14 2015 +0100 + + Update X log URL to fd.o wiki + +commit 4b1143d1cb9820bbf2d4907032262d3452801c5e +Author: James Simmons +Date: Wed Feb 11 14:42:42 2015 -0700 + + The function viaDRIFBMemcpy really wants dst to be 16byte-aligned + there. And that's not ->driOffScreenMem (which you've guaranteed + to be aligned), that's ->driOffScreenSave, which comes from malloc(). + On 32bit host it's not guaranteed to yield 128bit-aligned pointer. + That's where the "[drm:via_build_sg_info] *ERROR* Invalid DRM bitblt + alignment." kernel whinge is coming from. + + Signed-off-by: Al Viro + Acked-by: James Simmons + +commit 40dd677c721f4d1b1f7f29e7745fc81402abeb8b +Author: Xavier Bachelot +Date: Sun Jan 18 21:18:50 2015 +0100 + + Cosmetic : Wrap lines and remove tabs indentation. + + Signed-off-by: Xavier Bachelot + +commit 98d43c48d100a02819397cf951ae8061f1f6124c +Author: Xavier Bachelot +Date: Sat Jan 17 13:00:00 2015 +0100 + + Rewrap some lines below 80 chars + + Signed-off-by: Xavier Bachelot + Acked-by: James Simmons + +commit dc485f2e0f432c2fe9d2e747259d999175dc834c +Author: Xavier Bachelot +Date: Sat Jan 17 12:42:52 2015 +0100 + + Move CLE266 revision check to a place it will actually be run. + + Signed-off-by: Xavier Bachelot + Acked-by: James Simmons + +commit ecb1695ac2de1d840c036f64b5b71602e0f522a4 +Author: Xavier Bachelot +Date: Sat Jan 17 12:42:06 2015 +0100 + + Make sure pVia->Id is set even in case of an unknown board to prevent a segfault later + + Signed-off-by: Xavier Bachelot + Acked-by: James Simmons + +commit 33fcaa11daeb7ca156fcdadd969ca7f950ce8401 +Author: James Simmons +Date: Tue Jan 13 15:18:28 2015 -0700 + + Fixes for various memory related problems discovered by cppcheck. + The errors are memory leaks, NULL dereferences, and double frees. + + Signed-off-by: Oppen + Reviewed-by: James Simmons + +commit 8ff8235260c035b960c3552df25a9784e1049f24 +Author: Xavier Bachelot +Date: Tue Jan 13 22:06:44 2015 +0100 + + Make via_dvi_set_property return TRUE. + Other via_*_set_property just got fixed in 271c716f2060bc04a5ca8324c0d2c27473463206 + +commit bcdd1e7ef9df5dc72b9dbb2977b39e65a45f8697 +Author: James Simmons +Date: Tue Jan 13 13:43:03 2015 -0700 + + Last of the gcc warnings. + + Signed-off-by: James Simmons + +commit 18ff812145f9de95920387a811c106dd11a92865 +Author: James Simmons +Date: Tue Jan 13 13:38:21 2015 -0700 + + Silence the warning: assignment discards 'const' qualifier from + pointer target type. + + Signed-off-by: James Simmons + +commit 87ca395dd87c93707140337977faa6d47874f706 +Author: James Simmons +Date: Tue Jan 13 13:35:22 2015 -0700 + + Migrate the register tool to C99 standard. Fix the overflow with + the shift calculation. + + Signed-off-by: James Simmons + +commit 6d5fb459a556d720739ec4206e286fe1dbabca71 +Author: Xavier Bachelot +Date: Tue Jan 13 20:16:53 2015 +0100 + + Hitachi FLORA Se210 RK1 (Reported by Shimada Hirofumi) + +commit 2725ef2e730a930c0e7c3244c44e8738a7ea3c03 +Author: Xavier Bachelot +Date: Tue Jan 13 18:59:11 2015 +0100 + + Remove extra semicolons. + +commit 9dd87b7ee9790fa46dfe1f4203960e3988048a0b +Author: Xavier Bachelot +Date: Tue Jan 13 18:46:42 2015 +0100 + + Move via_dvi_* functions before ViaOutputsDetect to prevent a warning. + +commit 319fcdad57ebf4f1ef828c3344058ff8f6197432 +Author: Xavier Bachelot +Date: Tue Jan 13 18:34:53 2015 +0100 + + Add missing header inclusion. + Fixes https://bugs.freedesktop.org/show_bug.cgi?id=88334 + +commit 180fd4e76abf15253cadc5cd98fc58e9e2c84605 +Author: Xavier Bachelot +Date: Tue Jan 13 18:10:14 2015 +0100 + + Replace X_DEBUG with X_INFO. + The former doesn't exist on older xserver and X_INFO is used in other + places of the driver. + +commit a68274700e2fdda49f166dd3d1c76f77a4774f57 +Author: James Simmons +Date: Sat Jan 10 19:08:48 2015 -0700 + + Small cleanup to the register dumping tool to display + data correctly. + +commit fdbd9446130e58c0241bfae5ad9ee88c95e8cea2 +Author: James Simmons +Date: Sat Jan 10 18:45:18 2015 -0700 + + Fix build on Hurd. Without libdrm the build fails due to missing + definitions. We can use the included drm_fourcc.h to ensure it + builds. + + Signed-off-by: Gabriele Giacone + Reviewed-by: James Simmons + +commit cbead3b200b3948bd4ddf9e2133a7f5d431f58ff +Author: Pino Toscano +Date: Sat Jan 10 18:40:33 2015 -0700 + + Do not require libdrm as base pkg-config module + + Remove libdrm from the list of mandatory Xorg modules, as it is an + optional component whose presence is checked later. Needed for + Hurd support since libdrm is not present yet. + + Signed-off-by: Pino Toscano + Reviewed-by: James Simmons + +commit c104fa48e8e21f0dc2444662e7c0a3df2ee5e5cb +Author: James Simmons +Date: Sat Jan 10 18:36:22 2015 -0700 + + * while watching video following messages are endless logged + via_xv.c : needBandwidth= 180.000000 : + via_xv.c : totalBandwidth= 2979.199951 : + + So instead log a error if it fails to have enought memory + bandwith. + + Signed-off-by: Robby Klehm + Reviewed-by: James Simmons + +commit a8c2f04e2ef21e64f2e91dd6f3e237f80e8c80c6 +Author: JUNG, Christian +Date: Sat Jan 10 17:47:48 2015 -0700 + + Add support for VT1632 DVI transmitter for UMS mode. + + Signed-off-by: JUNG, Christian + Reviewed-by: James Simmons + +commit 02480da73b76df500aaca8dd6eff9d56acdb58d2 +Author: JUNG, Christian +Date: Sat Jan 10 17:44:07 2015 -0700 + + Add support to probe the I2C for bus 3. This makes it is + possible to detect the VT1632 device. + + Signed-off-by: JUNG, Christian + Reviewed-by: James Simmons + +commit 271c716f2060bc04a5ca8324c0d2c27473463206 +Author: Daniel Gnoutcheff +Date: Sat Jan 10 17:42:29 2015 -0700 + + Make our implementation of xf86OutputFuncsRec->set_output() return TRUE. + + Implementations of this function are expected to return TRUE when given + a property that they don't recognize. Otherwise, properties set by the + server core (e.g. EDID) will break. (See commit 33133a1 in + xf86-video-intel.) + + Since we don't support any properties ourselves, we should always + return TRUE. + + This is also needed to support clients that set custom output + properties; i.e. gnome-shell likes to set _MUTTER_PRESENTATION_OUTPUT, + and it works fine with other drivers but would crash with ValueError on + openchrome. + + Signed-off-by: Daniel Gnoutcheff + Reviewed-by: James Simmons + +commit 00f4d9d7fedccd1e66d98113e76cbfff15722d51 +Author: James Simmons +Date: Sun Jan 4 16:29:46 2015 -0700 + + Add pciid for ECS VX900-I motherboard + +commit 46a4ef37a1fc793ea85950f9579783e9af3a6b36 +Author: Xavier Bachelot +Date: Fri Oct 18 18:04:50 2013 +0200 + + Add pciid for Lenovo M3120C + +commit e53bb7bf442b03b1240445d6c9e846265bda577c +Author: Xavier Bachelot +Date: Wed Oct 16 00:03:10 2013 +0200 + + Don't check if the input is digital for VGA + +commit 94e5ff32de58ee66ea5588ee47050f44b914e863 +Author: James Simmons +Date: Thu Sep 5 18:51:11 2013 -0400 + + The mode passed into drmmmode_set_mode_major does not always have a name string. When xf86SetModeDefaultName is called it frees a null string which caused a segfault. No need to create a default name so remove xf86SetModeDefaultName + +commit 3cbf8324556c56c8bcee9f1602471dc8e5d25fab +Author: James Simmons +Date: Thu Sep 5 17:49:48 2013 -0400 + + Sync via_drm.h header with that in drm-openchrome + +commit 33ff08541e5dd0804b4ca61238b85933a3d740b5 +Author: Xavier Bachelot +Date: Wed Sep 4 21:17:40 2013 +0200 + + Samsung Q1EX (reported by Andrew Sabelhaus) + +commit f5d7c881c853eb5f617c1792de3f5bb5305d5dd3 +Author: James Simmons +Date: Sun Jul 14 15:09:41 2013 -0400 + + Revert "With hotplug an output is enabled but its not attached to a crtc by default. When the display is issued a resize now when we encounter a disabled crtc a unbound ouput is then attached to it." + + This reverts commit c41db44466d9fc856fab1c4207483230deda6031. + +commit c41db44466d9fc856fab1c4207483230deda6031 +Author: James Simmons +Date: Sun Jul 14 11:14:00 2013 -0400 + + With hotplug an output is enabled but its not attached to a crtc by default. When the display is issued a resize now when we encounter a disabled crtc a unbound ouput is then attached to it. + +commit f264f523ac80fc9eebec66945fe89243eabbf081 +Author: James Simmons +Date: Sat Jul 13 15:21:01 2013 -0400 + + The normal setup is two crtc are mapped to the same framebuffer. As we set each crtc we were caching the old frame buffer, but for the second crtc we end up caching the new framebuffer as the old one. So when we went to free the old framebuffer the display surface got deleted which caused our xorg driver to crash. The solution is to test if we already cached the old framebuffer. Also since only one display surface is involved we move drmModeRmFB outside the crtc loop. + +commit 7e08492da289e495b8b4092f3a5eeb0c6aa46362 +Author: James Simmons +Date: Fri Jul 5 18:18:41 2013 -0400 + + Remove comparisons that cannot be true. + + The variables compared here are all CARD32, which is an unsigned + type. + + Signed-off-by: Thomas Klausner + Acked-by: James Simmons + + --- + src/via_xv_overlay.c | 16 ++++------------ + 1 file changed, 4 insertions(+), 12 deletions(-) + +commit ab25ebc3d91248f0e411387e72331d102f90a386 +Author: James Simmons +Date: Fri Jul 5 18:16:47 2013 -0400 + + Use appropriate format string. + + The variable is an unsigned long, so use %lu. + + Signed-off-by: Thomas Klausner + Acked-by: James Simmons + + --- + src/via_driver.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 12c4cb9d393e1620bfbf2e5f9ba8c6d30d3dc534 +Author: James Simmons +Date: Fri Jul 5 18:12:09 2013 -0400 + + Add missing drm_fourcc.h header file. + + Signed-off-by: Thomas Klausner + Acked-by: James Simmons + + --- + src/via_driver.c | 1 + + src/via_memmgr.c | 1 + + 2 files changed, 2 insertions(+) + +commit c04bf57c460a6c7ddf00377ec065bb0efe188fc8 +Author: Xavier Bachelot +Date: Sat Jun 22 17:10:01 2013 +0200 + + Shuttle MK40V (reported by Belkacem Houari) + +commit 200cdb68353e638c78582c0ae571e59c96cfea64 +Author: James Simmons +Date: Wed Jun 5 20:14:57 2013 -0400 + + gcc does not like prototypes for static functions. This patch fixes that issue + +commit 237233d14346604488785a9899f01df044245949 +Author: Jared McNeill +Date: Mon Jun 3 20:52:47 2013 +0200 + + Remove a couple '#ifdef linux's to let the driver use optimized memcpy + functions on NetBSD for video copy. Gives nearly 2x performance on my + test system (previously "kernel" memcpy was always used): + + CHROME(0): Benchmarking video copy. Less time is better. + CHROME(0): Timed libc YUV420 copy... 3000272. Throughput: 315.6 MiB/s. + CHROME(0): Timed kernel YUV420 copy... 3024946. Throughput: 313.0 MiB/s. + CHROME(0): Timed SSE YUV420 copy... 1591352. Throughput: 595.0 MiB/s. + CHROME(0): Timed MMX YUV420 copy... 2566279. Throughput: 369.0 MiB/s. + CHROME(0): Ditching 3DNow! YUV420 copy. Not supported by CPU. + CHROME(0): Timed MMX2 YUV420 copy... 1696662. Throughput: 558.1 MiB/s. + CHROME(0): Using SSE YUV42X copy for video. + +commit 78b9f43ca8d04383a83659619d70f61688568366 +Author: Christos Zoulas +Date: Mon Jun 3 20:50:45 2013 +0200 + + Add missing prototypes + commit 0c17f81ad43d42958ab3871c9b5c5e9cea402256 Author: Xavier Bachelot Date: Wed May 22 18:58:48 2013 +0200 diff -Nru xserver-xorg-video-openchrome-0.5.0/compile xserver-xorg-video-openchrome-0.6.0/compile --- xserver-xorg-video-openchrome-0.5.0/compile 2016-07-06 16:22:04.000000000 +0000 +++ xserver-xorg-video-openchrome-0.6.0/compile 1970-01-01 00:00:00.000000000 +0000 @@ -1,347 +0,0 @@ -#! /bin/sh -# Wrapper for compilers which do not understand '-c -o'. - -scriptversion=2012-10-14.11; # UTC - -# Copyright (C) 1999-2014 Free Software Foundation, Inc. -# Written by Tom Tromey . -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# This file is maintained in Automake, please report -# bugs to or send patches to -# . - -nl=' -' - -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent tools from complaining about whitespace usage. -IFS=" "" $nl" - -file_conv= - -# func_file_conv build_file lazy -# Convert a $build file to $host form and store it in $file -# Currently only supports Windows hosts. If the determined conversion -# type is listed in (the comma separated) LAZY, no conversion will -# take place. -func_file_conv () -{ - file=$1 - case $file in - / | /[!/]*) # absolute file, and not a UNC file - if test -z "$file_conv"; then - # lazily determine how to convert abs files - case `uname -s` in - MINGW*) - file_conv=mingw - ;; - CYGWIN*) - file_conv=cygwin - ;; - *) - file_conv=wine - ;; - esac - fi - case $file_conv/,$2, in - *,$file_conv,*) - ;; - mingw/*) - file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` - ;; - cygwin/*) - file=`cygpath -m "$file" || echo "$file"` - ;; - wine/*) - file=`winepath -w "$file" || echo "$file"` - ;; - esac - ;; - esac -} - -# func_cl_dashL linkdir -# Make cl look for libraries in LINKDIR -func_cl_dashL () -{ - func_file_conv "$1" - if test -z "$lib_path"; then - lib_path=$file - else - lib_path="$lib_path;$file" - fi - linker_opts="$linker_opts -LIBPATH:$file" -} - -# func_cl_dashl library -# Do a library search-path lookup for cl -func_cl_dashl () -{ - lib=$1 - found=no - save_IFS=$IFS - IFS=';' - for dir in $lib_path $LIB - do - IFS=$save_IFS - if $shared && test -f "$dir/$lib.dll.lib"; then - found=yes - lib=$dir/$lib.dll.lib - break - fi - if test -f "$dir/$lib.lib"; then - found=yes - lib=$dir/$lib.lib - break - fi - if test -f "$dir/lib$lib.a"; then - found=yes - lib=$dir/lib$lib.a - break - fi - done - IFS=$save_IFS - - if test "$found" != yes; then - lib=$lib.lib - fi -} - -# func_cl_wrapper cl arg... -# Adjust compile command to suit cl -func_cl_wrapper () -{ - # Assume a capable shell - lib_path= - shared=: - linker_opts= - for arg - do - if test -n "$eat"; then - eat= - else - case $1 in - -o) - # configure might choose to run compile as 'compile cc -o foo foo.c'. - eat=1 - case $2 in - *.o | *.[oO][bB][jJ]) - func_file_conv "$2" - set x "$@" -Fo"$file" - shift - ;; - *) - func_file_conv "$2" - set x "$@" -Fe"$file" - shift - ;; - esac - ;; - -I) - eat=1 - func_file_conv "$2" mingw - set x "$@" -I"$file" - shift - ;; - -I*) - func_file_conv "${1#-I}" mingw - set x "$@" -I"$file" - shift - ;; - -l) - eat=1 - func_cl_dashl "$2" - set x "$@" "$lib" - shift - ;; - -l*) - func_cl_dashl "${1#-l}" - set x "$@" "$lib" - shift - ;; - -L) - eat=1 - func_cl_dashL "$2" - ;; - -L*) - func_cl_dashL "${1#-L}" - ;; - -static) - shared=false - ;; - -Wl,*) - arg=${1#-Wl,} - save_ifs="$IFS"; IFS=',' - for flag in $arg; do - IFS="$save_ifs" - linker_opts="$linker_opts $flag" - done - IFS="$save_ifs" - ;; - -Xlinker) - eat=1 - linker_opts="$linker_opts $2" - ;; - -*) - set x "$@" "$1" - shift - ;; - *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) - func_file_conv "$1" - set x "$@" -Tp"$file" - shift - ;; - *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) - func_file_conv "$1" mingw - set x "$@" "$file" - shift - ;; - *) - set x "$@" "$1" - shift - ;; - esac - fi - shift - done - if test -n "$linker_opts"; then - linker_opts="-link$linker_opts" - fi - exec "$@" $linker_opts - exit 1 -} - -eat= - -case $1 in - '') - echo "$0: No command. Try '$0 --help' for more information." 1>&2 - exit 1; - ;; - -h | --h*) - cat <<\EOF -Usage: compile [--help] [--version] PROGRAM [ARGS] - -Wrapper for compilers which do not understand '-c -o'. -Remove '-o dest.o' from ARGS, run PROGRAM with the remaining -arguments, and rename the output as expected. - -If you are trying to build a whole package this is not the -right script to run: please start by reading the file 'INSTALL'. - -Report bugs to . -EOF - exit $? - ;; - -v | --v*) - echo "compile $scriptversion" - exit $? - ;; - cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) - func_cl_wrapper "$@" # Doesn't return... - ;; -esac - -ofile= -cfile= - -for arg -do - if test -n "$eat"; then - eat= - else - case $1 in - -o) - # configure might choose to run compile as 'compile cc -o foo foo.c'. - # So we strip '-o arg' only if arg is an object. - eat=1 - case $2 in - *.o | *.obj) - ofile=$2 - ;; - *) - set x "$@" -o "$2" - shift - ;; - esac - ;; - *.c) - cfile=$1 - set x "$@" "$1" - shift - ;; - *) - set x "$@" "$1" - shift - ;; - esac - fi - shift -done - -if test -z "$ofile" || test -z "$cfile"; then - # If no '-o' option was seen then we might have been invoked from a - # pattern rule where we don't need one. That is ok -- this is a - # normal compilation that the losing compiler can handle. If no - # '.c' file was seen then we are probably linking. That is also - # ok. - exec "$@" -fi - -# Name of file we expect compiler to create. -cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` - -# Create the lock directory. -# Note: use '[/\\:.-]' here to ensure that we don't use the same name -# that we are using for the .o file. Also, base the name on the expected -# object file name, since that is what matters with a parallel build. -lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d -while true; do - if mkdir "$lockdir" >/dev/null 2>&1; then - break - fi - sleep 1 -done -# FIXME: race condition here if user kills between mkdir and trap. -trap "rmdir '$lockdir'; exit 1" 1 2 15 - -# Run the compile. -"$@" -ret=$? - -if test -f "$cofile"; then - test "$cofile" = "$ofile" || mv "$cofile" "$ofile" -elif test -f "${cofile}bj"; then - test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" -fi - -rmdir "$lockdir" -exit $ret - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "; # UTC" -# End: diff -Nru xserver-xorg-video-openchrome-0.5.0/config.guess xserver-xorg-video-openchrome-0.6.0/config.guess --- xserver-xorg-video-openchrome-0.5.0/config.guess 2016-07-06 16:22:04.000000000 +0000 +++ xserver-xorg-video-openchrome-0.6.0/config.guess 2017-03-07 11:18:26.000000000 +0000 @@ -1,12 +1,14 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2015 Free Software Foundation, Inc. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, +# 2011, 2012 Free Software Foundation, Inc. -timestamp='2015-01-01' +timestamp='2012-02-10' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or +# the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but @@ -20,17 +22,19 @@ # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that -# program. This Exception is an additional permission under section 7 -# of the GNU General Public License, version 3 ("GPLv3"). +# the same distribution terms that you use for the rest of that program. + + +# Originally written by Per Bothner. Please send patches (context +# diff format) to and include a ChangeLog +# entry. # -# Originally written by Per Bothner; maintained since 2000 by Ben Elliston. +# This script attempts to guess a canonical system name similar to +# config.sub. If it succeeds, it prints the system name on stdout, and +# exits with 0. Otherwise, it exits with 1. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD -# -# Please send patches to . - me=`echo "$0" | sed -e 's,.*/,,'` @@ -50,7 +54,9 @@ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2015 Free Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 +Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -132,27 +138,6 @@ UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown -case "${UNAME_SYSTEM}" in -Linux|GNU|GNU/*) - # If the system lacks a compiler, then just pick glibc. - # We could probably try harder. - LIBC=gnu - - eval $set_cc_for_build - cat <<-EOF > $dummy.c - #include - #if defined(__UCLIBC__) - LIBC=uclibc - #elif defined(__dietlibc__) - LIBC=dietlibc - #else - LIBC=gnu - #endif - EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` - ;; -esac - # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in @@ -215,10 +200,6 @@ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; - *:Bitrig:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} - exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} @@ -321,7 +302,7 @@ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; - arm*:riscos:*:*|arm*:RISCOS:*:*) + arm:riscos:*:*|arm:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) @@ -579,9 +560,8 @@ else IBM_ARCH=powerpc fi - if [ -x /usr/bin/lslpp ] ; then - IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | - awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi @@ -821,13 +801,10 @@ i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; - *:MINGW64*:*) - echo ${UNAME_MACHINE}-pc-mingw64 - exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; - *:MSYS*:*) + i*:MSYS*:*) echo ${UNAME_MACHINE}-pc-msys exit ;; i*:windows32*:*) @@ -875,21 +852,21 @@ exit ;; *:GNU:*:*) # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; aarch64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in @@ -902,54 +879,59 @@ EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC="gnulibc1" ; fi - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - arc:Linux:*:* | arceb:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo ${UNAME_MACHINE}-unknown-linux-gnu else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then - echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi + echo ${UNAME_MACHINE}-unknown-linux-gnueabi else - echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf + echo ${UNAME_MACHINE}-unknown-linux-gnueabihf fi fi exit ;; avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-${LIBC} + echo ${UNAME_MACHINE}-axis-linux-gnu exit ;; crisv32:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-${LIBC} + echo ${UNAME_MACHINE}-axis-linux-gnu exit ;; frv:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; hexagon:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:Linux:*:*) - echo ${UNAME_MACHINE}-pc-linux-${LIBC} + LIBC=gnu + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #ifdef __dietlibc__ + LIBC=dietlibc + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` + echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit ;; ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build @@ -968,63 +950,54 @@ #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; - openrisc*:Linux:*:*) - echo or1k-unknown-linux-${LIBC} - exit ;; - or32:Linux:*:* | or1k*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + or32:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; padre:Linux:*:*) - echo sparc-unknown-linux-${LIBC} + echo sparc-unknown-linux-gnu exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-${LIBC} + echo hppa64-unknown-linux-gnu exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; - PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; - *) echo hppa-unknown-linux-${LIBC} ;; + PA7*) echo hppa1.1-unknown-linux-gnu ;; + PA8*) echo hppa2.0-unknown-linux-gnu ;; + *) echo hppa-unknown-linux-gnu ;; esac exit ;; ppc64:Linux:*:*) - echo powerpc64-unknown-linux-${LIBC} + echo powerpc64-unknown-linux-gnu exit ;; ppc:Linux:*:*) - echo powerpc-unknown-linux-${LIBC} - exit ;; - ppc64le:Linux:*:*) - echo powerpc64le-unknown-linux-${LIBC} - exit ;; - ppcle:Linux:*:*) - echo powerpcle-unknown-linux-${LIBC} + echo powerpc-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux-${LIBC} + echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; tile*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-${LIBC} + echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. @@ -1228,9 +1201,6 @@ BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; - x86_64:Haiku:*:*) - echo x86_64-unknown-haiku - exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; @@ -1257,31 +1227,19 @@ exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - eval $set_cc_for_build - if test "$UNAME_PROCESSOR" = unknown ; then - UNAME_PROCESSOR=powerpc - fi - if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - case $UNAME_PROCESSOR in - i386) UNAME_PROCESSOR=x86_64 ;; - powerpc) UNAME_PROCESSOR=powerpc64 ;; - esac - fi - fi - elif test "$UNAME_PROCESSOR" = i386 ; then - # Avoid executing cc on OS X 10.9, as it ships with a stub - # that puts up a graphical alert prompting to install - # developer tools. Any system running Mac OS X 10.7 or - # later (Darwin 11 and later) is required to have a 64-bit - # processor. This is not true of the ARM version of Darwin - # that Apple uses in portable devices. - UNAME_PROCESSOR=x86_64 - fi + case $UNAME_PROCESSOR in + i386) + eval $set_cc_for_build + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + UNAME_PROCESSOR="x86_64" + fi + fi ;; + unknown) UNAME_PROCESSOR=powerpc ;; + esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) @@ -1298,7 +1256,7 @@ NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; - NSE-*:NONSTOP_KERNEL:*:*) + NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) @@ -1372,6 +1330,157 @@ exit ;; esac +#echo '(No uname command or uname output not recognized.)' 1>&2 +#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 + +eval $set_cc_for_build +cat >$dummy.c < +# include +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (__arm) && defined (__acorn) && defined (__unix) + printf ("arm-acorn-riscix\n"); exit (0); +#endif + +#if defined (hp300) && !defined (hpux) + printf ("m68k-hp-bsd\n"); exit (0); +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); + +#endif + +#if defined (vax) +# if !defined (ultrix) +# include +# if defined (BSD) +# if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +# else +# if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# endif +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# else + printf ("vax-dec-ultrix\n"); exit (0); +# endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + +# Apollos put the system type in the environment. + +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } + +# Convex versions that predate uname can use getsysinfo(1) + +if [ -x /usr/convex/getsysinfo ] +then + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd + exit ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + c34*) + echo c34-convex-bsd + exit ;; + c38*) + echo c38-convex-bsd + exit ;; + c4*) + echo c4-convex-bsd + exit ;; + esac +fi + cat >&2 <. @@ -20,12 +26,11 @@ # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that -# program. This Exception is an additional permission under section 7 -# of the GNU General Public License, version 3 ("GPLv3"). +# the same distribution terms that you use for the rest of that program. -# Please send patches to . +# Please send patches to . Submit a context +# diff and a properly formatted GNU ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. @@ -68,7 +73,9 @@ version="\ GNU config.sub ($timestamp) -Copyright 1992-2015 Free Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 +Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -116,7 +123,7 @@ maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ - linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ + linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) @@ -149,7 +156,7 @@ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray | -microblaze*) + -apple | -axis | -knuth | -cray | -microblaze) os= basic_machine=$1 ;; @@ -218,12 +225,6 @@ -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; - -lynx*178) - os=-lynxos178 - ;; - -lynx*5) - os=-lynxos5 - ;; -lynx*) os=-lynxos ;; @@ -252,24 +253,21 @@ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ - | arc | arceb \ - | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ - | avr | avr32 \ - | be32 | be64 \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ + | be32 | be64 \ | bfin \ - | c4x | c8051 | clipper \ + | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | epiphany \ - | fido | fr30 | frv | ft32 \ + | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ - | k1om \ | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ + | maxq | mb | microblaze | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ @@ -283,26 +281,23 @@ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ - | mipsisa32r6 | mipsisa32r6el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64r6 | mipsisa64r6el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ - | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ - | nios | nios2 | nios2eb | nios2el \ + | nios | nios2 \ | ns16k | ns32k \ - | open8 | or1k | or1knd | or32 \ + | open8 \ + | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ - | riscv32 | riscv64 \ | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ @@ -313,7 +308,6 @@ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ - | visium \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) @@ -328,10 +322,7 @@ c6x) basic_machine=tic6x-unknown ;; - leon|leon[3-9]) - basic_machine=sparc-$basic_machine - ;; - m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) + m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) basic_machine=$basic_machine-unknown os=-none ;; @@ -373,13 +364,13 @@ | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ - | c8051-* | clipper-* | craynv-* | cydra-* \ + | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ @@ -388,13 +379,11 @@ | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ - | k1om-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ - | microblaze-* | microblazeel-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ @@ -408,22 +397,18 @@ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa32r6-* | mipsisa32r6el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64r6-* | mipsisa64r6el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ - | nios-* | nios2-* | nios2eb-* | nios2el-* \ + | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ - | or1k*-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ @@ -441,7 +426,6 @@ | ubicom32-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ - | visium-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ @@ -779,9 +763,6 @@ basic_machine=m68k-isi os=-sysv ;; - leon-*|leon[3-9]-*) - basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'` - ;; m68knommu) basic_machine=m68k-unknown os=-linux @@ -801,15 +782,11 @@ basic_machine=ns32k-utek os=-sysv ;; - microblaze*) + microblaze) basic_machine=microblaze-xilinx ;; - mingw64) - basic_machine=x86_64-pc - os=-mingw64 - ;; mingw32) - basic_machine=i686-pc + basic_machine=i386-pc os=-mingw32 ;; mingw32ce) @@ -837,10 +814,6 @@ basic_machine=powerpc-unknown os=-morphos ;; - moxiebox) - basic_machine=moxie-unknown - os=-moxiebox - ;; msdos) basic_machine=i386-pc os=-msdos @@ -849,7 +822,7 @@ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; msys) - basic_machine=i686-pc + basic_machine=i386-pc os=-msys ;; mvs) @@ -1025,7 +998,7 @@ ;; ppc64) basic_machine=powerpc64-unknown ;; - ppc64-* | ppc64p7-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown @@ -1040,11 +1013,7 @@ basic_machine=i586-unknown os=-pw32 ;; - rdos | rdos64) - basic_machine=x86_64-pc - os=-rdos - ;; - rdos32) + rdos) basic_machine=i386-pc os=-rdos ;; @@ -1371,29 +1340,29 @@ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ - | -sym* | -kopensolaris* | -plan9* \ + | -sym* | -kopensolaris* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -bitrig* | -openbsd* | -solidbsd* \ + | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ - | -linux-newlib* | -linux-musl* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ + | -mingw32* | -linux-gnu* | -linux-android* \ + | -linux-newlib* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*) + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1517,6 +1486,9 @@ -aros*) os=-aros ;; + -kaos*) + os=-kaos + ;; -zvmoe) os=-zvmoe ;; @@ -1565,12 +1537,6 @@ c4x-* | tic4x-*) os=-coff ;; - c8051-*) - os=-elf - ;; - hexagon-*) - os=-elf - ;; tic54x-*) os=-coff ;; diff -Nru xserver-xorg-video-openchrome-0.5.0/configure xserver-xorg-video-openchrome-0.6.0/configure --- xserver-xorg-video-openchrome-0.5.0/configure 2016-07-06 16:22:03.000000000 +0000 +++ xserver-xorg-video-openchrome-0.6.0/configure 2017-03-07 11:18:58.000000000 +0000 @@ -1,11 +1,13 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for xf86-video-openchrome 0.5.0. +# Generated by GNU Autoconf 2.68 for xf86-video-openchrome 0.6.0. # # Report bugs to . # # -# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software +# Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -134,31 +136,6 @@ # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH -# Use a proper internal environment variable to ensure we don't fall - # into an infinite loop, continuously re-executing ourselves. - if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then - _as_can_reexec=no; export _as_can_reexec; - # We cannot yet assume a decent shell, so we have to provide a -# neutralization value for shells without unset; and this also -# works around shells that cannot unset nonexistent variables. -# Preserve -v and -x to the replacement shell. -BASH_ENV=/dev/null -ENV=/dev/null -(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; -esac -exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} -# Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -as_fn_exit 255 - fi - # We don't want this to propagate to other subprocesses. - { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh @@ -192,8 +169,7 @@ else exitcode=1; echo positional parameters were not saved. fi -test x\$exitcode = x0 || exit 1 -test -x / || exit 1" +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'\" && @@ -246,25 +222,21 @@ if test "x$CONFIG_SHELL" != x; then : - export CONFIG_SHELL - # We cannot yet assume a decent shell, so we have to provide a -# neutralization value for shells without unset; and this also -# works around shells that cannot unset nonexistent variables. -# Preserve -v and -x to the replacement shell. -BASH_ENV=/dev/null -ENV=/dev/null -(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; -esac -exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} -# Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -exit 255 + # We cannot yet assume a decent shell, so we have to provide a + # neutralization value for shells without unset; and this also + # works around shells that cannot unset nonexistent variables. + # Preserve -v and -x to the replacement shell. + BASH_ENV=/dev/null + ENV=/dev/null + (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV + export CONFIG_SHELL + case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; + esac + exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} fi if test x$as_have_required = xno; then : @@ -368,14 +340,6 @@ } # as_fn_mkdir_p - -# as_fn_executable_p FILE -# ----------------------- -# Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take @@ -497,10 +461,6 @@ chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } - # If we had to re-execute with $CONFIG_SHELL, we're ensured to have - # already done that, so ensure we don't try to do so again and fall - # in an infinite loop. This has already happened in practice. - _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). @@ -535,16 +495,16 @@ # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. + # 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 -pR' + as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -pR' + as_ln_s='cp -p' fi else - as_ln_s='cp -pR' + as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -556,8 +516,28 @@ as_mkdir_p=false fi -as_test_x='test -x' -as_executable_p=as_fn_executable_p +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'" @@ -591,8 +571,8 @@ # Identity of this package. PACKAGE_NAME='xf86-video-openchrome' PACKAGE_TARNAME='xf86-video-openchrome' -PACKAGE_VERSION='0.5.0' -PACKAGE_STRING='xf86-video-openchrome 0.5.0' +PACKAGE_VERSION='0.6.0' +PACKAGE_STRING='xf86-video-openchrome 0.6.0' PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver/openchrome' PACKAGE_URL='' @@ -681,7 +661,6 @@ PKG_CONFIG_PATH PKG_CONFIG CPP -LT_SYS_LIBRARY_PATH OTOOL64 OTOOL LIPO @@ -731,10 +710,6 @@ MAINT MAINTAINER_MODE_FALSE MAINTAINER_MODE_TRUE -AM_BACKSLASH -AM_DEFAULT_VERBOSITY -AM_DEFAULT_V -AM_V am__untar am__tar AMTAR @@ -799,13 +774,11 @@ ac_subst_files='' ac_user_opts=' enable_option_checking -enable_silent_rules enable_maintainer_mode enable_static enable_shared with_pic enable_fast_install -with_aix_soname enable_dependency_tracking with_gnu_ld with_sysroot @@ -825,7 +798,6 @@ LDFLAGS LIBS CPPFLAGS -LT_SYS_LIBRARY_PATH CPP PKG_CONFIG PKG_CONFIG_PATH @@ -1297,6 +1269,8 @@ 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. + 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 fi @@ -1382,7 +1356,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures xf86-video-openchrome 0.5.0 to adapt to many kinds of systems. +\`configure' configures xf86-video-openchrome 0.6.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1453,7 +1427,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of xf86-video-openchrome 0.5.0:";; + short | recursive ) echo "Configuration of xf86-video-openchrome 0.6.0:";; esac cat <<\_ACEOF @@ -1461,19 +1435,14 @@ --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --enable-silent-rules less verbose build output (undo: "make V=1") - --disable-silent-rules verbose build output (undo: "make V=0") - --enable-maintainer-mode - enable make rules and dependencies not useful (and - sometimes confusing) to the casual installer + --enable-maintainer-mode enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer --enable-static[=PKGS] build static libraries [default=no] --enable-shared[=PKGS] build shared libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] - --enable-dependency-tracking - do not reject slow dependency extractors - --disable-dependency-tracking - speeds up one-time build + --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors --disable-libtool-lock avoid locking (might break parallel builds) --disable-largefile omit support for large files --enable-debug Enable debugging support [[default=no]] @@ -1485,12 +1454,9 @@ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use both] - --with-aix-soname=aix|svr4|both - shared library versioning (aka "SONAME") variant to - provide on AIX, [default=aix]. --with-gnu-ld assume the C compiler uses GNU ld [default=no] - --with-sysroot[=DIR] Search for dependent libraries within DIR (or the - compiler's sysroot if not specified). + --with-sysroot=DIR Search for dependent libraries within DIR + (or the compiler's sysroot if not specified). --with-xorg-module-dir=DIR Default xorg module directory [[default=$libdir/xorg/modules]] @@ -1505,8 +1471,6 @@ LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory - LT_SYS_LIBRARY_PATH - User-defined run-time library search path. CPP C preprocessor PKG_CONFIG path to pkg-config utility PKG_CONFIG_PATH @@ -1596,10 +1560,10 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -xf86-video-openchrome configure 0.5.0 -generated by GNU Autoconf 2.69 +xf86-video-openchrome configure 0.6.0 +generated by GNU Autoconf 2.68 -Copyright (C) 2012 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1675,7 +1639,7 @@ test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || - test -x conftest$ac_exeext + $as_test_x conftest$ac_exeext }; then : ac_retval=0 else @@ -1994,8 +1958,8 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by xf86-video-openchrome $as_me 0.5.0, which was -generated by GNU Autoconf 2.69. Invocation command line was +It was created by xf86-video-openchrome $as_me 0.6.0, which was +generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2392,7 +2356,7 @@ -am__api_version='1.15' +am__api_version='1.11' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or @@ -2431,7 +2395,7 @@ # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. @@ -2489,6 +2453,9 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } +# Just in case +sleep 1 +echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' @@ -2499,40 +2466,32 @@ esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; + as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; esac -# Do 'set' in a subshell so we don't clobber the current shell's +# Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( - am_has_slept=no - for am_try in 1 2; do - echo "timestamp, slept: $am_has_slept" > conftest.file - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$*" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - if test "$*" != "X $srcdir/configure conftest.file" \ - && test "$*" != "X conftest.file $srcdir/configure"; then + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + rm -f conftest.file + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken +alias in your environment" "$LINENO" 5 + fi - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - as_fn_error $? "ls -t appears to fail. Make sure there is not a broken - alias in your environment" "$LINENO" 5 - fi - if test "$2" = conftest.file || test $am_try -eq 2; then - break - fi - # Just in case. - sleep 1 - am_has_slept=yes - done test "$2" = conftest.file ) then @@ -2544,16 +2503,6 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } -# If we didn't sleep, we still need to ensure time stamps of config.status and -# generated files are strictly newer. -am_sleep_pid= -if grep 'slept: no' conftest.file >/dev/null 2>&1; then - ( sleep 1 ) & - am_sleep_pid=$! -fi - -rm -f conftest.file - test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. @@ -2564,8 +2513,8 @@ ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` -# Expand $ac_aux_dir to an absolute path. -am_aux_dir=`cd "$ac_aux_dir" && pwd` +# 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 @@ -2576,15 +2525,15 @@ esac fi # Use eval to expand $SHELL -if eval "$MISSING --is-lightweight"; then - am_missing_run="$MISSING " +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;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi -if test x"${install_sh+set}" != xset; then +if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; @@ -2593,10 +2542,10 @@ esac fi -# Installed binaries are usually stripped using 'strip' when the user -# run "make install-strip". However 'strip' might not be the right +# 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. +# 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. @@ -2615,7 +2564,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -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 @@ -2655,7 +2604,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -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 @@ -2706,7 +2655,7 @@ test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do - as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue + { 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) '* | \ @@ -2735,6 +2684,12 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } +mkdir_p="$MKDIR_P" +case $mkdir_p in + [\\/$]* | ?:[\\/]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac + for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. @@ -2753,7 +2708,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -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 break 2 @@ -2817,45 +2772,6 @@ fi rmdir .tst 2>/dev/null -# Check whether --enable-silent-rules was given. -if test "${enable_silent_rules+set}" = set; then : - enableval=$enable_silent_rules; -fi - -case $enable_silent_rules in # ((( - yes) AM_DEFAULT_VERBOSITY=0;; - no) AM_DEFAULT_VERBOSITY=1;; - *) AM_DEFAULT_VERBOSITY=1;; -esac -am_make=${MAKE-make} -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 -$as_echo_n "checking whether $am_make supports nested variables... " >&6; } -if ${am_cv_make_support_nested_variables+:} false; then : - $as_echo_n "(cached) " >&6 -else - if $as_echo 'TRUE=$(BAR$(V)) -BAR0=false -BAR1=true -V=1 -am__doit: - @$(TRUE) -.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then - am_cv_make_support_nested_variables=yes -else - am_cv_make_support_nested_variables=no -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 -$as_echo "$am_cv_make_support_nested_variables" >&6; } -if test $am_cv_make_support_nested_variables = yes; then - AM_V='$(V)' - AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' -else - AM_V=$AM_DEFAULT_VERBOSITY - AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY -fi -AM_BACKSLASH='\' - if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." @@ -2878,7 +2794,7 @@ # Define the identity of the package. PACKAGE='xf86-video-openchrome' - VERSION='0.5.0' + VERSION='0.6.0' cat >>confdefs.h <<_ACEOF @@ -2906,22 +2822,12 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} -# For better backward compatibility. To be removed once Automake 1.9.x -# dies out for good. For more background, see: -# -# -mkdir_p='$(MKDIR_P)' - -# We need awk for the "check" target (and possibly the TAP driver). The -# system "awk" is bad on some platforms. +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' - -# We'll loop over all known methods to create a tar archive until one works. -_am_tools='gnutar pax cpio none' - am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' @@ -2929,49 +2835,6 @@ -# POSIX will say in a future version that running "rm -f" with no argument -# is OK; and we want to be able to make that assumption in our Makefile -# recipes. So use an aggressive probe to check that the usage we want is -# actually supported "in the wild" to an acceptable degree. -# See automake bug#10828. -# To make any issue more visible, cause the running configure to be aborted -# by default if the 'rm' program in use doesn't match our expectations; the -# user can still override this though. -if rm -f && rm -fr && rm -rf; then : OK; else - cat >&2 <<'END' -Oops! - -Your 'rm' program seems unable to run without file operands specified -on the command line, even when the '-f' option is present. This is contrary -to the behaviour of most rm programs out there, and not conforming with -the upcoming POSIX standard: - -Please tell bug-automake@gnu.org about your system, including the value -of your $PATH and any error possibly output before this message. This -can help us improve future automake versions. - -END - if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then - echo 'Configuration will proceed anyway, since you have set the' >&2 - echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 - echo >&2 - else - cat >&2 <<'END' -Aborting the configuration process, to ensure you take notice of the issue. - -You can download and install GNU coreutils to get an 'rm' implementation -that behaves properly: . - -If you want to complete the configuration process using your problematic -'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM -to "yes", and re-run configure. - -END - as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 - fi -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } # Check whether --enable-maintainer-mode was given. @@ -3005,14 +2868,14 @@ *) enable_static=no # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do - IFS=$lt_save_ifs + IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done - IFS=$lt_save_ifs + IFS="$lt_save_ifs" ;; esac else @@ -3035,8 +2898,8 @@ -macro_version='2.4.6' -macro_revision='2.4.6' +macro_version='2.4.2' +macro_revision='1.3337' @@ -3050,7 +2913,7 @@ -ltmain=$ac_aux_dir/ltmain.sh +ltmain="$ac_aux_dir/ltmain.sh" # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || @@ -3170,7 +3033,7 @@ $ECHO "" } -case $ECHO in +case "$ECHO" in printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 $as_echo "printf" >&6; } ;; print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 @@ -3211,7 +3074,7 @@ _am_result=none # First try GNU make style include. echo "include confinc" > confmf -# Ignore all kinds of additional output from 'make'. +# 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 @@ -3277,7 +3140,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -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 @@ -3317,7 +3180,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -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 @@ -3370,7 +3233,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -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 @@ -3411,7 +3274,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -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 @@ -3469,7 +3332,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -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 @@ -3513,7 +3376,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -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 @@ -3959,7 +3822,8 @@ /* end confdefs.h. */ #include #include -struct stat; +#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); @@ -4044,65 +3908,6 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 -$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } -if ${am_cv_prog_cc_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF - # Make sure it works both with $CC and with simple cc. - # Following AC_PROG_CC_C_O, we do the test twice because some - # compilers refuse to overwrite an existing .o file with -o, - # though they will create one. - am_cv_prog_cc_c_o=yes - for am_i in 1 2; do - if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 - ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } \ - && test -f conftest2.$ac_objext; then - : OK - else - am_cv_prog_cc_c_o=no - break - fi - done - rm -f core conftest* - unset am_i -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 -$as_echo "$am_cv_prog_cc_c_o" >&6; } -if test "$am_cv_prog_cc_c_o" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 @@ -4114,8 +3919,8 @@ # 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". + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're @@ -4150,16 +3955,16 @@ : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with - # Solaris 10 /bin/sh. - echo '/* dummy */' > sub/conftst$i.h + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - # We check with '-c' and '-o' for the sake of the "dashmstdout" + # 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. + # 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 @@ -4168,8 +3973,8 @@ test "$am__universal" = false || continue ;; nosideeffect) - # After this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested. + # 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 @@ -4177,7 +3982,7 @@ fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok '-c -o', but also, the minuso test has + # 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} @@ -4253,7 +4058,7 @@ for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_SED" || continue + { 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 @@ -4329,7 +4134,7 @@ for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_GREP" || continue + { 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 @@ -4395,7 +4200,7 @@ for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_EGREP" || continue + { 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 @@ -4462,7 +4267,7 @@ for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_FGREP" || continue + { 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 @@ -4532,19 +4337,19 @@ # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : - withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld -if test yes = "$GCC"; then +if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) - # gcc leaves a trailing carriage return, which upsets mingw + # 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` ;; @@ -4558,7 +4363,7 @@ 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 + test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. @@ -4569,7 +4374,7 @@ with_gnu_ld=unknown ;; esac -elif test yes = "$with_gnu_ld"; then +elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else @@ -4580,32 +4385,32 @@ $as_echo_n "(cached) " >&6 else if test -z "$LD"; then - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do - IFS=$lt_save_ifs + 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 + lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } @@ -4648,38 +4453,33 @@ else if test -n "$NM"; then # Let the user override the test. - lt_cv_path_NM=$NM + lt_cv_path_NM="$NM" else - lt_nm_to_check=${ac_tool_prefix}nm + lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS=$lt_save_ifs + IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. - tmp_nm=$ac_dir/$lt_tmp_nm - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. - # Adding the 'sed 1q' prevents false positives on HP-UX, which says: + # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file - # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty - case $build_os in - mingw*) lt_bad_file=conftest.nm/nofile ;; - *) lt_bad_file=/dev/null ;; - esac - case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in - *$lt_bad_file* | *'Invalid file or object type'*) + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" - break 2 + break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" - break 2 + break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but @@ -4690,15 +4490,15 @@ esac fi done - IFS=$lt_save_ifs + IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } -if test no != "$lt_cv_path_NM"; then - NM=$lt_cv_path_NM +if test "$lt_cv_path_NM" != "no"; then + NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : @@ -4723,7 +4523,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -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 @@ -4767,7 +4567,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -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 @@ -4804,9 +4604,9 @@ fi fi - case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in + case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) - DUMPBIN="$DUMPBIN -symbols -headers" + DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: @@ -4814,8 +4614,8 @@ esac fi - if test : != "$DUMPBIN"; then - NM=$DUMPBIN + if test "$DUMPBIN" != ":"; then + NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm @@ -4866,7 +4666,7 @@ $as_echo_n "(cached) " >&6 else i=0 - teststring=ABCD + teststring="ABCD" case $build_os in msdosdjgpp*) @@ -4906,7 +4706,7 @@ lt_cv_sys_max_cmd_len=8192; ;; - bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) + 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` @@ -4956,23 +4756,22 @@ ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len" && \ - test undefined != "$lt_cv_sys_max_cmd_len"; then + 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 + for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. - while { test X`env echo "$teststring$teststring" 2>/dev/null` \ + while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && - test 17 != "$i" # 1/2 MB should be enough + test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring @@ -4990,7 +4789,7 @@ fi -if test -n "$lt_cv_sys_max_cmd_len"; then +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 @@ -5008,6 +4807,30 @@ : ${MV="mv -f"} : ${RM="rm -f"} +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 +$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } +# Try some XSI features +xsi_shell=no +( _lt_dummy="a/b/c" + test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,b/c, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 +$as_echo "$xsi_shell" >&6; } + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 +$as_echo_n "checking whether the shell understands \"+=\"... " >&6; } +lt_shell_append=no +( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ + >/dev/null 2>&1 \ + && lt_shell_append=yes +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 +$as_echo "$lt_shell_append" >&6; } + + if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else @@ -5130,13 +4953,13 @@ reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in cygwin* | mingw* | pw32* | cegcc*) - if test yes != "$GCC"; then + if test "$GCC" != yes; then reload_cmds=false fi ;; darwin*) - if test yes = "$GCC"; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' + 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 @@ -5168,7 +4991,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -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 @@ -5208,7 +5031,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -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 @@ -5264,13 +5087,13 @@ # 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. +# `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path -# that responds to the $file_magic_cmd with a given extended regex. -# If you have 'file' or equivalent on your system and you're not sure -# whether 'pass_all' will *always* work, you probably want this one. +# which responds to the $file_magic_cmd with a given extended regex. +# If you have `file' or equivalent on your system and you're not sure +# whether `pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) @@ -5297,7 +5120,8 @@ # 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 + # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. + if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else @@ -5333,6 +5157,10 @@ fi ;; +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + haiku*) lt_cv_deplibs_check_method=pass_all ;; @@ -5371,11 +5199,11 @@ ;; # This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) +linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; -netbsd*) +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 @@ -5393,8 +5221,8 @@ lt_cv_deplibs_check_method=pass_all ;; -openbsd* | bitrig*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then +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)$' @@ -5447,9 +5275,6 @@ tpf*) lt_cv_deplibs_check_method=pass_all ;; -os2*) - lt_cv_deplibs_check_method=pass_all - ;; esac fi @@ -5512,7 +5337,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5552,7 +5377,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5607,8 +5432,8 @@ case $host_os in cygwin* | mingw* | pw32* | cegcc*) - # two different shell functions defined in ltmain.sh; - # decide which one to use based on capabilities of $DLLTOOL + # two different shell functions defined in ltmain.sh + # decide which to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib @@ -5620,7 +5445,7 @@ ;; *) # fallback: assume linklib IS sharedlib - lt_cv_sharedlib_from_linklib_cmd=$ECHO + lt_cv_sharedlib_from_linklib_cmd="$ECHO" ;; esac @@ -5656,7 +5481,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -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$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5700,7 +5525,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -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="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5775,7 +5600,7 @@ ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } - if test 0 -eq "$ac_status"; then + if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 @@ -5783,7 +5608,7 @@ ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } - if test 0 -ne "$ac_status"; then + if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi @@ -5796,7 +5621,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 $as_echo "$lt_cv_ar_at_file" >&6; } -if test no = "$lt_cv_ar_at_file"; then +if test "x$lt_cv_ar_at_file" = xno; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file @@ -5825,7 +5650,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -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 @@ -5865,7 +5690,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -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 @@ -5924,7 +5749,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -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 @@ -5964,7 +5789,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -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 @@ -6013,7 +5838,7 @@ if test -n "$RANLIB"; then case $host_os in - bitrig* | openbsd*) + openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) @@ -6103,7 +5928,7 @@ symcode='[ABCDGISTW]' ;; hpux*) - if test ia64 = "$host_cpu"; then + if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi ;; @@ -6136,44 +5961,14 @@ symcode='[ABCDGIRSTW]' ;; esac -if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Gets list of data symbols to import. - lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" - # Adjust the below global symbol transforms to fixup imported variables. - lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" - lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" - lt_c_name_lib_hook="\ - -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ - -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" -else - # Disable hooks by default. - lt_cv_sys_global_symbol_to_import= - lt_cdecl_hook= - lt_c_name_hook= - lt_c_name_lib_hook= -fi - # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n"\ -$lt_cdecl_hook\ -" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ -$lt_c_name_hook\ -" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" - -# Transform an extracted symbol line into symbol name with lib prefix and -# symbol address. -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ -$lt_c_name_lib_hook\ -" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ -" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" +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= @@ -6191,24 +5986,21 @@ # 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, - # D for any global variable and I for any imported variable. + # 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};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ -" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ -" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ -" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ -" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ -" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ -" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ +" {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'" @@ -6256,11 +6048,11 @@ if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE -/* DATA imports from DLLs on WIN32 can't be const, because runtime +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST -#elif defined __osf__ +#elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else @@ -6286,7 +6078,7 @@ { { "@PROGRAM@", (void *) 0 }, _LT_EOF - $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; @@ -6306,13 +6098,13 @@ mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS - LIBS=conftstm.$ac_objext + LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest$ac_exeext; then + test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS @@ -6333,7 +6125,7 @@ rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. - if test yes = "$pipe_works"; then + if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= @@ -6386,16 +6178,6 @@ - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 $as_echo_n "checking for sysroot... " >&6; } @@ -6408,9 +6190,9 @@ lt_sysroot= -case $with_sysroot in #( +case ${with_sysroot} in #( yes) - if test yes = "$GCC"; then + if test "$GCC" = yes; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( @@ -6420,8 +6202,8 @@ no|'') ;; #( *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 -$as_echo "$with_sysroot" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 +$as_echo "${with_sysroot}" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac @@ -6433,99 +6215,18 @@ -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 -$as_echo_n "checking for a working dd... " >&6; } -if ${ac_cv_path_lt_DD+:} false; then : - $as_echo_n "(cached) " >&6 -else - printf 0123456789abcdef0123456789abcdef >conftest.i -cat conftest.i conftest.i >conftest2.i -: ${lt_DD:=$DD} -if test -z "$lt_DD"; then - ac_path_lt_DD_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in dd; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_lt_DD" || continue -if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then - cmp -s conftest.i conftest.out \ - && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: -fi - $ac_path_lt_DD_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_lt_DD"; then - : - fi -else - ac_cv_path_lt_DD=$lt_DD -fi - -rm -f conftest.i conftest2.i conftest.out -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 -$as_echo "$ac_cv_path_lt_DD" >&6; } - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 -$as_echo_n "checking how to truncate binary pipes... " >&6; } -if ${lt_cv_truncate_bin+:} false; then : - $as_echo_n "(cached) " >&6 -else - printf 0123456789abcdef0123456789abcdef >conftest.i -cat conftest.i conftest.i >conftest2.i -lt_cv_truncate_bin= -if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then - cmp -s conftest.i conftest.out \ - && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" -fi -rm -f conftest.i conftest2.i conftest.out -test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 -$as_echo "$lt_cv_truncate_bin" >&6; } - - - - - - - -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -func_cc_basename () -{ - for cc_temp in $*""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac - done - func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` -} - # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi -test no = "$enable_libtool_lock" || enable_libtool_lock=yes +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 what ABI is being produced by ac_compile, and set mode - # options accordingly. + # 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 @@ -6534,25 +6235,24 @@ test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) - HPUX_IA64_MODE=32 + HPUX_IA64_MODE="32" ;; *ELF-64*) - HPUX_IA64_MODE=64 + HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. + # Find out which ABI we are using. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - if test yes = "$lt_cv_prog_gnu_ld"; then + if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" @@ -6581,50 +6281,9 @@ rm -rf conftest* ;; -mips64*-*linux*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. - echo '#line '$LINENO' "configure"' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - emul=elf - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - emul="${emul}32" - ;; - *64-bit*) - emul="${emul}64" - ;; - esac - case `/usr/bin/file conftest.$ac_objext` in - *MSB*) - emul="${emul}btsmip" - ;; - *LSB*) - emul="${emul}ltsmip" - ;; - esac - case `/usr/bin/file conftest.$ac_objext` in - *N32*) - emul="${emul}n32" - ;; - esac - LD="${LD-ld} -m $emul" - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ +x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. Note that the listed cases only cover the - # situations where additional linker options are needed (such as when - # doing 32-bit compilation for a host where ld defaults to 64-bit, or - # vice versa); the common cases where no linker options are needed do - # not appear in the list. + # 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 @@ -6638,19 +6297,9 @@ LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) - case `/usr/bin/file conftest.o` in - *x86-64*) - LD="${LD-ld} -m elf32_x86_64" - ;; - *) - LD="${LD-ld} -m elf_i386" - ;; - esac + LD="${LD-ld} -m elf_i386" ;; - powerpc64le-*linux*) - LD="${LD-ld} -m elf32lppclinux" - ;; - powerpc64-*linux*) + ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) @@ -6669,10 +6318,7 @@ x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; - powerpcle-*linux*) - LD="${LD-ld} -m elf64lppc" - ;; - powerpc-*linux*) + ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) @@ -6690,7 +6336,7 @@ *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS=$CFLAGS + 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; } @@ -6730,14 +6376,13 @@ 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 yes != "$lt_cv_cc_needs_belf"; then + 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 + CFLAGS="$SAVE_CFLAGS" fi ;; *-*solaris*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. + # 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 @@ -6749,7 +6394,7 @@ case $lt_cv_prog_gnu_ld in yes*) case $host in - i?86-*-solaris*|x86_64-*-solaris*) + i?86-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) @@ -6758,7 +6403,7 @@ esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then - LD=${LD-ld}_sol2 + LD="${LD-ld}_sol2" fi ;; *) @@ -6774,7 +6419,7 @@ ;; esac -need_locks=$enable_libtool_lock +need_locks="$enable_libtool_lock" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. @@ -6793,7 +6438,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6833,7 +6478,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6885,7 +6530,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 $as_echo "$lt_cv_path_mainfest_tool" >&6; } -if test yes != "$lt_cv_path_mainfest_tool"; then +if test "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi @@ -6913,7 +6558,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -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 break 2 @@ -6953,7 +6598,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -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 break 2 @@ -7005,7 +6650,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -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 break 2 @@ -7045,7 +6690,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -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 break 2 @@ -7097,7 +6742,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -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 break 2 @@ -7137,7 +6782,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -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 break 2 @@ -7189,7 +6834,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -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 break 2 @@ -7229,7 +6874,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -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 break 2 @@ -7281,7 +6926,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -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 break 2 @@ -7321,7 +6966,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -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 break 2 @@ -7388,7 +7033,7 @@ $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no - if test -z "$LT_MULTI_MODULE"; then + 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 @@ -7406,7 +7051,7 @@ cat conftest.err >&5 # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. - elif test -f libconftest.dylib && test 0 = "$_lt_result"; then + elif test -f libconftest.dylib && test $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 @@ -7445,7 +7090,7 @@ fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS + LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 @@ -7474,7 +7119,7 @@ _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&5 - elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then + elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then lt_cv_ld_force_load=yes else cat conftest.err >&5 @@ -7487,32 +7132,32 @@ $as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) - _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; - 10.[012][,.]*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; + _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' ;; + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac - if test yes = "$lt_cv_apple_cc_single_mod"; then + if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi - if test yes = "$lt_cv_ld_exported_symbols_list"; then - _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' + 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" && test no = "$lt_cv_ld_force_load"; then + if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= @@ -7520,41 +7165,6 @@ ;; esac -# func_munge_path_list VARIABLE PATH -# ----------------------------------- -# VARIABLE is name of variable containing _space_ separated list of -# directories to be munged by the contents of PATH, which is string -# having a format: -# "DIR[:DIR]:" -# string "DIR[ DIR]" will be prepended to VARIABLE -# ":DIR[:DIR]" -# string "DIR[ DIR]" will be appended to VARIABLE -# "DIRP[:DIRP]::[DIRA:]DIRA" -# string "DIRP[ DIRP]" will be prepended to VARIABLE and string -# "DIRA[ DIRA]" will be appended to VARIABLE -# "DIR[:DIR]" -# VARIABLE will be replaced by "DIR[ DIR]" -func_munge_path_list () -{ - case x$2 in - x) - ;; - *:) - eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" - ;; - x:*) - eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" - ;; - *::*) - eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" - eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" - ;; - *) - eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" - ;; - esac -} - ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -7858,14 +7468,14 @@ *) enable_shared=no # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do - IFS=$lt_save_ifs + IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done - IFS=$lt_save_ifs + IFS="$lt_save_ifs" ;; esac else @@ -7890,14 +7500,14 @@ *) pic_mode=default # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for lt_pkg in $withval; do - IFS=$lt_save_ifs + IFS="$lt_save_ifs" if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done - IFS=$lt_save_ifs + IFS="$lt_save_ifs" ;; esac else @@ -7905,6 +7515,8 @@ fi +test -z "$pic_mode" && pic_mode=default + @@ -7920,14 +7532,14 @@ *) 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, + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do - IFS=$lt_save_ifs + IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done - IFS=$lt_save_ifs + IFS="$lt_save_ifs" ;; esac else @@ -7941,63 +7553,11 @@ - shared_archive_member_spec= -case $host,$enable_shared in -power*-*-aix[5-9]*,yes) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 -$as_echo_n "checking which variant of shared library versioning to provide... " >&6; } - -# Check whether --with-aix-soname was given. -if test "${with_aix_soname+set}" = set; then : - withval=$with_aix_soname; case $withval in - aix|svr4|both) - ;; - *) - as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5 - ;; - esac - lt_cv_with_aix_soname=$with_aix_soname -else - if ${lt_cv_with_aix_soname+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_with_aix_soname=aix -fi - - with_aix_soname=$lt_cv_with_aix_soname -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 -$as_echo "$with_aix_soname" >&6; } - if test aix != "$with_aix_soname"; then - # For the AIX way of multilib, we name the shared archive member - # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', - # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. - # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, - # the AIX toolchain works better with OBJECT_MODE set (default 32). - if test 64 = "${OBJECT_MODE-32}"; then - shared_archive_member_spec=shr_64 - else - shared_archive_member_spec=shr - fi - fi - ;; -*) - with_aix_soname=aix - ;; -esac - - - - - - - # This can be used to rebuild libtool when needed -LIBTOOL_DEPS=$ltmain +LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' @@ -8046,7 +7606,7 @@ -if test -n "${ZSH_VERSION+set}"; then +if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi @@ -8085,7 +7645,7 @@ # 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 set != "${COLLECT_NAMES+set}"; then + if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi @@ -8096,14 +7656,14 @@ ofile=libtool can_build_shared=yes -# All known linkers require a '.a' archive for static linking (except MSVC, +# All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a -with_gnu_ld=$lt_cv_prog_gnu_ld +with_gnu_ld="$lt_cv_prog_gnu_ld" -old_CC=$CC -old_CFLAGS=$CFLAGS +old_CC="$CC" +old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc @@ -8112,8 +7672,15 @@ test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o -func_cc_basename $compiler -cc_basename=$func_cc_basename_result +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it @@ -8128,22 +7695,22 @@ else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. + 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 + 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 + 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 -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 + 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 : @@ -8166,13 +7733,13 @@ break fi done - IFS=$lt_save_ifs - MAGIC_CMD=$lt_save_MAGIC_CMD + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi -MAGIC_CMD=$lt_cv_path_MAGIC_CMD +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; } @@ -8194,22 +7761,22 @@ else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. + 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 + 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 + 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 -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 + 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 : @@ -8232,13 +7799,13 @@ break fi done - IFS=$lt_save_ifs - MAGIC_CMD=$lt_save_MAGIC_CMD + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi -MAGIC_CMD=$lt_cv_path_MAGIC_CMD +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; } @@ -8259,7 +7826,7 @@ # Use C for the default configuration in the libtool script -lt_save_CC=$CC +lt_save_CC="$CC" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -8317,7 +7884,7 @@ lt_prog_compiler_no_builtin_flag= -if test yes = "$GCC"; then +if test "$GCC" = yes; then case $cc_basename in nvcc*) lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; @@ -8333,7 +7900,7 @@ lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment + 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 @@ -8363,7 +7930,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } -if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then +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 : @@ -8381,18 +7948,17 @@ lt_prog_compiler_static= - if test yes = "$GCC"; then + 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 ia64 = "$host_cpu"; then + if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi - lt_prog_compiler_pic='-fPIC' ;; amigaos*) @@ -8403,8 +7969,8 @@ ;; 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'. + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac @@ -8420,11 +7986,6 @@ # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' - case $host_os in - os2*) - lt_prog_compiler_static='$wl-static' - ;; - esac ;; darwin* | rhapsody*) @@ -8495,7 +8056,7 @@ case $host_os in aix*) lt_prog_compiler_wl='-Wl,' - if test ia64 = "$host_cpu"; then + if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else @@ -8503,29 +8064,10 @@ fi ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic='-fno-common' - case $cc_basename in - nagfor*) - # NAG Fortran compiler - lt_prog_compiler_wl='-Wl,-Wl,,' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - esac - ;; - mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' - case $host_os in - os2*) - lt_prog_compiler_static='$wl-static' - ;; - esac ;; hpux9* | hpux10* | hpux11*) @@ -8541,7 +8083,7 @@ ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static='$wl-a ${wl}archive' + lt_prog_compiler_static='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) @@ -8550,9 +8092,9 @@ lt_prog_compiler_static='-non_shared' ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in - # old Intel for x86_64, which still supported -KPIC. + # old Intel for x86_64 which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' @@ -8577,12 +8119,6 @@ lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; - tcc*) - # Fabrice Bellard et al's Tiny C Compiler - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) @@ -8680,7 +8216,7 @@ ;; sysv4*MP*) - if test -d /usr/nec; then + if test -d /usr/nec ;then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi @@ -8709,7 +8245,7 @@ fi case $host_os in - # For platforms that do not support PIC, -DPIC is meaningless: + # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; @@ -8741,7 +8277,7 @@ lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment + 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 @@ -8771,7 +8307,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } -if test yes = "$lt_cv_prog_compiler_pic_works"; then +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" ;; @@ -8803,7 +8339,7 @@ $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no - save_LDFLAGS=$LDFLAGS + 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 @@ -8822,13 +8358,13 @@ fi fi $RM -r conftest* - LDFLAGS=$save_LDFLAGS + LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } -if test yes = "$lt_cv_prog_compiler_static_works"; then +if test x"$lt_cv_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= @@ -8948,8 +8484,8 @@ -hard_links=nottested -if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then +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; } @@ -8961,9 +8497,9 @@ 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 no = "$hard_links"; 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;} + 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 @@ -9006,9 +8542,9 @@ # 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'. + # 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 @@ -9023,7 +8559,7 @@ # 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 yes != "$GCC"; then + if test "$GCC" != yes; then with_gnu_ld=no fi ;; @@ -9031,9 +8567,12 @@ # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; - openbsd* | bitrig*) + openbsd*) with_gnu_ld=no ;; + linux* | k*bsd*-gnu | gnu*) + link_all_deplibs=no + ;; esac ld_shlibs=yes @@ -9041,7 +8580,7 @@ # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no - if test yes = "$with_gnu_ld"; then + if test "$with_gnu_ld" = yes; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility @@ -9063,24 +8602,24 @@ esac fi - if test yes = "$lt_use_gnu_ld_interface"; then + if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='$wl' + 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' + 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' + 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 | $SED -e 's/(^)\+)\s\+//' 2>&1` in + 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 ... @@ -9093,7 +8632,7 @@ case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken - if test ia64 != "$host_cpu"; then + if test "$host_cpu" != ia64; then ld_shlibs=no cat <<_LT_EOF 1>&2 @@ -9112,7 +8651,7 @@ 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_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) @@ -9128,7 +8667,7 @@ 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' + archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi @@ -9138,7 +8677,7 @@ # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' - export_dynamic_flag_spec='$wl--export-all-symbols' + export_dynamic_flag_spec='${wl}--export-all-symbols' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes @@ -9146,89 +8685,61 @@ exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file, use it as - # is; otherwise, prepend EXPORTS... - archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then - cp $export_symbols $output_objdir/$soname.def; - 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' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; haiku*) - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' link_all_deplibs=yes ;; - os2*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - allow_undefined_flag=unsupported - shrext_cmds=.dll - archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - prefix_cmds="$SED"~ - if test EXPORTS = "`$SED 1q $export_symbols`"; then - prefix_cmds="$prefix_cmds -e 1d"; - fi~ - prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ - cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' - enable_shared_with_static_runtimes=yes - ;; - interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='$wl-rpath,$libdir' - export_dynamic_flag_spec='$wl-E' + 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' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no - if test linux-dietlibc = "$host_os"; then + 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 no = "$tmp_diet" + && test "$tmp_diet" = no then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler - whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers - whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; @@ -9239,47 +8750,42 @@ lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; - nagfor*) # NAGFOR 5.3 - tmp_sharedflag='-Wl,-shared' ;; xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 - whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' + whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac - archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - if test yes = "$supports_anon_versioning"; then + 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' + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in - tcc*) - export_dynamic_flag_spec='-rdynamic' - ;; xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' - if test yes = "$supports_anon_versioning"; then + if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac @@ -9288,13 +8794,13 @@ fi ;; - netbsd*) + 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 $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; @@ -9312,8 +8818,8 @@ _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi @@ -9325,7 +8831,7 @@ ld_shlibs=no cat <<_LT_EOF 1>&2 -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot +*** 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 @@ -9340,9 +8846,9 @@ # 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' + 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 @@ -9359,15 +8865,15 @@ *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac - if test no = "$ld_shlibs"; then + if test "$ld_shlibs" = no; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= @@ -9383,7 +8889,7 @@ # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes - if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then + 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 @@ -9391,57 +8897,34 @@ ;; aix[4-9]*) - if test ia64 = "$host_cpu"; then + 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= + no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to GNU nm, but means don't demangle to AIX nm. - # Without the "-l" option, or with the "-B" option, AIX nm treats - # weak defined symbols like other global defined symbols, whereas - # GNU nm marks them as "W". - # While the 'weak' keyword is ignored in the Export File, we need - # it in the Import File for the 'aix-soname' feature, so we have - # to replace the "-B" option with "-P" for AIX nm. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global + # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' + export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else - export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' + 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 - # have runtime linking enabled, and use it for executables. - # For shared libraries, we enable/disable runtime linking - # depending on the kind of the shared library created - - # when "with_aix_soname,aix_use_runtimelinking" is: - # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables - # "aix,yes" lib.so shared, rtl:yes, for executables - # lib.a static archive - # "both,no" lib.so.V(shr.o) shared, rtl:yes - # lib.a(lib.so.V) shared, rtl:no, for executables - # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a(lib.so.V) shared, rtl:no - # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a static archive + # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do - if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done - if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then - # With aix-soname=svr4, we create the lib.so.V shared archives only, - # so we don't have lib.a shared libs to link our executables. - # We have to force runtime linking in this case. - aix_use_runtimelinking=yes - LDFLAGS="$LDFLAGS -Wl,-brtl" - fi ;; esac @@ -9460,21 +8943,13 @@ hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes - file_list_spec='$wl-f,' - case $with_aix_soname,$aix_use_runtimelinking in - aix,*) ;; # traditional, no import file - svr4,* | *,yes) # use import file - # The Import File defines what to hardcode. - hardcode_direct=no - hardcode_direct_absolute=no - ;; - esac + file_list_spec='${wl}-f,' - if test yes = "$GCC"; then + 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` + collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then @@ -9493,42 +8968,36 @@ ;; esac shared_flag='-shared' - if test yes = "$aix_use_runtimelinking"; then - shared_flag="$shared_flag "'$wl-G' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' fi - # Need to ensure runtime linking is disabled for the traditional - # shared library, or the linker may eventually find shared libraries - # /with/ Import File - we do not want to mix them. - shared_flag_aix='-shared' - shared_flag_svr4='-shared $wl-G' + link_all_deplibs=no else # not using gcc - if test ia64 = "$host_cpu"; then + 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 yes = "$aix_use_runtimelinking"; then - shared_flag='$wl-G' + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' else - shared_flag='$wl-bM:SRE' + shared_flag='${wl}-bM:SRE' fi - shared_flag_aix='$wl-bM:SRE' - shared_flag_svr4='$wl-G' fi fi - export_dynamic_flag_spec='$wl-bexpall' + 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,yes = "$with_aix_soname,$aix_use_runtimelinking"; then + if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. - if test set = "${lt_cv_aix_libpath+set}"; then + if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : @@ -9563,7 +9032,7 @@ rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=/usr/lib:/lib + lt_cv_aix_libpath_="/usr/lib:/lib" fi fi @@ -9571,17 +9040,17 @@ aix_libpath=$lt_cv_aix_libpath_ fi - hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else - if test ia64 = "$host_cpu"; then - hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib' + 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" + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. - if test set = "${lt_cv_aix_libpath+set}"; then + if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : @@ -9616,7 +9085,7 @@ rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=/usr/lib:/lib + lt_cv_aix_libpath_="/usr/lib:/lib" fi fi @@ -9624,33 +9093,21 @@ aix_libpath=$lt_cv_aix_libpath_ fi - hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. - no_undefined_flag=' $wl-bernotok' - allow_undefined_flag=' $wl-berok' - if test yes = "$with_gnu_ld"; then + no_undefined_flag=' ${wl}-bernotok' + allow_undefined_flag=' ${wl}-berok' + if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. - whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive' + whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' fi archive_cmds_need_lc=yes - archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' - # -brtl affects multiple linker settings, -berok does not and is overridden later - compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' - if test svr4 != "$with_aix_soname"; then - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' - fi - if test aix != "$with_aix_soname"; then - archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' - else - # used by -dlpreopen to get the symbols - archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir' - fi - archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d' + # 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 ;; @@ -9659,7 +9116,7 @@ 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_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) @@ -9689,17 +9146,16 @@ # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. - shrext_cmds=.dll + shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' - archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then - cp "$export_symbols" "$output_objdir/$soname.def"; - echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; - else - $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' + archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' enable_shared_with_static_runtimes=yes @@ -9708,18 +9164,18 @@ # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' postlink_cmds='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile=$lt_outputfile.exe - lt_tool_outputfile=$lt_tool_outputfile.exe - ;; - esac~ - if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' ;; *) # Assume MSVC wrapper @@ -9728,7 +9184,7 @@ # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. - shrext_cmds=.dll + shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. @@ -9747,24 +9203,24 @@ hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported - if test yes = "$lt_cv_ld_force_load"; then - whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + if test "$lt_cv_ld_force_load" = "yes"; then + whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec='' fi link_all_deplibs=yes - allow_undefined_flag=$_lt_dar_allow_undefined + allow_undefined_flag="$_lt_dar_allow_undefined" case $cc_basename in - ifort*|nagfor*) _lt_dar_can_shared=yes ;; + ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac - if test yes = "$_lt_dar_can_shared"; then + if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all - archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" - module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" - archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" - module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" + archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else ld_shlibs=no @@ -9806,33 +9262,33 @@ ;; hpux9*) - if test yes = "$GCC"; then - archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' + if test "$GCC" = yes; then + archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else - archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' + 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_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes - export_dynamic_flag_spec='$wl-E' + export_dynamic_flag_spec='${wl}-E' ;; hpux10*) - if test yes,no = "$GCC,$with_gnu_ld"; then - archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + if test "$GCC" = yes && test "$with_gnu_ld" = no; then + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi - if test no = "$with_gnu_ld"; then - hardcode_libdir_flag_spec='$wl+b $wl$libdir' + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes - export_dynamic_flag_spec='$wl-E' + 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 @@ -9840,25 +9296,25 @@ ;; hpux11*) - if test yes,no = "$GCC,$with_gnu_ld"; then + if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) - archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) - archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) - archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' + 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}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) @@ -9870,7 +9326,7 @@ $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler__b=no - save_LDFLAGS=$LDFLAGS + save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -b" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then @@ -9889,14 +9345,14 @@ fi fi $RM -r conftest* - LDFLAGS=$save_LDFLAGS + LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 $as_echo "$lt_cv_prog_compiler__b" >&6; } -if test yes = "$lt_cv_prog_compiler__b"; then - archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' +if test x"$lt_cv_prog_compiler__b" = xyes; then + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi @@ -9904,8 +9360,8 @@ ;; esac fi - if test no = "$with_gnu_ld"; then - hardcode_libdir_flag_spec='$wl+b $wl$libdir' + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in @@ -9916,7 +9372,7 @@ *) hardcode_direct=yes hardcode_direct_absolute=yes - export_dynamic_flag_spec='$wl-E' + export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. @@ -9927,8 +9383,8 @@ ;; irix5* | irix6* | nonstopux*) - if test yes = "$GCC"; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + if test "$GCC" = yes; then + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. @@ -9938,8 +9394,8 @@ if ${lt_cv_irix_exported_symbol+:} false; then : $as_echo_n "(cached) " >&6 else - save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } @@ -9951,35 +9407,25 @@ fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS + LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 $as_echo "$lt_cv_irix_exported_symbol" >&6; } - if test yes = "$lt_cv_irix_exported_symbol"; then - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' + if test "$lt_cv_irix_exported_symbol" = yes; then + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; - linux*) - case $cc_basename in - tcc*) - # Fabrice Bellard et al's Tiny C Compiler - ld_shlibs=yes - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - netbsd*) + 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 @@ -9993,7 +9439,7 @@ 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_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; @@ -10001,19 +9447,27 @@ *nto* | *qnx*) ;; - openbsd* | bitrig*) + 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__`"; then + 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' + 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 - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='$wl-rpath,$libdir' + 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 @@ -10024,53 +9478,33 @@ hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported - shrext_cmds=.dll - archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - prefix_cmds="$SED"~ - if test EXPORTS = "`$SED 1q $export_symbols`"; then - prefix_cmds="$prefix_cmds -e 1d"; - fi~ - prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ - cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' - enable_shared_with_static_runtimes=yes + 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 yes = "$GCC"; then - allow_undefined_flag=' $wl-expect_unresolved $wl\*' - archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag - if test yes = "$GCC"; then - allow_undefined_flag=' $wl-expect_unresolved $wl\*' - archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' + $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' @@ -10081,24 +9515,24 @@ solaris*) no_undefined_flag=' -z defs' - if test yes = "$GCC"; then - wlarc='$wl' - archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' + if test "$GCC" = yes; then + wlarc='${wl}' + archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' - archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_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' + $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' + 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' + $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi @@ -10108,11 +9542,11 @@ 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 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 yes = "$GCC"; then - whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' + 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 @@ -10122,10 +9556,10 @@ ;; sunos4*) - if test sequent = "$host_vendor"; then + 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' + 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 @@ -10174,43 +9608,43 @@ ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag='$wl-z,text' + no_undefined_flag='${wl}-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' - if test yes = "$GCC"; 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' + 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' + 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 CANNOT use -z defs as we might desire, because we do not + # 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' + 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_flag_spec='${wl}-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes - export_dynamic_flag_spec='$wl-Bexport' + export_dynamic_flag_spec='${wl}-Bexport' runpath_var='LD_RUN_PATH' - if test yes = "$GCC"; 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' + 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' + 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 ;; @@ -10225,10 +9659,10 @@ ;; esac - if test sni = "$host_vendor"; then + if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - export_dynamic_flag_spec='$wl-Blargedynsym' + export_dynamic_flag_spec='${wl}-Blargedynsym' ;; esac fi @@ -10236,7 +9670,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } -test no = "$ld_shlibs" && can_build_shared=no +test "$ld_shlibs" = no && can_build_shared=no with_gnu_ld=$with_gnu_ld @@ -10262,7 +9696,7 @@ # Assume -lc should be added archive_cmds_need_lc=yes - if test yes,yes = "$GCC,$enable_shared"; then + if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. @@ -10477,14 +9911,14 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } -if test yes = "$GCC"; then +if test "$GCC" = yes; then case $host_os in - darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; - *) lt_awk_arg='/^libraries:/' ;; + darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; + *) lt_awk_arg="/^libraries:/" ;; esac case $host_os in - mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;; - *) lt_sed_strip_eq='s|=/|/|g' ;; + mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; + *) lt_sed_strip_eq="s,=/,/,g" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in @@ -10500,35 +9934,28 @@ ;; esac # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary... + # 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` - # ...but if some path component already ends with the multilib dir we assume - # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). - case "$lt_multi_os_dir; $lt_search_path_spec " in - "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) - lt_multi_os_dir= - ;; - esac + 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" - elif test -n "$lt_multi_os_dir"; then + 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; +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; + lt_foo="/" $lt_i lt_foo; } else { lt_count--; } @@ -10542,7 +9969,7 @@ # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ - $SED 's|/\([A-Za-z]:\)|\1|g'` ;; + $SED 's,/\([A-Za-z]:\),\1,g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else @@ -10551,7 +9978,7 @@ library_names_spec= libname_spec='lib$name' soname_spec= -shrext_cmds=.so +shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= @@ -10568,16 +9995,14 @@ # flags to be left without arguments need_version=unknown - - case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname.a' + 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' + soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) @@ -10585,91 +10010,41 @@ need_lib_prefix=no need_version=no hardcode_into_libs=yes - if test ia64 = "$host_cpu"; then + 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' + 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 + # 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 + echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac - # Using Import Files as archive members, it is possible to support - # filename-based versioning of shared library archives on AIX. While - # this would work for both with and without runtime linking, it will - # prevent static linking of such archives. So we do filename-based - # shared library versioning with .so extension only, which is used - # when both runtime linking and shared linking is enabled. - # Unfortunately, runtime linking may impact performance, so we do - # not want this to be the default eventually. Also, we use the - # versioned .so libs for executables only if there is the -brtl - # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. - # To allow for filename-based versioning support, we need to create - # libNAME.so.V as an archive file, containing: - # *) an Import File, referring to the versioned filename of the - # archive as well as the shared archive member, telling the - # bitwidth (32 or 64) of that shared object, and providing the - # list of exported symbols of that shared object, eventually - # decorated with the 'weak' keyword - # *) the shared object with the F_LOADONLY flag set, to really avoid - # it being seen by the linker. - # At run time we better use the real file rather than another symlink, - # but for link time we create the symlink libNAME.so -> libNAME.so.V - - case $with_aix_soname,$aix_use_runtimelinking in - # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct + # 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. - aix,yes) # traditional libtool - dynamic_linker='AIX unversionable lib.so' + 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' - ;; - aix,no) # traditional AIX only - dynamic_linker='AIX lib.a(lib.so.V)' + 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' - ;; - svr4,*) # full svr4 only - dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" - library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' - # We do not specify a path in Import Files, so LIBPATH fires. - shlibpath_overrides_runpath=yes - ;; - *,yes) # both, prefer svr4 - dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" - library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' - # unpreferred sharedlib libNAME.a needs extra handling - postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' - postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' - # We do not specify a path in Import Files, so LIBPATH fires. - shlibpath_overrides_runpath=yes - ;; - *,no) # both, prefer aix - dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" - library_names_spec='$libname$release.a $libname.a' - soname_spec='$libname$release$shared_ext$major' - # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling - postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' - postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' - ;; - esac + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi shlibpath_var=LIBPATH fi ;; @@ -10679,18 +10054,18 @@ 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' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $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' + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) - library_names_spec='$libname$shared_ext' + library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; @@ -10698,8 +10073,8 @@ bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor 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' + 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" @@ -10711,7 +10086,7 @@ cygwin* | mingw* | pw32* | cegcc*) version_type=windows - shrext_cmds=.dll + shrext_cmds=".dll" need_version=no need_lib_prefix=no @@ -10720,8 +10095,8 @@ # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ + 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~ @@ -10737,17 +10112,17 @@ case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix - soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' @@ -10756,8 +10131,8 @@ *,cl*) # Native MSVC libname_spec='$name' - soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - library_names_spec='$libname.dll.lib' + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' case $build_os in mingw*) @@ -10784,7 +10159,7 @@ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) - sys_lib_search_path_spec=$LIB + sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` @@ -10797,8 +10172,8 @@ esac # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ + 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' @@ -10811,7 +10186,7 @@ *) # Assume MSVC wrapper - library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac @@ -10824,8 +10199,8 @@ version_type=darwin need_lib_prefix=no need_version=no - library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' - soname_spec='$libname$release$major$shared_ext' + library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' @@ -10838,8 +10213,8 @@ version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' + 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 ;; @@ -10857,13 +10232,12 @@ version_type=freebsd-$objformat case $version_type in freebsd-elf*) - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' + 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' + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac @@ -10888,15 +10262,26 @@ esac ;; +gnu*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=no + shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; @@ -10914,15 +10299,14 @@ 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 32 = "$HPUX_IA64_MODE"; then + 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" - sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' @@ -10930,8 +10314,8 @@ 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' + 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 ;; @@ -10940,8 +10324,8 @@ 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' + 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, ... @@ -10954,8 +10338,8 @@ version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' + 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 @@ -10966,7 +10350,7 @@ case $host_os in nonstopux*) version_type=nonstopux ;; *) - if test yes = "$lt_cv_prog_gnu_ld"; then + if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix @@ -10974,8 +10358,8 @@ 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' + 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= @@ -10994,8 +10378,8 @@ 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" + 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 ;; @@ -11004,33 +10388,13 @@ dynamic_linker=no ;; -linux*android*) - version_type=none # Android doesn't support versioned libraries. - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext' - soname_spec='$libname$release$shared_ext' - finish_cmds= - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - - # 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 - - dynamic_linker='Android linker' - # Don't embed -rpath directories since the linker doesn't support them. - hardcode_libdir_flag_spec='-L$libdir' - ;; - # This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) +linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' + 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 @@ -11074,18 +10438,10 @@ # before this can be enabled. hardcode_into_libs=yes - # Add ABI-specific directories to the system library path. - sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" - - # Ideally, we could use ldconfig to report *all* directores which are - # searched for libraries, however this is still not possible. Aside from not - # being certain /sbin/ldconfig is available, command - # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, - # even though it is searched at run-time. Try to do the best guess by - # appending ld.so.conf contents (and includes) to the search path. + # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" + 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 @@ -11097,17 +10453,29 @@ 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' + 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' + 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 @@ -11117,7 +10485,7 @@ newsos6) version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + 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 ;; @@ -11126,68 +10494,58 @@ version_type=qnx need_lib_prefix=no need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; -openbsd* | bitrig*) +openbsd*) version_type=sunos - sys_lib_dlsearch_path_spec=/usr/lib + sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - need_version=no - else - need_version=yes - fi - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' + # 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 - shlibpath_overrides_runpath=yes + 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' - version_type=windows - shrext_cmds=.dll - need_version=no + shrext_cmds=".dll" need_lib_prefix=no - # OS/2 can only load a DLL with a base name of 8 characters or less. - soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; - v=$($ECHO $release$versuffix | tr -d .-); - n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); - $ECHO $n$v`$shared_ext' - library_names_spec='${libname}_dll.$libext' + library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' - shlibpath_var=BEGINLIBPATH - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' + shlibpath_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' + 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 + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) @@ -11198,8 +10556,8 @@ version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' + 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 @@ -11209,11 +10567,11 @@ sunos4*) version_type=sunos - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' + 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 yes = "$with_gnu_ld"; then + if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes @@ -11221,8 +10579,8 @@ sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' + 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) @@ -11243,24 +10601,24 @@ ;; sysv4*MP*) - if test -d /usr/nec; then + if test -d /usr/nec ;then version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' - soname_spec='$libname$shared_ext.$major' + 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=sco + 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' + 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 yes = "$with_gnu_ld"; then + 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' @@ -11278,7 +10636,7 @@ version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + 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 @@ -11286,8 +10644,8 @@ uts4*) version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' + 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 ;; @@ -11297,35 +10655,20 @@ esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } -test no = "$dynamic_linker" && can_build_shared=no +test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test yes = "$GCC"; then +if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi -if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then - sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec +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 set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then - sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec +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 -# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... -configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec - -# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code -func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" - -# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool -configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH - - - - - - @@ -11422,15 +10765,15 @@ hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || - test yes = "$hardcode_automatic"; then + test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existent directories. - if test no != "$hardcode_direct" && + 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 no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" && - test no != "$hardcode_minus_L"; then + ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && + test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else @@ -11445,12 +10788,12 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } -if test relink = "$hardcode_action" || - test yes = "$inherit_rpath"; then +if test "$hardcode_action" = relink || + test "$inherit_rpath" = yes; then # Fast installation is not supported enable_fast_install=no -elif test yes = "$shlibpath_overrides_runpath" || - test no = "$enable_shared"; then +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi @@ -11460,7 +10803,7 @@ - if test yes != "$enable_dlopen"; then + if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown @@ -11470,23 +10813,23 @@ case $host_os in beos*) - lt_cv_dlopen=load_add_on + lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) - lt_cv_dlopen=LoadLibrary + lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) - lt_cv_dlopen=dlopen + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) - # if libdl is installed we need to link against it + # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : @@ -11524,10 +10867,10 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : - lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else - lt_cv_dlopen=dyld + lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes @@ -11535,18 +10878,10 @@ ;; - tpf*) - # Don't try to run any link tests for TPF. We know it's impossible - # because TPF is a cross-compiler, and we know how we open DSOs. - lt_cv_dlopen=dlopen - lt_cv_dlopen_libs= - lt_cv_dlopen_self=no - ;; - *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = xyes; then : - lt_cv_dlopen=shl_load + 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; } @@ -11585,11 +10920,11 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = xyes; then : - lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld + lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes; then : - lt_cv_dlopen=dlopen + 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; } @@ -11628,7 +10963,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : - lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl + 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; } @@ -11667,7 +11002,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = xyes; then : - lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld + 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; } @@ -11706,7 +11041,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = xyes; then : - lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld + lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi @@ -11727,21 +11062,21 @@ ;; esac - if test no = "$lt_cv_dlopen"; then - enable_dlopen=no - else + 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 yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - save_LDFLAGS=$LDFLAGS + save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - save_LIBS=$LIBS + save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 @@ -11749,7 +11084,7 @@ if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else - if test yes = "$cross_compiling"; then : + if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 @@ -11796,9 +11131,9 @@ # endif #endif -/* When -fvisibility=hidden is used, assume the code has been annotated +/* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ -#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif @@ -11828,7 +11163,7 @@ (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 + 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 @@ -11848,14 +11183,14 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } - if test yes = "$lt_cv_dlopen_self"; then + if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else - if test yes = "$cross_compiling"; then : + if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 @@ -11902,9 +11237,9 @@ # endif #endif -/* When -fvisibility=hidden is used, assume the code has been annotated +/* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ -#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif @@ -11934,7 +11269,7 @@ (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 + 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 @@ -11955,9 +11290,9 @@ $as_echo "$lt_cv_dlopen_self_static" >&6; } fi - CPPFLAGS=$save_CPPFLAGS - LDFLAGS=$save_LDFLAGS - LIBS=$save_LIBS + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" ;; esac @@ -12001,7 +11336,7 @@ # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) - if test -n "$STRIP"; then + if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 @@ -12029,7 +11364,7 @@ - # Report what library types will actually be built + # 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 @@ -12037,13 +11372,13 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } - test no = "$can_build_shared" && enable_shared=no + 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 yes = "$enable_shared" && enable_static=no + test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' @@ -12051,12 +11386,8 @@ ;; aix[4-9]*) - if test ia64 != "$host_cpu"; then - case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in - yes,aix,yes) ;; # shared object as lib.so file only - yes,svr4,*) ;; # shared object as lib.so archive member only - yes,*) enable_static=no ;; # shared object in lib.a archive as well - esac + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no fi ;; esac @@ -12066,7 +11397,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. - test yes = "$enable_shared" || enable_static=yes + test "$enable_shared" = yes || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } @@ -12080,7 +11411,7 @@ 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 +CC="$lt_save_CC" @@ -12300,8 +11631,6 @@ esac rm -rf conftest* fi - - fi @@ -12540,7 +11869,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -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 break 2 @@ -12583,7 +11912,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -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 break 2 @@ -13609,14 +12938,6 @@ LTLIBOBJS=$ac_ltlibobjs -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 -$as_echo_n "checking that generated files are newer than configure... " >&6; } - if test -n "$am_sleep_pid"; then - # Hide warnings about reused PIDs. - wait $am_sleep_pid 2>/dev/null - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 -$as_echo "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' @@ -13959,16 +13280,16 @@ # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. + # 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 -pR' + as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -pR' + as_ln_s='cp -p' fi else - as_ln_s='cp -pR' + as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -14028,16 +13349,28 @@ as_mkdir_p=false fi - -# as_fn_executable_p FILE -# ----------------------- -# Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} # as_fn_executable_p -as_test_x='test -x' -as_executable_p=as_fn_executable_p +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'" @@ -14058,8 +13391,8 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by xf86-video-openchrome $as_me 0.5.0, which was -generated by GNU Autoconf 2.69. Invocation command line was +This file was extended by xf86-video-openchrome $as_me 0.6.0, which was +generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -14124,11 +13457,11 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -xf86-video-openchrome config.status 0.5.0 -configured by $0, generated by GNU Autoconf 2.69, +xf86-video-openchrome config.status 0.6.0 +configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" -Copyright (C) 2012 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -14219,7 +13552,7 @@ _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 + 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' @@ -14259,7 +13592,6 @@ enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' -shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' @@ -14309,13 +13641,10 @@ GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' -lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`' nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' -lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' @@ -14380,8 +13709,7 @@ finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' -configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`' -configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`' +sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' @@ -14432,12 +13760,9 @@ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ -lt_cv_sys_global_symbol_to_import \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ -lt_cv_nm_interface \ nm_file_list_spec \ -lt_cv_truncate_bin \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_pic \ lt_prog_compiler_wl \ @@ -14472,7 +13797,7 @@ striplib; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" @@ -14499,11 +13824,10 @@ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ -configure_time_dlsearch_path \ -configure_time_lt_sys_library_path; do +sys_lib_dlsearch_path_spec; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" @@ -14512,16 +13836,19 @@ done ac_aux_dir='$ac_aux_dir' +xsi_shell='$xsi_shell' +lt_shell_append='$lt_shell_append' -# See if we are running on zsh, and set the options that allow our +# 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 +if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' + TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile' @@ -15140,7 +14467,7 @@ case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { - # Older Autoconf quotes --file arguments for eval, but not when files + # 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 @@ -15153,7 +14480,7 @@ # 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 + # 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. @@ -15187,19 +14514,21 @@ continue fi # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running 'make'. + # 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 + 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'`; do + 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" || @@ -15234,53 +14563,55 @@ ;; "libtool":C) - # See if we are running on zsh, and set the options that allow our + # 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 + if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi - cfgfile=${ofile}T + cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL -# Generated automatically by $as_me ($PACKAGE) $VERSION + +# `$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. - -# Provide generalized library-building support services. -# Written by Gordon Matzigkeit, 1996 - -# Copyright (C) 2014 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# GNU Libtool is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of 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. +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is part of GNU Libtool. # -# GNU Libtool is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of +# 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 this program. If not, see . +# along with GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, or +# obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # The names of the tagged configurations supported by this script. -available_tags='' - -# Configured defaults for sys_lib_dlsearch_path munging. -: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} +available_tags="" # ### BEGIN LIBTOOL CONFIG @@ -15300,9 +14631,6 @@ # Whether or not to optimize for fast installation. fast_install=$enable_fast_install -# Shared archive member basename,for filename based shared library versioning on AIX. -shared_archive_member_spec=$shared_archive_member_spec - # Shell to use when invoking shell scripts. SHELL=$lt_SHELL @@ -15420,27 +14748,18 @@ # 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 into a list of symbols to manually relocate. -global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import - # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix -# The name lister interface. -nm_interface=$lt_lt_cv_nm_interface - # Specify filename containing input files for \$NM. nm_file_list_spec=$lt_nm_file_list_spec -# The root where to search for dependent libraries,and where our libraries should be installed. +# The root where to search for dependent libraries,and in which our libraries should be installed. lt_sysroot=$lt_sysroot -# Command to truncate a binary pipe. -lt_truncate_bin=$lt_lt_cv_truncate_bin - # The name of the directory that contains temporary libtool files. objdir=$objdir @@ -15531,11 +14850,8 @@ # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec -# Detected run-time system search path for libraries. -sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path - -# Explicit LT_SYS_LIBRARY_PATH set during ./configure time. -configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path +# Run-time system search path for libraries. +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Whether dlopen is supported. dlopen_support=$enable_dlopen @@ -15628,13 +14944,13 @@ # 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 +# 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 +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting \$shlibpath_var if the +# "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute @@ -15686,72 +15002,13 @@ _LT_EOF - cat <<'_LT_EOF' >> "$cfgfile" - -# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE - -# func_munge_path_list VARIABLE PATH -# ----------------------------------- -# VARIABLE is name of variable containing _space_ separated list of -# directories to be munged by the contents of PATH, which is string -# having a format: -# "DIR[:DIR]:" -# string "DIR[ DIR]" will be prepended to VARIABLE -# ":DIR[:DIR]" -# string "DIR[ DIR]" will be appended to VARIABLE -# "DIRP[:DIRP]::[DIRA:]DIRA" -# string "DIRP[ DIRP]" will be prepended to VARIABLE and string -# "DIRA[ DIRA]" will be appended to VARIABLE -# "DIR[:DIR]" -# VARIABLE will be replaced by "DIR[ DIR]" -func_munge_path_list () -{ - case x$2 in - x) - ;; - *:) - eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" - ;; - x:*) - eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" - ;; - *::*) - eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" - eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" - ;; - *) - eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" - ;; - esac -} - - -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -func_cc_basename () -{ - for cc_temp in $*""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac - done - func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` -} - - -# ### END FUNCTIONS SHARED WITH CONFIGURE - -_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 set != "${COLLECT_NAMES+set}"; then +if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi @@ -15760,7 +15017,7 @@ esac -ltmain=$ac_aux_dir/ltmain.sh +ltmain="$ac_aux_dir/ltmain.sh" # We use sed instead of cat because bash on DJGPP gets confused if @@ -15770,6 +15027,165 @@ sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) + if test x"$xsi_shell" = xyes; then + sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ +func_dirname ()\ +{\ +\ case ${1} in\ +\ */*) func_dirname_result="${1%/*}${2}" ;;\ +\ * ) func_dirname_result="${3}" ;;\ +\ esac\ +} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_basename ()$/,/^} # func_basename /c\ +func_basename ()\ +{\ +\ func_basename_result="${1##*/}"\ +} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ +func_dirname_and_basename ()\ +{\ +\ case ${1} in\ +\ */*) func_dirname_result="${1%/*}${2}" ;;\ +\ * ) func_dirname_result="${3}" ;;\ +\ esac\ +\ func_basename_result="${1##*/}"\ +} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ +func_stripname ()\ +{\ +\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ +\ # positional parameters, so assign one to ordinary parameter first.\ +\ func_stripname_result=${3}\ +\ func_stripname_result=${func_stripname_result#"${1}"}\ +\ func_stripname_result=${func_stripname_result%"${2}"}\ +} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ +func_split_long_opt ()\ +{\ +\ func_split_long_opt_name=${1%%=*}\ +\ func_split_long_opt_arg=${1#*=}\ +} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ +func_split_short_opt ()\ +{\ +\ func_split_short_opt_arg=${1#??}\ +\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ +} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ +func_lo2o ()\ +{\ +\ case ${1} in\ +\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ +\ *) func_lo2o_result=${1} ;;\ +\ esac\ +} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_xform ()$/,/^} # func_xform /c\ +func_xform ()\ +{\ + func_xform_result=${1%.*}.lo\ +} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_arith ()$/,/^} # func_arith /c\ +func_arith ()\ +{\ + func_arith_result=$(( $* ))\ +} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_len ()$/,/^} # func_len /c\ +func_len ()\ +{\ + func_len_result=${#1}\ +} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + +fi + +if test x"$lt_shell_append" = xyes; then + sed -e '/^func_append ()$/,/^} # func_append /c\ +func_append ()\ +{\ + eval "${1}+=\\${2}"\ +} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ +func_append_quoted ()\ +{\ +\ func_quote_for_eval "${2}"\ +\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ +} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + # Save a `func_append' function call where possible by direct use of '+=' + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +else + # Save a `func_append' function call even when '+=' is not available + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +fi + +if test x"$_lt_function_replace_fail" = x":"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 +$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} +fi + + mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" diff -Nru xserver-xorg-video-openchrome-0.5.0/configure.ac xserver-xorg-video-openchrome-0.6.0/configure.ac --- xserver-xorg-video-openchrome-0.5.0/configure.ac 2016-07-06 16:21:43.000000000 +0000 +++ xserver-xorg-video-openchrome-0.6.0/configure.ac 2017-03-07 08:56:28.000000000 +0000 @@ -23,7 +23,7 @@ # Initialize Autoconf AC_PREREQ(2.57) AC_INIT([xf86-video-openchrome], - [0.5.0], + [0.6.0], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver/openchrome], [xf86-video-openchrome]) diff -Nru xserver-xorg-video-openchrome-0.5.0/debian/changelog xserver-xorg-video-openchrome-0.6.0/debian/changelog --- xserver-xorg-video-openchrome-0.5.0/debian/changelog 2017-11-03 09:39:29.000000000 +0000 +++ xserver-xorg-video-openchrome-0.6.0/debian/changelog 2017-11-03 09:39:29.000000000 +0000 @@ -1,8 +1,35 @@ -xserver-xorg-video-openchrome (1:0.5.0-3build1) zesty; urgency=medium +xserver-xorg-video-openchrome (1:0.6.0-3) unstable; urgency=medium - * Rebuild against new xserver. + * Team upload. - -- Timo Aaltonen Thu, 09 Mar 2017 11:52:30 +0200 + [ Dylan Aïssi ] + * Disable the building of via_regs_dump on Hurd because FTBFS. + (Closes: #873463). + * Update descriptions of binary packages. + * Install manpage of via_regs_dump in right section (from .1 to .8). + * Really adopt the package (Closes: #808784). + * Do not explicitly parse d/changelog. + * Bump Standards-Version to 4.1.0. + + -- Julien Cristau Sat, 09 Sep 2017 18:25:22 +0200 + +xserver-xorg-video-openchrome (1:0.6.0-2) unstable; urgency=medium + + * Build new binary package which contain the tool via_regs_dump. + * Bump Standards-Version to 4.0.0. + + -- Dylan Aïssi Mon, 05 Jun 2017 22:47:36 +0200 + +xserver-xorg-video-openchrome (1:0.6.0-1) experimental; urgency=medium + + * New upstream release. + * Decrease the minimal version of xserver-xorg-dev to 1.9.4. + No really need to have higher version. + * Install the upstream README file. + * Drop Fix_spelling_error.patch and Reproducible_build.patch: + applied upstream. + + -- Dylan Aïssi Tue, 07 Mar 2017 23:24:19 +0100 xserver-xorg-video-openchrome (1:0.5.0-3) unstable; urgency=medium diff -Nru xserver-xorg-video-openchrome-0.5.0/debian/control xserver-xorg-video-openchrome-0.6.0/debian/control --- xserver-xorg-video-openchrome-0.5.0/debian/control 2017-11-03 09:39:29.000000000 +0000 +++ xserver-xorg-video-openchrome-0.6.0/debian/control 2017-11-03 09:39:29.000000000 +0000 @@ -19,11 +19,11 @@ x11proto-video-dev, x11proto-xext-dev, x11proto-xf86dri-dev, - xserver-xorg-dev (>= 2:1.17), + xserver-xorg-dev (>= 2:1.9.4), xutils-dev Build-Conflicts: autoconf2.13 -Standards-Version: 3.9.8 +Standards-Version: 4.1.0 Homepage: https://www.freedesktop.org/wiki/Openchrome/ Vcs-Git: https://anonscm.debian.org/git/pkg-xorg/driver/xserver-xorg-video-openchrome.git Vcs-Browser: https://anonscm.debian.org/git/pkg-xorg/driver/xserver-xorg-video-openchrome.git @@ -36,16 +36,23 @@ ${xviddriver:Depends} Provides: ${xviddriver:Provides} -Description: X.Org X server -- VIA display driver - OpenChrome is a project for the development of free and open-source drivers - for the VIA UniChrome video chipsets. +Description: X.Org X server -- OpenChrome display driver + This package provides the 'openchrome' driver for the VIA Technologies + UniChrome and Chrome9 IGPs chipsets. The following chips should be + supported: CLE266, KM400(A), KN400(A), P4M800, K8M800, K8N800, PM800, + PN800, PM880, CN333, CN400, P4M800 Pro, VN800, CN700, CX700, VX700, + P4M890, VN890, CN800, K8M890, K8N890, P4M900, VN896, CN896, VX800, VX820, + VX855, VX875, VX900. . - Originally called the 'snapshot' release, since it was a snapshot of an - experimental branch of the unichrome cvs code, this is a continued development - of the open source unichrome driver (from http://unichrome.sf.net) which - also incorporates support for the unichrome-pro chipsets. - . - Support for hardware acceleration (XvMC) for all chipsets has subsequently - been ripped out of the unichrome.sf.net driver. Therefore your only option if - you wish to make use of the acceleration features of your VIA chip with free - and open-source drivers is to use this version of the driver. + This package is built from the FreeDesktop.org xf86-video-openchrome driver. + +Package: openchrome-tool +Architecture: amd64 i386 kfreebsd-amd64 kfreebsd-i386 x32 +Depends: + ${misc:Depends}, + ${shlibs:Depends}, + xserver-xorg-video-openchrome (= ${binary:Version}) +Description: Tool for debugging the OpenChrome display driver + via_regs_dump is a registers dumper tool for debugging the OpenChrome driver. + This tool can read and write registers and display some others information + useful for debugging the driver. diff -Nru xserver-xorg-video-openchrome-0.5.0/debian/copyright xserver-xorg-video-openchrome-0.6.0/debian/copyright --- xserver-xorg-video-openchrome-0.5.0/debian/copyright 2017-11-03 09:39:29.000000000 +0000 +++ xserver-xorg-video-openchrome-0.6.0/debian/copyright 2017-11-03 09:39:29.000000000 +0000 @@ -1,6 +1,6 @@ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: xf86-video-openchrome -Upstream-Contact: Kevin Brace +Upstream-Contact: The OpenChrome Project Source: https://xorg.freedesktop.org/releases/individual/driver/ Files: * diff -Nru xserver-xorg-video-openchrome-0.5.0/debian/openchrome-tool.install xserver-xorg-video-openchrome-0.6.0/debian/openchrome-tool.install --- xserver-xorg-video-openchrome-0.5.0/debian/openchrome-tool.install 1970-01-01 00:00:00.000000000 +0000 +++ xserver-xorg-video-openchrome-0.6.0/debian/openchrome-tool.install 2017-11-03 09:39:29.000000000 +0000 @@ -0,0 +1 @@ +usr/sbin/via_regs_dump diff -Nru xserver-xorg-video-openchrome-0.5.0/debian/openchrome-tool.manpages xserver-xorg-video-openchrome-0.6.0/debian/openchrome-tool.manpages --- xserver-xorg-video-openchrome-0.5.0/debian/openchrome-tool.manpages 1970-01-01 00:00:00.000000000 +0000 +++ xserver-xorg-video-openchrome-0.6.0/debian/openchrome-tool.manpages 2017-11-03 09:39:29.000000000 +0000 @@ -0,0 +1 @@ +debian/via_regs_dump.8 diff -Nru xserver-xorg-video-openchrome-0.5.0/debian/patches/Fix_spelling_error.patch xserver-xorg-video-openchrome-0.6.0/debian/patches/Fix_spelling_error.patch --- xserver-xorg-video-openchrome-0.5.0/debian/patches/Fix_spelling_error.patch 2017-11-03 09:39:29.000000000 +0000 +++ xserver-xorg-video-openchrome-0.6.0/debian/patches/Fix_spelling_error.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,16 +0,0 @@ -Author: Dylan Aïssi -Description: Fix spelling error. -Last-Update: 2016-12-06 -Applied-Upstream: 0.5.173, https://cgit.freedesktop.org/openchrome/xf86-video-openchrome/commit/?id=56b3faf - ---- a/src/via_xv.c -+++ b/src/via_xv.c -@@ -357,7 +357,7 @@ - memEfficiency = (float)SINGLE_3205_133; - break; - default: -- ErrorF("Unknow DRAM Type!\n"); -+ ErrorF("Unknown DRAM Type!\n"); - mClock = 166; - memEfficiency = (float)SINGLE_3205_133; - break; diff -Nru xserver-xorg-video-openchrome-0.5.0/debian/patches/Reproducible_build.patch xserver-xorg-video-openchrome-0.6.0/debian/patches/Reproducible_build.patch --- xserver-xorg-video-openchrome-0.5.0/debian/patches/Reproducible_build.patch 2017-11-03 09:39:29.000000000 +0000 +++ xserver-xorg-video-openchrome-0.6.0/debian/patches/Reproducible_build.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,17 +0,0 @@ -Author: Chris Lamb -Description: Make the build reproducible. -Origin: https://bugs.debian.org/831405 -Applied-Upstream: 0.5.173, https://cgit.freedesktop.org/openchrome/xf86-video-openchrome/commit/?id=25ba0a4 - ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -112,6 +112,9 @@ - if [ -d .svn ]; then \ - echo '#define BUILDCOMMENT "(development build, at revision '\ - "`svnversion -nc .. | sed -e s/^[^:]*://`"')"' > $@.tmp; \ -+ elif [ "$$SOURCE_DATE_EPOCH" ]; then \ -+ printf '#define BUILDCOMMENT "(compiled with SOURCE_DATE_EPOCH: %s)"' $$SOURCE_DATE_EPOCH \ -+ > $@.tmp; \ - else \ - date +'#define BUILDCOMMENT "(development build, compiled on %c)"' \ - > $@.tmp; \ diff -Nru xserver-xorg-video-openchrome-0.5.0/debian/patches/series xserver-xorg-video-openchrome-0.6.0/debian/patches/series --- xserver-xorg-video-openchrome-0.5.0/debian/patches/series 2017-11-03 09:39:29.000000000 +0000 +++ xserver-xorg-video-openchrome-0.6.0/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -Fix_spelling_error.patch -Reproducible_build.patch diff -Nru xserver-xorg-video-openchrome-0.5.0/debian/rules xserver-xorg-video-openchrome-0.6.0/debian/rules --- xserver-xorg-video-openchrome-0.5.0/debian/rules 2017-11-03 09:39:29.000000000 +0000 +++ xserver-xorg-video-openchrome-0.6.0/debian/rules 2017-11-03 09:39:29.000000000 +0000 @@ -1,10 +1,18 @@ #!/usr/bin/make -f +include /usr/share/dpkg/pkg-info.mk + DEB_CONFIGURE_EXTRA_FLAGS := \ --disable-maintainer-mode \ --disable-dependency-tracking \ --libdir=/usr/lib +# The via_regs_dump tool FTBFS on Hurd +ifneq ($(DEB_HOST_ARCH_OS), hurd) +DEB_CONFIGURE_EXTRA_FLAGS += \ + --enable-viaregtool +endif + ifneq (,$(filter debug,$(DEB_BUILD_OPTIONS))) DEB_CONFIGURE_EXTRA_FLAGS += \ --enable-debug=yes \ @@ -42,7 +50,5 @@ %: dh $@ --with quilt,xsf --builddirectory=build/ -gentarball: SOURCE=xserver-xorg-video-openchrome -gentarball: UV=$(shell dpkg-parsechangelog|awk '/^Version:/ {print $$2}'|sed 's/^[0-9]*://;s/-.*$$//') gentarball: - git archive --format=tar upstream-unstable --prefix=$(SOURCE)-$(UV)/ | gzip -9 > ../$(SOURCE)_$(UV).orig.tar.gz + git archive --format=tar upstream-unstable --prefix=$(DEB_SOURCE)-$(DEB_VERSION_UPSTREAM)/ | gzip -9 > ../$(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM).orig.tar.gz diff -Nru xserver-xorg-video-openchrome-0.5.0/debian/upstream/signing-key.asc xserver-xorg-video-openchrome-0.6.0/debian/upstream/signing-key.asc --- xserver-xorg-video-openchrome-0.5.0/debian/upstream/signing-key.asc 1970-01-01 00:00:00.000000000 +0000 +++ xserver-xorg-video-openchrome-0.6.0/debian/upstream/signing-key.asc 2017-11-03 09:39:29.000000000 +0000 @@ -0,0 +1,30 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1 + +mQENBFauvlQBCACpsdM1X3cxMypf3/LFnTYcqI78H/ENvl/OkdLgTAPSmUbPFtQ0 +VvAjJUEh1QoKmOhfpJow2pjBZSs8CJIyOxauYlYOhvH3QAkFM2RXse6vbm/ej2zn +ufZT2OgKuPC5cKIOMR55g08NTg0K26FF4OJuVc9DeLGSsOMHeR/qwbSQJBGEge6j +mjVmhsPr16eqw396xTL31oU0MSP607iEpvmlT6dN3eXOvMpzcEj07EhzaZLKf0g0 +rAHMAsithi5N+axMmTq7GudwEo2WwaRTiCTJUWJ7sxO4Ix41G+ccPMIiGwWWNJ9T +KEy77Kpf3CY2oNdZNnu+axT8yq0Vi6uXtOWlABEBAAG0IEtldmluIEJyYWNlIDxr +ZXZpbmJyYWNlQGdteC5jb20+iQE4BBMBAgAiBQJWrr5UAhsDBgsJCAcDAgYVCAIJ +CgsEFgIDAQIeAQIXgAAKCRDJInhBeL/9sDcyCACYUMmaI0wxbyiuiNjl9m7tiNHO +H4fbITrqBf3Kmpp7Dv0eQ/k+ux6d0t7R1ajbcat5WO28evhvuVnfZB6dDCFOmWqx +9mtmNeZJknQAHiYhNrGWb0g1GQyYN/+RACT3CYv/vqzKJnd39RZcaebBtajjzteh +MYVU/AI62rcYAgOpc68KO+r9WJCj8df2waXXTLAAo6jZbaW9jp0G/5Hzs+IFPdG+ +MzKgw3ttBCFkTIMGec0Ds0NILoLs6+3+D7pbZSiNf423BB0LgLRMqgd/CxUN/hRB +XNQx3ntVywelSFPCHt64+Ty4GQ3ch6mO98QLO/bb04Byjo7WndSXeAdi77q3uQEN +BFauvlQBCADM2i7oCJr6RJ5M9k5rkmz/J78VXfwm8T0XdW5KXUTQIM6V5gcPf/tp +G6QwpYBjTVIbVvJoNlu8sP7acVleRZClZTNF1qtK84d4+g2EQxMHvx/MePDxmLCQ +y70+7kjw3R0latruTElnPN2e6TbVoGWQB/9kDquSyfmCVwwMiw3PP0nHpXZzJI28 +hnQu7m7Z1e6ihd2N5IC7t3w7EZnGYNsQV00yhfxD6LxMq2JppzgfIBCO1pMAn1da +2EtG2KAVa5CVKbJRz7ex+0srX1tYgAsu+01JF1KM+yR/GNJPV9IZZUSjVklW8N5m +VqGxX7/Ywyau+KfaPRsNbk+O46D2F76lABEBAAGJAR8EGAECAAkFAlauvlQCGwwA +CgkQySJ4QXi//bDwBAf/S/jp5fMx+hlvzZ4gdbBRY6qtfh2BNphsGEv7QTAdsKrN +L5i+CoAlweSPmG23/JRFgUUbSpDW8pbJ9lk/Nk8r9l+o3yLfJ0GDfrSWV/b4RseI +zGpxYis7rW124R+PrTZqDodvzKLnR75uZKPpnp5uJXrSSQC/8hJYq3KNRkjFqjEc +TLAAIHRhWJ7+1YQe9hzJQhUEaaPfKTPmtErNKqLv4SGdbDZImnqZiwL+mmR1XsfJ +d48Wis410CnRbb2O4q3RhuTNSYWjatrv7Oi8bJONAMCEwuOKH+GinMr6zui4U8rx +0CXyaCO/nSalaCLyMrk7lo6BOk2KGgkCbvRG4yNBMQ== +=jPLP +-----END PGP PUBLIC KEY BLOCK----- diff -Nru xserver-xorg-video-openchrome-0.5.0/debian/via_regs_dump.8 xserver-xorg-video-openchrome-0.6.0/debian/via_regs_dump.8 --- xserver-xorg-video-openchrome-0.5.0/debian/via_regs_dump.8 1970-01-01 00:00:00.000000000 +0000 +++ xserver-xorg-video-openchrome-0.6.0/debian/via_regs_dump.8 2017-11-03 09:39:29.000000000 +0000 @@ -0,0 +1,40 @@ +.\" +.TH VIA_REGS_DUMP 8 "September 2017" "" +.SH NAME +via_regs_dump \- tool for debugging the OpenChrome display driver +.SH SYNOPSIS +.B via_regs_dump +[\fIoptions\fR] +.SH DESCRIPTION +The OpenChrome project is committed to providing and supporting fully +free and Open Source drivers that take full advantage of the hardware +acceleration of VIA chipsets featuring the VIA UniChrome, UniChrome +Pro and Chrome9 integrated graphics processors. +.SH OPTIONS +.TP +\fB\-h\fR, \fB\-\-help\fR +Display this usage message. +.TP +\fB\-d\fR, \fB\-\-dump\fR +Dump all registers. +.TP +\fB\-p\fR, \fB\-\-pll\fR +Display PLL. +.TP +\fB\-m\fR, \fB\-\-mode\fR +Display modes. +.TP +\fB\-r\fR, \fB\-\-read\fR +Read register. Example : $0 -r 3d5.17 +.TP +\fB\-w\fR, \fB\-\-write\fR +Write register. Example : $0 -w 3d5.17 0xa3 +.TP +\fB\-g\fR, \fB\-\-gpio\fR +Display GPIO state. +.PP +.SH SEE ALSO +.BR https://www.freedesktop.org/wiki/Openchrome/ +.SH COPYRIGHT +via-chrome-tool (C) 2009 by VIA Technologies, Inc. +This is FREE SOFTWARE with ABSOLUTELY NO WARRANTY diff -Nru xserver-xorg-video-openchrome-0.5.0/debian/watch xserver-xorg-video-openchrome-0.6.0/debian/watch --- xserver-xorg-video-openchrome-0.5.0/debian/watch 2017-11-03 09:39:29.000000000 +0000 +++ xserver-xorg-video-openchrome-0.6.0/debian/watch 2017-11-03 09:39:29.000000000 +0000 @@ -1,2 +1,3 @@ version=4 +opts=pgpsigurlmangle=s/$/.sig/ \ https://xorg.freedesktop.org/releases/individual/driver/ xf86-video-openchrome-(\d.*)\.tar\.gz diff -Nru xserver-xorg-video-openchrome-0.5.0/debian/xserver-xorg-video-openchrome.docs xserver-xorg-video-openchrome-0.6.0/debian/xserver-xorg-video-openchrome.docs --- xserver-xorg-video-openchrome-0.5.0/debian/xserver-xorg-video-openchrome.docs 2017-11-03 09:39:29.000000000 +0000 +++ xserver-xorg-video-openchrome-0.6.0/debian/xserver-xorg-video-openchrome.docs 2017-11-03 09:39:29.000000000 +0000 @@ -1 +1,2 @@ NEWS +README diff -Nru xserver-xorg-video-openchrome-0.5.0/depcomp xserver-xorg-video-openchrome-0.6.0/depcomp --- xserver-xorg-video-openchrome-0.5.0/depcomp 2016-07-06 16:22:04.000000000 +0000 +++ xserver-xorg-video-openchrome-0.6.0/depcomp 2017-03-07 11:19:02.000000000 +0000 @@ -1,9 +1,10 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2013-05-30.07; # UTC +scriptversion=2011-12-04.11; # UTC -# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010, +# 2011 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -27,9 +28,9 @@ case $1 in '') - echo "$0: No command. Try '$0 --help' for more information." 1>&2 - exit 1; - ;; + echo "$0: No command. Try \`$0 --help' for more information." 1>&2 + exit 1; + ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] @@ -39,8 +40,8 @@ Environment variables: depmode Dependency tracking mode. - source Source file read by 'PROGRAMS ARGS'. - object Object file output by 'PROGRAMS ARGS'. + source Source file read by `PROGRAMS ARGS'. + object Object file output by `PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputting dependencies. @@ -56,66 +57,6 @@ ;; esac -# Get the directory component of the given path, and save it in the -# global variables '$dir'. Note that this directory component will -# be either empty or ending with a '/' character. This is deliberate. -set_dir_from () -{ - case $1 in - */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; - *) dir=;; - esac -} - -# Get the suffix-stripped basename of the given path, and save it the -# global variable '$base'. -set_base_from () -{ - base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` -} - -# If no dependency file was actually created by the compiler invocation, -# we still have to create a dummy depfile, to avoid errors with the -# Makefile "include basename.Plo" scheme. -make_dummy_depfile () -{ - echo "#dummy" > "$depfile" -} - -# Factor out some common post-processing of the generated depfile. -# Requires the auxiliary global variable '$tmpdepfile' to be set. -aix_post_process_depfile () -{ - # If the compiler actually managed to produce a dependency file, - # post-process it. - if test -f "$tmpdepfile"; then - # Each line is of the form 'foo.o: dependency.h'. - # Do two passes, one to just change these to - # $object: dependency.h - # and one to simply output - # dependency.h: - # which is needed to avoid the deleted-header problem. - { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" - sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" - } > "$depfile" - rm -f "$tmpdepfile" - else - make_dummy_depfile - fi -} - -# A tabulation character. -tab=' ' -# A newline character. -nl=' -' -# Character ranges might be problematic outside the C locale. -# These definitions help. -upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ -lower=abcdefghijklmnopqrstuvwxyz -digits=0123456789 -alpha=${upper}${lower} - if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 @@ -128,9 +69,6 @@ rm -f "$tmpdepfile" -# Avoid interferences from the environment. -gccflag= dashmflag= - # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case @@ -142,32 +80,26 @@ fi if test "$depmode" = dashXmstdout; then - # This is just like dashmstdout with a different argument. - dashmflag=-xM - depmode=dashmstdout + # This is just like dashmstdout with a different argument. + dashmflag=-xM + depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then - # This is just like msvisualcpp but w/o cygpath translation. - # Just convert the backslash-escaped backslashes to single forward - # slashes to satisfy depend.m4 - cygpath_u='sed s,\\\\,/,g' - depmode=msvisualcpp + # This is just like msvisualcpp but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then - # This is just like msvc7 but w/o cygpath translation. - # Just convert the backslash-escaped backslashes to single forward - # slashes to satisfy depend.m4 - cygpath_u='sed s,\\\\,/,g' - depmode=msvc7 -fi - -if test "$depmode" = xlc; then - # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. - gccflag=-qmakedep=gcc,-MF - depmode=gcc + # This is just like msvc7 but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + depmode=msvc7 fi case "$depmode" in @@ -190,7 +122,8 @@ done "$@" stat=$? - if test $stat -ne 0; then + if test $stat -eq 0; then : + else rm -f "$tmpdepfile" exit $stat fi @@ -198,17 +131,13 @@ ;; gcc) -## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. -## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. -## (see the conditional assignment to $gccflag above). ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like -## -MM, not -M (despite what the docs say). Also, it might not be -## supported by the other compilers which use the 'gcc' depmode. +## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then @@ -216,31 +145,33 @@ fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? - if test $stat -ne 0; then + if test $stat -eq 0; then : + else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" - # The second -e expression handles DOS-style file names with drive - # letters. + alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz +## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" -## This next piece of magic avoids the "deleted header file" problem. +## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. -## Some versions of gcc put a space before the ':'. On the theory + tr ' ' ' +' < "$tmpdepfile" | +## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. - tr ' ' "$nl" < "$tmpdepfile" \ - | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ - | sed -e 's/$/ :/' >> "$depfile" + sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; @@ -258,7 +189,8 @@ "$@" -MDupdate "$tmpdepfile" fi stat=$? - if test $stat -ne 0; then + if test $stat -eq 0; then : + else rm -f "$tmpdepfile" exit $stat fi @@ -266,41 +198,43 @@ if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" + # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; - # the IRIX cc adds comments like '#:fec' to the end of the + # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. - tr ' ' "$nl" < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ - | tr "$nl" ' ' >> "$depfile" + tr ' ' ' +' < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ + tr ' +' ' ' >> "$depfile" echo >> "$depfile" + # The second pass generates a dummy entry for each header file. - tr ' ' "$nl" < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ - >> "$depfile" + tr ' ' ' +' < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ + >> "$depfile" else - make_dummy_depfile + # The sourcefile does not contain any dependencies, so just + # store a dummy comment line, to avoid errors with the Makefile + # "include basename.Plo" scheme. + echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; -xlc) - # This case exists only to let depend.m4 do its work. It works by - # looking at the text of this script. This case will never be run, - # since it is checked for above. - exit 1 - ;; - aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the - # current directory. Also, the AIX compiler puts '$object:' at the + # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. - set_dir_from "$object" - set_base_from "$object" + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u @@ -313,7 +247,9 @@ "$@" -M fi stat=$? - if test $stat -ne 0; then + + if test $stat -eq 0; then : + else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi @@ -322,100 +258,44 @@ do test -f "$tmpdepfile" && break done - aix_post_process_depfile - ;; - -tcc) - # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 - # FIXME: That version still under development at the moment of writing. - # Make that this statement remains true also for stable, released - # versions. - # It will wrap lines (doesn't matter whether long or short) with a - # trailing '\', as in: - # - # foo.o : \ - # foo.c \ - # foo.h \ - # - # It will put a trailing '\' even on the last line, and will use leading - # spaces rather than leading tabs (at least since its commit 0394caf7 - # "Emit spaces for -MD"). - "$@" -MD -MF "$tmpdepfile" - stat=$? - if test $stat -ne 0; then - rm -f "$tmpdepfile" - exit $stat + if test -f "$tmpdepfile"; then + # Each line is of the form `foo.o: dependent.h'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" + # That's a tab and a space in the []. + sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" + else + # The sourcefile does not contain any dependencies, so just + # store a dummy comment line, to avoid errors with the Makefile + # "include basename.Plo" scheme. + echo "#dummy" > "$depfile" fi - rm -f "$depfile" - # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. - # We have to change lines of the first kind to '$object: \'. - sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" - # And for each line of the second kind, we have to emit a 'dep.h:' - # dummy dependency, to avoid the deleted-header problem. - sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; -## The order of this option in the case statement is important, since the -## shell code in configure will try each of these formats in the order -## listed in this file. A plain '-MD' option would be understood by many -## compilers, so we must ensure this comes after the gcc and icc options. -pgcc) - # Portland's C compiler understands '-MD'. - # Will always output deps to 'file.d' where file is the root name of the - # source file under compilation, even if file resides in a subdirectory. - # The object file name does not affect the name of the '.d' file. - # pgcc 10.2 will output +icc) + # Intel's C compiler understands `-MD -MF file'. However on + # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c + # ICC 7.0 will fill foo.d with something like + # foo.o: sub/foo.c + # foo.o: sub/foo.h + # which is wrong. We want: + # sub/foo.o: sub/foo.c + # sub/foo.o: sub/foo.h + # sub/foo.c: + # sub/foo.h: + # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h - # and will wrap long lines using '\' : + # and will wrap long lines using \ : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... - set_dir_from "$object" - # Use the source, not the object, to determine the base name, since - # that's sadly what pgcc will do too. - set_base_from "$source" - tmpdepfile=$base.d - - # For projects that build the same source file twice into different object - # files, the pgcc approach of using the *source* file root name can cause - # problems in parallel builds. Use a locking strategy to avoid stomping on - # the same $tmpdepfile. - lockdir=$base.d-lock - trap " - echo '$0: caught signal, cleaning up...' >&2 - rmdir '$lockdir' - exit 1 - " 1 2 13 15 - numtries=100 - i=$numtries - while test $i -gt 0; do - # mkdir is a portable test-and-set. - if mkdir "$lockdir" 2>/dev/null; then - # This process acquired the lock. - "$@" -MD - stat=$? - # Release the lock. - rmdir "$lockdir" - break - else - # If the lock is being held by a different process, wait - # until the winning process is done or we timeout. - while test -d "$lockdir" && test $i -gt 0; do - sleep 1 - i=`expr $i - 1` - done - fi - i=`expr $i - 1` - done - trap - 1 2 13 15 - if test $i -le 0; then - echo "$0: failed to acquire lock after $numtries attempts" >&2 - echo "$0: check lockdir '$lockdir'" >&2 - exit 1 - fi - if test $stat -ne 0; then + "$@" -MD -MF "$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else rm -f "$tmpdepfile" exit $stat fi @@ -427,8 +307,8 @@ sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. - sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ - | sed -e 's/$/ :/' >> "$depfile" + sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | + sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; @@ -439,8 +319,9 @@ # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. - set_dir_from "$object" - set_base_from "$object" + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d @@ -451,7 +332,8 @@ "$@" +Maked fi stat=$? - if test $stat -ne 0; then + if test $stat -eq 0; then : + else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi @@ -461,61 +343,77 @@ test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" - # Add 'dependent.h:' lines. + sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" + # Add `dependent.h:' lines. sed -ne '2,${ - s/^ *// - s/ \\*$// - s/$/:/ - p - }' "$tmpdepfile" >> "$depfile" + s/^ *// + s/ \\*$// + s/$/:/ + p + }' "$tmpdepfile" >> "$depfile" else - make_dummy_depfile + echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) - # The Tru64 compiler uses -MD to generate dependencies as a side - # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. - # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put - # dependencies in 'foo.d' instead, so we check for that too. - # Subdirectories are respected. - set_dir_from "$object" - set_base_from "$object" - - if test "$libtool" = yes; then - # Libtool generates 2 separate objects for the 2 libraries. These - # two compilations output dependencies in $dir.libs/$base.o.d and - # in $dir$base.o.d. We have to check for both files, because - # one of the two compilations can be disabled. We should prefer - # $dir$base.o.d over $dir.libs/$base.o.d because the latter is - # automatically cleaned when .libs/ is deleted, while ignoring - # the former would cause a distcleancheck panic. - tmpdepfile1=$dir$base.o.d # libtool 1.5 - tmpdepfile2=$dir.libs/$base.o.d # Likewise. - tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 - "$@" -Wc,-MD - else - tmpdepfile1=$dir$base.d - tmpdepfile2=$dir$base.d - tmpdepfile3=$dir$base.d - "$@" -MD - fi - - stat=$? - if test $stat -ne 0; then - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" - exit $stat - fi + # The Tru64 compiler uses -MD to generate dependencies as a side + # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. + # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put + # dependencies in `foo.d' instead, so we check for that too. + # Subdirectories are respected. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + + if test "$libtool" = yes; then + # With Tru64 cc, shared objects can also be used to make a + # static library. This mechanism is used in libtool 1.4 series to + # handle both shared and static libraries in a single compilation. + # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. + # + # With libtool 1.5 this exception was removed, and libtool now + # generates 2 separate objects for the 2 libraries. These two + # compilations output dependencies in $dir.libs/$base.o.d and + # in $dir$base.o.d. We have to check for both files, because + # one of the two compilations can be disabled. We should prefer + # $dir$base.o.d over $dir.libs/$base.o.d because the latter is + # automatically cleaned when .libs/ is deleted, while ignoring + # the former would cause a distcleancheck panic. + tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 + tmpdepfile2=$dir$base.o.d # libtool 1.5 + tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 + tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 + "$@" -Wc,-MD + else + tmpdepfile1=$dir$base.o.d + tmpdepfile2=$dir$base.d + tmpdepfile3=$dir$base.d + tmpdepfile4=$dir$base.d + "$@" -MD + fi - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" - do - test -f "$tmpdepfile" && break - done - # Same post-processing that is required for AIX mode. - aix_post_process_depfile - ;; + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" + # That's a tab and a space in the []. + sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" + else + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; msvc7) if test "$libtool" = yes; then @@ -526,7 +424,8 @@ "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" - if test $stat -ne 0; then + if test "$stat" = 0; then : + else rm -f "$tmpdepfile" exit $stat fi @@ -544,15 +443,14 @@ p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g -s/\(.*\)/'"$tab"'\1 \\/p +s/\(.*\)/ \1 \\/p s/.\(.*\) \\/\1:/ H $ { - s/.*/'"$tab"'/ + s/.*/ / G p }' >> "$depfile" - echo >> "$depfile" # make sure the fragment doesn't end with a backslash rm -f "$tmpdepfile" ;; @@ -580,7 +478,7 @@ shift fi - # Remove '-o $object'. + # Remove `-o $object'. IFS=" " for arg do @@ -600,18 +498,18 @@ done test -z "$dashmflag" && dashmflag=-M - # Require at least two characters before searching for ':' + # Require at least two characters before searching for `:' # in the target name. This is to cope with DOS-style filenames: - # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. + # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. "$@" $dashmflag | - sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" + sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" - # Some versions of the HPUX 10.20 sed can't process this sed invocation - # correctly. Breaking it into two sed invocations is a workaround. - tr ' ' "$nl" < "$tmpdepfile" \ - | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ - | sed -e 's/$/ :/' >> "$depfile" + tr ' ' ' +' < "$tmpdepfile" | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; @@ -664,12 +562,11 @@ # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" - # Some versions of the HPUX 10.20 sed can't process the last invocation - # correctly. Breaking it into two sed invocations is a workaround. - sed '1,2d' "$tmpdepfile" \ - | tr ' ' "$nl" \ - | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ - | sed -e 's/$/ :/' >> "$depfile" + sed '1,2d' "$tmpdepfile" | tr ' ' ' +' | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; @@ -686,7 +583,7 @@ shift fi - # Remove '-o $object'. + # Remove `-o $object'. IFS=" " for arg do @@ -705,10 +602,10 @@ esac done - "$@" -E \ - | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ - -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ - | sed '$ s: \\$::' > "$tmpdepfile" + "$@" -E | + sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | + sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" @@ -740,23 +637,23 @@ shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") - set fnord "$@" - shift - shift - ;; + set fnord "$@" + shift + shift + ;; *) - set fnord "$@" "$arg" - shift - shift - ;; + set fnord "$@" "$arg" + shift + shift + ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" - sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" - echo "$tab" >> "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" + echo " " >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; diff -Nru xserver-xorg-video-openchrome-0.5.0/install-sh xserver-xorg-video-openchrome-0.6.0/install-sh --- xserver-xorg-video-openchrome-0.5.0/install-sh 2016-07-06 16:22:04.000000000 +0000 +++ xserver-xorg-video-openchrome-0.6.0/install-sh 2017-03-07 11:18:26.000000000 +0000 @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2013-12-25.23; # UTC +scriptversion=2009-04-28.21; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -35,21 +35,25 @@ # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent -# 'make' implicit rules from creating a file called install from it +# `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. -tab=' ' nl=' ' -IFS=" $tab$nl" +IFS=" "" $nl" -# Set DOITPROG to "echo" to test this script. +# set DOITPROG to echo to test this script +# Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} -doit_exec=${doit:-exec} +if test -z "$doit"; then + doit_exec=exec +else + doit_exec=$doit +fi # Put in absolute file names if you don't have them in your path; # or use environment vars. @@ -64,6 +68,17 @@ rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} +posix_glob='?' +initialize_posix_glob=' + test "$posix_glob" != "?" || { + if (set -f) 2>/dev/null; then + posix_glob= + else + posix_glob=: + fi + } +' + posix_mkdir= # Desired mode of installed file. @@ -82,7 +97,7 @@ dst_arg= copy_on_change=false -is_target_a_directory=possibly +no_target_directory= usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE @@ -122,57 +137,42 @@ -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" - shift;; + shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 - case $mode in - *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) - echo "$0: invalid mode: $mode" >&2 - exit 1;; - esac - shift;; + case $mode in + *' '* | *' '* | *' +'* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + shift;; -o) chowncmd="$chownprog $2" - shift;; + shift;; -s) stripcmd=$stripprog;; - -t) - is_target_a_directory=always - dst_arg=$2 - # Protect names problematic for 'test' and other utilities. - case $dst_arg in - -* | [=\(\)!]) dst_arg=./$dst_arg;; - esac - shift;; + -t) dst_arg=$2 + shift;; - -T) is_target_a_directory=never;; + -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; - --) shift - break;; + --) shift + break;; - -*) echo "$0: invalid option: $1" >&2 - exit 1;; + -*) echo "$0: invalid option: $1" >&2 + exit 1;; *) break;; esac shift done -# We allow the use of options -d and -T together, by making -d -# take the precedence; this is for compatibility with GNU install. - -if test -n "$dir_arg"; then - if test -n "$dst_arg"; then - echo "$0: target directory not allowed when installing a directory." >&2 - exit 1 - fi -fi - if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. @@ -186,10 +186,6 @@ fi shift # arg dst_arg=$arg - # Protect names problematic for 'test' and other utilities. - case $dst_arg in - -* | [=\(\)!]) dst_arg=./$dst_arg;; - esac done fi @@ -198,26 +194,13 @@ echo "$0: no input file specified." >&2 exit 1 fi - # It's OK to call 'install-sh -d' without argument. + # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then - if test $# -gt 1 || test "$is_target_a_directory" = always; then - if test ! -d "$dst_arg"; then - echo "$0: $dst_arg: Is not a directory." >&2 - exit 1 - fi - fi -fi - -if test -z "$dir_arg"; then - do_exit='(exit $ret); exit $ret' - trap "ret=129; $do_exit" 1 - trap "ret=130; $do_exit" 2 - trap "ret=141; $do_exit" 13 - trap "ret=143; $do_exit" 15 + trap '(exit $?); exit' 1 2 13 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. @@ -228,16 +211,16 @@ *[0-7]) if test -z "$stripcmd"; then - u_plus_rw= + u_plus_rw= else - u_plus_rw='% 200' + u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then - u_plus_rw= + u_plus_rw= else - u_plus_rw=,u+rw + u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac @@ -245,9 +228,9 @@ for src do - # Protect names problematic for 'test' and other utilities. + # Protect names starting with `-'. case $src in - -* | [=\(\)!]) src=./$src;; + -*) src=./$src;; esac if test -n "$dir_arg"; then @@ -269,20 +252,51 @@ echo "$0: no destination specified." >&2 exit 1 fi + dst=$dst_arg + # Protect names starting with `-'. + case $dst in + -*) dst=./$dst;; + esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then - if test "$is_target_a_directory" = never; then - echo "$0: $dst_arg: Is a directory" >&2 - exit 1 + if test -n "$no_target_directory"; then + echo "$0: $dst_arg: Is a directory" >&2 + exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else - dstdir=`dirname "$dst"` + # Prefer dirname, but fall back on a substitute if dirname fails. + dstdir=` + (dirname "$dst") 2>/dev/null || + expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$dst" : 'X\(//\)[^/]' \| \ + X"$dst" : 'X\(//\)$' \| \ + X"$dst" : 'X\(/\)' \| . 2>/dev/null || + echo X"$dst" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q' + ` + test -d "$dstdir" dstdir_status=$? fi @@ -293,74 +307,74 @@ if test $dstdir_status != 0; then case $posix_mkdir in '') - # Create intermediate dirs using mode 755 as modified by the umask. - # This is like FreeBSD 'install' as of 1997-10-28. - umask=`umask` - case $stripcmd.$umask in - # Optimize common cases. - *[2367][2367]) mkdir_umask=$umask;; - .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; - - *[0-7]) - mkdir_umask=`expr $umask + 22 \ - - $umask % 100 % 40 + $umask % 20 \ - - $umask % 10 % 4 + $umask % 2 - `;; - *) mkdir_umask=$umask,go-w;; - esac - - # With -d, create the new directory with the user-specified mode. - # Otherwise, rely on $mkdir_umask. - if test -n "$dir_arg"; then - mkdir_mode=-m$mode - else - mkdir_mode= - fi - - posix_mkdir=false - case $umask in - *[123567][0-7][0-7]) - # POSIX mkdir -p sets u+wx bits regardless of umask, which - # is incompatible with FreeBSD 'install' when (umask & 300) != 0. - ;; - *) - tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ - trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 - - if (umask $mkdir_umask && - exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 - then - if test -z "$dir_arg" || { - # Check for POSIX incompatibilities with -m. - # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writable bit of parent directory when it shouldn't. - # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. - ls_ld_tmpdir=`ls -ld "$tmpdir"` - case $ls_ld_tmpdir in - d????-?r-*) different_mode=700;; - d????-?--*) different_mode=755;; - *) false;; - esac && - $mkdirprog -m$different_mode -p -- "$tmpdir" && { - ls_ld_tmpdir_1=`ls -ld "$tmpdir"` - test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" - } - } - then posix_mkdir=: - fi - rmdir "$tmpdir/d" "$tmpdir" - else - # Remove any dirs left behind by ancient mkdir implementations. - rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null - fi - trap '' 0;; - esac;; + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; + + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac + + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode + else + mkdir_mode= + fi + + posix_mkdir=false + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 + + if (umask $mkdir_umask && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writeable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + ls_ld_tmpdir=`ls -ld "$tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/d" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null + fi + trap '' 0;; + esac;; esac if $posix_mkdir && ( - umask $mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else @@ -370,51 +384,53 @@ # directory the slow way, step by step, checking for races as we go. case $dstdir in - /*) prefix='/';; - [-=\(\)!]*) prefix='./';; - *) prefix='';; + /*) prefix='/';; + -*) prefix='./';; + *) prefix='';; esac + eval "$initialize_posix_glob" + oIFS=$IFS IFS=/ - set -f + $posix_glob set -f set fnord $dstdir shift - set +f + $posix_glob set +f IFS=$oIFS prefixes= for d do - test X"$d" = X && continue + test -z "$d" && continue - prefix=$prefix$d - if test -d "$prefix"; then - prefixes= - else - if $posix_mkdir; then - (umask=$mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break - # Don't fail if two instances are running concurrently. - test -d "$prefix" || exit 1 - else - case $prefix in - *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; - *) qprefix=$prefix;; - esac - prefixes="$prefixes '$qprefix'" - fi - fi - prefix=$prefix/ + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask=$mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ done if test -n "$prefixes"; then - # Don't fail if two instances are running concurrently. - (umask $mkdir_umask && - eval "\$doit_exec \$mkdirprog $prefixes") || - test -d "$dstdir" || exit 1 - obsolete_mkdir_used=true + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true fi fi fi @@ -449,12 +465,15 @@ # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && - old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && - new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && - set -f && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && + + eval "$initialize_posix_glob" && + $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && - set +f && + $posix_glob set +f && + test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then @@ -467,24 +486,24 @@ # to itself, or perhaps because mv is so ancient that it does not # support -f. { - # Now remove or move aside any old file at destination location. - # We try this two ways since rm can't unlink itself on some - # systems and the destination file might be busy for other - # reasons. In this case, the final cleanup might fail but the new - # file should still install successfully. - { - test ! -f "$dst" || - $doit $rmcmd -f "$dst" 2>/dev/null || - { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && - { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } - } || - { echo "$0: cannot unlink or rename $dst" >&2 - (exit 1); exit 1 - } - } && + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd -f "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && - # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dst" + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 diff -Nru xserver-xorg-video-openchrome-0.5.0/ltmain.sh xserver-xorg-video-openchrome-0.6.0/ltmain.sh --- xserver-xorg-video-openchrome-0.5.0/ltmain.sh 2016-07-06 16:22:01.000000000 +0000 +++ xserver-xorg-video-openchrome-0.6.0/ltmain.sh 2017-03-07 11:18:26.000000000 +0000 @@ -1,12 +1,9 @@ -#! /bin/sh -## DO NOT EDIT - This file generated from ./build-aux/ltmain.in -## by inline-source v2014-01-03.01 -# libtool (GNU libtool) 2.4.6 -# Provide generalized library-building support services. +# libtool (GNU libtool) 2.4.2 # Written by Gordon Matzigkeit , 1996 -# Copyright (C) 1996-2015 Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, +# 2007, 2008, 2009, 2010, 2011 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. @@ -26,2112 +23,881 @@ # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . - - -PROGRAM=libtool -PACKAGE=libtool -VERSION=2.4.6 -package_revision=2.4.6 - - -## ------ ## -## Usage. ## -## ------ ## - -# Run './libtool --help' for help with using this script from the -# command line. - - -## ------------------------------- ## -## User overridable command paths. ## -## ------------------------------- ## - -# After configure completes, it has a better idea of some of the -# shell tools we need than the defaults used by the functions shared -# with bootstrap, so set those here where they can still be over- -# ridden by the user, but otherwise take precedence. - -: ${AUTOCONF="autoconf"} -: ${AUTOMAKE="automake"} - - -## -------------------------- ## -## Source external libraries. ## -## -------------------------- ## - -# Much of our low-level functionality needs to be sourced from external -# libraries, which are installed to $pkgauxdir. - -# Set a version string for this script. -scriptversion=2015-01-20.17; # UTC - -# General shell script boiler plate, and helper functions. -# Written by Gary V. Vaughan, 2004 - -# Copyright (C) 2004-2015 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. - -# As a special exception to the GNU General Public License, if you distribute -# this file as part of a program or library that is built using GNU Libtool, -# you may include this file under the same distribution terms that you use -# for the rest of that program. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNES FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# Please report bugs or propose patches to gary@gnu.org. +# 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. ## -## ------ ## - -# Evaluate this file near the top of your script to gain access to -# the functions and variables defined here: +# Usage: $progname [OPTION]... [MODE-ARG]... # -# . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh +# Provide generalized library-building support services. # -# If you need to override any of the default environment variable -# settings, do that before evaluating this file. - +# --config show all configuration variables +# --debug enable verbose shell tracing +# -n, --dry-run display commands without modifying any files +# --features display basic configuration information and exit +# --mode=MODE use operation mode MODE +# --preserve-dup-deps don't remove duplicate dependency libraries +# --quiet, --silent don't print informational messages +# --no-quiet, --no-silent +# print informational messages (default) +# --no-warn don't display warning messages +# --tag=TAG use configuration variables from tag TAG +# -v, --verbose print more informational messages than default +# --no-verbose don't print the extra informational messages +# --version print version information +# -h, --help, --help-all print short, long, or detailed help message +# +# MODE must be one of the following: +# +# clean remove files from the build directory +# compile compile a source file into a libtool object +# execute automatically set library path, then run a program +# finish complete the installation of libtool libraries +# install install libraries or executables +# link create a library or an executable +# uninstall remove libraries from an installed directory +# +# MODE-ARGS vary depending on the MODE. When passed as first option, +# `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that. +# Try `$progname --help --mode=MODE' for a more detailed description of MODE. +# +# When reporting a bug, please describe a test case to reproduce it and +# include the following information: +# +# host-triplet: $host +# shell: $SHELL +# compiler: $LTCC +# compiler flags: $LTCFLAGS +# linker: $LD (gnu? $with_gnu_ld) +# $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1ubuntu1 +# automake: $automake_version +# autoconf: $autoconf_version +# +# Report bugs to . +# GNU libtool home page: . +# General help using GNU software: . -## -------------------- ## -## Shell normalisation. ## -## -------------------- ## - -# Some shells need a little help to be as Bourne compatible as possible. -# Before doing anything else, make sure all that help has been provided! +PROGRAM=libtool +PACKAGE=libtool +VERSION="2.4.2 Debian-2.4.2-1ubuntu1" +TIMESTAMP="" +package_revision=1.3337 -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : +# Be 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 + # 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 - -# NLS nuisances: We save the old values in case they are required later. -_G_user_locale= -_G_safe_locale= -for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES -do - eval "if test set = \"\${$_G_var+set}\"; then - save_$_G_var=\$$_G_var - $_G_var=C - export $_G_var - _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\" - _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\" - fi" -done - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -# Make sure IFS has a sensible default -sp=' ' -nl=' -' -IFS="$sp $nl" - -# There are apparently some retarded systems that use ';' as a PATH separator! -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } + 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 - - -## ------------------------- ## -## Locate command utilities. ## -## ------------------------- ## - - -# func_executable_p FILE -# ---------------------- -# Check that FILE is an executable regular file. -func_executable_p () +# A function that is used when there is no print builtin or printf. +func_fallback_echo () { - test -f "$1" && test -x "$1" -} - - -# func_path_progs PROGS_LIST CHECK_FUNC [PATH] -# -------------------------------------------- -# Search for either a program that responds to --version with output -# containing "GNU", or else returned by CHECK_FUNC otherwise, by -# trying all the directories in PATH with each of the elements of -# PROGS_LIST. -# -# CHECK_FUNC should accept the path to a candidate program, and -# set $func_check_prog_result if it truncates its output less than -# $_G_path_prog_max characters. -func_path_progs () -{ - _G_progs_list=$1 - _G_check_func=$2 - _G_PATH=${3-"$PATH"} - - _G_path_prog_max=0 - _G_path_prog_found=false - _G_save_IFS=$IFS; IFS=${PATH_SEPARATOR-:} - for _G_dir in $_G_PATH; do - IFS=$_G_save_IFS - test -z "$_G_dir" && _G_dir=. - for _G_prog_name in $_G_progs_list; do - for _exeext in '' .EXE; do - _G_path_prog=$_G_dir/$_G_prog_name$_exeext - func_executable_p "$_G_path_prog" || continue - case `"$_G_path_prog" --version 2>&1` in - *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;; - *) $_G_check_func $_G_path_prog - func_path_progs_result=$func_check_prog_result - ;; - esac - $_G_path_prog_found && break 3 - done - done - done - IFS=$_G_save_IFS - test -z "$func_path_progs_result" && { - echo "no acceptable sed could be found in \$PATH" >&2 - exit 1 - } -} - - -# We want to be able to use the functions in this file before configure -# has figured out where the best binaries are kept, which means we have -# to search for them ourselves - except when the results are already set -# where we skip the searches. - -# Unless the user overrides by setting SED, search the path for either GNU -# sed, or the sed that truncates its output the least. -test -z "$SED" && { - _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ - for _G_i in 1 2 3 4 5 6 7; do - _G_sed_script=$_G_sed_script$nl$_G_sed_script - done - echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed - _G_sed_script= - - func_check_prog_sed () - { - _G_path_prog=$1 - - _G_count=0 - printf 0123456789 >conftest.in - while : - do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo '' >> conftest.nl - "$_G_path_prog" -f conftest.sed conftest.out 2>/dev/null || break - diff conftest.out conftest.nl >/dev/null 2>&1 || break - _G_count=`expr $_G_count + 1` - if test "$_G_count" -gt "$_G_path_prog_max"; then - # Best one so far, save it but keep looking for a better one - func_check_prog_result=$_G_path_prog - _G_path_prog_max=$_G_count - fi - # 10*(2^10) chars as input seems more than enough - test 10 -lt "$_G_count" && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out - } - - func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin - rm -f conftest.sed - SED=$func_path_progs_result + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' } +# NLS nuisances: We save the old values to restore during execute mode. +lt_user_locale= +lt_safe_locale= +for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES +do + eval "if test \"\${$lt_var+set}\" = set; then + save_$lt_var=\$$lt_var + $lt_var=C + export $lt_var + lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" + lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" + fi" +done +LC_ALL=C +LANGUAGE=C +export LANGUAGE LC_ALL -# Unless the user overrides by setting GREP, search the path for either GNU -# grep, or the grep that truncates its output the least. -test -z "$GREP" && { - func_check_prog_grep () - { - _G_path_prog=$1 - - _G_count=0 - _G_path_prog_max=0 - printf 0123456789 >conftest.in - while : - do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo 'GREP' >> conftest.nl - "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' conftest.out 2>/dev/null || break - diff conftest.out conftest.nl >/dev/null 2>&1 || break - _G_count=`expr $_G_count + 1` - if test "$_G_count" -gt "$_G_path_prog_max"; then - # Best one so far, save it but keep looking for a better one - func_check_prog_result=$_G_path_prog - _G_path_prog_max=$_G_count - fi - # 10*(2^10) chars as input seems more than enough - test 10 -lt "$_G_count" && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out - } +$lt_unset CDPATH - func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin - GREP=$func_path_progs_result -} +# 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" -## ------------------------------- ## -## User overridable command paths. ## -## ------------------------------- ## -# All uppercase variable names are used for environment variables. These -# variables can be overridden by the user before calling a script that -# uses them if a suitable command of that name is not already available -# in the command search PATH. : ${CP="cp -f"} -: ${ECHO="printf %s\n"} -: ${EGREP="$GREP -E"} -: ${FGREP="$GREP -F"} -: ${LN_S="ln -s"} +test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} +: ${Xsed="$SED -e 1s/^X//"} +# Global variables: +EXIT_SUCCESS=0 +EXIT_FAILURE=1 +EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. +EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. -## -------------------- ## -## Useful sed snippets. ## -## -------------------- ## +exit_status=$EXIT_SUCCESS -sed_dirname='s|/[^/]*$||' -sed_basename='s|^.*/||' +# Make sure IFS has a sensible default +lt_nl=' +' +IFS=" $lt_nl" -# 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' +dirname="s,/[^/]*$,," +basename="s,^.*/,," -# Same as above, but do not quote variable references. -sed_double_quote_subst='s/\(["`\\]\)/\\\1/g' +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` + if test "X$func_dirname_result" = "X${1}"; then + func_dirname_result="${3}" + else + func_dirname_result="$func_dirname_result${2}" + fi +} # func_dirname may be replaced by extended shell implementation -# Sed substitution that turns a string into a regex matching for the -# string literally. -sed_make_literal_regex='s|[].[^$\\*\/]|\\&|g' -# Sed substitution that converts a w32 file name or path -# that contains forward slashes, into one that contains -# (escaped) backslashes. A very naive implementation. -sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' +# func_basename file +func_basename () +{ + func_basename_result=`$ECHO "${1}" | $SED "$basename"` +} # func_basename may be replaced by extended shell implementation -# Re-'\' parameter expansions in output of sed_double_quote_subst that -# were '\'-ed in input to the same. If an odd number of '\' preceded a -# '$' in input to sed_double_quote_subst, that '$' was protected from -# expansion. Since each input '\' is now two '\'s, look for any number -# of runs of four '\'s followed by two '\'s and then a '$'. '\' that '$'. -_G_bs='\\' -_G_bs2='\\\\' -_G_bs4='\\\\\\\\' -_G_dollar='\$' -sed_double_backslash="\ - s/$_G_bs4/&\\ -/g - s/^$_G_bs2$_G_dollar/$_G_bs&/ - s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g - s/\n//g" + +# func_dirname_and_basename file append nondir_replacement +# perform func_basename and func_dirname in a single function +# call: +# dirname: Compute the dirname of FILE. If nonempty, +# add APPEND to the result, otherwise set result +# to NONDIR_REPLACEMENT. +# value returned in "$func_dirname_result" +# basename: Compute filename of FILE. +# value retuned in "$func_basename_result" +# Implementation must be kept synchronized with func_dirname +# and func_basename. For efficiency, we do not delegate to +# those functions but instead duplicate the functionality here. +func_dirname_and_basename () +{ + # Extract subdirectory from the argument. + func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` + if test "X$func_dirname_result" = "X${1}"; then + func_dirname_result="${3}" + else + func_dirname_result="$func_dirname_result${2}" + fi + func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` +} # func_dirname_and_basename may be replaced by extended shell implementation -## ----------------- ## -## Global variables. ## -## ----------------- ## - -# Except for the global variables explicitly listed below, the following -# functions in the '^func_' namespace, and the '^require_' namespace -# variables initialised in the 'Resource management' section, sourcing -# this file will not pollute your global namespace with anything -# else. There's no portable way to scope variables in Bourne shell -# though, so actually running these functions will sometimes place -# results into a variable named after the function, and often use -# temporary variables in the '^_G_' namespace. If you are careful to -# avoid using those namespaces casually in your sourcing script, things -# should continue to work as you expect. And, of course, you can freely -# overwrite any of the functions or variables defined here before -# calling anything to customize them. +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +# func_strip_suffix prefix name +func_stripname () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; + esac +} # func_stripname may be replaced by extended shell implementation -EXIT_SUCCESS=0 -EXIT_FAILURE=1 -EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. -EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. -# Allow overriding, eg assuming that you follow the convention of -# putting '$debug_cmd' at the start of all your functions, you can get -# bash to show function call trace with: -# -# debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name -debug_cmd=${debug_cmd-":"} -exit_cmd=: +# These SED scripts presuppose an absolute path with a trailing slash. +pathcar='s,^/\([^/]*\).*$,\1,' +pathcdr='s,^/[^/]*,,' +removedotparts=':dotsl + s@/\./@/@g + t dotsl + s,/\.$,/,' +collapseslashes='s@/\{1,\}@/@g' +finalslash='s,/*$,/,' -# By convention, finish your script with: -# -# exit $exit_status -# -# so that you can set exit_status to non-zero if you want to indicate -# something went wrong during execution without actually bailing out at -# the point of failure. -exit_status=$EXIT_SUCCESS +# func_normal_abspath PATH +# Remove doubled-up and trailing slashes, "." path components, +# and cancel out any ".." path components in PATH after making +# it an absolute path. +# value returned in "$func_normal_abspath_result" +func_normal_abspath () +{ + # Start from root dir and reassemble the path. + func_normal_abspath_result= + func_normal_abspath_tpath=$1 + func_normal_abspath_altnamespace= + case $func_normal_abspath_tpath in + "") + # Empty path, that just means $cwd. + func_stripname '' '/' "`pwd`" + func_normal_abspath_result=$func_stripname_result + return + ;; + # The next three entries are used to spot a run of precisely + # two leading slashes without using negated character classes; + # we take advantage of case's first-match behaviour. + ///*) + # Unusual form of absolute path, do nothing. + ;; + //*) + # Not necessarily an ordinary path; POSIX reserves leading '//' + # and for example Cygwin uses it to access remote file shares + # over CIFS/SMB, so we conserve a leading double slash if found. + func_normal_abspath_altnamespace=/ + ;; + /*) + # Absolute path, do nothing. + ;; + *) + # Relative path, prepend $cwd. + func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath + ;; + esac + # Cancel out all the simple stuff to save iterations. We also want + # the path to end with a slash for ease of parsing, so make sure + # there is one (and only one) here. + func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"` + while :; do + # Processed it all yet? + if test "$func_normal_abspath_tpath" = / ; then + # If we ascended to the root using ".." the result may be empty now. + if test -z "$func_normal_abspath_result" ; then + func_normal_abspath_result=/ + fi + break + fi + func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$pathcar"` + func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$pathcdr"` + # Figure out what to do with it + case $func_normal_abspath_tcomponent in + "") + # Trailing empty path component, ignore it. + ;; + ..) + # Parent dir; strip last assembled component from result. + func_dirname "$func_normal_abspath_result" + func_normal_abspath_result=$func_dirname_result + ;; + *) + # Actual path component, append it. + func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent + ;; + esac + done + # Restore leading double-slash if one was found on entry. + func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result +} -# 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 +# func_relative_path SRCDIR DSTDIR +# generates a relative path from SRCDIR to DSTDIR, with a trailing +# slash if non-empty, suitable for immediately appending a filename +# without needing to append a separator. +# value returned in "$func_relative_path_result" +func_relative_path () +{ + func_relative_path_result= + func_normal_abspath "$1" + func_relative_path_tlibdir=$func_normal_abspath_result + func_normal_abspath "$2" + func_relative_path_tbindir=$func_normal_abspath_result + + # Ascend the tree starting from libdir + while :; do + # check if we have found a prefix of bindir + case $func_relative_path_tbindir in + $func_relative_path_tlibdir) + # found an exact match + func_relative_path_tcancelled= + break + ;; + $func_relative_path_tlibdir*) + # found a matching prefix + func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" + func_relative_path_tcancelled=$func_stripname_result + if test -z "$func_relative_path_result"; then + func_relative_path_result=. + fi + break + ;; + *) + func_dirname $func_relative_path_tlibdir + func_relative_path_tlibdir=${func_dirname_result} + if test "x$func_relative_path_tlibdir" = x ; then + # Have to descend all the way to the root! + func_relative_path_result=../$func_relative_path_result + func_relative_path_tcancelled=$func_relative_path_tbindir + break + fi + func_relative_path_result=../$func_relative_path_result + ;; + esac + done + + # Now calculate path; take care to avoid doubling-up slashes. + func_stripname '' '/' "$func_relative_path_result" + func_relative_path_result=$func_stripname_result + func_stripname '/' '/' "$func_relative_path_tcancelled" + if test "x$func_stripname_result" != x ; then + func_relative_path_result=${func_relative_path_result}/${func_stripname_result} + fi + + # Normalisation. If bindir is libdir, return empty string, + # else relative path ending with a slash; either way, target + # file name can be directly appended. + if test ! -z "$func_relative_path_result"; then + func_stripname './' '' "$func_relative_path_result/" + func_relative_path_result=$func_stripname_result + fi +} -# The name of this program. -progname=`$ECHO "$progpath" |$SED "$sed_basename"` +# The name of this program: +func_dirname_and_basename "$progpath" +progname=$func_basename_result -# Make sure we have an absolute progpath for reexecution: +# Make sure we have an absolute path for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) - progdir=`$ECHO "$progpath" |$SED "$sed_dirname"` + progdir=$func_dirname_result progdir=`cd "$progdir" && pwd` - progpath=$progdir/$progname + progpath="$progdir/$progname" ;; *) - _G_IFS=$IFS + save_IFS="$IFS" IFS=${PATH_SEPARATOR-:} for progdir in $PATH; do - IFS=$_G_IFS + IFS="$save_IFS" test -x "$progdir/$progname" && break done - IFS=$_G_IFS + IFS="$save_IFS" test -n "$progdir" || progdir=`pwd` - progpath=$progdir/$progname + progpath="$progdir/$progname" ;; esac +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed="${SED}"' -e 1s/^X//' +sed_quote_subst='s/\([`"$\\]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\(["`\\]\)/\\\1/g' + +# Sed substitution that turns a string into a regex matching for the +# string literally. +sed_make_literal_regex='s,[].[^$\\*\/],\\&,g' -## ----------------- ## -## Standard options. ## -## ----------------- ## - -# The following options affect the operation of the functions defined -# below, and should be set appropriately depending on run-time para- -# meters passed on the command line. +# Sed substitution that converts a w32 file name or path +# which contains forward slashes, into one that contains +# (escaped) backslashes. A very naive implementation. +lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' + +# Re-`\' parameter expansions in output of double_quote_subst that were +# `\'-ed in input to the same. If an odd number of `\' preceded a '$' +# in input to double_quote_subst, that '$' was protected from expansion. +# Since each input `\' is now two `\'s, look for any number of runs of +# four `\'s followed by two `\'s and then a '$'. `\' that '$'. +bs='\\' +bs2='\\\\' +bs4='\\\\\\\\' +dollar='\$' +sed_double_backslash="\ + s/$bs4/&\\ +/g + s/^$bs2$dollar/$bs&/ + s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g + s/\n//g" +# Standard options: opt_dry_run=false +opt_help=false opt_quiet=false opt_verbose=false +opt_warning=: -# Categories 'all' and 'none' are always available. Append any others -# you will pass as the first argument to func_warning from your own -# code. -warning_categories= - -# By default, display warnings according to 'opt_warning_types'. Set -# 'warning_func' to ':' to elide all warnings, or func_fatal_error to -# treat the next displayed warning as a fatal error. -warning_func=func_warn_and_continue - -# Set to 'all' to display all warnings, 'none' to suppress all -# warnings, or a space delimited list of some subset of -# 'warning_categories' to display only the listed warnings. -opt_warning_types=all - - -## -------------------- ## -## Resource management. ## -## -------------------- ## - -# This section contains definitions for functions that each ensure a -# particular resource (a file, or a non-empty configuration variable for -# example) is available, and if appropriate to extract default values -# from pertinent package files. Call them using their associated -# 'require_*' variable to ensure that they are executed, at most, once. -# -# It's entirely deliberate that calling these functions can set -# variables that don't obey the namespace limitations obeyed by the rest -# of this file, in order that that they be as useful as possible to -# callers. - - -# require_term_colors -# ------------------- -# Allow display of bold text on terminals that support it. -require_term_colors=func_require_term_colors -func_require_term_colors () -{ - $debug_cmd - - test -t 1 && { - # COLORTERM and USE_ANSI_COLORS environment variables take - # precedence, because most terminfo databases neglect to describe - # whether color sequences are supported. - test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"} - - if test 1 = "$USE_ANSI_COLORS"; then - # Standard ANSI escape sequences - tc_reset='' - tc_bold=''; tc_standout='' - tc_red=''; tc_green='' - tc_blue=''; tc_cyan='' - else - # Otherwise trust the terminfo database after all. - test -n "`tput sgr0 2>/dev/null`" && { - tc_reset=`tput sgr0` - test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold` - tc_standout=$tc_bold - test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso` - test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1` - test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2` - test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4` - test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5` - } - fi - } - - require_term_colors=: +# func_echo arg... +# Echo program name prefixed message, along with the current mode +# name if it has been set yet. +func_echo () +{ + $ECHO "$progname: ${opt_mode+$opt_mode: }$*" } +# func_verbose arg... +# Echo program name prefixed message in verbose mode only. +func_verbose () +{ + $opt_verbose && func_echo ${1+"$@"} -## ----------------- ## -## Function library. ## -## ----------------- ## - -# This section contains a variety of useful functions to call in your -# scripts. Take note of the portable wrappers for features provided by -# some modern shells, which will fall back to slower equivalents on -# less featureful shells. + # A bug in bash halts the script if the last line of a function + # fails when set -e is in force, so we need another command to + # work around that: + : +} +# func_echo_all arg... +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "$*" +} -# func_append VAR VALUE -# --------------------- -# Append VALUE onto the existing contents of VAR. +# func_error arg... +# Echo program name prefixed message to standard error. +func_error () +{ + $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 +} - # We should try to minimise forks, especially on Windows where they are - # unreasonably slow, so skip the feature probes when bash or zsh are - # being used: - if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then - : ${_G_HAVE_ARITH_OP="yes"} - : ${_G_HAVE_XSI_OPS="yes"} - # The += operator was introduced in bash 3.1 - case $BASH_VERSION in - [12].* | 3.0 | 3.0*) ;; - *) - : ${_G_HAVE_PLUSEQ_OP="yes"} - ;; - esac - fi +# func_warning arg... +# Echo program name prefixed warning message to standard error. +func_warning () +{ + $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 - # _G_HAVE_PLUSEQ_OP - # Can be empty, in which case the shell is probed, "yes" if += is - # useable or anything else if it does not work. - test -z "$_G_HAVE_PLUSEQ_OP" \ - && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \ - && _G_HAVE_PLUSEQ_OP=yes - -if test yes = "$_G_HAVE_PLUSEQ_OP" -then - # This is an XSI compatible shell, allowing a faster implementation... - eval 'func_append () - { - $debug_cmd + # bash bug again: + : +} - eval "$1+=\$2" - }' -else - # ...otherwise fall back to using expr, which is often a shell builtin. - func_append () - { - $debug_cmd +# func_fatal_error arg... +# Echo program name prefixed message to standard error, and exit. +func_fatal_error () +{ + func_error ${1+"$@"} + exit $EXIT_FAILURE +} - eval "$1=\$$1\$2" - } -fi - - -# func_append_quoted VAR VALUE -# ---------------------------- -# Quote VALUE and append to the end of shell variable VAR, separated -# by a space. -if test yes = "$_G_HAVE_PLUSEQ_OP"; then - eval 'func_append_quoted () - { - $debug_cmd - - func_quote_for_eval "$2" - eval "$1+=\\ \$func_quote_for_eval_result" - }' -else - func_append_quoted () - { - $debug_cmd - - func_quote_for_eval "$2" - eval "$1=\$$1\\ \$func_quote_for_eval_result" - } -fi - - -# func_append_uniq VAR VALUE -# -------------------------- -# Append unique VALUE onto the existing contents of VAR, assuming -# entries are delimited by the first character of VALUE. For example: -# -# func_append_uniq options " --another-option option-argument" -# -# will only append to $options if " --another-option option-argument " -# is not already present somewhere in $options already (note spaces at -# each end implied by leading space in second argument). -func_append_uniq () -{ - $debug_cmd - - eval _G_current_value='`$ECHO $'$1'`' - _G_delim=`expr "$2" : '\(.\)'` - - case $_G_delim$_G_current_value$_G_delim in - *"$2$_G_delim"*) ;; - *) func_append "$@" ;; - esac -} - - -# func_arith TERM... -# ------------------ -# Set func_arith_result to the result of evaluating TERMs. - test -z "$_G_HAVE_ARITH_OP" \ - && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \ - && _G_HAVE_ARITH_OP=yes - -if test yes = "$_G_HAVE_ARITH_OP"; then - eval 'func_arith () - { - $debug_cmd - - func_arith_result=$(( $* )) - }' -else - func_arith () - { - $debug_cmd - - func_arith_result=`expr "$@"` - } -fi - - -# func_basename FILE -# ------------------ -# Set func_basename_result to FILE with everything up to and including -# the last / stripped. -if test yes = "$_G_HAVE_XSI_OPS"; then - # If this shell supports suffix pattern removal, then use it to avoid - # forking. Hide the definitions single quotes in case the shell chokes - # on unsupported syntax... - _b='func_basename_result=${1##*/}' - _d='case $1 in - */*) func_dirname_result=${1%/*}$2 ;; - * ) func_dirname_result=$3 ;; - esac' - -else - # ...otherwise fall back to using sed. - _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`' - _d='func_dirname_result=`$ECHO "$1" |$SED "$sed_dirname"` - if test "X$func_dirname_result" = "X$1"; then - func_dirname_result=$3 - else - func_append func_dirname_result "$2" - fi' -fi - -eval 'func_basename () -{ - $debug_cmd - - '"$_b"' -}' - - -# func_dirname FILE APPEND NONDIR_REPLACEMENT -# ------------------------------------------- -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -eval 'func_dirname () -{ - $debug_cmd - - '"$_d"' -}' - - -# 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" -# For efficiency, we do not delegate to the functions above but instead -# duplicate the functionality here. -eval 'func_dirname_and_basename () -{ - $debug_cmd - - '"$_b"' - '"$_d"' -}' - - -# func_echo ARG... -# ---------------- -# Echo program name prefixed message. -func_echo () -{ - $debug_cmd - - _G_message=$* - - func_echo_IFS=$IFS - IFS=$nl - for _G_line in $_G_message; do - IFS=$func_echo_IFS - $ECHO "$progname: $_G_line" - done - IFS=$func_echo_IFS -} - - -# func_echo_all ARG... -# -------------------- -# Invoke $ECHO with all args, space-separated. -func_echo_all () -{ - $ECHO "$*" -} - - -# func_echo_infix_1 INFIX ARG... -# ------------------------------ -# Echo program name, followed by INFIX on the first line, with any -# additional lines not showing INFIX. -func_echo_infix_1 () -{ - $debug_cmd - - $require_term_colors - - _G_infix=$1; shift - _G_indent=$_G_infix - _G_prefix="$progname: $_G_infix: " - _G_message=$* - - # Strip color escape sequences before counting printable length - for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan" - do - test -n "$_G_tc" && { - _G_esc_tc=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"` - _G_indent=`$ECHO "$_G_indent" | $SED "s|$_G_esc_tc||g"` - } - done - _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`" " ## exclude from sc_prohibit_nested_quotes - - func_echo_infix_1_IFS=$IFS - IFS=$nl - for _G_line in $_G_message; do - IFS=$func_echo_infix_1_IFS - $ECHO "$_G_prefix$tc_bold$_G_line$tc_reset" >&2 - _G_prefix=$_G_indent - done - IFS=$func_echo_infix_1_IFS -} - - -# func_error ARG... -# ----------------- -# Echo program name prefixed message to standard error. -func_error () -{ - $debug_cmd - - $require_term_colors - - func_echo_infix_1 " $tc_standout${tc_red}error$tc_reset" "$*" >&2 -} - - -# func_fatal_error ARG... -# ----------------------- -# Echo program name prefixed message to standard error, and exit. -func_fatal_error () +# func_fatal_help arg... +# Echo program name prefixed message to standard error, followed by +# a help hint, and exit. +func_fatal_help () { - $debug_cmd - - func_error "$*" - exit $EXIT_FAILURE + func_error ${1+"$@"} + func_fatal_error "$help" } +help="Try \`$progname --help' for more information." ## default -# func_grep EXPRESSION FILENAME -# ----------------------------- +# func_grep expression filename # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { - $debug_cmd - $GREP "$1" "$2" >/dev/null 2>&1 } -# func_len STRING -# --------------- -# Set func_len_result to the length of STRING. STRING may not -# start with a hyphen. - test -z "$_G_HAVE_XSI_OPS" \ - && (eval 'x=a/b/c; - test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ - && _G_HAVE_XSI_OPS=yes - -if test yes = "$_G_HAVE_XSI_OPS"; then - eval 'func_len () - { - $debug_cmd - - func_len_result=${#1} - }' -else - func_len () - { - $debug_cmd - - func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` - } -fi - - -# func_mkdir_p DIRECTORY-PATH -# --------------------------- +# func_mkdir_p directory-path # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { - $debug_cmd - - _G_directory_path=$1 - _G_dir_list= + my_directory_path="$1" + my_dir_list= - if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then + if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then - # Protect directory names starting with '-' - case $_G_directory_path in - -*) _G_directory_path=./$_G_directory_path ;; + # 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 "$_G_directory_path"; do + 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. - _G_dir_list=$_G_directory_path:$_G_dir_list + my_dir_list="$my_directory_path:$my_dir_list" # If the last portion added has no slash in it, the list is done - case $_G_directory_path in */*) ;; *) break ;; esac + case $my_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop - _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"` + my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"` done - _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'` + my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'` - func_mkdir_p_IFS=$IFS; IFS=: - for _G_dir in $_G_dir_list; do - IFS=$func_mkdir_p_IFS - # mkdir can fail with a 'File exist' error if two processes + 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 "$_G_dir" 2>/dev/null || : + $MKDIR "$my_dir" 2>/dev/null || : done - IFS=$func_mkdir_p_IFS + IFS="$save_mkdir_p_IFS" # Bail out if we (or some other process) failed to create a directory. - test -d "$_G_directory_path" || \ - func_fatal_error "Failed to create '$1'" + test -d "$my_directory_path" || \ + func_fatal_error "Failed to create \`$1'" fi } -# func_mktempdir [BASENAME] -# ------------------------- +# func_mktempdir [string] # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If -# given, BASENAME is the basename for that directory. +# given, STRING is the basename for that directory. func_mktempdir () { - $debug_cmd + my_template="${TMPDIR-/tmp}/${1-$progname}" - _G_template=${TMPDIR-/tmp}/${1-$progname} - - if test : = "$opt_dry_run"; then + if test "$opt_dry_run" = ":"; then # Return a directory name, but don't create it in dry-run mode - _G_tmpdir=$_G_template-$$ + my_tmpdir="${my_template}-$$" else # If mktemp works, use that first and foremost - _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null` + my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` - if test ! -d "$_G_tmpdir"; then + if test ! -d "$my_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race - _G_tmpdir=$_G_template-${RANDOM-0}$$ + my_tmpdir="${my_template}-${RANDOM-0}$$" - func_mktempdir_umask=`umask` + save_mktempdir_umask=`umask` umask 0077 - $MKDIR "$_G_tmpdir" - umask $func_mktempdir_umask + $MKDIR "$my_tmpdir" + umask $save_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure - test -d "$_G_tmpdir" || \ - func_fatal_error "cannot create temporary directory '$_G_tmpdir'" + test -d "$my_tmpdir" || \ + func_fatal_error "cannot create temporary directory \`$my_tmpdir'" fi - $ECHO "$_G_tmpdir" -} - - -# func_normal_abspath PATH -# ------------------------ -# Remove doubled-up and trailing slashes, "." path components, -# and cancel out any ".." path components in PATH after making -# it an absolute path. -func_normal_abspath () -{ - $debug_cmd - - # These SED scripts presuppose an absolute path with a trailing slash. - _G_pathcar='s|^/\([^/]*\).*$|\1|' - _G_pathcdr='s|^/[^/]*||' - _G_removedotparts=':dotsl - s|/\./|/|g - t dotsl - s|/\.$|/|' - _G_collapseslashes='s|/\{1,\}|/|g' - _G_finalslash='s|/*$|/|' - - # Start from root dir and reassemble the path. - func_normal_abspath_result= - func_normal_abspath_tpath=$1 - func_normal_abspath_altnamespace= - case $func_normal_abspath_tpath in - "") - # Empty path, that just means $cwd. - func_stripname '' '/' "`pwd`" - func_normal_abspath_result=$func_stripname_result - return - ;; - # The next three entries are used to spot a run of precisely - # two leading slashes without using negated character classes; - # we take advantage of case's first-match behaviour. - ///*) - # Unusual form of absolute path, do nothing. - ;; - //*) - # Not necessarily an ordinary path; POSIX reserves leading '//' - # and for example Cygwin uses it to access remote file shares - # over CIFS/SMB, so we conserve a leading double slash if found. - func_normal_abspath_altnamespace=/ - ;; - /*) - # Absolute path, do nothing. - ;; - *) - # Relative path, prepend $cwd. - func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath - ;; - esac - - # Cancel out all the simple stuff to save iterations. We also want - # the path to end with a slash for ease of parsing, so make sure - # there is one (and only one) here. - func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ - -e "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_finalslash"` - while :; do - # Processed it all yet? - if test / = "$func_normal_abspath_tpath"; then - # If we ascended to the root using ".." the result may be empty now. - if test -z "$func_normal_abspath_result"; then - func_normal_abspath_result=/ - fi - break - fi - func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ - -e "$_G_pathcar"` - func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ - -e "$_G_pathcdr"` - # Figure out what to do with it - case $func_normal_abspath_tcomponent in - "") - # Trailing empty path component, ignore it. - ;; - ..) - # Parent dir; strip last assembled component from result. - func_dirname "$func_normal_abspath_result" - func_normal_abspath_result=$func_dirname_result - ;; - *) - # Actual path component, append it. - func_append func_normal_abspath_result "/$func_normal_abspath_tcomponent" - ;; - esac - done - # Restore leading double-slash if one was found on entry. - func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result + $ECHO "$my_tmpdir" } -# func_notquiet ARG... -# -------------------- -# Echo program name prefixed message only when not in quiet mode. -func_notquiet () -{ - $debug_cmd - - $opt_quiet || func_echo ${1+"$@"} - - # A bug in bash halts the script if the last line of a function - # fails when set -e is in force, so we need another command to - # work around that: - : -} - - -# func_relative_path SRCDIR DSTDIR -# -------------------------------- -# Set func_relative_path_result to the relative path from SRCDIR to DSTDIR. -func_relative_path () -{ - $debug_cmd - - func_relative_path_result= - func_normal_abspath "$1" - func_relative_path_tlibdir=$func_normal_abspath_result - func_normal_abspath "$2" - func_relative_path_tbindir=$func_normal_abspath_result - - # Ascend the tree starting from libdir - while :; do - # check if we have found a prefix of bindir - case $func_relative_path_tbindir in - $func_relative_path_tlibdir) - # found an exact match - func_relative_path_tcancelled= - break - ;; - $func_relative_path_tlibdir*) - # found a matching prefix - func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" - func_relative_path_tcancelled=$func_stripname_result - if test -z "$func_relative_path_result"; then - func_relative_path_result=. - fi - break - ;; - *) - func_dirname $func_relative_path_tlibdir - func_relative_path_tlibdir=$func_dirname_result - if test -z "$func_relative_path_tlibdir"; then - # Have to descend all the way to the root! - func_relative_path_result=../$func_relative_path_result - func_relative_path_tcancelled=$func_relative_path_tbindir - break - fi - func_relative_path_result=../$func_relative_path_result - ;; - esac - done - - # Now calculate path; take care to avoid doubling-up slashes. - func_stripname '' '/' "$func_relative_path_result" - func_relative_path_result=$func_stripname_result - func_stripname '/' '/' "$func_relative_path_tcancelled" - if test -n "$func_stripname_result"; then - func_append func_relative_path_result "/$func_stripname_result" - fi - - # Normalisation. If bindir is libdir, return '.' else relative path. - if test -n "$func_relative_path_result"; then - func_stripname './' '' "$func_relative_path_result" - func_relative_path_result=$func_stripname_result - fi - - test -n "$func_relative_path_result" || func_relative_path_result=. - - : -} - - -# func_quote_for_eval ARG... -# -------------------------- -# Aesthetically quote ARGs to be evaled later. -# This function returns two values: -# i) func_quote_for_eval_result -# double-quoted, suitable for a subsequent eval -# ii) func_quote_for_eval_unquoted_result -# has all characters that are still active within double -# quotes backslashified. +# func_quote_for_eval 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 () { - $debug_cmd - - func_quote_for_eval_unquoted_result= - func_quote_for_eval_result= - while test 0 -lt $#; do - case $1 in - *[\\\`\"\$]*) - _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;; - *) - _G_unquoted_arg=$1 ;; - esac - if test -n "$func_quote_for_eval_unquoted_result"; then - func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg" - else - func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg" - fi - - case $_G_unquoted_arg in - # Double-quote args containing shell metacharacters to delay - # word splitting, command substitution and variable expansion - # for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - _G_quoted_arg=\"$_G_unquoted_arg\" - ;; - *) - _G_quoted_arg=$_G_unquoted_arg - ;; - esac - - if test -n "$func_quote_for_eval_result"; then - func_append func_quote_for_eval_result " $_G_quoted_arg" - else - func_append func_quote_for_eval_result "$_G_quoted_arg" - fi - shift - done -} - - -# func_quote_for_expand ARG -# ------------------------- -# Aesthetically quote ARG to be evaled later; same as above, -# but do not quote variable references. -func_quote_for_expand () -{ - $debug_cmd - case $1 in - *[\\\`\"]*) - _G_arg=`$ECHO "$1" | $SED \ - -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;; + *[\\\`\"\$]*) + func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;; *) - _G_arg=$1 ;; + func_quote_for_eval_unquoted_result="$1" ;; esac - case $_G_arg in + case $func_quote_for_eval_unquoted_result in # Double-quote args containing shell metacharacters to delay - # word splitting and command substitution for a subsequent eval. + # 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. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - _G_arg=\"$_G_arg\" + func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" ;; - esac - - func_quote_for_expand_result=$_G_arg -} - - -# func_stripname PREFIX SUFFIX NAME -# --------------------------------- -# strip PREFIX and SUFFIX from NAME, and store in func_stripname_result. -# 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). -if test yes = "$_G_HAVE_XSI_OPS"; then - eval 'func_stripname () - { - $debug_cmd - - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary variable first. - func_stripname_result=$3 - func_stripname_result=${func_stripname_result#"$1"} - func_stripname_result=${func_stripname_result%"$2"} - }' -else - func_stripname () - { - $debug_cmd - - case $2 in - .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;; - *) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;; - esac - } -fi - - -# func_show_eval CMD [FAIL_EXP] -# ----------------------------- -# Unless opt_quiet 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 () -{ - $debug_cmd - - _G_cmd=$1 - _G_fail_exp=${2-':'} - - func_quote_for_expand "$_G_cmd" - eval "func_notquiet $func_quote_for_expand_result" - - $opt_dry_run || { - eval "$_G_cmd" - _G_status=$? - if test 0 -ne "$_G_status"; then - eval "(exit $_G_status); $_G_fail_exp" - fi - } -} - - -# func_show_eval_locale CMD [FAIL_EXP] -# ------------------------------------ -# Unless opt_quiet 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 () -{ - $debug_cmd - - _G_cmd=$1 - _G_fail_exp=${2-':'} - - $opt_quiet || { - func_quote_for_expand "$_G_cmd" - eval "func_echo $func_quote_for_expand_result" - } - - $opt_dry_run || { - eval "$_G_user_locale - $_G_cmd" - _G_status=$? - eval "$_G_safe_locale" - if test 0 -ne "$_G_status"; then - eval "(exit $_G_status); $_G_fail_exp" - fi - } -} - - -# func_tr_sh -# ---------- -# Turn $1 into a string suitable for a shell variable name. -# Result is stored in $func_tr_sh_result. All characters -# not in the set a-zA-Z0-9_ are replaced with '_'. Further, -# if $1 begins with a digit, a '_' is prepended as well. -func_tr_sh () -{ - $debug_cmd - - case $1 in - [0-9]* | *[!a-zA-Z0-9_]*) - func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'` - ;; - * ) - func_tr_sh_result=$1 - ;; - esac -} - - -# func_verbose ARG... -# ------------------- -# Echo program name prefixed message in verbose mode only. -func_verbose () -{ - $debug_cmd - - $opt_verbose && func_echo "$*" - - : -} - - -# func_warn_and_continue ARG... -# ----------------------------- -# Echo program name prefixed warning message to standard error. -func_warn_and_continue () -{ - $debug_cmd - - $require_term_colors - - func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2 -} - - -# func_warning CATEGORY ARG... -# ---------------------------- -# Echo program name prefixed warning message to standard error. Warning -# messages can be filtered according to CATEGORY, where this function -# elides messages where CATEGORY is not listed in the global variable -# 'opt_warning_types'. -func_warning () -{ - $debug_cmd - - # CATEGORY must be in the warning_categories list! - case " $warning_categories " in - *" $1 "*) ;; - *) func_internal_error "invalid warning category '$1'" ;; - esac - - _G_category=$1 - shift - - case " $opt_warning_types " in - *" $_G_category "*) $warning_func ${1+"$@"} ;; - esac -} - - -# func_sort_ver VER1 VER2 -# ----------------------- -# 'sort -V' is not generally available. -# Note this deviates from the version comparison in automake -# in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a -# but this should suffice as we won't be specifying old -# version formats or redundant trailing .0 in bootstrap.conf. -# If we did want full compatibility then we should probably -# use m4_version_compare from autoconf. -func_sort_ver () -{ - $debug_cmd - - printf '%s\n%s\n' "$1" "$2" \ - | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n -} - -# func_lt_ver PREV CURR -# --------------------- -# Return true if PREV and CURR are in the correct order according to -# func_sort_ver, otherwise false. Use it like this: -# -# func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..." -func_lt_ver () -{ - $debug_cmd - - test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q` -} - - -# Local variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'before-save-hook 'time-stamp) -# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" -# time-stamp-time-zone: "UTC" -# End: -#! /bin/sh - -# Set a version string for this script. -scriptversion=2014-01-07.03; # UTC - -# A portable, pluggable option parser for Bourne shell. -# Written by Gary V. Vaughan, 2010 - -# Copyright (C) 2010-2015 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# Please report bugs or propose patches to gary@gnu.org. - - -## ------ ## -## Usage. ## -## ------ ## - -# This file is a library for parsing options in your shell scripts along -# with assorted other useful supporting features that you can make use -# of too. -# -# For the simplest scripts you might need only: -# -# #!/bin/sh -# . relative/path/to/funclib.sh -# . relative/path/to/options-parser -# scriptversion=1.0 -# func_options ${1+"$@"} -# eval set dummy "$func_options_result"; shift -# ...rest of your script... -# -# In order for the '--version' option to work, you will need to have a -# suitably formatted comment like the one at the top of this file -# starting with '# Written by ' and ending with '# warranty; '. -# -# For '-h' and '--help' to work, you will also need a one line -# description of your script's purpose in a comment directly above the -# '# Written by ' line, like the one at the top of this file. -# -# The default options also support '--debug', which will turn on shell -# execution tracing (see the comment above debug_cmd below for another -# use), and '--verbose' and the func_verbose function to allow your script -# to display verbose messages only when your user has specified -# '--verbose'. -# -# After sourcing this file, you can plug processing for additional -# options by amending the variables from the 'Configuration' section -# below, and following the instructions in the 'Option parsing' -# section further down. - -## -------------- ## -## Configuration. ## -## -------------- ## - -# You should override these variables in your script after sourcing this -# file so that they reflect the customisations you have added to the -# option parser. - -# The usage line for option parsing errors and the start of '-h' and -# '--help' output messages. You can embed shell variables for delayed -# expansion at the time the message is displayed, but you will need to -# quote other shell meta-characters carefully to prevent them being -# expanded when the contents are evaled. -usage='$progpath [OPTION]...' - -# Short help message in response to '-h' and '--help'. Add to this or -# override it after sourcing this library to reflect the full set of -# options your script accepts. -usage_message="\ - --debug enable verbose shell tracing - -W, --warnings=CATEGORY - report the warnings falling in CATEGORY [all] - -v, --verbose verbosely report processing - --version print version information and exit - -h, --help print short or long help message and exit -" - -# Additional text appended to 'usage_message' in response to '--help'. -long_help_message=" -Warning categories include: - 'all' show all warnings - 'none' turn off all the warnings - 'error' warnings are treated as fatal errors" - -# Help message printed before fatal option parsing errors. -fatal_help="Try '\$progname --help' for more information." - - - -## ------------------------- ## -## Hook function management. ## -## ------------------------- ## - -# This section contains functions for adding, removing, and running hooks -# to the main code. A hook is just a named list of of function, that can -# be run in order later on. - -# func_hookable FUNC_NAME -# ----------------------- -# Declare that FUNC_NAME will run hooks added with -# 'func_add_hook FUNC_NAME ...'. -func_hookable () -{ - $debug_cmd - - func_append hookable_fns " $1" -} - - -# func_add_hook FUNC_NAME HOOK_FUNC -# --------------------------------- -# Request that FUNC_NAME call HOOK_FUNC before it returns. FUNC_NAME must -# first have been declared "hookable" by a call to 'func_hookable'. -func_add_hook () -{ - $debug_cmd - - case " $hookable_fns " in - *" $1 "*) ;; - *) func_fatal_error "'$1' does not accept hook functions." ;; - esac - - eval func_append ${1}_hooks '" $2"' -} - - -# func_remove_hook FUNC_NAME HOOK_FUNC -# ------------------------------------ -# Remove HOOK_FUNC from the list of functions called by FUNC_NAME. -func_remove_hook () -{ - $debug_cmd - - eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`' -} - - -# func_run_hooks FUNC_NAME [ARG]... -# --------------------------------- -# Run all hook functions registered to FUNC_NAME. -# It is assumed that the list of hook functions contains nothing more -# than a whitespace-delimited list of legal shell function names, and -# no effort is wasted trying to catch shell meta-characters or preserve -# whitespace. -func_run_hooks () -{ - $debug_cmd - - case " $hookable_fns " in - *" $1 "*) ;; - *) func_fatal_error "'$1' does not support hook funcions.n" ;; - esac - - eval _G_hook_fns=\$$1_hooks; shift - - for _G_hook in $_G_hook_fns; do - eval $_G_hook '"$@"' - - # store returned options list back into positional - # parameters for next 'cmd' execution. - eval _G_hook_result=\$${_G_hook}_result - eval set dummy "$_G_hook_result"; shift - done - - func_quote_for_eval ${1+"$@"} - func_run_hooks_result=$func_quote_for_eval_result -} - - - -## --------------- ## -## Option parsing. ## -## --------------- ## - -# In order to add your own option parsing hooks, you must accept the -# full positional parameter list in your hook function, remove any -# options that you action, and then pass back the remaining unprocessed -# options in '_result', escaped suitably for -# 'eval'. Like this: -# -# my_options_prep () -# { -# $debug_cmd -# -# # Extend the existing usage message. -# usage_message=$usage_message' -# -s, --silent don'\''t print informational messages -# ' -# -# func_quote_for_eval ${1+"$@"} -# my_options_prep_result=$func_quote_for_eval_result -# } -# func_add_hook func_options_prep my_options_prep -# -# -# my_silent_option () -# { -# $debug_cmd -# -# # Note that for efficiency, we parse as many options as we can -# # recognise in a loop before passing the remainder back to the -# # caller on the first unrecognised argument we encounter. -# while test $# -gt 0; do -# opt=$1; shift -# case $opt in -# --silent|-s) opt_silent=: ;; -# # Separate non-argument short options: -# -s*) func_split_short_opt "$_G_opt" -# set dummy "$func_split_short_opt_name" \ -# "-$func_split_short_opt_arg" ${1+"$@"} -# shift -# ;; -# *) set dummy "$_G_opt" "$*"; shift; break ;; -# esac -# done -# -# func_quote_for_eval ${1+"$@"} -# my_silent_option_result=$func_quote_for_eval_result -# } -# func_add_hook func_parse_options my_silent_option -# -# -# my_option_validation () -# { -# $debug_cmd -# -# $opt_silent && $opt_verbose && func_fatal_help "\ -# '--silent' and '--verbose' options are mutually exclusive." -# -# func_quote_for_eval ${1+"$@"} -# my_option_validation_result=$func_quote_for_eval_result -# } -# func_add_hook func_validate_options my_option_validation -# -# You'll alse need to manually amend $usage_message to reflect the extra -# options you parse. It's preferable to append if you can, so that -# multiple option parsing hooks can be added safely. - - -# func_options [ARG]... -# --------------------- -# All the functions called inside func_options are hookable. See the -# individual implementations for details. -func_hookable func_options -func_options () -{ - $debug_cmd - - func_options_prep ${1+"$@"} - eval func_parse_options \ - ${func_options_prep_result+"$func_options_prep_result"} - eval func_validate_options \ - ${func_parse_options_result+"$func_parse_options_result"} - - eval func_run_hooks func_options \ - ${func_validate_options_result+"$func_validate_options_result"} - - # save modified positional parameters for caller - func_options_result=$func_run_hooks_result -} - - -# func_options_prep [ARG]... -# -------------------------- -# All initialisations required before starting the option parse loop. -# Note that when calling hook functions, we pass through the list of -# positional parameters. If a hook function modifies that list, and -# needs to propogate that back to rest of this script, then the complete -# modified list must be put in 'func_run_hooks_result' before -# returning. -func_hookable func_options_prep -func_options_prep () -{ - $debug_cmd - - # Option defaults: - opt_verbose=false - opt_warning_types= - - func_run_hooks func_options_prep ${1+"$@"} - - # save modified positional parameters for caller - func_options_prep_result=$func_run_hooks_result + *) + func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" + esac } -# func_parse_options [ARG]... -# --------------------------- -# The main option parsing loop. -func_hookable func_parse_options -func_parse_options () +# func_quote_for_expand arg +# Aesthetically quote ARG to be evaled later; same as above, +# but do not quote variable references. +func_quote_for_expand () { - $debug_cmd - - func_parse_options_result= + case $1 in + *[\\\`\"]*) + my_arg=`$ECHO "$1" | $SED \ + -e "$double_quote_subst" -e "$sed_double_backslash"` ;; + *) + my_arg="$1" ;; + esac - # this just eases exit handling - while test $# -gt 0; do - # Defer to hook functions for initial option parsing, so they - # get priority in the event of reusing an option name. - func_run_hooks func_parse_options ${1+"$@"} + 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 - # Adjust func_parse_options positional parameters to match - eval set dummy "$func_run_hooks_result"; shift + func_quote_for_expand_result="$my_arg" +} - # Break out of the loop if we already parsed every option. - test $# -gt 0 || break - _G_opt=$1 - shift - case $_G_opt in - --debug|-x) debug_cmd='set -x' - func_echo "enabling shell trace mode" - $debug_cmd - ;; - - --no-warnings|--no-warning|--no-warn) - set dummy --warnings none ${1+"$@"} - shift - ;; +# func_show_eval cmd [fail_exp] +# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is +# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP +# is given, then evaluate it. +func_show_eval () +{ + my_cmd="$1" + my_fail_exp="${2-:}" - --warnings|--warning|-W) - test $# = 0 && func_missing_arg $_G_opt && break - case " $warning_categories $1" in - *" $1 "*) - # trailing space prevents matching last $1 above - func_append_uniq opt_warning_types " $1" - ;; - *all) - opt_warning_types=$warning_categories - ;; - *none) - opt_warning_types=none - warning_func=: - ;; - *error) - opt_warning_types=$warning_categories - warning_func=func_fatal_error - ;; - *) - func_fatal_error \ - "unsupported warning category: '$1'" - ;; - esac - shift - ;; - - --verbose|-v) opt_verbose=: ;; - --version) func_version ;; - -\?|-h) func_usage ;; - --help) func_help ;; - - # Separate optargs to long options (plugins may need this): - --*=*) func_split_equals "$_G_opt" - set dummy "$func_split_equals_lhs" \ - "$func_split_equals_rhs" ${1+"$@"} - shift - ;; - - # Separate optargs to short options: - -W*) - func_split_short_opt "$_G_opt" - set dummy "$func_split_short_opt_name" \ - "$func_split_short_opt_arg" ${1+"$@"} - shift - ;; - - # Separate non-argument short options: - -\?*|-h*|-v*|-x*) - func_split_short_opt "$_G_opt" - set dummy "$func_split_short_opt_name" \ - "-$func_split_short_opt_arg" ${1+"$@"} - shift - ;; - - --) break ;; - -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; - *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; - esac - done + ${opt_silent-false} || { + func_quote_for_expand "$my_cmd" + eval "func_echo $func_quote_for_expand_result" + } - # save modified positional parameters for caller - func_quote_for_eval ${1+"$@"} - func_parse_options_result=$func_quote_for_eval_result + if ${opt_dry_run-false}; then :; else + eval "$my_cmd" + my_status=$? + if test "$my_status" -eq 0; then :; else + eval "(exit $my_status); $my_fail_exp" + fi + fi } -# func_validate_options [ARG]... -# ------------------------------ -# Perform any sanity checks on option settings and/or unconsumed -# arguments. -func_hookable func_validate_options -func_validate_options () +# 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 () { - $debug_cmd + my_cmd="$1" + my_fail_exp="${2-:}" - # Display all warnings if -W was not given. - test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" - - func_run_hooks func_validate_options ${1+"$@"} - - # Bail if the options were screwed! - $exit_cmd $EXIT_FAILURE + ${opt_silent-false} || { + func_quote_for_expand "$my_cmd" + eval "func_echo $func_quote_for_expand_result" + } - # save modified positional parameters for caller - func_validate_options_result=$func_run_hooks_result + if ${opt_dry_run-false}; then :; else + eval "$lt_user_locale + $my_cmd" + my_status=$? + eval "$lt_safe_locale" + if test "$my_status" -eq 0; then :; else + eval "(exit $my_status); $my_fail_exp" + fi + fi } +# func_tr_sh +# Turn $1 into a string suitable for a shell variable name. +# Result is stored in $func_tr_sh_result. All characters +# not in the set a-zA-Z0-9_ are replaced with '_'. Further, +# if $1 begins with a digit, a '_' is prepended as well. +func_tr_sh () +{ + case $1 in + [0-9]* | *[!a-zA-Z0-9_]*) + func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` + ;; + * ) + func_tr_sh_result=$1 + ;; + esac +} -## ----------------- ## -## Helper functions. ## -## ----------------- ## - -# This section contains the helper functions used by the rest of the -# hookable option parser framework in ascii-betical order. +# func_version +# Echo version message to standard output and exit. +func_version () +{ + $opt_debug + $SED -n '/(C)/!b go + :more + /\./!{ + N + s/\n# / / + b more + } + :go + /^# '$PROGRAM' (GNU /,/# warranty; / { + s/^# // + s/^# *$// + s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ + p + }' < "$progpath" + exit $? +} -# func_fatal_help ARG... -# ---------------------- -# Echo program name prefixed message to standard error, followed by -# a help hint, and exit. -func_fatal_help () +# func_usage +# Echo short help message to standard output and exit. +func_usage () { - $debug_cmd + $opt_debug - eval \$ECHO \""Usage: $usage"\" - eval \$ECHO \""$fatal_help"\" - func_error ${1+"$@"} - exit $EXIT_FAILURE + $SED -n '/^# Usage:/,/^# *.*--help/ { + 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 [NOEXIT] +# Echo long help message to standard output and exit, +# unless 'noexit' is passed as argument. func_help () { - $debug_cmd + $opt_debug - func_usage_message - $ECHO "$long_help_message" - exit 0 + $SED -n '/^# Usage:/,/# Report bugs to/ { + :print + s/^# // + s/^# *$// + s*\$progname*'$progname'* + s*\$host*'"$host"'* + s*\$SHELL*'"$SHELL"'* + s*\$LTCC*'"$LTCC"'* + s*\$LTCFLAGS*'"$LTCFLAGS"'* + s*\$LD*'"$LD"'* + s/\$with_gnu_ld/'"$with_gnu_ld"'/ + s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/ + s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/ + p + d + } + /^# .* home page:/b print + /^# General help using/b print + ' < "$progpath" + ret=$? + if test -z "$1"; then + exit $ret + fi } - -# func_missing_arg ARGNAME -# ------------------------ +# func_missing_arg argname # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { - $debug_cmd + $opt_debug - func_error "Missing argument for '$1'." + func_error "missing argument for $1." exit_cmd=exit } -# func_split_equals STRING -# ------------------------ -# Set func_split_equals_lhs and func_split_equals_rhs shell variables after -# splitting STRING at the '=' sign. -test -z "$_G_HAVE_XSI_OPS" \ - && (eval 'x=a/b/c; - test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ - && _G_HAVE_XSI_OPS=yes - -if test yes = "$_G_HAVE_XSI_OPS" -then - # This is an XSI compatible shell, allowing a faster implementation... - eval 'func_split_equals () - { - $debug_cmd - - func_split_equals_lhs=${1%%=*} - func_split_equals_rhs=${1#*=} - test "x$func_split_equals_lhs" = "x$1" \ - && func_split_equals_rhs= - }' -else - # ...otherwise fall back to using expr, which is often a shell builtin. - func_split_equals () - { - $debug_cmd - - func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'` - func_split_equals_rhs= - test "x$func_split_equals_lhs" = "x$1" \ - || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'` - } -fi #func_split_equals - - -# func_split_short_opt SHORTOPT -# ----------------------------- +# func_split_short_opt shortopt # Set func_split_short_opt_name and func_split_short_opt_arg shell # variables after splitting SHORTOPT after the 2nd character. -if test yes = "$_G_HAVE_XSI_OPS" -then - # This is an XSI compatible shell, allowing a faster implementation... - eval 'func_split_short_opt () - { - $debug_cmd - - func_split_short_opt_arg=${1#??} - func_split_short_opt_name=${1%"$func_split_short_opt_arg"} - }' -else - # ...otherwise fall back to using expr, which is often a shell builtin. - func_split_short_opt () - { - $debug_cmd - - func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'` - func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'` - } -fi #func_split_short_opt - - -# func_usage -# ---------- -# Echo short help message to standard output and exit. -func_usage () +func_split_short_opt () { - $debug_cmd + my_sed_short_opt='1s/^\(..\).*$/\1/;q' + my_sed_short_rest='1s/^..\(.*\)$/\1/;q' - func_usage_message - $ECHO "Run '$progname --help |${PAGER-more}' for full usage" - exit 0 -} + func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"` + func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"` +} # func_split_short_opt may be replaced by extended shell implementation -# func_usage_message -# ------------------ -# Echo short help message to standard output. -func_usage_message () +# func_split_long_opt longopt +# Set func_split_long_opt_name and func_split_long_opt_arg shell +# variables after splitting LONGOPT at the `=' sign. +func_split_long_opt () { - $debug_cmd + my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q' + my_sed_long_arg='1s/^--[^=]*=//' - eval \$ECHO \""Usage: $usage"\" - echo - $SED -n 's|^# || - /^Written by/{ - x;p;x - } - h - /^Written by/q' < "$progpath" - echo - eval \$ECHO \""$usage_message"\" -} + func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"` + func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"` +} # func_split_long_opt may be replaced by extended shell implementation +exit_cmd=: -# func_version -# ------------ -# Echo version message to standard output and exit. -func_version () -{ - $debug_cmd - printf '%s\n' "$progname $scriptversion" - $SED -n ' - /(C)/!b go - :more - /\./!{ - N - s|\n# | | - b more - } - :go - /^# Written by /,/# warranty; / { - s|^# || - s|^# *$|| - s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2| - p - } - /^# Written by / { - s|^# || - p - } - /^warranty; /q' < "$progpath" - exit $? -} -# Local variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'before-save-hook 'time-stamp) -# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" -# time-stamp-time-zone: "UTC" -# End: +magic="%%%MAGIC variable%%%" +magic_exe="%%%MAGIC EXE variable%%%" -# Set a version string. -scriptversion='(GNU libtool) 2.4.6' +# Global variables. +nonopt= +preserve_args= +lo2o="s/\\.lo\$/.${objext}/" +o2lo="s/\\.${objext}\$/.lo/" +extracted_archives= +extracted_serial=0 +# If this variable is set in any of the actions, the command in it +# will be execed at the end. This prevents here-documents from being +# left over by shells. +exec_cmd= -# func_echo ARG... -# ---------------- -# Libtool also displays the current mode in messages, so override -# funclib.sh func_echo with this custom definition. -func_echo () +# func_append var value +# Append VALUE to the end of shell variable VAR. +func_append () { - $debug_cmd - - _G_message=$* - - func_echo_IFS=$IFS - IFS=$nl - for _G_line in $_G_message; do - IFS=$func_echo_IFS - $ECHO "$progname${opt_mode+: $opt_mode}: $_G_line" - done - IFS=$func_echo_IFS -} + eval "${1}=\$${1}\${2}" +} # func_append may be replaced by extended shell implementation - -# func_warning ARG... -# ------------------- -# Libtool warnings are not categorized, so override funclib.sh -# func_warning with this simpler definition. -func_warning () +# func_append_quoted var value +# Quote VALUE and append to the end of shell variable VAR, separated +# by a space. +func_append_quoted () { - $debug_cmd - - $warning_func ${1+"$@"} -} + func_quote_for_eval "${2}" + eval "${1}=\$${1}\\ \$func_quote_for_eval_result" +} # func_append_quoted may be replaced by extended shell implementation -## ---------------- ## -## Options parsing. ## -## ---------------- ## - -# Hook in the functions to make sure our own options are parsed during -# the option parsing loop. - -usage='$progpath [OPTION]... [MODE-ARG]...' - -# Short help message in response to '-h'. -usage_message="Options: - --config show all configuration variables - --debug enable verbose shell tracing - -n, --dry-run display commands without modifying any files - --features display basic configuration information and exit - --mode=MODE use operation mode MODE - --no-warnings equivalent to '-Wnone' - --preserve-dup-deps don't remove duplicate dependency libraries - --quiet, --silent don't print informational messages - --tag=TAG use configuration variables from tag TAG - -v, --verbose print more informational messages than default - --version print version information - -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] - -h, --help, --help-all print short, long, or detailed help message -" - -# Additional text appended to 'usage_message' in response to '--help'. -func_help () +# func_arith arithmetic-term... +func_arith () { - $debug_cmd - - func_usage_message - $ECHO "$long_help_message + func_arith_result=`expr "${@}"` +} # func_arith may be replaced by extended shell implementation -MODE must be one of the following: - clean remove files from the build directory - compile compile a source file into a libtool object - execute automatically set library path, then run a program - finish complete the installation of libtool libraries - install install libraries or executables - link create a library or an executable - uninstall remove libraries from an installed directory - -MODE-ARGS vary depending on the MODE. When passed as first option, -'--mode=MODE' may be abbreviated as 'MODE' or a unique abbreviation of that. -Try '$progname --help --mode=MODE' for a more detailed description of MODE. - -When reporting a bug, please describe a test case to reproduce it and -include the following information: - - host-triplet: $host - shell: $SHELL - compiler: $LTCC - compiler flags: $LTCFLAGS - linker: $LD (gnu? $with_gnu_ld) - version: $progname (GNU libtool) 2.4.6 - automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` - autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` - -Report bugs to . -GNU libtool home page: . -General help using GNU software: ." - exit 0 -} - - -# func_lo2o OBJECT-NAME -# --------------------- -# Transform OBJECT-NAME from a '.lo' suffix to the platform specific -# object suffix. +# func_len string +# STRING may not start with a hyphen. +func_len () +{ + func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len` +} # func_len may be replaced by extended shell implementation -lo2o=s/\\.lo\$/.$objext/ -o2lo=s/\\.$objext\$/.lo/ -if test yes = "$_G_HAVE_XSI_OPS"; then - eval 'func_lo2o () - { - case $1 in - *.lo) func_lo2o_result=${1%.lo}.$objext ;; - * ) func_lo2o_result=$1 ;; - esac - }' +# func_lo2o object +func_lo2o () +{ + func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` +} # func_lo2o may be replaced by extended shell implementation - # func_xform LIBOBJ-OR-SOURCE - # --------------------------- - # Transform LIBOBJ-OR-SOURCE from a '.o' or '.c' (or otherwise) - # suffix to a '.lo' libtool-object suffix. - eval 'func_xform () - { - func_xform_result=${1%.*}.lo - }' -else - # ...otherwise fall back to using sed. - func_lo2o () - { - func_lo2o_result=`$ECHO "$1" | $SED "$lo2o"` - } - func_xform () - { - func_xform_result=`$ECHO "$1" | $SED 's|\.[^.]*$|.lo|'` - } -fi +# func_xform libobj-or-source +func_xform () +{ + func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` +} # func_xform may be replaced by extended shell implementation -# func_fatal_configuration ARG... -# ------------------------------- +# func_fatal_configuration arg... # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. func_fatal_configuration () { - func__fatal_error ${1+"$@"} \ - "See the $PACKAGE documentation for more information." \ - "Fatal configuration error." + func_error ${1+"$@"} + func_error "See the $PACKAGE documentation for more information." + func_fatal_error "Fatal configuration error." } # func_config -# ----------- # Display the configuration for all the tags in this script. func_config () { @@ -2149,19 +915,17 @@ exit $? } - # func_features -# ------------- # Display the features supported by this script. func_features () { echo "host: $host" - if test yes = "$build_libtool_libs"; then + if test "$build_libtool_libs" = yes; then echo "enable shared libraries" else echo "disable shared libraries" fi - if test yes = "$build_old_libs"; then + if test "$build_old_libs" = yes; then echo "enable static libraries" else echo "disable static libraries" @@ -2170,297 +934,289 @@ exit $? } - -# func_enable_tag TAGNAME -# ----------------------- +# 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 + # 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 + 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) ;; + # 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" + if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then + taglist="$taglist $tagname" - # Evaluate the configuration. Be careful to quote the path - # and the sed script, to avoid splitting on whitespace, but - # also don't use non-portable quotes within backquotes within - # quotes we have to do it in 2 steps: - extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` - eval "$extractedcf" - else - func_error "ignoring unknown tag $tagname" - fi - ;; - esac + # Evaluate the configuration. Be careful to quote the path + # and the sed script, to avoid splitting on whitespace, but + # also don't use non-portable quotes within backquotes within + # quotes we have to do it in 2 steps: + extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` + eval "$extractedcf" + else + func_error "ignoring unknown tag $tagname" + fi + ;; + esac } - # func_check_version_match -# ------------------------ # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { - if test "$package_revision" != "$macro_revision"; then - if test "$VERSION" != "$macro_version"; then - if test -z "$macro_version"; then - cat >&2 <<_LT_EOF + 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 + else + cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF - fi - else - cat >&2 <<_LT_EOF + 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 -} + exit $EXIT_MISMATCH + fi +} -# libtool_options_prep [ARG]... -# ----------------------------- -# Preparation for options parsed by libtool. -libtool_options_prep () -{ - $debug_mode - # Option defaults: - opt_config=false - opt_dlopen= - opt_dry_run=false - opt_help=false - opt_mode= - opt_preserve_dup_deps=false - opt_quiet=false +# Shorthand for --mode=foo, only valid as the first argument +case $1 in +clean|clea|cle|cl) + shift; set dummy --mode clean ${1+"$@"}; shift + ;; +compile|compil|compi|comp|com|co|c) + shift; set dummy --mode compile ${1+"$@"}; shift + ;; +execute|execut|execu|exec|exe|ex|e) + shift; set dummy --mode execute ${1+"$@"}; shift + ;; +finish|finis|fini|fin|fi|f) + shift; set dummy --mode finish ${1+"$@"}; shift + ;; +install|instal|insta|inst|ins|in|i) + shift; set dummy --mode install ${1+"$@"}; shift + ;; +link|lin|li|l) + shift; set dummy --mode link ${1+"$@"}; shift + ;; +uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) + shift; set dummy --mode uninstall ${1+"$@"}; shift + ;; +esac - nonopt= - preserve_args= - # Shorthand for --mode=foo, only valid as the first argument - case $1 in - clean|clea|cle|cl) - shift; set dummy --mode clean ${1+"$@"}; shift - ;; - compile|compil|compi|comp|com|co|c) - shift; set dummy --mode compile ${1+"$@"}; shift - ;; - execute|execut|execu|exec|exe|ex|e) - shift; set dummy --mode execute ${1+"$@"}; shift - ;; - finish|finis|fini|fin|fi|f) - shift; set dummy --mode finish ${1+"$@"}; shift - ;; - install|instal|insta|inst|ins|in|i) - shift; set dummy --mode install ${1+"$@"}; shift - ;; - link|lin|li|l) - shift; set dummy --mode link ${1+"$@"}; shift - ;; - uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) - shift; set dummy --mode uninstall ${1+"$@"}; shift - ;; - esac - # Pass back the list of options. - func_quote_for_eval ${1+"$@"} - libtool_options_prep_result=$func_quote_for_eval_result -} -func_add_hook func_options_prep libtool_options_prep +# Option defaults: +opt_debug=: +opt_dry_run=false +opt_config=false +opt_preserve_dup_deps=false +opt_features=false +opt_finish=false +opt_help=false +opt_help_all=false +opt_silent=: +opt_warning=: +opt_verbose=: +opt_silent=false +opt_verbose=false -# libtool_parse_options [ARG]... -# --------------------------------- -# Provide handling for libtool specific options. -libtool_parse_options () +# Parse options once, thoroughly. This comes as soon as possible in the +# script to make things like `--version' happen as quickly as we can. { - $debug_cmd - - # Perform our own loop to consume as many options as possible in - # each iteration. - while test $# -gt 0; do - _G_opt=$1 - shift - case $_G_opt in - --dry-run|--dryrun|-n) - opt_dry_run=: - ;; - - --config) func_config ;; - - --dlopen|-dlopen) - opt_dlopen="${opt_dlopen+$opt_dlopen -}$1" - shift - ;; - - --preserve-dup-deps) - opt_preserve_dup_deps=: ;; - - --features) func_features ;; - - --finish) set dummy --mode finish ${1+"$@"}; shift ;; - - --help) opt_help=: ;; - - --help-all) opt_help=': help-all' ;; - - --mode) test $# = 0 && func_missing_arg $_G_opt && break - opt_mode=$1 - 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 $_G_opt" - exit_cmd=exit - break - ;; - esac - shift - ;; - - --no-silent|--no-quiet) - opt_quiet=false - func_append preserve_args " $_G_opt" - ;; - - --no-warnings|--no-warning|--no-warn) - opt_warning=false - func_append preserve_args " $_G_opt" - ;; - - --no-verbose) - opt_verbose=false - func_append preserve_args " $_G_opt" - ;; - - --silent|--quiet) - opt_quiet=: - opt_verbose=false - func_append preserve_args " $_G_opt" - ;; - - --tag) test $# = 0 && func_missing_arg $_G_opt && break - opt_tag=$1 - func_append preserve_args " $_G_opt $1" - func_enable_tag "$1" - shift - ;; - - --verbose|-v) opt_quiet=false - opt_verbose=: - func_append preserve_args " $_G_opt" - ;; + # this just eases exit handling + while test $# -gt 0; do + opt="$1" + shift + case $opt in + --debug|-x) opt_debug='set -x' + func_echo "enabling shell trace mode" + $opt_debug + ;; + --dry-run|--dryrun|-n) + opt_dry_run=: + ;; + --config) + opt_config=: +func_config + ;; + --dlopen|-dlopen) + optarg="$1" + opt_dlopen="${opt_dlopen+$opt_dlopen +}$optarg" + shift + ;; + --preserve-dup-deps) + opt_preserve_dup_deps=: + ;; + --features) + opt_features=: +func_features + ;; + --finish) + opt_finish=: +set dummy --mode finish ${1+"$@"}; shift + ;; + --help) + opt_help=: + ;; + --help-all) + opt_help_all=: +opt_help=': help-all' + ;; + --mode) + test $# = 0 && func_missing_arg $opt && break + optarg="$1" + opt_mode="$optarg" +case $optarg in + # Valid mode arguments: + clean|compile|execute|finish|install|link|relink|uninstall) ;; + + # Catch anything else as an error + *) func_error "invalid argument for $opt" + exit_cmd=exit + break + ;; +esac + shift + ;; + --no-silent|--no-quiet) + opt_silent=false +func_append preserve_args " $opt" + ;; + --no-warning|--no-warn) + opt_warning=false +func_append preserve_args " $opt" + ;; + --no-verbose) + opt_verbose=false +func_append preserve_args " $opt" + ;; + --silent|--quiet) + opt_silent=: +func_append preserve_args " $opt" + opt_verbose=false + ;; + --verbose|-v) + opt_verbose=: +func_append preserve_args " $opt" +opt_silent=false + ;; + --tag) + test $# = 0 && func_missing_arg $opt && break + optarg="$1" + opt_tag="$optarg" +func_append preserve_args " $opt $optarg" +func_enable_tag "$optarg" + shift + ;; + + -\?|-h) func_usage ;; + --help) func_help ;; + --version) func_version ;; + + # Separate optargs to long options: + --*=*) + func_split_long_opt "$opt" + set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"} + shift + ;; + + # Separate non-argument short options: + -\?*|-h*|-n*|-v*) + func_split_short_opt "$opt" + set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"} + shift + ;; + + --) break ;; + -*) func_fatal_help "unrecognized option \`$opt'" ;; + *) set dummy "$opt" ${1+"$@"}; shift; break ;; + esac + done - # An option not handled by this hook function: - *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; - esac - done + # Validate options: + # save first non-option argument + if test "$#" -gt 0; then + nonopt="$opt" + shift + fi - # save modified positional parameters for caller - func_quote_for_eval ${1+"$@"} - libtool_parse_options_result=$func_quote_for_eval_result -} -func_add_hook func_parse_options libtool_parse_options + # preserve --debug + test "$opt_debug" = : || func_append preserve_args " --debug" + case $host in + *cygwin* | *mingw* | *pw32* | *cegcc*) + # don't eliminate duplications in $postdeps and $predeps + opt_duplicate_compiler_generated_deps=: + ;; + *) + opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps + ;; + esac + $opt_help || { + # Sanity checks first: + func_check_version_match -# libtool_validate_options [ARG]... -# --------------------------------- -# Perform any sanity checks on option settings and/or unconsumed -# arguments. -libtool_validate_options () -{ - # save first non-option argument - if test 0 -lt $#; then - nonopt=$1 - shift + if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then + func_fatal_configuration "not configured to build any kind of library" fi - # preserve --debug - test : = "$debug_cmd" || func_append preserve_args " --debug" + # Darwin sucks + eval std_shrext=\"$shrext_cmds\" - case $host in - # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452 - # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788 - *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*) - # don't eliminate duplications in $postdeps and $predeps - opt_duplicate_compiler_generated_deps=: - ;; - *) - opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps - ;; - esac + # Only execute mode is allowed to have -dlopen flags. + if test -n "$opt_dlopen" && test "$opt_mode" != execute; then + func_error "unrecognized option \`-dlopen'" + $ECHO "$help" 1>&2 + exit $EXIT_FAILURE + fi - $opt_help || { - # Sanity checks first: - func_check_version_match - - test yes != "$build_libtool_libs" \ - && test yes != "$build_old_libs" \ - && func_fatal_configuration "not configured to build any kind of library" - - # Darwin sucks - eval std_shrext=\"$shrext_cmds\" - - # Only execute mode is allowed to have -dlopen flags. - if test -n "$opt_dlopen" && test execute != "$opt_mode"; then - func_error "unrecognized option '-dlopen'" - $ECHO "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Change the help message to a mode-specific one. - generic_help=$help - help="Try '$progname --help --mode=$opt_mode' for more information." - } + # Change the help message to a mode-specific one. + generic_help="$help" + help="Try \`$progname --help --mode=$opt_mode' for more information." + } - # Pass back the unparsed argument list - func_quote_for_eval ${1+"$@"} - libtool_validate_options_result=$func_quote_for_eval_result -} -func_add_hook func_validate_options libtool_validate_options + # Bail if the options were screwed + $exit_cmd $EXIT_FAILURE +} -# Process options as early as possible so that --help and --version -# can return quickly. -func_options ${1+"$@"} -eval set dummy "$func_options_result"; shift @@ -2468,52 +1224,24 @@ ## Main. ## ## ----------- ## -magic='%%%MAGIC variable%%%' -magic_exe='%%%MAGIC EXE variable%%%' - -# Global variables. -extracted_archives= -extracted_serial=0 - -# If this variable is set in any of the actions, the command in it -# will be execed at the end. This prevents here-documents from being -# left over by shells. -exec_cmd= - - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -$1 -_LTECHO_EOF' -} - -# func_generated_by_libtool -# True iff stdin has been generated by Libtool. This function is only -# a basic sanity check; it will hardly flush out determined imposters. -func_generated_by_libtool_p () -{ - $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 -} - # func_lalib_p file -# True iff FILE is a libtool '.la' library or '.lo' object 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 | func_generated_by_libtool_p + $SED -e 4q "$1" 2>/dev/null \ + | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # func_lalib_unsafe_p file -# True iff FILE is a libtool '.la' library or '.lo' object file. +# 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. +# fatal anyway. Works if `file' does not exist. func_lalib_unsafe_p () { lalib_p=no @@ -2521,13 +1249,13 @@ for lalib_p_l in 1 2 3 4 do read lalib_p_line - case $lalib_p_line in + case "$lalib_p_line" in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi - test yes = "$lalib_p" + test "$lalib_p" = yes } # func_ltwrapper_script_p file @@ -2536,8 +1264,7 @@ # determined imposters. func_ltwrapper_script_p () { - test -f "$1" && - $lt_truncate_bin < "$1" 2>/dev/null | func_generated_by_libtool_p + func_lalib_p "$1" } # func_ltwrapper_executable_p file @@ -2562,7 +1289,7 @@ { func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" - func_ltwrapper_scriptname_result=$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper + func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" } # func_ltwrapper_p file @@ -2581,13 +1308,11 @@ # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { - $debug_cmd - + $opt_debug save_ifs=$IFS; IFS='~' for cmd in $1; do - IFS=$sp$nl - eval cmd=\"$cmd\" IFS=$save_ifs + eval cmd=\"$cmd\" func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs @@ -2599,11 +1324,10 @@ # 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. +# `FILE.' does not work on cygwin managed mounts. func_source () { - $debug_cmd - + $opt_debug case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; @@ -2630,10 +1354,10 @@ # store the result into func_replace_sysroot_result. func_replace_sysroot () { - case $lt_sysroot:$1 in + case "$lt_sysroot:$1" in ?*:"$lt_sysroot"*) func_stripname "$lt_sysroot" '' "$1" - func_replace_sysroot_result='='$func_stripname_result + func_replace_sysroot_result="=$func_stripname_result" ;; *) # Including no sysroot. @@ -2650,8 +1374,7 @@ # arg is usually of the form 'gcc ...' func_infer_tag () { - $debug_cmd - + $opt_debug if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do @@ -2670,7 +1393,7 @@ 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`" + 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. @@ -2695,7 +1418,7 @@ # 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'" + func_fatal_error "specify a tag with \`--tag'" # else # func_verbose "using $tagname tagged configuration" fi @@ -2711,15 +1434,15 @@ # but don't create it if we're doing a dry run. func_write_libtool_object () { - write_libobj=$1 - if test yes = "$build_libtool_libs"; then - write_lobj=\'$2\' + write_libobj=${1} + if test "$build_libtool_libs" = yes; then + write_lobj=\'${2}\' else write_lobj=none fi - if test yes = "$build_old_libs"; then - write_oldobj=\'$3\' + if test "$build_old_libs" = yes; then + write_oldobj=\'${3}\' else write_oldobj=none fi @@ -2727,7 +1450,7 @@ $opt_dry_run || { cat >${write_libobj}T </dev/null` - if test "$?" -eq 0 && test -n "$func_convert_core_file_wine_to_w32_tmp"; then + if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | - $SED -e "$sed_naive_backslashify"` + $SED -e "$lt_sed_naive_backslashify"` else func_convert_core_file_wine_to_w32_result= fi @@ -2792,19 +1514,18 @@ # are convertible, then the result may be empty. func_convert_core_path_wine_to_w32 () { - $debug_cmd - + $opt_debug # unfortunately, winepath doesn't convert paths, only file names - func_convert_core_path_wine_to_w32_result= + func_convert_core_path_wine_to_w32_result="" if test -n "$1"; then oldIFS=$IFS IFS=: for func_convert_core_path_wine_to_w32_f in $1; do IFS=$oldIFS func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" - if test -n "$func_convert_core_file_wine_to_w32_result"; then + if test -n "$func_convert_core_file_wine_to_w32_result" ; then if test -z "$func_convert_core_path_wine_to_w32_result"; then - func_convert_core_path_wine_to_w32_result=$func_convert_core_file_wine_to_w32_result + func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result" else func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" fi @@ -2833,8 +1554,7 @@ # environment variable; do not put it in $PATH. func_cygpath () { - $debug_cmd - + $opt_debug if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` if test "$?" -ne 0; then @@ -2843,7 +1563,7 @@ fi else func_cygpath_result= - func_error "LT_CYGPATH is empty or specifies non-existent file: '$LT_CYGPATH'" + func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'" fi } #end: func_cygpath @@ -2854,11 +1574,10 @@ # result in func_convert_core_msys_to_w32_result. func_convert_core_msys_to_w32 () { - $debug_cmd - + $opt_debug # awkward: cmd appends spaces to result func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | - $SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"` + $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` } #end: func_convert_core_msys_to_w32 @@ -2869,14 +1588,13 @@ # func_to_host_file_result to ARG1). func_convert_file_check () { - $debug_cmd - - if test -z "$2" && test -n "$1"; then + $opt_debug + if test -z "$2" && test -n "$1" ; then func_error "Could not determine host file name corresponding to" - func_error " '$1'" + func_error " \`$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: - func_to_host_file_result=$1 + func_to_host_file_result="$1" fi } # end func_convert_file_check @@ -2888,11 +1606,10 @@ # func_to_host_file_result to a simplistic fallback value (see below). func_convert_path_check () { - $debug_cmd - + $opt_debug if test -z "$4" && test -n "$3"; then func_error "Could not determine the host path corresponding to" - func_error " '$3'" + func_error " \`$3'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This is a deliberately simplistic "conversion" and # should not be "improved". See libtool.info. @@ -2901,7 +1618,7 @@ func_to_host_path_result=`echo "$3" | $SED -e "$lt_replace_pathsep_chars"` else - func_to_host_path_result=$3 + func_to_host_path_result="$3" fi fi } @@ -2913,10 +1630,9 @@ # and appending REPL if ORIG matches BACKPAT. func_convert_path_front_back_pathsep () { - $debug_cmd - + $opt_debug case $4 in - $1 ) func_to_host_path_result=$3$func_to_host_path_result + $1 ) func_to_host_path_result="$3$func_to_host_path_result" ;; esac case $4 in @@ -2930,7 +1646,7 @@ ################################################## # $build to $host FILE NAME CONVERSION FUNCTIONS # ################################################## -# invoked via '$to_host_file_cmd ARG' +# invoked via `$to_host_file_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # Result will be available in $func_to_host_file_result. @@ -2941,8 +1657,7 @@ # in func_to_host_file_result. func_to_host_file () { - $debug_cmd - + $opt_debug $to_host_file_cmd "$1" } # end func_to_host_file @@ -2954,8 +1669,7 @@ # in (the comma separated) LAZY, no conversion takes place. func_to_tool_file () { - $debug_cmd - + $opt_debug case ,$2, in *,"$to_tool_file_cmd",*) func_to_tool_file_result=$1 @@ -2973,7 +1687,7 @@ # Copy ARG to func_to_host_file_result. func_convert_file_noop () { - func_to_host_file_result=$1 + func_to_host_file_result="$1" } # end func_convert_file_noop @@ -2984,12 +1698,11 @@ # func_to_host_file_result. func_convert_file_msys_to_w32 () { - $debug_cmd - - func_to_host_file_result=$1 + $opt_debug + func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_msys_to_w32 "$1" - func_to_host_file_result=$func_convert_core_msys_to_w32_result + func_to_host_file_result="$func_convert_core_msys_to_w32_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } @@ -3001,9 +1714,8 @@ # func_to_host_file_result. func_convert_file_cygwin_to_w32 () { - $debug_cmd - - func_to_host_file_result=$1 + $opt_debug + func_to_host_file_result="$1" if test -n "$1"; then # because $build is cygwin, we call "the" cygpath in $PATH; no need to use # LT_CYGPATH in this case. @@ -3019,12 +1731,11 @@ # and a working winepath. Returns result in func_to_host_file_result. func_convert_file_nix_to_w32 () { - $debug_cmd - - func_to_host_file_result=$1 + $opt_debug + func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_file_wine_to_w32 "$1" - func_to_host_file_result=$func_convert_core_file_wine_to_w32_result + func_to_host_file_result="$func_convert_core_file_wine_to_w32_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } @@ -3036,13 +1747,12 @@ # Returns result in func_to_host_file_result. func_convert_file_msys_to_cygwin () { - $debug_cmd - - func_to_host_file_result=$1 + $opt_debug + func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_cygpath -u "$func_convert_core_msys_to_w32_result" - func_to_host_file_result=$func_cygpath_result + func_to_host_file_result="$func_cygpath_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } @@ -3055,14 +1765,13 @@ # in func_to_host_file_result. func_convert_file_nix_to_cygwin () { - $debug_cmd - - func_to_host_file_result=$1 + $opt_debug + func_to_host_file_result="$1" if test -n "$1"; then # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. func_convert_core_file_wine_to_w32 "$1" func_cygpath -u "$func_convert_core_file_wine_to_w32_result" - func_to_host_file_result=$func_cygpath_result + func_to_host_file_result="$func_cygpath_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } @@ -3072,7 +1781,7 @@ ############################################# # $build to $host PATH CONVERSION FUNCTIONS # ############################################# -# invoked via '$to_host_path_cmd ARG' +# invoked via `$to_host_path_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # The result will be available in $func_to_host_path_result. @@ -3096,11 +1805,10 @@ to_host_path_cmd= func_init_to_host_path_cmd () { - $debug_cmd - + $opt_debug if test -z "$to_host_path_cmd"; then func_stripname 'func_convert_file_' '' "$to_host_file_cmd" - to_host_path_cmd=func_convert_path_$func_stripname_result + to_host_path_cmd="func_convert_path_${func_stripname_result}" fi } @@ -3110,8 +1818,7 @@ # in func_to_host_path_result. func_to_host_path () { - $debug_cmd - + $opt_debug func_init_to_host_path_cmd $to_host_path_cmd "$1" } @@ -3122,7 +1829,7 @@ # Copy ARG to func_to_host_path_result. func_convert_path_noop () { - func_to_host_path_result=$1 + func_to_host_path_result="$1" } # end func_convert_path_noop @@ -3133,9 +1840,8 @@ # func_to_host_path_result. func_convert_path_msys_to_w32 () { - $debug_cmd - - func_to_host_path_result=$1 + $opt_debug + func_to_host_path_result="$1" if test -n "$1"; then # Remove leading and trailing path separator characters from ARG. MSYS # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; @@ -3143,7 +1849,7 @@ func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" - func_to_host_path_result=$func_convert_core_msys_to_w32_result + func_to_host_path_result="$func_convert_core_msys_to_w32_result" func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" @@ -3157,9 +1863,8 @@ # func_to_host_file_result. func_convert_path_cygwin_to_w32 () { - $debug_cmd - - func_to_host_path_result=$1 + $opt_debug + func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" @@ -3178,15 +1883,14 @@ # a working winepath. Returns result in func_to_host_file_result. func_convert_path_nix_to_w32 () { - $debug_cmd - - func_to_host_path_result=$1 + $opt_debug + func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" - func_to_host_path_result=$func_convert_core_path_wine_to_w32_result + func_to_host_path_result="$func_convert_core_path_wine_to_w32_result" func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" @@ -3200,16 +1904,15 @@ # Returns result in func_to_host_file_result. func_convert_path_msys_to_cygwin () { - $debug_cmd - - func_to_host_path_result=$1 + $opt_debug + func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_msys_to_w32_result" - func_to_host_path_result=$func_cygpath_result + func_to_host_path_result="$func_cygpath_result" func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" @@ -3224,9 +1927,8 @@ # func_to_host_file_result. func_convert_path_nix_to_cygwin () { - $debug_cmd - - func_to_host_path_result=$1 + $opt_debug + func_to_host_path_result="$1" if test -n "$1"; then # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them @@ -3235,7 +1937,7 @@ func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" - func_to_host_path_result=$func_cygpath_result + func_to_host_path_result="$func_cygpath_result" func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" @@ -3244,31 +1946,13 @@ # end func_convert_path_nix_to_cygwin -# func_dll_def_p FILE -# True iff FILE is a Windows DLL '.def' file. -# Keep in sync with _LT_DLL_DEF_P in libtool.m4 -func_dll_def_p () -{ - $debug_cmd - - func_dll_def_p_tmp=`$SED -n \ - -e 's/^[ ]*//' \ - -e '/^\(;.*\)*$/d' \ - -e 's/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p' \ - -e q \ - "$1"` - test DEF = "$func_dll_def_p_tmp" -} - - # func_mode_compile arg... func_mode_compile () { - $debug_cmd - + $opt_debug # Get the compilation command and the source file. base_compile= - srcfile=$nonopt # always keep a non-empty value in "srcfile" + srcfile="$nonopt" # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal @@ -3281,12 +1965,12 @@ case $arg_mode in arg ) # do not "continue". Instead, add this to base_compile - lastarg=$arg + lastarg="$arg" arg_mode=normal ;; target ) - libobj=$arg + libobj="$arg" arg_mode=normal continue ;; @@ -3296,7 +1980,7 @@ case $arg in -o) test -n "$libobj" && \ - func_fatal_error "you cannot specify '-o' more than once" + func_fatal_error "you cannot specify \`-o' more than once" arg_mode=target continue ;; @@ -3325,12 +2009,12 @@ func_stripname '-Wc,' '' "$arg" args=$func_stripname_result lastarg= - save_ifs=$IFS; IFS=, + save_ifs="$IFS"; IFS=',' for arg in $args; do - IFS=$save_ifs + IFS="$save_ifs" func_append_quoted lastarg "$arg" done - IFS=$save_ifs + IFS="$save_ifs" func_stripname ' ' '' "$lastarg" lastarg=$func_stripname_result @@ -3343,8 +2027,8 @@ # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # - lastarg=$srcfile - srcfile=$arg + lastarg="$srcfile" + srcfile="$arg" ;; esac # case $arg ;; @@ -3359,13 +2043,13 @@ func_fatal_error "you must specify an argument for -Xcompile" ;; target) - func_fatal_error "you must specify a target with '-o'" + func_fatal_error "you must specify a target with \`-o'" ;; *) # Get the name of the library object. test -z "$libobj" && { func_basename "$srcfile" - libobj=$func_basename_result + libobj="$func_basename_result" } ;; esac @@ -3385,7 +2069,7 @@ case $libobj in *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; *) - func_fatal_error "cannot determine name of library object from '$libobj'" + func_fatal_error "cannot determine name of library object from \`$libobj'" ;; esac @@ -3394,8 +2078,8 @@ for arg in $later; do case $arg in -shared) - test yes = "$build_libtool_libs" \ - || func_fatal_configuration "cannot build a shared library" + test "$build_libtool_libs" != yes && \ + func_fatal_configuration "can not build a shared library" build_old_libs=no continue ;; @@ -3421,17 +2105,17 @@ 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_warning "libobj name \`$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" - objname=$func_basename_result - xdir=$func_dirname_result - lobj=$xdir$objdir/$objname + objname="$func_basename_result" + xdir="$func_dirname_result" + lobj=${xdir}$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. - if test yes = "$build_old_libs"; then + if test "$build_old_libs" = yes; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" @@ -3443,16 +2127,16 @@ pic_mode=default ;; esac - if test no = "$pic_mode" && test pass_all != "$deplibs_check_method"; then + if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c - if test no = "$compiler_c_o"; then - output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.$objext - lockfile=$output_obj.lock + if test "$compiler_c_o" = no; then + output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext} + lockfile="$output_obj.lock" else output_obj= need_locks=no @@ -3461,12 +2145,12 @@ # 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 yes = "$need_locks"; then + if test "$need_locks" = yes; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done - elif test warn = "$need_locks"; then + elif test "$need_locks" = warn; then if test -f "$lockfile"; then $ECHO "\ *** ERROR, $lockfile exists and contains: @@ -3474,7 +2158,7 @@ This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because -your compiler does not support '-c' and '-o' together. If you +your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." @@ -3496,11 +2180,11 @@ qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. - if test yes = "$build_libtool_libs"; then + if test "$build_libtool_libs" = yes; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile - if test no != "$pic_mode"; then + if test "$pic_mode" != no; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code @@ -3517,7 +2201,7 @@ func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' - if test warn = "$need_locks" && + if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: @@ -3528,7 +2212,7 @@ This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because -your compiler does not support '-c' and '-o' together. If you +your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." @@ -3544,20 +2228,20 @@ fi # Allow error messages only from the first compilation. - if test yes = "$suppress_opt"; then + if test "$suppress_opt" = yes; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. - if test yes = "$build_old_libs"; then - if test yes != "$pic_mode"; then + if test "$build_old_libs" = yes; then + if test "$pic_mode" != yes; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi - if test yes = "$compiler_c_o"; then + if test "$compiler_c_o" = yes; then func_append command " -o $obj" fi @@ -3566,7 +2250,7 @@ func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' - if test warn = "$need_locks" && + if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: @@ -3577,7 +2261,7 @@ This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because -your compiler does not support '-c' and '-o' together. If you +your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." @@ -3597,7 +2281,7 @@ func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked - if test no != "$need_locks"; then + if test "$need_locks" != no; then removelist=$lockfile $RM "$lockfile" fi @@ -3607,7 +2291,7 @@ } $opt_help || { - test compile = "$opt_mode" && func_mode_compile ${1+"$@"} + test "$opt_mode" = compile && func_mode_compile ${1+"$@"} } func_mode_help () @@ -3627,7 +2311,7 @@ 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 +(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 @@ -3646,16 +2330,16 @@ -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to build PIC objects only -prefer-non-pic try to build non-PIC objects only - -shared do not build a '.o' file suitable for static linking - -static only build a '.o' file suitable for static linking + -shared do not build a \`.o' file suitable for static linking + -static only build a \`.o' file suitable for static linking -Wc,FLAG pass FLAG directly to the compiler -COMPILE-COMMAND is a command to be used in creating a 'standard' object file +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'." +SOURCEFILE, then substituting the C source code suffix \`.c' with the +library object suffix, \`.lo'." ;; execute) @@ -3668,7 +2352,7 @@ -dlopen FILE add the directory containing FILE to the library path -This mode sets the library path environment variable according to '-dlopen' +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 @@ -3687,7 +2371,7 @@ 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." +the \`--dry-run' option if you just want to see what would be executed." ;; install) @@ -3697,7 +2381,7 @@ Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be -either the 'install' or 'cp' program. +either the \`install' or \`cp' program. The following components of INSTALL-COMMAND are treated specially: @@ -3723,7 +2407,7 @@ -avoid-version do not add a version suffix if possible -bindir BINDIR specify path to binaries directory (for systems where libraries must be found in the PATH setting at runtime) - -dlopen FILE '-dlpreopen' FILE if it cannot be dlopened at runtime + -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 @@ -3737,8 +2421,7 @@ -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 - -os2dllname NAME force a short DLL name on OS/2 (no effect on other OSes) + -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 @@ -3758,20 +2441,20 @@ -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) -All other options (arguments beginning with '-') are ignored. +All other options (arguments beginning with \`-') are ignored. -Every other argument is treated as a filename. Files ending in '.la' are +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 +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 \`.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 +If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file is created, otherwise an executable program is created." ;; @@ -3782,7 +2465,7 @@ 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 +(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. @@ -3790,17 +2473,17 @@ ;; *) - func_fatal_help "invalid operation mode '$opt_mode'" + func_fatal_help "invalid operation mode \`$opt_mode'" ;; esac echo - $ECHO "Try '$progname --help' for more information about other modes." + $ECHO "Try \`$progname --help' for more information about other modes." } # Now that we've collected a possible --mode arg, show help if necessary if $opt_help; then - if test : = "$opt_help"; then + if test "$opt_help" = :; then func_mode_help else { @@ -3808,7 +2491,7 @@ for opt_mode in compile link execute install finish uninstall clean; do func_mode_help done - } | $SED -n '1p; 2,$s/^Usage:/ or: /p' + } | sed -n '1p; 2,$s/^Usage:/ or: /p' { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do @@ -3816,7 +2499,7 @@ func_mode_help done } | - $SED '1d + sed '1d /^When reporting/,/^Report/{ H d @@ -3833,17 +2516,16 @@ # func_mode_execute arg... func_mode_execute () { - $debug_cmd - + $opt_debug # The first argument is the command name. - cmd=$nonopt + cmd="$nonopt" test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $opt_dlopen; do test -f "$file" \ - || func_fatal_help "'$file' is not a file" + || func_fatal_help "\`$file' is not a file" dir= case $file in @@ -3853,7 +2535,7 @@ # 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" + || func_fatal_help "\`$lib' is not a valid libtool archive" # Read the libtool library. dlname= @@ -3864,18 +2546,18 @@ 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'" + func_warning "\`$file' was not linked with \`-export-dynamic'" continue fi func_dirname "$file" "" "." - dir=$func_dirname_result + dir="$func_dirname_result" if test -f "$dir/$objdir/$dlname"; then func_append dir "/$objdir" else if test ! -f "$dir/$dlname"; then - func_fatal_error "cannot find '$dlname' in '$dir' or '$dir/$objdir'" + func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" fi fi ;; @@ -3883,18 +2565,18 @@ *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." - dir=$func_dirname_result + dir="$func_dirname_result" ;; *) - func_warning "'-dlopen' is ignored for non-libtool libraries and objects" + func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` - test -n "$absdir" && dir=$absdir + test -n "$absdir" && dir="$absdir" # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then @@ -3906,7 +2588,7 @@ # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. - libtool_execute_magic=$magic + libtool_execute_magic="$magic" # Check if any of the arguments is a wrapper script. args= @@ -3919,12 +2601,12 @@ if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. - file=$progdir/$program + 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 + file="$progdir/$program" fi ;; esac @@ -3932,15 +2614,7 @@ func_append_quoted args "$file" done - if $opt_dry_run; then - # 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 - else + if test "X$opt_dry_run" = Xfalse; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" @@ -3957,18 +2631,25 @@ done # Now prepare to actually exec the command. - exec_cmd=\$cmd$args + 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 execute = "$opt_mode" && func_mode_execute ${1+"$@"} +test "$opt_mode" = execute && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { - $debug_cmd - + $opt_debug libs= libdirs= admincmds= @@ -3982,11 +2663,11 @@ if func_lalib_unsafe_p "$opt"; then func_append libs " $opt" else - func_warning "'$opt' is not a valid libtool archive" + func_warning "\`$opt' is not a valid libtool archive" fi else - func_fatal_error "invalid argument '$opt'" + func_fatal_error "invalid argument \`$opt'" fi done @@ -4001,12 +2682,12 @@ # Remove sysroot references if $opt_dry_run; then for lib in $libs; do - echo "removing references to $lt_sysroot and '=' prefixes from $lib" + echo "removing references to $lt_sysroot and \`=' prefixes from $lib" done else tmpdir=`func_mktempdir` for lib in $libs; do - $SED -e "$sysroot_cmd s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ + sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ > $tmpdir/tmp-la mv -f $tmpdir/tmp-la $lib done @@ -4031,7 +2712,7 @@ fi # Exit here if they wanted silent mode. - $opt_quiet && exit $EXIT_SUCCESS + $opt_silent && exit $EXIT_SUCCESS if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then echo "----------------------------------------------------------------------" @@ -4042,27 +2723,27 @@ 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 "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 " - 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 " - add LIBDIR to the \`$runpath_var' environment variable" echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" - $ECHO " - use the '$flag' linker flag" + $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'" + echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" fi echo @@ -4081,20 +2762,18 @@ exit $EXIT_SUCCESS } -test finish = "$opt_mode" && func_mode_finish ${1+"$@"} +test "$opt_mode" = finish && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { - $debug_cmd - + $opt_debug # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). - if test "$SHELL" = "$nonopt" || test /bin/sh = "$nonopt" || + if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. - case $nonopt in *shtool*) :;; *) false;; esac - then + case $nonopt in *shtool*) :;; *) false;; esac; then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " @@ -4121,7 +2800,7 @@ opts= prev= install_type= - isdir=false + isdir=no stripme= no_mode=: for arg @@ -4134,7 +2813,7 @@ fi case $arg in - -d) isdir=: ;; + -d) isdir=yes ;; -f) if $install_cp; then :; else prev=$arg @@ -4152,7 +2831,7 @@ *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then - if test X-m = "X$prev" && test -n "$install_override_mode"; then + if test "x$prev" = x-m && test -n "$install_override_mode"; then arg2=$install_override_mode no_mode=false fi @@ -4177,7 +2856,7 @@ func_fatal_help "you must specify an install program" test -n "$prev" && \ - func_fatal_help "the '$prev' option requires an argument" + func_fatal_help "the \`$prev' option requires an argument" if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else @@ -4199,19 +2878,19 @@ dest=$func_stripname_result # Check to see that the destination is a directory. - test -d "$dest" && isdir=: - if $isdir; then - destdir=$dest + 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 + destdir="$func_dirname_result" + destname="$func_basename_result" # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ - func_fatal_help "'$dest' is not a directory" + func_fatal_help "\`$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; @@ -4220,7 +2899,7 @@ case $file in *.lo) ;; *) - func_fatal_help "'$destdir' must be an absolute directory name" + func_fatal_help "\`$destdir' must be an absolute directory name" ;; esac done @@ -4229,7 +2908,7 @@ # This variable tells wrapper scripts just to set variables rather # than running their programs. - libtool_install_magic=$magic + libtool_install_magic="$magic" staticlibs= future_libdirs= @@ -4249,7 +2928,7 @@ # 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" + || func_fatal_help "\`$file' is not a valid libtool archive" library_names= old_library= @@ -4271,7 +2950,7 @@ fi func_dirname "$file" "/" "" - dir=$func_dirname_result + dir="$func_dirname_result" func_append dir "$objdir" if test -n "$relink_command"; then @@ -4285,7 +2964,7 @@ # 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" + func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. @@ -4294,36 +2973,29 @@ relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi - func_warning "relinking '$file'" + func_warning "relinking \`$file'" func_show_eval "$relink_command" \ - 'func_fatal_error "error: relink '\''$file'\'' with the above command before installing it"' + 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then - realname=$1 + realname="$1" shift - srcname=$realname - test -n "$relink_command" && srcname=${realname}T + srcname="$realname" + test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ 'exit $?' - tstripme=$stripme + tstripme="$stripme" case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) - tstripme= - ;; - esac - ;; - os2*) - case $realname in - *_dll.a) - tstripme= + tstripme="" ;; esac ;; @@ -4334,7 +3006,7 @@ if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. - # Try 'ln -sf' first, because the 'ln' binary might depend on + # 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 @@ -4345,14 +3017,14 @@ fi # Do each command in the postinstall commands. - lib=$destdir/$realname + lib="$destdir/$realname" func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" - name=$func_basename_result - instname=$dir/${name}i + name="$func_basename_result" + instname="$dir/$name"i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. @@ -4364,11 +3036,11 @@ # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then - destfile=$destdir/$destname + destfile="$destdir/$destname" else func_basename "$file" - destfile=$func_basename_result - destfile=$destdir/$destfile + destfile="$func_basename_result" + destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. @@ -4378,11 +3050,11 @@ staticdest=$func_lo2o_result ;; *.$objext) - staticdest=$destfile + staticdest="$destfile" destfile= ;; *) - func_fatal_help "cannot copy a libtool object to '$destfile'" + func_fatal_help "cannot copy a libtool object to \`$destfile'" ;; esac @@ -4391,7 +3063,7 @@ func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. - if test yes = "$build_old_libs"; then + if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result @@ -4403,23 +3075,23 @@ *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then - destfile=$destdir/$destname + destfile="$destdir/$destname" else func_basename "$file" - destfile=$func_basename_result - destfile=$destdir/$destfile + destfile="$func_basename_result" + destfile="$destdir/$destfile" fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install - stripped_ext= + stripped_ext="" case $file in *.exe) if test ! -f "$file"; then func_stripname '' '.exe' "$file" file=$func_stripname_result - stripped_ext=.exe + stripped_ext=".exe" fi ;; esac @@ -4447,19 +3119,19 @@ # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ - func_fatal_error "invalid libtool wrapper script '$wrapper'" + func_fatal_error "invalid libtool wrapper script \`$wrapper'" - finalize=: + finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi - libfile=$libdir/`$ECHO "$lib" | $SED 's%^.*/%%g'` + libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then - func_warning "'$lib' has not been installed in '$libdir'" - finalize=false + func_warning "\`$lib' has not been installed in \`$libdir'" + finalize=no fi done @@ -4467,29 +3139,29 @@ func_source "$wrapper" outputname= - if test no = "$fast_install" && test -n "$relink_command"; then + if test "$fast_install" = no && test -n "$relink_command"; then $opt_dry_run || { - if $finalize; then + if test "$finalize" = yes; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" - file=$func_basename_result - outputname=$tmpdir/$file + file="$func_basename_result" + outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` - $opt_quiet || { + $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" + func_error "error: relink \`$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi - file=$outputname + file="$outputname" else - func_warning "cannot relink '$file'" + func_warning "cannot relink \`$file'" fi } else @@ -4526,10 +3198,10 @@ for file in $staticlibs; do func_basename "$file" - name=$func_basename_result + name="$func_basename_result" # Set up the ranlib parameters. - oldlib=$destdir/$name + oldlib="$destdir/$name" func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result @@ -4544,18 +3216,18 @@ done test -n "$future_libdirs" && \ - func_warning "remember to run '$progname --finish$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' + exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } -test install = "$opt_mode" && func_mode_install ${1+"$@"} +test "$opt_mode" = install && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p @@ -4563,17 +3235,16 @@ # a dlpreopen symbol table. func_generate_dlsyms () { - $debug_cmd - - my_outputname=$1 - my_originator=$2 - my_pic_p=${3-false} - my_prefix=`$ECHO "$my_originator" | $SED 's%[^a-zA-Z0-9]%_%g'` + $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 no != "$dlself"; then + 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 + my_dlsyms="${my_outputname}S.c" else func_error "not configured to extract global symbols from dlpreopened files" fi @@ -4584,7 +3255,7 @@ "") ;; *.c) # Discover the nlist of each of the dlfiles. - nlist=$output_objdir/$my_outputname.nm + nlist="$output_objdir/${my_outputname}.nm" func_show_eval "$RM $nlist ${nlist}S ${nlist}T" @@ -4592,36 +3263,34 @@ 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) $VERSION */ +/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ +/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif -#if defined __GNUC__ && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) +#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" #endif /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE -/* DATA imports from DLLs on WIN32 can't be const, because runtime +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST -#elif defined __osf__ +#elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif -#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) - /* External symbol declarations for the compiler. */\ " - if test yes = "$dlself"; then - func_verbose "generating symbol list for '$output'" + if test "$dlself" = yes; then + func_verbose "generating symbol list for \`$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" @@ -4629,7 +3298,7 @@ progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` for progfile in $progfiles; do func_to_tool_file "$progfile" func_convert_file_msys_to_w32 - func_verbose "extracting global C symbols from '$func_to_tool_file_result'" + func_verbose "extracting global C symbols from \`$func_to_tool_file_result'" $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" done @@ -4649,10 +3318,10 @@ # Prepare the list of exported symbols if test -z "$export_symbols"; then - export_symbols=$output_objdir/$outputname.exp + 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"' + 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"' @@ -4662,7 +3331,7 @@ } else $opt_dry_run || { - eval "$SED -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' + 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 @@ -4676,22 +3345,22 @@ fi for dlprefile in $dlprefiles; do - func_verbose "extracting global C symbols from '$dlprefile'" + func_verbose "extracting global C symbols from \`$dlprefile'" func_basename "$dlprefile" - name=$func_basename_result + name="$func_basename_result" case $host in *cygwin* | *mingw* | *cegcc* ) # if an import library, we need to obtain dlname if func_win32_import_lib_p "$dlprefile"; then func_tr_sh "$dlprefile" eval "curr_lafile=\$libfile_$func_tr_sh_result" - dlprefile_dlbasename= + dlprefile_dlbasename="" if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then # Use subshell, to avoid clobbering current variable values dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` - if test -n "$dlprefile_dlname"; then + if test -n "$dlprefile_dlname" ; then func_basename "$dlprefile_dlname" - dlprefile_dlbasename=$func_basename_result + dlprefile_dlbasename="$func_basename_result" else # no lafile. user explicitly requested -dlpreopen . $sharedlib_from_linklib_cmd "$dlprefile" @@ -4699,7 +3368,7 @@ fi fi $opt_dry_run || { - if test -n "$dlprefile_dlbasename"; then + if test -n "$dlprefile_dlbasename" ; then eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' else func_warning "Could not compute DLL name from $name" @@ -4755,11 +3424,6 @@ echo '/* NONE */' >> "$output_objdir/$my_dlsyms" fi - func_show_eval '$RM "${nlist}I"' - if test -n "$global_symbol_to_import"; then - eval "$global_symbol_to_import"' < "$nlist"S > "$nlist"I' - fi - echo >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ @@ -4768,30 +3432,11 @@ void *address; } lt_dlsymlist; extern LT_DLSYM_CONST lt_dlsymlist -lt_${my_prefix}_LTX_preloaded_symbols[];\ -" - - if test -s "$nlist"I; then - echo >> "$output_objdir/$my_dlsyms" "\ -static void lt_syminit(void) -{ - LT_DLSYM_CONST lt_dlsymlist *symbol = lt_${my_prefix}_LTX_preloaded_symbols; - for (; symbol->name; ++symbol) - {" - $SED 's/.*/ if (STREQ (symbol->name, \"&\")) symbol->address = (void *) \&&;/' < "$nlist"I >> "$output_objdir/$my_dlsyms" - echo >> "$output_objdir/$my_dlsyms" "\ - } -}" - fi - echo >> "$output_objdir/$my_dlsyms" "\ +lt_${my_prefix}_LTX_preloaded_symbols[]; LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = -{ {\"$my_originator\", (void *) 0}," - - if test -s "$nlist"I; then - echo >> "$output_objdir/$my_dlsyms" "\ - {\"@INIT@\", (void *) <_syminit}," - fi +{\ + { \"$my_originator\", (void *) 0 }," case $need_lib_prefix in no) @@ -4833,7 +3478,9 @@ *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) - $my_pic_p && pic_flag_for_symtable=" $pic_flag" + if test "X$my_pic_p" != Xno; then + pic_flag_for_symtable=" $pic_flag" + fi ;; esac ;; @@ -4850,10 +3497,10 @@ 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" "${nlist}I"' + 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 + symfileobj="$output_objdir/${my_outputname}S.$objext" case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then @@ -4871,7 +3518,7 @@ esac ;; *) - func_fatal_error "unknown suffix for '$my_dlsyms'" + func_fatal_error "unknown suffix for \`$my_dlsyms'" ;; esac else @@ -4885,32 +3532,6 @@ fi } -# func_cygming_gnu_implib_p ARG -# This predicate returns with zero status (TRUE) if -# ARG is a GNU/binutils-style import library. Returns -# with nonzero status (FALSE) otherwise. -func_cygming_gnu_implib_p () -{ - $debug_cmd - - func_to_tool_file "$1" func_convert_file_msys_to_w32 - func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` - test -n "$func_cygming_gnu_implib_tmp" -} - -# func_cygming_ms_implib_p ARG -# This predicate returns with zero status (TRUE) if -# ARG is an MS-style import library. Returns -# with nonzero status (FALSE) otherwise. -func_cygming_ms_implib_p () -{ - $debug_cmd - - func_to_tool_file "$1" func_convert_file_msys_to_w32 - func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` - test -n "$func_cygming_ms_implib_tmp" -} - # func_win32_libid arg # return the library type of file 'arg' # @@ -4920,9 +3541,8 @@ # Despite the name, also deal with 64 bit binaries. func_win32_libid () { - $debug_cmd - - win32_libid_type=unknown + $opt_debug + win32_libid_type="unknown" win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import @@ -4932,29 +3552,16 @@ # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then - case $nm_interface in - "MS dumpbin") - if func_cygming_ms_implib_p "$1" || - func_cygming_gnu_implib_p "$1" - then - win32_nmres=import - else - win32_nmres= - fi - ;; - *) - func_to_tool_file "$1" func_convert_file_msys_to_w32 - win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | - $SED -n -e ' + func_to_tool_file "$1" func_convert_file_msys_to_w32 + win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | + $SED -n -e ' 1,100{ / I /{ - s|.*|import| + s,.*,import, p q } }'` - ;; - esac case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; @@ -4986,8 +3593,7 @@ # $sharedlib_from_linklib_result func_cygming_dll_for_implib () { - $debug_cmd - + $opt_debug sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` } @@ -5004,8 +3610,7 @@ # specified import library. func_cygming_dll_for_implib_fallback_core () { - $debug_cmd - + $opt_debug match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` $OBJDUMP -s --section "$1" "$2" 2>/dev/null | $SED '/^Contents of section '"$match_literal"':/{ @@ -5041,8 +3646,8 @@ /./p' | # we now have a list, one entry per line, of the stringified # contents of the appropriate section of all members of the - # archive that possess that section. Heuristic: eliminate - # all those that have a first or second character that is + # archive which possess that section. Heuristic: eliminate + # all those which have a first or second character that is # a '.' (that is, objdump's representation of an unprintable # character.) This should work for all archives with less than # 0x302f exports -- but will fail for DLLs whose name actually @@ -5053,6 +3658,30 @@ $SED -e '/^\./d;/^.\./d;q' } +# func_cygming_gnu_implib_p ARG +# This predicate returns with zero status (TRUE) if +# ARG is a GNU/binutils-style import library. Returns +# with nonzero status (FALSE) otherwise. +func_cygming_gnu_implib_p () +{ + $opt_debug + func_to_tool_file "$1" func_convert_file_msys_to_w32 + func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` + test -n "$func_cygming_gnu_implib_tmp" +} + +# func_cygming_ms_implib_p ARG +# This predicate returns with zero status (TRUE) if +# ARG is an MS-style import library. Returns +# with nonzero status (FALSE) otherwise. +func_cygming_ms_implib_p () +{ + $opt_debug + func_to_tool_file "$1" func_convert_file_msys_to_w32 + func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` + test -n "$func_cygming_ms_implib_tmp" +} + # func_cygming_dll_for_implib_fallback ARG # Platform-specific function to extract the # name of the DLL associated with the specified @@ -5066,17 +3695,16 @@ # $sharedlib_from_linklib_result func_cygming_dll_for_implib_fallback () { - $debug_cmd - - if func_cygming_gnu_implib_p "$1"; then + $opt_debug + if func_cygming_gnu_implib_p "$1" ; then # binutils import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` - elif func_cygming_ms_implib_p "$1"; then + elif func_cygming_ms_implib_p "$1" ; then # ms-generated import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` else # unknown - sharedlib_from_linklib_result= + sharedlib_from_linklib_result="" fi } @@ -5084,11 +3712,10 @@ # func_extract_an_archive dir oldlib func_extract_an_archive () { - $debug_cmd - - f_ex_an_ar_dir=$1; shift - f_ex_an_ar_oldlib=$1 - if test yes = "$lock_old_archive_extraction"; then + $opt_debug + f_ex_an_ar_dir="$1"; shift + f_ex_an_ar_oldlib="$1" + if test "$lock_old_archive_extraction" = yes; then lockfile=$f_ex_an_ar_oldlib.lock until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" @@ -5097,7 +3724,7 @@ fi func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ 'stat=$?; rm -f "$lockfile"; exit $stat' - if test yes = "$lock_old_archive_extraction"; then + if test "$lock_old_archive_extraction" = yes; then $opt_dry_run || rm -f "$lockfile" fi if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then @@ -5111,23 +3738,22 @@ # func_extract_archives gentop oldlib ... func_extract_archives () { - $debug_cmd - - my_gentop=$1; shift + $opt_debug + my_gentop="$1"; shift my_oldlibs=${1+"$@"} - my_oldobjs= - my_xlib= - my_xabs= - my_xdir= + 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 ;; + [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac func_basename "$my_xlib" - my_xlib=$func_basename_result + my_xlib="$func_basename_result" my_xlib_u=$my_xlib while :; do case " $extracted_archives " in @@ -5139,7 +3765,7 @@ esac done extracted_archives="$extracted_archives $my_xlib_u" - my_xdir=$my_gentop/$my_xlib_u + my_xdir="$my_gentop/$my_xlib_u" func_mkdir_p "$my_xdir" @@ -5152,23 +3778,22 @@ cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` - func_basename "$darwin_archive" - darwin_base_archive=$func_basename_result + 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" + 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" + $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 "$sed_basename" | sort -u` + 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 @@ -5190,7 +3815,7 @@ my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` done - func_extract_archives_result=$my_oldobjs + func_extract_archives_result="$my_oldobjs" } @@ -5205,7 +3830,7 @@ # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script -# will assume that the directory where it is stored is +# will assume that the directory in which it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () @@ -5216,7 +3841,7 @@ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname -# Generated by $PROGRAM (GNU $PACKAGE) $VERSION +# 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. @@ -5273,9 +3898,9 @@ # Very basic option parsing. These options are (a) specific to # the libtool wrapper, (b) are identical between the wrapper -# /script/ and the wrapper /executable/ that is used only on +# /script/ and the wrapper /executable/ which is used only on # windows platforms, and (c) all begin with the string "--lt-" -# (application programs are unlikely to have options that match +# (application programs are unlikely to have options which match # this pattern). # # There are only two supported options: --lt-debug and @@ -5308,7 +3933,7 @@ # Print the debug banner immediately: if test -n \"\$lt_option_debug\"; then - echo \"$outputname:$output:\$LINENO: libtool wrapper (GNU $PACKAGE) $VERSION\" 1>&2 + echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2 fi } @@ -5319,7 +3944,7 @@ lt_dump_args_N=1; for lt_arg do - \$ECHO \"$outputname:$output:\$LINENO: newargv[\$lt_dump_args_N]: \$lt_arg\" + \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\" lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` done } @@ -5333,7 +3958,7 @@ *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ if test -n \"\$lt_option_debug\"; then - \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2 + \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} @@ -5343,7 +3968,7 @@ *) $ECHO "\ if test -n \"\$lt_option_debug\"; then - \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir/\$program\" 1>&2 + \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir/\$program\" \${1+\"\$@\"} @@ -5418,13 +4043,13 @@ test -n \"\$absdir\" && thisdir=\"\$absdir\" " - if test yes = "$fast_install"; then + 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\`; \\ + { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" @@ -5441,7 +4066,7 @@ if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else - \$ECHO \"\$relink_command_output\" >&2 + $ECHO \"\$relink_command_output\" >&2 $RM \"\$progdir/\$file\" exit 1 fi @@ -5476,7 +4101,7 @@ fi # Export our shlibpath_var if we have one. - if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then + 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\" @@ -5496,7 +4121,7 @@ fi else # The program doesn't exist. - \$ECHO \"\$0: error: '\$progdir/\$program' does not exist\" 1>&2 + \$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 @@ -5515,7 +4140,7 @@ cat < #include -#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) - /* declarations of non-ANSI functions */ -#if defined __MINGW32__ +#if defined(__MINGW32__) # ifdef __STRICT_ANSI__ int _putenv (const char *); # endif -#elif defined __CYGWIN__ +#elif defined(__CYGWIN__) # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif -/* #elif defined other_platform || defined ... */ +/* #elif defined (other platforms) ... */ #endif /* portability defines, excluding path handling macros */ -#if defined _MSC_VER +#if defined(_MSC_VER) # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv # define S_IXUSR _S_IEXEC -#elif defined __MINGW32__ +# ifndef _INTPTR_T_DEFINED +# define _INTPTR_T_DEFINED +# define intptr_t int +# endif +#elif defined(__MINGW32__) # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv -#elif defined __CYGWIN__ +#elif defined(__CYGWIN__) # define HAVE_SETENV # define FOPEN_WB "wb" -/* #elif defined other platforms ... */ +/* #elif defined (other platforms) ... */ #endif -#if defined PATH_MAX +#if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX -#elif defined MAXPATHLEN +#elif defined(MAXPATHLEN) # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 @@ -5607,8 +4234,8 @@ # define PATH_SEPARATOR ':' #endif -#if defined _WIN32 || defined __MSDOS__ || defined __DJGPP__ || \ - defined __OS2__ +#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ + defined (__OS2__) # define HAVE_DOS_BASED_FILE_SYSTEM # define FOPEN_WB "wb" # ifndef DIR_SEPARATOR_2 @@ -5641,10 +4268,10 @@ #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ - if (stale) { free (stale); stale = 0; } \ + if (stale) { free ((void *) stale); stale = 0; } \ } while (0) -#if defined LT_DEBUGWRAPPER +#if defined(LT_DEBUGWRAPPER) static int lt_debug = 1; #else static int lt_debug = 0; @@ -5673,16 +4300,11 @@ EOF cat < 0) && IS_PATH_SEPARATOR (new_value[len-1])) + int len = strlen (new_value); + while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { - new_value[--len] = '\0'; + new_value[len-1] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); @@ -6460,47 +5082,27 @@ # True if ARG is an import lib, as indicated by $file_magic_cmd func_win32_import_lib_p () { - $debug_cmd - + $opt_debug case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in *import*) : ;; *) false ;; esac } -# func_suncc_cstd_abi -# !!ONLY CALL THIS FOR SUN CC AFTER $compile_command IS FULLY EXPANDED!! -# Several compiler flags select an ABI that is incompatible with the -# Cstd library. Avoid specifying it if any are in CXXFLAGS. -func_suncc_cstd_abi () -{ - $debug_cmd - - case " $compile_command " in - *" -compat=g "*|*\ -std=c++[0-9][0-9]\ *|*" -library=stdcxx4 "*|*" -library=stlport4 "*) - suncc_use_cstd_abi=no - ;; - *) - suncc_use_cstd_abi=yes - ;; - esac -} - # func_mode_link arg... func_mode_link () { - $debug_cmd - + $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 - # what system we are compiling for in order to pass an extra + # which system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying - # to make a dll that has undefined symbols, in which case not + # 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. @@ -6544,11 +5146,10 @@ module=no no_install=no objs= - os2dllname= non_pic_objects= precious_files_regex= prefer_static_libs=no - preload=false + preload=no prev= prevarg= release= @@ -6560,7 +5161,7 @@ vinfo= vinfo_number=no weak_libs= - single_module=$wl-single_module + single_module="${wl}-single_module" func_infer_tag $base_compile # We need to know -static, to get the right output filenames. @@ -6568,15 +5169,15 @@ do case $arg in -shared) - test yes != "$build_libtool_libs" \ - && func_fatal_configuration "cannot build a shared library" + 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 yes = "$build_libtool_libs" && test -z "$link_static_flag"; then + 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 @@ -6609,7 +5210,7 @@ # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do - arg=$1 + arg="$1" shift func_quote_for_eval "$arg" qarg=$func_quote_for_eval_unquoted_result @@ -6626,21 +5227,21 @@ case $prev in bindir) - bindir=$arg + bindir="$arg" prev= continue ;; dlfiles|dlprefiles) - $preload || { + if test "$preload" = no; then # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" - preload=: - } + preload=yes + fi case $arg in *.la | *.lo) ;; # We handle these cases below. force) - if test no = "$dlself"; then + if test "$dlself" = no; then dlself=needless export_dynamic=yes fi @@ -6648,9 +5249,9 @@ continue ;; self) - if test dlprefiles = "$prev"; then + if test "$prev" = dlprefiles; then dlself=yes - elif test dlfiles = "$prev" && test yes != "$dlopen_self"; then + elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then dlself=yes else dlself=needless @@ -6660,7 +5261,7 @@ continue ;; *) - if test dlfiles = "$prev"; then + if test "$prev" = dlfiles; then func_append dlfiles " $arg" else func_append dlprefiles " $arg" @@ -6671,14 +5272,14 @@ esac ;; expsyms) - export_symbols=$arg + export_symbols="$arg" test -f "$arg" \ - || func_fatal_error "symbol file '$arg' does not exist" + || func_fatal_error "symbol file \`$arg' does not exist" prev= continue ;; expsyms_regex) - export_symbols_regex=$arg + export_symbols_regex="$arg" prev= continue ;; @@ -6696,13 +5297,7 @@ continue ;; inst_prefix) - inst_prefix_dir=$arg - prev= - continue - ;; - mllvm) - # Clang does not use LLVM to link, so we can simply discard any - # '-mllvm $arg' options when doing the link step. + inst_prefix_dir="$arg" prev= continue ;; @@ -6726,21 +5321,21 @@ if test -z "$pic_object" || test -z "$non_pic_object" || - test none = "$pic_object" && - test none = "$non_pic_object"; then - func_fatal_error "cannot find name of object for '$arg'" + test "$pic_object" = none && + test "$non_pic_object" = none; then + func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" - xdir=$func_dirname_result + xdir="$func_dirname_result" - if test none != "$pic_object"; then + if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. - pic_object=$xdir$pic_object + pic_object="$xdir$pic_object" - if test dlfiles = "$prev"; then - if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then + if test "$prev" = dlfiles; then + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then func_append dlfiles " $pic_object" prev= continue @@ -6751,7 +5346,7 @@ fi # CHECK ME: I think I busted this. -Ossama - if test dlprefiles = "$prev"; then + if test "$prev" = dlprefiles; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= @@ -6759,23 +5354,23 @@ # A PIC object. func_append libobjs " $pic_object" - arg=$pic_object + arg="$pic_object" fi # Non-PIC object. - if test none != "$non_pic_object"; then + if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. - non_pic_object=$xdir$non_pic_object + non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" - if test -z "$pic_object" || test none = "$pic_object"; then - arg=$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_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else @@ -6783,7 +5378,7 @@ if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" - xdir=$func_dirname_result + xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result @@ -6791,29 +5386,24 @@ func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else - func_fatal_error "'$arg' is not a valid libtool object" + func_fatal_error "\`$arg' is not a valid libtool object" fi fi done else - func_fatal_error "link input file '$arg' does not exist" + func_fatal_error "link input file \`$arg' does not exist" fi arg=$save_arg prev= continue ;; - os2dllname) - os2dllname=$arg - prev= - continue - ;; precious_regex) - precious_files_regex=$arg + precious_files_regex="$arg" prev= continue ;; release) - release=-$arg + release="-$arg" prev= continue ;; @@ -6825,7 +5415,7 @@ func_fatal_error "only absolute run-paths are allowed" ;; esac - if test rpath = "$prev"; then + if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; *) func_append rpath " $arg" ;; @@ -6840,7 +5430,7 @@ continue ;; shrext) - shrext_cmds=$arg + shrext_cmds="$arg" prev= continue ;; @@ -6880,7 +5470,7 @@ esac fi # test -n "$prev" - prevarg=$arg + prevarg="$arg" case $arg in -all-static) @@ -6894,7 +5484,7 @@ -allow-undefined) # FIXME: remove this flag sometime in the future. - func_fatal_error "'-allow-undefined' must not be used because it is the default" + func_fatal_error "\`-allow-undefined' must not be used because it is the default" ;; -avoid-version) @@ -6926,7 +5516,7 @@ 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-export-symbols = "X$arg"; then + if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex @@ -6960,9 +5550,9 @@ func_stripname "-L" '' "$arg" if test -z "$func_stripname_result"; then if test "$#" -gt 0; then - func_fatal_error "require no space between '-L' and '$1'" + func_fatal_error "require no space between \`-L' and \`$1'" else - func_fatal_error "need path for '-L' option" + func_fatal_error "need path for \`-L' option" fi fi func_resolve_sysroot "$func_stripname_result" @@ -6973,8 +5563,8 @@ *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ - func_fatal_error "cannot determine absolute directory name of '$dir'" - dir=$absdir + func_fatal_error "cannot determine absolute directory name of \`$dir'" + dir="$absdir" ;; esac case "$deplibs " in @@ -7009,7 +5599,7 @@ ;; -l*) - if test X-lc = "X$arg" || test X-lm = "X$arg"; then + if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) # These systems don't actually have a C or math library (as such) @@ -7017,11 +5607,11 @@ ;; *-*-os2*) # These systems don't actually have a C library (as such) - test X-lc = "X$arg" && continue + test "X$arg" = "X-lc" && continue ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. - test X-lc = "X$arg" && continue + test "X$arg" = "X-lc" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework @@ -7030,16 +5620,16 @@ ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype - test X-lc = "X$arg" && continue + test "X$arg" = "X-lc" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work - test X-lc = "X$arg" && continue + test "X$arg" = "X-lc" && continue ;; esac - elif test X-lc_r = "X$arg"; then + elif test "X$arg" = "X-lc_r"; then case $host in - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc_r directly, use -pthread flag. continue ;; @@ -7049,11 +5639,6 @@ continue ;; - -mllvm) - prev=mllvm - continue - ;; - -module) module=yes continue @@ -7083,7 +5668,7 @@ ;; -multi_module) - single_module=$wl-multi_module + single_module="${wl}-multi_module" continue ;; @@ -7097,8 +5682,8 @@ *-*-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" + func_warning "\`-no-install' is ignored for $host" + func_warning "assuming \`-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; @@ -7116,11 +5701,6 @@ continue ;; - -os2dllname) - prev=os2dllname - continue - ;; - -o) prev=output ;; -precious-files-regex) @@ -7208,14 +5788,14 @@ func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= - save_ifs=$IFS; IFS=, + save_ifs="$IFS"; IFS=',' for flag in $args; do - IFS=$save_ifs + IFS="$save_ifs" func_quote_for_eval "$flag" func_append arg " $func_quote_for_eval_result" func_append compiler_flags " $func_quote_for_eval_result" done - IFS=$save_ifs + IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; @@ -7224,15 +5804,15 @@ func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= - save_ifs=$IFS; IFS=, + save_ifs="$IFS"; IFS=',' for flag in $args; do - IFS=$save_ifs + IFS="$save_ifs" func_quote_for_eval "$flag" func_append arg " $wl$func_quote_for_eval_result" func_append compiler_flags " $wl$func_quote_for_eval_result" func_append linker_flags " $func_quote_for_eval_result" done - IFS=$save_ifs + IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; @@ -7255,7 +5835,7 @@ # -msg_* for osf cc -msg_*) func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result + arg="$func_quote_for_eval_result" ;; # Flags to be passed through unchanged, with rationale: @@ -7267,46 +5847,25 @@ # -m*, -t[45]*, -txscale* architecture-specific flags for GCC # -F/path path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* profiling flags for GCC - # -fstack-protector* stack protector flags for GCC # @file GCC response files # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support - # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization - # -stdlib=* select c++ std lib with clang + # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ - -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*) + -O*|-flto*|-fwhopr*|-fuse-linker-plugin) func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result + arg="$func_quote_for_eval_result" func_append compile_command " $arg" func_append finalize_command " $arg" func_append compiler_flags " $arg" continue ;; - -Z*) - if test os2 = "`expr $host : '.*\(os2\)'`"; then - # OS/2 uses -Zxxx to specify OS/2-specific options - compiler_flags="$compiler_flags $arg" - func_append compile_command " $arg" - func_append finalize_command " $arg" - case $arg in - -Zlinker | -Zstack) - prev=xcompiler - ;; - esac - continue - else - # Otherwise treat like 'Some other compiler flag' below - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result - fi - ;; - # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result + arg="$func_quote_for_eval_result" ;; *.$objext) @@ -7327,21 +5886,21 @@ if test -z "$pic_object" || test -z "$non_pic_object" || - test none = "$pic_object" && - test none = "$non_pic_object"; then - func_fatal_error "cannot find name of object for '$arg'" + test "$pic_object" = none && + test "$non_pic_object" = none; then + func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" - xdir=$func_dirname_result + xdir="$func_dirname_result" - test none = "$pic_object" || { + if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. - pic_object=$xdir$pic_object + pic_object="$xdir$pic_object" - if test dlfiles = "$prev"; then - if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then + if test "$prev" = dlfiles; then + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then func_append dlfiles " $pic_object" prev= continue @@ -7352,7 +5911,7 @@ fi # CHECK ME: I think I busted this. -Ossama - if test dlprefiles = "$prev"; then + if test "$prev" = dlprefiles; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= @@ -7360,23 +5919,23 @@ # A PIC object. func_append libobjs " $pic_object" - arg=$pic_object - } + arg="$pic_object" + fi # Non-PIC object. - if test none != "$non_pic_object"; then + if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. - non_pic_object=$xdir$non_pic_object + non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" - if test -z "$pic_object" || test none = "$pic_object"; then - arg=$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_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else @@ -7384,7 +5943,7 @@ if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" - xdir=$func_dirname_result + xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result @@ -7392,7 +5951,7 @@ func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else - func_fatal_error "'$arg' is not a valid libtool object" + func_fatal_error "\`$arg' is not a valid libtool object" fi fi ;; @@ -7408,11 +5967,11 @@ # A libtool-controlled library. func_resolve_sysroot "$arg" - if test dlfiles = "$prev"; then + if test "$prev" = dlfiles; then # This library was specified with -dlopen. func_append dlfiles " $func_resolve_sysroot_result" prev= - elif test dlprefiles = "$prev"; then + elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. func_append dlprefiles " $func_resolve_sysroot_result" prev= @@ -7427,7 +5986,7 @@ # 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 + arg="$func_quote_for_eval_result" ;; esac # arg @@ -7439,9 +5998,9 @@ done # argument parsing loop test -n "$prev" && \ - func_fatal_help "the '$prevarg' option requires an argument" + func_fatal_help "the \`$prevarg' option requires an argument" - if test yes = "$export_dynamic" && test -n "$export_dynamic_flag_spec"; then + 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" @@ -7450,23 +6009,20 @@ oldlibs= # calculate the name of the file, without its directory func_basename "$output" - outputname=$func_basename_result - libobjs_save=$libobjs + outputname="$func_basename_result" + libobjs_save="$libobjs" if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var - eval shlib_search_path=\`\$ECHO \"\$$shlibpath_var\" \| \$SED \'s/:/ /g\'\` + eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" - # Definition is injected by LT_CONFIG during libtool generation. - func_munge_path_list sys_lib_dlsearch_path "$LT_SYS_LIBRARY_PATH" - func_dirname "$output" "/" "" - output_objdir=$func_dirname_result$objdir + output_objdir="$func_dirname_result$objdir" func_to_tool_file "$output_objdir/" tool_output_objdir=$func_to_tool_file_result # Create the object directory. @@ -7489,7 +6045,7 @@ # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do - if $opt_preserve_dup_deps; then + if $opt_preserve_dup_deps ; then case "$libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac @@ -7497,7 +6053,7 @@ func_append libs " $deplib" done - if test lib = "$linkmode"; then + if test "$linkmode" = lib; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps @@ -7529,7 +6085,7 @@ case $file in *.la) ;; *) - func_fatal_help "libraries can '-dlopen' only libtool libraries: $file" + func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" ;; esac done @@ -7537,7 +6093,7 @@ prog) compile_deplibs= finalize_deplibs= - alldeplibs=false + alldeplibs=no newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" @@ -7549,29 +6105,32 @@ 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 lib,link = "$linkmode,$pass"; then + 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 + deplibs="$tmp_deplibs" fi - if test lib,link = "$linkmode,$pass" || - test prog,scan = "$linkmode,$pass"; then - libs=$deplibs + if test "$linkmode,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan"; then + libs="$deplibs" deplibs= fi - if test prog = "$linkmode"; then + if test "$linkmode" = prog; then case $pass in - dlopen) libs=$dlfiles ;; - dlpreopen) libs=$dlprefiles ;; - link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; + dlopen) libs="$dlfiles" ;; + dlpreopen) libs="$dlprefiles" ;; + link) + libs="$deplibs %DEPLIBS%" + test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" + ;; esac fi - if test lib,dlpreopen = "$linkmode,$pass"; then + if test "$linkmode,$pass" = "lib,dlpreopen"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs @@ -7592,26 +6151,26 @@ esac done done - libs=$dlprefiles + libs="$dlprefiles" fi - if test dlopen = "$pass"; then + if test "$pass" = dlopen; then # Collect dlpreopened libraries - save_deplibs=$deplibs + save_deplibs="$deplibs" deplibs= fi for deplib in $libs; do lib= - found=false + found=no case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) - if test prog,link = "$linkmode,$pass"; then + if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append compiler_flags " $deplib" - if test lib = "$linkmode"; then + if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; @@ -7621,13 +6180,13 @@ continue ;; -l*) - if test lib != "$linkmode" && test prog != "$linkmode"; then - func_warning "'-l' is ignored for archives/objects" + 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 lib = "$linkmode"; then + 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" @@ -7635,22 +6194,31 @@ 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 + lib="$searchdir/lib${name}${search_ext}" if test -f "$lib"; then - if test .la = "$search_ext"; then - found=: + if test "$search_ext" = ".la"; then + found=yes else - found=false + found=no fi break 2 fi done done - if $found; then - # deplib is a libtool library + 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 yes = "$allow_libtool_libs_with_static_runtimes"; then + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $deplib "*) if func_lalib_p "$lib"; then @@ -7658,19 +6226,19 @@ old_library= func_source "$lib" for l in $old_library $library_names; do - ll=$l + ll="$l" done - if test "X$ll" = "X$old_library"; then # only static version available - found=false + if test "X$ll" = "X$old_library" ; then # only static version available + found=no func_dirname "$lib" "" "." - ladir=$func_dirname_result + ladir="$func_dirname_result" lib=$ladir/$old_library - if test prog,link = "$linkmode,$pass"; then + if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" - test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" + test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue fi @@ -7679,25 +6247,15 @@ *) ;; esac fi - else - # deplib doesn't seem to be a libtool library - if test prog,link = "$linkmode,$pass"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" - fi - continue fi ;; # -l *.ltframework) - if test prog,link = "$linkmode,$pass"; then + if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" - if test lib = "$linkmode"; then + if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; @@ -7710,18 +6268,18 @@ case $linkmode in lib) deplibs="$deplib $deplibs" - test conv = "$pass" && continue + test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; prog) - if test conv = "$pass"; then + if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi - if test scan = "$pass"; then + if test "$pass" = scan; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" @@ -7732,13 +6290,13 @@ func_append newlib_search_path " $func_resolve_sysroot_result" ;; *) - func_warning "'-L' is ignored for archives/objects" + func_warning "\`-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) - if test link = "$pass"; then + if test "$pass" = link; then func_stripname '-R' '' "$deplib" func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result @@ -7756,7 +6314,7 @@ lib=$func_resolve_sysroot_result ;; *.$libext) - if test conv = "$pass"; then + if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi @@ -7767,26 +6325,21 @@ case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) - valid_a_lib=false + valid_a_lib=no case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then - valid_a_lib=: + valid_a_lib=yes fi ;; pass_all) - valid_a_lib=: + valid_a_lib=yes ;; esac - if $valid_a_lib; then - echo - $ECHO "*** Warning: Linking the shared library $output against the" - $ECHO "*** static library $deplib is not portable!" - deplibs="$deplib $deplibs" - else + 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" @@ -7794,13 +6347,18 @@ 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 link != "$pass"; then + if test "$pass" != link; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" @@ -7811,10 +6369,10 @@ esac # linkmode ;; # *.$libext *.lo | *.$objext) - if test conv = "$pass"; then + if test "$pass" = conv; then deplibs="$deplib $deplibs" - elif test prog = "$linkmode"; then - if test dlpreopen = "$pass" || test yes != "$dlopen_support" || test no = "$build_libtool_libs"; then + elif test "$linkmode" = prog; then + if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. func_append newdlprefiles " $deplib" @@ -7827,20 +6385,22 @@ continue ;; %DEPLIBS%) - alldeplibs=: + alldeplibs=yes continue ;; esac # case $deplib - $found || test -f "$lib" \ - || func_fatal_error "cannot find the library '$lib' or unhandled argument '$deplib'" + if test "$found" = yes || test -f "$lib"; then : + else + func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" + fi # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ - || func_fatal_error "'$lib' is not a valid libtool archive" + || func_fatal_error "\`$lib' is not a valid libtool archive" func_dirname "$lib" "" "." - ladir=$func_dirname_result + ladir="$func_dirname_result" dlname= dlopen= @@ -7870,36 +6430,36 @@ done fi dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - if test lib,link = "$linkmode,$pass" || - test prog,scan = "$linkmode,$pass" || - { test prog != "$linkmode" && test lib != "$linkmode"; }; then + if test "$linkmode,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan" || + { test "$linkmode" != prog && test "$linkmode" != lib; }; then test -n "$dlopen" && func_append dlfiles " $dlopen" test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" fi - if test conv = "$pass"; then + if test "$pass" = conv; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then - func_fatal_error "cannot find name of link library for '$lib'" + func_fatal_error "cannot find name of link library for \`$lib'" fi # It is a libtool convenience library, so add in its objects. func_append convenience " $ladir/$objdir/$old_library" func_append old_convenience " $ladir/$objdir/$old_library" - elif test prog != "$linkmode" && test lib != "$linkmode"; then - func_fatal_error "'$lib' is not a convenience library" + tmp_libs= + for deplib in $dependency_libs; do + deplibs="$deplib $deplibs" + if $opt_preserve_dup_deps ; then + case "$tmp_libs " in + *" $deplib "*) func_append specialdeplibs " $deplib" ;; + esac + fi + func_append tmp_libs " $deplib" + done + elif test "$linkmode" != prog && test "$linkmode" != lib; then + func_fatal_error "\`$lib' is not a convenience library" fi - tmp_libs= - for deplib in $dependency_libs; do - deplibs="$deplib $deplibs" - if $opt_preserve_dup_deps; then - case "$tmp_libs " in - *" $deplib "*) func_append specialdeplibs " $deplib" ;; - esac - fi - func_append tmp_libs " $deplib" - done continue fi # $pass = conv @@ -7907,26 +6467,26 @@ # Get the name of the library we link against. linklib= if test -n "$old_library" && - { test yes = "$prefer_static_libs" || - test built,no = "$prefer_static_libs,$installed"; }; then + { test "$prefer_static_libs" = yes || + test "$prefer_static_libs,$installed" = "built,no"; }; then linklib=$old_library else for l in $old_library $library_names; do - linklib=$l + linklib="$l" done fi if test -z "$linklib"; then - func_fatal_error "cannot find name of link library for '$lib'" + func_fatal_error "cannot find name of link library for \`$lib'" fi # This library was specified with -dlopen. - if test dlopen = "$pass"; then - test -z "$libdir" \ - && func_fatal_error "cannot -dlopen a convenience library: '$lib'" + 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 yes != "$dlopen_support" || - test no = "$build_libtool_libs" - then + 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 @@ -7940,40 +6500,40 @@ # We need an absolute path. case $ladir in - [\\/]* | [A-Za-z]:[\\/]*) abs_ladir=$ladir ;; + [\\/]* | [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 "cannot determine absolute directory name of \`$ladir'" func_warning "passing it literally to the linker, although it might fail" - abs_ladir=$ladir + abs_ladir="$ladir" fi ;; esac func_basename "$lib" - laname=$func_basename_result + laname="$func_basename_result" # Find the relevant object directory and library name. - if test yes = "$installed"; then + if test "X$installed" = Xyes; then if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then - func_warning "library '$lib' was moved." - dir=$ladir - absdir=$abs_ladir - libdir=$abs_ladir + func_warning "library \`$lib' was moved." + dir="$ladir" + absdir="$abs_ladir" + libdir="$abs_ladir" else - dir=$lt_sysroot$libdir - absdir=$lt_sysroot$libdir + dir="$lt_sysroot$libdir" + absdir="$lt_sysroot$libdir" fi - test yes = "$hardcode_automatic" && avoidtemprpath=yes + 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 + dir="$ladir" + absdir="$abs_ladir" # Remove this search path later func_append notinst_path " $abs_ladir" else - dir=$ladir/$objdir - absdir=$abs_ladir/$objdir + dir="$ladir/$objdir" + absdir="$abs_ladir/$objdir" # Remove this search path later func_append notinst_path " $abs_ladir" fi @@ -7982,11 +6542,11 @@ name=$func_stripname_result # This library was specified with -dlpreopen. - if test dlpreopen = "$pass"; then - if test -z "$libdir" && test prog = "$linkmode"; then - func_fatal_error "only libraries may -dlpreopen a convenience library: '$lib'" + if test "$pass" = dlpreopen; then + if test -z "$libdir" && test "$linkmode" = prog; then + func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" fi - case $host in + case "$host" in # special handling for platforms with PE-DLLs. *cygwin* | *mingw* | *cegcc* ) # Linker will automatically link against shared library if both @@ -8030,9 +6590,9 @@ if test -z "$libdir"; then # Link the convenience library - if test lib = "$linkmode"; then + if test "$linkmode" = lib; then deplibs="$dir/$old_library $deplibs" - elif test prog,link = "$linkmode,$pass"; then + elif test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else @@ -8042,14 +6602,14 @@ fi - if test prog = "$linkmode" && test link != "$pass"; then + if test "$linkmode" = prog && test "$pass" != link; then func_append newlib_search_path " $ladir" deplibs="$lib $deplibs" - linkalldeplibs=false - if test no != "$link_all_deplibs" || test -z "$library_names" || - test no = "$build_libtool_libs"; then - linkalldeplibs=: + linkalldeplibs=no + if test "$link_all_deplibs" != no || test -z "$library_names" || + test "$build_libtool_libs" = no; then + linkalldeplibs=yes fi tmp_libs= @@ -8061,14 +6621,14 @@ ;; esac # Need to link against all dependency_libs? - if $linkalldeplibs; then + if test "$linkalldeplibs" = yes; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi - if $opt_preserve_dup_deps; then + if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac @@ -8078,15 +6638,15 @@ continue fi # $linkmode = prog... - if test prog,link = "$linkmode,$pass"; then + if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && - { { test no = "$prefer_static_libs" || - test built,yes = "$prefer_static_libs,$installed"; } || + { { 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 + if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. - case $temp_rpath: in + case "$temp_rpath:" in *"$absdir:"*) ;; *) func_append temp_rpath "$absdir:" ;; esac @@ -8115,9 +6675,9 @@ esac fi # $linkmode,$pass = prog,link... - if $alldeplibs && - { test pass_all = "$deplibs_check_method" || - { test yes = "$build_libtool_libs" && + 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 @@ -8126,19 +6686,19 @@ link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs - if test built = "$use_static_libs" && test yes = "$installed"; then + if test "$use_static_libs" = built && test "$installed" = yes; then use_static_libs=no fi if test -n "$library_names" && - { test no = "$use_static_libs" || test -z "$old_library"; }; then + { test "$use_static_libs" = no || test -z "$old_library"; }; then case $host in - *cygwin* | *mingw* | *cegcc* | *os2*) + *cygwin* | *mingw* | *cegcc*) # No point in relinking DLLs because paths are not encoded func_append notinst_deplibs " $lib" need_relink=no ;; *) - if test no = "$installed"; then + if test "$installed" = no; then func_append notinst_deplibs " $lib" need_relink=yes fi @@ -8148,24 +6708,24 @@ # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! - dlopenmodule= + dlopenmodule="" for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then - dlopenmodule=$dlpremoduletest + dlopenmodule="$dlpremoduletest" break fi done - if test -z "$dlopenmodule" && test yes = "$shouldnotlink" && test link = "$pass"; then + if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then echo - if test prog = "$linkmode"; then + 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 lib = "$linkmode" && - test yes = "$hardcode_into_libs"; then + 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. @@ -8193,43 +6753,43 @@ # figure out the soname set dummy $library_names shift - realname=$1 + 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 + soname="$dlname" elif test -n "$soname_spec"; then # bleh windows case $host in - *cygwin* | mingw* | *cegcc* | *os2*) + *cygwin* | mingw* | *cegcc*) func_arith $current - $age major=$func_arith_result - versuffix=-$major + versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else - soname=$realname + soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use - soroot=$soname + soroot="$soname" func_basename "$soroot" - soname=$func_basename_result + 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_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_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 @@ -8237,58 +6797,58 @@ linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" - if test prog = "$linkmode" || test relink != "$opt_mode"; then + if test "$linkmode" = prog || test "$opt_mode" != relink; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) - if test no = "$hardcode_direct"; then - add=$dir/$linklib + 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 ;; + *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; + *-*-sysv4*uw2*) add_dir="-L$dir" ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ - *-*-unixware7*) add_dir=-L$dir ;; + *-*-unixware7*) add_dir="-L$dir" ;; *-*-darwin* ) - # if the lib is a (non-dlopened) module then we cannot + # 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 + $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 + 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 + add="$dir/$old_library" fi elif test -n "$old_library"; then - add=$dir/$old_library + add="$dir/$old_library" fi fi esac - elif test no = "$hardcode_minus_L"; then + elif test "$hardcode_minus_L" = no; then case $host in - *-*-sunos*) add_shlibpath=$dir ;; + *-*-sunos*) add_shlibpath="$dir" ;; esac - add_dir=-L$dir - add=-l$name - elif test no = "$hardcode_shlibpath_var"; then - add_shlibpath=$dir - add=-l$name + 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 yes = "$hardcode_direct" && - test no = "$hardcode_direct_absolute"; then - add=$dir/$linklib - elif test yes = "$hardcode_minus_L"; then - add_dir=-L$absdir + if test "$hardcode_direct" = yes && + test "$hardcode_direct_absolute" = no; then + add="$dir/$linklib" + elif test "$hardcode_minus_L" = yes; then + add_dir="-L$absdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in @@ -8297,10 +6857,10 @@ ;; esac fi - add=-l$name - elif test yes = "$hardcode_shlibpath_var"; then - add_shlibpath=$dir - add=-l$name + add="-l$name" + elif test "$hardcode_shlibpath_var" = yes; then + add_shlibpath="$dir" + add="-l$name" else lib_linked=no fi @@ -8308,7 +6868,7 @@ *) lib_linked=no ;; esac - if test yes != "$lib_linked"; then + if test "$lib_linked" != yes; then func_fatal_configuration "unsupported hardcode properties" fi @@ -8318,15 +6878,15 @@ *) func_append compile_shlibpath "$add_shlibpath:" ;; esac fi - if test prog = "$linkmode"; then + 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 yes != "$hardcode_direct" && - test yes != "$hardcode_minus_L" && - test yes = "$hardcode_shlibpath_var"; then + if test "$hardcode_direct" != yes && + test "$hardcode_minus_L" != yes && + test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; @@ -8335,33 +6895,33 @@ fi fi - if test prog = "$linkmode" || test relink = "$opt_mode"; then + if test "$linkmode" = prog || test "$opt_mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. - if test yes = "$hardcode_direct" && - test no = "$hardcode_direct_absolute"; then - add=$libdir/$linklib - elif test yes = "$hardcode_minus_L"; then - add_dir=-L$libdir - add=-l$name - elif test yes = "$hardcode_shlibpath_var"; then + if test "$hardcode_direct" = yes && + test "$hardcode_direct_absolute" = no; then + add="$libdir/$linklib" + elif test "$hardcode_minus_L" = yes; then + add_dir="-L$libdir" + add="-l$name" + elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac - add=-l$name - elif test yes = "$hardcode_automatic"; then + 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 + test -f "$inst_prefix_dir$libdir/$linklib" ; then + add="$inst_prefix_dir$libdir/$linklib" else - add=$libdir/$linklib + add="$libdir/$linklib" fi else # We cannot seem to hardcode it, guess we'll fake it. - add_dir=-L$libdir + 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 @@ -8370,10 +6930,10 @@ ;; esac fi - add=-l$name + add="-l$name" fi - if test prog = "$linkmode"; then + if test "$linkmode" = prog; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else @@ -8381,43 +6941,43 @@ test -n "$add" && deplibs="$add $deplibs" fi fi - elif test prog = "$linkmode"; then + 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 unsupported != "$hardcode_direct"; then - test -n "$old_library" && linklib=$old_library + 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 yes = "$build_libtool_libs"; then + elif test "$build_libtool_libs" = yes; then # Not a shared library - if test pass_all != "$deplibs_check_method"; then + 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 cannot link to static lib archive $lib." + $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 yes = "$module"; then + 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 "*** 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." + echo "*** \`nm' from GNU binutils and a full rebuild may help." fi - if test no = "$build_old_libs"; then + if test "$build_old_libs" = no; then build_libtool_libs=module build_old_libs=yes else @@ -8430,11 +6990,11 @@ fi fi # link shared/static library? - if test lib = "$linkmode"; then + if test "$linkmode" = lib; then if test -n "$dependency_libs" && - { test yes != "$hardcode_into_libs" || - test yes = "$build_old_libs" || - test yes = "$link_static"; }; then + { 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 @@ -8448,12 +7008,12 @@ *) func_append temp_deplibs " $libdir";; esac done - dependency_libs=$temp_deplibs + dependency_libs="$temp_deplibs" fi func_append newlib_search_path " $absdir" # Link against this library - test no = "$link_static" && newdependency_libs="$abs_ladir/$laname $newdependency_libs" + test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do @@ -8463,7 +7023,7 @@ func_resolve_sysroot "$func_stripname_result";; *) func_resolve_sysroot "$deplib" ;; esac - if $opt_preserve_dup_deps; then + if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $func_resolve_sysroot_result "*) func_append specialdeplibs " $func_resolve_sysroot_result" ;; @@ -8472,12 +7032,12 @@ func_append tmp_libs " $func_resolve_sysroot_result" done - if test no != "$link_all_deplibs"; then + 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 ;; + -L*) path="$deplib" ;; *.la) func_resolve_sysroot "$deplib" deplib=$func_resolve_sysroot_result @@ -8485,12 +7045,12 @@ dir=$func_dirname_result # We need an absolute path. case $dir in - [\\/]* | [A-Za-z]:[\\/]*) absdir=$dir ;; + [\\/]* | [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 + func_warning "cannot determine absolute directory name of \`$dir'" + absdir="$dir" fi ;; esac @@ -8498,35 +7058,35 @@ 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 + 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 -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}}'` + darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi - func_append compiler_flags " $wl-dylib_file $wl$darwin_install_name:$depdepl" - func_append linker_flags " -dylib_file $darwin_install_name:$depdepl" + func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" + func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}" path= fi fi ;; *) - path=-L$absdir/$objdir + path="-L$absdir/$objdir" ;; esac else - eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ - func_fatal_error "'$deplib' is not a valid libtool archive" + func_fatal_error "\`$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ - func_warning "'$deplib' seems to be moved" + func_warning "\`$deplib' seems to be moved" - path=-L$absdir + path="-L$absdir" fi ;; esac @@ -8538,23 +7098,23 @@ fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs - if test link = "$pass"; then - if test prog = "$linkmode"; then + if test "$pass" = link; then + if test "$linkmode" = "prog"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi - dependency_libs=$newdependency_libs - if test dlpreopen = "$pass"; then + 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 dlopen != "$pass"; then - test conv = "$pass" || { + 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 @@ -8564,12 +7124,12 @@ esac done newlib_search_path= - } + fi - if test prog,link = "$linkmode,$pass"; then - vars="compile_deplibs finalize_deplibs" + if test "$linkmode,$pass" != "prog,link"; then + vars="deplibs" else - vars=deplibs + vars="compile_deplibs finalize_deplibs" fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order @@ -8627,93 +7187,62 @@ eval $var=\"$tmp_libs\" done # for var fi - - # Add Sun CC postdeps if required: - test CXX = "$tagname" && { - case $host_os in - linux*) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C++ 5.9 - func_suncc_cstd_abi - - if test no != "$suncc_use_cstd_abi"; then - func_append postdeps ' -library=Cstd -library=Crun' - fi - ;; - esac - ;; - - solaris*) - func_cc_basename "$CC" - case $func_cc_basename_result in - CC* | sunCC*) - func_suncc_cstd_abi - - if test no != "$suncc_use_cstd_abi"; then - func_append postdeps ' -library=Cstd -library=Crun' - fi - ;; - esac - ;; - esac - } - # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= - for i in $dependency_libs; do + for i in $dependency_libs ; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) - i= + i="" ;; esac - if test -n "$i"; then + if test -n "$i" ; then func_append tmp_libs " $i" fi done dependency_libs=$tmp_libs done # for pass - if test prog = "$linkmode"; then - dlfiles=$newdlfiles + if test "$linkmode" = prog; then + dlfiles="$newdlfiles" fi - if test prog = "$linkmode" || test lib = "$linkmode"; then - dlprefiles=$newdlprefiles + if test "$linkmode" = prog || test "$linkmode" = lib; then + dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) - if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then - func_warning "'-dlopen' is ignored for archives" + 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" ;; + func_warning "\`-l' and \`-L' are ignored for archives" ;; esac test -n "$rpath" && \ - func_warning "'-rpath' is ignored for archives" + func_warning "\`-rpath' is ignored for archives" test -n "$xrpath" && \ - func_warning "'-R' is ignored for archives" + func_warning "\`-R' is ignored for archives" test -n "$vinfo" && \ - func_warning "'-version-info/-version-number' is ignored for archives" + func_warning "\`-version-info/-version-number' is ignored for archives" test -n "$release" && \ - func_warning "'-release' is ignored for archives" + func_warning "\`-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ - func_warning "'-export-symbols' is ignored for archives" + func_warning "\`-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no - oldlibs=$output + oldlibs="$output" func_append objs "$old_deplibs" ;; lib) - # Make sure we only generate libraries of the form 'libNAME.la'. + # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" @@ -8722,10 +7251,10 @@ eval libname=\"$libname_spec\" ;; *) - test no = "$module" \ - && func_fatal_help "libtool library '$output' must begin with 'lib'" + test "$module" = no && \ + func_fatal_help "libtool library \`$output' must begin with \`lib'" - if test no != "$need_lib_prefix"; then + if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result @@ -8739,8 +7268,8 @@ esac if test -n "$objs"; then - if test pass_all != "$deplibs_check_method"; then - func_fatal_error "cannot build libtool library '$output' from non-libtool objects on this host:$objs" + 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" @@ -8749,21 +7278,21 @@ fi fi - test no = "$dlself" \ - || func_warning "'-dlopen self' is ignored for libtool libraries" + test "$dlself" != no && \ + func_warning "\`-dlopen self' is ignored for libtool libraries" set dummy $rpath shift - test 1 -lt "$#" \ - && func_warning "ignoring multiple '-rpath's for a libtool library" + test "$#" -gt 1 && \ + func_warning "ignoring multiple \`-rpath's for a libtool library" - install_libdir=$1 + install_libdir="$1" oldlibs= if test -z "$rpath"; then - if test yes = "$build_libtool_libs"; then + if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. - # Some compilers have problems with a '.al' extension so + # 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" @@ -8772,20 +7301,20 @@ fi test -n "$vinfo" && \ - func_warning "'-version-info/-version-number' is ignored for convenience libraries" + func_warning "\`-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ - func_warning "'-release' is ignored for convenience libraries" + func_warning "\`-release' is ignored for convenience libraries" else # Parse the version information argument. - save_ifs=$IFS; IFS=: + save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 shift - IFS=$save_ifs + IFS="$save_ifs" test -n "$7" && \ - func_fatal_help "too many parameters to '-version-info'" + func_fatal_help "too many parameters to \`-version-info'" # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts @@ -8793,42 +7322,45 @@ case $vinfo_number in yes) - number_major=$1 - number_minor=$2 - number_revision=$3 + 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 - # that has an extra 1 added just for fun + # which has an extra 1 added just for fun # case $version_type in # correct linux to gnu/linux during the next big refactor - darwin|freebsd-elf|linux|osf|windows|none) + darwin|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result - age=$number_minor - revision=$number_revision + age="$number_minor" + revision="$number_revision" ;; - freebsd-aout|qnx|sunos) - current=$number_major - revision=$number_minor - age=0 + freebsd-aout|freebsd-elf|qnx|sunos) + current="$number_major" + revision="$number_minor" + age="0" ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result - age=$number_minor - revision=$number_minor + 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 + current="$1" + revision="$2" + age="$3" ;; esac @@ -8836,30 +7368,30 @@ 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" + 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" + 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" + 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" + 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. @@ -8874,36 +7406,26 @@ # verstring for coding it into the library header func_arith $current - $age major=.$func_arith_result - versuffix=$major.$age.$revision + 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" + xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" - # On Darwin other compilers - case $CC in - nagfor*) - verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" - ;; - *) - verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" - ;; - esac ;; freebsd-aout) - major=.$current - versuffix=.$current.$revision + major=".$current" + versuffix=".$current.$revision"; ;; freebsd-elf) - func_arith $current - $age - major=.$func_arith_result - versuffix=$major.$age.$revision + major=".$current" + versuffix=".$current" ;; irix | nonstopux) - if test no = "$lt_irix_increment"; then + if test "X$lt_irix_increment" = "Xno"; then func_arith $current - $age else func_arith $current - $age + 1 @@ -8914,74 +7436,69 @@ nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac - verstring=$verstring_prefix$major.$revision + verstring="$verstring_prefix$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision - while test 0 -ne "$loop"; do + 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 + verstring="$verstring_prefix$major.$iface:$verstring" done - # Before this point, $major must not contain '.'. + # Before this point, $major must not contain `.'. major=.$major - versuffix=$major.$revision + versuffix="$major.$revision" ;; linux) # correct to gnu/linux during the next big refactor func_arith $current - $age major=.$func_arith_result - versuffix=$major.$age.$revision + versuffix="$major.$age.$revision" ;; osf) func_arith $current - $age major=.$func_arith_result - versuffix=.$current.$age.$revision - verstring=$current.$age.$revision + versuffix=".$current.$age.$revision" + verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age - while test 0 -ne "$loop"; do + 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 + verstring="$verstring:${iface}.0" done # Make executables depend on our current version. - func_append verstring ":$current.0" + func_append verstring ":${current}.0" ;; qnx) - major=.$current - versuffix=.$current - ;; - - sco) - major=.$current - versuffix=.$current + major=".$current" + versuffix=".$current" ;; sunos) - major=.$current - versuffix=.$current.$revision + major=".$current" + versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one - # extension on DOS 8.3 file systems. + # extension on DOS 8.3 filesystems. func_arith $current - $age major=$func_arith_result - versuffix=-$major + versuffix="-$major" ;; *) - func_fatal_configuration "unknown library version type '$version_type'" + func_fatal_configuration "unknown library version type \`$version_type'" ;; esac @@ -8995,45 +7512,42 @@ verstring= ;; *) - verstring=0.0 + verstring="0.0" ;; esac - if test no = "$need_version"; then + if test "$need_version" = no; then versuffix= else - versuffix=.0.0 + versuffix=".0.0" fi fi # Remove version info from name if versioning should be avoided - if test yes,no = "$avoid_version,$need_version"; then + if test "$avoid_version" = yes && test "$need_version" = no; then major= versuffix= - verstring= + verstring="" fi # Check to see if the archive will have undefined symbols. - if test yes = "$allow_undefined"; then - if test unsupported = "$allow_undefined_flag"; then - if test yes = "$build_old_libs"; then - func_warning "undefined symbols not allowed in $host shared libraries; building static only" - build_libtool_libs=no - else - func_fatal_error "can't build $host shared library unless -no-undefined is specified" - fi + 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 + allow_undefined_flag="$no_undefined_flag" fi fi - func_generate_dlsyms "$libname" "$libname" : + func_generate_dlsyms "$libname" "$libname" "yes" func_append libobjs " $symfileobj" - test " " = "$libobjs" && libobjs= + test "X$libobjs" = "X " && libobjs= - if test relink != "$opt_mode"; then + if test "$opt_mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= @@ -9042,8 +7556,8 @@ case $p in *.$objext | *.gcno) ;; - $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/$libname$release.*) - if test -n "$precious_files_regex"; then + $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 @@ -9059,11 +7573,11 @@ fi # Now set the variables for building old libraries. - if test yes = "$build_old_libs" && test convenience != "$build_libtool_libs"; then + if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then func_append oldlibs " $output_objdir/$libname.$libext" # Transform .lo files to .o files. - oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; $lo2o" | $NL2SP` + oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` fi # Eliminate all temporary directories. @@ -9084,13 +7598,13 @@ *) func_append finalize_rpath " $libdir" ;; esac done - if test yes != "$hardcode_into_libs" || test yes = "$build_old_libs"; then + 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 + old_dlfiles="$dlfiles" dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in @@ -9100,7 +7614,7 @@ done # Make sure dlprefiles contains only unique files - old_dlprefiles=$dlprefiles + old_dlprefiles="$dlprefiles" dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in @@ -9109,7 +7623,7 @@ esac done - if test yes = "$build_libtool_libs"; then + if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) @@ -9133,7 +7647,7 @@ ;; *) # Add libc to deplibs on all other systems if necessary. - if test yes = "$build_libtool_need_lc"; then + if test "$build_libtool_need_lc" = "yes"; then func_append deplibs " -lc" fi ;; @@ -9149,9 +7663,9 @@ # 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= + release="" + versuffix="" + major="" newdeplibs= droppeddeps=no case $deplibs_check_method in @@ -9180,20 +7694,20 @@ -l*) func_stripname -l '' "$i" name=$func_stripname_result - if test yes = "$allow_libtool_libs_with_static_runtimes"; then + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $i "*) func_append newdeplibs " $i" - i= + i="" ;; esac fi - if test -n "$i"; then + if test -n "$i" ; then libname=`eval "\\$ECHO \"$libname_spec\""` deplib_matches=`eval "\\$ECHO \"$library_names_spec\""` set dummy $deplib_matches; shift deplib_match=$1 - if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0; then + if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then func_append newdeplibs " $i" else droppeddeps=yes @@ -9223,20 +7737,20 @@ $opt_dry_run || $RM conftest if $LTCC $LTCFLAGS -o conftest conftest.c $i; then ldd_output=`ldd conftest` - if test yes = "$allow_libtool_libs_with_static_runtimes"; then + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $i "*) func_append newdeplibs " $i" - i= + i="" ;; esac fi - if test -n "$i"; then + if test -n "$i" ; then libname=`eval "\\$ECHO \"$libname_spec\""` deplib_matches=`eval "\\$ECHO \"$library_names_spec\""` set dummy $deplib_matches; shift deplib_match=$1 - if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0; then + if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then func_append newdeplibs " $i" else droppeddeps=yes @@ -9273,24 +7787,24 @@ -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result - if test yes = "$allow_libtool_libs_with_static_runtimes"; then + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) func_append newdeplibs " $a_deplib" - a_deplib= + a_deplib="" ;; esac fi - if test -n "$a_deplib"; then + if test -n "$a_deplib" ; then libname=`eval "\\$ECHO \"$libname_spec\""` if test -n "$file_magic_glob"; then libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob` else libnameglob=$libname fi - test yes = "$want_nocaseglob" && nocaseglob=`shopt -p nocaseglob` + test "$want_nocaseglob" = yes && nocaseglob=`shopt -p nocaseglob` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do - if test yes = "$want_nocaseglob"; then + if test "$want_nocaseglob" = yes; then shopt -s nocaseglob potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` $nocaseglob @@ -9308,25 +7822,25 @@ # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? - potlib=$potent_lib + potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do - potliblink=`ls -ld $potlib | $SED 's/.* -> //'` + potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in - [\\/]* | [A-Za-z]:[\\/]*) potlib=$potliblink;; - *) potlib=`$ECHO "$potlib" | $SED 's|[^/]*$||'`"$potliblink";; + [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; + *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then func_append newdeplibs " $a_deplib" - a_deplib= + a_deplib="" break 2 fi done done fi - if test -n "$a_deplib"; then + if test -n "$a_deplib" ; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." @@ -9334,7 +7848,7 @@ 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 + 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" @@ -9357,30 +7871,30 @@ -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result - if test yes = "$allow_libtool_libs_with_static_runtimes"; then + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) func_append newdeplibs " $a_deplib" - a_deplib= + a_deplib="" ;; esac fi - if test -n "$a_deplib"; then + 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 + potlib="$potent_lib" # see symlink-check above in file_magic test if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ $EGREP "$match_pattern_regex" > /dev/null; then func_append newdeplibs " $a_deplib" - a_deplib= + a_deplib="" break 2 fi done done fi - if test -n "$a_deplib"; then + if test -n "$a_deplib" ; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." @@ -9388,7 +7902,7 @@ 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 + 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" @@ -9404,18 +7918,18 @@ done # Gone through all deplibs. ;; none | unknown | *) - newdeplibs= + newdeplibs="" tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` - if test yes = "$allow_libtool_libs_with_static_runtimes"; then - for i in $predeps $postdeps; do + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + for i in $predeps $postdeps ; do # can't use Xsed below, because $i might contain '/' - tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s|$i||"` + tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"` done fi case $tmp_deplibs in *[!\ \ ]*) echo - if test none = "$deplibs_check_method"; then + 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." @@ -9439,8 +7953,8 @@ ;; esac - if test yes = "$droppeddeps"; then - if test yes = "$module"; then + 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" @@ -9449,12 +7963,12 @@ 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 "*** 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." + echo "*** \`nm' from GNU binutils and a full rebuild may help." fi - if test no = "$build_old_libs"; then - oldlibs=$output_objdir/$libname.$libext + if test "$build_old_libs" = no; then + oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else @@ -9465,14 +7979,14 @@ echo "*** automatically added whenever a program is linked with this library" echo "*** or is declared to -dlopen it." - if test no = "$allow_undefined"; then + 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 no = "$build_old_libs"; then - oldlibs=$output_objdir/$libname.$libext + if test "$build_old_libs" = no; then + oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else @@ -9518,7 +8032,7 @@ *) func_append new_libs " $deplib" ;; esac done - deplibs=$new_libs + deplibs="$new_libs" # All the library-specific variables (install_libdir is set above). library_names= @@ -9526,25 +8040,25 @@ dlname= # Test again, we may have decided not to build it any more - if test yes = "$build_libtool_libs"; then - # Remove $wl instances when linking with ld. + if test "$build_libtool_libs" = yes; then + # Remove ${wl} instances when linking with ld. # FIXME: should test the right _cmds variable. case $archive_cmds in *\$LD\ *) wl= ;; esac - if test yes = "$hardcode_into_libs"; then + if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= - rpath=$finalize_rpath - test relink = "$opt_mode" || rpath=$compile_rpath$rpath + rpath="$finalize_rpath" + test "$opt_mode" != relink && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then func_replace_sysroot "$libdir" libdir=$func_replace_sysroot_result if test -z "$hardcode_libdirs"; then - hardcode_libdirs=$libdir + hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in @@ -9569,7 +8083,7 @@ # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then - libdir=$hardcode_libdirs + libdir="$hardcode_libdirs" eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" fi if test -n "$runpath_var" && test -n "$perm_rpath"; then @@ -9583,8 +8097,8 @@ test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi - shlibpath=$finalize_shlibpath - test relink = "$opt_mode" || shlibpath=$compile_shlibpath$shlibpath + shlibpath="$finalize_shlibpath" + test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi @@ -9594,19 +8108,19 @@ eval library_names=\"$library_names_spec\" set dummy $library_names shift - realname=$1 + realname="$1" shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else - soname=$realname + soname="$realname" fi if test -z "$dlname"; then dlname=$soname fi - lib=$output_objdir/$realname + lib="$output_objdir/$realname" linknames= for link do @@ -9620,7 +8134,7 @@ 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 + export_symbols="$output_objdir/$libname.uexp" func_append delfiles " $export_symbols" fi @@ -9629,31 +8143,31 @@ cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile - func_dll_def_p "$export_symbols" || { + 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 + orig_export_symbols="$export_symbols" export_symbols= always_export_symbols=yes - } + fi fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then - if test yes = "$always_export_symbols" || test -n "$export_symbols_regex"; then - func_verbose "generating symbol list for '$libname.la'" - export_symbols=$output_objdir/$libname.exp + 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='~' + save_ifs="$IFS"; IFS='~' for cmd1 in $cmds; do - IFS=$save_ifs + IFS="$save_ifs" # Take the normal branch if the nm_file_list_spec branch # doesn't work or if tool conversion is not needed. case $nm_file_list_spec~$to_tool_file_cmd in @@ -9667,7 +8181,7 @@ try_normal_branch=no ;; esac - if test yes = "$try_normal_branch" \ + if test "$try_normal_branch" = yes \ && { test "$len" -lt "$max_cmd_len" \ || test "$max_cmd_len" -le -1; } then @@ -9678,7 +8192,7 @@ output_la=$func_basename_result save_libobjs=$libobjs save_output=$output - output=$output_objdir/$output_la.nm + output=${output_objdir}/${output_la}.nm func_to_tool_file "$output" libobjs=$nm_file_list_spec$func_to_tool_file_result func_append delfiles " $output" @@ -9701,8 +8215,8 @@ break fi done - IFS=$save_ifs - if test -n "$export_symbols_regex" && test : != "$skipped_export"; then + 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 @@ -9710,16 +8224,16 @@ fi if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols=$export_symbols - test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols + tmp_export_symbols="$export_symbols" + test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi - if test : != "$skipped_export" && test -n "$orig_export_symbols"; then + 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" + 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 + # '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. @@ -9738,11 +8252,11 @@ ;; esac done - deplibs=$tmp_deplibs + deplibs="$tmp_deplibs" if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && - test yes = "$compiler_needs_object" && + 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. @@ -9753,7 +8267,7 @@ eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else - gentop=$output_objdir/${outputname}x + gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $convenience @@ -9762,18 +8276,18 @@ fi fi - if test yes = "$thread_safe" && test -n "$thread_safe_flag_spec"; then + if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" func_append linker_flags " $flag" fi # Make a backup of the uninstalled library when relinking - if test relink = "$opt_mode"; then + if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. - if test yes = "$module" && test -n "$module_cmds"; then + 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 @@ -9791,7 +8305,7 @@ fi fi - if test : != "$skipped_export" && + 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 @@ -9824,8 +8338,8 @@ last_robj= k=1 - if test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then - output=$output_objdir/$output_la.lnkscript + 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 @@ -9837,14 +8351,14 @@ func_append delfiles " $output" func_to_tool_file "$output" output=$func_to_tool_file_result - elif test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then - output=$output_objdir/$output_la.lnk + 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 yes = "$compiler_needs_object"; then + if test "$compiler_needs_object" = yes; then firstobj="$1 " shift fi @@ -9859,7 +8373,7 @@ else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." - output=$output_objdir/$output_la-$k.$objext + output=$output_objdir/$output_la-${k}.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result @@ -9871,13 +8385,13 @@ func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result - if test -z "$objlist" || + 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 1 -eq "$k"; then + if test "$k" -eq 1 ; then # The first file doesn't have a previous command to add. reload_objs=$objlist eval concat_cmds=\"$reload_cmds\" @@ -9887,10 +8401,10 @@ reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" fi - last_robj=$output_objdir/$output_la-$k.$objext + last_robj=$output_objdir/$output_la-${k}.$objext func_arith $k + 1 k=$func_arith_result - output=$output_objdir/$output_la-$k.$objext + output=$output_objdir/$output_la-${k}.$objext objlist=" $obj" func_len " $last_robj" func_arith $len0 + $func_len_result @@ -9902,9 +8416,9 @@ # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ reload_objs="$objlist $last_robj" - eval concat_cmds=\"\$concat_cmds$reload_cmds\" + eval concat_cmds=\"\${concat_cmds}$reload_cmds\" if test -n "$last_robj"; then - eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" + eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" fi func_append delfiles " $output" @@ -9912,9 +8426,9 @@ output= fi - ${skipped_export-false} && { - func_verbose "generating symbol list for '$libname.la'" - export_symbols=$output_objdir/$libname.exp + 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. @@ -9923,16 +8437,16 @@ if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi - } + fi test -n "$save_libobjs" && func_verbose "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. - save_ifs=$IFS; IFS='~' + save_ifs="$IFS"; IFS='~' for cmd in $concat_cmds; do - IFS=$save_ifs - $opt_quiet || { + IFS="$save_ifs" + $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } @@ -9940,7 +8454,7 @@ lt_exit=$? # Restore the uninstalled library and exit - if test relink = "$opt_mode"; then + if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) @@ -9949,7 +8463,7 @@ exit $lt_exit } done - IFS=$save_ifs + IFS="$save_ifs" if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' @@ -9957,18 +8471,18 @@ fi fi - ${skipped_export-false} && { + 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 + tmp_export_symbols="$export_symbols" + test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. - func_verbose "filter symbol list for '$libname.la' to tag DATA exports" + 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 + # '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. @@ -9977,7 +8491,7 @@ export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi - } + fi libobjs=$output # Restore the value of output. @@ -9991,7 +8505,7 @@ # value of $libobjs for piecewise linking. # Do each of the archive commands. - if test yes = "$module" && test -n "$module_cmds"; then + 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 @@ -10013,7 +8527,7 @@ # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then - gentop=$output_objdir/${outputname}x + gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $dlprefiles @@ -10021,12 +8535,11 @@ test "X$libobjs" = "X " && libobjs= fi - save_ifs=$IFS; IFS='~' + save_ifs="$IFS"; IFS='~' for cmd in $cmds; do - IFS=$sp$nl + IFS="$save_ifs" eval cmd=\"$cmd\" - IFS=$save_ifs - $opt_quiet || { + $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } @@ -10034,7 +8547,7 @@ lt_exit=$? # Restore the uninstalled library and exit - if test relink = "$opt_mode"; then + if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) @@ -10043,10 +8556,10 @@ exit $lt_exit } done - IFS=$save_ifs + IFS="$save_ifs" # Restore the uninstalled library and exit - if test relink = "$opt_mode"; then + if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then @@ -10066,39 +8579,39 @@ done # If -module or -export-dynamic was specified, set the dlname. - if test yes = "$module" || test yes = "$export_dynamic"; then + if test "$module" = yes || test "$export_dynamic" = yes; then # On all known operating systems, these are identical. - dlname=$soname + dlname="$soname" fi fi ;; obj) - if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then - func_warning "'-dlopen' is ignored for objects" + 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" ;; + func_warning "\`-l' and \`-L' are ignored for objects" ;; esac test -n "$rpath" && \ - func_warning "'-rpath' is ignored for objects" + func_warning "\`-rpath' is ignored for objects" test -n "$xrpath" && \ - func_warning "'-R' is ignored for objects" + func_warning "\`-R' is ignored for objects" test -n "$vinfo" && \ - func_warning "'-version-info' is ignored for objects" + func_warning "\`-version-info' is ignored for objects" test -n "$release" && \ - func_warning "'-release' is ignored for objects" + 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" + func_fatal_error "cannot build library object \`$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" @@ -10106,7 +8619,7 @@ ;; *) libobj= - obj=$output + obj="$output" ;; esac @@ -10119,19 +8632,17 @@ # the extraction. reload_conv_objs= gentop= - # if reload_cmds runs $LD directly, get rid of -Wl from - # whole_archive_flag_spec and hope we can get by with turning comma - # into space. - case $reload_cmds in - *\$LD[\ \$]*) wl= ;; - esac + # 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\" - test -n "$wl" || tmp_whole_archive_flags=`$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` - reload_conv_objs=$reload_objs\ $tmp_whole_archive_flags + reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` else - gentop=$output_objdir/${obj}x + gentop="$output_objdir/${obj}x" func_append generated " $gentop" func_extract_archives $gentop $convenience @@ -10140,12 +8651,12 @@ fi # If we're not building shared, we need to use non_pic_objs - test yes = "$build_libtool_libs" || libobjs=$non_pic_objects + test "$build_libtool_libs" != yes && libobjs="$non_pic_objects" # Create the old-style object. - reload_objs=$objs$old_deplibs' '`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; /\.lib$/d; $lo2o" | $NL2SP`' '$reload_conv_objs + reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test - output=$obj + output="$obj" func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. @@ -10157,7 +8668,7 @@ exit $EXIT_SUCCESS fi - test yes = "$build_libtool_libs" || { + if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi @@ -10167,12 +8678,12 @@ # $show "echo timestamp > $libobj" # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS - } + fi - if test -n "$pic_flag" || test default != "$pic_mode"; then + 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 + output="$libobj" func_execute_cmds "$reload_cmds" 'exit $?' fi @@ -10189,14 +8700,16 @@ output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ - func_warning "'-version-info' is ignored for programs" + func_warning "\`-version-info' is ignored for programs" test -n "$release" && \ - func_warning "'-release' is ignored for programs" + func_warning "\`-release' is ignored for programs" - $preload \ - && test unknown,unknown,unknown = "$dlopen_support,$dlopen_self,$dlopen_self_static" \ - && func_warning "'LT_INIT([dlopen])' not used. Assuming no dlopen support." + test "$preload" = yes \ + && test "$dlopen_support" = unknown \ + && test "$dlopen_self" = unknown \ + && test "$dlopen_self_static" = unknown && \ + func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) @@ -10210,11 +8723,11 @@ *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). - if test CXX = "$tagname"; then + if test "$tagname" = CXX ; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) - func_append compile_command " $wl-bind_at_load" - func_append finalize_command " $wl-bind_at_load" + func_append compile_command " ${wl}-bind_at_load" + func_append finalize_command " ${wl}-bind_at_load" ;; esac fi @@ -10250,7 +8763,7 @@ *) func_append new_libs " $deplib" ;; esac done - compile_deplibs=$new_libs + compile_deplibs="$new_libs" func_append compile_command " $compile_deplibs" @@ -10274,7 +8787,7 @@ if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then - hardcode_libdirs=$libdir + hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in @@ -10297,7 +8810,7 @@ fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'` + testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; @@ -10314,10 +8827,10 @@ # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then - libdir=$hardcode_libdirs + libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi - compile_rpath=$rpath + compile_rpath="$rpath" rpath= hardcode_libdirs= @@ -10325,7 +8838,7 @@ if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then - hardcode_libdirs=$libdir + hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in @@ -10350,43 +8863,45 @@ # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then - libdir=$hardcode_libdirs + libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi - finalize_rpath=$rpath + finalize_rpath="$rpath" - if test -n "$libobjs" && test yes = "$build_old_libs"; then + if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` fi - func_generate_dlsyms "$outputname" "@PROGRAM@" false + func_generate_dlsyms "$outputname" "@PROGRAM@" "no" # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi - wrappers_required=: + wrappers_required=yes case $host in *cegcc* | *mingw32ce*) # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. - wrappers_required=false + wrappers_required=no ;; *cygwin* | *mingw* ) - test yes = "$build_libtool_libs" || wrappers_required=false + if test "$build_libtool_libs" != yes; then + wrappers_required=no + fi ;; *) - if test no = "$need_relink" || test yes != "$build_libtool_libs"; then - wrappers_required=false + if test "$need_relink" = no || test "$build_libtool_libs" != yes; then + wrappers_required=no fi ;; esac - $wrappers_required || { + if test "$wrappers_required" = no; then # Replace the output file specification. compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` - link_command=$compile_command$compile_rpath + link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. exit_status=0 @@ -10399,12 +8914,12 @@ fi # Delete the generated files. - if test -f "$output_objdir/${outputname}S.$objext"; then - func_show_eval '$RM "$output_objdir/${outputname}S.$objext"' + if test -f "$output_objdir/${outputname}S.${objext}"; then + func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' fi exit $exit_status - } + fi if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" @@ -10434,9 +8949,9 @@ fi fi - if test yes = "$no_install"; then + if test "$no_install" = yes; then # We don't need to create a wrapper script. - link_command=$compile_var$compile_command$compile_rpath + link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. @@ -10453,28 +8968,27 @@ exit $EXIT_SUCCESS fi - case $hardcode_action,$fast_install in - relink,*) - # Fast installation is not supported - link_command=$compile_var$compile_command$compile_rpath - relink_command=$finalize_var$finalize_command$finalize_rpath - - func_warning "this platform does not like uninstalled shared libraries" - func_warning "'$output' will be relinked during installation" - ;; - *,yes) - link_command=$finalize_var$compile_command$finalize_rpath - relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` - ;; - *,no) - link_command=$compile_var$compile_command$compile_rpath - relink_command=$finalize_var$finalize_command$finalize_rpath - ;; - *,needless) - link_command=$finalize_var$compile_command$finalize_rpath - relink_command= - ;; - esac + if test "$hardcode_action" = relink; then + # Fast installation is not supported + link_command="$compile_var$compile_command$compile_rpath" + relink_command="$finalize_var$finalize_command$finalize_rpath" + + func_warning "this platform does not like uninstalled shared libraries" + func_warning "\`$output' will be relinked during installation" + else + if test "$fast_install" != no; then + link_command="$finalize_var$compile_command$finalize_rpath" + if test "$fast_install" = yes; then + relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` + else + # fast_install is set to needless + relink_command= + fi + else + link_command="$compile_var$compile_command$compile_rpath" + relink_command="$finalize_var$finalize_command$finalize_rpath" + fi + fi # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` @@ -10531,8 +9045,8 @@ 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 + 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 @@ -10553,7 +9067,7 @@ 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 + if test "x$build" = "x$host" ; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result @@ -10576,27 +9090,25 @@ # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do - case $build_libtool_libs in - convenience) - oldobjs="$libobjs_save $symfileobj" - addlibs=$convenience - build_libtool_libs=no - ;; - module) - oldobjs=$libobjs_save - addlibs=$old_convenience + 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" - $preload && test -f "$symfileobj" \ - && func_append oldobjs " $symfileobj" - addlibs=$old_convenience - ;; - esac + if test "$preload" = yes && test -f "$symfileobj"; then + func_append oldobjs " $symfileobj" + fi + fi + addlibs="$old_convenience" + fi if test -n "$addlibs"; then - gentop=$output_objdir/${outputname}x + gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $addlibs @@ -10604,13 +9116,13 @@ fi # Do each command in the archive commands. - if test -n "$old_archive_from_new_cmds" && test yes = "$build_libtool_libs"; then + if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then - gentop=$output_objdir/${outputname}x + gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $dlprefiles @@ -10631,7 +9143,7 @@ : else echo "copying selected object files to avoid basename conflicts..." - gentop=$output_objdir/${outputname}x + gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs @@ -10640,7 +9152,7 @@ for obj in $save_oldobjs do func_basename "$obj" - objbase=$func_basename_result + objbase="$func_basename_result" case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) @@ -10709,18 +9221,18 @@ else # the above command should be used before it gets too long oldobjs=$objlist - if test "$obj" = "$last_oldobj"; then + 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\" + eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" objlist= len=$len0 fi done RANLIB=$save_RANLIB oldobjs=$objlist - if test -z "$oldobjs"; then + if test "X$oldobjs" = "X" ; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" @@ -10737,7 +9249,7 @@ case $output in *.la) old_library= - test yes = "$build_old_libs" && old_library=$libname.$libext + test "$build_old_libs" = yes && old_library="$libname.$libext" func_verbose "creating $output" # Preserve any variables that may affect compiler behavior @@ -10752,31 +9264,31 @@ 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="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` - if test yes = "$hardcode_automatic"; then + if test "$hardcode_automatic" = yes ; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do - if test yes = "$installed"; then + if test "$installed" = yes; then if test -z "$install_libdir"; then break fi - output=$output_objdir/${outputname}i + 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 + name="$func_basename_result" func_resolve_sysroot "$deplib" - eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` test -z "$libdir" && \ - func_fatal_error "'$deplib' is not a valid libtool archive" + func_fatal_error "\`$deplib' is not a valid libtool archive" func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" ;; -L*) @@ -10792,23 +9304,23 @@ *) func_append newdependency_libs " $deplib" ;; esac done - dependency_libs=$newdependency_libs + dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" - name=$func_basename_result - eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + name="$func_basename_result" + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ - func_fatal_error "'$lib' is not a valid libtool archive" + func_fatal_error "\`$lib' is not a valid libtool archive" func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" ;; *) func_append newdlfiles " $lib" ;; esac done - dlfiles=$newdlfiles + dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in @@ -10818,34 +9330,34 @@ # 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` + name="$func_basename_result" + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ - func_fatal_error "'$lib' is not a valid libtool archive" + func_fatal_error "\`$lib' is not a valid libtool archive" func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" ;; esac done - dlprefiles=$newdlprefiles + dlprefiles="$newdlprefiles" else newdlfiles= for lib in $dlfiles; do case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlfiles " $abs" done - dlfiles=$newdlfiles + dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlprefiles " $abs" done - dlprefiles=$newdlprefiles + dlprefiles="$newdlprefiles" fi $RM $output # place dlname in correct position for cygwin @@ -10861,9 +9373,10 @@ case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) # If a -bindir argument was supplied, place the dll there. - if test -n "$bindir"; then + if test "x$bindir" != x ; + then func_relative_path "$install_libdir" "$bindir" - tdlname=$func_relative_path_result/$dlname + tdlname=$func_relative_path_result$dlname else # Otherwise fall back on heuristic. tdlname=../bin/$dlname @@ -10872,7 +9385,7 @@ esac $ECHO > $output "\ # $outputname - a libtool library file -# Generated by $PROGRAM (GNU $PACKAGE) $VERSION +# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # Please DO NOT delete this file! # It is necessary for linking the library. @@ -10886,7 +9399,7 @@ # The name of the static archive. old_library='$old_library' -# Linker flags that cannot go in dependency_libs. +# Linker flags that can not go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. @@ -10912,7 +9425,7 @@ # Directory that this library needs to be installed in: libdir='$install_libdir'" - if test no,yes = "$installed,$need_relink"; then + if test "$installed" = no && test "$need_relink" = yes; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi @@ -10927,29 +9440,27 @@ exit $EXIT_SUCCESS } -if test link = "$opt_mode" || test relink = "$opt_mode"; then - func_mode_link ${1+"$@"} -fi +{ test "$opt_mode" = link || test "$opt_mode" = relink; } && + func_mode_link ${1+"$@"} # func_mode_uninstall arg... func_mode_uninstall () { - $debug_cmd - - RM=$nonopt + $opt_debug + RM="$nonopt" files= - rmforce=false + rmforce= exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. - libtool_install_magic=$magic + libtool_install_magic="$magic" for arg do case $arg in - -f) func_append RM " $arg"; rmforce=: ;; + -f) func_append RM " $arg"; rmforce=yes ;; -*) func_append RM " $arg" ;; *) func_append files " $arg" ;; esac @@ -10962,18 +9473,18 @@ for file in $files; do func_dirname "$file" "" "." - dir=$func_dirname_result - if test . = "$dir"; then - odir=$objdir + dir="$func_dirname_result" + if test "X$dir" = X.; then + odir="$objdir" else - odir=$dir/$objdir + odir="$dir/$objdir" fi func_basename "$file" - name=$func_basename_result - test uninstall = "$opt_mode" && odir=$dir + name="$func_basename_result" + test "$opt_mode" = uninstall && odir="$dir" # Remember odir for removal later, being careful to avoid duplicates - if test clean = "$opt_mode"; then + if test "$opt_mode" = clean; then case " $rmdirs " in *" $odir "*) ;; *) func_append rmdirs " $odir" ;; @@ -10988,11 +9499,11 @@ elif test -d "$file"; then exit_status=1 continue - elif $rmforce; then + elif test "$rmforce" = yes; then continue fi - rmfiles=$file + rmfiles="$file" case $name in *.la) @@ -11006,7 +9517,7 @@ done test -n "$old_library" && func_append rmfiles " $odir/$old_library" - case $opt_mode in + case "$opt_mode" in clean) case " $library_names " in *" $dlname "*) ;; @@ -11017,12 +9528,12 @@ uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. - func_execute_cmds "$postuninstall_cmds" '$rmforce || exit_status=1' + func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. - func_execute_cmds "$old_postuninstall_cmds" '$rmforce || exit_status=1' + func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; @@ -11038,19 +9549,21 @@ func_source $dir/$name # Add PIC object to the list of files to remove. - if test -n "$pic_object" && test none != "$pic_object"; then + if test -n "$pic_object" && + test "$pic_object" != none; then func_append rmfiles " $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. - if test -n "$non_pic_object" && test none != "$non_pic_object"; then + if test -n "$non_pic_object" && + test "$non_pic_object" != none; then func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) - if test clean = "$opt_mode"; then + if test "$opt_mode" = clean ; then noexename=$name case $file in *.exe) @@ -11077,12 +9590,12 @@ # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles - func_append rmfiles " $odir/$name $odir/${name}S.$objext" - if test yes = "$fast_install" && test -n "$relink_command"; then + func_append rmfiles " $odir/$name $odir/${name}S.${objext}" + if test "$fast_install" = yes && test -n "$relink_command"; then func_append rmfiles " $odir/lt-$name" fi - if test "X$noexename" != "X$name"; then - func_append rmfiles " $odir/lt-$noexename.c" + if test "X$noexename" != "X$name" ; then + func_append rmfiles " $odir/lt-${noexename}.c" fi fi fi @@ -11091,7 +9604,7 @@ func_show_eval "$RM $rmfiles" 'exit_status=1' done - # Try to remove the $objdir's in the directories where we deleted files + # 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" @@ -11101,17 +9614,16 @@ exit $exit_status } -if test uninstall = "$opt_mode" || test clean = "$opt_mode"; then - func_mode_uninstall ${1+"$@"} -fi +{ test "$opt_mode" = uninstall || test "$opt_mode" = clean; } && + func_mode_uninstall ${1+"$@"} test -z "$opt_mode" && { - help=$generic_help + help="$generic_help" func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ - func_fatal_help "invalid operation mode '$opt_mode'" + func_fatal_help "invalid operation mode \`$opt_mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" @@ -11122,7 +9634,7 @@ # The TAGs below are defined such that we never get into a situation -# where we disable both kinds of libraries. Given conflicting +# in which we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support @@ -11145,3 +9657,5 @@ # mode:shell-script # sh-indentation:2 # End: +# vi:sw=2 + diff -Nru xserver-xorg-video-openchrome-0.5.0/Makefile.in xserver-xorg-video-openchrome-0.6.0/Makefile.in --- xserver-xorg-video-openchrome-0.5.0/Makefile.in 2016-07-06 16:22:04.000000000 +0000 +++ xserver-xorg-video-openchrome-0.6.0/Makefile.in 2017-03-07 11:19:04.000000000 +0000 @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2014 Free Software Foundation, Inc. - +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -34,61 +35,6 @@ # 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@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -108,79 +54,38 @@ build_triplet = @build@ host_triplet = @host@ subdir = . +DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(srcdir)/config.h.in \ + $(top_srcdir)/configure COPYING ChangeLog NEWS config.guess \ + config.sub depcomp install-sh ltmain.sh missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ - $(am__configure_deps) $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = -AM_V_P = $(am__v_P_@AM_V@) -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -am__v_at_1 = SOURCES = DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ - ctags-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 \ - tags-recursive uninstall-recursive -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac +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 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive -am__recursive_targets = \ - $(RECURSIVE_TARGETS) \ - $(RECURSIVE_CLEAN_TARGETS) \ - $(am__extra_recursive_targets) -AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ - cscope distdir dist dist-all distcheck -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ - $(LISP)config.h.in -# Read a list of newline-separated strings from the standard input, -# and print each of them once, without duplicates. Input order is -# *not* preserved. -am__uniquify_input = $(AWK) '\ - BEGIN { nonempty = 0; } \ - { items[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in items) print i; }; } \ -' -# Make sure the list of sources is unique. This is necessary because, -# e.g., the same source file might be shared among _SOURCES variables -# for different programs/libraries. -am__define_uniq_tagged_files = \ - list='$(am__tagged_files)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | $(am__uniquify_input)` +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir dist dist-all distcheck ETAGS = etags CTAGS = ctags -CSCOPE = cscope DIST_SUBDIRS = $(SUBDIRS) -am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in COPYING \ - ChangeLog NEWS README compile config.guess config.sub \ - install-sh ltmain.sh missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) @@ -190,7 +95,6 @@ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi -am__post_remove_distdir = $(am__remove_distdir) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ @@ -218,7 +122,6 @@ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 GZIP_ENV = --best -DIST_TARGETS = dist-bzip2 dist-gzip distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' @@ -227,7 +130,6 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ @@ -277,7 +179,6 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ @@ -392,6 +293,7 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile +.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -412,8 +314,8 @@ $(am__aclocal_m4_deps): config.h: stamp-h1 - @test -f $@ || rm -f stamp-h1 - @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 + @if test ! -f $@; then rm -f stamp-h1; else :; fi + @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 @@ -436,25 +338,22 @@ -rm -f libtool config.lt # 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. -$(am__recursive_targets): - @fail=; \ - if $(am__make_keepgoing); then \ - failcom='fail=yes'; \ - else \ - failcom='exit 1'; \ - fi; \ +# 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//`; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - for subdir in $$list; do \ + list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ @@ -469,12 +368,57 @@ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -ID: $(am__tagged_files) - $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-recursive -TAGS: tags +$(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-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) +TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ @@ -490,7 +434,12 @@ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ - $(am__define_uniq_tagged_files); \ + 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; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -502,11 +451,15 @@ $$unique; \ fi; \ fi -ctags: ctags-recursive - -CTAGS: ctags -ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - $(am__define_uniq_tagged_files); \ +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + 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" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -515,31 +468,9 @@ here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" -cscope: cscope.files - test ! -s cscope.files \ - || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) -clean-cscope: - -rm -f cscope.files -cscope.files: clean-cscope cscopelist -cscopelist: cscopelist-recursive - -cscopelist-am: $(am__tagged_files) - list='$(am__tagged_files)'; \ - case "$(srcdir)" in \ - [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ - *) sdir=$(subdir)/$(srcdir) ;; \ - esac; \ - for i in $$list; do \ - if test -f "$$i"; then \ - echo "$(subdir)/$$i"; \ - else \ - echo "$$sdir/$$i"; \ - fi; \ - done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(DISTFILES) $(am__remove_distdir) @@ -575,10 +506,13 @@ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - $(am__make_dryrun) \ - || test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ + 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; \ @@ -610,41 +544,40 @@ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__post_remove_distdir) + $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 - $(am__post_remove_distdir) + $(am__remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz - $(am__post_remove_distdir) + $(am__remove_distdir) + +dist-lzma: distdir + tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma + $(am__remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz - $(am__post_remove_distdir) + $(am__remove_distdir) dist-tarZ: distdir - @echo WARNING: "Support for distribution archives compressed with" \ - "legacy program 'compress' is deprecated." >&2 - @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z - $(am__post_remove_distdir) + $(am__remove_distdir) dist-shar: distdir - @echo WARNING: "Support for shar distribution archives is" \ - "deprecated." >&2 - @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz - $(am__post_remove_distdir) + $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) - $(am__post_remove_distdir) + $(am__remove_distdir) -dist dist-all: - $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' - $(am__post_remove_distdir) +dist dist-all: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 + $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another @@ -655,6 +588,8 @@ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.lzma*) \ + lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ @@ -666,19 +601,18 @@ *.zip*) \ unzip $(distdir).zip ;;\ esac - chmod -R a-w $(distdir) - chmod u+w $(distdir) - mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst + chmod -R a-w $(distdir); chmod a+w $(distdir) + mkdir $(distdir)/_build + mkdir $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ - && $(am__cd) $(distdir)/_build/sub \ - && ../../configure \ + && $(am__cd) $(distdir)/_build \ + && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ - --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ @@ -701,7 +635,7 @@ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 - $(am__post_remove_distdir) + $(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' @@ -836,26 +770,25 @@ uninstall-am: -.MAKE: $(am__recursive_targets) all install-am install-strip - -.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ - am--refresh check check-am clean clean-cscope clean-generic \ - clean-libtool cscope cscopelist-am ctags ctags-am dist \ - dist-all dist-bzip2 dist-gzip dist-hook dist-lzip dist-shar \ - dist-tarZ dist-xz dist-zip distcheck distclean \ - distclean-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-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-am uninstall uninstall-am +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ + ctags-recursive install-am install-strip tags-recursive -.PRECIOUS: Makefile +.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-hook dist-lzip 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-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 ChangeLog: diff -Nru xserver-xorg-video-openchrome-0.5.0/man/Makefile.in xserver-xorg-video-openchrome-0.6.0/man/Makefile.in --- xserver-xorg-video-openchrome-0.5.0/man/Makefile.in 2016-07-06 16:22:04.000000000 +0000 +++ xserver-xorg-video-openchrome-0.6.0/man/Makefile.in 2017-03-07 11:19:02.000000000 +0000 @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2014 Free Software Foundation, Inc. - +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -42,61 +43,6 @@ # VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -116,35 +62,18 @@ build_triplet = @build@ host_triplet = @host@ subdir = man +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = -AM_V_P = $(am__v_P_@AM_V@) -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -am__v_at_1 = SOURCES = DIST_SOURCES = -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -174,14 +103,11 @@ } am__installdirs = "$(DESTDIR)$(drivermandir)" DATA = $(driverman_DATA) -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ @@ -231,7 +157,6 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ @@ -361,6 +286,7 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign man/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign man/Makefile +.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -386,11 +312,8 @@ -rm -rf .libs _libs install-drivermanDATA: $(driverman_DATA) @$(NORMAL_INSTALL) + test -z "$(drivermandir)" || $(MKDIR_P) "$(DESTDIR)$(drivermandir)" @list='$(driverman_DATA)'; test -n "$(drivermandir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(drivermandir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(drivermandir)" || exit 1; \ - fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -405,11 +328,11 @@ @list='$(driverman_DATA)'; test -n "$(drivermandir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(drivermandir)'; $(am__uninstall_files_from_dir) -tags TAGS: - -ctags CTAGS: +tags: TAGS +TAGS: -cscope cscopelist: +ctags: CTAGS +CTAGS: distdir: $(DISTFILES) @@ -549,19 +472,16 @@ .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ - cscopelist-am ctags-am distclean distclean-generic \ - distclean-libtool distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am \ - install-drivermanDATA 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-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ - uninstall-am uninstall-drivermanDATA - -.PRECIOUS: Makefile + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-drivermanDATA 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-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + uninstall uninstall-am uninstall-drivermanDATA .man.$(DRIVER_MAN_SUFFIX): diff -Nru xserver-xorg-video-openchrome-0.5.0/missing xserver-xorg-video-openchrome-0.6.0/missing --- xserver-xorg-video-openchrome-0.5.0/missing 2016-07-06 16:22:04.000000000 +0000 +++ xserver-xorg-video-openchrome-0.6.0/missing 2017-03-07 11:19:02.000000000 +0000 @@ -1,10 +1,11 @@ #! /bin/sh -# Common wrapper for a few potentially missing GNU programs. +# Common stub for a few missing GNU programs while installing. -scriptversion=2013-10-28.13; # UTC +scriptversion=2012-01-06.13; # UTC -# Copyright (C) 1996-2014 Free Software Foundation, Inc. -# Originally written by Fran,cois Pinard , 1996. +# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, +# 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. +# Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -25,40 +26,68 @@ # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then - echo 1>&2 "Try '$0 --help' for more information" + echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi -case $1 in +run=: +sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' +sed_minuso='s/.* -o \([^ ]*\).*/\1/p' + +# In the cases where this matters, `missing' is being run in the +# srcdir already. +if test -f configure.ac; then + configure_ac=configure.ac +else + configure_ac=configure.in +fi - --is-lightweight) - # Used by our autoconf macros to check whether the available missing - # script is modern enough. - exit 0 - ;; +msg="missing on your system" - --run) - # Back-compat with the calling convention used by older automake. - shift - ;; +case $1 in +--run) + # Try to run requested program, and just exit if it succeeds. + run= + shift + "$@" && exit 0 + # Exit code 63 means version mismatch. This often happens + # when the user try to use an ancient version of a tool on + # a file that requires a minimum version. In this case we + # we should proceed has if the program had been absent, or + # if --run hadn't been passed. + if test $? = 63; then + run=: + msg="probably too old" + fi + ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... -Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due -to PROGRAM being missing or too old. +Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an +error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit + --run try to run the given command, and emulate it if it fails Supported PROGRAM values: - aclocal autoconf autoheader autom4te automake makeinfo - bison yacc flex lex help2man + aclocal touch file \`aclocal.m4' + autoconf touch file \`configure' + autoheader touch file \`config.h.in' + autom4te touch the output file, or create a stub one + automake touch all \`Makefile.in' files + bison create \`y.tab.[ch]', if possible, from existing .[ch] + flex create \`lex.yy.c', if possible, from existing .c + help2man touch the output file + lex create \`lex.yy.c', if possible, from existing .c + makeinfo touch the output file + yacc create \`y.tab.[ch]', if possible, from existing .[ch] -Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and -'g' are ignored when checking the name. +Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and +\`g' are ignored when checking the name. Send bug reports to ." exit $? @@ -70,141 +99,228 @@ ;; -*) - echo 1>&2 "$0: unknown '$1' option" - echo 1>&2 "Try '$0 --help' for more information" + echo 1>&2 "$0: Unknown \`$1' option" + echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac -# Run the given program, remember its exit status. -"$@"; st=$? +# normalize program name to check for. +program=`echo "$1" | sed ' + s/^gnu-//; t + s/^gnu//; t + s/^g//; t'` + +# Now exit if we have it, but it failed. Also exit now if we +# don't have it and --version was passed (most likely to detect +# the program). This is about non-GNU programs, so use $1 not +# $program. +case $1 in + lex*|yacc*) + # Not GNU programs, they don't have --version. + ;; -# If it succeeded, we are done. -test $st -eq 0 && exit 0 + *) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + elif test "x$2" = "x--version" || test "x$2" = "x--help"; then + # Could not run --version or --help. This is probably someone + # running `$TOOL --version' or `$TOOL --help' to check whether + # $TOOL exists and not knowing $TOOL uses missing. + exit 1 + fi + ;; +esac -# Also exit now if we it failed (or wasn't found), and '--version' was -# passed; such an option is passed most likely to detect whether the -# program is present and works. -case $2 in --version|--help) exit $st;; esac - -# Exit code 63 means version mismatch. This often happens when the user -# tries to use an ancient version of a tool on a file that requires a -# minimum version. -if test $st -eq 63; then - msg="probably too old" -elif test $st -eq 127; then - # Program was missing. - msg="missing on your system" -else - # Program was found and executed, but failed. Give up. - exit $st -fi +# If it does not exist, or fails to run (possibly an outdated version), +# try to emulate it. +case $program in + aclocal*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`acinclude.m4' or \`${configure_ac}'. You might want + to install the \`Automake' and \`Perl' packages. Grab them from + any GNU archive site." + touch aclocal.m4 + ;; + + autoconf*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`${configure_ac}'. You might want to install the + \`Autoconf' and \`GNU m4' packages. Grab them from any GNU + archive site." + touch configure + ;; + + autoheader*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`acconfig.h' or \`${configure_ac}'. You might want + to install the \`Autoconf' and \`GNU m4' packages. Grab them + from any GNU archive site." + files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` + test -z "$files" && files="config.h" + touch_files= + for f in $files; do + case $f in + *:*) touch_files="$touch_files "`echo "$f" | + sed -e 's/^[^:]*://' -e 's/:.*//'`;; + *) touch_files="$touch_files $f.in";; + esac + done + touch $touch_files + ;; + + automake*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. + You might want to install the \`Automake' and \`Perl' packages. + Grab them from any GNU archive site." + find . -type f -name Makefile.am -print | + sed 's/\.am$/.in/' | + while read f; do touch "$f"; done + ;; + + autom4te*) + echo 1>&2 "\ +WARNING: \`$1' is needed, but is $msg. + You might have modified some files without having the + proper tools for further handling them. + You can get \`$1' as part of \`Autoconf' from any GNU + archive site." + + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -f "$file"; then + touch $file + else + test -z "$file" || exec >$file + echo "#! /bin/sh" + echo "# Created by GNU Automake missing as a replacement of" + echo "# $ $@" + echo "exit 0" + chmod +x $file + exit 1 + fi + ;; + + bison*|yacc*) + echo 1>&2 "\ +WARNING: \`$1' $msg. You should only need it if + you modified a \`.y' file. You may need the \`Bison' package + in order for those modifications to take effect. You can get + \`Bison' from any GNU archive site." + rm -f y.tab.c y.tab.h + if test $# -ne 1; then + eval LASTARG=\${$#} + case $LASTARG in + *.y) + SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` + if test -f "$SRCFILE"; then + cp "$SRCFILE" y.tab.c + fi + SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` + if test -f "$SRCFILE"; then + cp "$SRCFILE" y.tab.h + fi + ;; + esac + fi + if test ! -f y.tab.h; then + echo >y.tab.h + fi + if test ! -f y.tab.c; then + echo 'main() { return 0; }' >y.tab.c + fi + ;; + + lex*|flex*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a \`.l' file. You may need the \`Flex' package + in order for those modifications to take effect. You can get + \`Flex' from any GNU archive site." + rm -f lex.yy.c + if test $# -ne 1; then + eval LASTARG=\${$#} + case $LASTARG in + *.l) + SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` + if test -f "$SRCFILE"; then + cp "$SRCFILE" lex.yy.c + fi + ;; + esac + fi + if test ! -f lex.yy.c; then + echo 'main() { return 0; }' >lex.yy.c + fi + ;; + + help2man*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a dependency of a manual page. You may need the + \`Help2man' package in order for those modifications to take + effect. You can get \`Help2man' from any GNU archive site." + + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -f "$file"; then + touch $file + else + test -z "$file" || exec >$file + echo ".ab help2man is required to generate this page" + exit $? + fi + ;; + + makeinfo*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a \`.texi' or \`.texinfo' file, or any other file + indirectly affecting the aspect of the manual. The spurious + call might also be the consequence of using a buggy \`make' (AIX, + DU, IRIX). You might want to install the \`Texinfo' package or + the \`GNU make' package. Grab either from any GNU archive site." + # The file to touch is that specified with -o ... + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -z "$file"; then + # ... or it is the one specified with @setfilename ... + infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` + file=`sed -n ' + /^@setfilename/{ + s/.* \([^ ]*\) *$/\1/ + p + q + }' $infile` + # ... or it is derived from the source name (dir/f.texi becomes f.info) + test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info + fi + # If the file does not exist, the user really needs makeinfo; + # let's fail without touching anything. + test -f $file || exit 1 + touch $file + ;; + + *) + echo 1>&2 "\ +WARNING: \`$1' is needed, and is $msg. + You might have modified some files without having the + proper tools for further handling them. Check the \`README' file, + it often tells you about the needed prerequisites for installing + this package. You may also peek at any GNU archive site, in case + some other package would contain this missing \`$1' program." + exit 1 + ;; +esac -perl_URL=http://www.perl.org/ -flex_URL=http://flex.sourceforge.net/ -gnu_software_URL=http://www.gnu.org/software - -program_details () -{ - case $1 in - aclocal|automake) - echo "The '$1' program is part of the GNU Automake package:" - echo "<$gnu_software_URL/automake>" - echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" - echo "<$gnu_software_URL/autoconf>" - echo "<$gnu_software_URL/m4/>" - echo "<$perl_URL>" - ;; - autoconf|autom4te|autoheader) - echo "The '$1' program is part of the GNU Autoconf package:" - echo "<$gnu_software_URL/autoconf/>" - echo "It also requires GNU m4 and Perl in order to run:" - echo "<$gnu_software_URL/m4/>" - echo "<$perl_URL>" - ;; - esac -} - -give_advice () -{ - # Normalize program name to check for. - normalized_program=`echo "$1" | sed ' - s/^gnu-//; t - s/^gnu//; t - s/^g//; t'` - - printf '%s\n' "'$1' is $msg." - - configure_deps="'configure.ac' or m4 files included by 'configure.ac'" - case $normalized_program in - autoconf*) - echo "You should only need it if you modified 'configure.ac'," - echo "or m4 files included by it." - program_details 'autoconf' - ;; - autoheader*) - echo "You should only need it if you modified 'acconfig.h' or" - echo "$configure_deps." - program_details 'autoheader' - ;; - automake*) - echo "You should only need it if you modified 'Makefile.am' or" - echo "$configure_deps." - program_details 'automake' - ;; - aclocal*) - echo "You should only need it if you modified 'acinclude.m4' or" - echo "$configure_deps." - program_details 'aclocal' - ;; - autom4te*) - echo "You might have modified some maintainer files that require" - echo "the 'autom4te' program to be rebuilt." - program_details 'autom4te' - ;; - bison*|yacc*) - echo "You should only need it if you modified a '.y' file." - echo "You may want to install the GNU Bison package:" - echo "<$gnu_software_URL/bison/>" - ;; - lex*|flex*) - echo "You should only need it if you modified a '.l' file." - echo "You may want to install the Fast Lexical Analyzer package:" - echo "<$flex_URL>" - ;; - help2man*) - echo "You should only need it if you modified a dependency" \ - "of a man page." - echo "You may want to install the GNU Help2man package:" - echo "<$gnu_software_URL/help2man/>" - ;; - makeinfo*) - echo "You should only need it if you modified a '.texi' file, or" - echo "any other file indirectly affecting the aspect of the manual." - echo "You might want to install the Texinfo package:" - echo "<$gnu_software_URL/texinfo/>" - echo "The spurious makeinfo call might also be the consequence of" - echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" - echo "want to install GNU make:" - echo "<$gnu_software_URL/make/>" - ;; - *) - echo "You might have modified some files without having the proper" - echo "tools for further handling them. Check the 'README' file, it" - echo "often tells you about the needed prerequisites for installing" - echo "this package. You may also peek at any GNU archive site, in" - echo "case some other package contains this missing '$1' program." - ;; - esac -} - -give_advice "$1" | sed -e '1s/^/WARNING: /' \ - -e '2,$s/^/ /' >&2 - -# Propagate the correct exit status (expected to be 127 for a program -# not found, 63 for a program that failed due to version mismatch). -exit $st +exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) diff -Nru xserver-xorg-video-openchrome-0.5.0/NEWS xserver-xorg-video-openchrome-0.6.0/NEWS --- xserver-xorg-video-openchrome-0.5.0/NEWS 2016-07-06 16:21:06.000000000 +0000 +++ xserver-xorg-video-openchrome-0.6.0/NEWS 2017-03-07 08:56:28.000000000 +0000 @@ -1,3 +1,37 @@ +OpenChrome DDX Version 0.6 (March 7th, 2017) +-------------------------------------------- + +OpenChrome DDX Version 0.6 is an improved version of OpenChrome DDX +Version 0.5 with a number of improvements made to the code. OpenChrome +DDX Version 0.6 is written in a way to completely replace Version +0.2.904 through 0.5. + +OpenChrome DDX Version 0.6 has added the following new features. + +- First official support for CX700, VX700, and VX800 chipsets + integrated TMDS transmitter (i.e., DVI support) +- Initial support for Silicon Image SiI 164 TMDS transmitter + + +OpenChrome DDX Version 0.6 has the following improvements. + +- Improved FP reinitialization when resuming from standby + (HP 2133 Mini-Note, FIC CE260 / CE261 based netbooks like + Everex CloudBook and Sylvania g netbook) +- Improved automatic detection of display resources +- Improved X Server stability in dual monitor mode +- Automatic active steering of the display controller channel to the + correct display output device + + +OpenChrome DDX Version 0.6 fixes the following bugs. + +- Fix for the disruption of the VT (Virtual Terminal) screen bug + introduced in Version 0.5 +- Fix for HP 2133 Mini-Note's PCIe WLAN getting turned off + inadvertently bug introduced in Version 0.5 + + OpenChrome Version 0.5 (July 6th, 2016) --------------------------------------- diff -Nru xserver-xorg-video-openchrome-0.5.0/README xserver-xorg-video-openchrome-0.6.0/README --- xserver-xorg-video-openchrome-0.5.0/README 2016-07-06 16:21:06.000000000 +0000 +++ xserver-xorg-video-openchrome-0.6.0/README 2017-03-07 08:56:28.000000000 +0000 @@ -1,9 +1,10 @@ -OpenChrome Version 0.5 Release Note (July 6th, 2016) ----------------------------------------------------- +OpenChrome DDX Version 0.6 Release Note (March 7th, 2017) +--------------------------------------------------------- -OpenChrome is an open source implementation of X.Org Server +OpenChrome DDX is an open source implementation of X.Org Server DDX (Device Dependent X) graphics device driver for VIA Technologies UniChrome and Chrome9 IGPs. (Integrated Graphics Processor) +OpenChrome DDX handles only 2D and video acceleration. Please note that OpenChrome does not support VIA Technologies IGPs that are related to Trident Microsystems (i.e., Apollo MVP4, PLE133, and KLE133) or S3 Graphics (i.e., KM266). Here is the project home @@ -19,7 +20,7 @@ ------------------ - CLE266 -- KM400 / KM400A / KN400 / P4M800 +- KM400(A) / KN400(A) / P4M800 - K8M800 / K8N800 - PM800 / PN800 / PM880 / CN333 / CN400 - P4M800 Pro / VN800 / CN700 @@ -37,40 +38,44 @@ ------------------ - VGA -- DVI from an integrated TMDS transmitter (CX700, VX700, and - VX900 chipsets) -- DVI from VIA Technologies VT1632A TMDS transmitter -- LVDS flat panel (i.e., laptop LCD flat panel) +- DVI from an integrated TMDS transmitter (CX700, VX700, and VX800 + chipsets) +- DVI from Silicon Image SiI 164 and VIA Technologies VT1632(A) TMDS + transmitters +- Flat Panel - EXA acceleration (RENDER acceleration) - Xv and XvMC -- Multiple display output (i.e., RandR) +- Dual monitor support Unproven Features ----------------- -- Standby (ACPI S1 and S3 State) resume +- Standby resume - TV out -- KMS support (Kernel Mode Setting; requires the use of VIA - Technologies IGP DRM module supporting KMS. See "Where to Obtain - OpenChrome Source Code" chapter for more details.) +- KMS support + (Kernel Mode Setting; requires the use of still in + development KMS supporting OpenChrome DRM. See "Where to Obtain + OpenChrome Source Code" section for more details.) Unimplemented Features ---------------------- -- Hardware cursor support for CLE266, KM400, KM400A, KN400, and +- Hardware cursor support for CLE266, KM400(A) / KN400(A), and P4M800 chipsets -- DVI via Silicon Image SiI 164 TMDS transmitter or Chrontel TMDS - transmitter +- DVI via Chrontel TMDS transmitter - LVDS via VT1631 / VT1636 LVDS transmitter -- External HDMI transmitter (i.e., Jetway J7F5M-VHE-LF motherboard, - VIA Embedded EPIA-P720 motherboard, etc.) -- DisplayPort and HDMI support for VX900 chipset (Might work with - the experimental DRM module that supports KMS. See "Where to Obtain - OpenChrome Source Code" chapter for more details.) +- External HDMI transmitter + (i.e., Jetway J7F5M-VHE-LF motherboard, VIA Embedded EPIA-P720 + motherboard, etc.) +- HDMI support for VX900 chipset + (HDMI is supported via still in development KMS supporting + OpenChrome DRM. See "Where to Obtain OpenChrome Source Code" + section for more details.) +- DisplayPort support for VX900 chipset @@ -79,26 +84,45 @@ - X.Org Server Version 1.7 or later (It might not work correctly if it is compiled against an older - X.Org Server.) + X.Org Server.) - Linux Version 2.6.32 or later (Note: For Linux Version 4.5 or later, you may have to blacklist vesafb. This is a bug that has not been fixed so far.) -What's New for OpenChrome Version 0.5 -------------------------------------- +What's New for OpenChrome DDX Version 0.6 +----------------------------------------- -Based on OpenChrome Version 0.4.0 code, OpenChrome Version 0.5 fixes -several bugs while adding two new features. +OpenChrome DDX Version 0.6 is an improved version of OpenChrome DDX +Version 0.5 with a number of improvements made to the code. OpenChrome +DDX Version 0.6 is written in a way to completely replace Version +0.2.904 through 0.5. -- Major code cleanup -- Removal of more manual options (BusWidth, ForcePanel, and AccelMethod) -- Fix for runtime screen resolution change X.Org Server crash bug -- Fix for CLE266 chipset not being able to function correctly if - "CRT + TV" option was chosen in BIOS setup -- Initial support for VIA Technologies VT1632A TMDS transmitter for DVI -- Initial support for multiple display output (i.e., RandR) +OpenChrome DDX Version 0.6 has added the following new features. + +- First official support for CX700, VX700, and VX800 chipsets + integrated TMDS transmitter (i.e., DVI support) +- Initial support for Silicon Image SiI 164 TMDS transmitter + + +OpenChrome DDX Version 0.6 has the following improvements. + +- Improved FP reinitialization when resuming from standby + (HP 2133 Mini-Note, FIC CE260 / CE261 based netbooks like + Everex CloudBook and Sylvania g netbook) +- Improved automatic detection of display resources +- Improved X Server stability in dual monitor mode +- Automatic active steering of the display controller channel to the + correct display output device + + +OpenChrome DDX Version 0.6 fixes the following bugs. + +- Fix for the disruption of the VT (Virtual Terminal) screen bug + introduced in Version 0.5 +- Fix for HP 2133 Mini-Note's PCIe WLAN getting turned off + inadvertently bug introduced in Version 0.5 @@ -119,17 +143,19 @@ Support for Older Versions -------------------------- -As a general rule, the older version OpenChrome will not be supported -once a new version is out. It is sometimes useful to try out the -older version, in order to see if a regression has occurred, but -generally speaking, there will be no fixes for the older versions. -OpenChrome is written so that it can be compiled against X.Org Server -Version 1.7 or later and Linux Version 2.6.32 or later. We will likely -maintain this minimum platform requirement for the foreseeable future. -What this means is that if the user wanted to try the latest OpenChrome, -it can do so with an OS that was released around Year 2010. OpenChrome -might still compile for anything older than that, but it might not be -stable enough to be useful. +The OpenChrome Project practices rolling release update policy for +OpenChrome DDX. What this means is that the older version of +OpenChrome DDX will not be supported once a new version is out. +It is sometimes useful to try out the older version, in order to see +if a regression has occurred, but generally speaking, there will be +no fixes for the older versions. OpenChrome DDX is written so that it +can be compiled against X.Org Server Version 1.7 or later and Linux +Version 2.6.32 or later. We will likely maintain this minimum platform +requirement for the foreseeable future. What this means is that if the +user wanted to try the latest OpenChrome DDX, it can do so with an OS +that was released around Year 2010. OpenChrome DDX might still compile +for anything older than that, but it might not be stable enough to be +useful. @@ -165,14 +191,15 @@ Where to Obtain OpenChrome Source Code -------------------------------------- -The OpenChrome source code repository is located at. +OpenChrome source code repository is located at. http://cgit.freedesktop.org/openchrome/xf86-video-openchrome/ -The experimental DRM (Direct Rendering Manager) module that supports -KMS (Kernel Mode Setting) is located at. +OpenChrome DRM (Direct Rendering Manager) module source code +repository is located at. +https://cgit.freedesktop.org/openchrome/drm-openchrome/ https://cgit.freedesktop.org/openchrome/drm-openchrome/tree/drivers/gpu/drm/via @@ -185,14 +212,14 @@ different developers that wrote the code in varying ways. OpenChrome is a unified graphics device driver that supports 12 generations of VIA Technologies IGP starting from CLE266 chipset all the way to -VX900 chipset. Even the VIA Technoloiges in house unified graphics +VX900 chipset. Even the VIA Technologies in house unified graphics device driver does not support the number of devices OpenChrome does. Furthermore, VIA Technologies IGPs tend to rely heavily on many -different kinds of external encoders and transmitters to get the -desired functionality. As a result, it is very difficult to get the -code right for every possible configuration you can think of. - Starting with OpenChrome Version 0.4.0, the project is under new +different external encoders and transmitters to display the image. +As a result, it is very difficult to get the code right for every +possible configuration you can think of. + Starting with OpenChrome Version 0.4, the project is under new management, and moving forward, the emphasis will be on device driver -reliability, and code maintainability. +reliability and code maintainability. -(End of this document.) +(End of document.) diff -Nru xserver-xorg-video-openchrome-0.5.0/src/compat-api.h xserver-xorg-video-openchrome-0.6.0/src/compat-api.h --- xserver-xorg-video-openchrome-0.5.0/src/compat-api.h 2016-07-06 16:21:06.000000000 +0000 +++ xserver-xorg-video-openchrome-0.6.0/src/compat-api.h 2017-01-06 03:33:00.000000000 +0000 @@ -74,8 +74,13 @@ #define SCREEN_INIT_ARGS_DECL ScreenPtr pScreen, int argc, char **argv +#if ABI_VIDEODRV_VERSION >= SET_ABI_VERSION(23, 0) +#define BLOCKHANDLER_ARGS_DECL ScreenPtr arg, pointer pTimeout +#define BLOCKHANDLER_ARGS arg, pTimeout +#else #define BLOCKHANDLER_ARGS_DECL ScreenPtr arg, pointer pTimeout, pointer pReadmask #define BLOCKHANDLER_ARGS arg, pTimeout, pReadmask +#endif #define CLOSE_SCREEN_ARGS_DECL ScreenPtr pScreen #define CLOSE_SCREEN_ARGS pScreen diff -Nru xserver-xorg-video-openchrome-0.5.0/src/Makefile.am xserver-xorg-video-openchrome-0.6.0/src/Makefile.am --- xserver-xorg-video-openchrome-0.5.0/src/Makefile.am 2016-07-06 16:21:06.000000000 +0000 +++ xserver-xorg-video-openchrome-0.6.0/src/Makefile.am 2017-02-27 00:29:11.000000000 +0000 @@ -40,11 +40,11 @@ via_3d.c \ via_3d.h \ via_3d_reg.h \ + via_analog.c \ via_rop.h \ via_exa.c \ via_exa_h2.c \ via_exa_h6.c \ - via_bandwidth.c \ via_ums.h \ via_ch7xxx.c \ via_ch7xxx.h \ @@ -54,7 +54,7 @@ via_driver.h \ via_i2c.c \ via_id.c \ - via_lvds.c \ + via_fp.c \ via_memcpy.c \ via_memmgr.h \ via_memmgr.c \ @@ -62,6 +62,10 @@ via_mode.h \ via_priv.h \ via_regs.h \ + via_sii164.c \ + via_sii164.h \ + via_tmds.c \ + via_tv.c \ via_xv_overlay.c \ via_xv_overlay.h \ via_ums.c \ @@ -112,6 +116,9 @@ if [ -d .svn ]; then \ echo '#define BUILDCOMMENT "(development build, at revision '\ "`svnversion -nc .. | sed -e s/^[^:]*://`"')"' > $@.tmp; \ + elif [ "$$SOURCE_DATE_EPOCH" ]; then \ + printf '#define BUILDCOMMENT "(compiled with SOURCE_DATE_EPOCH: %s)"' $$SOURCE_DATE_EPOCH \ + > $@.tmp; \ else \ date +'#define BUILDCOMMENT "(development build, compiled on %c)"' \ > $@.tmp; \ diff -Nru xserver-xorg-video-openchrome-0.5.0/src/Makefile.in xserver-xorg-video-openchrome-0.6.0/src/Makefile.in --- xserver-xorg-video-openchrome-0.5.0/src/Makefile.in 2016-07-06 16:22:04.000000000 +0000 +++ xserver-xorg-video-openchrome-0.6.0/src/Makefile.in 2017-03-07 11:19:03.000000000 +0000 @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2014 Free Software Foundation, Inc. - +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -41,61 +42,6 @@ # TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc. VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -137,12 +83,12 @@ @DRI_FALSE@ drm_fourcc.h subdir = src +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_VPATH_FILES = @@ -177,110 +123,58 @@ LTLIBRARIES = $(openchrome_drv_la_LTLIBRARIES) openchrome_drv_la_LIBADD = am__openchrome_drv_la_SOURCES_DIST = compat-api.h via_eng_regs.h \ - via_3d.c via_3d.h via_3d_reg.h via_rop.h via_exa.c \ - via_exa_h2.c via_exa_h6.c via_bandwidth.c via_ums.h \ - via_ch7xxx.c via_ch7xxx.h via_display.c via_dmabuffer.h \ - via_driver.c via_driver.h via_i2c.c via_id.c via_lvds.c \ - via_memcpy.c via_memmgr.h via_memmgr.c via_outputs.c \ - via_mode.h via_priv.h via_regs.h via_xv_overlay.c \ - via_xv_overlay.h via_ums.c via_vgahw.c via_vgahw.h via_xv.c \ - via_xv.h via_vt162x.c via_vt162x.h via_vt1632.c via_vt1632.h \ - via_xvpriv.h via_dri.c via_dri.h via_drm.h via_drmclient.h \ - via_kms.h via_kms.c via_xvmc.c via_xvmc.h drm_fourcc.h + via_3d.c via_3d.h via_3d_reg.h via_analog.c via_rop.h \ + via_exa.c via_exa_h2.c via_exa_h6.c via_ums.h via_ch7xxx.c \ + via_ch7xxx.h via_display.c via_dmabuffer.h via_driver.c \ + via_driver.h via_i2c.c via_id.c via_fp.c via_memcpy.c \ + via_memmgr.h via_memmgr.c via_outputs.c via_mode.h via_priv.h \ + via_regs.h via_sii164.c via_sii164.h via_tmds.c via_tv.c \ + via_xv_overlay.c via_xv_overlay.h via_ums.c via_vgahw.c \ + via_vgahw.h via_xv.c via_xv.h via_vt162x.c via_vt162x.h \ + via_vt1632.c via_vt1632.h via_xvpriv.h via_dri.c via_dri.h \ + via_drm.h via_drmclient.h via_kms.h via_kms.c via_xvmc.c \ + via_xvmc.h drm_fourcc.h @DRI_TRUE@am__objects_1 = via_dri.lo via_kms.lo via_xvmc.lo -am_openchrome_drv_la_OBJECTS = via_3d.lo via_exa.lo via_exa_h2.lo \ - via_exa_h6.lo via_bandwidth.lo via_ch7xxx.lo via_display.lo \ - via_driver.lo via_i2c.lo via_id.lo via_lvds.lo via_memcpy.lo \ - via_memmgr.lo via_outputs.lo via_xv_overlay.lo via_ums.lo \ - via_vgahw.lo via_xv.lo via_vt162x.lo via_vt1632.lo \ - $(am__objects_1) +am_openchrome_drv_la_OBJECTS = via_3d.lo via_analog.lo via_exa.lo \ + via_exa_h2.lo via_exa_h6.lo via_ch7xxx.lo via_display.lo \ + via_driver.lo via_i2c.lo via_id.lo via_fp.lo via_memcpy.lo \ + via_memmgr.lo via_outputs.lo via_sii164.lo via_tmds.lo \ + via_tv.lo via_xv_overlay.lo via_ums.lo via_vgahw.lo via_xv.lo \ + via_vt162x.lo via_vt1632.lo $(am__objects_1) openchrome_drv_la_OBJECTS = $(am_openchrome_drv_la_OBJECTS) -AM_V_lt = $(am__v_lt_@AM_V@) -am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) -am__v_lt_0 = --silent -am__v_lt_1 = -openchrome_drv_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ - $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ - $(AM_CFLAGS) $(CFLAGS) $(openchrome_drv_la_LDFLAGS) $(LDFLAGS) \ - -o $@ -AM_V_P = $(am__v_P_@AM_V@) -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -am__v_at_1 = +openchrome_drv_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(openchrome_drv_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) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_@AM_V@) -am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) -am__v_CC_0 = @echo " CC " $@; -am__v_CC_1 = +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_@AM_V@) -am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) -am__v_CCLD_0 = @echo " CCLD " $@; -am__v_CCLD_1 = +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ SOURCES = $(openchrome_drv_la_SOURCES) DIST_SOURCES = $(am__openchrome_drv_la_SOURCES_DIST) -RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ - ctags-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 \ - tags-recursive uninstall-recursive -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac +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 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive -am__recursive_targets = \ - $(RECURSIVE_TARGETS) \ - $(RECURSIVE_CLEAN_TARGETS) \ - $(am__extra_recursive_targets) -AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -# Read a list of newline-separated strings from the standard input, -# and print each of them once, without duplicates. Input order is -# *not* preserved. -am__uniquify_input = $(AWK) '\ - BEGIN { nonempty = 0; } \ - { items[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in items) print i; }; } \ -' -# Make sure the list of sources is unique. This is necessary because, -# e.g., the same source file might be shared among _SOURCES variables -# for different programs/libraries. -am__define_uniq_tagged_files = \ - list='$(am__tagged_files)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ @@ -311,7 +205,6 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ @@ -361,7 +254,6 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ @@ -463,15 +355,15 @@ openchrome_drv_la_LDFLAGS = -module -avoid-version @LIBUDEV_LIBS@ openchrome_drv_ladir = @moduledir@/drivers openchrome_drv_la_SOURCES = compat-api.h via_eng_regs.h via_3d.c \ - via_3d.h via_3d_reg.h via_rop.h via_exa.c via_exa_h2.c \ - via_exa_h6.c via_bandwidth.c via_ums.h via_ch7xxx.c \ - via_ch7xxx.h via_display.c via_dmabuffer.h via_driver.c \ - via_driver.h via_i2c.c via_id.c via_lvds.c via_memcpy.c \ - via_memmgr.h via_memmgr.c via_outputs.c via_mode.h via_priv.h \ - via_regs.h via_xv_overlay.c via_xv_overlay.h via_ums.c \ - via_vgahw.c via_vgahw.h via_xv.c via_xv.h via_vt162x.c \ - via_vt162x.h via_vt1632.c via_vt1632.h via_xvpriv.h \ - $(am__append_1) + via_3d.h via_3d_reg.h via_analog.c via_rop.h via_exa.c \ + via_exa_h2.c via_exa_h6.c via_ums.h via_ch7xxx.c via_ch7xxx.h \ + via_display.c via_dmabuffer.h via_driver.c via_driver.h \ + via_i2c.c via_id.c via_fp.c via_memcpy.c via_memmgr.h \ + via_memmgr.c via_outputs.c via_mode.h via_priv.h via_regs.h \ + via_sii164.c via_sii164.h via_tmds.c via_tv.c via_xv_overlay.c \ + via_xv_overlay.h via_ums.c via_vgahw.c via_vgahw.h via_xv.c \ + via_xv.h via_vt162x.c via_vt162x.h via_vt1632.c via_vt1632.h \ + via_xvpriv.h $(am__append_1) all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-recursive @@ -489,6 +381,7 @@ 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*) \ @@ -506,9 +399,9 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): - install-openchrome_drv_laLTLIBRARIES: $(openchrome_drv_la_LTLIBRARIES) @$(NORMAL_INSTALL) + test -z "$(openchrome_drv_ladir)" || $(MKDIR_P) "$(DESTDIR)$(openchrome_drv_ladir)" @list='$(openchrome_drv_la_LTLIBRARIES)'; test -n "$(openchrome_drv_ladir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ @@ -516,8 +409,6 @@ else :; fi; \ done; \ test -z "$$list2" || { \ - echo " $(MKDIR_P) '$(DESTDIR)$(openchrome_drv_ladir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(openchrome_drv_ladir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(openchrome_drv_ladir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(openchrome_drv_ladir)"; \ } @@ -533,17 +424,14 @@ clean-openchrome_drv_laLTLIBRARIES: -test -z "$(openchrome_drv_la_LTLIBRARIES)" || rm -f $(openchrome_drv_la_LTLIBRARIES) - @list='$(openchrome_drv_la_LTLIBRARIES)'; \ - locs=`for p in $$list; do echo $$p; done | \ - sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ - sort -u`; \ - test -z "$$locs" || { \ - echo rm -f $${locs}; \ - rm -f $${locs}; \ - } - + @list='$(openchrome_drv_la_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 openchrome_drv.la: $(openchrome_drv_la_OBJECTS) $(openchrome_drv_la_DEPENDENCIES) $(EXTRA_openchrome_drv_la_DEPENDENCIES) - $(AM_V_CCLD)$(openchrome_drv_la_LINK) -rpath $(openchrome_drv_ladir) $(openchrome_drv_la_OBJECTS) $(openchrome_drv_la_LIBADD) $(LIBS) + $(openchrome_drv_la_LINK) -rpath $(openchrome_drv_ladir) $(openchrome_drv_la_OBJECTS) $(openchrome_drv_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -552,7 +440,7 @@ -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/via_3d.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/via_bandwidth.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/via_analog.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/via_ch7xxx.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/via_display.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/via_dri.Plo@am__quote@ @@ -560,13 +448,16 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/via_exa.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/via_exa_h2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/via_exa_h6.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/via_fp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/via_i2c.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/via_id.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/via_kms.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/via_lvds.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/via_memcpy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/via_memmgr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/via_outputs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/via_sii164.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/via_tmds.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/via_tv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/via_ums.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/via_vgahw.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/via_vt162x.Plo@am__quote@ @@ -576,25 +467,25 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/via_xvmc.Plo@am__quote@ .c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@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@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< +@am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@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@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@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@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -603,25 +494,22 @@ -rm -rf .libs _libs # 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. -$(am__recursive_targets): - @fail=; \ - if $(am__make_keepgoing); then \ - failcom='fail=yes'; \ - else \ - failcom='exit 1'; \ - fi; \ +# 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//`; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - for subdir in $$list; do \ + list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ @@ -636,12 +524,57 @@ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -ID: $(am__tagged_files) - $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-recursive -TAGS: tags +$(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-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ @@ -657,7 +590,12 @@ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ - $(am__define_uniq_tagged_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; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -669,11 +607,15 @@ $$unique; \ fi; \ fi -ctags: ctags-recursive - -CTAGS: ctags -ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - $(am__define_uniq_tagged_files); \ +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 @@ -682,21 +624,6 @@ here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" -cscopelist: cscopelist-recursive - -cscopelist-am: $(am__tagged_files) - list='$(am__tagged_files)'; \ - case "$(srcdir)" in \ - [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ - *) sdir=$(subdir)/$(srcdir) ;; \ - esac; \ - for i in $$list; do \ - if test -f "$$i"; then \ - echo "$(subdir)/$$i"; \ - else \ - echo "$$sdir/$$i"; \ - fi; \ - done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -733,10 +660,13 @@ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - $(am__make_dryrun) \ - || test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ + 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; \ @@ -871,28 +801,27 @@ uninstall-am: uninstall-openchrome_drv_laLTLIBRARIES -.MAKE: $(am__recursive_targets) all check install install-am \ - install-strip - -.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ - check-am clean clean-generic clean-libtool \ - clean-openchrome_drv_laLTLIBRARIES cscopelist-am ctags \ - ctags-am dist-hook 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-man \ +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \ + ctags-recursive install install-am install-strip \ + tags-recursive + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-generic clean-libtool \ + clean-openchrome_drv_laLTLIBRARIES ctags ctags-recursive \ + dist-hook 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-man \ install-openchrome_drv_laLTLIBRARIES 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-am uninstall uninstall-am \ + pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ uninstall-openchrome_drv_laLTLIBRARIES -.PRECIOUS: Makefile - via_driver.lo: version.h version.h: $(openchrome_drv_la_SOURCES) @@ -907,6 +836,9 @@ if [ -d .svn ]; then \ echo '#define BUILDCOMMENT "(development build, at revision '\ "`svnversion -nc .. | sed -e s/^[^:]*://`"')"' > $@.tmp; \ + elif [ "$$SOURCE_DATE_EPOCH" ]; then \ + printf '#define BUILDCOMMENT "(compiled with SOURCE_DATE_EPOCH: %s)"' $$SOURCE_DATE_EPOCH \ + > $@.tmp; \ else \ date +'#define BUILDCOMMENT "(development build, compiled on %c)"' \ > $@.tmp; \ diff -Nru xserver-xorg-video-openchrome-0.5.0/src/version.h xserver-xorg-video-openchrome-0.6.0/src/version.h --- xserver-xorg-video-openchrome-0.5.0/src/version.h 2016-07-06 16:22:40.000000000 +0000 +++ xserver-xorg-video-openchrome-0.6.0/src/version.h 2017-03-07 11:19:59.000000000 +0000 @@ -1 +1 @@ -#define BUILDCOMMENT "(openchrome 0.5.0 release)" +#define BUILDCOMMENT "(openchrome 0.6.0 release)" diff -Nru xserver-xorg-video-openchrome-0.5.0/src/via_analog.c xserver-xorg-video-openchrome-0.6.0/src/via_analog.c --- xserver-xorg-video-openchrome-0.5.0/src/via_analog.c 1970-01-01 00:00:00.000000000 +0000 +++ xserver-xorg-video-openchrome-0.6.0/src/via_analog.c 2017-02-26 23:53:37.000000000 +0000 @@ -0,0 +1,429 @@ +/* + * Copyright 2005-2016 The OpenChrome Project + * [https://www.freedesktop.org/wiki/Openchrome] + * Copyright 2004-2005 The Unichrome Project [unichrome.sf.net] + * Copyright 1998-2003 VIA Technologies, Inc. All Rights Reserved. + * Copyright 2001-2003 S3 Graphics, Inc. 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 + * 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. + */ + +/* + * via_analog.c + * + * Handles the initialization and management of analog VGA related + * resources. + * + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "via_driver.h" +#include + + +/* + * Enables or disables analog VGA output by controlling DAC + * (Digital to Analog Converter) output state. + */ +static void +viaAnalogOutput(ScrnInfoPtr pScrn, Bool outputState) +{ + vgaHWPtr hwp = VGAHWPTR(pScrn); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered viaAnalogOutput.\n")); + + /* This register controls analog VGA DAC output state. */ + /* 3X5.47[2] - DACOFF Backdoor Register + * 0: DAC on + * 1: DAC off */ + ViaCrtcMask(hwp, 0x47, outputState ? 0x00 : 0x04, 0x04); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Analog VGA Output: %s\n", + outputState ? "On" : "Off"); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting viaAnalogOutput.\n")); +} + +/* + * Specifies IGA1 or IGA2 for analog VGA DAC source. + */ +static void +viaAnalogSetDisplaySource(ScrnInfoPtr pScrn, CARD8 displaySource) +{ + vgaHWPtr hwp = VGAHWPTR(pScrn); + CARD8 value = displaySource; + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered viaAnalogSetDisplaySource.\n")); + + ViaSeqMask(hwp, 0x16, value << 6, 0x40); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Analog VGA Display Output Source: IGA%d\n", + (value & 0x01) + 1); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting viaAnalogSetDisplaySource.\n")); +} + +/* + * Intializes analog VGA related registers. + */ +static void +viaAnalogInit(ScrnInfoPtr pScrn) +{ + vgaHWPtr hwp = VGAHWPTR(pScrn); + VIAPtr pVia = VIAPTR(pScrn); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered viaAnalogInit.\n")); + + /* 3X5.37[7] - DAC Power Save Control 1 + * 0: Depend on Rx3X5.37[5:4] setting + * 1: DAC always goes into power save mode + * 3X5.37[6] - DAC Power Down Control + * 0: Depend on Rx3X5.47[2] setting + * 1: DAC never goes to power down mode + * 3X5.37[5:4] - DAC Power Save Control 2 + * 00: DAC never goes to power save mode + * 01: DAC goes to power save mode by line + * 10: DAC goes to power save mode by frame + * 11: DAC goes to power save mode by line and frame + * 3X5.37[3] - DAC PEDESTAL Control + * 3X5.37[2:0] - DAC Factor + * (Default: 100) */ + ViaCrtcMask(hwp, 0x37, 0x04, 0xFF); + + switch (pVia->Chipset) { + case VIA_CX700: + case VIA_VX800: + case VIA_VX855: + case VIA_VX900: + /* 3C5.5E[0] - CRT DACOFF Setting + * 1: CRT DACOFF controlled by 3C5.01[5] */ + ViaSeqMask(hwp, 0x5E, 0x01, 0x01); + break; + default: + break; + } + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting viaAnalogInit.\n")); +} + +/* + * Sets the polarity of horizontal synchronization and vertical + * synchronization. + */ +static void +viaAnalogSetSyncPolarity(ScrnInfoPtr pScrn, DisplayModePtr mode) +{ + vgaHWPtr hwp = VGAHWPTR(pScrn); + CARD8 miscRegister; + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered viaAnalogSetSyncPolarity.\n")); + +/* Set certain bits of miscellaneous output register + * meant for IGA1. */ + miscRegister = hwp->readMiscOut(hwp); + if (mode->Flags & V_NHSYNC) { + miscRegister |= 0x40; + } else { + miscRegister &= (~0x40); + } + + if (mode->Flags & V_NVSYNC) { + miscRegister |= 0x80; + } else { + miscRegister &= (~0x80); + } + + hwp->writeMiscOut(hwp, miscRegister); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting viaAnalogSetSyncPolarity.\n")); +} + + +static void +via_analog_create_resources(xf86OutputPtr output) +{ +} + +static void +via_analog_dpms(xf86OutputPtr output, int mode) +{ + ScrnInfoPtr pScrn = output->scrn; + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered via_analog_dpms.\n")); + + switch (mode) { + case DPMSModeOn: + viaAnalogOutput(pScrn, TRUE); + break; + case DPMSModeStandby: + case DPMSModeSuspend: + case DPMSModeOff: + viaAnalogOutput(pScrn, FALSE); + break; + default: + break; + } + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting via_analog_dpms.\n")); +} + +static void +via_analog_save(xf86OutputPtr output) +{ +} + +static void +via_analog_restore(xf86OutputPtr output) +{ +} + +static int +via_analog_mode_valid(xf86OutputPtr output, DisplayModePtr pMode) +{ + ScrnInfoPtr pScrn = output->scrn; + + if (!ViaModeDotClockTranslate(pScrn, pMode)) + return MODE_NOCLOCK; + return MODE_OK; +} + +static Bool +via_analog_mode_fixup(xf86OutputPtr output, DisplayModePtr mode, + DisplayModePtr adjusted_mode) +{ + return TRUE; +} + +static void +via_analog_prepare(xf86OutputPtr output) +{ + via_analog_dpms(output, DPMSModeOff); +} + +static void +via_analog_commit(xf86OutputPtr output) +{ + via_analog_dpms(output, DPMSModeOn); +} + +static void +via_analog_mode_set(xf86OutputPtr output, DisplayModePtr mode, + DisplayModePtr adjusted_mode) +{ + ScrnInfoPtr pScrn = output->scrn; + drmmode_crtc_private_ptr iga = output->crtc->driver_private; + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered via_analog_mode_set.\n")); + + if (output->crtc) { + viaAnalogInit(pScrn); + viaAnalogSetSyncPolarity(pScrn, adjusted_mode); + viaAnalogSetDisplaySource(pScrn, iga->index ? 0x01 : 0x00); + } + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting via_analog_mode_set.\n")); +} + +static xf86OutputStatus +via_analog_detect(xf86OutputPtr output) +{ + xf86OutputStatus status = XF86OutputStatusDisconnected; + ScrnInfoPtr pScrn = output->scrn; + VIAPtr pVia = VIAPTR(pScrn); + xf86MonPtr mon; + + /* Probe I2C Bus 1 to see if a VGA monitor is connected. */ + xf86DrvMsg(pScrn->scrnIndex, X_PROBED, + "Probing for a VGA monitor on I2C Bus 1.\n"); + mon = xf86OutputGetEDID(output, pVia->pI2CBus1); + if (mon && (!mon->features.input_type)) { + xf86OutputSetEDID(output, mon); + status = XF86OutputStatusConnected; + xf86DrvMsg(pScrn->scrnIndex, X_PROBED, + "Detected a VGA monitor on I2C Bus 1.\n"); + } else { + xf86DrvMsg(pScrn->scrnIndex, X_PROBED, + "Did not detect a VGA monitor on I2C Bus 1.\n"); + + /* Probe I2C Bus 2 to see if a VGA monitor is connected. */ + xf86DrvMsg(pScrn->scrnIndex, X_PROBED, + "Probing for a VGA monitor on I2C Bus 2.\n"); + mon = xf86OutputGetEDID(output, pVia->pI2CBus2); + if (mon && (!mon->features.input_type)) { + xf86OutputSetEDID(output, mon); + status = XF86OutputStatusConnected; + xf86DrvMsg(pScrn->scrnIndex, X_PROBED, + "Detected a VGA monitor on I2C Bus 2.\n"); + } else { + xf86DrvMsg(pScrn->scrnIndex, X_PROBED, + "Did not detect a VGA monitor on I2C Bus 2.\n"); + + /* Perform manual detection of a VGA monitor since */ + /* it was not detected via I2C buses. */ + xf86DrvMsg(pScrn->scrnIndex, X_PROBED, + "Now perform manual detection of a VGA " + "monitor.\n"); + vgaHWPtr hwp = VGAHWPTR(pScrn); + CARD8 SR01 = hwp->readSeq(hwp, 0x01); + CARD8 SR40 = hwp->readSeq(hwp, 0x40); + CARD8 CR36 = hwp->readCrtc(hwp, 0x36); + + /* We have to power on the display to detect it */ + ViaSeqMask(hwp, 0x01, 0x00, 0x20); + ViaCrtcMask(hwp, 0x36, 0x00, 0xF0); + + /* Wait for vblank */ + usleep(16); + + /* Detect the load on pins */ + ViaSeqMask(hwp, 0x40, 0x80, 0x80); + + if ((VIA_CX700 == pVia->Chipset) || + (VIA_VX800 == pVia->Chipset) || + (VIA_VX855 == pVia->Chipset) || + (VIA_VX900 == pVia->Chipset)) + ViaSeqMask(hwp, 0x40, 0x00, 0x80); + + if (ViaVgahwIn(hwp, 0x3C2) & 0x20) { + status = XF86OutputStatusConnected; + xf86DrvMsg(pScrn->scrnIndex, X_PROBED, + "Detected a VGA monitor using manual " + "detection method.\n"); + } + + if ((VIA_CX700 == pVia->Chipset) || + (VIA_VX800 == pVia->Chipset) || + (VIA_VX855 == pVia->Chipset) || + (VIA_VX900 == pVia->Chipset)) + ViaSeqMask(hwp, 0x40, 0x00, 0x80); + + /* Restore previous state */ + hwp->writeSeq(hwp, 0x40, SR40); + hwp->writeSeq(hwp, 0x01, SR01); + hwp->writeCrtc(hwp, 0x36, CR36); + } + } + + return status; +} + +#ifdef RANDR_12_INTERFACE +static Bool +via_analog_set_property(xf86OutputPtr output, Atom property, + RRPropertyValuePtr value) +{ + return TRUE; +} +#endif + +#ifdef RANDR_13_INTERFACE +static Bool +via_analog_get_property(xf86OutputPtr output, Atom property) +{ + return FALSE; +} +#endif + +static void +via_analog_destroy(xf86OutputPtr output) +{ +} + +static const xf86OutputFuncsRec via_analog_funcs = { + .create_resources = via_analog_create_resources, + .dpms = via_analog_dpms, + .save = via_analog_save, + .restore = via_analog_restore, + .mode_valid = via_analog_mode_valid, + .mode_fixup = via_analog_mode_fixup, + .prepare = via_analog_prepare, + .commit = via_analog_commit, + .mode_set = via_analog_mode_set, + .detect = via_analog_detect, + .get_modes = xf86OutputGetEDIDModes, +#ifdef RANDR_12_INTERFACE + .set_property = via_analog_set_property, +#endif +#ifdef RANDR_13_INTERFACE + .get_property = via_analog_get_property, +#endif + .destroy = via_analog_destroy, +}; + +void +via_analog_init(ScrnInfoPtr pScrn) +{ + VIAPtr pVia = VIAPTR(pScrn); + VIABIOSInfoPtr pBIOSInfo = pVia->pBIOSInfo; + xf86OutputPtr output = NULL; + char outputNameBuffer[32]; + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered via_analog_init.\n")); + + if (!pVia->pI2CBus1 || !pVia->pI2CBus2) { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "I2C Bus 1 or I2C Bus 2 does not exist.\n"); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting via_analog_init.\n")); + return; + } + + /* The code to dynamically designate the output name for + * xrandr was borrowed from xf86-video-r128 DDX. */ + sprintf(outputNameBuffer, "VGA-%d", (pVia->numberVGA + 1)); + output = xf86OutputCreate(pScrn, &via_analog_funcs, outputNameBuffer); + + /* While there are two (2) display controllers registered with the + * X.Org Server, it is often desirable to fix the analog VGA output + * to IGA1 since LVDS FP (Flat Panel) typically prefers IGA2. (While + * it is not used at this point, only IGA2 contains panel resolution + * scaling functionality. IGA1 does not have this.) + * With this arrangement, DVI should end up getting assigned to IGA2 + * since DVI can go to either display controller without limitations. + * This should be the case for TV as well. */ + output->possible_crtcs = (1 << 0); + + output->possible_clones = 0; + output->interlaceAllowed = TRUE; + output->doubleScanAllowed = FALSE; + pBIOSInfo->analog = output; + + /* Increment the number of analog VGA connectors. */ + pVia->numberVGA++; + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting via_analog_init.\n")); +} diff -Nru xserver-xorg-video-openchrome-0.5.0/src/via_bandwidth.c xserver-xorg-video-openchrome-0.6.0/src/via_bandwidth.c --- xserver-xorg-video-openchrome-0.5.0/src/via_bandwidth.c 2016-07-06 16:21:06.000000000 +0000 +++ xserver-xorg-video-openchrome-0.6.0/src/via_bandwidth.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,528 +0,0 @@ -/* - * Copyright 2005-2015 The Openchrome Project - * [http://www.freedesktop.org/wiki/Openchrome] - * Copyright 2004-2005 The Unichrome Project [unichrome.sf.net] - * Copyright 1998-2003 VIA Technologies, Inc. All Rights Reserved. - * Copyright 2001-2003 S3 Graphics, Inc. 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 - * 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. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "via_driver.h" - -/* - * Now that via_bios is no longer such a behemoth and the relevant code has - * been moved to via_mode.c, this code should be moved to via_mode.c too, - * especially since output abstraction will trim via_mode.c down further. - */ - -static void -ViaSetCLE266APrimaryFIFO(ScrnInfoPtr pScrn, Bool Enable) -{ - VIAPtr pVia = VIAPTR(pScrn); - CARD32 dwGE230, dwGE298; - - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "ViaSetCLE266APrimaryFIFO: %d\n", Enable)); - - dwGE298 = VIAGETREG(0x298); - VIASETREG(0x298, dwGE298 | 0x20000000); - - dwGE230 = VIAGETREG(0x230); - if (Enable) - dwGE230 |= 0x00200000; - else - dwGE230 &= ~0x00200000; - VIASETREG(0x230, dwGE230); - - dwGE298 = VIAGETREG(0x298); - VIASETREG(0x298, dwGE298 & ~0x20000000); -} - -typedef struct -{ - CARD16 X; - CARD16 Y; - CARD16 Bpp; - CARD8 bRamClock; - CARD8 bTuningValue; -} ViaExpireNumberTable; - -static ViaExpireNumberTable CLE266AExpireNumber[] = { - {1280, 768,32,0x03,0x3}, {1280,1024,32,0x03,0x4}, {1280,1024,32,0x04,0x3}, - {1600,1200,16,0x03,0x4}, {1600,1200,32,0x04,0x4}, {1024, 768,32,0x03,0xA}, - {1400,1050,16,0x03,0x3}, {1400,1050,32,0x03,0x4}, {1400,1050,32,0x04,0x4}, - { 800, 600,32,0x03,0xA}, { 0, 0, 0, 0, 0} -}; - -static ViaExpireNumberTable CLE266CExpireNumber[] = { - {1280, 768,32,0x03,0x3}, {1280,1024,32,0x03,0x4}, {1280,1024,32,0x04,0x4}, - {1600,1200,32,0x03,0x3}, {1600,1200,32,0x04,0x4}, {1024, 768,32,0x03,0xA}, - {1400,1050,32,0x03,0x4}, {1400,1050,32,0x04,0x4}, - { 800, 600,32,0x03,0xA}, { 0, 0, 0, 0, 0} -}; - -static ViaExpireNumberTable KM400ExpireNumber[]={ - {1280,1024,32,0x03,0x3}, {1280,1024,32,0x04,0x9}, {1280, 768,32,0x03,0x3}, - {1280, 768,32,0x04,0x9}, {1400,1050,32,0x03,0x3}, {1400,1050,32,0x04,0x9}, - {1600,1200,32,0x03,0x4}, {1600,1200,32,0x04,0xA}, { 0, 0, 0, 0, 0} -}; - - -static void -ViaSetPrimaryExpireNumber(ScrnInfoPtr pScrn, DisplayModePtr mode, - ViaExpireNumberTable *Expire) -{ - vgaHWPtr hwp = VGAHWPTR(pScrn); - VIAPtr pVia = VIAPTR(pScrn); - - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "ViaSetPrimaryExpireNumber\n")); - - for (; Expire->X; Expire++) - if ((Expire->X == mode->CrtcHDisplay) && - (Expire->Y == mode->CrtcVDisplay) && - (Expire->Bpp == pScrn->bitsPerPixel) && - (Expire->bRamClock == pVia->MemClk)) { - ViaSeqMask(hwp, 0x22, Expire->bTuningValue, 0x1F); - return; - } -} - -void -ViaSetPrimaryFIFO(ScrnInfoPtr pScrn, DisplayModePtr mode) -{ - vgaHWPtr hwp = VGAHWPTR(pScrn); - VIAPtr pVia = VIAPTR(pScrn); - - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "ViaSetPrimaryFIFO\n")); - - /* Standard values. */ - ViaSeqMask(hwp, 0x17, 0x1F, 0xFF); - - if (mode->CrtcHDisplay >= 1600) { - ViaSeqMask(hwp, 0x16, 0x0F, 0xBF); - ViaSeqMask(hwp, 0x18, 0x4F, 0xFF); - } else if (mode->CrtcHDisplay >= 1024) { - ViaSeqMask(hwp, 0x16, 0x0C, 0xBF); - ViaSeqMask(hwp, 0x18, 0x4C, 0xFF); - } else { - ViaSeqMask(hwp, 0x16, 0x08, 0xBF); - ViaSeqMask(hwp, 0x18, 0x4E, 0xFF); - } - - switch (pVia->Chipset) { - case VIA_CLE266: - if (CLE266_REV_IS_CX(pVia->ChipRev)) { - if (pVia->HasSecondary) { /* SAMM or DuoView case */ - if (mode->HDisplay >= 1024) { - ViaSeqMask(hwp, 0x16, 0x1C, 0x3F); /* 28 */ - hwp->writeSeq(hwp, 0x17, 0x3F); /* 63 */ - hwp->writeSeq(hwp, 0x18, 0x57); /* 23 */ - } - } else { /* Single view or Simultaneous case */ -#if 0 - if (mode->HDisplay > 1024) { - ViaSeqMask(hwp, 0x16, 0x17, 0x3F); /* 23 */ - hwp->writeSeq(hwp, 0x17, 0x2F); /* 47 */ - hwp->writeSeq(hwp, 0x18, 0x57); /* 23 */ - } -#endif - } - ViaSetPrimaryExpireNumber(pScrn, mode, CLE266CExpireNumber); - } else { - if ((mode->HDisplay > 1024) && pVia->HasSecondary) { - ViaSetCLE266APrimaryFIFO(pScrn, TRUE); - - ViaSeqMask(hwp, 0x16, 0x17, 0x3F); /* 23 */ - hwp->writeSeq(hwp, 0x17, 0x2F); /* 47 */ - hwp->writeSeq(hwp, 0x18, 0x57); /* 23 */ - } - ViaSetPrimaryExpireNumber(pScrn, mode, CLE266AExpireNumber); - } - break; - case VIA_KM400: - if (pVia->HasSecondary) { /* SAMM or DuoView case */ - if ((mode->HDisplay >= 1600) && - (pVia->MemClk <= VIA_MEM_DDR200)) { - ViaSeqMask(hwp, 0x16, 0x09, 0x3F); /* 9 */ - hwp->writeSeq(hwp, 0x17, 0x1C); /* 28 */ - } else { - ViaSeqMask(hwp, 0x16, 0x1C, 0x3F); /* 28 */ - hwp->writeSeq(hwp, 0x17, 0x3F); /* 63 */ - } - } else { - if ((mode->HDisplay > 1280)) - ViaSeqMask(hwp, 0x16, 0x1C, 0x3F); /* 28 */ - else if (mode->HDisplay > 1024) - ViaSeqMask(hwp, 0x16, 0x17, 0x3F); /* 23 */ - else - ViaSeqMask(hwp, 0x16, 0x10, 0x3F); /* 16 */ - hwp->writeSeq(hwp, 0x17, 0x3F); /* 63 */ - } - hwp->writeSeq(hwp, 0x18, 0x57); /* 23 */ - ViaSetPrimaryExpireNumber(pScrn, mode, KM400ExpireNumber); - break; - case VIA_K8M800: - hwp->writeSeq(hwp, 0x17, 0xBF); /* 384/2 - 1 = 191 */ - ViaSeqMask(hwp, 0x16, 0x92, 0xBF); /* 328/4 = 82 = 0x52 */ - ViaSeqMask(hwp, 0x18, 0x8a, 0xBF); /* 74 */ - - if ((mode->HDisplay >= 1400) && (pScrn->bitsPerPixel == 32)) - ViaSeqMask(hwp, 0x22, 0x10, 0x1F); /* 64/4 = 16 */ - else - ViaSeqMask(hwp, 0x22, 0x00, 0x1F); /* 128/4 = overflow = 0 */ - break; - /* PM800/PM880/CN400 */ - case VIA_PM800: - hwp->writeSeq(hwp, 0x17, 0x5F); /* 95 */ - ViaSeqMask(hwp, 0x16, 0x20, 0xBF); /* 32 */ - ViaSeqMask(hwp, 0x18, 0x10, 0xBF); /* 16 */ - - if ((mode->HDisplay >= 1400) && (pScrn->bitsPerPixel == 32)) - ViaSeqMask(hwp, 0x22, 0x10, 0x1F); /* 64/4 = 16 */ - else - ViaSeqMask(hwp, 0x22, 0x1F, 0x1F); /* 31 */ - break; - /* P4M800 Pro/VN800/CN700 */ - case VIA_P4M800PRO: - hwp->writeSeq(hwp, 0x17, 0x2F); - ViaSeqMask(hwp, 0x16, 0x14, 0xBF); /* 80/4 = 20 = 0x14 */ - ViaSeqMask(hwp, 0x18, 0x08, 0xBF); - - if ((mode->HDisplay >= 1400) && (pScrn->bitsPerPixel == 32)) - ViaSeqMask(hwp, 0x22, 0x10, 0x1F); - else - ViaSeqMask(hwp, 0x22, 0x00, 0x1F); - break; - case VIA_K8M890: - /* depth location: {SR17,0,7} */ - hwp->writeSeq(hwp, 0x17, 0xB3); /* 360/2-1 = 179 = 0xB3 */ - /* Formula (x & 0x3F) | ((x & 0x40) << 1) */ - /* threshold location: {SR16,0,5},{SR16,7,7} */ - ViaSeqMask(hwp, 0x16, 0x92, 0xBF); /* 328/4 = 82 = 0x52 */ - /* high threshold location: {SR18,0,5},{SR18,7,7} */ - ViaSeqMask(hwp, 0x18, 0x8A, 0xBF); /* 296/4 = 74 = 0x4A */ - /* display queue expire num location: {SR22,0,4}. */ - ViaSeqMask(hwp, 0x22, 0x1F, 0x1F); /* 124/4 = 31 = 0x1F */ - break; - case VIA_P4M900: - /* location: {SR17,0,7} */ - hwp->writeSeq(hwp, 0x17, 0x2F); /* 96/2-1 = 47 = 0x2F */ - /* location: {SR16,0,5},{SR16,7,7} */ - ViaSeqMask(hwp, 0x16, 0x13, 0xBF); /* 76/4 = 19 = 0x13 */ - /* location: {SR18,0,5},{SR18,7,7} */ - ViaSeqMask(hwp, 0x18, 0x13, 0xBF); /* 76/4 = 19 = 0x13 */ - /* location: {SR22,0,4}. */ - ViaSeqMask(hwp, 0x22, 0x08, 0x1F); /* 32/4 = 8 = 0x08 */ - break; - case VIA_P4M890: - hwp->writeSeq(hwp, 0x17, 0x2F); /* 96/2-1 = 47 = 0x2F */ - ViaSeqMask(hwp, 0x16, 0x13, 0xBF); /* 76/4 = 19 = 0x13 */ - ViaSeqMask(hwp, 0x18, 0x10, 0xBF); /* 64/4 = 16 = 0x10 */ - ViaSeqMask(hwp, 0x22, 0x08, 0x1F); /* 32/4 = 8 = 0x08 */ - break; - case VIA_CX700: - hwp->writeSeq(hwp, 0x17, 0x5F); - ViaSeqMask(hwp, 0x16, 0x20, 0xBF); /* 128/4 = 32 = 0x20 */ - ViaSeqMask(hwp, 0x18, 0x20, 0xBF); /* 128/4 = 32 = 0x20 */ - ViaSeqMask(hwp, 0x22, 0x1F, 0x1F); /* 124/4 = 31 = 0x1F */ - break; - case VIA_VX800: - hwp->writeSeq(hwp, 0x17, 0x5F); /* 192/2-1 = 95 = 0x5F */ - hwp->writeSeq(hwp, 0x16, 0x26); /* 152/4 = 38 = 0x26 */ - hwp->writeSeq(hwp, 0x18, 0x26); /* 152/4 = 38 */ - hwp->writeSeq(hwp, 0x22, 0x10); /* 64/4 = 16 */ - break; - case VIA_VX855: - hwp->writeSeq(hwp, 0x17, 0xC7); /* 400/2-1 = 199 = 0xC7 */ - /* Formula for {SR16,0,5},{SR16,7,7} is: (0x50 & 0x3F) | ((0x50 & 0x40) << 1) = 0x90 */ - hwp->writeSeq(hwp, 0x16, 0x90); /* 320/4 = 80 = 0x50 */ - /* Formula for {SR18,0,5},{SR18,7,7} is: (0x50 & 0x3F) | ((0x50 & 0x40) << 1) = 0x90 */ - hwp->writeSeq(hwp, 0x18, 0x90); /* 320/4 = 80 = 0x50 */ - hwp->writeSeq(hwp, 0x22, 0x28); /* 160/4 = 40 = 0x28 */ - break; - case VIA_VX900: - hwp->writeSeq(hwp, 0x17, 0xC7); /* 400/2-1 = 199 = 0xC7 */ - /* Formula for {SR16,0,5},{SR16,7,7} is: (0x50 & 0x3F) | ((0x50 & 0x40) << 1) = 0x90 */ - hwp->writeSeq(hwp, 0x16, 0x90); /* 320/4 = 80 = 0x50 */ - /* Formula for {SR18,0,5},{SR18,7,7} is: (0x50 & 0x3F) | ((0x50 & 0x40) << 1) = 0x90 */ - hwp->writeSeq(hwp, 0x18, 0x90); /* 320/4 = 80 = 0x50 */ - hwp->writeSeq(hwp, 0x22, 0x28); /* 160/4 = 40 = 0x28 */ - break; - default: - xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "ViaSetPrimaryFIFO: " - "Chipset %d not implemented\n", pVia->Chipset); - break; - } -} - -/* - * I've thrown out the LCD requirement. Size > 1024 is not supported - * by any currently known TV encoder anyway. -- Luc. - * - */ -void -ViaSetSecondaryFIFO(ScrnInfoPtr pScrn, DisplayModePtr mode) -{ - vgaHWPtr hwp = VGAHWPTR(pScrn); - VIAPtr pVia = VIAPTR(pScrn); - - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "ViaSetSecondaryFIFO\n")); - - switch (pVia->Chipset) { - case VIA_CLE266: - if (CLE266_REV_IS_CX(pVia->ChipRev)) { - if (mode->HDisplay >= 1024) { - ViaCrtcMask(hwp, 0x6A, 0x20, 0x20); - hwp->writeCrtc(hwp, 0x68, 0xAB);/* depth 10, threshold 11 */ - } else { - ViaCrtcMask(hwp, 0x6A, 0x00, 0x20); - hwp->writeCrtc(hwp, 0x68, 0x67);/* depth 6, threshold 7 */ - } - } else { - if ((pScrn->bitsPerPixel >= 24) - && (((mode->VDisplay > 768) - && (pVia->MemClk <= VIA_MEM_DDR200)) || - ((mode->HDisplay > 1280) - && (pVia->MemClk <= VIA_MEM_DDR266)))) { - ViaCrtcMask(hwp, 0x6A, 0x20, 0x20); - hwp->writeCrtc(hwp, 0x68, 0xAB);/* depth 10, threshold 11 */ - } else { - ViaCrtcMask(hwp, 0x6A, 0x00, 0x20); - hwp->writeCrtc(hwp, 0x68, 0x67);/* depth 6, threshold 7 */ - } - } - break; - case VIA_KM400: - if ((mode->HDisplay >= 1600) && (pVia->MemClk <= VIA_MEM_DDR200)) { - ViaCrtcMask(hwp, 0x6A, 0x20, 0x20); - hwp->writeCrtc(hwp, 0x68, 0xEB); /* depth 14, threshold 11 */ - } else if ((pScrn->bitsPerPixel == 32) - && (((mode->HDisplay > 1024) - && (pVia->MemClk <= VIA_MEM_DDR333)) || - ((mode->HDisplay >= 1024) - && (pVia->MemClk <= VIA_MEM_DDR200)))) { - ViaCrtcMask(hwp, 0x6A, 0x20, 0x20); - hwp->writeCrtc(hwp, 0x68, 0xCA); /* depth 12, threshold 10 */ - } else if ((pScrn->bitsPerPixel == 16) - && (((mode->HDisplay > 1280) - && (pVia->MemClk <= VIA_MEM_DDR333)) || - ((mode->HDisplay >= 1280) - && (pVia->MemClk <= VIA_MEM_DDR200)))) { - ViaCrtcMask(hwp, 0x6A, 0x20, 0x20); - hwp->writeCrtc(hwp, 0x68, 0xAB); /* depth 10, threshold 11 */ - } else { - ViaCrtcMask(hwp, 0x6A, 0x00, 0x20); - hwp->writeCrtc(hwp, 0x68, 0x67); /* depth 6, threshold 7 */ - } - break; - case VIA_K8M800: - /* depth: (384 /8 -1 -1) = 46 = 0x2E */ - ViaCrtcMask(hwp, 0x68, 0xE0, 0xF0); - ViaCrtcMask(hwp, 0x94, 0x00, 0x80); - ViaCrtcMask(hwp, 0x95, 0x80, 0x80); - - /* threshold: (328/4) = 82 = 0x52 */ - ViaCrtcMask(hwp, 0x68, 0x02, 0x0F); - ViaCrtcMask(hwp, 0x95, 0x50, 0x70); - - /* preq: 74 = 0x4A */ - ViaCrtcMask(hwp, 0x92, 0x0A, 0x0F); - ViaCrtcMask(hwp, 0x95, 0x04, 0x07); - - if ((mode->HDisplay >= 1400) && (pScrn->bitsPerPixel == 32)) - ViaCrtcMask(hwp, 0x94, 0x10, 0x7F); /* 64/4 */ - else - ViaCrtcMask(hwp, 0x94, 0x20, 0x7F); /* 128/4 */ - break; - case VIA_PM800: - /* depth: 12 - 1 = 0x0B */ - ViaCrtcMask(hwp, 0x68, 0xB0, 0xF0); - ViaCrtcMask(hwp, 0x94, 0x00, 0x80); - ViaCrtcMask(hwp, 0x95, 0x00, 0x80); - - /* threshold: 16 = 0x10 */ - ViaCrtcMask(hwp, 0x68, 0x00, 0x0F); - ViaCrtcMask(hwp, 0x95, 0x10, 0x70); - - /* preq: 8 = 0x08 */ - ViaCrtcMask(hwp, 0x92, 0x08, 0x0F); - ViaCrtcMask(hwp, 0x95, 0x00, 0x07); - - if ((mode->HDisplay >= 1400) && (pScrn->bitsPerPixel == 32)) - ViaCrtcMask(hwp, 0x94, 0x10, 0x7F); /* 64/4 */ - else - ViaCrtcMask(hwp, 0x94, 0x20, 0x7F); /* 128/4 */ - break; - case VIA_P4M800PRO: - ViaCrtcMask(hwp, 0x68, 0xA0, 0xF0); - ViaCrtcMask(hwp, 0x94, 0x00, 0x80); - ViaCrtcMask(hwp, 0x95, 0x00, 0x80); - - ViaCrtcMask(hwp, 0x68, 0x04, 0x0F); - ViaCrtcMask(hwp, 0x95, 0x10, 0x70); - - ViaCrtcMask(hwp, 0x92, 0x08, 0x0F); - ViaCrtcMask(hwp, 0x95, 0x00, 0x07); - - if ((mode->HDisplay >= 1400) && (pScrn->bitsPerPixel == 32)) - ViaCrtcMask(hwp, 0x94, 0x10, 0x7F); - else - ViaCrtcMask(hwp, 0x94, 0x20, 0x7F); - break; - case VIA_P4M890: - /* depth location: {CR68,4,7},{CR94,7,7},{CR95,7,7} */ - ViaCrtcMask(hwp, 0x68, 0xB0, 0xF0); /* 96/8-1 = 11 = 0x0B */ - ViaCrtcMask(hwp, 0x94, 0x00, 0x80); - ViaCrtcMask(hwp, 0x95, 0x00, 0x80); - - /* location: {CR68,0,3},{CR95,4,6} */ - ViaCrtcMask(hwp, 0x68, 0x03, 0x0F); /* 76/4 = 19 = 0x13 */ - ViaCrtcMask(hwp, 0x95, 0x10, 0x70); - - /* location: {CR92,0,3},{CR95,0,2} */ - ViaCrtcMask(hwp, 0x92, 0x00, 0x0F); /* 64/4 = 16 = 0x10 */ - ViaCrtcMask(hwp, 0x95, 0x01, 0x07); - - /* location: {CR94,0,6} */ - ViaCrtcMask(hwp, 0x94, 0x08, 0x7F); /* 32/4 = 8 = 0x08 */ - break; - case VIA_K8M890: - /* Display Queue Depth, location: {CR68,4,7},{CR94,7,7},{CR95,7,7} */ - ViaCrtcMask(hwp, 0x68, 0xC0, 0xF0); /* 360/8-1 = 44 = 0x2C; 0x2C << 4 = 0xC0 */ - ViaCrtcMask(hwp, 0x94, 0x00, 0x80); /* 0x2C << 3 = 0x00 */ - ViaCrtcMask(hwp, 0x95, 0x80, 0x80); /* 0x2C << 2 = 0x80 */ - - /* Display Queue Read Threshold 1, location: {CR68,0,3},{CR95,4,6} */ - ViaCrtcMask(hwp, 0x68, 0x02, 0x0F); /* 328/4 = 82 = 0x52 */ - ViaCrtcMask(hwp, 0x95, 0x50, 0x70); - - /* location: {CR92,0,3},{CR95,0,2} */ - ViaCrtcMask(hwp, 0x92, 0x0A, 0x0F); /* 296/4 = 74 = 0x4A */ - ViaCrtcMask(hwp, 0x95, 0x04, 0x07); /* 0x4A >> 4 = 0x04 */ - - /* Display Expire Number Bits, location: {CR94,0,6} */ - ViaCrtcMask(hwp, 0x94, 0x1F, 0x7F); /* 124/4 = 31 = 0x1F */ - break; - case VIA_P4M900: - ViaCrtcMask(hwp, 0x68, 0xB0, 0xF0); - ViaCrtcMask(hwp, 0x94, 0x00, 0x80); - ViaCrtcMask(hwp, 0x95, 0x00, 0x80); - - ViaCrtcMask(hwp, 0x68, 0x03, 0x0F); - ViaCrtcMask(hwp, 0x95, 0x10, 0x70); - ViaCrtcMask(hwp, 0x92, 0x03, 0x0F); - ViaCrtcMask(hwp, 0x95, 0x01, 0x07); - ViaCrtcMask(hwp, 0x94, 0x08, 0x7F); - break; - case VIA_CX700: - ViaCrtcMask(hwp, 0x68, 0xA0, 0xF0); - ViaCrtcMask(hwp, 0x94, 0x00, 0x80); - ViaCrtcMask(hwp, 0x95, 0x00, 0x80); - - ViaCrtcMask(hwp, 0x68, 0x04, 0x0F); - ViaCrtcMask(hwp, 0x95, 0x10, 0x70); - - ViaCrtcMask(hwp, 0x92, 0x08, 0x0F); - ViaCrtcMask(hwp, 0x95, 0x00, 0x07); - - if ((mode->HDisplay >= 1400) && (pScrn->bitsPerPixel == 32)) - ViaCrtcMask(hwp, 0x94, 0x10, 0x7F); - else - ViaCrtcMask(hwp, 0x94, 0x20, 0x7F); - break; - case VIA_VX800: - /* {CR68,4,7},{CR94,7,7},{CR95,7,7} : 96/8-1 = 0x0B */ - ViaCrtcMask(hwp, 0x68, 0xB0, 0xF0); /* ((0x0B & 0x0F) << 4)) = 0xB0 */ - ViaCrtcMask(hwp, 0x94, 0x00, 0x80); /* ((0x0B & 0x10) << 3)) = 0x00 */ - ViaCrtcMask(hwp, 0x95, 0x00, 0x80); - /* {CR68,0,3},{CR95,4,6} : 64/4 = 0x10 */ - ViaCrtcMask(hwp, 0x68, 0x04, 0x0F); - ViaCrtcMask(hwp, 0x95, 0x10, 0x70); - /* {CR92,0,3},{CR95,0,2} : 32/4 = 0x08 */ - ViaCrtcMask(hwp, 0x92, 0x08, 0x0F); - ViaCrtcMask(hwp, 0x95, 0x00, 0x07); - /* {CR94,0,6} : 128/4 = 0x20 */ - if ((mode->HDisplay >= 1400) && (pScrn->bitsPerPixel == 32)) - ViaCrtcMask(hwp, 0x94, 0x10, 0x7F); - else - ViaCrtcMask(hwp, 0x94, 0x20, 0x7F); - break; - case VIA_VX855: - /* {CR68,4,7},{CR94,7,7},{CR95,7,7} : 200/8-1 = 24 = 0x18 */ - ViaCrtcMask(hwp, 0x68, 0x80, 0xF0); /* ((0x18 & 0x0F) << 4)) = 0x80 */ - ViaCrtcMask(hwp, 0x94, 0x80, 0x80); /* ((0x18 & 0x10) << 3)) = 0x80 */ - ViaCrtcMask(hwp, 0x95, 0x00, 0x80); /* ((0x18 & 0x20) << 2)) = 0x00 */ - /* {CR68,0,3},{CR95,4,6} : 160/4 = 0x28 */ - ViaCrtcMask(hwp, 0x68, 0x08, 0x0F); /* (0x28 & 0x0F) = 0x08 */ - ViaCrtcMask(hwp, 0x95, 0x20, 0x70); /* (0x28 & 0x70) = 0x20 */ - /* {CR92,0,3},{CR95,0,2} : 160/4 = 0x28 */ - ViaCrtcMask(hwp, 0x92, 0x08, 0x08); /* (0x28 & 0x0F) = 0x08 */ - ViaCrtcMask(hwp, 0x95, 0x02, 0x07); /* ((0x28 & 0x70) >> 4)) = 0x02 */ - /* {CR94,0,6} : 320/4 = 0x50 */ - if ((mode->HDisplay >= 1400) && (pScrn->bitsPerPixel == 32)) - ViaCrtcMask(hwp, 0x94, 0x08, 0x7F); - else - ViaCrtcMask(hwp, 0x94, 0x08, 0x7F); - break; - case VIA_VX900: - /* {CR68,4,7},{CR94,7,7},{CR95,7,7} : 192/8-1 = 23 = 0x17 */ - ViaCrtcMask(hwp, 0x68, 0x70, 0xF0); /* ((0x17 & 0x0F) << 4)) = 0x70 */ - ViaCrtcMask(hwp, 0x94, 0x80, 0x80); /* ((0x17 & 0x10) << 3)) = 0x80 */ - ViaCrtcMask(hwp, 0x95, 0x00, 0x80); /* ((0x17 & 0x20) << 2)) = 0x00 */ - /* {CR68,0,3},{CR95,4,6} : 160/4 = 0x28 */ - ViaCrtcMask(hwp, 0x68, 0x08, 0x0F); /* (0x28 & 0x0F) = 0x08 */ - ViaCrtcMask(hwp, 0x95, 0x20, 0x70); /* (0x28 & 0x70) = 0x20 */ - /* {CR92,0,3},{CR95,0,2} : 160/4 = 0x28 */ - ViaCrtcMask(hwp, 0x92, 0x08, 0x08); /* (0x28 & 0x0F) = 0x08 */ - ViaCrtcMask(hwp, 0x95, 0x02, 0x07); /* ((0x28 & 0x70) >> 4)) = 0x2 */ - /* {CR94,0,6} : 320/4 = 0x50 */ - if ((mode->HDisplay >= 1400) && (pScrn->bitsPerPixel == 32)) - ViaCrtcMask(hwp, 0x94, 0x08, 0x7F); - else - ViaCrtcMask(hwp, 0x94, 0x08, 0x7F); - break; - default: - xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "ViaSetSecondaryFIFO: " - "Chipset %d not implemented\n", pVia->Chipset); - break; - } -} - -/* - * Turn off the primary FIFO only for CLE266A. - */ -void -ViaDisablePrimaryFIFO(ScrnInfoPtr pScrn) -{ - VIAPtr pVia = VIAPTR(pScrn); - - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "ViaDisablePrimaryFIFO\n")); - - /* Needed because exiting from X-Window will dump back register values. - * Other chipsets have no need to set extended FIFO values. */ - if ((pVia->Chipset == VIA_CLE266) && CLE266_REV_IS_AX(pVia->ChipRev) && - ((pScrn->currentMode->HDisplay > 1024) || pVia->HasSecondary)) - ViaSetCLE266APrimaryFIFO(pScrn, FALSE); -} diff -Nru xserver-xorg-video-openchrome-0.5.0/src/via_display.c xserver-xorg-video-openchrome-0.6.0/src/via_display.c --- xserver-xorg-video-openchrome-0.5.0/src/via_display.c 2016-07-06 16:21:06.000000000 +0000 +++ xserver-xorg-video-openchrome-0.6.0/src/via_display.c 2017-02-26 23:53:37.000000000 +0000 @@ -1,7 +1,7 @@ /* * Copyright 2015-2016 Kevin Brace * Copyright 2005-2016 The OpenChrome Project - * [http://www.freedesktop.org/wiki/Openchrome] + * [https://www.freedesktop.org/wiki/Openchrome] * Copyright 2004-2005 The Unichrome Project [unichrome.sf.net] * Copyright 1998-2003 VIA Technologies, Inc. All Rights Reserved. * Copyright 2001-2003 S3 Graphics, Inc. All Rights Reserved. @@ -31,10 +31,110 @@ #include "via_driver.h" +static ViaExpireNumberTable CLE266AExpireNumber[] = { + {1280, 768,32,0x03,0x3}, {1280,1024,32,0x03,0x4}, {1280,1024,32,0x04,0x3}, + {1600,1200,16,0x03,0x4}, {1600,1200,32,0x04,0x4}, {1024, 768,32,0x03,0xA}, + {1400,1050,16,0x03,0x3}, {1400,1050,32,0x03,0x4}, {1400,1050,32,0x04,0x4}, + { 800, 600,32,0x03,0xA}, { 0, 0, 0, 0, 0} +}; + +static ViaExpireNumberTable CLE266CExpireNumber[] = { + {1280, 768,32,0x03,0x3}, {1280,1024,32,0x03,0x4}, {1280,1024,32,0x04,0x4}, + {1600,1200,32,0x03,0x3}, {1600,1200,32,0x04,0x4}, {1024, 768,32,0x03,0xA}, + {1400,1050,32,0x03,0x4}, {1400,1050,32,0x04,0x4}, + { 800, 600,32,0x03,0xA}, { 0, 0, 0, 0, 0} +}; + +static ViaExpireNumberTable KM400ExpireNumber[]={ + {1280,1024,32,0x03,0x3}, {1280,1024,32,0x04,0x9}, {1280, 768,32,0x03,0x3}, + {1280, 768,32,0x04,0x9}, {1400,1050,32,0x03,0x3}, {1400,1050,32,0x04,0x9}, + {1600,1200,32,0x03,0x4}, {1600,1200,32,0x04,0xA}, { 0, 0, 0, 0, 0} +}; + + +static void +ViaPrintMode(ScrnInfoPtr pScrn, DisplayModePtr mode) +{ + xf86PrintModeline(pScrn->scrnIndex, mode); + + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "CrtcHDisplay: 0x%x\n", + mode->CrtcHDisplay); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "CrtcHBlankStart: 0x%x\n", + mode->CrtcHBlankStart); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "CrtcHSyncStart: 0x%x\n", + mode->CrtcHSyncStart); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "CrtcHSyncEnd: 0x%x\n", + mode->CrtcHSyncEnd); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "CrtcHBlankEnd: 0x%x\n", + mode->CrtcHBlankEnd); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "CrtcHTotal: 0x%x\n", + mode->CrtcHTotal); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "CrtcHSkew: 0x%x\n", + mode->CrtcHSkew); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "CrtcVDisplay: 0x%x\n", + mode->CrtcVDisplay); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "CrtcVBlankStart: 0x%x\n", + mode->CrtcVBlankStart); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "CrtcVSyncStart: 0x%x\n", + mode->CrtcVSyncStart); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "CrtcVSyncEnd: 0x%x\n", + mode->CrtcVSyncEnd); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "CrtcVBlankEnd: 0x%x\n", + mode->CrtcVBlankEnd); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "CrtcVTotal: 0x%x\n", + mode->CrtcVTotal); + +} + +/* + * Sets IGA1 or IGA2 for palette LUT access. + * This function should be called before changing the + * contents of the palette. + */ +static void +viaSetPaletteLUTAccess(ScrnInfoPtr pScrn, CARD8 displaySource) +{ + vgaHWPtr hwp = VGAHWPTR(pScrn); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered viaSetPaletteLUTAccess.\n")); + + ViaSeqMask(hwp, 0x1A, displaySource, 0x01); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Palette LUT Access: IGA%d\n", + (displaySource & 0x01) + 1); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting viaSetPaletteLUTAccess.\n")); +} + +/* + * Resets IGA1 hardware. + */ +static void +viaIGA1HWReset(ScrnInfoPtr pScrn, CARD8 resetState) +{ + vgaHWPtr hwp = VGAHWPTR(pScrn); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered viaIGA1HWReset.\n")); + + /* 3X5.17[7] - IGA1 HW Reset + * 0: Reset + * 1: Normal Operation */ + ViaCrtcMask(hwp, 0x17, resetState << 7, 0x80); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "IGA1 HW Reset: %s\n", + (resetState & 0x01) ? "Off" : "On"); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting viaIGA1HWReset.\n")); +} + /* * Controls IGA1 DPMS State. */ -void +static void viaIGA1DPMSControl(ScrnInfoPtr pScrn, CARD8 dpmsControl) { vgaHWPtr hwp = VGAHWPTR(pScrn); @@ -54,9 +154,262 @@ } /* + * Sets IGA1 color depth. + */ +static void +viaIGA1SetColorDepth(ScrnInfoPtr pScrn, CARD8 bitsPerPixel) +{ + vgaHWPtr hwp = VGAHWPTR(pScrn); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered viaIGA1SetColorDepth.\n")); + + /* Set the color depth for IGA1. */ + switch (bitsPerPixel) { + case 8: + /* 3C5.15[4] - Hi Color Mode Select + * 0: 555 + * 1: 565 + * 3C5.15[3:2] - Display Color Depth Select + * 00: 8bpp + * 01: 16bpp + * 10: 30bpp + * 11: 32bpp */ + ViaSeqMask(hwp, 0x15, 0x00, 0x1C); + break; + case 16: + ViaSeqMask(hwp, 0x15, 0x14, 0x1C); + break; + case 24: + case 32: + ViaSeqMask(hwp, 0x15, 0x1C, 0x1C); + break; + default: + break; + } + + if ((bitsPerPixel == 8) + || (bitsPerPixel == 16) + || (bitsPerPixel == 24) + || (bitsPerPixel == 32)) { + + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "IGA1 Color Depth: %d bit\n", + bitsPerPixel); + } else { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "Unsupported IGA1 Color Depth: %d bit\n", + bitsPerPixel); + } + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting viaIGA1SetColorDepth.\n")); +} + +/* + * Sets IGA1 palette LUT resolution. (6-bit or 8-bit) + */ +static void +viaIGA1SetPaletteLUTResolution(ScrnInfoPtr pScrn, CARD8 paletteLUT) +{ + vgaHWPtr hwp = VGAHWPTR(pScrn); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered viaIGA1SetPaletteLUTResolution.\n")); + + /* Set the palette LUT resolution for IGA1. */ + /* 3C5.15[7] - IGA1 6 / 8 Bit LUT + * 0: 6-bit + * 1: 8-bit */ + ViaSeqMask(hwp, 0x15, paletteLUT << 7, 0x80); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "IGA1 Palette LUT Resolution: %s bit\n", + (paletteLUT & 0x01) ? "8" : "6"); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting viaIGA1SetPaletteLUTResolution.\n")); +} + +/* + * Controls IGA1 gamma correction state. + */ +static void +viaIGA1SetGamma(ScrnInfoPtr pScrn, CARD8 gammaCorrection) +{ + VIAPtr pVia = VIAPTR(pScrn); + vgaHWPtr hwp = VGAHWPTR(pScrn); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered viaIGA1SetGamma.\n")); + + switch (pVia->Chipset) { + case VIA_CLE266: + case VIA_KM400: + /* 3C5.16[7] - IGA1 Gamma Correction + * 0: Disable + * 1: Enable */ + ViaSeqMask(hwp, 0x16, gammaCorrection << 7, 0x80); + break; + default: + /* 3X5.33[7] - IGA1 Gamma Correction + * 0: Disable + * 1: Enable */ + ViaCrtcMask(hwp, 0x33, gammaCorrection << 7, 0x80); + break; + } + + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "IGA1 Gamma Correction: %s\n", + (gammaCorrection & 0x01) ? "On" : "Off"); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting viaIGA1SetGamma.\n")); +} + +static void +viaIGA1InitHI(ScrnInfoPtr pScrn) +{ + VIAPtr pVia = VIAPTR(pScrn); + + switch(pVia->Chipset) { + case VIA_PM800: + case VIA_CX700: + case VIA_P4M890: + case VIA_P4M900: + case VIA_VX800: + case VIA_VX855: + case VIA_VX900: + VIASETREG(PRIM_HI_TRANSCOLOR, 0x00000000); + VIASETREG(PRIM_HI_INVTCOLOR, 0x00FFFFFF); + + /* Not setting up V327_HI_INVTCOLOR register contributes to + * an X Server boot time crash. */ + VIASETREG(V327_HI_INVTCOLOR, 0x00FFFFFF); + VIASETREG(PRIM_HI_FIFO, 0x0D000D0F); + VIASETREG(PRIM_HI_CTRL, 0x36000004); + break; + default: + VIASETREG(HI_TRANSPARENT_COLOR, 0x00000000); + VIASETREG(HI_INVTCOLOR, 0x00FFFFFF); + VIASETREG(ALPHA_V3_PREFIFO_CONTROL, 0x000E0000); + VIASETREG(ALPHA_V3_FIFO_CONTROL, 0xE0F0000); + VIASETREG(HI_CONTROL, 0x76000004); + break; + } +} + +static void +viaIGA1SetHIStartingAddress(xf86CrtcPtr crtc) +{ + + drmmode_crtc_private_ptr iga = crtc->driver_private; + ScrnInfoPtr pScrn = crtc->scrn; + VIAPtr pVia = VIAPTR(pScrn); + + switch(pVia->Chipset) { + case VIA_PM800: + case VIA_CX700: + case VIA_P4M890: + case VIA_P4M900: + case VIA_VX800: + case VIA_VX855: + case VIA_VX900: + VIASETREG(PRIM_HI_FBOFFSET, iga->cursor_bo->offset); + break; + default: + /* Mono Cursor Display Path [bit31]: Primary */ + VIASETREG(HI_FBOFFSET, iga->cursor_bo->offset); + break; + } +} + +/* + * This function displays or hides IGA1 hardware icon (HI). + */ +static void +viaIGA1DisplayHI(ScrnInfoPtr pScrn, Bool HI_Status) +{ + VIAPtr pVia = VIAPTR(pScrn); + CARD32 temp; + + switch(pVia->Chipset) { + case VIA_PM800: + case VIA_CX700: + case VIA_P4M890: + case VIA_P4M900: + case VIA_VX800: + case VIA_VX855: + case VIA_VX900: + temp = VIAGETREG(PRIM_HI_CTRL); + temp &= 0xFFFFFFFE; + temp |= HI_Status ? 0x00000001 : 0x00000000; + + /* PRIM_HI_CTRL[0] - Hardware Icon (HI) Enable */ + VIASETREG(PRIM_HI_CTRL, temp); + break; + default: + temp = VIAGETREG(HI_CONTROL); + temp &= 0xFFFFFFFE; + temp |= HI_Status ? 0x00000001 : 0x00000000; + + /* HI_CONTROL[0] - Hardware Icon (HI) Enable */ + VIASETREG(HI_CONTROL, temp); + break; + } +} + +static void +viaIGA1SetHIDisplayLocation(ScrnInfoPtr pScrn, + int x, unsigned int xoff, + int y, unsigned int yoff) +{ + VIAPtr pVia = VIAPTR(pScrn); + + switch(pVia->Chipset) { + case VIA_PM800: + case VIA_CX700: + case VIA_P4M890: + case VIA_P4M900: + case VIA_VX800: + case VIA_VX855: + case VIA_VX900: + VIASETREG(PRIM_HI_POSSTART, ((x << 16) | (y & 0x07ff))); + VIASETREG(PRIM_HI_CENTEROFFSET, ((xoff << 16) | (yoff & 0x07ff))); + break; + default: + VIASETREG(HI_POSSTART, ((x << 16) | (y & 0x07ff))); + VIASETREG(HI_CENTEROFFSET, ((xoff << 16) | (yoff & 0x07ff))); + break; + } +} + +/* + * Resets IGA2 hardware. + */ +static void +viaIGA2HWReset(ScrnInfoPtr pScrn, CARD8 resetState) +{ + vgaHWPtr hwp = VGAHWPTR(pScrn); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered viaIGA2HWReset.\n")); + + /* 3X5.6A[6] - Second Display Channel Reset + * 0: Reset + * 1: Normal Operation */ + ViaCrtcMask(hwp, 0x6A, resetState << 6, 0x40); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "IGA2 HW Reset: %s\n", + (resetState & 0x01) ? "Off" : "On"); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting viaIGA2HWReset.\n")); +} + +/* * Controls IGA2 display output on or off state. */ -void +static void viaIGA2DisplayOutput(ScrnInfoPtr pScrn, Bool outputState) { vgaHWPtr hwp = VGAHWPTR(pScrn); @@ -87,11 +440,8 @@ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Entered viaIGA2DisplayChannel.\n")); - /* 3X5.6A[7] - Second Display Channel Enable - * 3X5.6A[6] - Second Display Channel Reset (0 for reset) */ - ViaCrtcMask(hwp, 0x6A, 0x00, 0x40); - ViaCrtcMask(hwp, 0x6A, channelState ? 0x80 : 0x00, 0x80); - ViaCrtcMask(hwp, 0x6A, 0x40, 0x40); + /* 3X5.6A[7] - Second Display Channel Enable */ + ViaCrtcMask(hwp, 0x6A, channelState << 7, 0x80); xf86DrvMsg(pScrn->scrnIndex, X_INFO, "IGA2 Display Channel: %s\n", @@ -102,6 +452,202 @@ } /* + * Sets IGA2 color depth. + */ +static void +viaIGA2SetColorDepth(ScrnInfoPtr pScrn, CARD8 bitsPerPixel) +{ + vgaHWPtr hwp = VGAHWPTR(pScrn); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered viaIGA2SetColorDepth.\n")); + + /* Set the color depth for IGA2. */ + switch (pScrn->bitsPerPixel) { + case 8: + /* 3X5.67[7:6] - Display Color Depth Select + * 00: 8bpp + * 01: 16bpp + * 10: 30bpp + * 11: 32bpp */ + ViaCrtcMask(hwp, 0x67, 0x00, 0xC0); + break; + case 16: + ViaCrtcMask(hwp, 0x67, 0x40, 0xC0); + break; + case 24: + case 32: + ViaCrtcMask(hwp, 0x67, 0xC0, 0xC0); + break; + default: + break; + } + + if ((bitsPerPixel == 8) + || (bitsPerPixel == 16) + || (bitsPerPixel == 24) + || (bitsPerPixel == 32)) { + + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "IGA2 Color Depth: %d bit\n", + bitsPerPixel); + } else { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "Unsupported IGA2 Color Depth: %d bit\n", + bitsPerPixel); + } + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting viaIGA2SetColorDepth.\n")); +} + +/* + * Sets IGA2 palette LUT resolution. (6-bit or 8-bit) + */ +static void +viaIGA2SetPaletteLUTResolution(ScrnInfoPtr pScrn, CARD8 paletteLUT) +{ + vgaHWPtr hwp = VGAHWPTR(pScrn); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered viaIGA2SetPaletteLUTResolution.\n")); + + /* Set the palette LUT resolution for IGA2. */ + /* 3X5.6A[5] - IGA2 6 / 8 Bit LUT + * 0: 6-bit + * 1: 8-bit */ + ViaCrtcMask(hwp, 0x6A, paletteLUT << 5, 0x20); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "IGA2 Palette LUT Resolution: %s bit\n", + (paletteLUT & 0x01) ? "8" : "6"); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting viaIGA2SetPaletteLUTResolution.\n")); +} + +/* + * Controls IGA2 gamma correction state. + */ +static void +viaIGA2SetGamma(ScrnInfoPtr pScrn, CARD8 gammaCorrection) +{ + vgaHWPtr hwp = VGAHWPTR(pScrn); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered viaIGA2SetGamma.\n")); + + /* 3X5.6A[1] - IGA2 Gamma Correction + * 0: Disable + * 1: Enable */ + ViaCrtcMask(hwp, 0x6A, gammaCorrection << 1, 0x02); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "IGA2 Gamma Correction: %s\n", + (gammaCorrection & 0x01) ? "On" : "Off"); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting viaIGA2SetGamma.\n")); +} + +static void +viaIGA2InitHI(ScrnInfoPtr pScrn) +{ + VIAPtr pVia = VIAPTR(pScrn); + + switch(pVia->Chipset) { + case VIA_PM800: + case VIA_CX700: + case VIA_P4M890: + case VIA_P4M900: + case VIA_VX800: + case VIA_VX855: + case VIA_VX900: + VIASETREG(HI_TRANSPARENT_COLOR, 0x00000000); + VIASETREG(HI_INVTCOLOR, 0x00FFFFFF); + VIASETREG(ALPHA_V3_PREFIFO_CONTROL, 0x000E0000); + VIASETREG(ALPHA_V3_FIFO_CONTROL, 0x0E0F0000); + VIASETREG(HI_CONTROL, 0xB6000004); + break; + default: + VIASETREG(HI_TRANSPARENT_COLOR, 0x00000000); + VIASETREG(HI_INVTCOLOR, 0X00FFFFFF); + VIASETREG(ALPHA_V3_PREFIFO_CONTROL, 0x000E0000); + VIASETREG(ALPHA_V3_FIFO_CONTROL, 0xE0F0000); + VIASETREG(HI_CONTROL, 0xF6000004); + break; + } +} + +static void +viaIGA2SetHIStartingAddress(xf86CrtcPtr crtc) +{ + drmmode_crtc_private_ptr iga = crtc->driver_private; + ScrnInfoPtr pScrn = crtc->scrn; + VIAPtr pVia = VIAPTR(pScrn); + + VIASETREG(HI_FBOFFSET, iga->cursor_bo->offset); +} + +/* + * This function displays or hides IGA2 hardware icon (HI). + */ +static void +viaIGA2DisplayHI(ScrnInfoPtr pScrn, Bool HI_Status) +{ + VIAPtr pVia = VIAPTR(pScrn); + CARD32 temp; + + switch(pVia->Chipset) { + case VIA_PM800: + case VIA_CX700: + case VIA_P4M890: + case VIA_P4M900: + case VIA_VX800: + case VIA_VX855: + case VIA_VX900: + temp = VIAGETREG(HI_CONTROL); + temp &= 0xFFFFFFFE; + temp |= HI_Status ? 0x00000001 : 0x00000000; + + /* HI_CONTROL[0] - Hardware Icon (HI) Enable */ + VIASETREG(HI_CONTROL, temp); + break; + default: + temp = VIAGETREG(HI_CONTROL); + temp &= 0xFFFFFFFE; + temp |= HI_Status ? 0x00000001 : 0x00000000; + + /* HI_CONTROL[0] - Hardware Icon (HI) Enable */ + VIASETREG(HI_CONTROL, temp); + break; + } +} + +static void +viaIGA2SetHIDisplayLocation(ScrnInfoPtr pScrn, + int x, unsigned int xoff, + int y, unsigned int yoff) +{ + VIAPtr pVia = VIAPTR(pScrn); + + switch(pVia->Chipset) { + case VIA_PM800: + case VIA_CX700: + case VIA_P4M890: + case VIA_P4M900: + case VIA_VX800: + case VIA_VX855: + case VIA_VX900: + VIASETREG(HI_POSSTART, ((x << 16) | (y & 0x07FF))); + VIASETREG(HI_CENTEROFFSET, ((xoff << 16) | (yoff & 0x07FF))); + break; + default: + VIASETREG(HI_POSSTART, ((x << 16) | (y & 0x07FF))); + VIASETREG(HI_CENTEROFFSET, ((xoff << 16) | (yoff & 0x07FF))); + break; + } +} + +/* * Initial settings for displays. */ void @@ -138,46 +684,8 @@ if (primary) ViaCrtcMask(hwp, 0x99, 0x00, 0x10); - else - ViaCrtcMask(hwp, 0x99, 0x10, 0x10); -} - -static void -ViaCRTCSetGraphicsRegisters(ScrnInfoPtr pScrn) -{ - vgaHWPtr hwp = VGAHWPTR(pScrn); - - /* graphics registers */ - hwp->writeGr(hwp, 0x00, 0x00); - hwp->writeGr(hwp, 0x01, 0x00); - hwp->writeGr(hwp, 0x02, 0x00); - hwp->writeGr(hwp, 0x03, 0x00); - hwp->writeGr(hwp, 0x04, 0x00); - hwp->writeGr(hwp, 0x05, 0x40); - hwp->writeGr(hwp, 0x06, 0x05); - hwp->writeGr(hwp, 0x07, 0x0F); - hwp->writeGr(hwp, 0x08, 0xFF); - - ViaGrMask(hwp, 0x20, 0, 0xFF); - ViaGrMask(hwp, 0x21, 0, 0xFF); - ViaGrMask(hwp, 0x22, 0, 0xFF); -} - -static void -ViaCRTCSetAttributeRegisters(ScrnInfoPtr pScrn) -{ - vgaHWPtr hwp = VGAHWPTR(pScrn); - CARD8 i; - - /* attribute registers */ - for (i = 0; i <= 0xF; i++) { - hwp->writeAttr(hwp, i, i); - } - hwp->writeAttr(hwp, 0x10, 0x41); - hwp->writeAttr(hwp, 0x11, 0xFF); - hwp->writeAttr(hwp, 0x12, 0x0F); - hwp->writeAttr(hwp, 0x13, 0x00); - hwp->writeAttr(hwp, 0x14, 0x00); + else + ViaCrtcMask(hwp, 0x99, 0x10, 0x10); } void @@ -196,7 +704,7 @@ * X subsystem. So we just space out RGB values over the 256*3. */ switch (pScrn->bitsPerPixel) { - case 16: + case 15: for (i = start; i < numColors; i++) { hwp->writeDacWriteAddr(hwp, i * 4); for (j = 0; j < 4; j++) { @@ -207,6 +715,7 @@ } break; case 8: + case 16: case 24: case 32: for (i = start; i < numColors; i++) { @@ -256,17 +765,6 @@ } } -void -ViaCRTCInit(ScrnInfoPtr pScrn) -{ - vgaHWPtr hwp = VGAHWPTR(pScrn); - - hwp->writeSeq(hwp, 0x10, 0x01); /* unlock extended registers */ - ViaCrtcMask(hwp, 0x47, 0x00, 0x01); /* unlock CRT registers */ - ViaCRTCSetGraphicsRegisters(pScrn); - ViaCRTCSetAttributeRegisters(pScrn); -} - /* * Initialize common IGA (Integrated Graphics Accelerator) registers. */ @@ -275,6 +773,7 @@ { vgaHWPtr hwp = VGAHWPTR(pScrn); VIAPtr pVia = VIAPTR(pScrn); + CARD8 i; #ifdef HAVE_DEBUG CARD8 temp; #endif @@ -282,14 +781,106 @@ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Entered viaIGAInitCommon.\n")); + temp = hwp->readEnable(hwp); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Enable Register: 0x%02X\n", temp)); + hwp->writeEnable(hwp, temp | 0x01); + + temp = hwp->readMiscOut(hwp); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Misc. Register: 0x%02X\n", temp)); + hwp->writeMiscOut(hwp, temp | 0x22); + + temp = hwp->readEnable(hwp); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Enable Register: 0x%02X\n", temp)); + temp = hwp->readMiscOut(hwp); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Misc. Register: 0x%02X\n", temp)); + + + /* Sequencer Registers */ + ViaSeqMask(hwp, 0x00, 0x03, 0x03); + ViaSeqMask(hwp, 0x01, 0x01, 0x35); + ViaSeqMask(hwp, 0x02, 0x0F, 0x0F); + ViaSeqMask(hwp, 0x03, 0x00, 0x3F); + ViaSeqMask(hwp, 0x04, 0x0E, 0x0E); + + + /* Graphics Registers */ + hwp->writeGr(hwp, 0x00, 0x00); + hwp->writeGr(hwp, 0x01, 0x00); + hwp->writeGr(hwp, 0x02, 0x00); + hwp->writeGr(hwp, 0x03, 0x00); + hwp->writeGr(hwp, 0x04, 0x00); + hwp->writeGr(hwp, 0x05, 0x40); + hwp->writeGr(hwp, 0x06, 0x05); + hwp->writeGr(hwp, 0x07, 0x0F); + hwp->writeGr(hwp, 0x08, 0xFF); + + + /* Attribute Registers */ + for (i = 0; i <= 15; i++) { + hwp->writeAttr(hwp, i, i); + } + + hwp->writeAttr(hwp, 0x10, 0x41); + hwp->writeAttr(hwp, 0x11, 0xFF); + hwp->writeAttr(hwp, 0x12, 0x0F); + hwp->writeAttr(hwp, 0x13, 0x00); + hwp->writeAttr(hwp, 0x14, 0x00); + + /* Unlock VIA Technologies extended VGA registers. */ /* 3C5.10[0] - Unlock Accessing of I/O Space * 0: Disable * 1: Enable */ ViaSeqMask(hwp, 0x10, 0x01, 0x01); - ViaCRTCSetGraphicsRegisters(pScrn); - ViaCRTCSetAttributeRegisters(pScrn); + switch (pVia->Chipset) { + case VIA_CLE266: + case VIA_KM400: + case VIA_K8M800: + case VIA_PM800: + case VIA_P4M800PRO: + case VIA_CX700: + case VIA_P4M890: + case VIA_K8M890: + case VIA_P4M900: + case VIA_VX800: + /* 3X5.47[7] - IGA1 Timing Plus 2 VCK + * 3X5.47[6] - IGA1 Timing Plus 4 VCK + * 3X5.47[5] - Peep at the PCI-bus + * 0: Disable + * 1: Enable + * 3X5.47[4] - Reserved + * 3X5.47[3] - IGA1 Timing Plus 6 VCK + * 3X5.47[2] - DACOFF Backdoor Register + * 3X5.47[1] - LCD Simultaneous Mode Backdoor Register for + * 8/9 Dot Clocks + * 3X5.47[0] - LCD Simultaneous Mode Backdoor Register for + * Clock Select and CRTC Register Protect */ + ViaCrtcMask(hwp, 0x47, 0x00, 0x01); + break; + case VIA_VX855: + case VIA_VX900: + /* 3X5.47[7] - IGA1 Timing Plus 2 VCK + * 3X5.47[6] - IGA1 Timing Plus 4 VCK + * 3X5.47[5] - Peep at the PCI-bus + * 0: Disable + * 1: Enable + * 3X5.47[4] - CRT Timing Register Protect + * 3X5.47[3] - IGA1 Timing Plus 6 VCK + * 3X5.47[2] - DACOFF Backdoor Register + * 3X5.47[1] - LCD Simultaneous Mode Backdoor Register for + * 8/9 Dot Clocks + * 3X5.47[0] - LCD Simultaneous Mode Backdoor Register for + * Clock Select */ + ViaCrtcMask(hwp, 0x47, 0x00, 0x10); + break; + default: + break; + } #ifdef HAVE_DEBUG temp = hwp->readSeq(hwp, 0x15); @@ -301,15 +892,9 @@ temp = hwp->readSeq(hwp, 0x1A); DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "SR1A: 0x%02X\n", temp)); - temp = hwp->readSeq(hwp, 0x1B); - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "SR1B: 0x%02X\n", temp)); temp = hwp->readSeq(hwp, 0x1E); DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "SR1E: 0x%02X\n", temp)); - temp = hwp->readSeq(hwp, 0x2A); - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "SR2A: 0x%02X\n", temp)); temp = hwp->readSeq(hwp, 0x2D); DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "SR2D: 0x%02X\n", temp)); @@ -319,21 +904,27 @@ temp = hwp->readSeq(hwp, 0x3F); DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "SR3F: 0x%02X\n", temp)); - temp = hwp->readSeq(hwp, 0x65); - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "SR65: 0x%02X\n", temp)); temp = hwp->readCrtc(hwp, 0x36); DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "CR36: 0x%02X\n", temp)); - - /* For UniChrome Pro and Chrome9. */ - if ((pVia->Chipset != VIA_CLE266) - && (pVia->Chipset != VIA_KM400)) { - temp = hwp->readCrtc(hwp, 0x47); - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "CR47: 0x%02X\n", temp)); - } - + temp = hwp->readCrtc(hwp, 0x3B); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "CR3B: 0x%02X\n", temp)); + temp = hwp->readCrtc(hwp, 0x3C); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "CR3C: 0x%02X\n", temp)); + temp = hwp->readCrtc(hwp, 0x3D); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "CR3D: 0x%02X\n", temp)); + temp = hwp->readCrtc(hwp, 0x3E); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "CR3E: 0x%02X\n", temp)); + temp = hwp->readCrtc(hwp, 0x3F); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "CR3F: 0x%02X\n", temp)); + temp = hwp->readCrtc(hwp, 0x47); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "CR47: 0x%02X\n", temp)); temp = hwp->readCrtc(hwp, 0x6B); DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "CR6B: 0x%02X\n", temp)); @@ -346,6 +937,13 @@ #endif + + /* VIA Technologies Chrome Extended Graphics Registers */ + ViaGrMask(hwp, 0x20, 0, 0xFF); + ViaGrMask(hwp, 0x21, 0, 0xFF); + ViaGrMask(hwp, 0x22, 0, 0xFF); + + /* Be careful with 3C5.15[5] - Wrap Around Disable. * It must be set to 1 for correct operation. */ /* 3C5.15[7] - 8/6 Bits LUT @@ -421,57 +1019,15 @@ * Secondary Display’s LUT */ ViaSeqMask(hwp, 0x1A, 0x88, 0xC8); - /* Set DVP0 data drive strength to 0b11 (highest). */ - /* 3C5.1B[1] - DVP0 Data Drive Strength Bit [0] - * (It could be for DIP0 (Digital Interface Port 0) for - * CLE266. Reserved for CX700 / VX700 / VX800 / VX855 / - * VX900. These newer devices do not have DVP0.) */ - ViaSeqMask(hwp, 0x1B, 0x02, 0x02); - - /* Set DVP0 clock drive strength to 0b11 (highest). */ - /* 3C5.1E[7:6] - Video Capture Port Power Control - * 0x: Pad always off - * 10: Depend on the other control signal - * 11: Pad on/off according to the PMS - * 3C5.1E[5:4] - Digital Video Port 1 Power Control - * 0x: Pad always off - * 10: Depend on the other control signal - * 11: Pad on/off according to the PMS - * 3C5.1E[3] - Spread Spectrum On/Off + /* 3C5.1E[3] - Spread Spectrum On/Off * 0: Off * 1: On - * 3C5.1E[2] - DVP0 Clock Drive Strength Bit [0] - * (It could be for DIP0 (Digital Interface Port 0) for - * CLE266. Reserved for CX700 / VX700 / VX800 / VX855 / - * VX900. These newer devices do not have DVP0.) * 3C5.1E[1] - Replace ECK by MCK * For BIST purpose. * 3C5.1E[0] - On/Off ROC ECK * 0: Off * 1: On */ - ViaSeqMask(hwp, 0x1E, 0xF4, 0xF4); - - /* Set DVP0 data drive strength to 0b11 (highest). */ - /* Set DVP0 clock drive strength to 0b11 (highest). */ - /* 3C5.2A[7] - Reserved - * 3C5.2A[6] - The Spread Spectrum Type Control - * 0: Original Type - * 1: FIFO Type - * 3C5.2A[5] - DVP0 Data Drive Strength Bit [1] - * (Reserved for CX700 / VX700 / VX800 / VX855 / - * VX900. These devices do not have DVP0.) - * 3C5.2A[4] - DVP0 Clock Drive Strength Bit [1] - * (Reserved for CX700 / VX700 / VX800 / VX855 / - * VX900. These devices do not have DVP0.) - * 3C5.2A[3:2] - LVDS Channel 2 I/O Pad Control - * 0x: Pad always off - * 10: Depend on the other control signal - * 11: Pad on/off according to the PMS - * 3C5.2A[1:0] - LVDS Channel 1 and DVI I/O Pad Control - * 0x: Pad always off - * 10: Depend on the other control signal - * 11: Pad on/off according to the PMS */ - ViaSeqMask(hwp, 0x2A, 0x3F, 0x3F); + ViaSeqMask(hwp, 0x1E, 0x01, 0x09); /* 3C5.2D[7:6] - E3_ECK_N Selection * 00: E3_ECK_N @@ -533,20 +1089,6 @@ * 11: Clock on/off according to each engine IDLE status */ ViaSeqMask(hwp, 0x3F, 0xFF, 0xFF); - /* Set DVP1 data drive strength to 0b11 (highest). */ - /* Set DVP1 clock drive strength to 0b11 (highest). */ - /* 3C5.65[3:2] - DVP1 Clock Pads Driving Select - * 00: lowest - * 01: low - * 10: high - * 11: highest - * 3C5.65[1:0] - DVP1 Data Pads Driving Select - * 00: lowest - * 01: low - * 10: high - * 11: highest */ - ViaSeqMask(hwp, 0x65, 0x0F, 0x0F); - /* 3X5.36[7] - DPMS VSYNC Output * 3X5.36[6] - DPMS HSYNC Output * 3X5.36[5:4] - DPMS Control @@ -563,25 +1105,21 @@ * 1: Enable */ ViaCrtcMask(hwp, 0x36, 0x01, 0x01); - /* For UniChrome Pro and Chrome9. */ - if ((pVia->Chipset != VIA_CLE266) - && (pVia->Chipset != VIA_KM400)) { - /* 3X5.47[7] - IGA1 Timing Plus 2 VCK - * 3X5.47[6] - IGA1 Timing Plus 4 VCK - * 3X5.47[5] - Peep at the PCI-bus - * 0: Disable - * 1: Enable - * 3X5.47[4] - Reserved - * 3X5.47[3] - IGA1 Timing Plus 6 VCK - * 3X5.47[2] - DACOFF Backdoor Register - * 3X5.47[1] - LCD Simultaneous Mode Backdoor Register for - * 8/9 Dot Clocks - * 3X5.47[0] - LCD Simultaneous Mode Backdoor Register for - * Clock Select and CRTC Register Protect - * - */ - ViaCrtcMask(hwp, 0x47, 0x00, 0x23); - } + /* 3X5.3B through 3X5.3F are scratch pad registers. */ + ViaCrtcMask(hwp, 0x3B, pVia->originalCR3B, 0xFF); + ViaCrtcMask(hwp, 0x3C, pVia->originalCR3C, 0xFF); + ViaCrtcMask(hwp, 0x3D, pVia->originalCR3D, 0xFF); + ViaCrtcMask(hwp, 0x3E, pVia->originalCR3E, 0xFF); + ViaCrtcMask(hwp, 0x3F, pVia->originalCR3F, 0xFF); + + /* 3X5.47[5] - Peep at the PCI-bus + * 0: Disable + * 1: Enable + * 3X5.47[1] - LCD Simultaneous Mode Backdoor Register for + * 8/9 Dot Clocks + * 3X5.47[0] - LCD Simultaneous Mode Backdoor Register for + * Clock Select and CRTC Register Protect */ + ViaCrtcMask(hwp, 0x47, 0x00, 0x23); /* 3X5.6B[3] - Simultaneous Display Enable * 0: Disable @@ -868,37 +1406,19 @@ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "IGA1 Requested Screen Mode: %s\n", mode->name); - ViaCrtcMask(hwp, 0x11, 0x00, 0x80); /* modify starting address */ - ViaCrtcMask(hwp, 0x03, 0x80, 0x80); /* enable vertical retrace access */ - - /* Set Misc Register */ - temp = 0x23; - if (mode->Flags & V_NHSYNC) - temp |= 0x40; - if (mode->Flags & V_NVSYNC) - temp |= 0x80; - temp |= 0x0C; /* Undefined/external clock */ - hwp->writeMiscOut(hwp, temp); - - /* Sequence registers */ - hwp->writeSeq(hwp, 0x00, 0x00); - -#if 0 - if (mode->Flags & V_CLKDIV2) - hwp->writeSeq(hwp, 0x01, 0x09); - else -#endif - hwp->writeSeq(hwp, 0x01, 0x01); - - hwp->writeSeq(hwp, 0x02, 0x0F); - hwp->writeSeq(hwp, 0x03, 0x00); - hwp->writeSeq(hwp, 0x04, 0x0E); + if (mode->Flags & V_CLKDIV2) { + ViaSeqMask(hwp, 0x01, 0x08, 0x08); + } else { + ViaSeqMask(hwp, 0x01, 0x00, 0x08); + } + ViaCrtcMask(hwp, 0x03, 0x80, 0x80); /* enable vertical retrace access */ /* Setting maximum scan line to 0. */ /* 3X5.09[4:0] - Maximum Scan Line */ ViaCrtcMask(hwp, 0x09, 0x00, 0x1F); + ViaCrtcMask(hwp, 0x11, 0x00, 0x80); /* modify starting address */ /* 3X5.14[6] - Double Word Mode * Allows normal addressing or double-word addressing. @@ -925,45 +1445,6 @@ ViaCrtcMask(hwp, 0x35, temp >> 6, 0x10); - /* Set the color depth for IGA1. */ - switch (pScrn->bitsPerPixel) { - case 8: - /* Only CLE266.AX uses 6-bit LUT. */ - if (pVia->Chipset == VIA_CLE266 && pVia->ChipRev < 15) { - /* 6-bit LUT */ - /* 3C5.15[7] - 8/6 Bits LUT - * 0: 6-bit - * 1: 8-bit - * 3C5.15[4] - Hi Color Mode Select - * 0: 555 - * 1: 565 - * 3C5.15[3:2] - Display Color Depth Select - * 00: 8bpp - * 01: 16bpp - * 10: 30bpp - * 11: 32bpp */ - ViaSeqMask(hwp, 0x15, 0x00, 0x9C); - } else { - /* 8-bit LUT */ - ViaSeqMask(hwp, 0x15, 0x80, 0x9C); - } - - break; - case 16: - ViaSeqMask(hwp, 0x15, 0x94, 0x9C); - break; - case 24: - case 32: - ViaSeqMask(hwp, 0x15, 0x9C, 0x9C); - break; - default: - xf86DrvMsg(pScrn->scrnIndex, X_ERROR, - "Unsupported color depth: %d\n", - pScrn->bitsPerPixel); - break; - } - - /* 3X5.32[7:5] - HSYNC Delay Number by VCLK * 000: No delay * 001: Delay + 4 VCKs @@ -1016,12 +1497,14 @@ * 111: Shift to early time by 2 characters */ ViaCrtcMask(hwp, 0x33, 0x05, 0x4F); - /* Set IGA1 to linear mode */ - /* 3X5.43[2] - IGA1 Address Mode Selection - * 0: Linear - * 1: Tile */ - ViaCrtcMask(hwp, 0x43, 0x00, 0x04); - + /* UniChrome Pro or later */ + if ((pVia->Chipset != VIA_CLE266) && (pVia->Chipset != VIA_KM400)) { + /* Set IGA1 to linear mode. */ + /* 3X5.43[2] - IGA1 Address Mode Selection + * 0: Linear + * 1: Tile */ + ViaCrtcMask(hwp, 0x43, 0x00, 0x04); + } /* Set IGA1 horizontal total.*/ /* Due to IGA1 horizontal total being only 9 bits wide, @@ -1041,9 +1524,9 @@ /* Set IGA1 horizontal display end. */ - /* Due to IGA1 horizontal display end being only 8 bits wide, - * the adjusted horizontal display end needs to be shifted by - * 3 bit positions to the right. + /* Due to IGA1 horizontal display end being only 8 bits + * or 9 bits (for VX900 chipset) wide, the adjusted horizontal + * display end needs to be shifted by 3 bit positions to the right. * In addition to that, this particular register requires the * value to be 1 less than the actual value being written. */ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, @@ -1053,11 +1536,17 @@ /* 3X5.01[7:0] - Horizontal Display End Bits [7:0] */ hwp->writeCrtc(hwp, 0x01, temp & 0xFF); + if (pVia->Chipset == VIA_VX900) { + /* 3X5.45[1] - Horizontal Display End Bit [8] */ + ViaCrtcMask(hwp, 0x45, temp >> 7, 0x02); + } + /* Set IGA1 horizontal blank start. */ - /* Due to IGA1 horizontal blank start being only 8 bits wide, - * the adjusted horizontal blank start needs to be shifted by - * 3 bit positions to the right. */ + /* Due to IGA1 horizontal blank start being only 8 bits or + * 9 bits (for VX900 chipset) wide, the adjusted horizontal + * blank start needs to be shifted by 3 bit positions to the + * right. */ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "IGA1 CrtcHBlankStart: %d\n", mode->CrtcHBlankStart)); temp = mode->CrtcHBlankStart >> 3; @@ -1065,6 +1554,11 @@ /* 3X5.02[7:0] - Horizontal Blanking Start Bits [7:0] */ hwp->writeCrtc(hwp, 0x02, temp & 0xFF); + if (pVia->Chipset == VIA_VX900) { + /* 3X5.45[2] - Horizontal Blanking Start Bit [8] */ + ViaCrtcMask(hwp, 0x45, temp >> 6, 0x04); + } + /* Set IGA1 horizontal blank end. */ /* After shifting horizontal blank end by 3 bit positions to the @@ -1218,12 +1712,6 @@ /* Set IGA1 horizontal offset adjustment. */ temp = (pScrn->displayWidth * (pScrn->bitsPerPixel >> 3)) >> 3; - /* Make sure that this is 32-byte aligned. */ - if (temp & 0x03) { - temp += 0x03; - temp &= ~0x03; - } - /* 3X5.13[7:0] - Primary Display Horizontal Offset Bits [7:0] */ hwp->writeCrtc(hwp, 0x13, temp & 0xFF); @@ -1232,17 +1720,7 @@ /* Set IGA1 horizontal display fetch (read) count. */ - temp = (mode->CrtcHDisplay * (pScrn->bitsPerPixel >> 3)) >> 3; - - /* Make sure that this is 32-byte aligned. */ - if (temp & 0x03) { - temp += 0x03; - temp &= ~0x03; - } - - /* Primary Display Horizontal Display Fetch Count Data needs to be - * 16-byte aligned. */ - temp = temp >> 1; + temp = (mode->CrtcHDisplay * (pScrn->bitsPerPixel >> 3)) >> 4; /* 3C5.1C[7:0] - Primary Display Horizontal Display * Fetch Count Data Bits [7:0] */ @@ -1263,6 +1741,8 @@ static ModeStatus viaIGA1ModeValid(ScrnInfoPtr pScrn, DisplayModePtr mode) { + VIAPtr pVia = VIAPTR(pScrn); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Entered viaIGA1ModeValid.\n")); @@ -1279,10 +1759,16 @@ if (mode->CrtcHTotal > (4096 + ((1 << 3) * (5 - 1)))) return MODE_BAD_HVALUE; - if (mode->CrtcHDisplay > 2048) + if (((pVia->Chipset != VIA_VX900) + && (mode->CrtcHDisplay > 2048)) + || ((pVia->Chipset == VIA_VX900) + && (mode->CrtcHDisplay > 4096))) return MODE_BAD_HVALUE; - if (mode->CrtcHBlankStart > 2048) + if (((pVia->Chipset != VIA_VX900) + && (mode->CrtcHBlankStart > 2048)) + || ((pVia->Chipset == VIA_VX900) + && (mode->CrtcHBlankStart > 4096))) return MODE_BAD_HVALUE; if ((mode->CrtcHBlankEnd - mode->CrtcHBlankStart) > 1025) @@ -1309,12 +1795,239 @@ if (mode->CrtcVBlankStart > 2048) return MODE_BAD_VVALUE; - if ((mode->CrtcVBlankEnd - mode->CrtcVBlankStart) > 257) - return MODE_VBLANK_WIDE; + if ((mode->CrtcVBlankEnd - mode->CrtcVBlankStart) > 257) + return MODE_VBLANK_WIDE; + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting viaIGA1ModeValid.\n")); + return MODE_OK; +} + +static void +ViaSetCLE266APrimaryFIFO(ScrnInfoPtr pScrn, Bool Enable) +{ + VIAPtr pVia = VIAPTR(pScrn); + CARD32 dwGE230, dwGE298; + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "ViaSetCLE266APrimaryFIFO: %d\n", Enable)); + + dwGE298 = VIAGETREG(0x298); + VIASETREG(0x298, dwGE298 | 0x20000000); + + dwGE230 = VIAGETREG(0x230); + if (Enable) + dwGE230 |= 0x00200000; + else + dwGE230 &= ~0x00200000; + VIASETREG(0x230, dwGE230); + + dwGE298 = VIAGETREG(0x298); + VIASETREG(0x298, dwGE298 & ~0x20000000); +} + +static void +ViaSetPrimaryExpireNumber(ScrnInfoPtr pScrn, DisplayModePtr mode, + ViaExpireNumberTable *Expire) +{ + vgaHWPtr hwp = VGAHWPTR(pScrn); + VIAPtr pVia = VIAPTR(pScrn); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "ViaSetPrimaryExpireNumber\n")); + + for (; Expire->X; Expire++) + if ((Expire->X == mode->CrtcHDisplay) && + (Expire->Y == mode->CrtcVDisplay) && + (Expire->Bpp == pScrn->bitsPerPixel) && + (Expire->bRamClock == pVia->MemClk)) { + ViaSeqMask(hwp, 0x22, Expire->bTuningValue, 0x1F); + return; + } +} + +static void +ViaSetPrimaryFIFO(ScrnInfoPtr pScrn, DisplayModePtr mode) +{ + vgaHWPtr hwp = VGAHWPTR(pScrn); + VIAPtr pVia = VIAPTR(pScrn); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "ViaSetPrimaryFIFO\n")); + + /* Standard values. */ + ViaSeqMask(hwp, 0x17, 0x1F, 0xFF); + + if (mode->CrtcHDisplay >= 1600) { + ViaSeqMask(hwp, 0x16, 0x0F, 0xBF); + ViaSeqMask(hwp, 0x18, 0x4F, 0xFF); + } else if (mode->CrtcHDisplay >= 1024) { + ViaSeqMask(hwp, 0x16, 0x0C, 0xBF); + ViaSeqMask(hwp, 0x18, 0x4C, 0xFF); + } else { + ViaSeqMask(hwp, 0x16, 0x08, 0xBF); + ViaSeqMask(hwp, 0x18, 0x4E, 0xFF); + } + + switch (pVia->Chipset) { + case VIA_CLE266: + if (CLE266_REV_IS_CX(pVia->ChipRev)) { + if (pVia->HasSecondary) { /* SAMM or DuoView case */ + if (mode->HDisplay >= 1024) { + ViaSeqMask(hwp, 0x16, 0x1C, 0x3F); /* 28 */ + hwp->writeSeq(hwp, 0x17, 0x3F); /* 63 */ + hwp->writeSeq(hwp, 0x18, 0x57); /* 23 */ + } + } else { /* Single view or Simultaneous case */ +#if 0 + if (mode->HDisplay > 1024) { + ViaSeqMask(hwp, 0x16, 0x17, 0x3F); /* 23 */ + hwp->writeSeq(hwp, 0x17, 0x2F); /* 47 */ + hwp->writeSeq(hwp, 0x18, 0x57); /* 23 */ + } +#endif + } + ViaSetPrimaryExpireNumber(pScrn, mode, CLE266CExpireNumber); + } else { + if ((mode->HDisplay > 1024) && pVia->HasSecondary) { + ViaSetCLE266APrimaryFIFO(pScrn, TRUE); + + ViaSeqMask(hwp, 0x16, 0x17, 0x3F); /* 23 */ + hwp->writeSeq(hwp, 0x17, 0x2F); /* 47 */ + hwp->writeSeq(hwp, 0x18, 0x57); /* 23 */ + } + ViaSetPrimaryExpireNumber(pScrn, mode, CLE266AExpireNumber); + } + break; + case VIA_KM400: + if (pVia->HasSecondary) { /* SAMM or DuoView case */ + if ((mode->HDisplay >= 1600) && + (pVia->MemClk <= VIA_MEM_DDR200)) { + ViaSeqMask(hwp, 0x16, 0x09, 0x3F); /* 9 */ + hwp->writeSeq(hwp, 0x17, 0x1C); /* 28 */ + } else { + ViaSeqMask(hwp, 0x16, 0x1C, 0x3F); /* 28 */ + hwp->writeSeq(hwp, 0x17, 0x3F); /* 63 */ + } + } else { + if ((mode->HDisplay > 1280)) + ViaSeqMask(hwp, 0x16, 0x1C, 0x3F); /* 28 */ + else if (mode->HDisplay > 1024) + ViaSeqMask(hwp, 0x16, 0x17, 0x3F); /* 23 */ + else + ViaSeqMask(hwp, 0x16, 0x10, 0x3F); /* 16 */ + hwp->writeSeq(hwp, 0x17, 0x3F); /* 63 */ + } + hwp->writeSeq(hwp, 0x18, 0x57); /* 23 */ + ViaSetPrimaryExpireNumber(pScrn, mode, KM400ExpireNumber); + break; + case VIA_K8M800: + hwp->writeSeq(hwp, 0x17, 0xBF); /* 384/2 - 1 = 191 */ + ViaSeqMask(hwp, 0x16, 0x92, 0xBF); /* 328/4 = 82 = 0x52 */ + ViaSeqMask(hwp, 0x18, 0x8a, 0xBF); /* 74 */ + + if ((mode->HDisplay >= 1400) && (pScrn->bitsPerPixel == 32)) + ViaSeqMask(hwp, 0x22, 0x10, 0x1F); /* 64/4 = 16 */ + else + ViaSeqMask(hwp, 0x22, 0x00, 0x1F); /* 128/4 = overflow = 0 */ + break; + /* PM800/PM880/CN400 */ + case VIA_PM800: + hwp->writeSeq(hwp, 0x17, 0x5F); /* 95 */ + ViaSeqMask(hwp, 0x16, 0x20, 0xBF); /* 32 */ + ViaSeqMask(hwp, 0x18, 0x10, 0xBF); /* 16 */ + + if ((mode->HDisplay >= 1400) && (pScrn->bitsPerPixel == 32)) + ViaSeqMask(hwp, 0x22, 0x10, 0x1F); /* 64/4 = 16 */ + else + ViaSeqMask(hwp, 0x22, 0x1F, 0x1F); /* 31 */ + break; + /* P4M800 Pro/VN800/CN700 */ + case VIA_P4M800PRO: + hwp->writeSeq(hwp, 0x17, 0x2F); + ViaSeqMask(hwp, 0x16, 0x14, 0xBF); /* 80/4 = 20 = 0x14 */ + ViaSeqMask(hwp, 0x18, 0x08, 0xBF); + + if ((mode->HDisplay >= 1400) && (pScrn->bitsPerPixel == 32)) + ViaSeqMask(hwp, 0x22, 0x10, 0x1F); + else + ViaSeqMask(hwp, 0x22, 0x00, 0x1F); + break; + case VIA_K8M890: + /* depth location: {SR17,0,7} */ + hwp->writeSeq(hwp, 0x17, 0xB3); /* 360/2-1 = 179 = 0xB3 */ + /* Formula (x & 0x3F) | ((x & 0x40) << 1) */ + /* threshold location: {SR16,0,5},{SR16,7,7} */ + ViaSeqMask(hwp, 0x16, 0x92, 0xBF); /* 328/4 = 82 = 0x52 */ + /* high threshold location: {SR18,0,5},{SR18,7,7} */ + ViaSeqMask(hwp, 0x18, 0x8A, 0xBF); /* 296/4 = 74 = 0x4A */ + /* display queue expire num location: {SR22,0,4}. */ + ViaSeqMask(hwp, 0x22, 0x1F, 0x1F); /* 124/4 = 31 = 0x1F */ + break; + case VIA_P4M900: + /* location: {SR17,0,7} */ + hwp->writeSeq(hwp, 0x17, 0x2F); /* 96/2-1 = 47 = 0x2F */ + /* location: {SR16,0,5},{SR16,7,7} */ + ViaSeqMask(hwp, 0x16, 0x13, 0xBF); /* 76/4 = 19 = 0x13 */ + /* location: {SR18,0,5},{SR18,7,7} */ + ViaSeqMask(hwp, 0x18, 0x13, 0xBF); /* 76/4 = 19 = 0x13 */ + /* location: {SR22,0,4}. */ + ViaSeqMask(hwp, 0x22, 0x08, 0x1F); /* 32/4 = 8 = 0x08 */ + break; + case VIA_P4M890: + hwp->writeSeq(hwp, 0x17, 0x2F); /* 96/2-1 = 47 = 0x2F */ + ViaSeqMask(hwp, 0x16, 0x13, 0xBF); /* 76/4 = 19 = 0x13 */ + ViaSeqMask(hwp, 0x18, 0x10, 0xBF); /* 64/4 = 16 = 0x10 */ + ViaSeqMask(hwp, 0x22, 0x08, 0x1F); /* 32/4 = 8 = 0x08 */ + break; + case VIA_CX700: + hwp->writeSeq(hwp, 0x17, 0x5F); + ViaSeqMask(hwp, 0x16, 0x20, 0xBF); /* 128/4 = 32 = 0x20 */ + ViaSeqMask(hwp, 0x18, 0x20, 0xBF); /* 128/4 = 32 = 0x20 */ + ViaSeqMask(hwp, 0x22, 0x1F, 0x1F); /* 124/4 = 31 = 0x1F */ + break; + case VIA_VX800: + hwp->writeSeq(hwp, 0x17, 0x5F); /* 192/2-1 = 95 = 0x5F */ + hwp->writeSeq(hwp, 0x16, 0x26); /* 152/4 = 38 = 0x26 */ + hwp->writeSeq(hwp, 0x18, 0x26); /* 152/4 = 38 */ + hwp->writeSeq(hwp, 0x22, 0x10); /* 64/4 = 16 */ + break; + case VIA_VX855: + hwp->writeSeq(hwp, 0x17, 0xC7); /* 400/2-1 = 199 = 0xC7 */ + /* Formula for {SR16,0,5},{SR16,7,7} is: (0x50 & 0x3F) | ((0x50 & 0x40) << 1) = 0x90 */ + hwp->writeSeq(hwp, 0x16, 0x90); /* 320/4 = 80 = 0x50 */ + /* Formula for {SR18,0,5},{SR18,7,7} is: (0x50 & 0x3F) | ((0x50 & 0x40) << 1) = 0x90 */ + hwp->writeSeq(hwp, 0x18, 0x90); /* 320/4 = 80 = 0x50 */ + hwp->writeSeq(hwp, 0x22, 0x28); /* 160/4 = 40 = 0x28 */ + break; + case VIA_VX900: + hwp->writeSeq(hwp, 0x17, 0xC7); /* 400/2-1 = 199 = 0xC7 */ + /* Formula for {SR16,0,5},{SR16,7,7} is: (0x50 & 0x3F) | ((0x50 & 0x40) << 1) = 0x90 */ + hwp->writeSeq(hwp, 0x16, 0x90); /* 320/4 = 80 = 0x50 */ + /* Formula for {SR18,0,5},{SR18,7,7} is: (0x50 & 0x3F) | ((0x50 & 0x40) << 1) = 0x90 */ + hwp->writeSeq(hwp, 0x18, 0x90); /* 320/4 = 80 = 0x50 */ + hwp->writeSeq(hwp, 0x22, 0x28); /* 160/4 = 40 = 0x28 */ + break; + default: + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "ViaSetPrimaryFIFO: " + "Chipset %d not implemented\n", pVia->Chipset); + break; + } +} + +/* + * Turn off the primary FIFO only for CLE266A. + */ +static void +ViaDisablePrimaryFIFO(ScrnInfoPtr pScrn) +{ + VIAPtr pVia = VIAPTR(pScrn); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "ViaDisablePrimaryFIFO\n")); - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Exiting viaIGA1ModeValid.\n")); - return MODE_OK; + /* Needed because exiting from X-Window will dump back register values. + * Other chipsets have no need to set extended FIFO values. */ + if ((pVia->Chipset == VIA_CLE266) && CLE266_REV_IS_AX(pVia->ChipRev) && + ((pScrn->currentMode->HDisplay > 1024) || pVia->HasSecondary)) + ViaSetCLE266APrimaryFIFO(pScrn, FALSE); } void @@ -1327,29 +2040,35 @@ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Entered viaIGA1Save.\n")); + vgaHWProtect(pScrn, TRUE); + + vgaHWSave(pScrn, &hwp->SavedReg, VGA_SR_ALL); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Saving sequencer registers.\n")); /* Unlock extended registers. */ hwp->writeSeq(hwp, 0x10, 0x01); - Regs->SR14 = hwp->readSeq(hwp, 0x14); - Regs->SR15 = hwp->readSeq(hwp, 0x15); - Regs->SR16 = hwp->readSeq(hwp, 0x16); - Regs->SR17 = hwp->readSeq(hwp, 0x17); - Regs->SR18 = hwp->readSeq(hwp, 0x18); - Regs->SR19 = hwp->readSeq(hwp, 0x19); + Regs->SR[0x14] = hwp->readSeq(hwp, 0x14); + Regs->SR[0x15] = hwp->readSeq(hwp, 0x15); + Regs->SR[0x16] = hwp->readSeq(hwp, 0x16); + Regs->SR[0x17] = hwp->readSeq(hwp, 0x17); + Regs->SR[0x18] = hwp->readSeq(hwp, 0x18); + Regs->SR[0x19] = hwp->readSeq(hwp, 0x19); /* PCI Bus Control */ - Regs->SR1A = hwp->readSeq(hwp, 0x1A); + Regs->SR[0x1A] = hwp->readSeq(hwp, 0x1A); - Regs->SR1B = hwp->readSeq(hwp, 0x1B); - Regs->SR1C = hwp->readSeq(hwp, 0x1C); - Regs->SR1D = hwp->readSeq(hwp, 0x1D); - Regs->SR1E = hwp->readSeq(hwp, 0x1E); - Regs->SR1F = hwp->readSeq(hwp, 0x1F); - - Regs->SR22 = hwp->readSeq(hwp, 0x22); + Regs->SR[0x1B] = hwp->readSeq(hwp, 0x1B); + Regs->SR[0x1C] = hwp->readSeq(hwp, 0x1C); + Regs->SR[0x1D] = hwp->readSeq(hwp, 0x1D); + Regs->SR[0x1E] = hwp->readSeq(hwp, 0x1E); + Regs->SR[0x1F] = hwp->readSeq(hwp, 0x1F); + + Regs->SR[0x20] = hwp->readSeq(hwp, 0x20); + Regs->SR[0x21] = hwp->readSeq(hwp, 0x21); + Regs->SR[0x22] = hwp->readSeq(hwp, 0x22); /* Registers 3C5.23 through 3C5.25 are not used by Chrome9. * Registers 3C5.27 through 3C5.29 are not used by Chrome9. */ @@ -1361,24 +2080,24 @@ case VIA_P4M800PRO: case VIA_CX700: case VIA_P4M890: - Regs->SR23 = hwp->readSeq(hwp, 0x23); - Regs->SR24 = hwp->readSeq(hwp, 0x24); - Regs->SR25 = hwp->readSeq(hwp, 0x25); - - Regs->SR27 = hwp->readSeq(hwp, 0x27); - Regs->SR28 = hwp->readSeq(hwp, 0x28); - Regs->SR29 = hwp->readSeq(hwp, 0x29); + Regs->SR[0x23] = hwp->readSeq(hwp, 0x23); + Regs->SR[0x24] = hwp->readSeq(hwp, 0x24); + Regs->SR[0x25] = hwp->readSeq(hwp, 0x25); + + Regs->SR[0x27] = hwp->readSeq(hwp, 0x27); + Regs->SR[0x28] = hwp->readSeq(hwp, 0x28); + Regs->SR[0x29] = hwp->readSeq(hwp, 0x29); break; default: break; } - Regs->SR26 = hwp->readSeq(hwp, 0x26); + Regs->SR[0x26] = hwp->readSeq(hwp, 0x26); - Regs->SR2A = hwp->readSeq(hwp, 0x2A); - Regs->SR2B = hwp->readSeq(hwp, 0x2B); - Regs->SR2D = hwp->readSeq(hwp, 0x2D); - Regs->SR2E = hwp->readSeq(hwp, 0x2E); + Regs->SR[0x2A] = hwp->readSeq(hwp, 0x2A); + Regs->SR[0x2B] = hwp->readSeq(hwp, 0x2B); + Regs->SR[0x2D] = hwp->readSeq(hwp, 0x2D); + Regs->SR[0x2E] = hwp->readSeq(hwp, 0x2E); /* Save PCI Configuration Memory Base Shadow 0 and 1. * These registers are available only in UniChrome, UniChrome Pro, @@ -1391,8 +2110,8 @@ case VIA_P4M800PRO: case VIA_CX700: case VIA_P4M890: - Regs->SR2F = hwp->readSeq(hwp, 0x2F); - Regs->SR30 = hwp->readSeq(hwp, 0x30); + Regs->SR[0x2F] = hwp->readSeq(hwp, 0x2F); + Regs->SR[0x30] = hwp->readSeq(hwp, 0x30); break; default: break; @@ -1402,14 +2121,14 @@ * For UniChrome, register 3C5.44 through 3C5.4B are saved. * For UniChrome Pro and Chrome9, register 3C5.44 through 3C5.4C * are saved. */ - Regs->SR44 = hwp->readSeq(hwp, 0x44); - Regs->SR45 = hwp->readSeq(hwp, 0x45); - Regs->SR46 = hwp->readSeq(hwp, 0x46); - Regs->SR47 = hwp->readSeq(hwp, 0x47); - Regs->SR48 = hwp->readSeq(hwp, 0x48); - Regs->SR49 = hwp->readSeq(hwp, 0x49); - Regs->SR4A = hwp->readSeq(hwp, 0x4A); - Regs->SR4B = hwp->readSeq(hwp, 0x4B); + Regs->SR[0x44] = hwp->readSeq(hwp, 0x44); + Regs->SR[0x45] = hwp->readSeq(hwp, 0x45); + Regs->SR[0x46] = hwp->readSeq(hwp, 0x46); + Regs->SR[0x47] = hwp->readSeq(hwp, 0x47); + Regs->SR[0x48] = hwp->readSeq(hwp, 0x48); + Regs->SR[0x49] = hwp->readSeq(hwp, 0x49); + Regs->SR[0x4A] = hwp->readSeq(hwp, 0x4A); + Regs->SR[0x4B] = hwp->readSeq(hwp, 0x4B); switch (pVia->Chipset) { case VIA_PM800: @@ -1422,21 +2141,20 @@ case VIA_VX800: case VIA_VX855: case VIA_VX900: + Regs->SR[0x4C] = hwp->readSeq(hwp, 0x4C); - Regs->SR4C = hwp->readSeq(hwp, 0x4C); + /* Save register 3C5.4D. + * According to CX700 / VX700 (UniChrome Pro II) Open Graphics + * Programming Manual Part I: Graphics Core / 2D, + * this register is called Dual Channel Memory Control. + * According to VX800 / VX855 / VX900 (Chrome9 HC3 / HCM / HD) + * Open Graphics Programming Manual Part I: Graphics Core / 2D, + * this register is called Preemptive Arbiter Control. + * It is likely that this register is also supported in UniChrome Pro. */ + Regs->SR[0x4D] = hwp->readSeq(hwp, 0x4D); - /* Save register 3C5.4D. - * According to CX700 / VX700 (UniChrome Pro II) Open Graphics - * Programming Manual Part I: Graphics Core / 2D, - * this register is called Dual Channel Memory Control. - * According to VX800 / VX855 / VX900 (Chrome9 HC3 / HCM / HD) - * Open Graphics Programming Manual Part I: Graphics Core / 2D, - * this register is called Preemptive Arbiter Control. - * It is likely that this register is also supported in UniChrome Pro. */ - Regs->SR4D = hwp->readSeq(hwp, 0x4D); - - Regs->SR4E = hwp->readSeq(hwp, 0x4E); - Regs->SR4F = hwp->readSeq(hwp, 0x4F); + Regs->SR[0x4E] = hwp->readSeq(hwp, 0x4E); + Regs->SR[0x4F] = hwp->readSeq(hwp, 0x4F); break; default: break; @@ -1460,21 +2178,20 @@ case VIA_VX800: case VIA_VX855: case VIA_VX900: - /* Display Fetch Blocking Control */ - Regs->CR30 = hwp->readCrtc(hwp, 0x30); + Regs->CR[0x30] = hwp->readCrtc(hwp, 0x30); /* Half Line Position */ - Regs->CR31 = hwp->readCrtc(hwp, 0x31); + Regs->CR[0x31] = hwp->readCrtc(hwp, 0x31); break; default: break; } - Regs->CR32 = hwp->readCrtc(hwp, 0x32); - Regs->CR33 = hwp->readCrtc(hwp, 0x33); - Regs->CR35 = hwp->readCrtc(hwp, 0x35); - Regs->CR36 = hwp->readCrtc(hwp, 0x36); + Regs->CR[0x32] = hwp->readCrtc(hwp, 0x32); + Regs->CR[0x33] = hwp->readCrtc(hwp, 0x33); + Regs->CR[0x35] = hwp->readCrtc(hwp, 0x35); + Regs->CR[0x36] = hwp->readCrtc(hwp, 0x36); /* UniChrome Pro or later */ switch (pVia->Chipset) { @@ -1488,24 +2205,23 @@ case VIA_VX800: case VIA_VX855: case VIA_VX900: - /* DAC Control Register */ - Regs->CR37 = hwp->readCrtc(hwp, 0x37); + Regs->CR[0x37] = hwp->readCrtc(hwp, 0x37); break; default: break; } - Regs->CR38 = hwp->readCrtc(hwp, 0x38); - Regs->CR39 = hwp->readCrtc(hwp, 0x39); - Regs->CR3A = hwp->readCrtc(hwp, 0x3A); - Regs->CR3B = hwp->readCrtc(hwp, 0x3B); - Regs->CR3C = hwp->readCrtc(hwp, 0x3C); - Regs->CR3D = hwp->readCrtc(hwp, 0x3D); - Regs->CR3E = hwp->readCrtc(hwp, 0x3E); - Regs->CR3F = hwp->readCrtc(hwp, 0x3F); + Regs->CR[0x38] = hwp->readCrtc(hwp, 0x38); + Regs->CR[0x39] = hwp->readCrtc(hwp, 0x39); + Regs->CR[0x3A] = hwp->readCrtc(hwp, 0x3A); + Regs->CR[0x3B] = hwp->readCrtc(hwp, 0x3B); + Regs->CR[0x3C] = hwp->readCrtc(hwp, 0x3C); + Regs->CR[0x3D] = hwp->readCrtc(hwp, 0x3D); + Regs->CR[0x3E] = hwp->readCrtc(hwp, 0x3E); + Regs->CR[0x3F] = hwp->readCrtc(hwp, 0x3F); - Regs->CR40 = hwp->readCrtc(hwp, 0x40); + Regs->CR[0x40] = hwp->readCrtc(hwp, 0x40); /* UniChrome Pro or later */ switch (pVia->Chipset) { @@ -1519,23 +2235,22 @@ case VIA_VX800: case VIA_VX855: case VIA_VX900: - - Regs->CR43 = hwp->readCrtc(hwp, 0x43); - Regs->CR45 = hwp->readCrtc(hwp, 0x45); + Regs->CR[0x43] = hwp->readCrtc(hwp, 0x43); + Regs->CR[0x45] = hwp->readCrtc(hwp, 0x45); break; default: break; } - Regs->CR46 = hwp->readCrtc(hwp, 0x46); - Regs->CR47 = hwp->readCrtc(hwp, 0x47); + Regs->CR[0x46] = hwp->readCrtc(hwp, 0x46); + Regs->CR[0x47] = hwp->readCrtc(hwp, 0x47); /* Starting Address */ /* Start Address High */ - Regs->CR0C = hwp->readCrtc(hwp, 0x0C); + Regs->CR[0x0C] = hwp->readCrtc(hwp, 0x0C); /* Start Address Low */ - Regs->CR0D = hwp->readCrtc(hwp, 0x0D); + Regs->CR[0x0D] = hwp->readCrtc(hwp, 0x0D); /* UniChrome Pro or later */ switch (pVia->Chipset) { @@ -1549,20 +2264,21 @@ case VIA_VX800: case VIA_VX855: case VIA_VX900: - /* Starting Address Overflow[28:24] */ - Regs->CR48 = hwp->readCrtc(hwp, 0x48); + Regs->CR[0x48] = hwp->readCrtc(hwp, 0x48); break; default: break; } /* Starting Address Overflow[23:16] */ - Regs->CR34 = hwp->readCrtc(hwp, 0x34); + Regs->CR[0x34] = hwp->readCrtc(hwp, 0x34); DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Finished saving IGA1 registers.\n")); + vgaHWProtect(pScrn, FALSE); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Exiting viaIGA1Save.\n")); } @@ -1577,29 +2293,32 @@ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Entered viaIGA1Restore.\n")); - /* Unlock extended registers. */ - hwp->writeSeq(hwp, 0x10, 0x01); + vgaHWProtect(pScrn, TRUE); + + vgaHWRestore(pScrn, &hwp->SavedReg, VGA_SR_ALL); DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Restoring sequencer registers.\n")); - hwp->writeSeq(hwp, 0x14, Regs->SR14); - hwp->writeSeq(hwp, 0x15, Regs->SR15); - hwp->writeSeq(hwp, 0x16, Regs->SR16); - hwp->writeSeq(hwp, 0x17, Regs->SR17); - hwp->writeSeq(hwp, 0x18, Regs->SR18); - hwp->writeSeq(hwp, 0x19, Regs->SR19); - - /* PCI Bus Control */ - hwp->writeSeq(hwp, 0x1A, Regs->SR1A); - - hwp->writeSeq(hwp, 0x1B, Regs->SR1B); - hwp->writeSeq(hwp, 0x1C, Regs->SR1C); - hwp->writeSeq(hwp, 0x1D, Regs->SR1D); - hwp->writeSeq(hwp, 0x1E, Regs->SR1E); - hwp->writeSeq(hwp, 0x1F, Regs->SR1F); + /* Unlock extended registers. */ + hwp->writeSeq(hwp, 0x10, 0x01); - hwp->writeSeq(hwp, 0x22, Regs->SR22); + hwp->writeSeq(hwp, 0x15, Regs->SR[0x15]); + hwp->writeSeq(hwp, 0x16, Regs->SR[0x16]); + hwp->writeSeq(hwp, 0x17, Regs->SR[0x17]); + hwp->writeSeq(hwp, 0x18, Regs->SR[0x18]); + hwp->writeSeq(hwp, 0x19, Regs->SR[0x19]); + hwp->writeSeq(hwp, 0x1A, Regs->SR[0x1A]); + + hwp->writeSeq(hwp, 0x1B, Regs->SR[0x1B]); + hwp->writeSeq(hwp, 0x1C, Regs->SR[0x1C]); + hwp->writeSeq(hwp, 0x1D, Regs->SR[0x1D]); + hwp->writeSeq(hwp, 0x1E, Regs->SR[0x1E]); + hwp->writeSeq(hwp, 0x1F, Regs->SR[0x1F]); + + hwp->writeSeq(hwp, 0x20, Regs->SR[0x20]); + hwp->writeSeq(hwp, 0x21, Regs->SR[0x21]); + hwp->writeSeq(hwp, 0x22, Regs->SR[0x22]); /* Registers 3C5.23 through 3C5.25 are not used by Chrome9. * Registers 3C5.27 through 3C5.29 are not used by Chrome9. */ @@ -1611,26 +2330,25 @@ case VIA_P4M800PRO: case VIA_CX700: case VIA_P4M890: - - hwp->writeSeq(hwp, 0x23, Regs->SR23); - hwp->writeSeq(hwp, 0x24, Regs->SR24); - hwp->writeSeq(hwp, 0x25, Regs->SR25); - - hwp->writeSeq(hwp, 0x27, Regs->SR27); - hwp->writeSeq(hwp, 0x28, Regs->SR28); - hwp->writeSeq(hwp, 0x29, Regs->SR29); + hwp->writeSeq(hwp, 0x23, Regs->SR[0x23]); + hwp->writeSeq(hwp, 0x24, Regs->SR[0x24]); + hwp->writeSeq(hwp, 0x25, Regs->SR[0x25]); + + hwp->writeSeq(hwp, 0x27, Regs->SR[0x27]); + hwp->writeSeq(hwp, 0x28, Regs->SR[0x28]); + hwp->writeSeq(hwp, 0x29, Regs->SR[0x29]); break; default: break; } - hwp->writeSeq(hwp, 0x26, Regs->SR26); + hwp->writeSeq(hwp, 0x26, Regs->SR[0x26]); - hwp->writeSeq(hwp, 0x2A, Regs->SR2A); - hwp->writeSeq(hwp, 0x2B, Regs->SR2B); + hwp->writeSeq(hwp, 0x2A, Regs->SR[0x2A]); + hwp->writeSeq(hwp, 0x2B, Regs->SR[0x2B]); - hwp->writeSeq(hwp, 0x2D, Regs->SR2D); - hwp->writeSeq(hwp, 0x2E, Regs->SR2E); + hwp->writeSeq(hwp, 0x2D, Regs->SR[0x2D]); + hwp->writeSeq(hwp, 0x2E, Regs->SR[0x2E]); /* Restore PCI Configuration Memory Base Shadow 0 and 1. * These registers are available only in UniChrome, UniChrome Pro, @@ -1643,9 +2361,8 @@ case VIA_P4M800PRO: case VIA_CX700: case VIA_P4M890: - - hwp->writeSeq(hwp, 0x2F, Regs->SR2F); - hwp->writeSeq(hwp, 0x30, Regs->SR30); + hwp->writeSeq(hwp, 0x2F, Regs->SR[0x2F]); + hwp->writeSeq(hwp, 0x30, Regs->SR[0x30]); break; default: break; @@ -1659,26 +2376,26 @@ case VIA_CLE266: case VIA_KM400: /* Engine Clock (ECK) PLL settings */ - hwp->writeSeq(hwp, 0x48, Regs->SR48); - hwp->writeSeq(hwp, 0x49, Regs->SR49); + hwp->writeSeq(hwp, 0x48, Regs->SR[0x48]); + hwp->writeSeq(hwp, 0x49, Regs->SR[0x49]); /* Memory Clock (MCK) PLL settings */ - hwp->writeSeq(hwp, 0x4a, Regs->SR4A); - hwp->writeSeq(hwp, 0x4b, Regs->SR4B); + hwp->writeSeq(hwp, 0x4a, Regs->SR[0x4A]); + hwp->writeSeq(hwp, 0x4b, Regs->SR[0x4B]); /* Primary Display Clock (VCK) PLL settings */ - hwp->writeSeq(hwp, 0x46, Regs->SR46); - hwp->writeSeq(hwp, 0x47, Regs->SR47); + hwp->writeSeq(hwp, 0x46, Regs->SR[0x46]); + hwp->writeSeq(hwp, 0x47, Regs->SR[0x47]); /* Secondary Display Clock (LCDCK) PLL settings */ - hwp->writeSeq(hwp, 0x44, Regs->SR44); - hwp->writeSeq(hwp, 0x45, Regs->SR45); + hwp->writeSeq(hwp, 0x44, Regs->SR[0x44]); + hwp->writeSeq(hwp, 0x45, Regs->SR[0x45]); break; default: /* Engine Clock (ECK) PLL settings */ - hwp->writeSeq(hwp, 0x47, Regs->SR47); - hwp->writeSeq(hwp, 0x48, Regs->SR48); - hwp->writeSeq(hwp, 0x49, Regs->SR49); + hwp->writeSeq(hwp, 0x47, Regs->SR[0x47]); + hwp->writeSeq(hwp, 0x48, Regs->SR[0x48]); + hwp->writeSeq(hwp, 0x49, Regs->SR[0x49]); /* Reset ECK PLL. */ hwp->writeSeq(hwp, 0x40, hwp->readSeq(hwp, 0x40) | 0x01); /* Set SR40[0] to 1 */ @@ -1686,9 +2403,9 @@ /* Primary Display Clock (VCK) PLL settings */ - hwp->writeSeq(hwp, 0x44, Regs->SR44); - hwp->writeSeq(hwp, 0x45, Regs->SR45); - hwp->writeSeq(hwp, 0x46, Regs->SR46); + hwp->writeSeq(hwp, 0x44, Regs->SR[0x44]); + hwp->writeSeq(hwp, 0x45, Regs->SR[0x45]); + hwp->writeSeq(hwp, 0x46, Regs->SR[0x46]); /* Reset VCK PLL. */ hwp->writeSeq(hwp, 0x40, hwp->readSeq(hwp, 0x40) | 0x02); /* Set SR40[1] to 1 */ @@ -1696,9 +2413,9 @@ /* Secondary Display Clock (LCDCK) PLL settings */ - hwp->writeSeq(hwp, 0x4A, Regs->SR4A); - hwp->writeSeq(hwp, 0x4B, Regs->SR4B); - hwp->writeSeq(hwp, 0x4C, Regs->SR4C); + hwp->writeSeq(hwp, 0x4A, Regs->SR[0x4A]); + hwp->writeSeq(hwp, 0x4B, Regs->SR[0x4B]); + hwp->writeSeq(hwp, 0x4C, Regs->SR[0x4C]); /* Reset LCDCK PLL. */ hwp->writeSeq(hwp, 0x40, hwp->readSeq(hwp, 0x40) | 0x04); /* Set SR40[2] to 1 */ @@ -1717,19 +2434,18 @@ case VIA_VX800: case VIA_VX855: case VIA_VX900: + /* Restore register 3C5.4D. + * According to CX700 / VX700 (UniChrome Pro II) Open Graphics + * Programming Manual Part I: Graphics Core / 2D, + * this register is called Dual Channel Memory Control. + * According to VX800 / VX855 / VX900 (Chrome9 HC3 / HCM / HD) + * Open Graphics Programming Manual Part I: Graphics Core / 2D, + * this register is called Preemptive Arbiter Control. + * It is likely that this register is also supported in UniChrome Pro. */ + hwp->writeSeq(hwp, 0x4D, Regs->SR[0x4D]); - /* Restore register 3C5.4D. - * According to CX700 / VX700 (UniChrome Pro II) Open Graphics - * Programming Manual Part I: Graphics Core / 2D, - * this register is called Dual Channel Memory Control. - * According to VX800 / VX855 / VX900 (Chrome9 HC3 / HCM / HD) - * Open Graphics Programming Manual Part I: Graphics Core / 2D, - * this register is called Preemptive Arbiter Control. - * It is likely that this register is also supported in UniChrome Pro. */ - hwp->writeSeq(hwp, 0x4D, Regs->SR4D); - - hwp->writeSeq(hwp, 0x4E, Regs->SR4E); - hwp->writeSeq(hwp, 0x4F, Regs->SR4F); + hwp->writeSeq(hwp, 0x4E, Regs->SR[0x4E]); + hwp->writeSeq(hwp, 0x4F, Regs->SR[0x4F]); break; default: break; @@ -1738,14 +2454,14 @@ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Finished restoring sequencer registers.\n")); -/* Reset dot clocks. */ + /* Reset dot clocks. */ ViaSeqMask(hwp, 0x40, 0x06, 0x06); ViaSeqMask(hwp, 0x40, 0x00, 0x06); DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Restoring IGA1 registers.\n")); -/* UniChrome Pro or later */ + /* later */ switch (pVia->Chipset) { case VIA_PM800: case VIA_K8M800: @@ -1757,12 +2473,11 @@ case VIA_VX800: case VIA_VX855: case VIA_VX900: - /* Display Fetch Blocking Control */ - hwp->writeCrtc(hwp, 0x30, Regs->CR30); + hwp->writeCrtc(hwp, 0x30, Regs->CR[0x30]); /* Half Line Position */ - hwp->writeCrtc(hwp, 0x31, Regs->CR31); + hwp->writeCrtc(hwp, 0x31, Regs->CR[0x31]); break; default: break; @@ -1770,16 +2485,16 @@ /* Restore CRTC controller extended registers. */ /* Mode Control */ - hwp->writeCrtc(hwp, 0x32, Regs->CR32); + hwp->writeCrtc(hwp, 0x32, Regs->CR[0x32]); /* HSYNCH Adjuster */ - hwp->writeCrtc(hwp, 0x33, Regs->CR33); + hwp->writeCrtc(hwp, 0x33, Regs->CR[0x33]); /* Extended Overflow */ - hwp->writeCrtc(hwp, 0x35, Regs->CR35); + hwp->writeCrtc(hwp, 0x35, Regs->CR[0x35]); /* Power Management 3 (Monitor Control) */ - hwp->writeCrtc(hwp, 0x36, Regs->CR36); + hwp->writeCrtc(hwp, 0x36, Regs->CR[0x36]); /* UniChrome Pro or later */ switch (pVia->Chipset) { @@ -1793,24 +2508,23 @@ case VIA_VX800: case VIA_VX855: case VIA_VX900: - /* DAC control Register */ - hwp->writeCrtc(hwp, 0x37, Regs->CR37); + hwp->writeCrtc(hwp, 0x37, Regs->CR[0x37]); break; default: break; } - hwp->writeCrtc(hwp, 0x38, Regs->CR38); - hwp->writeCrtc(hwp, 0x39, Regs->CR39); - hwp->writeCrtc(hwp, 0x3A, Regs->CR3A); - hwp->writeCrtc(hwp, 0x3B, Regs->CR3B); - hwp->writeCrtc(hwp, 0x3C, Regs->CR3C); - hwp->writeCrtc(hwp, 0x3D, Regs->CR3D); - hwp->writeCrtc(hwp, 0x3E, Regs->CR3E); - hwp->writeCrtc(hwp, 0x3F, Regs->CR3F); + hwp->writeCrtc(hwp, 0x38, Regs->CR[0x38]); + hwp->writeCrtc(hwp, 0x39, Regs->CR[0x39]); + hwp->writeCrtc(hwp, 0x3A, Regs->CR[0x3A]); + hwp->writeCrtc(hwp, 0x3B, Regs->CR[0x3B]); + hwp->writeCrtc(hwp, 0x3C, Regs->CR[0x3C]); + hwp->writeCrtc(hwp, 0x3D, Regs->CR[0x3D]); + hwp->writeCrtc(hwp, 0x3E, Regs->CR[0x3E]); + hwp->writeCrtc(hwp, 0x3F, Regs->CR[0x3F]); - hwp->writeCrtc(hwp, 0x40, Regs->CR40); + hwp->writeCrtc(hwp, 0x40, Regs->CR[0x40]); /* UniChrome Pro or later */ switch (pVia->Chipset) { @@ -1824,23 +2538,22 @@ case VIA_VX800: case VIA_VX855: case VIA_VX900: - - hwp->writeCrtc(hwp, 0x43, Regs->CR43); - hwp->writeCrtc(hwp, 0x45, Regs->CR45); + hwp->writeCrtc(hwp, 0x43, Regs->CR[0x43]); + hwp->writeCrtc(hwp, 0x45, Regs->CR[0x45]); break; default: break; } - hwp->writeCrtc(hwp, 0x46, Regs->CR46); - hwp->writeCrtc(hwp, 0x47, Regs->CR47); + hwp->writeCrtc(hwp, 0x46, Regs->CR[0x46]); + hwp->writeCrtc(hwp, 0x47, Regs->CR[0x47]); /* Starting Address */ /* Start Address High */ - hwp->writeCrtc(hwp, 0x0C, Regs->CR0C); + hwp->writeCrtc(hwp, 0x0C, Regs->CR[0x0C]); /* Start Address Low */ - hwp->writeCrtc(hwp, 0x0D, Regs->CR0D); + hwp->writeCrtc(hwp, 0x0D, Regs->CR[0x0D]); /* UniChrome Pro or later */ switch (pVia->Chipset) { @@ -1854,9 +2567,8 @@ case VIA_VX800: case VIA_VX855: case VIA_VX900: - /* Starting Address Overflow[28:24] */ - hwp->writeCrtc(hwp, 0x48, Regs->CR48); + hwp->writeCrtc(hwp, 0x48, Regs->CR[0x48]); break; default: break; @@ -1864,11 +2576,15 @@ /* CR34 is fire bits. Must be written after CR0C, CR0D, and CR48. * Starting Address Overflow[23:16] */ - hwp->writeCrtc(hwp, 0x34, Regs->CR34); + hwp->writeCrtc(hwp, 0x34, Regs->CR[0x34]); DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Finished restoring IGA1 registers.\n")); + ViaDisablePrimaryFIFO(pScrn); + + vgaHWProtect(pScrn, FALSE); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Exiting viaIGA1Restore.\n")); } @@ -1967,7 +2683,7 @@ * 3X5.6A[0] - LCD Pre-fetch Mode Enable * 0: Disable * 1: Enable */ - ViaCrtcMask(hwp, 0x6A, 0x80, 0xB3); + ViaCrtcMask(hwp, 0x6A, 0x80, 0xC1); /* TV out uses division by 2 mode. * Other devices like analog (VGA), DVI, flat panel, etc., @@ -2007,24 +2723,6 @@ * 1: Enable */ ViaCrtcMask(hwp, 0x79, 0x00, 0x01); - /* Set DVP0 (Digital Video Port 0) source to IGA2. */ - /* 3X5.96[7] - DVP0 ALPHA Enable - * 0: Disable - * 1: Enable - * 3X5.96[6] - DVP0 VSYNC Polarity - * 0: Positive - * 1: Negative - * 3X5.96[5] - DVP0 HSYNC Polarity - * 0: Positive - * 1: Negative - * 3X5.96[4] - DVP0 Data Source Selection 0 - * 0: Primary Display - * 1: Secondary Display - * 3X5.96[3] - DVP0 Clock Polarity - * 3X5.96[2:0] - DVP0 Clock Adjust - * Valid Value: 0 through 7 */ - ViaCrtcMask(hwp, 0x96, 0x10, 0x10); - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Exiting viaIGA2Init.\n")); } @@ -2092,55 +2790,20 @@ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Requested Screen Mode: %s\n", mode->name); - /* Set the color depth for IGA2. */ - switch (pScrn->bitsPerPixel) { - case 8: - /* Only CLE266.AX uses 6-bit LUT. */ - if (pVia->Chipset == VIA_CLE266 && pVia->ChipRev < 15) { - /* 6-bit LUT */ - /* 3X5.6A[5] - Second Display 8/6 Bits LUT - * 0: 6-bit - * 1: 8-bit */ - ViaCrtcMask(hwp, 0x6A, 0x00, 0x20); - } else { - /* Set IGA2 display LUT to 8-bit */ - ViaCrtcMask(hwp, 0x6A, 0x20, 0x20); - } - - ViaCrtcMask(hwp, 0x67, 0x00, 0xC0); - break; - case 16: - ViaCrtcMask(hwp, 0x67, 0x40, 0xC0); - break; - case 24: - case 32: - ViaCrtcMask(hwp, 0x67, 0xC0, 0xC0); - break; - default: - xf86DrvMsg(pScrn->scrnIndex, X_ERROR, - "Unsupported color depth: %d\n", - pScrn->bitsPerPixel); - break; - } - - /* LVDS Channel 1 and 2 should be controlled by PMS - * (Power Management Status). */ - ViaSeqMask(hwp, 0x2A, 0x0F, 0x0F); - - /* 3X5.99[3:0] appears to be a register to adjust an LCD panel - * (the official name of the register is unknown). */ - if (pVia->Chipset == VIA_P4M900) { - ViaCrtcMask(hwp, 0x99, 0x08, 0x0F); + /* UniChrome Pro or later */ + if ((pVia->Chipset != VIA_CLE266) && (pVia->Chipset != VIA_KM400)) { + /* Set IGA2 to linear mode. */ + /* 3X5.62[0] - IGA2 Address Mode Selection + * 0: Linear + * 1: Tile */ + ViaCrtcMask(hwp, 0x62, 0x00, 0x01); } - /* IGA2 for DFP Low. */ - ViaCrtcMask(hwp, 0x99, 0x10, 0x10); - - /* Use IGA2 for DVP1 Data Source Selection 0. */ - ViaCrtcMask(hwp, 0x9B, 0x10, 0x10); - - /* Linear Mode */ - ViaCrtcMask(hwp, 0x62, 0x00, 0x01); + /* Keep interlace mode off. */ + /* 3X5.67[5] - Second Display Interlace Mode + * 0: Off + * 1: On */ + ViaCrtcMask(hwp, 0x67, 0x00, 0x20); /* Set IGA2 horizontal total pixels.*/ @@ -2168,12 +2831,20 @@ /* 3X5.55[6:4] - Horizontal Active Data Period Bits [10:8] */ ViaCrtcMask(hwp, 0x55, temp >> 4, 0x70); + if (pVia->Chipset == VIA_VX900) { + /* 3X5.55[7] - Horizontal Active Data Period Bits [11] */ + ViaCrtcMask(hwp, 0x55, temp >> 4, 0x80); + } + /* Set IGA2 horizontal blank start. */ - /* Horizontal Blanking Start: 2048 - 1 (max) */ + /* Subtracting 1 from CrtcHBlankStart appears to suppress some + * monitors from reporting horizontal resolution that is 1 more + * than the desired horizontal + * resolution. (i.e., 1601 rather than 1600) */ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "IGA2 CrtcHBlankStart: %d\n", mode->CrtcHBlankStart)); - temp = mode->CrtcHBlankStart; + temp = mode->CrtcHBlankStart - 1; /* 3X5.52[7:0] - Horizontal Blanking Start Bits [7:0] */ hwp->writeCrtc(hwp, 0x52, temp & 0xFF); @@ -2181,6 +2852,11 @@ /* 3X5.54[2:0] - Horizontal Blanking Start Bits [10:8] */ ViaCrtcMask(hwp, 0x54, temp >> 8, 0x07); + if (pVia->Chipset == VIA_VX900) { + /* 3X5.6B[0] - Horizontal Blanking Start Bit [11] */ + ViaCrtcMask(hwp, 0x6B, temp >> 11, 0x01); + } + /* Set IGA2 horizontal blank end. */ /* Horizontal Blanking End: 4096 - 1 (max) */ @@ -2263,10 +2939,13 @@ /* Set IGA2 vertical blank start. */ - /* Vertical Blanking Start: 2048 - 1 (max) */ + /* Subtracting 1 from CrtcVBlankStart appears to suppress some + * monitors from reporting vertical resolution that is 1 more + * than the desired vertical resolution. (i.e., 1201 rather + * than 1200) */ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "IGA2 CrtcVBlankStart: %d\n", mode->CrtcVBlankStart)); - temp = mode->CrtcVBlankStart; + temp = mode->CrtcVBlankStart - 1; /* 3X5.5A[7:0] - Vertical Blanking Start Bits [7:0] */ hwp->writeCrtc(hwp, 0x5A, temp & 0xFF); @@ -2314,12 +2993,6 @@ /* Set IGA2 horizontal offset adjustment. */ temp = (pScrn->displayWidth * (pScrn->bitsPerPixel >> 3)) >> 3; - /* Make sure that this is 32-byte aligned. */ - if (temp & 0x03) { - temp += 0x03; - temp &= ~0x03; - } - /* 3X5.66[7:0] - Second Display Horizontal Offset Bits [7:0] */ hwp->writeCrtc(hwp, 0x66, temp & 0xFF); @@ -2327,22 +3000,16 @@ ViaCrtcMask(hwp, 0x67, temp >> 8, 0x03); - /* Set IGA2 alignment. */ - temp = (mode->CrtcHDisplay * (pScrn->bitsPerPixel >> 3)) >> 3; - - /* Make sure that this is 32-byte aligned. */ - if (temp & 0x03) { - temp += 0x03; - temp &= ~0x03; - } + /* Set IGA2 fetch count. */ + temp = (mode->CrtcHDisplay * (pScrn->bitsPerPixel >> 3)) >> 4; /* 3X5.65[7:0] - Second Display Horizontal - * 2-Quadword Count Data Bits [7:0] */ - hwp->writeCrtc(hwp, 0x65, (temp >> 1) & 0xFF); + * 2-Quadword Count Data Bits [7:0] */ + hwp->writeCrtc(hwp, 0x65, temp & 0xFF); /* 3X5.67[3:2] - Second Display Horizontal - * 2-Quadword Count Data Bits [9:8] */ - ViaCrtcMask(hwp, 0x67, temp >> 7, 0x0C); + * 2-Quadword Count Data Bits [9:8] */ + ViaCrtcMask(hwp, 0x67, temp >> 6, 0x0C); DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Exiting viaIGA2SetDisplayRegister.\n")); @@ -2359,10 +3026,16 @@ if (mode->CrtcHTotal > 4096) return MODE_BAD_HVALUE; - if (mode->CrtcHDisplay > 2048) + if (((pVia->Chipset != VIA_VX900) + && (mode->CrtcHDisplay > 2048)) + || ((pVia->Chipset == VIA_VX900) + && (mode->CrtcHDisplay > 4096))) return MODE_BAD_HVALUE; - if (mode->CrtcHBlankStart > 2048) + if (((pVia->Chipset != VIA_VX900) + && (mode->CrtcHBlankStart > 2048)) + || ((pVia->Chipset == VIA_VX900) + && (mode->CrtcHBlankStart > 4096))) return MODE_BAD_HVALUE; if (mode->CrtcHBlankEnd > 4096) @@ -2400,6 +3073,239 @@ return MODE_OK; } +/* + * I've thrown out the LCD requirement. Size > 1024 is not supported + * by any currently known TV encoder anyway. -- Luc. + * + */ +static void +ViaSetSecondaryFIFO(ScrnInfoPtr pScrn, DisplayModePtr mode) +{ + vgaHWPtr hwp = VGAHWPTR(pScrn); + VIAPtr pVia = VIAPTR(pScrn); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "ViaSetSecondaryFIFO\n")); + + switch (pVia->Chipset) { + case VIA_CLE266: + if (CLE266_REV_IS_CX(pVia->ChipRev)) { + if (mode->HDisplay >= 1024) { + ViaCrtcMask(hwp, 0x6A, 0x20, 0x20); + hwp->writeCrtc(hwp, 0x68, 0xAB);/* depth 10, threshold 11 */ + } else { + ViaCrtcMask(hwp, 0x6A, 0x00, 0x20); + hwp->writeCrtc(hwp, 0x68, 0x67);/* depth 6, threshold 7 */ + } + } else { + if ((pScrn->bitsPerPixel >= 24) + && (((mode->VDisplay > 768) + && (pVia->MemClk <= VIA_MEM_DDR200)) || + ((mode->HDisplay > 1280) + && (pVia->MemClk <= VIA_MEM_DDR266)))) { + ViaCrtcMask(hwp, 0x6A, 0x20, 0x20); + hwp->writeCrtc(hwp, 0x68, 0xAB);/* depth 10, threshold 11 */ + } else { + ViaCrtcMask(hwp, 0x6A, 0x00, 0x20); + hwp->writeCrtc(hwp, 0x68, 0x67);/* depth 6, threshold 7 */ + } + } + break; + case VIA_KM400: + if ((mode->HDisplay >= 1600) && (pVia->MemClk <= VIA_MEM_DDR200)) { + ViaCrtcMask(hwp, 0x6A, 0x20, 0x20); + hwp->writeCrtc(hwp, 0x68, 0xEB); /* depth 14, threshold 11 */ + } else if ((pScrn->bitsPerPixel == 32) + && (((mode->HDisplay > 1024) + && (pVia->MemClk <= VIA_MEM_DDR333)) || + ((mode->HDisplay >= 1024) + && (pVia->MemClk <= VIA_MEM_DDR200)))) { + ViaCrtcMask(hwp, 0x6A, 0x20, 0x20); + hwp->writeCrtc(hwp, 0x68, 0xCA); /* depth 12, threshold 10 */ + } else if ((pScrn->bitsPerPixel == 16) + && (((mode->HDisplay > 1280) + && (pVia->MemClk <= VIA_MEM_DDR333)) || + ((mode->HDisplay >= 1280) + && (pVia->MemClk <= VIA_MEM_DDR200)))) { + ViaCrtcMask(hwp, 0x6A, 0x20, 0x20); + hwp->writeCrtc(hwp, 0x68, 0xAB); /* depth 10, threshold 11 */ + } else { + ViaCrtcMask(hwp, 0x6A, 0x00, 0x20); + hwp->writeCrtc(hwp, 0x68, 0x67); /* depth 6, threshold 7 */ + } + break; + case VIA_K8M800: + /* depth: (384 /8 -1 -1) = 46 = 0x2E */ + ViaCrtcMask(hwp, 0x68, 0xE0, 0xF0); + ViaCrtcMask(hwp, 0x94, 0x00, 0x80); + ViaCrtcMask(hwp, 0x95, 0x80, 0x80); + + /* threshold: (328/4) = 82 = 0x52 */ + ViaCrtcMask(hwp, 0x68, 0x02, 0x0F); + ViaCrtcMask(hwp, 0x95, 0x50, 0x70); + + /* preq: 74 = 0x4A */ + ViaCrtcMask(hwp, 0x92, 0x0A, 0x0F); + ViaCrtcMask(hwp, 0x95, 0x04, 0x07); + + if ((mode->HDisplay >= 1400) && (pScrn->bitsPerPixel == 32)) + ViaCrtcMask(hwp, 0x94, 0x10, 0x7F); /* 64/4 */ + else + ViaCrtcMask(hwp, 0x94, 0x20, 0x7F); /* 128/4 */ + break; + case VIA_PM800: + /* depth: 12 - 1 = 0x0B */ + ViaCrtcMask(hwp, 0x68, 0xB0, 0xF0); + ViaCrtcMask(hwp, 0x94, 0x00, 0x80); + ViaCrtcMask(hwp, 0x95, 0x00, 0x80); + + /* threshold: 16 = 0x10 */ + ViaCrtcMask(hwp, 0x68, 0x00, 0x0F); + ViaCrtcMask(hwp, 0x95, 0x10, 0x70); + + /* preq: 8 = 0x08 */ + ViaCrtcMask(hwp, 0x92, 0x08, 0x0F); + ViaCrtcMask(hwp, 0x95, 0x00, 0x07); + + if ((mode->HDisplay >= 1400) && (pScrn->bitsPerPixel == 32)) + ViaCrtcMask(hwp, 0x94, 0x10, 0x7F); /* 64/4 */ + else + ViaCrtcMask(hwp, 0x94, 0x20, 0x7F); /* 128/4 */ + break; + case VIA_P4M800PRO: + ViaCrtcMask(hwp, 0x68, 0xA0, 0xF0); + ViaCrtcMask(hwp, 0x94, 0x00, 0x80); + ViaCrtcMask(hwp, 0x95, 0x00, 0x80); + + ViaCrtcMask(hwp, 0x68, 0x04, 0x0F); + ViaCrtcMask(hwp, 0x95, 0x10, 0x70); + + ViaCrtcMask(hwp, 0x92, 0x08, 0x0F); + ViaCrtcMask(hwp, 0x95, 0x00, 0x07); + + if ((mode->HDisplay >= 1400) && (pScrn->bitsPerPixel == 32)) + ViaCrtcMask(hwp, 0x94, 0x10, 0x7F); + else + ViaCrtcMask(hwp, 0x94, 0x20, 0x7F); + break; + case VIA_P4M890: + /* depth location: {CR68,4,7},{CR94,7,7},{CR95,7,7} */ + ViaCrtcMask(hwp, 0x68, 0xB0, 0xF0); /* 96/8-1 = 11 = 0x0B */ + ViaCrtcMask(hwp, 0x94, 0x00, 0x80); + ViaCrtcMask(hwp, 0x95, 0x00, 0x80); + + /* location: {CR68,0,3},{CR95,4,6} */ + ViaCrtcMask(hwp, 0x68, 0x03, 0x0F); /* 76/4 = 19 = 0x13 */ + ViaCrtcMask(hwp, 0x95, 0x10, 0x70); + + /* location: {CR92,0,3},{CR95,0,2} */ + ViaCrtcMask(hwp, 0x92, 0x00, 0x0F); /* 64/4 = 16 = 0x10 */ + ViaCrtcMask(hwp, 0x95, 0x01, 0x07); + + /* location: {CR94,0,6} */ + ViaCrtcMask(hwp, 0x94, 0x08, 0x7F); /* 32/4 = 8 = 0x08 */ + break; + case VIA_K8M890: + /* Display Queue Depth, location: {CR68,4,7},{CR94,7,7},{CR95,7,7} */ + ViaCrtcMask(hwp, 0x68, 0xC0, 0xF0); /* 360/8-1 = 44 = 0x2C; 0x2C << 4 = 0xC0 */ + ViaCrtcMask(hwp, 0x94, 0x00, 0x80); /* 0x2C << 3 = 0x00 */ + ViaCrtcMask(hwp, 0x95, 0x80, 0x80); /* 0x2C << 2 = 0x80 */ + + /* Display Queue Read Threshold 1, location: {CR68,0,3},{CR95,4,6} */ + ViaCrtcMask(hwp, 0x68, 0x02, 0x0F); /* 328/4 = 82 = 0x52 */ + ViaCrtcMask(hwp, 0x95, 0x50, 0x70); + + /* location: {CR92,0,3},{CR95,0,2} */ + ViaCrtcMask(hwp, 0x92, 0x0A, 0x0F); /* 296/4 = 74 = 0x4A */ + ViaCrtcMask(hwp, 0x95, 0x04, 0x07); /* 0x4A >> 4 = 0x04 */ + + /* Display Expire Number Bits, location: {CR94,0,6} */ + ViaCrtcMask(hwp, 0x94, 0x1F, 0x7F); /* 124/4 = 31 = 0x1F */ + break; + case VIA_P4M900: + ViaCrtcMask(hwp, 0x68, 0xB0, 0xF0); + ViaCrtcMask(hwp, 0x94, 0x00, 0x80); + ViaCrtcMask(hwp, 0x95, 0x00, 0x80); + + ViaCrtcMask(hwp, 0x68, 0x03, 0x0F); + ViaCrtcMask(hwp, 0x95, 0x10, 0x70); + ViaCrtcMask(hwp, 0x92, 0x03, 0x0F); + ViaCrtcMask(hwp, 0x95, 0x01, 0x07); + ViaCrtcMask(hwp, 0x94, 0x08, 0x7F); + break; + case VIA_CX700: + ViaCrtcMask(hwp, 0x68, 0xA0, 0xF0); + ViaCrtcMask(hwp, 0x94, 0x00, 0x80); + ViaCrtcMask(hwp, 0x95, 0x00, 0x80); + + ViaCrtcMask(hwp, 0x68, 0x04, 0x0F); + ViaCrtcMask(hwp, 0x95, 0x10, 0x70); + + ViaCrtcMask(hwp, 0x92, 0x08, 0x0F); + ViaCrtcMask(hwp, 0x95, 0x00, 0x07); + + if ((mode->HDisplay >= 1400) && (pScrn->bitsPerPixel == 32)) + ViaCrtcMask(hwp, 0x94, 0x10, 0x7F); + else + ViaCrtcMask(hwp, 0x94, 0x20, 0x7F); + break; + case VIA_VX800: + /* {CR68,4,7},{CR94,7,7},{CR95,7,7} : 96/8-1 = 0x0B */ + ViaCrtcMask(hwp, 0x68, 0xB0, 0xF0); /* ((0x0B & 0x0F) << 4)) = 0xB0 */ + ViaCrtcMask(hwp, 0x94, 0x00, 0x80); /* ((0x0B & 0x10) << 3)) = 0x00 */ + ViaCrtcMask(hwp, 0x95, 0x00, 0x80); + /* {CR68,0,3},{CR95,4,6} : 64/4 = 0x10 */ + ViaCrtcMask(hwp, 0x68, 0x04, 0x0F); + ViaCrtcMask(hwp, 0x95, 0x10, 0x70); + /* {CR92,0,3},{CR95,0,2} : 32/4 = 0x08 */ + ViaCrtcMask(hwp, 0x92, 0x08, 0x0F); + ViaCrtcMask(hwp, 0x95, 0x00, 0x07); + /* {CR94,0,6} : 128/4 = 0x20 */ + if ((mode->HDisplay >= 1400) && (pScrn->bitsPerPixel == 32)) + ViaCrtcMask(hwp, 0x94, 0x10, 0x7F); + else + ViaCrtcMask(hwp, 0x94, 0x20, 0x7F); + break; + case VIA_VX855: + /* {CR68,4,7},{CR94,7,7},{CR95,7,7} : 200/8-1 = 24 = 0x18 */ + ViaCrtcMask(hwp, 0x68, 0x80, 0xF0); /* ((0x18 & 0x0F) << 4)) = 0x80 */ + ViaCrtcMask(hwp, 0x94, 0x80, 0x80); /* ((0x18 & 0x10) << 3)) = 0x80 */ + ViaCrtcMask(hwp, 0x95, 0x00, 0x80); /* ((0x18 & 0x20) << 2)) = 0x00 */ + /* {CR68,0,3},{CR95,4,6} : 160/4 = 0x28 */ + ViaCrtcMask(hwp, 0x68, 0x08, 0x0F); /* (0x28 & 0x0F) = 0x08 */ + ViaCrtcMask(hwp, 0x95, 0x20, 0x70); /* (0x28 & 0x70) = 0x20 */ + /* {CR92,0,3},{CR95,0,2} : 160/4 = 0x28 */ + ViaCrtcMask(hwp, 0x92, 0x08, 0x08); /* (0x28 & 0x0F) = 0x08 */ + ViaCrtcMask(hwp, 0x95, 0x02, 0x07); /* ((0x28 & 0x70) >> 4)) = 0x02 */ + /* {CR94,0,6} : 320/4 = 0x50 */ + if ((mode->HDisplay >= 1400) && (pScrn->bitsPerPixel == 32)) + ViaCrtcMask(hwp, 0x94, 0x08, 0x7F); + else + ViaCrtcMask(hwp, 0x94, 0x08, 0x7F); + break; + case VIA_VX900: + /* {CR68,4,7},{CR94,7,7},{CR95,7,7} : 192/8-1 = 23 = 0x17 */ + ViaCrtcMask(hwp, 0x68, 0x70, 0xF0); /* ((0x17 & 0x0F) << 4)) = 0x70 */ + ViaCrtcMask(hwp, 0x94, 0x80, 0x80); /* ((0x17 & 0x10) << 3)) = 0x80 */ + ViaCrtcMask(hwp, 0x95, 0x00, 0x80); /* ((0x17 & 0x20) << 2)) = 0x00 */ + /* {CR68,0,3},{CR95,4,6} : 160/4 = 0x28 */ + ViaCrtcMask(hwp, 0x68, 0x08, 0x0F); /* (0x28 & 0x0F) = 0x08 */ + ViaCrtcMask(hwp, 0x95, 0x20, 0x70); /* (0x28 & 0x70) = 0x20 */ + /* {CR92,0,3},{CR95,0,2} : 160/4 = 0x28 */ + ViaCrtcMask(hwp, 0x92, 0x08, 0x08); /* (0x28 & 0x0F) = 0x08 */ + ViaCrtcMask(hwp, 0x95, 0x02, 0x07); /* ((0x28 & 0x70) >> 4)) = 0x2 */ + /* {CR94,0,6} : 320/4 = 0x50 */ + if ((mode->HDisplay >= 1400) && (pScrn->bitsPerPixel == 32)) + ViaCrtcMask(hwp, 0x94, 0x08, 0x7F); + else + ViaCrtcMask(hwp, 0x94, 0x08, 0x7F); + break; + default: + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "ViaSetSecondaryFIFO: " + "Chipset %d not implemented\n", pVia->Chipset); + break; + } +} + void viaIGA2Save(ScrnInfoPtr pScrn) { @@ -2411,32 +3317,32 @@ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Entered viaIGA2Save.\n")); - /* Unlock extended registers. */ - hwp->writeSeq(hwp, 0x10, 0x01); + vgaHWProtect(pScrn, TRUE); + + vgaHWSave(pScrn, &hwp->SavedReg, VGA_SR_ALL); DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Saving IGA2 registers.\n")); - for (i = 0; i < (0x88 - 0x50 + 1); i++) { - Regs->EXCR[i + (0x50 - 0x50)] = hwp->readCrtc(hwp, i + 0x50); + /* Unlock extended registers. */ + hwp->writeSeq(hwp, 0x10, 0x01); + for (i = 0; i < (0x88 - 0x50 + 1); i++) { + Regs->CR[i + 0x50] = hwp->readCrtc(hwp, i + 0x50); } for (i = 0; i < (0x92 - 0x8A + 1); i++) { - Regs->EXCR[i + (0x8A - 0x50)] = hwp->readCrtc(hwp, i + 0x8A); - + Regs->CR[i + 0x8A] = hwp->readCrtc(hwp, i + 0x8A); } for (i = 0; i < (0xA3 - 0x94 + 1); i++) { - Regs->EXCR[i + (0x94 - 0x50)] = hwp->readCrtc(hwp, i + 0x94); - + Regs->CR[i + 0x94] = hwp->readCrtc(hwp, i + 0x94); } - Regs->EXCR[0xA4 - 0x50] = hwp->readCrtc(hwp, 0xA4); + Regs->CR[0xA4] = hwp->readCrtc(hwp, 0xA4); for (i = 0; i < (0xAC - 0xA5 + 1); i++) { - Regs->EXCR[i + (0xA5 - 0x50)] = hwp->readCrtc(hwp, i + 0xA5); - + Regs->CR[i + 0xA5] = hwp->readCrtc(hwp, i + 0xA5); } /* Chrome 9 */ @@ -2446,7 +3352,7 @@ case VIA_VX800: case VIA_VX855: case VIA_VX900: - Regs->EXCR[0xAF - 0x50] = hwp->readCrtc(hwp, 0xAF); + Regs->CR[0xAF] = hwp->readCrtc(hwp, 0xAF); break; default: break; @@ -2458,8 +3364,7 @@ case VIA_P4M900: case VIA_VX800: for (i = 0; i < (0xCD - 0xB0 + 1); i++) { - Regs->EXCR[i + (0xB0 - 0x50)] = hwp->readCrtc(hwp, i + 0xB0); - + Regs->CR[i + 0xB0] = hwp->readCrtc(hwp, i + 0xB0); } break; @@ -2476,8 +3381,7 @@ case VIA_CX700: case VIA_P4M890: for (i = 0; i < (0xD7 - 0xD0 + 1); i++) { - Regs->EXCR[i + (0xD0 - 0x50)] = hwp->readCrtc(hwp, i + 0xD0); - + Regs->CR[i + 0xD0] = hwp->readCrtc(hwp, i + 0xD0); } break; @@ -2489,8 +3393,7 @@ case VIA_VX855: case VIA_VX900: for (i = 0; i < (0xEC - 0xD0 + 1); i++) { - Regs->EXCR[i + (0xD0 - 0x50)] = hwp->readCrtc(hwp, i + 0xD0); - + Regs->CR[i + 0xD0] = hwp->readCrtc(hwp, i + 0xD0); } break; @@ -2506,8 +3409,7 @@ case VIA_VX855: case VIA_VX900: for (i = 0; i < (0xF5 - 0xF0 + 1); i++) { - Regs->EXCR[i + (0xF0 - 0x50)] = hwp->readCrtc(hwp, i + 0xF0); - + Regs->CR[i + 0xF0] = hwp->readCrtc(hwp, i + 0xF0); } break; @@ -2518,20 +3420,20 @@ /* Chrome 9 HCM and Chrome 9 HD */ if ((pVia->Chipset == VIA_VX855) || (pVia->Chipset == VIA_VX900)) { for (i = 0; i < (0xFC - 0xF6 + 1); i++) { - Regs->EXCR[i + (0xF6 - 0x50)] = hwp->readCrtc(hwp, i + 0xF6); - + Regs->CR[i + 0xF6] = hwp->readCrtc(hwp, i + 0xF6); } } /* Chrome 9 HD */ if (pVia->Chipset == VIA_VX900) { - Regs->EXCR[0xFD - 0x50] = hwp->readCrtc(hwp, 0xFD); - + Regs->CR[0xFD] = hwp->readCrtc(hwp, 0xFD); } DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Finished saving IGA2 registers.\n")); + vgaHWProtect(pScrn, FALSE); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Exiting viaIGA2Save.\n")); } @@ -2547,35 +3449,38 @@ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Entered viaIGA2Restore.\n")); - /* Unlock extended registers. */ - hwp->writeSeq(hwp, 0x10, 0x01); + vgaHWProtect(pScrn, TRUE); + + vgaHWRestore(pScrn, &hwp->SavedReg, VGA_SR_ALL); DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Restoring IGA2 registers.\n")); - for (i = 0; i < (0x5F - 0x50 + 1); i++) { - hwp->writeCrtc(hwp, i + 0x50, Regs->EXCR[i + (0x50 - 0x50)]); + /* Unlock extended registers. */ + hwp->writeSeq(hwp, 0x10, 0x01); + for (i = 0; i < (0x5F - 0x50 + 1); i++) { + hwp->writeCrtc(hwp, i + 0x50, Regs->CR[i + 0x50]); } for (i = 0; i < (0x69 - 0x62 + 1); i++) { - hwp->writeCrtc(hwp, i + 0x62, Regs->EXCR[i + (0x62 - 0x50)]); - + hwp->writeCrtc(hwp, i + 0x62, Regs->CR[i + 0x62]); } - for (i = 0; i < (0x88 - 0x6D + 1); i++) { - hwp->writeCrtc(hwp, i + 0x6D, Regs->EXCR[i + (0x6D - 0x50)]); + hwp->writeCrtc(hwp, 0x6A, Regs->CR[0x6A]); + hwp->writeCrtc(hwp, 0x6B, Regs->CR[0x6B]); + hwp->writeCrtc(hwp, 0x6C, Regs->CR[0x6C]); + for (i = 0; i < (0x88 - 0x6D + 1); i++) { + hwp->writeCrtc(hwp, i + 0x6D, Regs->CR[i + 0x6D]); } for (i = 0; i < (0x92 - 0x8A + 1); i++) { - hwp->writeCrtc(hwp, i + 0x8A, Regs->EXCR[i + (0x8A - 0x50)]); - + hwp->writeCrtc(hwp, i + 0x8A, Regs->CR[i + 0x8A]); } for (i = 0; i < (0xA3 - 0x94 + 1); i++) { - hwp->writeCrtc(hwp, i + 0x94, Regs->EXCR[i + (0x94 - 0x50)]); - + hwp->writeCrtc(hwp, i + 0x94, Regs->CR[i + 0x94]); } /* UniChrome Pro and UniChrome Pro II */ @@ -2585,15 +3490,14 @@ case VIA_P4M800PRO: case VIA_CX700: case VIA_P4M890: - hwp->writeCrtc(hwp, 0xA4, Regs->EXCR[0xA4 - 0x50]); + hwp->writeCrtc(hwp, 0xA4, Regs->CR[0xA4]); break; default: break; } for (i = 0; i < (0xAC - 0xA5 + 1); i++) { - hwp->writeCrtc(hwp, i + 0xA5, Regs->EXCR[i + (0xA5 - 0x50)]); - + hwp->writeCrtc(hwp, i + 0xA5, Regs->CR[i + 0xA5]); } /* Chrome 9 */ @@ -2603,7 +3507,7 @@ case VIA_VX800: case VIA_VX855: case VIA_VX900: - hwp->writeCrtc(hwp, 0xAF, Regs->EXCR[0xAF - 0x50]); + hwp->writeCrtc(hwp, 0xAF, Regs->CR[0xAF]); break; default: break; @@ -2615,8 +3519,7 @@ case VIA_P4M900: case VIA_VX800: for (i = 0; i < (0xCD - 0xB0 + 1); i++) { - hwp->writeCrtc(hwp, i + 0xB0, Regs->EXCR[i + (0xB0 - 0x50)]); - + hwp->writeCrtc(hwp, i + 0xB0, Regs->CR[i + 0xB0]); } break; @@ -2632,8 +3535,7 @@ case VIA_CX700: case VIA_P4M890: for (i = 0; i < (0xD7 - 0xD0 + 1); i++) { - hwp->writeCrtc(hwp, i + 0xD0, Regs->EXCR[i + (0xD0 - 0x50)]); - + hwp->writeCrtc(hwp, i + 0xD0, Regs->CR[i + 0xD0]); } break; @@ -2645,8 +3547,7 @@ case VIA_VX855: case VIA_VX900: for (i = 0; i < (0xEC - 0xD0 + 1); i++) { - hwp->writeCrtc(hwp, i + 0xD0, Regs->EXCR[i + (0xD0 - 0x50)]); - + hwp->writeCrtc(hwp, i + 0xD0, Regs->CR[i + 0xD0]); } break; @@ -2662,8 +3563,7 @@ case VIA_VX855: case VIA_VX900: for (i = 0; i < (0xF5 - 0xF0 + 1); i++) { - hwp->writeCrtc(hwp, i + 0xF0, Regs->EXCR[i + (0xF0 - 0x50)]); - + hwp->writeCrtc(hwp, i + 0xF0, Regs->CR[i + 0xF0]); } break; @@ -2674,20 +3574,20 @@ /* Chrome 9 HCM and Chrome 9 HD */ if ((pVia->Chipset == VIA_VX855) || (pVia->Chipset == VIA_VX900)) { for (i = 0; i < (0xFC - 0xF6 + 1); i++) { - hwp->writeCrtc(hwp, i + 0xF6, Regs->EXCR[i + (0xF6 - 0x50)]); - + hwp->writeCrtc(hwp, i + 0xF6, Regs->CR[i + 0xF6]); } } /* Chrome 9 HD */ if (pVia->Chipset == VIA_VX900) { - hwp->writeCrtc(hwp, 0xFD, Regs->EXCR[0xFD - 0x50]); - + hwp->writeCrtc(hwp, 0xFD, Regs->CR[0xFD]); } DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Finished restoring IGA2 registers.\n")); + vgaHWProtect(pScrn, FALSE); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Exiting viaIGA2Restore.\n")); } @@ -2737,8 +3637,6 @@ iga1_crtc_dpms(xf86CrtcPtr crtc, int mode) { ScrnInfoPtr pScrn = crtc->scrn; - VIAPtr pVia = VIAPTR(pScrn); - VIABIOSInfoPtr pBIOSInfo = pVia->pBIOSInfo; DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Entered iga1_crtc_dpms.\n")); @@ -2760,7 +3658,7 @@ viaIGA1DPMSControl(pScrn, 0x03); break; - default: + default: xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Invalid DPMS Mode: %d\n", mode); break; @@ -2775,62 +3673,16 @@ iga1_crtc_save(xf86CrtcPtr crtc) { ScrnInfoPtr pScrn = crtc->scrn; - vgaHWPtr hwp = VGAHWPTR(pScrn); - VIAPtr pVia = VIAPTR(pScrn); - - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Entered iga1_crtc_save.\n")); - - vgaHWProtect(pScrn, TRUE); - - /* Save the standard VGA registers. */ - if (xf86IsPrimaryPci(pVia->PciInfo)) { - vgaHWSave(pScrn, &hwp->SavedReg, VGA_SR_ALL); - } else { - vgaHWSave(pScrn, &hwp->SavedReg, VGA_SR_MODE); - } viaIGA1Save(pScrn); - - vgaHWProtect(pScrn, FALSE); - vgaHWUnlock(hwp); - - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Exiting iga1_crtc_save.\n")); } static void iga1_crtc_restore(xf86CrtcPtr crtc) { ScrnInfoPtr pScrn = crtc->scrn; - vgaHWPtr hwp = VGAHWPTR(pScrn); - VIAPtr pVia = VIAPTR(pScrn); - CARD8 tmp; - - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Entered iga1_crtc_restore.\n")); - - vgaHWProtect(pScrn, TRUE); - - /* Restore the standard VGA registers. */ - if (xf86IsPrimaryPci(pVia->PciInfo)) { - vgaHWRestore(pScrn, &hwp->SavedReg, VGA_SR_ALL); - } else { - vgaHWRestore(pScrn, &hwp->SavedReg, VGA_SR_MODE); - } - - /* Gamma must be disabled before restoring palette. */ - ViaGammaDisable(pScrn); viaIGA1Restore(pScrn); - - ViaDisablePrimaryFIFO(pScrn); - - vgaHWProtect(pScrn, FALSE); - vgaHWLock(hwp); - - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Exiting iga1_crtc_restore.\n")); } static Bool @@ -2877,19 +3729,43 @@ (unsigned)temp, (unsigned)pVia->pBIOSInfo->Bandwidth); return FALSE; } + + if (!pScrn->bitsPerPixel) { + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Invalid bpp information.\n"); + return FALSE; + } + + /* 16 is the Chrome IGP display controller memory alignment. */ + if (crtc->x % (16 / ((pScrn->bitsPerPixel + 7) >> 3))) { + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "The X location specified is not properly aligned " + "to Chrome IGP's memory alignment.\n"); + return FALSE; + } + return TRUE; } static void -iga1_crtc_prepare (xf86CrtcPtr crtc) +iga1_crtc_prepare(xf86CrtcPtr crtc) { + ScrnInfoPtr pScrn = crtc->scrn; + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered iga1_crtc_prepare.\n")); + + /* Turn off IGA1. */ + viaIGA1DPMSControl(pScrn, 0x03); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting iga1_crtc_prepare.\n")); } static void iga1_crtc_set_origin(xf86CrtcPtr crtc, int x, int y) { ScrnInfoPtr pScrn = crtc->scrn; - VIAPtr pVia = VIAPTR(pScrn); DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Entered iga1_crtc_set_origin.\n")); @@ -2914,28 +3790,29 @@ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Entered iga1_crtc_mode_set.\n")); + /* Put IGA1 into a reset state. */ + viaIGA1HWReset(pScrn, 0x00); + if (!vgaHWInit(pScrn, adjusted_mode)) { DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "vgaHWInit failed.\n")); - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Exiting iga1_crtc_mode_set.\n")); - return; + goto exit; } - /* Turn off IGA1 during mode setting. */ - viaIGA1DPMSControl(pScrn, 0x03); - viaIGAInitCommon(pScrn); viaIGA1Init(pScrn); - ViaCRTCInit(pScrn); - - /* Turn off Screen */ - ViaCrtcMask(hwp, 0x17, 0x00, 0x80); /* Disable IGA1 */ ViaSeqMask(hwp, 0x59, 0x00, 0x80); + ViaPrintMode(pScrn, adjusted_mode); + + /* Set color depth. */ + viaIGA1SetColorDepth(pScrn, pScrn->bitsPerPixel); + + /* Set display controller screen parameters. */ viaIGA1SetDisplayRegister(pScrn, adjusted_mode); + ViaSetPrimaryFIFO(pScrn, adjusted_mode); pBIOSInfo->Clock = ViaModeDotClockTranslate(pScrn, adjusted_mode); @@ -2944,69 +3821,97 @@ ViaSetUseExternalClock(hwp); ViaCrtcMask(hwp, 0x6B, 0x00, 0x01); - hwp->disablePalette(hwp); - /* Enable IGA1 */ ViaSeqMask(hwp, 0x59, 0x80, 0x80); - /* Turn on Screen */ - ViaCrtcMask(hwp, 0x17, 0x80, 0x80); - viaIGA1SetFBStartingAddress(crtc, x, y); VIAVidAdjustFrame(pScrn, x, y); - /* Turn on IGA1 now that mode setting is done. */ - viaIGA1DPMSControl(pScrn, 0x00); +exit: + /* Put IGA1 back into a normal operating state. */ + viaIGA1HWReset(pScrn, 0x01); DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Exiting iga1_crtc_mode_set.\n")); } static void -iga1_crtc_gamma_set(xf86CrtcPtr crtc, CARD16 *red, CARD16 *green, CARD16 *blue, - int size) +iga1_crtc_commit(xf86CrtcPtr crtc) { ScrnInfoPtr pScrn = crtc->scrn; - vgaHWPtr hwp = VGAHWPTR(pScrn); VIAPtr pVia = VIAPTR(pScrn); - int SR1A, SR1B, CR67, CR6A; + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entering iga1_crtc_commit.\n")); + + if (crtc->scrn->pScreen != NULL && pVia->drmmode.hwcursor) + xf86_reload_cursors(crtc->scrn->pScreen); + + /* Turn on IGA1. */ + viaIGA1DPMSControl(pScrn, 0x00); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting iga1_crtc_commit.\n")); +} + +static void +iga1_crtc_gamma_set(xf86CrtcPtr crtc, CARD16 *red, CARD16 *green, CARD16 *blue, + int size) +{ + ScrnInfoPtr pScrn = crtc->scrn; LOCO colors[size]; int i; + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entering iga1_crtc_gamma_set.\n")); + for (i = 0; i < size; i++) { colors[i].red = red[i] >> 8; colors[i].green = green[i] >> 8; colors[i].blue = blue[i] >> 8; } - if (pScrn->bitsPerPixel != 8) { - switch (pVia->Chipset) { - case VIA_CLE266: - case VIA_KM400: - ViaSeqMask(hwp, 0x16, 0x80, 0x80); - break; - default: - ViaCrtcMask(hwp, 0x33, 0x80, 0x80); - break; - } + /* Set palette LUT to 8-bit mode. */ + viaIGA1SetPaletteLUTResolution(pScrn, 0x01); + + switch (pScrn->bitsPerPixel) { + case 8: + /* IGA1 will access the palette LUT. */ + viaSetPaletteLUTAccess(pScrn, 0x00); + + VIALoadRgbLut(pScrn, 0, size, colors); + + /* Turn gamma correction off. */ + viaIGA1SetGamma(pScrn, FALSE); + break; + case 16: + /* IGA1 will access the palette LUT. */ + viaSetPaletteLUTAccess(pScrn, 0x00); - ViaSeqMask(hwp, 0x1A, 0x00, 0x01); VIALoadRgbLut(pScrn, 0, size, colors); - } else { + /* Turn gamma correction off. */ + viaIGA1SetGamma(pScrn, FALSE); + break; + case 24: + case 32: + /* IGA1 will access the palette LUT. */ + viaSetPaletteLUTAccess(pScrn, 0x00); - SR1A = hwp->readSeq(hwp, 0x1A); - SR1B = hwp->readSeq(hwp, 0x1B); - CR67 = hwp->readCrtc(hwp, 0x67); - CR6A = hwp->readCrtc(hwp, 0x6A); - - for (i = 0; i < size; i++) { - hwp->writeDacWriteAddr(hwp, i); - hwp->writeDacData(hwp, colors[i].red); - hwp->writeDacData(hwp, colors[i].green); - hwp->writeDacData(hwp, colors[i].blue); - } + VIALoadRgbLut(pScrn, 0, size, colors); + + /* Turn gamma correction off. */ + viaIGA1SetGamma(pScrn, FALSE); + break; + default: + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "Unsupported color depth: %d\n", + pScrn->bitsPerPixel); + break; } + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting iga1_crtc_gamma_set.\n")); } static void * @@ -3033,12 +3938,10 @@ and in all other bpps the fg and bg are in 8-8-8 RGB format. */ static void -iga1_crtc_set_cursor_colors (xf86CrtcPtr crtc, int bg, int fg) +iga1_crtc_set_cursor_colors(xf86CrtcPtr crtc, int bg, int fg) { ScrnInfoPtr pScrn = crtc->scrn; xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); - VIAPtr pVia = VIAPTR(pScrn); - CARD32 temp; if (xf86_config->cursor_fg) return; @@ -3047,33 +3950,16 @@ if (fg == xf86_config->cursor_fg && bg == xf86_config->cursor_bg) return; - switch(pVia->Chipset) { - case VIA_PM800: - case VIA_CX700: - case VIA_P4M890: - case VIA_P4M900: - case VIA_VX800: - case VIA_VX855: - case VIA_VX900: - temp = VIAGETREG(PRIM_HI_CTRL); - VIASETREG(PRIM_HI_CTRL, temp & 0xFFFFFFFE); - break; - - default: - temp = VIAGETREG(HI_CONTROL); - VIASETREG(HI_CONTROL, temp & 0xFFFFFFFE); - break; - } + viaIGA1DisplayHI(pScrn, FALSE); xf86_config->cursor_fg = fg; xf86_config->cursor_bg = bg; } static void -iga1_crtc_set_cursor_position (xf86CrtcPtr crtc, int x, int y) +iga1_crtc_set_cursor_position(xf86CrtcPtr crtc, int x, int y) { ScrnInfoPtr pScrn = crtc->scrn; - VIAPtr pVia = VIAPTR(pScrn); unsigned xoff, yoff; if (x < 0) { @@ -3090,81 +3976,27 @@ yoff = 0; } - switch(pVia->Chipset) { - case VIA_PM800: - case VIA_CX700: - case VIA_P4M890: - case VIA_P4M900: - case VIA_VX800: - case VIA_VX855: - case VIA_VX900: - VIASETREG(PRIM_HI_POSSTART, ((x << 16) | (y & 0x07ff))); - VIASETREG(PRIM_HI_CENTEROFFSET, ((xoff << 16) | (yoff & 0x07ff))); - break; - - default: - VIASETREG(HI_POSSTART, ((x << 16) | (y & 0x07ff))); - VIASETREG(HI_CENTEROFFSET, ((xoff << 16) | (yoff & 0x07ff))); - break; - } + viaIGA1SetHIDisplayLocation(pScrn, x, xoff, y, yoff); } static void -iga1_crtc_show_cursor (xf86CrtcPtr crtc) +iga1_crtc_show_cursor(xf86CrtcPtr crtc) { - drmmode_crtc_private_ptr iga = crtc->driver_private; ScrnInfoPtr pScrn = crtc->scrn; - VIAPtr pVia = VIAPTR(pScrn); - - switch(pVia->Chipset) { - case VIA_PM800: - case VIA_CX700: - case VIA_P4M890: - case VIA_P4M900: - case VIA_VX800: - case VIA_VX855: - case VIA_VX900: - VIASETREG(PRIM_HI_FBOFFSET, iga->cursor_bo->offset); - VIASETREG(PRIM_HI_CTRL, 0x36000005); - break; - default: - /* Mono Cursor Display Path [bit31]: Primary */ - VIASETREG(HI_FBOFFSET, iga->cursor_bo->offset); - VIASETREG(HI_CONTROL, 0x76000005); - break; - } + viaIGA1DisplayHI(pScrn, TRUE); } static void -iga1_crtc_hide_cursor (xf86CrtcPtr crtc) +iga1_crtc_hide_cursor(xf86CrtcPtr crtc) { ScrnInfoPtr pScrn = crtc->scrn; - VIAPtr pVia = VIAPTR(pScrn); - CARD32 temp; - - switch(pVia->Chipset) { - case VIA_PM800: - case VIA_CX700: - case VIA_P4M890: - case VIA_P4M900: - case VIA_VX800: - case VIA_VX855: - case VIA_VX900: - temp = VIAGETREG(PRIM_HI_CTRL); - VIASETREG(PRIM_HI_CTRL, temp & 0xFFFFFFFA); - break; - default: - temp = VIAGETREG(HI_CONTROL); - /* Hardware cursor disable [bit0] */ - VIASETREG(HI_CONTROL, temp & 0xFFFFFFFA); - break; - } + viaIGA1DisplayHI(pScrn, FALSE); } static void -iga_crtc_load_cursor_argb(xf86CrtcPtr crtc, CARD32 *image) +iga1_crtc_load_cursor_argb(xf86CrtcPtr crtc, CARD32 *image) { drmmode_crtc_private_ptr iga = crtc->driver_private; ScrnInfoPtr pScrn = crtc->scrn; @@ -3174,16 +4006,9 @@ memset(dst, 0x00, iga->cursor_bo->size); memcpy(dst, image, iga->cursor_bo->size); drm_bo_unmap(pScrn, iga->cursor_bo); -} - -static void -iga_crtc_commit(xf86CrtcPtr crtc) -{ - ScrnInfoPtr pScrn = crtc->scrn; - VIAPtr pVia = VIAPTR(pScrn); - if (crtc->scrn->pScreen != NULL && pVia->drmmode.hwcursor) - xf86_reload_cursors(crtc->scrn->pScreen); + viaIGA1InitHI(pScrn); + viaIGA1SetHIStartingAddress(crtc); } static void @@ -3202,7 +4027,7 @@ .mode_fixup = iga1_crtc_mode_fixup, .prepare = iga1_crtc_prepare, .mode_set = iga1_crtc_mode_set, - .commit = iga_crtc_commit, + .commit = iga1_crtc_commit, .gamma_set = iga1_crtc_gamma_set, .shadow_create = iga1_crtc_shadow_create, .shadow_allocate = iga1_crtc_shadow_allocate, @@ -3211,7 +4036,7 @@ .set_cursor_position = iga1_crtc_set_cursor_position, .show_cursor = iga1_crtc_show_cursor, .hide_cursor = iga1_crtc_hide_cursor, - .load_cursor_argb = iga_crtc_load_cursor_argb, + .load_cursor_argb = iga1_crtc_load_cursor_argb, #if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) > 2 .set_origin = iga1_crtc_set_origin, #endif @@ -3222,8 +4047,6 @@ iga2_crtc_dpms(xf86CrtcPtr crtc, int mode) { ScrnInfoPtr pScrn = crtc->scrn; - VIAPtr pVia = VIAPTR(pScrn); - VIABIOSInfoPtr pBIOSInfo = pVia->pBIOSInfo; DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Entered iga2_crtc_dpms.\n")); @@ -3254,8 +4077,6 @@ iga2_crtc_save(xf86CrtcPtr crtc) { ScrnInfoPtr pScrn = crtc->scrn; - vgaHWPtr hwp = VGAHWPTR(pScrn); - VIAPtr pVia = VIAPTR(pScrn); DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Entered iga2_crtc_save.\n")); @@ -3270,9 +4091,6 @@ iga2_crtc_restore(xf86CrtcPtr crtc) { ScrnInfoPtr pScrn = crtc->scrn; - vgaHWPtr hwp = VGAHWPTR(pScrn); - VIAPtr pVia = VIAPTR(pScrn); - CARD8 tmp; DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Entered iga2_crtc_restore.\n")); @@ -3324,22 +4142,46 @@ if (pVia->pBIOSInfo->Bandwidth < temp) { xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Required bandwidth is not available. (%u > %u)\n", - (unsigned)temp, (unsigned)pVia->pBIOSInfo->Bandwidth); + (unsigned)temp, (unsigned)pVia->pBIOSInfo->Bandwidth); + return FALSE; + } + + if (!pScrn->bitsPerPixel) { + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Invalid bpp information.\n"); + return FALSE; + } + + /* 16 is the Chrome IGP display controller memory alignment. */ + if (crtc->x % (16 / ((pScrn->bitsPerPixel + 7) >> 3))) { + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "The X location specified is not properly aligned " + "to Chrome IGP's memory alignment.\n"); return FALSE; } + return TRUE; } static void -iga2_crtc_prepare (xf86CrtcPtr crtc) +iga2_crtc_prepare(xf86CrtcPtr crtc) { + ScrnInfoPtr pScrn = crtc->scrn; + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered iga2_crtc_prepare.\n")); + + /* Turn off IGA2. */ + viaIGA2DisplayOutput(pScrn, FALSE); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting iga2_crtc_prepare.\n")); } static void iga2_crtc_set_origin(xf86CrtcPtr crtc, int x, int y) { ScrnInfoPtr pScrn = crtc->scrn; - VIAPtr pVia = VIAPTR(pScrn); DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Entered iga2_crtc_set_origin.\n")); @@ -3363,110 +4205,119 @@ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Entered iga2_crtc_mode_set.\n")); - if (!vgaHWInit(pScrn, adjusted_mode)) { - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "vgaHWInit failed.\n")); - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Exiting iga2_crtc_mode_set.\n")); - return; - } + /* Put IGA2 into a reset state. */ + viaIGA2HWReset(pScrn, 0x00); - /* Turn off IGA2 during mode setting. */ - viaIGA2DisplayOutput(pScrn, FALSE); + /* Disable IGA2 display channel. */ + viaIGA2DisplayChannel(pScrn, FALSE); viaIGAInitCommon(pScrn); viaIGA2Init(pScrn); - ViaCRTCInit(pScrn); + ViaPrintMode(pScrn, adjusted_mode); + + /* Set color depth. */ + viaIGA2SetColorDepth(pScrn, pScrn->bitsPerPixel); + + /* Set display controller screen parameters. */ viaIGA2SetDisplayRegister(pScrn, adjusted_mode); + ViaSetSecondaryFIFO(pScrn, adjusted_mode); pBIOSInfo->Clock = ViaModeDotClockTranslate(pScrn, adjusted_mode); pBIOSInfo->ClockExternal = FALSE; ViaSetSecondaryDotclock(pScrn, pBIOSInfo->Clock); ViaSetUseExternalClock(hwp); - hwp->disablePalette(hwp); + viaIGA2SetFBStartingAddress(crtc, x, y); + VIAVidAdjustFrame(pScrn, x, y); + /* Enable IGA2 display channel. */ viaIGA2DisplayChannel(pScrn, TRUE); - viaIGA2SetFBStartingAddress(crtc, x, y); - VIAVidAdjustFrame(pScrn, x, y); + /* Put IGA2 back into a normal operating state. */ + viaIGA2HWReset(pScrn, 0x01); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting iga2_crtc_mode_set.\n")); +} + +static void +iga2_crtc_commit(xf86CrtcPtr crtc) +{ + ScrnInfoPtr pScrn = crtc->scrn; + VIAPtr pVia = VIAPTR(pScrn); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entering iga2_crtc_commit.\n")); - /* Turn on IGA2 now that mode setting is done. */ + if (crtc->scrn->pScreen != NULL && pVia->drmmode.hwcursor) + xf86_reload_cursors(crtc->scrn->pScreen); + + /* Turn on IGA2. */ viaIGA2DisplayOutput(pScrn, TRUE); DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Exiting iga2_crtc_mode_set.\n")); + "Exiting iga2_crtc_commit.\n")); } static void iga2_crtc_gamma_set(xf86CrtcPtr crtc, CARD16 *red, CARD16 *green, CARD16 *blue, - int size) + int size) { ScrnInfoPtr pScrn = crtc->scrn; - vgaHWPtr hwp = VGAHWPTR(pScrn); - VIAPtr pVia = VIAPTR(pScrn); - int SR1A, SR1B, CR67, CR6A; LOCO colors[size]; int i; + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entering iga2_crtc_gamma_set.\n")); + for (i = 0; i < size; i++) { colors[i].red = red[i] >> 8; colors[i].green = green[i] >> 8; colors[i].blue = blue[i] >> 8; } - if (pScrn->bitsPerPixel != 8) { - if (!(pVia->Chipset == VIA_CLE266 && - CLE266_REV_IS_AX(pVia->ChipRev))) { - ViaSeqMask(hwp, 0x1A, 0x01, 0x01); - ViaCrtcMask(hwp, 0x6A, 0x02, 0x02); - - switch (pVia->Chipset) { - case VIA_CLE266: - case VIA_KM400: - case VIA_K8M800: - case VIA_PM800: - break; + /* Set palette LUT to 8-bit mode. */ + viaIGA2SetPaletteLUTResolution(pScrn, 0x01); - default: - ViaCrtcMask(hwp, 0x6A, 0x20, 0x20); - break; - } - VIALoadRgbLut(pScrn, 0, size, colors); - } - } else { - SR1A = hwp->readSeq(hwp, 0x1A); - SR1B = hwp->readSeq(hwp, 0x1B); - CR67 = hwp->readCrtc(hwp, 0x67); - CR6A = hwp->readCrtc(hwp, 0x6A); - - ViaSeqMask(hwp, 0x1A, 0x01, 0x01); - ViaSeqMask(hwp, 0x1B, 0x80, 0x80); - ViaCrtcMask(hwp, 0x67, 0x00, 0xC0); - ViaCrtcMask(hwp, 0x6A, 0xC0, 0xC0); - - for (i = 0; i < size; i++) { - hwp->writeDacWriteAddr(hwp, i); - hwp->writeDacData(hwp, colors[i].red); - hwp->writeDacData(hwp, colors[i].green); - hwp->writeDacData(hwp, colors[i].blue); - } + switch (pScrn->bitsPerPixel) { + case 8: + /* IGA2 will access the palette LUT. */ + viaSetPaletteLUTAccess(pScrn, 0x01); - hwp->writeSeq(hwp, 0x1A, SR1A); - hwp->writeSeq(hwp, 0x1B, SR1B); - hwp->writeCrtc(hwp, 0x67, CR67); - hwp->writeCrtc(hwp, 0x6A, CR6A); - - /* Screen 0 palette was changed by mode setting of Screen 1, - * so load it again. */ - for (i = 0; i < size; i++) { - hwp->writeDacWriteAddr(hwp, i); - hwp->writeDacData(hwp, colors[i].red); - hwp->writeDacData(hwp, colors[i].green); - hwp->writeDacData(hwp, colors[i].blue); - } + VIALoadRgbLut(pScrn, 0, size, colors); + + /* Turn gamma correction off. */ + viaIGA2SetGamma(pScrn, FALSE); + break; + case 16: + /* IGA2 will access the palette LUT. */ + viaSetPaletteLUTAccess(pScrn, 0x01); + + VIALoadRgbLut(pScrn, 0, size, colors); + + /* Turn gamma correction off. */ + viaIGA2SetGamma(pScrn, FALSE); + break; + case 24: + case 32: + /* IGA2 will access the palette LUT. */ + viaSetPaletteLUTAccess(pScrn, 0x01); + + VIALoadRgbLut(pScrn, 0, size, colors); + + /* Turn gamma correction off. */ + viaIGA2SetGamma(pScrn, FALSE); + break; + default: + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "Unsupported color depth: %d\n", + pScrn->bitsPerPixel); + break; } + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting iga2_crtc_gamma_set.\n")); } static void * @@ -3499,8 +4350,7 @@ ScrnInfoPtr pScrn = crtc->scrn; xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); int height = 64, width = 64, i; - VIAPtr pVia = VIAPTR(pScrn); - CARD32 pixel, temp, *dst; + CARD32 pixel, *dst; if (xf86_config->cursor_fg) return; @@ -3512,24 +4362,7 @@ if (fg == xf86_config->cursor_fg && bg == xf86_config->cursor_bg) return; - switch(pVia->Chipset) { - case VIA_PM800: - case VIA_CX700: - case VIA_P4M890: - case VIA_P4M900: - case VIA_VX800: - case VIA_VX855: - case VIA_VX900: - temp = VIAGETREG(HI_CONTROL); - VIASETREG(HI_CONTROL, temp & 0xFFFFFFFE); - break; - - default: - temp = VIAGETREG(HI_CONTROL); - VIASETREG(HI_CONTROL, temp & 0xFFFFFFFE); - height = width = 32; - break; - } + viaIGA2DisplayHI(pScrn, FALSE); dst = drm_bo_map(pScrn, iga->cursor_bo); for (i = 0; i < width * height; i++, dst++) @@ -3545,7 +4378,6 @@ iga2_crtc_set_cursor_position(xf86CrtcPtr crtc, int x, int y) { ScrnInfoPtr pScrn = crtc->scrn; - VIAPtr pVia = VIAPTR(pScrn); unsigned xoff, yoff; if (x < 0) { @@ -3562,78 +4394,39 @@ yoff = 0; } - switch(pVia->Chipset) { - case VIA_PM800: - case VIA_CX700: - case VIA_P4M890: - case VIA_P4M900: - case VIA_VX800: - case VIA_VX855: - case VIA_VX900: - VIASETREG(HI_POSSTART, ((x << 16) | (y & 0x07ff))); - VIASETREG(HI_CENTEROFFSET, ((xoff << 16) | (yoff & 0x07ff))); - break; - - default: - VIASETREG(HI_POSSTART, ((x << 16) | (y & 0x07ff))); - VIASETREG(HI_CENTEROFFSET, ((xoff << 16) | (yoff & 0x07ff))); - break; - } + viaIGA2SetHIDisplayLocation(pScrn, x, xoff, y, yoff); } static void iga2_crtc_show_cursor(xf86CrtcPtr crtc) { - drmmode_crtc_private_ptr iga = crtc->driver_private; ScrnInfoPtr pScrn = crtc->scrn; - VIAPtr pVia = VIAPTR(pScrn); - - switch(pVia->Chipset) { - case VIA_PM800: - case VIA_CX700: - case VIA_P4M890: - case VIA_P4M900: - case VIA_VX800: - case VIA_VX855: - case VIA_VX900: - VIASETREG(HI_FBOFFSET, iga->cursor_bo->offset); - VIASETREG(HI_CONTROL, 0xB6000005); - break; - default: - /* Mono Cursor Display Path [bit31]: Secondary */ - /* FIXME For CLE266 and KM400 try to enable 32x32 cursor size [bit1] */ - VIASETREG(HI_FBOFFSET, iga->cursor_bo->offset); - VIASETREG(HI_CONTROL, 0xF6000005); - break; - } + viaIGA2DisplayHI(pScrn, TRUE); } static void iga2_crtc_hide_cursor(xf86CrtcPtr crtc) { ScrnInfoPtr pScrn = crtc->scrn; - VIAPtr pVia = VIAPTR(pScrn); - CARD32 temp; - switch(pVia->Chipset) { - case VIA_PM800: - case VIA_CX700: - case VIA_P4M890: - case VIA_P4M900: - case VIA_VX800: - case VIA_VX855: - case VIA_VX900: - temp = VIAGETREG(HI_CONTROL); - VIASETREG(HI_CONTROL, temp & 0xFFFFFFFA); - break; + viaIGA2DisplayHI(pScrn, FALSE); +} - default: - temp = VIAGETREG(HI_CONTROL); - /* Hardware cursor disable [bit0] */ - VIASETREG(HI_CONTROL, temp & 0xFFFFFFFA); - break; - } +static void +iga2_crtc_load_cursor_argb(xf86CrtcPtr crtc, CARD32 *image) +{ + drmmode_crtc_private_ptr iga = crtc->driver_private; + ScrnInfoPtr pScrn = crtc->scrn; + void *dst; + + dst = drm_bo_map(pScrn, iga->cursor_bo); + memset(dst, 0x00, iga->cursor_bo->size); + memcpy(dst, image, iga->cursor_bo->size); + drm_bo_unmap(pScrn, iga->cursor_bo); + + viaIGA2InitHI(pScrn); + viaIGA2SetHIStartingAddress(crtc); } const xf86CrtcFuncsRec iga2_crtc_funcs = { @@ -3645,7 +4438,7 @@ .mode_fixup = iga2_crtc_mode_fixup, .prepare = iga2_crtc_prepare, .mode_set = iga2_crtc_mode_set, - .commit = iga_crtc_commit, + .commit = iga2_crtc_commit, .gamma_set = iga2_crtc_gamma_set, .shadow_create = iga2_crtc_shadow_create, .shadow_allocate = iga2_crtc_shadow_allocate, @@ -3654,7 +4447,7 @@ .set_cursor_position = iga2_crtc_set_cursor_position, .show_cursor = iga2_crtc_show_cursor, .hide_cursor = iga2_crtc_hide_cursor, - .load_cursor_argb = iga_crtc_load_cursor_argb, + .load_cursor_argb = iga2_crtc_load_cursor_argb, #if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) > 2 .set_origin = iga2_crtc_set_origin, #endif diff -Nru xserver-xorg-video-openchrome-0.5.0/src/via_dri.c xserver-xorg-video-openchrome-0.6.0/src/via_dri.c --- xserver-xorg-video-openchrome-0.5.0/src/via_dri.c 2016-07-06 16:21:06.000000000 +0000 +++ xserver-xorg-video-openchrome-0.6.0/src/via_dri.c 2017-02-26 23:53:37.000000000 +0000 @@ -1,6 +1,6 @@ /* * Copyright 2005-2015 The Openchrome Project - * [http://www.freedesktop.org/wiki/Openchrome] + * [https://www.freedesktop.org/wiki/Openchrome] * Copyright 1998-2003 VIA Technologies, Inc. All Rights Reserved. * Copyright 2001-2003 S3 Graphics, Inc. All Rights Reserved. * diff -Nru xserver-xorg-video-openchrome-0.5.0/src/via_driver.c xserver-xorg-video-openchrome-0.6.0/src/via_driver.c --- xserver-xorg-video-openchrome-0.5.0/src/via_driver.c 2016-07-06 16:21:06.000000000 +0000 +++ xserver-xorg-video-openchrome-0.6.0/src/via_driver.c 2017-02-27 23:46:46.000000000 +0000 @@ -1,6 +1,6 @@ /* * Copyright 2005-2015 The Openchrome Project - * [http://www.freedesktop.org/wiki/Openchrome] + * [https://www.freedesktop.org/wiki/Openchrome] * Copyright 2004-2006 Luc Verhaegen. * Copyright 2004-2005 The Unichrome Project [unichrome.sf.net] * Copyright 1998-2003 VIA Technologies, Inc. All Rights Reserved. @@ -179,7 +179,6 @@ OPTION_TVDOTCRAWL, OPTION_TVTYPE, OPTION_TVOUTPUT, - OPTION_TVDIPORT, OPTION_DISABLEVQ, OPTION_DISABLEIRQ, OPTION_TVDEFLICKER, @@ -209,7 +208,6 @@ {OPTION_TVDEFLICKER, "TVDeflicker", OPTV_INTEGER, {0}, FALSE}, {OPTION_TVTYPE, "TVType", OPTV_ANYSTR, {0}, FALSE}, {OPTION_TVOUTPUT, "TVOutput", OPTV_ANYSTR, {0}, FALSE}, - {OPTION_TVDIPORT, "TVPort", OPTV_ANYSTR, {0}, FALSE}, {OPTION_DISABLEVQ, "DisableVQ", OPTV_BOOLEAN, {0}, FALSE}, {OPTION_DISABLEIRQ, "DisableIRQ", OPTV_BOOLEAN, {0}, FALSE}, {OPTION_AGP_DMA, "EnableAGPDMA", OPTV_BOOLEAN, {0}, FALSE}, @@ -227,7 +225,7 @@ static XF86ModuleVersionInfo VIAVersRec = { "openchrome", - "http://www.freedesktop.org/wiki/Openchrome/", + "https://www.freedesktop.org/wiki/Openchrome/", MODINFOSTRING1, MODINFOSTRING2, #ifdef XORG_VERSION_CURRENT @@ -480,7 +478,7 @@ "VIA Technologies does not support this driver in any way.\n"); xf86Msg(X_NOTICE, "For support, please refer to" - " http://www.freedesktop.org/wiki/Openchrome/.\n"); + " https://www.freedesktop.org/wiki/Openchrome/.\n"); #ifdef BUILDCOMMENT xf86Msg(X_NOTICE, BUILDCOMMENT"\n"); #endif @@ -521,7 +519,7 @@ xf86Msg(X_NOTICE, "VIA Technologies does not support this driver in any way.\n"); xf86Msg(X_NOTICE, "For support, please refer to" - " http://www.freedesktop.org/wiki/Openchrome/.\n"); + " https://www.freedesktop.org/wiki/Openchrome/.\n"); #ifdef BUILDCOMMENT xf86Msg(X_NOTICE, BUILDCOMMENT"\n"); @@ -629,7 +627,6 @@ VIASetupDefaultOptions(ScrnInfoPtr pScrn) { VIAPtr pVia = VIAPTR(pScrn); - VIABIOSInfoPtr pBIOSInfo = pVia->pBIOSInfo; DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "VIASetupDefaultOptions - Setting up default chipset options.\n")); @@ -660,17 +657,13 @@ pVia->swov.maxWInterp = 800; pVia->swov.maxHInterp = 600; - pBIOSInfo->TVDIPort = VIA_DI_PORT_DVP1; - switch (pVia->Chipset) { case VIA_CLE266: - pBIOSInfo->TVDIPort = VIA_DI_PORT_DVP0; break; case VIA_KM400: /* IRQ is not broken on KM400A, but testing (pVia->ChipRev < 0x80) * is not enough to make sure we have an older, broken KM400. */ pVia->DRIIrqEnable = FALSE; - pBIOSInfo->TVDIPort = VIA_DI_PORT_DVP0; break; case VIA_K8M800: pVia->DRIIrqEnable = FALSE; @@ -699,7 +692,6 @@ pVia->agpEnable = FALSE; /* FIXME: this needs to be tested */ pVia->dmaXV = FALSE; - pBIOSInfo->TVDIPort = VIA_DI_PORT_DVP0; break; case VIA_VX800: case VIA_VX855: @@ -1450,30 +1442,6 @@ "No default TV output signal type is set.\n"); } - /* TV DI Port */ - if ((s = xf86GetOptValString(VIAOptions, OPTION_TVDIPORT))) { - if (!xf86NameCmp(s, "DVP0")) { - pBIOSInfo->TVDIPort = VIA_DI_PORT_DVP0; - xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, - "TV Output Port is DVP0.\n"); - } else if (!xf86NameCmp(s, "DVP1")) { - pBIOSInfo->TVDIPort = VIA_DI_PORT_DVP1; - xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, - "TV Output Port is DVP1.\n"); - } else if (!xf86NameCmp(s, "DFPHigh")) { - pBIOSInfo->TVDIPort = VIA_DI_PORT_DFPHIGH; - xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, - "TV Output Port is DFPHigh.\n"); - } else if (!xf86NameCmp(s, "DFPLow")) { - pBIOSInfo->TVDIPort = VIA_DI_PORT_DFPLOW; - xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, - "TV Output Port is DFPLow.\n"); - } - } else { - xf86DrvMsg(pScrn->scrnIndex, X_DEFAULT, - "No default TV output port is set.\n"); - } - VIAVidHWDiffInit(pScrn); #ifdef HAVE_DEBUG @@ -1493,6 +1461,23 @@ pVia->I2CScan ? "" : "not "); #endif /* HAVE_DEBUG */ + /* Checking for VIA Technologies NanoBook reference design. + Examples include Everex CloudBook and Sylvania g netbook. + It is also called FIC CE260 and CE261 by its ODM (Original + Design Manufacturer) name. + This device has its strapping resistors set to a wrong + setting to handle DVI. As a result, we need to make special + accommodations to handle DVI properly. */ + if ((pVia->Chipset == VIA_CX700) && + (SUBVENDOR_ID(pVia->PciInfo) == 0x1509) && + (SUBSYS_ID(pVia->PciInfo) == 0x2D30)) { + + pVia->isVIANanoBook = TRUE; + } else { + pVia->isVIANanoBook = FALSE; + } + + /* Checking for OLPC XO-1.5. */ if ((pVia->Chipset == VIA_VX855) && (SUBVENDOR_ID(pVia->PciInfo) == 0x152D) && diff -Nru xserver-xorg-video-openchrome-0.5.0/src/via_driver.h xserver-xorg-video-openchrome-0.6.0/src/via_driver.h --- xserver-xorg-video-openchrome-0.5.0/src/via_driver.h 2016-07-06 16:21:06.000000000 +0000 +++ xserver-xorg-video-openchrome-0.6.0/src/via_driver.h 2017-02-26 06:28:58.000000000 +0000 @@ -127,30 +127,8 @@ static int gVIAEntityIndex = -1; typedef struct { - CARD8 SR08, SR0A, SR0F; - - /* Extended Sequencer Registers */ - CARD8 SR10, SR11, SR12, SR13, SR14, SR15, SR16, SR17; - CARD8 SR18, SR19, SR1A, SR1B, SR1C, SR1D, SR1E, SR1F; - CARD8 SR20, SR21, SR22, SR23, SR24, SR25, SR26, SR27; - CARD8 SR28, SR29, SR2A, SR2B, SR2C, SR2D, SR2E, SR2F; - CARD8 SR30, SR31, SR32, SR33, SR34; - CARD8 SR40, SR41, SR42, SR43, SR44, SR45, SR46, SR47; - CARD8 SR48, SR49, SR4A, SR4B, SR4C, SR4D, SR4E, SR4F; - - /* CRTC Registers */ - CARD8 CR0C, CR0D; - CARD8 CR13; - - /* IGA1 Registers */ - CARD8 CR30, CR31, CR32, CR33, CR34, CR35, CR36, CR37; - CARD8 CR38, CR39, CR3A, CR3B, CR3C, CR3D, CR3E, CR3F; - CARD8 CR40, CR41, CR42, CR43, CR44, CR45, CR46, CR47; - CARD8 CR48; - - /* IGA2 Registers */ - CARD8 EXCR[0xFD - 0x50 + 1]; - + CARD8 SR[256]; + CARD8 CR[256]; } VIARegRec, *VIARegPtr; /* @@ -306,6 +284,12 @@ /* BIOS Info Ptr */ VIABIOSInfoPtr pBIOSInfo; + /* VIA Technologies NanoBook reference design. + Examples include Everex CloudBook and Sylvania g netbook. + It is also called FIC CE260 and CE261 by its ODM (Original + Design Manufacturer) name. */ + Bool isVIANanoBook; + /* OLPC XO-1.5 */ Bool IsOLPCXO15; @@ -376,6 +360,19 @@ #endif /* HAVE_DEBUG */ video_via_regs* VideoRegs; + + /* Keeping track of the number of analog VGA connectors. */ + unsigned int numberVGA; + + /* Keeping track of the number of DVI connectors. */ + unsigned int numberDVI; + + /* Keeping track of the number of FP (Flat Panel) connectors. */ + unsigned int numberFP; + + /* Shadow copy of CR3B through CR3F. */ + CARD8 originalCR3B, originalCR3C, originalCR3D, + originalCR3E, originalCR3F; } VIARec, *VIAPtr; #define VIAPTR(p) ((VIAPtr)((p)->driverPrivate)) @@ -498,6 +495,8 @@ /* via_i2c.c */ void ViaI2CInit(ScrnInfoPtr pScrn); +Bool xf86I2CMaskByte(I2CDevPtr d, I2CByte subaddr, + I2CByte value, I2CByte mask); #ifdef HAVE_DRI Bool VIADRI1ScreenInit(ScreenPtr pScreen); diff -Nru xserver-xorg-video-openchrome-0.5.0/src/via_exa_h2.c xserver-xorg-video-openchrome-0.6.0/src/via_exa_h2.c --- xserver-xorg-video-openchrome-0.5.0/src/via_exa_h2.c 2016-07-06 16:21:06.000000000 +0000 +++ xserver-xorg-video-openchrome-0.6.0/src/via_exa_h2.c 2017-01-06 03:33:00.000000000 +0000 @@ -170,8 +170,6 @@ VIAPtr pVia = VIAPTR(pScrn); ViaTwodContext *tdc = &pVia->td; - RING_VARS; - if (exaGetPixmapPitch(pPixmap) & 7) return FALSE; @@ -227,8 +225,6 @@ VIAPtr pVia = VIAPTR(pScrn); ViaTwodContext *tdc = &pVia->td; - RING_VARS; - if (pSrcPixmap->drawable.bitsPerPixel != pDstPixmap->drawable.bitsPerPixel) return FALSE; diff -Nru xserver-xorg-video-openchrome-0.5.0/src/via_exa_h6.c xserver-xorg-video-openchrome-0.6.0/src/via_exa_h6.c --- xserver-xorg-video-openchrome-0.5.0/src/via_exa_h6.c 2016-07-06 16:21:06.000000000 +0000 +++ xserver-xorg-video-openchrome-0.6.0/src/via_exa_h6.c 2017-01-06 03:33:00.000000000 +0000 @@ -171,8 +171,6 @@ VIAPtr pVia = VIAPTR(pScrn); ViaTwodContext *tdc = &pVia->td; - RING_VARS; - if (exaGetPixmapPitch(pPixmap) & 7) return FALSE; @@ -228,8 +226,6 @@ VIAPtr pVia = VIAPTR(pScrn); ViaTwodContext *tdc = &pVia->td; - RING_VARS; - if (pSrcPixmap->drawable.bitsPerPixel != pDstPixmap->drawable.bitsPerPixel) return FALSE; diff -Nru xserver-xorg-video-openchrome-0.5.0/src/via_fp.c xserver-xorg-video-openchrome-0.6.0/src/via_fp.c --- xserver-xorg-video-openchrome-0.5.0/src/via_fp.c 1970-01-01 00:00:00.000000000 +0000 +++ xserver-xorg-video-openchrome-0.6.0/src/via_fp.c 2017-02-27 23:44:42.000000000 +0000 @@ -0,0 +1,1515 @@ +/* + * Copyright 2007-2015 The Openchrome Project + * [https://www.freedesktop.org/wiki/Openchrome] + * Copyright 1998-2007 VIA Technologies, Inc. All Rights Reserved. + * Copyright 2001-2007 S3 Graphics, Inc. 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 + * 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. + */ + +/* + * Integrated LVDS power management functions. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "via_driver.h" +#include "via_mode.h" +#include + +/* + * Option handling. + */ +enum ViaPanelOpts { + OPTION_CENTER +}; + +static OptionInfoRec ViaPanelOptions[] = +{ + {OPTION_CENTER, "Center", OPTV_BOOLEAN, {0}, FALSE}, + {-1, NULL, OPTV_NONE, {0}, FALSE} +}; + +/* These table values were copied from lcd.c of VIA Frame + * Buffer device driver. */ +/* {int Width, int Height, bool useDualEdge, bool useDithering}; */ +static ViaPanelModeRec ViaPanelNativeModes[] = { + { 640, 480, FALSE, TRUE}, + { 800, 600, FALSE, TRUE}, + {1024, 768, FALSE, TRUE}, + {1280, 768, FALSE, TRUE}, + {1280, 1024, TRUE, TRUE}, + {1400, 1050, TRUE, TRUE}, + {1600, 1200, TRUE, TRUE}, + {1280, 800, FALSE, TRUE}, + { 800, 480, FALSE, TRUE}, + {1024, 768, TRUE, TRUE}, + {1024, 768, FALSE, FALSE}, + {1024, 768, TRUE, FALSE}, + {1280, 768, FALSE, FALSE}, + {1280, 1024, TRUE, FALSE}, + {1400, 1050, TRUE, FALSE}, + {1600, 1200, TRUE, FALSE}, + {1366, 768, FALSE, FALSE}, + {1024, 600, FALSE, TRUE}, + {1280, 768, TRUE, TRUE}, + {1280, 800, FALSE, TRUE}, + {1360, 768, FALSE, FALSE}, + {1280, 768, TRUE, FALSE}, + { 480, 640, FALSE, TRUE}, + {1200, 900, FALSE, FALSE}}; + +#define MODEPREFIX(name) NULL, NULL, name, 0, M_T_DRIVER | M_T_DEFAULT +#define MODESUFFIX 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,FALSE,FALSE,0,NULL,0,0.0,0.0 + +static DisplayModeRec OLPCMode = { + MODEPREFIX("1200x900"), + 57275, 1200, 1208, 1216, 1240, 0, + 900, 905, 908, 912, 0, + V_NHSYNC | V_NVSYNC, MODESUFFIX +}; + +/* + 1. Formula: + 2^13 X 0.0698uSec [1/14.318MHz] = 8192 X 0.0698uSec =572.1uSec + Timer = Counter x 572 uSec + 2. Note: + 0.0698 uSec is too small to compute for hardware. So we multiply a + reference value(2^13) to make it big enough to compute for hardware. + 3. Note: + The meaning of the TD0~TD3 are count of the clock. + TD(sec) = (sec)/(per clock) x (count of clocks) +*/ + +#define TD0 200 +#define TD1 25 +#define TD2 0 +#define TD3 25 + +/* + * Sets CX700 or later single chipset's LVDS1 I/O pad state. + */ +void +viaLVDS1SetIOPadSetting(ScrnInfoPtr pScrn, CARD8 ioPadState) +{ + vgaHWPtr hwp = VGAHWPTR(pScrn); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered viaLVDS1SetIOPadSetting.\n")); + + /* Set LVDS1 I/O pad state. */ + /* 3C5.2A[1:0] - LVDS1 I/O Pad Control */ + ViaSeqMask(hwp, 0x2A, ioPadState, 0x03); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "LVDS1 I/O Pad State: %d\n", + (ioPadState & 0x03)); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting viaLVDS1SetIOPadSetting.\n")); +} + +/* + * Sets IGA1 or IGA2 as the display output source for VIA Technologies + * Chrome IGP LVDS1 integrated LVDS transmitter. + */ +static void +viaLVDS1SetDisplaySource(ScrnInfoPtr pScrn, CARD8 displaySource) +{ + vgaHWPtr hwp = VGAHWPTR(pScrn); + CARD8 temp = displaySource; + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered viaLVDS1SetDisplaySource.\n")); + + /* Set LVDS1 integrated LVDS transmitter display output source. */ + /* 3X5.99[4] - LVDS Channel 1 Data Source Selection + * 0: Primary Display + * 1: Secondary Display */ + ViaCrtcMask(hwp, 0x99, temp << 4, 0x10); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "LVDS1 Integrated LVDS Transmitter Display Output " + "Source: IGA%d\n", + (temp & 0x01) + 1); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting viaLVDS1SetDisplaySource.\n")); +} + +/* + * Sets LVDS1 (LVDS Channel 1) integrated LVDS transmitter format. + */ +static void +viaLVDS1SetFormat(ScrnInfoPtr pScrn, CARD8 format) +{ + vgaHWPtr hwp = VGAHWPTR(pScrn); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered viaLVDS1SetFormat.\n")); + + /* Set LVDS1 format. */ + /* 3X5.D2[1] - LVDS Channel 1 Format Selection + * 0: SPWG Mode + * 1: OPENLDI Mode */ + ViaCrtcMask(hwp, 0xD2, format << 1, 0x02); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "LVDS1 Format: %s\n", + (format & 0x01) ? "OPENLDI" : "SPWG"); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting viaLVDS1SetFormat.\n")); +} + +/* + * Sets CX700 or later single chipset's LVDS2 I/O pad state. + */ +static void +viaLVDS2SetIOPadSetting(ScrnInfoPtr pScrn, CARD8 ioPadState) +{ + vgaHWPtr hwp = VGAHWPTR(pScrn); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered viaLVDS2SetIOPadSetting.\n")); + + /* Set LVDS2 I/O pad state. */ + /* 3C5.2A[3:2] - LVDS2 I/O Pad Control */ + ViaSeqMask(hwp, 0x2A, ioPadState << 2, 0x0C); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "LVDS2 I/O Pad State: %d\n", + (ioPadState & 0x03)); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting viaLVDS2SetIOPadSetting.\n")); +} + +/* + * Sets IGA1 or IGA2 as the display output source for VIA Technologies + * Chrome IGP LVDS2 integrated LVDS transmitter. + */ +static void +viaLVDS2SetDisplaySource(ScrnInfoPtr pScrn, CARD8 displaySource) +{ + vgaHWPtr hwp = VGAHWPTR(pScrn); + CARD8 temp = displaySource; + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered viaLVDS2SetDisplaySource.\n")); + + /* Set LVDS2 integrated LVDS transmitter display output source. */ + /* 3X5.97[4] - LVDS Channel 2 Data Source Selection + * 0: Primary Display + * 1: Secondary Display */ + ViaCrtcMask(hwp, 0x97, temp << 4, 0x10); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "LVDS2 Integrated LVDS Transmitter Display Output " + "Source: IGA%d\n", + (temp & 0x01) + 1); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting viaLVDS2SetDisplaySource.\n")); +} + +/* + * Sets LVDS2 (LVDS Channel 2) integrated LVDS transmitter delay tap. + */ +static void +viaLVDS2SetDelayTap(ScrnInfoPtr pScrn, CARD8 delayTap) +{ + vgaHWPtr hwp = VGAHWPTR(pScrn); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered viaLVDS2SetDelayTap.\n")); + + /* Set LVDS2 delay tap. */ + /* 3X5.97[3:0] - LVDS2 Delay Tap */ + ViaCrtcMask(hwp, 0x97, delayTap, 0x0F); + + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "LVDS2 Delay Tap: %d\n", + (delayTap & 0x0F)); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting viaLVDS2SetDelayTap.\n")); +} + +/* + * Sets LVDS2 (LVDS Channel 2) integrated LVDS transmitter format. + */ +static void +viaLVDS2SetFormat(ScrnInfoPtr pScrn, CARD8 format) +{ + vgaHWPtr hwp = VGAHWPTR(pScrn); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered viaLVDS2SetFormat.\n")); + + /* Set LVDS2 format. */ + /* 3X5.D2[0] - LVDS Channel 2 Format Selection + * 0: SPWG Mode + * 1: OPENLDI Mode */ + ViaCrtcMask(hwp, 0xD2, format, 0x01); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "LVDS2 Format: %s\n", + (format & 0x01) ? "OPENLDI" : "SPWG"); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting viaLVDS2SetFormat.\n")); +} + +/* + * Sets IGA1 or IGA2 as the display output source for VIA Technologies + * Chrome IGP DFP (Digital Flat Panel) High interface. + */ +static void +viaDFPHighSetDisplaySource(ScrnInfoPtr pScrn, CARD8 displaySource) +{ + vgaHWPtr hwp = VGAHWPTR(pScrn); + CARD8 temp = displaySource; + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered viaDFPHighSetDisplaySource.\n")); + + /* Set DFP High display output source. */ + /* 3X5.97[4] - DFP High Data Source Selection + * 0: Primary Display + * 1: Secondary Display */ + ViaCrtcMask(hwp, 0x97, temp << 4, 0x10); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "DFP High Display Output Source: IGA%d\n", + (temp & 0x01) + 1); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting viaDFPHighSetDisplaySource.\n")); +} + +/* + * Sets DFP (Digital Flat Panel) Low interface delay tap. + */ +static void +viaDFPLowSetDelayTap(ScrnInfoPtr pScrn, CARD8 delayTap) +{ + vgaHWPtr hwp = VGAHWPTR(pScrn); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered viaDFPLowSetDelayTap.\n")); + + /* Set DFP Low interface delay tap. */ + /* 3X5.99[3:0] - DFP Low Delay Tap */ + ViaCrtcMask(hwp, 0x99, delayTap, 0x0F); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "DFP Low Delay Tap: %d\n", + (delayTap & 0x0F)); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting viaDFPLowSetDelayTap.\n")); +} + +/* + * Sets DFP (Digital Flat Panel) High interface delay tap. + */ +static void +viaDFPHighSetDelayTap(ScrnInfoPtr pScrn, CARD8 delayTap) +{ + vgaHWPtr hwp = VGAHWPTR(pScrn); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered viaDFPHighSetDelayTap.\n")); + + /* Set DFP High interface delay tap. */ + /* 3X5.97[3:0] - DFP High Delay Tap */ + ViaCrtcMask(hwp, 0x97, delayTap, 0x0F); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "DFP High Delay Tap: %d\n", + (delayTap & 0x0F)); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting viaDFPHighSetDelayTap.\n")); +} + +/* + * Turns LVDS2 output color dithering on or off. (18-bit color display vs. + * 24-bit color display) + */ +static void +viaLVDS2SetDithering(ScrnInfoPtr pScrn, CARD8 ditheringStatus) +{ + vgaHWPtr hwp = VGAHWPTR(pScrn); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered viaLVDS2SetDithering.\n")); + + /* Set LVDS2 output color dithering bit. */ + /* 3X5.D4[6] - LVDS Channel 2 Output Bits + * 0: 24 bits (dithering off) + * 1: 18 bits (dithering on) */ + ViaCrtcMask(hwp, 0xD4, ditheringStatus ? 0x40 : 0x00, 0x40); + + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "LVDS2 Output Color Dithering: %s\n", + ditheringStatus ? "On (18 bit)" : "Off (24 bit)"); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting viaLVDS2SetDithering.\n")); +} + +/* + * Sets output format of LVDS2 to rotation or sequential mode. + */ +static void +viaLVDS2SetOutputFormat(ScrnInfoPtr pScrn, CARD8 outputFormat) +{ + vgaHWPtr hwp = VGAHWPTR(pScrn); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered viaLVDS2SetOutputFormat.\n")); + + /* Set LVDS2 output format. */ + /* 3X5.D4[7] - LVDS Channel 2 Output Format + * 0: Rotation + * 1: Sequential */ + ViaCrtcMask(hwp, 0xD4, outputFormat ? 0x80 : 0x00, 0x80); + + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "LVDS2 Output Format: %s\n", + outputFormat ? "Sequential" : "Rotation"); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting viaLVDS2SetOutputFormat.\n")); +} + +/* + * Sets PCIe based 2 chip chipset's pin multiplexed DVP0 I/O pad state. + */ +static void +viaDVP0PCIeSetIOPadSetting(ScrnInfoPtr pScrn, CARD8 ioPadState) +{ + vgaHWPtr hwp = VGAHWPTR(pScrn); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered viaDVP0PCIeSetIOPadSetting.\n")); + + /* Set pin multiplexed DVP1 I/O pad state. */ + /* 3C5.2A[3:2] - DVP0 I/O Pad Control */ + ViaSeqMask(hwp, 0x2A, ioPadState << 2, 0x0C); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "DVP0 I/O Pad State: %d\n", + (ioPadState & 0x03)); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting viaDVP0PCIeSetIOPadSetting.\n")); +} + +/* + * Sets PCIe based 2 chip chipset's pin multiplexed DVP1 I/O pad state. + */ +static void +viaDVP1PCIeSetIOPadSetting(ScrnInfoPtr pScrn, CARD8 ioPadState) +{ + vgaHWPtr hwp = VGAHWPTR(pScrn); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered viaDVP1PCIeSetIOPadSetting.\n")); + + /* Set pin multiplexed DVP0 I/O pad state. */ + /* 3C5.2A[1:0] - DVP1 I/O Pad Control */ + ViaSeqMask(hwp, 0x2A, ioPadState, 0x03); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "DVP1 I/O Pad State: %d\n", + (ioPadState & 0x03)); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting viaDVP1PCIeSetIOPadSetting.\n")); +} + +static void +viaFPIOPadSetting(ScrnInfoPtr pScrn, Bool ioPadOn) +{ + vgaHWPtr hwp = VGAHWPTR(pScrn); + VIAPtr pVia = VIAPTR(pScrn); + CARD8 sr12, sr13, sr5a; + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered viaFPIOPadSetting.\n")); + + if ((pVia->Chipset == VIA_CX700) + || (pVia->Chipset == VIA_VX800) + || (pVia->Chipset == VIA_VX855) + || (pVia->Chipset == VIA_VX900)) { + + sr5a = hwp->readSeq(hwp, 0x5A); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "SR5A: 0x%02X\n", sr5a)); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Setting 3C5.5A[0] to 0.\n")); + ViaSeqMask(hwp, 0x5A, sr5a & 0xFE, 0x01); + } + + sr12 = hwp->readSeq(hwp, 0x12); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "SR12: 0x%02X\n", sr12)); + sr13 = hwp->readSeq(hwp, 0x13); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "SR13: 0x%02X\n", sr13)); + + switch (pVia->Chipset) { + case VIA_CLE266: + break; + case VIA_KM400: + case VIA_K8M800: + case VIA_PM800: + case VIA_P4M800PRO: + break; + case VIA_P4M890: + case VIA_K8M890: + case VIA_P4M900: + /* The tricky thing about VIA Technologies PCI Express based + * north bridge / south bridge 2 chip chipset is that + * it pin multiplexes DVP0 / DVP1 with north bridge's PCI + * Express x16 link. In particular, HP 2133 Mini-Note's WLAN + * is connected to north bridge's PCI Express Lane 0, but the + * Lane 0 is also pin multiplexed with DVP0. What this means is + * turning on DVP0 without probing the relevant strapping pin + * to determine the connected panel interface type will lead to + * the PCIe based WLAN to getting disabled by OpenChrome DDX + * when X.Org Server starts. + * The current remedy for this will be to turn on DVP0 + * only when an 18-bit / 24-bit interface flat panel is + * connected. */ + /* 3C5.12[4] - DVP0D4 pin strapping + * 0: Use DVP1 only for a flat panel. + * 1: Use DVP0 and DVP1 for a flat panel */ + if (sr12 & 0x10) { + /* Since an 18-bit / 24-bit flat panel is being used, actively + * control DVP0. */ + viaDVP0PCIeSetIOPadSetting(pScrn, ioPadOn ? 0x03 : 0x00); + } else { + /* Keep DVP0 powered down. Otherwise, it will interfere with + * PCIe Lane 0 through 7. */ + viaDVP0PCIeSetIOPadSetting(pScrn, 0x00); + } + + /* Control DVP1 for a flat panel. */ + viaDVP1PCIeSetIOPadSetting(pScrn, ioPadOn ? 0x03 : 0x00); + break; + case VIA_CX700: + case VIA_VX800: + case VIA_VX855: + case VIA_VX900: + /* 3C5.13[7:6] - DVP1D15 and DVP1D14 pin strappings + * 00: LVDS1 + LVDS2 + * 01: DVI + LVDS2 + * 10: Dual LVDS (LVDS1 + LVDS2 used + * simultaneously) + * 11: DVI only */ + if ((((~(sr13 & 0x80)) && (~(sr13 & 0x40))) + || ((sr13 & 0x80) && (~(sr13 & 0x40)))) + && (!pVia->isVIANanoBook)) { + + viaLVDS1SetIOPadSetting(pScrn, ioPadOn ? 0x03 : 0x00); + } + + if (((~(sr13 & 0x80)) || (~(sr13 & 0x40))) + || (pVia->isVIANanoBook)) { + + viaLVDS2SetIOPadSetting(pScrn, ioPadOn ? 0x03 : 0x00); + } + break; + default: + break; + } + + if ((pVia->Chipset == VIA_CX700) + || (pVia->Chipset == VIA_VX800) + || (pVia->Chipset == VIA_VX855) + || (pVia->Chipset == VIA_VX900)) { + + hwp->writeSeq(hwp, 0x5A, sr5a); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Restoring 3C5.5A[0].\n")); + } + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting viaFPIOPadSetting.\n")); +} + +static void +ViaLVDSSoftwarePowerFirstSequence(ScrnInfoPtr pScrn, Bool on) +{ + vgaHWPtr hwp = VGAHWPTR(pScrn); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "ViaLVDSSoftwarePowerFirstSequence: %d\n", on)); + if (on) { + + /* Software control power sequence ON*/ + hwp->writeCrtc(hwp, 0x91, hwp->readCrtc(hwp, 0x91) & 0x7F); + hwp->writeCrtc(hwp, 0x91, hwp->readCrtc(hwp, 0x91) | 0x01); + usleep(TD0); + + /* VDD ON*/ + hwp->writeCrtc(hwp, 0x91, hwp->readCrtc(hwp, 0x91) | 0x10); + usleep(TD1); + + /* DATA ON */ + hwp->writeCrtc(hwp, 0x91, hwp->readCrtc(hwp, 0x91) | 0x08); + usleep(TD2); + + /* VEE ON (unused on vt3353)*/ + hwp->writeCrtc(hwp, 0x91, hwp->readCrtc(hwp, 0x91) | 0x04); + usleep(TD3); + + /* Back-Light ON */ + hwp->writeCrtc(hwp, 0x91, hwp->readCrtc(hwp, 0x91) | 0x02); + } else { + /* Back-Light OFF */ + hwp->writeCrtc(hwp, 0x91, hwp->readCrtc(hwp, 0x91) & 0xFD); + usleep(TD3); + + /* VEE OFF (unused on vt3353)*/ + hwp->writeCrtc(hwp, 0x91, hwp->readCrtc(hwp, 0x91) & 0xFB); + usleep(TD2); + + /* DATA OFF */ + hwp->writeCrtc(hwp, 0x91, hwp->readCrtc(hwp, 0x91) & 0xF7); + usleep(TD1); + + /* VDD OFF */ + hwp->writeCrtc(hwp, 0x91, hwp->readCrtc(hwp, 0x91) & 0xEF); + } +} + +static void +ViaLVDSSoftwarePowerSecondSequence(ScrnInfoPtr pScrn, Bool on) +{ + vgaHWPtr hwp = VGAHWPTR(pScrn); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "ViaLVDSSoftwarePowerSecondSequence: %d\n", on)); + if (on) { + /* Secondary power hardware power sequence enable 0:off 1: on */ + hwp->writeCrtc(hwp, 0xD4, hwp->readCrtc(hwp, 0xD4) & 0xFD); + + /* Software control power sequence ON */ + hwp->writeCrtc(hwp, 0xD3, hwp->readCrtc(hwp, 0xD3) | 0x01); + usleep(TD0); + + /* VDD ON*/ + hwp->writeCrtc(hwp, 0xD3, hwp->readCrtc(hwp, 0xD3) | 0x10); + usleep(TD1); + + /* DATA ON */ + hwp->writeCrtc(hwp, 0xD3, hwp->readCrtc(hwp, 0xD3) | 0x08); + usleep(TD2); + + /* VEE ON (unused on vt3353)*/ + hwp->writeCrtc(hwp, 0xD3, hwp->readCrtc(hwp, 0xD3) | 0x04); + usleep(TD3); + + /* Back-Light ON */ + hwp->writeCrtc(hwp, 0xD3, hwp->readCrtc(hwp, 0xD3) | 0x02); + } else { + /* Back-Light OFF */ + hwp->writeCrtc(hwp, 0xD3, hwp->readCrtc(hwp, 0xD3) & 0xFD); + usleep(TD3); + + /* VEE OFF */ + hwp->writeCrtc(hwp, 0xD3, hwp->readCrtc(hwp, 0xD3) & 0xFB); + /* Delay TD2 msec. */ + usleep(TD2); + + /* DATA OFF */ + hwp->writeCrtc(hwp, 0xD3, hwp->readCrtc(hwp, 0xD3) & 0xF7); + /* Delay TD1 msec. */ + usleep(TD1); + + /* VDD OFF */ + hwp->writeCrtc(hwp, 0xD3, hwp->readCrtc(hwp, 0xD3) & 0xEF); + } +} + + +static void +ViaLVDSHardwarePowerFirstSequence(ScrnInfoPtr pScrn, Bool on) +{ + vgaHWPtr hwp = VGAHWPTR(pScrn); + + if (on) { + /* Use hardware control power sequence. */ + hwp->writeCrtc(hwp, 0x91, hwp->readCrtc(hwp, 0x91) & 0xFE); + /* Turn on back light. */ + hwp->writeCrtc(hwp, 0x91, hwp->readCrtc(hwp, 0x91) & 0x3F); + /* Turn on hardware power sequence. */ + hwp->writeCrtc(hwp, 0x6A, hwp->readCrtc(hwp, 0x6A) | 0x08); + } else { + /* Turn off power sequence. */ + hwp->writeCrtc(hwp, 0x6A, hwp->readCrtc(hwp, 0x6A) & 0xF7); + usleep(1); + /* Turn off back light. */ + hwp->writeCrtc(hwp, 0x91, 0xC0); + } +} + +static void +ViaLVDSHardwarePowerSecondSequence(ScrnInfoPtr pScrn, Bool on) +{ + vgaHWPtr hwp = VGAHWPTR(pScrn); + + if (on) { + /* Use hardware control power sequence. */ + hwp->writeCrtc(hwp, 0xD3, hwp->readCrtc(hwp, 0xD3) & 0xFE); + /* Turn on back light. */ + hwp->writeCrtc(hwp, 0xD3, hwp->readCrtc(hwp, 0xD3) & 0x3F); + /* Turn on hardware power sequence. */ + hwp->writeCrtc(hwp, 0xD4, hwp->readCrtc(hwp, 0xD4) | 0x02); + } else { + /* Turn off power sequence. */ + hwp->writeCrtc(hwp, 0xD4, hwp->readCrtc(hwp, 0xD4) & 0xFD); + usleep(1); + /* Turn off back light. */ + hwp->writeCrtc(hwp, 0xD3, 0xC0); + } +} + +static void +ViaLVDSPowerChannel(ScrnInfoPtr pScrn, Bool on) +{ + vgaHWPtr hwp = VGAHWPTR(pScrn); + CARD8 lvdsMask; + + if (on) { + /* LVDS0: 0x7F, LVDS1: 0xBF */ + lvdsMask = 0x7F & 0xBF; + hwp->writeCrtc(hwp, 0xD2, hwp->readCrtc(hwp, 0xD2) & lvdsMask); + } else { + /* LVDS0: 0x80, LVDS1: 0x40 */ + lvdsMask = 0x80 | 0x40; + hwp->writeCrtc(hwp, 0xD2, hwp->readCrtc(hwp, 0xD2) | lvdsMask); + } +} + +static void +ViaLVDSPower(ScrnInfoPtr pScrn, Bool Power_On) +{ + vgaHWPtr hwp = VGAHWPTR(pScrn); + VIAPtr pVia = VIAPTR(pScrn); + CARD8 crd2; + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered ViaLVDSPower.\n")); + + /* + * VX800, CX700 have HW issue, so we'd better use SW power sequence + * Fix Ticket #308 + */ + switch (pVia->Chipset) { + case VIA_CX700: + case VIA_VX800: + + /* Is the integrated TMDS transmitter (DVI) not in use? */ + crd2 = hwp->readCrtc(hwp, 0xD2); + if (((pVia->Chipset == VIA_CX700) + || (pVia->Chipset == VIA_VX800) + || (pVia->Chipset == VIA_VX855) + || (pVia->Chipset == VIA_VX900)) + && (!(crd2 & 0x10))) { + ViaLVDSSoftwarePowerFirstSequence(pScrn, Power_On); + } + + ViaLVDSSoftwarePowerSecondSequence(pScrn, Power_On); + break; + + case VIA_VX855: + case VIA_VX900: + /* Is the integrated TMDS transmitter (DVI) not in use? */ + crd2 = hwp->readCrtc(hwp, 0xD2); + if (((pVia->Chipset == VIA_CX700) + || (pVia->Chipset == VIA_VX800) + || (pVia->Chipset == VIA_VX855) + || (pVia->Chipset == VIA_VX900)) + && (!(crd2 & 0x10))) { + ViaLVDSHardwarePowerFirstSequence(pScrn, Power_On); + } + + ViaLVDSHardwarePowerSecondSequence(pScrn, Power_On); + break; + default: + ViaLVDSHardwarePowerFirstSequence(pScrn, Power_On); + ViaLVDSHardwarePowerSecondSequence(pScrn, Power_On); + break; + } + + ViaLVDSPowerChannel(pScrn, Power_On); + + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Integrated LVDS Flat Panel Power: %s\n", + Power_On ? "On" : "Off"); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting ViaLVDSPower.\n")); +} + +static void +ViaLCDPowerSequence(vgaHWPtr hwp, VIALCDPowerSeqRec Sequence) +{ + int i; + + for (i = 0; i < Sequence.numEntry; i++) { + ViaVgahwMask(hwp, 0x300 + Sequence.port[i], Sequence.offset[i], + 0x301 + Sequence.port[i], Sequence.data[i], + Sequence.mask[i]); + usleep(Sequence.delay[i]); + } +} + +static void +ViaLCDPower(xf86OutputPtr output, Bool Power_On) +{ + ViaPanelInfoPtr Panel = output->driver_private; + ScrnInfoPtr pScrn = output->scrn; + vgaHWPtr hwp = VGAHWPTR(pScrn); + VIAPtr pVia = VIAPTR(pScrn); + VIABIOSInfoPtr pBIOSInfo = pVia->pBIOSInfo; + int i; + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered ViaLCDPower.\n")); + + /* Enable LCD */ + if (Power_On) + ViaCrtcMask(hwp, 0x6A, 0x08, 0x08); + else + ViaCrtcMask(hwp, 0x6A, 0x00, 0x08); + + if (pBIOSInfo->LCDPower) + pBIOSInfo->LCDPower(pScrn, Power_On); + + /* Find Panel Size Index for PowerSeq Table */ + if (pVia->Chipset == VIA_CLE266) { + if (Panel->NativeModeIndex != VIA_PANEL_INVALID) { + for (i = 0; i < NumPowerOn; i++) { + if (lcdTable[Panel->PanelIndex].powerSeq + == powerOn[i].powerSeq) + break; + } + } else + i = 0; + } else + /* KM and K8M use PowerSeq Table index 2. */ + i = 2; + + usleep(1); + if (Power_On) + ViaLCDPowerSequence(hwp, powerOn[i]); + else + ViaLCDPowerSequence(hwp, powerOff[i]); + usleep(1); + + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Integrated LVDS Flat Panel Power: %s\n", + Power_On ? "On" : "Off"); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting ViaLCDPower.\n")); +} + +/* + * Try to interpret EDID ourselves. + */ +static Bool +ViaPanelGetSizeFromEDID(ScrnInfoPtr pScrn, xf86MonPtr pMon, + int *width, int *height) +{ + int i, max_hsize = 0, vsize = 0; + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "VIAGetPanelSizeFromEDID\n")); + + /* !!! Why are we not checking VESA modes? */ + + /* checking standard timings */ + for (i = 0; i < STD_TIMINGS; i++) + if ((pMon->timings2[i].hsize > 256) + && (pMon->timings2[i].hsize > max_hsize)) { + max_hsize = pMon->timings2[i].hsize; + vsize = pMon->timings2[i].vsize; + } + + if (max_hsize != 0) { + *width = max_hsize; + *height = vsize; + return TRUE; + } + + /* checking detailed monitor section */ + + /* !!! skip Ranges and standard timings */ + + /* check detailed timings */ + for (i = 0; i < DET_TIMINGS; i++) + if (pMon->det_mon[i].type == DT) { + struct detailed_timings timing = pMon->det_mon[i].section.d_timings; + + /* ignore v_active for now */ + if ((timing.clock > 15000000) && (timing.h_active > max_hsize)) { + max_hsize = timing.h_active; + vsize = timing.v_active; + } + } + + if (max_hsize != 0) { + *width = max_hsize; + *height = vsize; + return TRUE; + } + return FALSE; +} + +static Bool +ViaPanelGetSizeFromDDCv1(xf86OutputPtr output, int *width, int *height) +{ + ScrnInfoPtr pScrn = output->scrn; + VIAPtr pVia = VIAPTR(pScrn); + xf86MonPtr pMon; + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered VIAGetPanelSizeFromDDCv1.\n")); + + if (!pVia->pI2CBus2) { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "I2C Bus 2 does not exist.\n"); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting VIAGetPanelSizeFromDDCv1.\n")); + return FALSE; + } + + if (!xf86I2CProbeAddress(pVia->pI2CBus2, 0xA0)) { + xf86DrvMsg(pScrn->scrnIndex, X_PROBED, + "I2C device on I2C Bus 2 does not support EDID.\n"); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting VIAGetPanelSizeFromDDCv1.\n")); + return FALSE; + } + + /* Probe I2C Bus 2 to see if a flat panel is connected. */ + xf86DrvMsg(pScrn->scrnIndex, X_PROBED, + "Probing for a flat panel on I2C Bus 2.\n"); + pMon = xf86OutputGetEDID(output, pVia->pI2CBus2); + if (pMon && DIGITAL(pMon->features.input_type)) { + xf86OutputSetEDID(output, pMon); + xf86DrvMsg(pScrn->scrnIndex, X_PROBED, + "Detected a flat panel on I2C Bus 2.\n"); + } else { + xf86DrvMsg(pScrn->scrnIndex, X_PROBED, + "Did not detect a flat panel on I2C Bus 2.\n"); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting VIAGetPanelSizeFromDDCv1.\n")); + return FALSE; + + } + + if (!ViaPanelGetSizeFromEDID(pScrn, pMon, width, height)) { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "Unable to obtain panel size from EDID information.\n"); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting VIAGetPanelSizeFromDDCv1.\n")); + return FALSE; + } + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "VIAGetPanelSizeFromDDCv1: (%d X %d)\n", + *width, *height)); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting VIAGetPanelSizeFromDDCv1.\n")); + return TRUE; +} + +/* + * Gets the native panel resolution from scratch pad registers. + */ +static void +viaLVDSGetFPInfoFromScratchPad(xf86OutputPtr output) +{ + ScrnInfoPtr pScrn = output->scrn; + vgaHWPtr hwp = VGAHWPTR(pScrn); + ViaPanelInfoPtr panel = output->driver_private; + CARD8 index; + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered viaLVDSGetFPInfoFromScratchPad.\n")); + + index = hwp->readCrtc(hwp, 0x3F) & 0x0F; + + panel->NativeModeIndex = index; + panel->NativeWidth = ViaPanelNativeModes[index].Width; + panel->NativeHeight = ViaPanelNativeModes[index].Height; + panel->useDualEdge = ViaPanelNativeModes[index].useDualEdge; + panel->useDithering = ViaPanelNativeModes[index].useDithering; + + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "VIA Technologies VGA BIOS Scratch Pad Register " + "Flat Panel Index: %d\n", + panel->NativeModeIndex); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Flat Panel Native Resolution: %dx%d\n", + panel->NativeWidth, panel->NativeHeight); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Flat Panel Dual Edge Transfer: %s\n", + panel->useDualEdge ? "On" : "Off"); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Flat Panel Output Color Dithering: %s\n", + panel->useDithering ? "On (18 bit)" : "Off (24 bit)"); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting viaLVDSGetFPInfoFromScratchPad.\n")); +} + +static void +ViaPanelCenterMode(DisplayModePtr mode, DisplayModePtr adjusted_mode) +{ + int panelHSyncTime = adjusted_mode->HSyncEnd - adjusted_mode->HSyncStart; + int panelVSyncTime = adjusted_mode->VSyncEnd - adjusted_mode->VSyncStart; + int panelHBlankStart = adjusted_mode->HDisplay; + int panelVBlankStart = adjusted_mode->VDisplay; + int hBorder = (adjusted_mode->HDisplay - mode->HDisplay)/2; + int vBorder = (adjusted_mode->VDisplay - mode->VDisplay)/2; + int newHBlankStart = hBorder + mode->HDisplay; + int newVBlankStart = vBorder + mode->VDisplay; + + adjusted_mode->HDisplay = mode->HDisplay; + adjusted_mode->HSyncStart = (adjusted_mode->HSyncStart - panelHBlankStart) + newHBlankStart; + adjusted_mode->HSyncEnd = adjusted_mode->HSyncStart + panelHSyncTime; + adjusted_mode->VDisplay = mode->VDisplay; + adjusted_mode->VSyncStart = (adjusted_mode->VSyncStart - panelVBlankStart) + newVBlankStart; + adjusted_mode->VSyncEnd = adjusted_mode->VSyncStart + panelVSyncTime; + /* Adjust Crtc H and V */ + adjusted_mode->CrtcHDisplay = adjusted_mode->HDisplay; + adjusted_mode->CrtcHBlankStart = newHBlankStart; + adjusted_mode->CrtcHBlankEnd = adjusted_mode->CrtcHTotal - hBorder; + adjusted_mode->CrtcHSyncStart = adjusted_mode->HSyncStart; + adjusted_mode->CrtcHSyncEnd = adjusted_mode->HSyncEnd; + adjusted_mode->CrtcVDisplay = adjusted_mode->VDisplay; + adjusted_mode->CrtcVBlankStart = newVBlankStart; + adjusted_mode->CrtcVBlankEnd = adjusted_mode->CrtcVTotal - vBorder; + adjusted_mode->CrtcVSyncStart = adjusted_mode->VSyncStart; + adjusted_mode->CrtcVSyncEnd = adjusted_mode->VSyncEnd; +} + +static void +ViaPanelScale(ScrnInfoPtr pScrn, int resWidth, int resHeight, + int panelWidth, int panelHeight) +{ + VIAPtr pVia = VIAPTR(pScrn); + vgaHWPtr hwp = VGAHWPTR(pScrn); + int horScalingFactor = 0; + int verScalingFactor = 0; + CARD8 cra2 = 0; + CARD8 cr77 = 0; + CARD8 cr78 = 0; + CARD8 cr79 = 0; + CARD8 cr9f = 0; + Bool scaling = FALSE; + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "ViaPanelScale: %d,%d -> %d,%d\n", + resWidth, resHeight, panelWidth, panelHeight)); + + if (resWidth < panelWidth) { + /* Load Horizontal Scaling Factor */ + if (pVia->Chipset != VIA_CLE266 && pVia->Chipset != VIA_KM400) { + horScalingFactor = ((resWidth - 1) * 4096) / (panelWidth - 1); + + /* Horizontal scaling enabled */ + cra2 = 0xC0; + cr9f = horScalingFactor & 0x0003; /* HSCaleFactor[1:0] at CR9F[1:0] */ + } else { + /* TODO: Need testing */ + horScalingFactor = ((resWidth - 1) * 1024) / (panelWidth - 1); + } + + cr77 = (horScalingFactor & 0x03FC) >> 2; /* HSCaleFactor[9:2] at CR77[7:0] */ + cr79 = (horScalingFactor & 0x0C00) >> 10; /* HSCaleFactor[11:10] at CR79[5:4] */ + cr79 <<= 4; + scaling = TRUE; + } + + if (resHeight < panelHeight) { + /* Load Vertical Scaling Factor */ + if (pVia->Chipset != VIA_CLE266 && pVia->Chipset != VIA_KM400) { + verScalingFactor = ((resHeight - 1) * 2048) / (panelHeight - 1); + + /* Vertical scaling enabled */ + cra2 |= 0x08; + cr79 |= ((verScalingFactor & 0x0001) << 3); /* VSCaleFactor[0] at CR79[3] */ + } else { + /* TODO: Need testing */ + verScalingFactor = ((resHeight - 1) * 1024) / (panelHeight - 1); + } + + cr78 |= (verScalingFactor & 0x01FE) >> 1; /* VSCaleFactor[8:1] at CR78[7:0] */ + + cr79 |= ((verScalingFactor & 0x0600) >> 9) << 6; /* VSCaleFactor[10:9] at CR79[7:6] */ + scaling = TRUE; + } + + if (scaling) { + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Scaling factor: horizontal %d (0x%x), vertical %d (0x%x)\n", + horScalingFactor, horScalingFactor, + verScalingFactor, verScalingFactor)); + + ViaCrtcMask(hwp, 0x77, cr77, 0xFF); + ViaCrtcMask(hwp, 0x78, cr78, 0xFF); + ViaCrtcMask(hwp, 0x79, cr79, 0xF8); + + if (pVia->Chipset != VIA_CLE266 && pVia->Chipset != VIA_KM400) { + ViaCrtcMask(hwp, 0x9F, cr9f, 0x03); + } + ViaCrtcMask(hwp, 0x79, 0x03, 0x03); + } else { + /* Disable panel scale */ + ViaCrtcMask(hwp, 0x79, 0x00, 0x01); + } + + if (pVia->Chipset != VIA_CLE266 && pVia->Chipset != VIA_KM400) { + ViaCrtcMask(hwp, 0xA2, cra2, 0xC8); + } + + /* Horizontal scaling selection: interpolation */ + // ViaCrtcMask(hwp, 0x79, 0x02, 0x02); + // else + // ViaCrtcMask(hwp, 0x79, 0x00, 0x02); + /* Horizontal scaling factor selection original / linear */ + //ViaCrtcMask(hwp, 0xA2, 0x40, 0x40); +} + +static void +ViaPanelScaleDisable(ScrnInfoPtr pScrn) +{ + VIAPtr pVia = VIAPTR(pScrn); + vgaHWPtr hwp = VGAHWPTR(pScrn); + + ViaCrtcMask(hwp, 0x79, 0x00, 0x01); + /* Disable VX900 down scaling */ + if (pVia->Chipset == VIA_VX900) + ViaCrtcMask(hwp, 0x89, 0x00, 0x01); + if (pVia->Chipset != VIA_CLE266 && pVia->Chipset != VIA_KM400) + ViaCrtcMask(hwp, 0xA2, 0x00, 0xC8); +} + +static void +via_lvds_create_resources(xf86OutputPtr output) +{ +} + +static void +via_lvds_dpms(xf86OutputPtr output, int mode) +{ + ScrnInfoPtr pScrn = output->scrn; + VIAPtr pVia = VIAPTR(pScrn); + + switch (mode) { + case DPMSModeOn: + switch (pVia->Chipset) { + case VIA_PM800: + case VIA_P4M800PRO: + case VIA_P4M890: + case VIA_K8M890: + case VIA_P4M900: + case VIA_CX700: + case VIA_VX800: + case VIA_VX855: + case VIA_VX900: + ViaLVDSPower(pScrn, TRUE); + break; + default: + ViaLCDPower(output, TRUE); + break; + } + + viaFPIOPadSetting(pScrn, TRUE); + break; + + case DPMSModeStandby: + case DPMSModeSuspend: + case DPMSModeOff: + switch (pVia->Chipset) { + case VIA_PM800: + case VIA_P4M800PRO: + case VIA_P4M890: + case VIA_K8M890: + case VIA_P4M900: + case VIA_CX700: + case VIA_VX800: + case VIA_VX855: + case VIA_VX900: + ViaLVDSPower(pScrn, FALSE); + break; + default: + ViaLCDPower(output, FALSE); + break; + } + + viaFPIOPadSetting(pScrn, FALSE); + break; + } +} + +static void +via_lvds_save(xf86OutputPtr output) +{ +} + +static void +via_lvds_restore(xf86OutputPtr output) +{ + ViaLCDPower(output, TRUE); +} + +static int +via_lvds_mode_valid(xf86OutputPtr output, DisplayModePtr pMode) +{ + ScrnInfoPtr pScrn = output->scrn; + ViaPanelInfoPtr Panel = output->driver_private; + + if (Panel->NativeWidth < pMode->HDisplay || + Panel->NativeHeight < pMode->VDisplay) + return MODE_PANEL; + + if (!Panel->Scale && Panel->NativeHeight != pMode->VDisplay && + Panel->NativeWidth != pMode->HDisplay) + return MODE_PANEL; + + if (!ViaModeDotClockTranslate(pScrn, pMode)) + return MODE_NOCLOCK; + + return MODE_OK; +} + +static Bool +via_lvds_mode_fixup(xf86OutputPtr output, DisplayModePtr mode, + DisplayModePtr adjusted_mode) +{ + ViaPanelInfoPtr Panel = output->driver_private; + + xf86SetModeCrtc(adjusted_mode, 0); + if (!Panel->Center && (mode->HDisplay < Panel->NativeWidth || + mode->VDisplay < Panel->NativeHeight)) { + Panel->Scale = TRUE; + } else { + Panel->Scale = FALSE; + ViaPanelCenterMode(mode, adjusted_mode); + } + return TRUE; +} + +static void +via_lvds_prepare(xf86OutputPtr output) +{ + ScrnInfoPtr pScrn = output->scrn; + + via_lvds_dpms(output, DPMSModeOff); + viaFPIOPadSetting(pScrn, FALSE); +} + +static void +via_lvds_commit(xf86OutputPtr output) +{ + ScrnInfoPtr pScrn = output->scrn; + + via_lvds_dpms(output, DPMSModeOn); + viaFPIOPadSetting(pScrn, TRUE); +} + +static void +via_lvds_mode_set(xf86OutputPtr output, DisplayModePtr mode, + DisplayModePtr adjusted_mode) +{ + ViaPanelInfoPtr Panel = output->driver_private; + ScrnInfoPtr pScrn = output->scrn; + drmmode_crtc_private_ptr iga = output->crtc->driver_private; + VIAPtr pVia = VIAPTR(pScrn); + + if (output->crtc) { + if (Panel->Scale) { + ViaPanelScale(pScrn, mode->HDisplay, mode->VDisplay, + Panel->NativeWidth, + Panel->NativeHeight); + } else { + ViaPanelScaleDisable(pScrn); + } + + switch (pVia->Chipset) { + case VIA_P4M900: + viaDFPLowSetDelayTap(pScrn, 0x08); + break; + case VIA_CX700: + viaLVDS2SetDelayTap(pScrn, 0x01); + break; + default: + break; + } + + + switch (pVia->Chipset) { + case VIA_KM400: + case VIA_K8M800: + case VIA_PM800: + case VIA_P4M800PRO: + viaDFPLowSetDisplaySource(pScrn, iga->index ? 0x01 : 0x00); + viaDFPHighSetDisplaySource(pScrn, iga->index ? 0x01 : 0x00); + break; + case VIA_P4M890: + case VIA_K8M890: + case VIA_P4M900: + viaDFPLowSetDisplaySource(pScrn, iga->index ? 0x01 : 0x00); + viaDVP1SetDisplaySource(pScrn, iga->index ? 0x01 : 0x00); + break; + case VIA_CX700: + case VIA_VX800: + case VIA_VX855: + case VIA_VX900: + viaLVDS2SetDisplaySource(pScrn, iga->index ? 0x01 : 0x00); + + /* Set LVDS2 output color dithering. */ + viaLVDS2SetDithering(pScrn, Panel->useDithering ? TRUE : FALSE); + + /* Set LVDS2 output format to sequential mode. */ + viaLVDS2SetOutputFormat(pScrn, 0x01); + + /* Set LVDS2 output to OPENLDI mode. */ + viaLVDS2SetFormat(pScrn, 0x01); + break; + default: + break; + } + } +} + +static xf86OutputStatus +via_lvds_detect(xf86OutputPtr output) +{ + xf86OutputStatus status = XF86OutputStatusDisconnected; + ScrnInfoPtr pScrn = output->scrn; + VIAPtr pVia = VIAPTR(pScrn); + ViaPanelInfoPtr panel = output->driver_private; + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered via_lvds_detect.\n")); + + /* Hardcode panel size for the OLPC XO-1.5. */ + if (pVia->IsOLPCXO15) { + xf86DrvMsg(pScrn->scrnIndex, X_PROBED, + "Setting up OLPC XO-1.5 flat panel.\n"); + panel->NativeWidth = 1200; + panel->NativeHeight = 900; + status = XF86OutputStatusConnected; + goto exit; + } + + /* For now, FP detection code will not scan the I2C bus + * in order to obtain EDID since it is often used by DVI + * as well. Hence, reading off the CRTC scratch pad register + * supplied by the VGA BIOS is the only method available + * to figure out the FP native screen resolution. */ + viaLVDSGetFPInfoFromScratchPad(output); + status = XF86OutputStatusConnected; + +exit: + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting via_lvds_detect.\n")); + return status; +} + +static DisplayModePtr +via_lvds_get_modes(xf86OutputPtr output) +{ + ViaPanelInfoPtr pPanel = output->driver_private; + ScrnInfoPtr pScrn = output->scrn; + DisplayModePtr pDisplay_Mode = NULL; + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered via_lvds_get_modes.\n")); + + if (output->status == XF86OutputStatusConnected) { + if (!output->MonInfo) { + /* + * Generates a display mode for the native panel resolution, + * using CVT. + */ + if (pPanel->NativeWidth && pPanel->NativeHeight) { + VIAPtr pVia = VIAPTR(pScrn); + + if (pVia->IsOLPCXO15) { + pDisplay_Mode = xf86DuplicateMode(&OLPCMode); + } else { + pDisplay_Mode = xf86CVTMode(pPanel->NativeWidth, pPanel->NativeHeight, + 60.0f, FALSE, FALSE); + } + + if (pDisplay_Mode) { + pDisplay_Mode->CrtcHDisplay = pDisplay_Mode->HDisplay; + pDisplay_Mode->CrtcHSyncStart = pDisplay_Mode->HSyncStart; + pDisplay_Mode->CrtcHSyncEnd = pDisplay_Mode->HSyncEnd; + pDisplay_Mode->CrtcHTotal = pDisplay_Mode->HTotal; + pDisplay_Mode->CrtcHSkew = pDisplay_Mode->HSkew; + pDisplay_Mode->CrtcVDisplay = pDisplay_Mode->VDisplay; + pDisplay_Mode->CrtcVSyncStart = pDisplay_Mode->VSyncStart; + pDisplay_Mode->CrtcVSyncEnd = pDisplay_Mode->VSyncEnd; + pDisplay_Mode->CrtcVTotal = pDisplay_Mode->VTotal; + + pDisplay_Mode->CrtcVBlankStart = min(pDisplay_Mode->CrtcVSyncStart, pDisplay_Mode->CrtcVDisplay); + pDisplay_Mode->CrtcVBlankEnd = max(pDisplay_Mode->CrtcVSyncEnd, pDisplay_Mode->CrtcVTotal); + pDisplay_Mode->CrtcHBlankStart = min(pDisplay_Mode->CrtcHSyncStart, pDisplay_Mode->CrtcHDisplay); + pDisplay_Mode->CrtcHBlankEnd = max(pDisplay_Mode->CrtcHSyncEnd, pDisplay_Mode->CrtcHTotal); + pDisplay_Mode->type = M_T_DRIVER | M_T_PREFERRED; + } else { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "Out of memory. Size: %zu bytes\n", sizeof(DisplayModeRec)); + } + } else { + xf86DrvMsg(pScrn->scrnIndex, X_WARNING, + "Invalid Flat Panel Screen Resolution: " + "%dx%d\n", + pPanel->NativeWidth, pPanel->NativeHeight); + } + } else { + pDisplay_Mode = xf86OutputGetEDIDModes(output); + } + } + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting via_lvds_get_modes.\n")); + return pDisplay_Mode; +} + +#ifdef RANDR_12_INTERFACE +static Bool +via_lvds_set_property(xf86OutputPtr output, Atom property, + RRPropertyValuePtr value) +{ + return FALSE; +} + +static Bool +via_lvds_get_property(xf86OutputPtr output, Atom property) +{ + return FALSE; +} +#endif + +static void +via_lvds_destroy(xf86OutputPtr output) +{ + if (output->driver_private) + free(output->driver_private); + output->driver_private = NULL; +} + +static const xf86OutputFuncsRec via_lvds_funcs = { + .create_resources = via_lvds_create_resources, + .dpms = via_lvds_dpms, + .save = via_lvds_save, + .restore = via_lvds_restore, + .mode_valid = via_lvds_mode_valid, + .mode_fixup = via_lvds_mode_fixup, + .prepare = via_lvds_prepare, + .commit = via_lvds_commit, + .mode_set = via_lvds_mode_set, + .detect = via_lvds_detect, + .get_modes = via_lvds_get_modes, +#ifdef RANDR_12_INTERFACE + .set_property = via_lvds_set_property, +#endif +#ifdef RANDR_13_INTERFACE + .get_property = via_lvds_get_property, +#endif + .destroy = via_lvds_destroy +}; + + +void +via_lvds_init(ScrnInfoPtr pScrn) +{ + ViaPanelInfoPtr Panel = (ViaPanelInfoPtr) xnfcalloc(sizeof(ViaPanelInfoRec), 1); + OptionInfoPtr Options = xnfalloc(sizeof(ViaPanelOptions)); + MessageType from = X_DEFAULT; + VIAPtr pVia = VIAPTR(pScrn); + xf86OutputPtr output = NULL; + vgaHWPtr hwp = VGAHWPTR(pScrn); + CARD8 cr3b = 0x00; + CARD8 cr3b_mask = 0x00; + char outputNameBuffer[32]; + + if (!Panel) + return; + + /* Apparently this is the way VIA Technologies passes */ + /* the presence of a flat panel to the device driver */ + /* via BIOS setup. */ + if (pVia->Chipset == VIA_CLE266) { + cr3b_mask = 0x08; + } else { + cr3b_mask = 0x02; + } + + cr3b = hwp->readCrtc(hwp, 0x3B) & cr3b_mask; + + if (!cr3b) { + return; + } + + memcpy(Options, ViaPanelOptions, sizeof(ViaPanelOptions)); + xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, Options); + + Panel->NativeModeIndex = VIA_PANEL_INVALID; + + /* LCD Center/Expend Option */ + Panel->Center = FALSE; + from = xf86GetOptValBool(Options, OPTION_CENTER, &Panel->Center) + ? X_CONFIG : X_DEFAULT; + xf86DrvMsg(pScrn->scrnIndex, from, "LVDS-0 : DVI Center is %s.\n", + Panel->Center ? "enabled" : "disabled"); + + /* The code to dynamically designate a particular FP (i.e., FP-1, + * FP-2, etc.) for xrandr was borrowed from xf86-video-r128 DDX. */ + sprintf(outputNameBuffer, "FP-%d", (pVia->numberFP + 1)); + output = xf86OutputCreate(pScrn, &via_lvds_funcs, outputNameBuffer); + + if (output) { + output->driver_private = Panel; + + /* While there are two (2) display controllers registered with the + * X.Org Server, it is often desirable to fix FP (Flat Panel) to + * IGA2 since only IGA2 contains panel resolution scaling + * functionality. IGA1 does not have this. */ + output->possible_crtcs = 1 << 1; + + output->possible_clones = 0; + output->interlaceAllowed = FALSE; + output->doubleScanAllowed = FALSE; + + /* Increment the number of FP connectors. */ + pVia->numberFP++; + + if (pVia->IsOLPCXO15) { + output->mm_height = 152; + output->mm_width = 114; + } + } else { + free(Panel); + } +} diff -Nru xserver-xorg-video-openchrome-0.5.0/src/via_i2c.c xserver-xorg-video-openchrome-0.6.0/src/via_i2c.c --- xserver-xorg-video-openchrome-0.5.0/src/via_i2c.c 2016-07-06 16:21:06.000000000 +0000 +++ xserver-xorg-video-openchrome-0.6.0/src/via_i2c.c 2017-01-06 03:33:00.000000000 +0000 @@ -1,4 +1,5 @@ /* + * Copyright 2009 Luc Verhaegen. * Copyright 2004 The Unichrome Project [unichrome.sf.net] * Copyright 1998-2003 VIA Technologies, Inc. All Rights Reserved. * Copyright 2001-2003 S3 Graphics, Inc. All Rights Reserved. @@ -478,3 +479,24 @@ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Exiting ViaI2CInit.\n")); } + +/* + * The code originated from Luc Verhaegen's xf86-video-unichrome DDX. + * + * Sure, it is polluting namespace, but this one is quite useful. + */ +Bool +xf86I2CMaskByte(I2CDevPtr d, I2CByte subaddr, I2CByte value, I2CByte mask) +{ + I2CByte tmp; + Bool ret; + + ret = xf86I2CReadByte(d, subaddr, &tmp); + if (!ret) + return FALSE; + + tmp &= ~mask; + tmp |= (value & mask); + + return xf86I2CWriteByte(d, subaddr, tmp); +} diff -Nru xserver-xorg-video-openchrome-0.5.0/src/via_id.c xserver-xorg-video-openchrome-0.6.0/src/via_id.c --- xserver-xorg-video-openchrome-0.5.0/src/via_id.c 2016-07-06 16:21:06.000000000 +0000 +++ xserver-xorg-video-openchrome-0.6.0/src/via_id.c 2017-02-26 23:53:37.000000000 +0000 @@ -1,6 +1,6 @@ /* * Copyright 2005-2015 The Openchrome Project - * [http://www.freedesktop.org/wiki/Openchrome] + * [https://www.freedesktop.org/wiki/Openchrome] * Copyright 2004-2005 The Unichrome Project [unichrome.sf.net] * * Permission is hereby granted, free of charge, to any person obtaining a diff -Nru xserver-xorg-video-openchrome-0.5.0/src/via_lvds.c xserver-xorg-video-openchrome-0.6.0/src/via_lvds.c --- xserver-xorg-video-openchrome-0.5.0/src/via_lvds.c 2016-07-06 16:21:06.000000000 +0000 +++ xserver-xorg-video-openchrome-0.6.0/src/via_lvds.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,1043 +0,0 @@ -/* - * Copyright 2007-2015 The Openchrome Project - * [http://www.freedesktop.org/wiki/Openchrome] - * Copyright 1998-2007 VIA Technologies, Inc. All Rights Reserved. - * Copyright 2001-2007 S3 Graphics, Inc. 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 - * 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. - */ - -/* - * Integrated LVDS power management functions. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "via_driver.h" -#include "via_mode.h" -#include - -/* - * Option handling. - */ -enum ViaPanelOpts { - OPTION_CENTER -}; - -static OptionInfoRec ViaPanelOptions[] = -{ - {OPTION_CENTER, "Center", OPTV_BOOLEAN, {0}, FALSE}, - {-1, NULL, OPTV_NONE, {0}, FALSE} -}; - -static ViaPanelModeRec ViaPanelNativeModes[] = { - {640, 480}, - {800, 600}, - {1024, 768}, - {1280, 768}, - {1280, 1024}, - {1400, 1050}, - {1600, 1200}, /* 0x6 */ - {1280, 800}, /* 0x7 Resolution 1280x800 (Samsung NC20) */ - {800, 480}, /* 0x8 For Quanta 800x480 */ - {1024, 600}, /* 0x9 Resolution 1024x600 (for HP 2133) */ - {1368, 768}, /* 0xA Resolution 1366x768 */ - {1920, 1080}, - {1920, 1200}, - {1280, 1024}, /* 0xD */ - {1440, 900}, /* 0xE */ - {1280, 720}, /* 0xF 480x640 */ - {1200, 900}, /* 0x10 For OLPC 1.5 */ - {1360, 768}, /* 0x11 Resolution 1360X768 */ - {1024, 768}, /* 0x12 Resolution 1024x768 */ - {800, 480} /* 0x13 General 8x4 panel use this setting */ -}; - -#define MODEPREFIX(name) NULL, NULL, name, 0, M_T_DRIVER | M_T_DEFAULT -#define MODESUFFIX 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,FALSE,FALSE,0,NULL,0,0.0,0.0 - -static DisplayModeRec OLPCMode = { - MODEPREFIX("1200x900"), - 57275, 1200, 1208, 1216, 1240, 0, - 900, 905, 908, 912, 0, - V_NHSYNC | V_NVSYNC, MODESUFFIX -}; - -/* - 1. Formula: - 2^13 X 0.0698uSec [1/14.318MHz] = 8192 X 0.0698uSec =572.1uSec - Timer = Counter x 572 uSec - 2. Note: - 0.0698 uSec is too small to compute for hardware. So we multiply a - reference value(2^13) to make it big enough to compute for hardware. - 3. Note: - The meaning of the TD0~TD3 are count of the clock. - TD(sec) = (sec)/(per clock) x (count of clocks) -*/ - -#define TD0 200 -#define TD1 25 -#define TD2 0 -#define TD3 25 - -static void -ViaLVDSSoftwarePowerFirstSequence(ScrnInfoPtr pScrn, Bool on) -{ - vgaHWPtr hwp = VGAHWPTR(pScrn); - - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "ViaLVDSSoftwarePowerFirstSequence: %d\n", on)); - if (on) { - - /* Software control power sequence ON*/ - hwp->writeCrtc(hwp, 0x91, hwp->readCrtc(hwp, 0x91) & 0x7F); - hwp->writeCrtc(hwp, 0x91, hwp->readCrtc(hwp, 0x91) | 0x01); - usleep(TD0); - - /* VDD ON*/ - hwp->writeCrtc(hwp, 0x91, hwp->readCrtc(hwp, 0x91) | 0x10); - usleep(TD1); - - /* DATA ON */ - hwp->writeCrtc(hwp, 0x91, hwp->readCrtc(hwp, 0x91) | 0x08); - usleep(TD2); - - /* VEE ON (unused on vt3353)*/ - hwp->writeCrtc(hwp, 0x91, hwp->readCrtc(hwp, 0x91) | 0x04); - usleep(TD3); - - /* Back-Light ON */ - hwp->writeCrtc(hwp, 0x91, hwp->readCrtc(hwp, 0x91) | 0x02); - } else { - /* Back-Light OFF */ - hwp->writeCrtc(hwp, 0x91, hwp->readCrtc(hwp, 0x91) & 0xFD); - usleep(TD3); - - /* VEE OFF (unused on vt3353)*/ - hwp->writeCrtc(hwp, 0x91, hwp->readCrtc(hwp, 0x91) & 0xFB); - usleep(TD2); - - /* DATA OFF */ - hwp->writeCrtc(hwp, 0x91, hwp->readCrtc(hwp, 0x91) & 0xF7); - usleep(TD1); - - /* VDD OFF */ - hwp->writeCrtc(hwp, 0x91, hwp->readCrtc(hwp, 0x91) & 0xEF); - } -} - -static void -ViaLVDSSoftwarePowerSecondSequence(ScrnInfoPtr pScrn, Bool on) -{ - vgaHWPtr hwp = VGAHWPTR(pScrn); - - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "ViaLVDSSoftwarePowerSecondSequence: %d\n", on)); - if (on) { - /* Secondary power hardware power sequence enable 0:off 1: on */ - hwp->writeCrtc(hwp, 0xD4, hwp->readCrtc(hwp, 0xD4) & 0xFD); - - /* Software control power sequence ON */ - hwp->writeCrtc(hwp, 0xD3, hwp->readCrtc(hwp, 0xD3) | 0x01); - usleep(TD0); - - /* VDD ON*/ - hwp->writeCrtc(hwp, 0xD3, hwp->readCrtc(hwp, 0xD3) | 0x10); - usleep(TD1); - - /* DATA ON */ - hwp->writeCrtc(hwp, 0xD3, hwp->readCrtc(hwp, 0xD3) | 0x08); - usleep(TD2); - - /* VEE ON (unused on vt3353)*/ - hwp->writeCrtc(hwp, 0xD3, hwp->readCrtc(hwp, 0xD3) | 0x04); - usleep(TD3); - - /* Back-Light ON */ - hwp->writeCrtc(hwp, 0xD3, hwp->readCrtc(hwp, 0xD3) | 0x02); - } else { - /* Back-Light OFF */ - hwp->writeCrtc(hwp, 0xD3, hwp->readCrtc(hwp, 0xD3) & 0xFD); - usleep(TD3); - - /* VEE OFF */ - hwp->writeCrtc(hwp, 0xD3, hwp->readCrtc(hwp, 0xD3) & 0xFB); - /* Delay TD2 msec. */ - usleep(TD2); - - /* DATA OFF */ - hwp->writeCrtc(hwp, 0xD3, hwp->readCrtc(hwp, 0xD3) & 0xF7); - /* Delay TD1 msec. */ - usleep(TD1); - - /* VDD OFF */ - hwp->writeCrtc(hwp, 0xD3, hwp->readCrtc(hwp, 0xD3) & 0xEF); - } -} - - -static void -ViaLVDSHardwarePowerFirstSequence(ScrnInfoPtr pScrn, Bool on) -{ - vgaHWPtr hwp = VGAHWPTR(pScrn); - - if (on) { - /* Use hardware control power sequence. */ - hwp->writeCrtc(hwp, 0x91, hwp->readCrtc(hwp, 0x91) & 0xFE); - /* Turn on back light. */ - hwp->writeCrtc(hwp, 0x91, hwp->readCrtc(hwp, 0x91) & 0x3F); - /* Turn on hardware power sequence. */ - hwp->writeCrtc(hwp, 0x6A, hwp->readCrtc(hwp, 0x6A) | 0x08); - } else { - /* Turn off power sequence. */ - hwp->writeCrtc(hwp, 0x6A, hwp->readCrtc(hwp, 0x6A) & 0xF7); - usleep(1); - /* Turn off back light. */ - hwp->writeCrtc(hwp, 0x91, 0xC0); - } -} - -static void -ViaLVDSHardwarePowerSecondSequence(ScrnInfoPtr pScrn, Bool on) -{ - vgaHWPtr hwp = VGAHWPTR(pScrn); - - if (on) { - /* Use hardware control power sequence. */ - hwp->writeCrtc(hwp, 0xD3, hwp->readCrtc(hwp, 0xD3) & 0xFE); - /* Turn on back light. */ - hwp->writeCrtc(hwp, 0xD3, hwp->readCrtc(hwp, 0xD3) & 0x3F); - /* Turn on hardware power sequence. */ - hwp->writeCrtc(hwp, 0xD4, hwp->readCrtc(hwp, 0xD4) | 0x02); - } else { - /* Turn off power sequence. */ - hwp->writeCrtc(hwp, 0xD4, hwp->readCrtc(hwp, 0xD4) & 0xFD); - usleep(1); - /* Turn off back light. */ - hwp->writeCrtc(hwp, 0xD3, 0xC0); - } -} - -static void -ViaLVDSPowerChannel(ScrnInfoPtr pScrn, Bool on) -{ - vgaHWPtr hwp = VGAHWPTR(pScrn); - CARD8 lvdsMask; - - if (on) { - /* LVDS0: 0x7F, LVDS1: 0xBF */ - lvdsMask = 0x7F & 0xBF; - hwp->writeCrtc(hwp, 0xD2, hwp->readCrtc(hwp, 0xD2) & lvdsMask); - } else { - /* LVDS0: 0x80, LVDS1: 0x40 */ - lvdsMask = 0x80 | 0x40; - hwp->writeCrtc(hwp, 0xD2, hwp->readCrtc(hwp, 0xD2) | lvdsMask); - } -} - -static void -ViaLVDSPower(ScrnInfoPtr pScrn, Bool Power_On) -{ - VIAPtr pVia = VIAPTR(pScrn); - - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Entered ViaLVDSPower.\n")); - /* - * VX800, CX700 have HW issue, so we'd better use SW power sequence - * Fix Ticket #308 - */ - switch (pVia->Chipset) { - case VIA_VX800: - case VIA_CX700: - ViaLVDSSoftwarePowerFirstSequence(pScrn, Power_On); - ViaLVDSSoftwarePowerSecondSequence(pScrn, Power_On); - break; - default: - ViaLVDSHardwarePowerFirstSequence(pScrn, Power_On); - ViaLVDSHardwarePowerSecondSequence(pScrn, Power_On); - break; - } - - ViaLVDSPowerChannel(pScrn, Power_On); - - xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Integrated LVDS Flat Panel Power: %s\n", - Power_On ? "On" : "Off"); - - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Exiting ViaLVDSPower.\n")); -} - -static void -via_lvds_create_resources(xf86OutputPtr output) -{ -} - -#ifdef RANDR_12_INTERFACE -static Bool -via_lvds_set_property(xf86OutputPtr output, Atom property, - RRPropertyValuePtr value) -{ - return FALSE; -} - -static Bool -via_lvds_get_property(xf86OutputPtr output, Atom property) -{ - return FALSE; -} -#endif - -static void -ViaLCDPowerSequence(vgaHWPtr hwp, VIALCDPowerSeqRec Sequence) -{ - int i; - - for (i = 0; i < Sequence.numEntry; i++) { - ViaVgahwMask(hwp, 0x300 + Sequence.port[i], Sequence.offset[i], - 0x301 + Sequence.port[i], Sequence.data[i], - Sequence.mask[i]); - usleep(Sequence.delay[i]); - } -} - -static void -ViaLCDPower(xf86OutputPtr output, Bool Power_On) -{ - ViaPanelInfoPtr Panel = output->driver_private; - ScrnInfoPtr pScrn = output->scrn; - vgaHWPtr hwp = VGAHWPTR(pScrn); - VIAPtr pVia = VIAPTR(pScrn); - VIABIOSInfoPtr pBIOSInfo = pVia->pBIOSInfo; - int i; - - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Entered ViaLCDPower.\n")); - - /* Enable LCD */ - if (Power_On) - ViaCrtcMask(hwp, 0x6A, 0x08, 0x08); - else - ViaCrtcMask(hwp, 0x6A, 0x00, 0x08); - - if (pBIOSInfo->LCDPower) - pBIOSInfo->LCDPower(pScrn, Power_On); - - /* Find Panel Size Index for PowerSeq Table */ - if (pVia->Chipset == VIA_CLE266) { - if (Panel->NativeModeIndex != VIA_PANEL_INVALID) { - for (i = 0; i < NumPowerOn; i++) { - if (lcdTable[Panel->PanelIndex].powerSeq - == powerOn[i].powerSeq) - break; - } - } else - i = 0; - } else - /* KM and K8M use PowerSeq Table index 2. */ - i = 2; - - usleep(1); - if (Power_On) - ViaLCDPowerSequence(hwp, powerOn[i]); - else - ViaLCDPowerSequence(hwp, powerOff[i]); - usleep(1); - - xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Integrated LVDS Flat Panel Power: %s\n", - Power_On ? "On" : "Off"); - - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Exiting ViaLCDPower.\n")); -} - -static void -via_lvds_dpms(xf86OutputPtr output, int mode) -{ - ScrnInfoPtr pScrn = output->scrn; - VIAPtr pVia = VIAPTR(pScrn); - - switch (mode) { - case DPMSModeOn: - switch (pVia->Chipset) { - case VIA_P4M900: - case VIA_CX700: - case VIA_VX800: - case VIA_VX855: - case VIA_VX900: - ViaLVDSPower(pScrn, TRUE); - break; - } - ViaLCDPower(output, TRUE); - break; - - case DPMSModeStandby: - case DPMSModeSuspend: - case DPMSModeOff: - switch (pVia->Chipset) { - case VIA_P4M900: - case VIA_CX700: - case VIA_VX800: - case VIA_VX855: - case VIA_VX900: - ViaLVDSPower(pScrn, FALSE); - break; - } - ViaLCDPower(output, FALSE); - break; - } -} - -static void -via_lvds_save(xf86OutputPtr output) -{ -} - -static void -via_lvds_restore(xf86OutputPtr output) -{ - ViaLCDPower(output, TRUE); -} - -/* - * Try to interpret EDID ourselves. - */ -static Bool -ViaPanelGetSizeFromEDID(ScrnInfoPtr pScrn, xf86MonPtr pMon, - int *width, int *height) -{ - int i, max_hsize = 0, vsize = 0; - - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "VIAGetPanelSizeFromEDID\n")); - - /* !!! Why are we not checking VESA modes? */ - - /* checking standard timings */ - for (i = 0; i < STD_TIMINGS; i++) - if ((pMon->timings2[i].hsize > 256) - && (pMon->timings2[i].hsize > max_hsize)) { - max_hsize = pMon->timings2[i].hsize; - vsize = pMon->timings2[i].vsize; - } - - if (max_hsize != 0) { - *width = max_hsize; - *height = vsize; - return TRUE; - } - - /* checking detailed monitor section */ - - /* !!! skip Ranges and standard timings */ - - /* check detailed timings */ - for (i = 0; i < DET_TIMINGS; i++) - if (pMon->det_mon[i].type == DT) { - struct detailed_timings timing = pMon->det_mon[i].section.d_timings; - - /* ignore v_active for now */ - if ((timing.clock > 15000000) && (timing.h_active > max_hsize)) { - max_hsize = timing.h_active; - vsize = timing.v_active; - } - } - - if (max_hsize != 0) { - *width = max_hsize; - *height = vsize; - return TRUE; - } - return FALSE; -} - -static Bool -ViaPanelGetSizeFromDDCv1(xf86OutputPtr output, int *width, int *height) -{ - ScrnInfoPtr pScrn = output->scrn; - VIAPtr pVia = VIAPTR(pScrn); - xf86MonPtr pMon; - - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Entered VIAGetPanelSizeFromDDCv1.\n")); - - if (!pVia->pI2CBus2) { - xf86DrvMsg(pScrn->scrnIndex, X_ERROR, - "I2C Bus 2 does not exist.\n"); - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Exiting VIAGetPanelSizeFromDDCv1.\n")); - return FALSE; - } - - if (!xf86I2CProbeAddress(pVia->pI2CBus2, 0xA0)) { - xf86DrvMsg(pScrn->scrnIndex, X_PROBED, - "I2C device on I2C Bus 2 does not support EDID.\n"); - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Exiting VIAGetPanelSizeFromDDCv1.\n")); - return FALSE; - } - - /* Probe I2C Bus 2 to see if a flat panel is connected. */ - xf86DrvMsg(pScrn->scrnIndex, X_PROBED, - "Probing for a flat panel on I2C Bus 2.\n"); - pMon = xf86OutputGetEDID(output, pVia->pI2CBus2); - if (pMon && DIGITAL(pMon->features.input_type)) { - xf86OutputSetEDID(output, pMon); - xf86DrvMsg(pScrn->scrnIndex, X_PROBED, - "Detected a flat panel on I2C Bus 2.\n"); - } else { - xf86DrvMsg(pScrn->scrnIndex, X_PROBED, - "Did not detect a flat panel on I2C Bus 2.\n"); - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Exiting VIAGetPanelSizeFromDDCv1.\n")); - return FALSE; - - } - - if (!ViaPanelGetSizeFromEDID(pScrn, pMon, width, height)) { - xf86DrvMsg(pScrn->scrnIndex, X_ERROR, - "Unable to obtain panel size from EDID information.\n"); - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Exiting VIAGetPanelSizeFromDDCv1.\n")); - return FALSE; - } - - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "VIAGetPanelSizeFromDDCv1: (%d X %d)\n", - *width, *height)); - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Exiting VIAGetPanelSizeFromDDCv1.\n")); - return TRUE; -} - -static Bool -ViaGetResolutionIndex(ScrnInfoPtr pScrn, ViaPanelInfoPtr Panel, - DisplayModePtr mode) -{ - int i; - - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "ViaGetResolutionIndex: Looking for %dx%d\n", - mode->CrtcHDisplay, mode->CrtcVDisplay)); - for (i = 0; ViaResolutionTable[i].Index != VIA_RES_INVALID; i++) { - if ((ViaResolutionTable[i].X == mode->CrtcHDisplay) - && (ViaResolutionTable[i].Y == mode->CrtcVDisplay)) { - Panel->ResolutionIndex = ViaResolutionTable[i].Index; - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "ViaGetResolutionIndex:" - " %d\n", Panel->ResolutionIndex)); - return TRUE; - } - } - - Panel->ResolutionIndex = VIA_RES_INVALID; - return FALSE; -} - -/* - * Gets the native panel resolution from scratch pad registers. - */ -static void -ViaPanelGetNativeModeFromScratchPad(xf86OutputPtr output) -{ - ViaPanelInfoPtr panel = output->driver_private; - ScrnInfoPtr pScrn = output->scrn; - vgaHWPtr hwp = VGAHWPTR(pScrn); - CARD8 index; - - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "ViaPanelGetNativeModeFromScratchPad\n")); - - index = hwp->readCrtc(hwp, 0x3F) & 0x0F; - - panel->NativeModeIndex = index; - panel->NativeWidth = ViaPanelNativeModes[index].Width; - panel->NativeHeight = ViaPanelNativeModes[index].Height; - xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Native Panel Resolution is %dx%d\n", - panel->NativeWidth, panel->NativeHeight); -} - -static int -via_lvds_mode_valid(xf86OutputPtr output, DisplayModePtr pMode) -{ - ScrnInfoPtr pScrn = output->scrn; - VIAPtr pVia = VIAPTR(pScrn); - - ViaPanelInfoPtr Panel = output->driver_private; - - if (Panel->NativeWidth < pMode->HDisplay || - Panel->NativeHeight < pMode->VDisplay) - return MODE_PANEL; - - if (!Panel->Scale && Panel->NativeHeight != pMode->VDisplay && - Panel->NativeWidth != pMode->HDisplay) - return MODE_PANEL; - - if (!ViaModeDotClockTranslate(pScrn, pMode)) - return MODE_NOCLOCK; - - return MODE_OK; -} - -static void -ViaPanelCenterMode(DisplayModePtr mode, DisplayModePtr adjusted_mode) -{ - int panelHSyncTime = adjusted_mode->HSyncEnd - adjusted_mode->HSyncStart; - int panelVSyncTime = adjusted_mode->VSyncEnd - adjusted_mode->VSyncStart; - int panelHBlankStart = adjusted_mode->HDisplay; - int panelVBlankStart = adjusted_mode->VDisplay; - int hBorder = (adjusted_mode->HDisplay - mode->HDisplay)/2; - int vBorder = (adjusted_mode->VDisplay - mode->VDisplay)/2; - int newHBlankStart = hBorder + mode->HDisplay; - int newVBlankStart = vBorder + mode->VDisplay; - - adjusted_mode->HDisplay = mode->HDisplay; - adjusted_mode->HSyncStart = (adjusted_mode->HSyncStart - panelHBlankStart) + newHBlankStart; - adjusted_mode->HSyncEnd = adjusted_mode->HSyncStart + panelHSyncTime; - adjusted_mode->VDisplay = mode->VDisplay; - adjusted_mode->VSyncStart = (adjusted_mode->VSyncStart - panelVBlankStart) + newVBlankStart; - adjusted_mode->VSyncEnd = adjusted_mode->VSyncStart + panelVSyncTime; - /* Adjust Crtc H and V */ - adjusted_mode->CrtcHDisplay = adjusted_mode->HDisplay; - adjusted_mode->CrtcHBlankStart = newHBlankStart; - adjusted_mode->CrtcHBlankEnd = adjusted_mode->CrtcHTotal - hBorder; - adjusted_mode->CrtcHSyncStart = adjusted_mode->HSyncStart; - adjusted_mode->CrtcHSyncEnd = adjusted_mode->HSyncEnd; - adjusted_mode->CrtcVDisplay = adjusted_mode->VDisplay; - adjusted_mode->CrtcVBlankStart = newVBlankStart; - adjusted_mode->CrtcVBlankEnd = adjusted_mode->CrtcVTotal - vBorder; - adjusted_mode->CrtcVSyncStart = adjusted_mode->VSyncStart; - adjusted_mode->CrtcVSyncEnd = adjusted_mode->VSyncEnd; -} - -static Bool -via_lvds_mode_fixup(xf86OutputPtr output, DisplayModePtr mode, - DisplayModePtr adjusted_mode) -{ - ViaPanelInfoPtr Panel = output->driver_private; - - xf86SetModeCrtc(adjusted_mode, 0); - if (!Panel->Center && (mode->HDisplay < Panel->NativeWidth || - mode->VDisplay < Panel->NativeHeight)) { - Panel->Scale = TRUE; - } else { - Panel->Scale = FALSE; - ViaPanelCenterMode(mode, adjusted_mode); - } - return TRUE; -} - -static void -via_lvds_prepare(xf86OutputPtr output) -{ - via_lvds_dpms(output, DPMSModeOff); - - if (output->crtc) { - drmmode_crtc_private_ptr iga = output->crtc->driver_private; - CARD8 value = 0x00; /* Value for IGA 1 */ - ScrnInfoPtr pScrn = output->scrn; - vgaHWPtr hwp = VGAHWPTR(pScrn); - - /* IGA 2 */ - if (iga->index) - value = 0x10; - ViaCrtcMask(hwp, 0x99, value, value); - } -} - -static void -via_lvds_commit(xf86OutputPtr output) -{ - via_lvds_dpms(output, DPMSModeOn); -} - -static void -ViaPanelScale(ScrnInfoPtr pScrn, int resWidth, int resHeight, - int panelWidth, int panelHeight) -{ - VIAPtr pVia = VIAPTR(pScrn); - vgaHWPtr hwp = VGAHWPTR(pScrn); - int horScalingFactor = 0; - int verScalingFactor = 0; - CARD8 cra2 = 0; - CARD8 cr77 = 0; - CARD8 cr78 = 0; - CARD8 cr79 = 0; - CARD8 cr9f = 0; - Bool scaling = FALSE; - - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "ViaPanelScale: %d,%d -> %d,%d\n", - resWidth, resHeight, panelWidth, panelHeight)); - - if (resWidth < panelWidth) { - /* Load Horizontal Scaling Factor */ - if (pVia->Chipset != VIA_CLE266 && pVia->Chipset != VIA_KM400) { - horScalingFactor = ((resWidth - 1) * 4096) / (panelWidth - 1); - - /* Horizontal scaling enabled */ - cra2 = 0xC0; - cr9f = horScalingFactor & 0x0003; /* HSCaleFactor[1:0] at CR9F[1:0] */ - } else { - /* TODO: Need testing */ - horScalingFactor = ((resWidth - 1) * 1024) / (panelWidth - 1); - } - - cr77 = (horScalingFactor & 0x03FC) >> 2; /* HSCaleFactor[9:2] at CR77[7:0] */ - cr79 = (horScalingFactor & 0x0C00) >> 10; /* HSCaleFactor[11:10] at CR79[5:4] */ - cr79 <<= 4; - scaling = TRUE; - } - - if (resHeight < panelHeight) { - /* Load Vertical Scaling Factor */ - if (pVia->Chipset != VIA_CLE266 && pVia->Chipset != VIA_KM400) { - verScalingFactor = ((resHeight - 1) * 2048) / (panelHeight - 1); - - /* Vertical scaling enabled */ - cra2 |= 0x08; - cr79 |= ((verScalingFactor & 0x0001) << 3); /* VSCaleFactor[0] at CR79[3] */ - } else { - /* TODO: Need testing */ - verScalingFactor = ((resHeight - 1) * 1024) / (panelHeight - 1); - } - - cr78 |= (verScalingFactor & 0x01FE) >> 1; /* VSCaleFactor[8:1] at CR78[7:0] */ - - cr79 |= ((verScalingFactor & 0x0600) >> 9) << 6; /* VSCaleFactor[10:9] at CR79[7:6] */ - scaling = TRUE; - } - - if (scaling) { - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Scaling factor: horizontal %d (0x%x), vertical %d (0x%x)\n", - horScalingFactor, horScalingFactor, - verScalingFactor, verScalingFactor)); - - ViaCrtcMask(hwp, 0x77, cr77, 0xFF); - ViaCrtcMask(hwp, 0x78, cr78, 0xFF); - ViaCrtcMask(hwp, 0x79, cr79, 0xF8); - - if (pVia->Chipset != VIA_CLE266 && pVia->Chipset != VIA_KM400) { - ViaCrtcMask(hwp, 0x9F, cr9f, 0x03); - } - ViaCrtcMask(hwp, 0x79, 0x03, 0x03); - } else { - /* Disable panel scale */ - ViaCrtcMask(hwp, 0x79, 0x00, 0x01); - } - - if (pVia->Chipset != VIA_CLE266 && pVia->Chipset != VIA_KM400) { - ViaCrtcMask(hwp, 0xA2, cra2, 0xC8); - } - - /* Horizontal scaling selection: interpolation */ - // ViaCrtcMask(hwp, 0x79, 0x02, 0x02); - // else - // ViaCrtcMask(hwp, 0x79, 0x00, 0x02); - /* Horizontal scaling factor selection original / linear */ - //ViaCrtcMask(hwp, 0xA2, 0x40, 0x40); -} - -static void -ViaPanelScaleDisable(ScrnInfoPtr pScrn) -{ - VIAPtr pVia = VIAPTR(pScrn); - vgaHWPtr hwp = VGAHWPTR(pScrn); - - ViaCrtcMask(hwp, 0x79, 0x00, 0x01); - /* Disable VX900 down scaling */ - if (pVia->Chipset == VIA_VX900) - ViaCrtcMask(hwp, 0x89, 0x00, 0x01); - if (pVia->Chipset != VIA_CLE266 && pVia->Chipset != VIA_KM400) - ViaCrtcMask(hwp, 0xA2, 0x00, 0xC8); -} - -static void -via_lvds_mode_set(xf86OutputPtr output, DisplayModePtr mode, - DisplayModePtr adjusted_mode) -{ - ViaPanelInfoPtr Panel = output->driver_private; - ScrnInfoPtr pScrn = output->scrn; - VIAPtr pVia = VIAPTR(pScrn); - - if (Panel->Scale) { - ViaPanelScale(pScrn, mode->HDisplay, mode->VDisplay, - Panel->NativeWidth, - Panel->NativeHeight); - } else { - ViaPanelScaleDisable(pScrn); - } -} - -static int -ViaPanelLookUpModeIndex(int width, int height) -{ - int i, index = VIA_PANEL_INVALID; - int length = sizeof(ViaPanelNativeModes) / sizeof(ViaPanelModeRec); - - - for (i = 0; i < length; i++) { - if (ViaPanelNativeModes[i].Width == width - && ViaPanelNativeModes[i].Height == height) { - index = i; - break; - } - } - return index; -} - -static xf86OutputStatus -via_lvds_detect(xf86OutputPtr output) -{ - xf86OutputStatus status = XF86OutputStatusDisconnected; - ViaPanelInfoPtr panel = output->driver_private; - ScrnInfoPtr pScrn = output->scrn; - VIAPtr pVia = VIAPTR(pScrn); - vgaHWPtr hwp = VGAHWPTR(pScrn); - CARD8 cr3b = 0x00; - CARD8 cr3b_mask = 0x00; - - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Entered via_lvds_detect.\n")); - - /* Hardcode panel size for the XO */ - if (pVia->IsOLPCXO15) { - panel->NativeWidth = 1200; - panel->NativeHeight = 900; - status = XF86OutputStatusConnected; - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_PROBED, - "Setting up OLPC XO-1.5 flat panel.\n")); - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_PROBED, - "Detected Flat Panel Screen Resolution: " - "%dx%d\n", - panel->NativeWidth, panel->NativeHeight)); - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Exiting via_lvds_detect.\n")); - return status; - } - - if (!panel->NativeWidth || !panel->NativeHeight) { - int width, height; - Bool ret; - - ret = ViaPanelGetSizeFromDDCv1(output, &width, &height); - if (ret) { - panel->NativeModeIndex = ViaPanelLookUpModeIndex(width, height); - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_PROBED, - "ViaPanelLookUpModeIndex: Width %d, " - "Height %d, NativeModeIndex%d\n", - width, height, panel->NativeModeIndex)); - if (panel->NativeModeIndex != VIA_PANEL_INVALID) { - panel->NativeWidth = width; - panel->NativeHeight = height; - status = XF86OutputStatusConnected; - } - } else { - /* Apparently this is the way VIA Technologies passes */ - /* the presence of a flat panel to the device driver */ - /* via BIOS setup. */ - if (pVia->Chipset == VIA_CLE266) { - cr3b_mask = 0x08; - } else { - cr3b_mask = 0x02; - } - - cr3b = hwp->readCrtc(hwp, 0x3B) & cr3b_mask; - - if (cr3b) { - ViaPanelGetNativeModeFromScratchPad(output); - - if (panel->NativeWidth && panel->NativeHeight) { - status = XF86OutputStatusConnected; - } - } - } - - if (status == XF86OutputStatusConnected) { - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_PROBED, - "Detected Flat Panel Screen Resolution: " - "%dx%d\n", - panel->NativeWidth, panel->NativeHeight)); - } - } else { - status = XF86OutputStatusConnected; - } - - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Exiting via_lvds_detect.\n")); - return status; -} - -static DisplayModePtr -via_lvds_get_modes(xf86OutputPtr output) -{ - ViaPanelInfoPtr pPanel = output->driver_private; - ScrnInfoPtr pScrn = output->scrn; - DisplayModePtr pDisplay_Mode = NULL; - - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Entered via_lvds_get_modes.\n")); - - if (output->status == XF86OutputStatusConnected) { - if (!output->MonInfo) { - /* - * Generates a display mode for the native panel resolution, - * using CVT. - */ - if (pPanel->NativeWidth && pPanel->NativeHeight) { - VIAPtr pVia = VIAPTR(pScrn); - - if (pVia->IsOLPCXO15) { - pDisplay_Mode = xf86DuplicateMode(&OLPCMode); - } else { - pDisplay_Mode = xf86CVTMode(pPanel->NativeWidth, pPanel->NativeHeight, - 60.0f, FALSE, FALSE); - } - - if (pDisplay_Mode) { - pDisplay_Mode->CrtcHDisplay = pDisplay_Mode->HDisplay; - pDisplay_Mode->CrtcHSyncStart = pDisplay_Mode->HSyncStart; - pDisplay_Mode->CrtcHSyncEnd = pDisplay_Mode->HSyncEnd; - pDisplay_Mode->CrtcHTotal = pDisplay_Mode->HTotal; - pDisplay_Mode->CrtcHSkew = pDisplay_Mode->HSkew; - pDisplay_Mode->CrtcVDisplay = pDisplay_Mode->VDisplay; - pDisplay_Mode->CrtcVSyncStart = pDisplay_Mode->VSyncStart; - pDisplay_Mode->CrtcVSyncEnd = pDisplay_Mode->VSyncEnd; - pDisplay_Mode->CrtcVTotal = pDisplay_Mode->VTotal; - - pDisplay_Mode->CrtcVBlankStart = min(pDisplay_Mode->CrtcVSyncStart, pDisplay_Mode->CrtcVDisplay); - pDisplay_Mode->CrtcVBlankEnd = max(pDisplay_Mode->CrtcVSyncEnd, pDisplay_Mode->CrtcVTotal); - pDisplay_Mode->CrtcHBlankStart = min(pDisplay_Mode->CrtcHSyncStart, pDisplay_Mode->CrtcHDisplay); - pDisplay_Mode->CrtcHBlankEnd = max(pDisplay_Mode->CrtcHSyncEnd, pDisplay_Mode->CrtcHTotal); - pDisplay_Mode->type = M_T_DRIVER | M_T_PREFERRED; - } else { - xf86DrvMsg(pScrn->scrnIndex, X_ERROR, - "Out of memory. Size: %zu bytes\n", sizeof(DisplayModeRec)); - } - } else { - xf86DrvMsg(pScrn->scrnIndex, X_WARNING, - "Invalid Flat Panel Screen Resolution: " - "%dx%d\n", - pPanel->NativeWidth, pPanel->NativeHeight); - } - } else { - pDisplay_Mode = xf86OutputGetEDIDModes(output); - } - } - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Exiting via_lvds_get_modes.\n")); - return pDisplay_Mode; -} - -static void -via_lvds_destroy(xf86OutputPtr output) -{ - if (output->driver_private) - free(output->driver_private); - output->driver_private = NULL; -} - -static const xf86OutputFuncsRec via_lvds_funcs = { - .create_resources = via_lvds_create_resources, -#ifdef RANDR_12_INTERFACE - .set_property = via_lvds_set_property, -#endif -#ifdef RANDR_13_INTERFACE - .get_property = via_lvds_get_property, -#endif - .dpms = via_lvds_dpms, - .save = via_lvds_save, - .restore = via_lvds_restore, - .mode_valid = via_lvds_mode_valid, - .mode_fixup = via_lvds_mode_fixup, - .prepare = via_lvds_prepare, - .commit = via_lvds_commit, - .mode_set = via_lvds_mode_set, - .detect = via_lvds_detect, - .get_modes = via_lvds_get_modes, - .destroy = via_lvds_destroy, -}; - - -void -via_lvds_init(ScrnInfoPtr pScrn) -{ - ViaPanelInfoPtr Panel = (ViaPanelInfoPtr) xnfcalloc(sizeof(ViaPanelInfoRec), 1); - OptionInfoPtr Options = xnfalloc(sizeof(ViaPanelOptions)); - MessageType from = X_DEFAULT; - const char *s = NULL; - VIAPtr pVia = VIAPTR(pScrn); - xf86OutputPtr output = NULL; - vgaHWPtr hwp = VGAHWPTR(pScrn); - CARD8 cr3b = 0x00; - CARD8 cr3b_mask = 0x00; - - if (!Panel) - return; - - /* Apparently this is the way VIA Technologies passes */ - /* the presence of a flat panel to the device driver */ - /* via BIOS setup. */ - if (pVia->Chipset == VIA_CLE266) { - cr3b_mask = 0x08; - } else { - cr3b_mask = 0x02; - } - - cr3b = hwp->readCrtc(hwp, 0x3B) & cr3b_mask; - - if (!cr3b) { - return; - } - - memcpy(Options, ViaPanelOptions, sizeof(ViaPanelOptions)); - xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, Options); - - Panel->NativeModeIndex = VIA_PANEL_INVALID; - - /* LCD Center/Expend Option */ - Panel->Center = FALSE; - from = xf86GetOptValBool(Options, OPTION_CENTER, &Panel->Center) - ? X_CONFIG : X_DEFAULT; - xf86DrvMsg(pScrn->scrnIndex, from, "LVDS-0 : DVI Center is %s.\n", - Panel->Center ? "enabled" : "disabled"); - - output = xf86OutputCreate(pScrn, &via_lvds_funcs, "LVDS-1"); - - if (output) { - output->driver_private = Panel; - - if (pVia->Chipset == VIA_VX900) - output->possible_crtcs = 0x3; - else - output->possible_crtcs = 0x2; - output->possible_clones = 0; - output->interlaceAllowed = FALSE; - output->doubleScanAllowed = FALSE; - - if (pVia->IsOLPCXO15) { - output->mm_height = 152; - output->mm_width = 114; - } - } else { - free(Panel); - } -} diff -Nru xserver-xorg-video-openchrome-0.5.0/src/via_memcpy.c xserver-xorg-video-openchrome-0.6.0/src/via_memcpy.c --- xserver-xorg-video-openchrome-0.5.0/src/via_memcpy.c 2016-07-06 16:21:06.000000000 +0000 +++ xserver-xorg-video-openchrome-0.6.0/src/via_memcpy.c 2017-01-06 03:33:00.000000000 +0000 @@ -528,7 +528,6 @@ McFuncData *curData; FILE *cpuInfoFile; double cpuFreq; - VIAPtr pVia = VIAPTR(pScrn); if (NULL == (cpuInfoFile = fopen("/proc/cpuinfo", "r"))) { return libc_YUV42X; diff -Nru xserver-xorg-video-openchrome-0.5.0/src/via_mode.h xserver-xorg-video-openchrome-0.6.0/src/via_mode.h --- xserver-xorg-video-openchrome-0.5.0/src/via_mode.h 2016-07-06 16:21:06.000000000 +0000 +++ xserver-xorg-video-openchrome-0.6.0/src/via_mode.h 2017-01-06 03:33:00.000000000 +0000 @@ -132,70 +132,6 @@ #define VIA_RES_1200X900 23 #define VIA_RES_INVALID 0xFF -/* - * simple lookuptable for PanelIndex selection - */ - -static struct { - int Index; - int PanelIndex; - int X; - int Y; -} ViaResolutionTable[] = { - {VIA_RES_640X480, VIA_PANEL6X4, 640, 480}, - {VIA_RES_800X600, VIA_PANEL8X6, 800, 600}, - {VIA_RES_1024X768, VIA_PANEL10X7, 1024, 768}, - {VIA_RES_1152X864, VIA_PANEL_INVALID, 1152, 864}, - {VIA_RES_1280X1024, VIA_PANEL12X10, 1280, 1024}, - {VIA_RES_1600X1200, VIA_PANEL16X12, 1600, 1200}, - {VIA_RES_1440X1050, VIA_PANEL_INVALID, 1440, 1050}, - {VIA_RES_1280X768, VIA_PANEL12X7, 1280, 768}, - {VIA_RES_1280X800, VIA_PANEL12X8, 1280, 800}, - {VIA_RES_1280X960, VIA_PANEL_INVALID, 1280, 960}, - /* {VIA_RES_1920X1440, VIA_PANEL_INVALID, 1920, 1140}, */ - {VIA_RES_848X480, VIA_PANEL_INVALID, 848, 480}, - {VIA_RES_1400X1050, VIA_PANEL14X10, 1400, 1050}, - {VIA_RES_720X480, VIA_PANEL_INVALID, 720, 480}, - {VIA_RES_720X576, VIA_PANEL_INVALID, 720, 576}, - {VIA_RES_1024X512, VIA_PANEL_INVALID, 1024, 512}, - {VIA_RES_856X480, VIA_PANEL_INVALID, 856, 480}, - {VIA_RES_1024X576, VIA_PANEL_INVALID, 1024, 576}, - {VIA_RES_800X480, VIA_PANEL8X4, 800, 480}, - {VIA_RES_1200X900, VIA_PANEL12X9, 1200, 900}, - {VIA_RES_INVALID, VIA_PANEL_INVALID, 0, 0} -}; - -static struct { - CARD16 Width; - CARD16 Height; - CARD8 mode_8b; - CARD8 mode_16b; - CARD8 mode_32b; -} ViaVesaModes[] = { - { 400, 300, 0x22, 0x23, 0x24 }, - { 512, 384, 0x25, 0x26, 0x27 }, - { 640, 400, 0x30, 0x2E, 0x2F }, - { 640, 480, 0x31, 0x33, 0x34 }, - { 800, 600, 0x36, 0x38, 0x39 }, - { 1024, 768, 0x3B, 0x3D, 0x3E }, - { 1152, 864, 0x40, 0x42, 0x43 }, - { 1280, 1024, 0x45, 0x47, 0x48 }, - { 1600, 1200, 0x4A, 0x4C, 0x4D }, - { 1440, 1050, 0x50, 0x52, 0x53 }, - { 1280, 768, 0x54, 0x56, 0x57 }, - { 1280, 960, 0x58, 0x5A, 0x5B }, - { 320, 200, 0x5C, 0x5D, 0x5E }, - { 1920, 1440, 0x60, 0x61, 0x62 }, - { 848, 480, 0x63, 0x64, 0x65 }, - { 1400, 1050, 0x66, 0x67, 0x68 }, - { 720, 480, 0x70, 0x71, 0x72 }, - { 720, 576, 0x73, 0x74, 0x75 }, - { 1024, 512, 0x76, 0x77, 0x78 }, - { 856, 480, 0x79, 0x7A, 0x7B }, - { 320, 240, 0x7C, 0x7D, 0x7E }, - { 0, 0, 0, 0, 0 }, -}; - #define VIA_BIOS_REG_LCD_MAX_NUM 48 #define VIA_BIOS_NUM_LCD_SUPPORT_MASK 8 #define VIA_BIOS_NUM_PANEL 7 diff -Nru xserver-xorg-video-openchrome-0.5.0/src/via_outputs.c xserver-xorg-video-openchrome-0.6.0/src/via_outputs.c --- xserver-xorg-video-openchrome-0.5.0/src/via_outputs.c 2016-07-06 16:21:06.000000000 +0000 +++ xserver-xorg-video-openchrome-0.6.0/src/via_outputs.c 2017-02-26 23:53:37.000000000 +0000 @@ -1,7 +1,7 @@ /* * Copyright 2016 Kevin Brace * Copyright 2005-2016 The OpenChrome Project - * [http://www.freedesktop.org/wiki/Openchrome] + * [https://www.freedesktop.org/wiki/Openchrome] * Copyright 2004-2005 The Unichrome Project [unichrome.sf.net] * Copyright 1998-2003 VIA Technologies, Inc. All Rights Reserved. * Copyright 2001-2003 S3 Graphics, Inc. All Rights Reserved. @@ -46,1030 +46,375 @@ */ #include "via_mode.h" -static void -ViaPrintMode(ScrnInfoPtr pScrn, DisplayModePtr mode) -{ - xf86PrintModeline(pScrn->scrnIndex, mode); - - xf86DrvMsg(pScrn->scrnIndex, X_INFO, "CrtcHDisplay: 0x%x\n", - mode->CrtcHDisplay); - xf86DrvMsg(pScrn->scrnIndex, X_INFO, "CrtcHBlankStart: 0x%x\n", - mode->CrtcHBlankStart); - xf86DrvMsg(pScrn->scrnIndex, X_INFO, "CrtcHSyncStart: 0x%x\n", - mode->CrtcHSyncStart); - xf86DrvMsg(pScrn->scrnIndex, X_INFO, "CrtcHSyncEnd: 0x%x\n", - mode->CrtcHSyncEnd); - xf86DrvMsg(pScrn->scrnIndex, X_INFO, "CrtcHBlankEnd: 0x%x\n", - mode->CrtcHBlankEnd); - xf86DrvMsg(pScrn->scrnIndex, X_INFO, "CrtcHTotal: 0x%x\n", - mode->CrtcHTotal); - xf86DrvMsg(pScrn->scrnIndex, X_INFO, "CrtcHSkew: 0x%x\n", - mode->CrtcHSkew); - xf86DrvMsg(pScrn->scrnIndex, X_INFO, "CrtcVDisplay: 0x%x\n", - mode->CrtcVDisplay); - xf86DrvMsg(pScrn->scrnIndex, X_INFO, "CrtcVBlankStart: 0x%x\n", - mode->CrtcVBlankStart); - xf86DrvMsg(pScrn->scrnIndex, X_INFO, "CrtcVSyncStart: 0x%x\n", - mode->CrtcVSyncStart); - xf86DrvMsg(pScrn->scrnIndex, X_INFO, "CrtcVSyncEnd: 0x%x\n", - mode->CrtcVSyncEnd); - xf86DrvMsg(pScrn->scrnIndex, X_INFO, "CrtcVBlankEnd: 0x%x\n", - mode->CrtcVBlankEnd); - xf86DrvMsg(pScrn->scrnIndex, X_INFO, "CrtcVTotal: 0x%x\n", - mode->CrtcVTotal); - -} - /* - * - * TV specific code. - * + * Sets IGA1 or IGA2 as the display output source for DIP0 + * (Digital Interface Port 0) interface for CLE266 only. */ void -ViaTVSave(ScrnInfoPtr pScrn) -{ - VIABIOSInfoPtr pBIOSInfo = VIAPTR(pScrn)->pBIOSInfo; - - if (pBIOSInfo->TVSave) - pBIOSInfo->TVSave(pScrn); -} - -void -ViaTVRestore(ScrnInfoPtr pScrn) +viaDIP0SetDisplaySource(ScrnInfoPtr pScrn, CARD8 displaySource) { - VIABIOSInfoPtr pBIOSInfo = VIAPTR(pScrn)->pBIOSInfo; - - if (pBIOSInfo->TVRestore) - pBIOSInfo->TVRestore(pScrn); -} - -static Bool -ViaTVDACSense(ScrnInfoPtr pScrn) -{ - VIABIOSInfoPtr pBIOSInfo = VIAPTR(pScrn)->pBIOSInfo; - - if (pBIOSInfo->TVDACSense) - return pBIOSInfo->TVDACSense(pScrn); - return FALSE; -} - -static void -ViaTVSetMode(xf86CrtcPtr crtc, DisplayModePtr mode) -{ - ScrnInfoPtr pScrn = crtc->scrn; - VIAPtr pVia = VIAPTR(pScrn); - VIABIOSInfoPtr pBIOSInfo = pVia->pBIOSInfo; - - if (pBIOSInfo->TVModeI2C) - pBIOSInfo->TVModeI2C(pScrn, mode); - - if (pBIOSInfo->TVModeCrtc) - pBIOSInfo->TVModeCrtc(crtc, mode); - - /* TV reset. */ - xf86I2CWriteByte(pBIOSInfo->TVI2CDev, 0x1D, 0x00); - xf86I2CWriteByte(pBIOSInfo->TVI2CDev, 0x1D, 0x80); -} + vgaHWPtr hwp = VGAHWPTR(pScrn); + CARD8 temp = displaySource; -void -ViaTVPower(ScrnInfoPtr pScrn, Bool On) -{ - VIABIOSInfoPtr pBIOSInfo = VIAPTR(pScrn)->pBIOSInfo; + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered viaDIP0SetDisplaySource.\n")); -#ifdef HAVE_DEBUG - if (On) - xf86DrvMsg(pScrn->scrnIndex, X_INFO, "ViaTVPower: On.\n"); - else - xf86DrvMsg(pScrn->scrnIndex, X_INFO, "ViaTVPower: Off.\n"); -#endif + /* Set DIP0 display output source. */ + /* 3X5.6C[7] - DIP0 (Digital Interface Port 0) Data Source Selection + * 0: Primary Display (IGA1) + * 1: Secondary Display (IGA2) */ + ViaCrtcMask(hwp, 0x6C, temp << 7, 0x80); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "DIP0 Display Output Source: IGA%d\n", + (temp & 0x01) + 1); - if (pBIOSInfo->TVPower) - pBIOSInfo->TVPower(pScrn, On); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting viaDIP0SetDisplaySource.\n")); } -#ifdef HAVE_DEBUG +/* + * Sets DIP0 (Digital Interface Port 0) I/O pad state. + * This function is for CLE266 chipset only. + */ void -ViaTVPrintRegs(ScrnInfoPtr pScrn) -{ - VIABIOSInfoPtr pBIOSInfo = VIAPTR(pScrn)->pBIOSInfo; - - if (pBIOSInfo->TVPrintRegs) - pBIOSInfo->TVPrintRegs(pScrn); -} -#endif /* HAVE_DEBUG */ - -static void -via_tv_create_resources(xf86OutputPtr output) -{ -} - -#ifdef RANDR_12_INTERFACE -static Bool -via_tv_set_property(xf86OutputPtr output, Atom property, - RRPropertyValuePtr value) -{ - return TRUE; -} - -static Bool -via_tv_get_property(xf86OutputPtr output, Atom property) -{ - return FALSE; -} -#endif - -static void -via_tv_dpms(xf86OutputPtr output, int mode) -{ - ScrnInfoPtr pScrn = output->scrn; - - switch (mode) { - case DPMSModeOn: - ViaTVPower(pScrn, TRUE); - break; - - case DPMSModeStandby: - case DPMSModeSuspend: - case DPMSModeOff: - ViaTVPower(pScrn, FALSE); - break; - } -} - -static void -via_tv_save(xf86OutputPtr output) -{ - ScrnInfoPtr pScrn = output->scrn; - - ViaTVSave(pScrn); -} - -static void -via_tv_restore(xf86OutputPtr output) -{ - ScrnInfoPtr pScrn = output->scrn; - - ViaTVRestore(pScrn); -} - -static int -via_tv_mode_valid(xf86OutputPtr output, DisplayModePtr pMode) -{ - ScrnInfoPtr pScrn = output->scrn; - VIAPtr pVia = VIAPTR(pScrn); - int ret = MODE_OK; - - if (!ViaModeDotClockTranslate(pScrn, pMode)) - return MODE_NOCLOCK; - - return ret; -} - -static Bool -via_tv_mode_fixup(xf86OutputPtr output, DisplayModePtr mode, - DisplayModePtr adjusted_mode) -{ - return TRUE; -} - -static void -via_tv_prepare(xf86OutputPtr output) -{ - via_tv_dpms(output, DPMSModeOff); -} - -static void -via_tv_commit(xf86OutputPtr output) -{ - via_tv_dpms(output, DPMSModeOn); -} - -static void -ViaDisplayEnableDVO(ScrnInfoPtr pScrn, int port) +viaDIP0EnableIOPads(ScrnInfoPtr pScrn, CARD8 ioPadState) { vgaHWPtr hwp = VGAHWPTR(pScrn); - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "ViaDisplayEnableDVO, port: %d\n", - port)); - switch (port) { - case VIA_DI_PORT_DVP0: - ViaSeqMask(hwp, 0x1E, 0xC0, 0xC0); - break; - case VIA_DI_PORT_DVP1: - ViaSeqMask(hwp, 0x1E, 0x30, 0x30); - break; - } -} + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered viaDIP0EnableIOPads.\n")); -static void -ViaDisplayDisableDVO(ScrnInfoPtr pScrn, int port) -{ - vgaHWPtr hwp = VGAHWPTR(pScrn); + /* Set DIP0 I/O pad state. */ + /* 3C5.1E[7:6] - DIP0 Power Control + * 0x: Pad always off + * 10: Depend on the other control signal + * 11: Pad on/off according to the + * Power Management Status (PMS) */ + ViaSeqMask(hwp, 0x1E, ioPadState << 6, 0xC0); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "DIP0 I/O Pad State: %s\n", + (ioPadState & 0x02) ? + (ioPadState & 0x01) ? "Automatic On / Off" : "Conditional" + : "Off"); - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "ViaDisplayDisableDVO, port: %d\n", - port)); - switch (port) { - case VIA_DI_PORT_DVP0: - ViaSeqMask(hwp, 0x1E, 0x00, 0xC0); - break; - case VIA_DI_PORT_DVP1: - ViaSeqMask(hwp, 0x1E, 0x00, 0x30); - break; - } + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting viaDIP0EnableIOPads.\n")); } -static void -ViaDisplaySetStreamOnDVO(ScrnInfoPtr pScrn, int port, int iga) +/* + * Sets DIP0 (Digital Interface Port 0) clock I/O pad drive strength + * for CLE266 chipset only. + */ +void +viaDIP0SetClockDriveStrength(ScrnInfoPtr pScrn, CARD8 clockDriveStrength) { vgaHWPtr hwp = VGAHWPTR(pScrn); - int regNum; - - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "ViaDisplaySetStreamOnDVO, port: %d\n", - port)); - switch (port) { - case VIA_DI_PORT_DVP0: - regNum = 0x96; - break; - case VIA_DI_PORT_DVP1: - regNum = 0x9B; - break; - case VIA_DI_PORT_DFPLOW: - regNum = 0x97; - break; - case VIA_DI_PORT_DFPHIGH: - regNum = 0x99; - break; - } - - if (!iga) - ViaCrtcMask(hwp, regNum, 0x00, 0x10); - else - ViaCrtcMask(hwp, regNum, 0x10, 0x10); -} - -static void -via_tv_mode_set(xf86OutputPtr output, DisplayModePtr mode, - DisplayModePtr adjusted_mode) -{ - ScrnInfoPtr pScrn = output->scrn; - VIAPtr pVia = VIAPTR(pScrn); - VIABIOSInfoPtr pBIOSInfo = pVia->pBIOSInfo; - - /* TV on FirstCrtc */ - if (output->crtc) { - drmmode_crtc_private_ptr iga = output->crtc->driver_private; - - ViaDisplaySetStreamOnDVO(pScrn, pBIOSInfo->TVDIPort, iga->index); - } - ViaDisplayEnableDVO(pScrn, pBIOSInfo->TVDIPort); - - ViaTVSetMode(output->crtc, adjusted_mode); - - pVia->FirstInit = FALSE; -} - -static xf86OutputStatus -via_tv_detect(xf86OutputPtr output) -{ - xf86OutputStatus status = XF86OutputStatusDisconnected; - ScrnInfoPtr pScrn = output->scrn; + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered viaDIP0SetClockDriveStrength.\n")); - if (ViaTVDACSense(pScrn)) - status = XF86OutputStatusConnected; - return status; -} + /* 3C5.1E[2] - DIP0 Clock Drive Strength Bit [0] */ + ViaSeqMask(hwp, 0x1E, clockDriveStrength << 2, 0x04); -static DisplayModePtr -via_tv_get_modes(xf86OutputPtr output) -{ - DisplayModePtr modes = NULL, mode = NULL; - ScrnInfoPtr pScrn = output->scrn; - VIAPtr pVia = VIAPTR(pScrn); - int i; + /* 3C5.2A[4] - DIP0 Clock Drive Strength Bit [1] */ + ViaSeqMask(hwp, 0x2A, clockDriveStrength << 3, 0x10); - for (i = 0; i < pVia->pBIOSInfo->TVNumModes; i++) { - mode = xf86DuplicateMode(&pVia->pBIOSInfo->TVModes[i]); - modes = xf86ModesAdd(modes, mode); - } - return modes; -} + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "DIP0 Clock I/O Pad Drive Strength: %u\n", + clockDriveStrength & 0x03); -static void -via_tv_destroy(xf86OutputPtr output) -{ + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting viaDIP0SetClockDriveStrength.\n")); } -static const xf86OutputFuncsRec via_tv_funcs = { - .create_resources = via_tv_create_resources, -#ifdef RANDR_12_INTERFACE - .set_property = via_tv_set_property, -#endif -#ifdef RANDR_13_INTERFACE - .get_property = via_tv_get_property, -#endif - .dpms = via_tv_dpms, - .save = via_tv_save, - .restore = via_tv_restore, - .mode_valid = via_tv_mode_valid, - .mode_fixup = via_tv_mode_fixup, - .prepare = via_tv_prepare, - .commit = via_tv_commit, - .mode_set = via_tv_mode_set, - .detect = via_tv_detect, - .get_modes = via_tv_get_modes, - .destroy = via_tv_destroy, -}; - /* - * + * Sets DIP0 (Digital Interface Port 0) data I/O pads drive strength + * for CLE266 chipset only. */ -static Bool -via_tv_init(ScrnInfoPtr pScrn) +void +viaDIP0SetDataDriveStrength(ScrnInfoPtr pScrn, CARD8 dataDriveStrength) { - VIAPtr pVia = VIAPTR(pScrn); - VIABIOSInfoPtr pBIOSInfo = pVia->pBIOSInfo; - xf86OutputPtr output = NULL; + vgaHWPtr hwp = VGAHWPTR(pScrn); DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Entered via_tv_init.\n")); - - /* preset some pBIOSInfo TV related values -- move up */ - pBIOSInfo->TVEncoder = VIA_NONETV; - pBIOSInfo->TVI2CDev = NULL; - pBIOSInfo->TVSave = NULL; - pBIOSInfo->TVRestore = NULL; - pBIOSInfo->TVDACSense = NULL; - pBIOSInfo->TVModeValid = NULL; - pBIOSInfo->TVModeI2C = NULL; - pBIOSInfo->TVModeCrtc = NULL; - pBIOSInfo->TVPower = NULL; - pBIOSInfo->TVModes = NULL; - pBIOSInfo->TVPrintRegs = NULL; - pBIOSInfo->LCDPower = NULL; - pBIOSInfo->TVNumRegs = 0; - - /* - * On an SK43G (KM400/Ch7011), false positive detections at a VT162x - * chip were observed, so try to detect the Ch7011 first. - */ - if (pVia->pI2CBus2 && xf86I2CProbeAddress(pVia->pI2CBus2, 0xEC)) - pBIOSInfo->TVI2CDev = ViaCH7xxxDetect(pScrn, pVia->pI2CBus2, 0xEC); - else if (pVia->pI2CBus2 && xf86I2CProbeAddress(pVia->pI2CBus2, 0x40)) - pBIOSInfo->TVI2CDev = ViaVT162xDetect(pScrn, pVia->pI2CBus2, 0x40); - else if (pVia->pI2CBus3 && xf86I2CProbeAddress(pVia->pI2CBus3, 0x40)) - pBIOSInfo->TVI2CDev = ViaVT162xDetect(pScrn, pVia->pI2CBus3, 0x40); - else if (pVia->pI2CBus2 && xf86I2CProbeAddress(pVia->pI2CBus2, 0xEA)) - pBIOSInfo->TVI2CDev = ViaCH7xxxDetect(pScrn, pVia->pI2CBus2, 0xEA); - else if (pVia->pI2CBus3 && xf86I2CProbeAddress(pVia->pI2CBus3, 0xEA)) - pBIOSInfo->TVI2CDev = ViaCH7xxxDetect(pScrn, pVia->pI2CBus3, 0xEA); - - if (!pBIOSInfo->TVI2CDev) { - xf86DrvMsg(pScrn->scrnIndex, X_PROBED, - "Did not detect a TV encoder.\n"); - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Exiting via_tv_init.\n")); - - return FALSE; - } - - switch (pBIOSInfo->TVEncoder) { - case VIA_VT1621: - case VIA_VT1622: - case VIA_VT1623: - case VIA_VT1625: - ViaVT162xInit(pScrn); - break; - case VIA_CH7011: - case VIA_CH7019A: - case VIA_CH7019B: - ViaCH7xxxInit(pScrn); - break; - default: - xf86DrvMsg(pScrn->scrnIndex, X_ERROR, - "Was not able to initialize a known TV encoder.\n"); - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Exiting via_tv_init.\n")); - return FALSE; - break; - } - - if (!pBIOSInfo->TVSave || !pBIOSInfo->TVRestore - || !pBIOSInfo->TVDACSense || !pBIOSInfo->TVModeValid - || !pBIOSInfo->TVModeI2C || !pBIOSInfo->TVModeCrtc - || !pBIOSInfo->TVPower || !pBIOSInfo->TVModes - || !pBIOSInfo->TVPrintRegs) { - - xf86DestroyI2CDevRec(pBIOSInfo->TVI2CDev, TRUE); - - pBIOSInfo->TVI2CDev = NULL; - pBIOSInfo->TVOutput = TVOUTPUT_NONE; - pBIOSInfo->TVEncoder = VIA_NONETV; - pBIOSInfo->TVI2CDev = NULL; - pBIOSInfo->TVSave = NULL; - pBIOSInfo->TVRestore = NULL; - pBIOSInfo->TVDACSense = NULL; - pBIOSInfo->TVModeValid = NULL; - pBIOSInfo->TVModeI2C = NULL; - pBIOSInfo->TVModeCrtc = NULL; - pBIOSInfo->TVPower = NULL; - pBIOSInfo->TVModes = NULL; - pBIOSInfo->TVPrintRegs = NULL; - pBIOSInfo->TVNumRegs = 0; - - xf86DrvMsg(pScrn->scrnIndex, X_ERROR, - "TV encoder was not properly initialized.\n"); - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Exiting via_tv_init.\n")); - return FALSE; - } - - output = xf86OutputCreate(pScrn, &via_tv_funcs, "TV-1"); - pVia->FirstInit = TRUE; + "Entered viaDIP0SetDataDriveStrength.\n")); - if (output) { - /* Allow tv output on both crtcs, set bit 0 and 1. */ - output->possible_crtcs = 0x3; - } else { - xf86DrvMsg(pScrn->scrnIndex, X_ERROR, - "Failed to register TV-1.\n"); - } + /* 3C5.1B[1] - DIP0 Data Drive Strength Bit [0] */ + ViaSeqMask(hwp, 0x1B, dataDriveStrength << 1, 0x02); - pBIOSInfo->tv = output; - /* Save now */ - pBIOSInfo->TVSave(pScrn); + /* 3C5.2A[5] - DIP0 Data Drive Strength Bit [1] */ + ViaSeqMask(hwp, 0x2A, dataDriveStrength << 4, 0x20); -#ifdef HAVE_DEBUG - if (VIAPTR(pScrn)->PrintTVRegs) - pBIOSInfo->TVPrintRegs(pScrn); -#endif + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "DIP0 Data I/O Pads Drive Strength: %u\n", + dataDriveStrength); DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Exiting via_tv_init.\n")); - return TRUE; + "Exiting viaDIP0SetDataDriveStrength.\n")); } /* - * Enables or disables analog VGA output by controlling DAC - * (Digital to Analog Converter) output state. + * Sets IGA1 or IGA2 as the display output source for DVP0 + * (Digital Video Port) interface. */ -static void -viaAnalogOutput(ScrnInfoPtr pScrn, Bool outputState) +void +viaDVP0SetDisplaySource(ScrnInfoPtr pScrn, CARD8 displaySource) { vgaHWPtr hwp = VGAHWPTR(pScrn); + CARD8 temp = displaySource; DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Entered viaAnalogOutput.\n")); + "Entered viaDVP0SetDisplaySource.\n")); - /* This register controls analog VGA DAC output state. */ - /* 3X5.47[2] - DACOFF Backdoor Register - * 0: DAC on - * 1: DAC off */ - ViaCrtcMask(hwp, 0x47, outputState ? 0x00 : 0x04, 0x04); + /* Set DVP0 display output source. */ + /* 3X5.96[4] - DVP0 Data Source Selection + * 0: Primary Display + * 1: Secondary Display */ + ViaCrtcMask(hwp, 0x96, temp << 4, 0x10); xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Analog VGA Output: %s\n", - outputState ? "On" : "Off"); + "DVP0 Display Output Source: IGA%d\n", + (temp & 0x01) + 1); DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Exiting viaAnalogOutput.\n")); + "Exiting viaDVP0SetDisplaySource.\n")); } /* - * Specifies IGA1 or IGA2 for analog VGA DAC source. + * Sets DVP0 (Digital Video Port 0) I/O pad state. */ -static void -viaAnalogSource(ScrnInfoPtr pScrn, CARD8 displaySource) +void +viaDVP0EnableIOPads(ScrnInfoPtr pScrn, CARD8 ioPadState) { vgaHWPtr hwp = VGAHWPTR(pScrn); - CARD8 value = displaySource; DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Entered viaAnalogSource.\n")); + "Entered viaDVP0EnableIOPads.\n")); - ViaSeqMask(hwp, 0x16, value << 6, 0x40); + /* Set DVP0 I/O pad state. */ + /* 3C5.1E[7:6] - DVP0 Power Control + * 0x: Pad always off + * 10: Depend on the other control signal + * 11: Pad on/off according to the + * Power Management Status (PMS) */ + ViaSeqMask(hwp, 0x1E, ioPadState << 6, 0xC0); xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Analog VGA Output Source: IGA%d\n", - (value & 0x01) + 1); + "DVP0 I/O Pad State: %s\n", + (ioPadState & 0x02) ? + (ioPadState & 0x01) ? "Automatic On / Off" : "Conditional" + : "Off"); DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Exiting viaAnalogSource.\n")); + "Exiting viaDVP0EnableIOPads.\n")); } /* - * Intializes analog VGA related registers. + * Sets DVP0 (Digital Video Port 0) clock I/O pad drive strength. */ -static void -viaAnalogInit(ScrnInfoPtr pScrn) +void +viaDVP0SetClockDriveStrength(ScrnInfoPtr pScrn, CARD8 clockDriveStrength) { vgaHWPtr hwp = VGAHWPTR(pScrn); - VIAPtr pVia = VIAPTR(pScrn); - - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Entered viaAnalogInit.\n")); - - /* 3X5.37[7] - DAC Power Save Control 1 - * 0: Depend on Rx3X5.37[5:4] setting - * 1: DAC always goes into power save mode - * 3X5.37[6] - DAC Power Down Control - * 0: Depend on Rx3X5.47[2] setting - * 1: DAC never goes to power down mode - * 3X5.37[5:4] - DAC Power Save Control 2 - * 00: DAC never goes to power save mode - * 01: DAC goes to power save mode by line - * 10: DAC goes to power save mode by frame - * 11: DAC goes to power save mode by line and frame - * 3X5.37[3] - DAC PEDESTAL Control - * 3X5.37[2:0] - DAC Factor - * (Default: 100) */ - ViaCrtcMask(hwp, 0x37, 0x04, 0xFF); - - switch (pVia->Chipset) { - case VIA_CX700: - case VIA_VX800: - case VIA_VX855: - case VIA_VX900: - /* 3C5.5E[0] - CRT DACOFF Setting - * 1: CRT DACOFF controlled by 3C5.01[5] */ - ViaSeqMask(hwp, 0x5E, 0x01, 0x01); - break; - default: - break; - } DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Exiting viaAnalogInit.\n")); -} + "Entered viaDVP0SetClockDriveStrength.\n")); -static void -via_analog_create_resources(xf86OutputPtr output) -{ -} + /* 3C5.1E[2] - DVP0 Clock Drive Strength Bit [0] */ + ViaSeqMask(hwp, 0x1E, clockDriveStrength << 2, 0x04); -#ifdef RANDR_12_INTERFACE -static Bool -via_analog_set_property(xf86OutputPtr output, Atom property, - RRPropertyValuePtr value) -{ - return TRUE; -} + /* 3C5.2A[4] - DVP0 Clock Drive Strength Bit [1] */ + ViaSeqMask(hwp, 0x2A, clockDriveStrength << 3, 0x10); -static Bool -via_analog_get_property(xf86OutputPtr output, Atom property) -{ - return FALSE; -} -#endif - -static void -via_analog_dpms(xf86OutputPtr output, int mode) -{ - ScrnInfoPtr pScrn = output->scrn; - - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Entered via_analog_dpms.\n")); - - switch (mode) { - case DPMSModeOn: - viaAnalogOutput(pScrn, TRUE); - break; - case DPMSModeStandby: - case DPMSModeSuspend: - case DPMSModeOff: - viaAnalogOutput(pScrn, FALSE); - break; - default: - break; - } + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "DVP0 Clock I/O Pad Drive Strength: %u\n", + clockDriveStrength & 0x03); DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Exiting via_analog_dpms.\n")); -} - -static void -via_analog_save(xf86OutputPtr output) -{ + "Exiting viaDVP0SetClockDriveStrength.\n")); } -static void -via_analog_restore(xf86OutputPtr output) +/* + * Sets DVP0 (Digital Video Port 0) data I/O pads drive strength. + */ +void +viaDVP0SetDataDriveStrength(ScrnInfoPtr pScrn, CARD8 dataDriveStrength) { -} + vgaHWPtr hwp = VGAHWPTR(pScrn); -static int -via_analog_mode_valid(xf86OutputPtr output, DisplayModePtr pMode) -{ - ScrnInfoPtr pScrn = output->scrn; + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered viaDVP0SetDataDriveStrength.\n")); - if (!ViaModeDotClockTranslate(pScrn, pMode)) - return MODE_NOCLOCK; - return MODE_OK; -} + /* 3C5.1B[1] - DVP0 Data Drive Strength Bit [0] */ + ViaSeqMask(hwp, 0x1B, dataDriveStrength << 1, 0x02); -static Bool -via_analog_mode_fixup(xf86OutputPtr output, DisplayModePtr mode, - DisplayModePtr adjusted_mode) -{ - return TRUE; -} + /* 3C5.2A[5] - DVP0 Data Drive Strength Bit [1] */ + ViaSeqMask(hwp, 0x2A, dataDriveStrength << 4, 0x20); -static void -via_analog_prepare(xf86OutputPtr output) -{ - via_analog_dpms(output, DPMSModeOff); -} + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "DVP0 Data I/O Pads Drive Strength: %u\n", + dataDriveStrength); -static void -via_analog_commit(xf86OutputPtr output) -{ - via_analog_dpms(output, DPMSModeOn); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting viaDVP0SetDataDriveStrength.\n")); } -static void -via_analog_mode_set(xf86OutputPtr output, DisplayModePtr mode, - DisplayModePtr adjusted_mode) +/* + * Sets IGA1 or IGA2 as the display output source for DVP1 + * (Digital Video Port) interface. + */ +void +viaDVP1SetDisplaySource(ScrnInfoPtr pScrn, CARD8 displaySource) { - ScrnInfoPtr pScrn = output->scrn; vgaHWPtr hwp = VGAHWPTR(pScrn); - drmmode_crtc_private_ptr iga = output->crtc->driver_private; + CARD8 temp = displaySource; DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Entered via_analog_mode_set.\n")); + "Entered viaDVP1SetDisplaySource.\n")); - viaAnalogInit(pScrn); - - if (output->crtc) { - viaAnalogSource(pScrn, iga->index ? 0x01 : 0x00); - } + /* Set DVP1 display output source. */ + /* 3X5.9B[4] - DVP1 Data Source Selection + * 0: Primary Display + * 1: Secondary Display */ + ViaCrtcMask(hwp, 0x9B, temp << 4, 0x10); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "DVP1 Display Output Source: IGA%d\n", + (temp & 0x01) + 1); DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Exiting via_analog_mode_set.\n")); + "Exiting viaDVP1SetDisplaySource.\n")); } -static xf86OutputStatus -via_analog_detect(xf86OutputPtr output) -{ - xf86OutputStatus status = XF86OutputStatusDisconnected; - ScrnInfoPtr pScrn = output->scrn; - VIAPtr pVia = VIAPTR(pScrn); - xf86MonPtr mon; - - /* Probe I2C Bus 1 to see if a VGA monitor is connected. */ - xf86DrvMsg(pScrn->scrnIndex, X_PROBED, - "Probing for a VGA monitor on I2C Bus 1.\n"); - mon = xf86OutputGetEDID(output, pVia->pI2CBus1); - if (mon && (!mon->features.input_type)) { - xf86OutputSetEDID(output, mon); - status = XF86OutputStatusConnected; - xf86DrvMsg(pScrn->scrnIndex, X_PROBED, - "Detected a VGA monitor on I2C Bus 1.\n"); - } else { - xf86DrvMsg(pScrn->scrnIndex, X_PROBED, - "Did not detect a VGA monitor on I2C Bus 1.\n"); - - /* Probe I2C Bus 2 to see if a VGA monitor is connected. */ - xf86DrvMsg(pScrn->scrnIndex, X_PROBED, - "Probing for a VGA monitor on I2C Bus 2.\n"); - mon = xf86OutputGetEDID(output, pVia->pI2CBus2); - if (mon && (!mon->features.input_type)) { - xf86OutputSetEDID(output, mon); - status = XF86OutputStatusConnected; - xf86DrvMsg(pScrn->scrnIndex, X_PROBED, - "Detected a VGA monitor on I2C Bus 2.\n"); - } else { - xf86DrvMsg(pScrn->scrnIndex, X_PROBED, - "Did not detect a VGA monitor on I2C Bus 2.\n"); - - /* Perform manual detection of a VGA monitor since */ - /* it was not detected via I2C buses. */ - xf86DrvMsg(pScrn->scrnIndex, X_PROBED, - "Now perform manual detection of a VGA " - "monitor.\n"); - vgaHWPtr hwp = VGAHWPTR(pScrn); - CARD8 SR01 = hwp->readSeq(hwp, 0x01); - CARD8 SR40 = hwp->readSeq(hwp, 0x40); - CARD8 CR36 = hwp->readCrtc(hwp, 0x36); - - /* We have to power on the display to detect it */ - ViaSeqMask(hwp, 0x01, 0x00, 0x20); - ViaCrtcMask(hwp, 0x36, 0x00, 0xF0); - - /* Wait for vblank */ - usleep(16); - - /* Detect the load on pins */ - ViaSeqMask(hwp, 0x40, 0x80, 0x80); - - if ((VIA_CX700 == pVia->Chipset) || - (VIA_VX800 == pVia->Chipset) || - (VIA_VX855 == pVia->Chipset) || - (VIA_VX900 == pVia->Chipset)) - ViaSeqMask(hwp, 0x40, 0x00, 0x80); - - if (ViaVgahwIn(hwp, 0x3C2) & 0x20) { - status = XF86OutputStatusConnected; - xf86DrvMsg(pScrn->scrnIndex, X_PROBED, - "Detected a VGA monitor using manual " - "detection method.\n"); - } - - if ((VIA_CX700 == pVia->Chipset) || - (VIA_VX800 == pVia->Chipset) || - (VIA_VX855 == pVia->Chipset) || - (VIA_VX900 == pVia->Chipset)) - ViaSeqMask(hwp, 0x40, 0x00, 0x80); - - /* Restore previous state */ - hwp->writeSeq(hwp, 0x40, SR40); - hwp->writeSeq(hwp, 0x01, SR01); - hwp->writeCrtc(hwp, 0x36, CR36); - } - } - - return status; -} - -static void -via_analog_destroy(xf86OutputPtr output) -{ -} - -static const xf86OutputFuncsRec via_analog_funcs = { - .create_resources = via_analog_create_resources, -#ifdef RANDR_12_INTERFACE - .set_property = via_analog_set_property, -#endif -#ifdef RANDR_13_INTERFACE - .get_property = via_analog_get_property, -#endif - .dpms = via_analog_dpms, - .save = via_analog_save, - .restore = via_analog_restore, - .mode_valid = via_analog_mode_valid, - .mode_fixup = via_analog_mode_fixup, - .prepare = via_analog_prepare, - .commit = via_analog_commit, - .mode_set = via_analog_mode_set, - .detect = via_analog_detect, - .get_modes = xf86OutputGetEDIDModes, - .destroy = via_analog_destroy, -}; - +/* + * Sets DVP1 (Digital Video Port 1) I/O pad state. + */ void -via_analog_init(ScrnInfoPtr pScrn) +viaDVP1EnableIOPads(ScrnInfoPtr pScrn, CARD8 ioPadState) { - VIAPtr pVia = VIAPTR(pScrn); - VIABIOSInfoPtr pBIOSInfo = pVia->pBIOSInfo; - xf86OutputPtr output = NULL; + vgaHWPtr hwp = VGAHWPTR(pScrn); DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Entered via_analog_init.\n")); - - if (!pVia->pI2CBus1 || !pVia->pI2CBus2) { - xf86DrvMsg(pScrn->scrnIndex, X_ERROR, - "I2C Bus 1 or I2C Bus 2 does not exist.\n"); - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Exiting via_analog_init.\n")); - return; - } - - output = xf86OutputCreate(pScrn, &via_analog_funcs, "VGA-1"); + "Entered viaDVP1EnableIOPads.\n")); - output->possible_crtcs = 0x3; - output->possible_clones = 0; - output->interlaceAllowed = TRUE; - output->doubleScanAllowed = FALSE; - pBIOSInfo->analog = output; + /* Set DVP1 I/O pad state. */ + /* 3C5.1E[5:4] - DVP1 Power Control + * 0x: Pad always off + * 10: Depend on the other control signal + * 11: Pad on/off according to the + * Power Management Status (PMS) */ + ViaSeqMask(hwp, 0x1E, ioPadState << 4, 0x30); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "DVP1 I/O Pad State: %s\n", + (ioPadState & 0x02) ? + (ioPadState & 0x01) ? "Automatic On / Off": "Conditional" + : "Off"); DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Exiting via_analog_init.\n")); -} - -static void -via_dvi_create_resources(xf86OutputPtr output) -{ + "Exiting viaDVP1EnableIOPads.\n")); } -#ifdef RANDR_12_INTERFACE -static Bool -via_dvi_set_property(xf86OutputPtr output, Atom property, - RRPropertyValuePtr value) +/* + * Sets DVP1 (Digital Video Port 1) clock I/O pad drive strength. + */ +void +viaDVP1SetClockDriveStrength(ScrnInfoPtr pScrn, CARD8 clockDriveStrength) { - return TRUE; -} + vgaHWPtr hwp = VGAHWPTR(pScrn); -static Bool -via_dvi_get_property(xf86OutputPtr output, Atom property) -{ - return FALSE; -} -#endif + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered viaDVP1SetClockDriveStrength.\n")); -static void -via_dvi_dpms(xf86OutputPtr output, int mode) -{ - ScrnInfoPtr pScrn = output->scrn; + /* 3C5.65[3:2] - DVP1 Clock Pads Driving Select + * 00: lowest + * 01: low + * 10: high + * 11: highest */ + ViaSeqMask(hwp, 0x65, clockDriveStrength << 2, 0x0C); - switch (mode) { - case DPMSModeOn: - via_vt1632_power(output, TRUE); - break; - case DPMSModeStandby: - case DPMSModeSuspend: - case DPMSModeOff: - via_vt1632_power(output, FALSE); - break; - default: - break; - } -} + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "DVP1 Clock I/O Pad Drive Strength: %u\n", + clockDriveStrength & 0x03); -static void -via_dvi_save(xf86OutputPtr output) -{ - via_vt1632_save(output); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting viaDVP1SetClockDriveStrength.\n")); } -static void -via_dvi_restore(xf86OutputPtr output) +/* + * Sets DVP1 (Digital Video Port 1) data I/O pads drive strength. + */ +void +viaDVP1SetDataDriveStrength(ScrnInfoPtr pScrn, CARD8 dataDriveStrength) { - via_vt1632_restore(output); -} + vgaHWPtr hwp = VGAHWPTR(pScrn); -static int -via_dvi_mode_valid(xf86OutputPtr output, DisplayModePtr pMode) -{ - return via_vt1632_mode_valid(output, pMode); -} + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered viaDVP1SetDataDriveStrength.\n")); -static Bool -via_dvi_mode_fixup(xf86OutputPtr output, DisplayModePtr mode, - DisplayModePtr adjusted_mode) -{ - return TRUE; -} + /* 3C5.65[1:0] - DVP1 Data Pads Driving Select + * 00: lowest + * 01: low + * 10: high + * 11: highest */ + ViaSeqMask(hwp, 0x65, dataDriveStrength, 0x03); -static void -via_dvi_prepare(xf86OutputPtr output) -{ -} + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "DVP1 Data I/O Pads Drive Strength: %u\n", + dataDriveStrength & 0x03); -static void -via_dvi_commit(xf86OutputPtr output) -{ + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting viaDVP1SetDataDriveStrength.\n")); } -static void -via_dvi_mode_set(xf86OutputPtr output, DisplayModePtr mode, - DisplayModePtr adjusted_mode) +/* + * Sets IGA1 or IGA2 as the display output source for VIA Technologies + * Chrome IGP DFP (Digital Flat Panel) Low interface. + */ +void +viaDFPLowSetDisplaySource(ScrnInfoPtr pScrn, CARD8 displaySource) { - ScrnInfoPtr pScrn = output->scrn; vgaHWPtr hwp = VGAHWPTR(pScrn); + CARD8 temp = displaySource; - via_vt1632_mode_set(output, mode, adjusted_mode); -} - -static xf86OutputStatus -via_dvi_detect(xf86OutputPtr output) -{ - xf86OutputStatus status = XF86OutputStatusDisconnected; - ScrnInfoPtr pScrn = output->scrn; - VIAPtr pVia = VIAPTR(pScrn); - ViaVT1632Ptr Private = output->driver_private; - xf86MonPtr mon; - - /* Check for the DVI presence via VT1632A first before accessing - * I2C bus. */ - status = via_vt1632_detect(output); - if (status == XF86OutputStatusConnected) { - - /* Since DVI presence was established, access the I2C bus - * assigned to DVI. */ - mon = xf86OutputGetEDID(output, Private->VT1632I2CDev->pI2CBus); - - /* Is the interface type digital? */ - if (mon && DIGITAL(mon->features.input_type)) { - xf86OutputSetEDID(output, mon); - } else { - status = XF86OutputStatusDisconnected; - } - } + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered viaDFPLowSetDisplaySource.\n")); - return status; -} + /* Set DFP Low display output source. */ + /* 3X5.99[4] - DFP Low Data Source Selection + * 0: Primary Display + * 1: Secondary Display */ + ViaCrtcMask(hwp, 0x99, temp << 4, 0x10); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "DFP Low Display Output Source: IGA%d\n", + (temp & 0x01) + 1); -static void -via_dvi_destroy(xf86OutputPtr output) -{ + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting viaDFPLowSetDisplaySource.\n")); } -static const xf86OutputFuncsRec via_dvi_funcs = { - .create_resources = via_dvi_create_resources, -#ifdef RANDR_12_INTERFACE - .set_property = via_dvi_set_property, -#endif -#ifdef RANDR_13_INTERFACE - .get_property = via_dvi_get_property, -#endif - .dpms = via_dvi_dpms, - .save = via_dvi_save, - .restore = via_dvi_restore, - .mode_valid = via_dvi_mode_valid, - .mode_fixup = via_dvi_mode_fixup, - .prepare = via_dvi_prepare, - .commit = via_dvi_commit, - .mode_set = via_dvi_mode_set, - .detect = via_dvi_detect, - .get_modes = xf86OutputGetEDIDModes, - .destroy = via_dvi_destroy, -}; - +/* + * Sets DFP (Digital Flat Panel) Low I/O pad state. + */ void -via_dvi_init(ScrnInfoPtr pScrn) +viaDFPLowEnableIOPads(ScrnInfoPtr pScrn, CARD8 ioPadState) { - VIAPtr pVia = VIAPTR(pScrn); - xf86OutputPtr output = NULL; - ViaVT1632Ptr private_data = NULL; - I2CBusPtr pBus = NULL; - I2CDevPtr pDev = NULL; - I2CSlaveAddr addr = 0x10; + vgaHWPtr hwp = VGAHWPTR(pScrn); DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Entered via_dvi_init.\n")); - - if (!pVia->pI2CBus2 || !pVia->pI2CBus3) { - xf86DrvMsg(pScrn->scrnIndex, X_ERROR, - "I2C Bus 2 or I2C Bus 3 does not exist.\n"); - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Exiting via_dvi_init.\n")); - return; - } + "Entered viaDFPLowEnableIOPads.\n")); - if (xf86I2CProbeAddress(pVia->pI2CBus3, addr)) { - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_PROBED, - "Will probe I2C Bus 3 for a possible " - "external TMDS transmitter.\n")); - pBus = pVia->pI2CBus3; - } else if (xf86I2CProbeAddress(pVia->pI2CBus2, addr)) { - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_PROBED, - "Will probe I2C Bus 2 for a possible " - "external TMDS transmitter.\n")); - pBus = pVia->pI2CBus2; - } else { - xf86DrvMsg(pScrn->scrnIndex, X_PROBED, - "Did not find a possible external TMDS transmitter " - "on I2C Bus 2 or I2C Bus 3.\n"); - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Exiting via_dvi_init.\n")); - return; - } - - pDev = xf86CreateI2CDevRec(); - if (!pDev) { - xf86DrvMsg(pScrn->scrnIndex, X_ERROR, - "Failed to create an I2C bus structure.\n"); - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Exiting via_dvi_init.\n")); - return; - } - - pDev->DevName = "VT1632A"; - pDev->SlaveAddr = addr; - pDev->pI2CBus = pBus; - if (!xf86I2CDevInit(pDev)) { - xf86DestroyI2CDevRec(pDev, TRUE); - xf86DrvMsg(pScrn->scrnIndex, X_ERROR, - "Failed to initialize a device on I2C bus.\n"); - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Exiting via_dvi_init.\n")); - return; - } - - if (!via_vt1632_probe(pScrn, pDev)) { - xf86DestroyI2CDevRec(pDev, TRUE); - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Exiting via_dvi_init.\n")); - return; - } - - private_data = via_vt1632_init(pScrn, pDev); - if (!private_data) { - xf86DestroyI2CDevRec(pDev, TRUE); - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Exiting via_dvi_init.\n")); - return; - } - - output = xf86OutputCreate(pScrn, &via_dvi_funcs, "DVI-1"); - if (output) { - output->driver_private = private_data; - output->possible_crtcs = 0x2; - output->possible_clones = 0; - output->interlaceAllowed = FALSE; - output->doubleScanAllowed = FALSE; - } + /* Set DFP Low I/O pad state. */ + /* 3C5.2A[1:0] - DFP Low Power Control + * 0x: Pad always off + * 10: Depend on the other control signal + * 11: Pad on/off according to the + * Power Management Status (PMS) */ + ViaSeqMask(hwp, 0x2A, ioPadState, 0x03); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "DFP Low I/O Pad State: %s\n", + (ioPadState & 0x02) ? + (ioPadState & 0x01) ? "Automatic On / Off": "Conditional" + : "Off"); DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Exiting via_dvi_init.\n")); + "Exiting viaDFPLowEnableIOPads.\n")); } /* @@ -1111,7 +456,6 @@ switch (pVia->Chipset) { case VIA_CLE266: - case VIA_KM400: /* 3C5.12[4] - FPD17 pin strapping * 0: TMDS transmitter (DVI) / capture device @@ -1130,7 +474,7 @@ } else { xf86DrvMsg(pScrn->scrnIndex, X_INFO, "A TMDS transmitter (DVI) / capture device is " - "connected to flat panel interface.\n"); + "connected to DIP0.\n"); } /* 3C5.12[5] - FPD18 pin strapping @@ -1138,19 +482,15 @@ * 1: TV encoder */ if (sr12 & 0x20) { xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "A TMDS transmitter (DVI) is connected to " - "DVI port.\n"); - } else { - xf86DrvMsg(pScrn->scrnIndex, X_INFO, "A TV encoder is connected to " - "DVI port.\n"); + "DIP0.\n"); /* 3C5.13[4:3] - FPD21-20 pin strapping * 00: PAL * 01: NTSC * 10: PAL-N * 11: PAL-NC */ - if (sr13 & 0x04) { + if ((!(sr13 & 0x08)) && (sr13 & 0x04)) { xf86DrvMsg(pScrn->scrnIndex, X_INFO, "NTSC for the TV encoder.\n"); } else { @@ -1160,7 +500,7 @@ } else { xf86DrvMsg(pScrn->scrnIndex, X_INFO, "PAL%s for the TV encoder.\n", - sr13 & 0x04 ? "-NC" : "-N"); + (sr13 & 0x04) ? "-NC" : "-N"); } } @@ -1169,11 +509,16 @@ * 1: 625 lines (PAL) */ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "%s lines for the TV encoder.\n", - sr12 & 0x40 ? "625" : "525"); + (sr12 & 0x40) ? "625" : "525"); + } else { + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "A TMDS transmitter (DVI) is connected to " + "DIP0.\n"); } break; + case VIA_KM400: case VIA_K8M800: case VIA_PM800: case VIA_P4M800PRO: @@ -1208,7 +553,7 @@ /* 3C5.12[4] - DVP0D4 pin strapping * 0: Dual 12-bit FPDP (Flat Panel Display Port) - * 1: 24-bit FPDP (Flat Panel Display Port) */ + * 1: 24-bit FPDP (Flat Panel Display Port) */ if (sr12 & 0x10) { xf86DrvMsg(pScrn->scrnIndex, X_INFO, "24-bit FPDP (Flat Panel Display Port) " @@ -1317,22 +662,31 @@ pBIOSInfo->analog = NULL; + /* Initialize the number of VGA connectors. */ + pVia->numberVGA = 0; + + /* Initialize the number of DVI connectors. */ + pVia->numberDVI = 0; + + /* Initialize the number of FP connectors. */ + pVia->numberFP = 0; + /* Read off the VIA Technologies IGP pin strapping for display detection purposes. */ viaProbePinStrapping(pScrn); - /* LVDS */ - via_lvds_init(pScrn); - /* VGA */ via_analog_init(pScrn); /* TV */ via_tv_init(pScrn); - /* External TMDS Transmitter (DVI) */ + /* DVI */ via_dvi_init(pScrn); + /* LVDS */ + via_lvds_init(pScrn); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Exiting viaOutputDetect.\n")); } @@ -1531,12 +885,11 @@ static CARD32 ViaComputeProDotClock(unsigned clock) { - double fvco, fout, fref, err, minErr; + double fvco, fout, err, minErr; CARD32 dr = 0, dn, dm, maxdm, maxdn; CARD32 factual; union pllparams bestClock; - fref = 14.318e6; fout = (double)clock * 1.e3; factual = ~0; @@ -1615,28 +968,3 @@ return 0; } - -void -viaTMDSPower(ScrnInfoPtr pScrn, Bool On) -{ - - vgaHWPtr hwp = VGAHWPTR(pScrn); - - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Entered viaTMDSPower.\n")); - - if (On) { - /* Power on TMDS */ - ViaCrtcMask(hwp, 0xD2, 0x00, 0x08); - } else { - /* Power off TMDS */ - ViaCrtcMask(hwp, 0xD2, 0x08, 0x08); - } - - xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Integrated TMDS (DVI) Power: %s\n", - On ? "On" : "Off"); - - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Exiting viaTMDSPower.\n")); -} diff -Nru xserver-xorg-video-openchrome-0.5.0/src/via_priv.h xserver-xorg-video-openchrome-0.6.0/src/via_priv.h --- xserver-xorg-video-openchrome-0.5.0/src/via_priv.h 2016-07-06 16:21:06.000000000 +0000 +++ xserver-xorg-video-openchrome-0.6.0/src/via_priv.h 2017-02-26 23:53:37.000000000 +0000 @@ -1,6 +1,6 @@ /* * Copyright 2006-2015 The Openchrome Project - * [http://www.freedesktop.org/wiki/Openchrome] + * [https://www.freedesktop.org/wiki/Openchrome] * Copyright 1998-2003 VIA Technologies, Inc. All Rights Reserved. * Copyright 2001-2003 S3 Graphics, Inc. All Rights Reserved. * diff -Nru xserver-xorg-video-openchrome-0.5.0/src/via_sii164.c xserver-xorg-video-openchrome-0.6.0/src/via_sii164.c --- xserver-xorg-video-openchrome-0.5.0/src/via_sii164.c 1970-01-01 00:00:00.000000000 +0000 +++ xserver-xorg-video-openchrome-0.6.0/src/via_sii164.c 2017-02-26 23:53:37.000000000 +0000 @@ -0,0 +1,483 @@ +/* + * Copyright 2016 Kevin Brace + * Copyright 2016 The OpenChrome Project + * [https://www.freedesktop.org/wiki/Openchrome] + * Copyright 2014 SHS SERVICES GmbH + * Copyright 2006-2009 Luc Verhaegen. + * + * 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 + * 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. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "via_driver.h" +#include "via_sii164.h" + +static void +viaSiI164DumpRegisters(ScrnInfoPtr pScrn, I2CDevPtr pDev) +{ + int i; + CARD8 tmp; + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered viaSiI164DumpRegisters.\n")); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "SiI 164: dumping registers:\n")); + for (i = 0; i <= 0x0f; i++) { + xf86I2CReadByte(pDev, i, &tmp); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "SiI 164: 0x%02x: 0x%02x\n", i, tmp)); + } + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting viaSiI164DumpRegisters.\n")); +} + +static void +viaSiI164InitRegisters(ScrnInfoPtr pScrn, I2CDevPtr pDev) +{ + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered viaSiI164InitRegisters.\n")); + + xf86I2CWriteByte(pDev, 0x08, + VIA_SII164_VEN | VIA_SII164_HEN | + VIA_SII164_DSEL | VIA_SII164_EDGE | VIA_SII164_PDB); + + /* Route receiver detect bit (Offset 0x09[2]) as the output of + * MSEN pin. */ + xf86I2CWriteByte(pDev, 0x09, 0x20); + + xf86I2CWriteByte(pDev, 0x0A, 0x90); + + xf86I2CWriteByte(pDev, 0x0C, 0x89); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting viaSiI164InitRegisters.\n")); +} + +/* + * Returns TMDS receiver detection state for Silicon Image SiI 164 + * external TMDS transmitter. + */ +static Bool +viaSiI164Sense(ScrnInfoPtr pScrn, I2CDevPtr pDev) +{ + CARD8 tmp; + Bool receiverDetected = FALSE; + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered viaSiI164Sense.\n")); + + xf86I2CReadByte(pDev, 0x09, &tmp); + if (tmp & 0x04) { + receiverDetected = TRUE; + } + + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "SiI 164 %s a TMDS receiver.\n", + receiverDetected ? "detected" : "did not detect"); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting viaSiI164Sense.\n")); + return receiverDetected; +} + +static void +viaSiI164Power(ScrnInfoPtr pScrn, I2CDevPtr pDev, Bool powerState) +{ + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered viaSiI164Power.\n")); + + xf86I2CMaskByte(pDev, 0x08, powerState ? 0x01 : 0x00, 0x01); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "SiI 164 (DVI) Power: %s\n", + powerState ? "On" : "Off"); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting viaSiI164Power.\n")); +} + +static void +viaSiI164SaveRegisters(ScrnInfoPtr pScrn, I2CDevPtr pDev, + viaSiI164RecPtr pSiI164Rec) +{ + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered viaSiI164SaveRegisters.\n")); + + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Saving SiI 164 registers.\n"); + xf86I2CReadByte(pDev, 0x08, &pSiI164Rec->Register08); + xf86I2CReadByte(pDev, 0x09, &pSiI164Rec->Register09); + xf86I2CReadByte(pDev, 0x0A, &pSiI164Rec->Register0A); + xf86I2CReadByte(pDev, 0x0C, &pSiI164Rec->Register0C); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting viaSiI164SaveRegisters.\n")); +} + +static void +viaSiI164RestoreRegisters(ScrnInfoPtr pScrn, I2CDevPtr pDev, + viaSiI164RecPtr pSiI164Rec) +{ + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered viaSiI164RestoreRegisters.\n")); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Restoring SiI 164 registers.\n")); + xf86I2CWriteByte(pDev, 0x08, pSiI164Rec->Register08); + xf86I2CWriteByte(pDev, 0x09, pSiI164Rec->Register09); + xf86I2CWriteByte(pDev, 0x0A, pSiI164Rec->Register0A); + xf86I2CWriteByte(pDev, 0x0C, pSiI164Rec->Register0C); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting viaSiI164RestoreRegisters.\n")); +} + +static int +viaSiI164CheckModeValidity(xf86OutputPtr output, DisplayModePtr pMode) +{ + ScrnInfoPtr pScrn = output->scrn; + viaSiI164RecPtr pSiI164Rec = output->driver_private; + int status = MODE_OK; + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered viaSiI164CheckModeValidity.\n")); + + if (pMode->Clock < pSiI164Rec->DotclockMin) { + status = MODE_CLOCK_LOW; + goto exit; + } + + if (pMode->Clock > pSiI164Rec->DotclockMax) { + status = MODE_CLOCK_HIGH; + } + +exit: + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting viaSiI164CheckModeValidity.\n")); + return status; +} + +static void +via_sii164_create_resources(xf86OutputPtr output) +{ +} + +static void +via_sii164_dpms(xf86OutputPtr output, int mode) +{ + ScrnInfoPtr pScrn = output->scrn; + viaSiI164RecPtr pSiI164Rec = output->driver_private; + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered via_sii164_dpms.\n")); + + switch (mode) { + case DPMSModeOn: + viaSiI164Power(pScrn, pSiI164Rec->SiI164I2CDev, TRUE); + break; + case DPMSModeStandby: + case DPMSModeSuspend: + case DPMSModeOff: + viaSiI164Power(pScrn, pSiI164Rec->SiI164I2CDev, FALSE); + break; + default: + break; + } + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting via_sii164_dpms.\n")); +} + +static void +via_sii164_save(xf86OutputPtr output) +{ + ScrnInfoPtr pScrn = output->scrn; + viaSiI164RecPtr pSiI164Rec = output->driver_private; + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered via_sii164_save.\n")); + + viaSiI164SaveRegisters(pScrn, pSiI164Rec->SiI164I2CDev, pSiI164Rec); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting via_sii164_save.\n")); +} + +static void +via_sii164_restore(xf86OutputPtr output) +{ + ScrnInfoPtr pScrn = output->scrn; + viaSiI164RecPtr pSiI164Rec = output->driver_private; + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered via_sii164_restore.\n")); + + viaSiI164RestoreRegisters(pScrn, pSiI164Rec->SiI164I2CDev, + pSiI164Rec); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting via_sii164_restore.\n")); +} + +static int +via_sii164_mode_valid(xf86OutputPtr output, DisplayModePtr pMode) +{ + return viaSiI164CheckModeValidity(output, pMode); +} + +static Bool +via_sii164_mode_fixup(xf86OutputPtr output, DisplayModePtr mode, + DisplayModePtr adjusted_mode) +{ + return TRUE; +} + +static void +via_sii164_prepare(xf86OutputPtr output) +{ +} + +static void +via_sii164_commit(xf86OutputPtr output) +{ +} + +static void +via_sii164_mode_set(xf86OutputPtr output, DisplayModePtr mode, + DisplayModePtr adjusted_mode) +{ + ScrnInfoPtr pScrn = output->scrn; + drmmode_crtc_private_ptr iga = output->crtc->driver_private; + viaSiI164RecPtr pSiI164Rec = output->driver_private; + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered via_sii164_mode_set.\n")); + + if (output->crtc) { + viaExtTMDSSetClockDriveStrength(pScrn, 0x03); + viaExtTMDSSetDataDriveStrength(pScrn, 0x03); + viaExtTMDSEnableIOPads(pScrn, 0x03); + + viaSiI164DumpRegisters(pScrn, pSiI164Rec->SiI164I2CDev); + viaSiI164InitRegisters(pScrn, pSiI164Rec->SiI164I2CDev); + viaSiI164DumpRegisters(pScrn, pSiI164Rec->SiI164I2CDev); + + viaExtTMDSSetDisplaySource(pScrn, iga->index ? 0x01 : 0x00); + } + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting via_sii164_mode_set.\n")); +} + +static xf86OutputStatus +via_sii164_detect(xf86OutputPtr output) +{ + xf86MonPtr mon; + xf86OutputStatus status = XF86OutputStatusDisconnected; + ScrnInfoPtr pScrn = output->scrn; + viaSiI164RecPtr pSiI164Rec = output->driver_private; + + /* Check for the DVI presence via SiI 164 first before accessing + * I2C bus. */ + if (viaSiI164Sense(pScrn, pSiI164Rec->SiI164I2CDev)) { + + /* Since DVI presence was established, access the I2C bus + * assigned to DVI. */ + mon = xf86OutputGetEDID(output, pSiI164Rec->SiI164I2CDev->pI2CBus); + + /* Is the interface type digital? */ + if (mon && DIGITAL(mon->features.input_type)) { + status = XF86OutputStatusConnected; + xf86DrvMsg(pScrn->scrnIndex, X_PROBED, + "Detected a monitor connected to DVI.\n"); + xf86OutputSetEDID(output, mon); + } else { + xf86DrvMsg(pScrn->scrnIndex, X_PROBED, + "Could not obtain EDID from a monitor " + "connected to DVI.\n"); + } + } + + return status; +} + +#ifdef RANDR_12_INTERFACE +static Bool +via_sii164_set_property(xf86OutputPtr output, Atom property, + RRPropertyValuePtr value) +{ + return TRUE; +} +#endif + +#ifdef RANDR_13_INTERFACE +static Bool +via_sii164_get_property(xf86OutputPtr output, Atom property) +{ + return FALSE; +} +#endif + +static void +via_sii164_destroy(xf86OutputPtr output) +{ +} + +const xf86OutputFuncsRec via_sii164_funcs = { + .create_resources = via_sii164_create_resources, + .dpms = via_sii164_dpms, + .save = via_sii164_save, + .restore = via_sii164_restore, + .mode_valid = via_sii164_mode_valid, + .mode_fixup = via_sii164_mode_fixup, + .prepare = via_sii164_prepare, + .commit = via_sii164_commit, + .mode_set = via_sii164_mode_set, + .detect = via_sii164_detect, + .get_modes = xf86OutputGetEDIDModes, +#ifdef RANDR_12_INTERFACE + .set_property = via_sii164_set_property, +#endif +#ifdef RANDR_13_INTERFACE + .get_property = via_sii164_get_property, +#endif + .destroy = via_sii164_destroy, +}; + +Bool +viaSiI164Init(ScrnInfoPtr pScrn, I2CBusPtr pI2CBus) +{ + xf86OutputPtr output; + VIAPtr pVia = VIAPTR(pScrn); + viaSiI164RecPtr pSiI164Rec = NULL; + I2CDevPtr pI2CDevice = NULL; + I2CSlaveAddr i2cAddr = 0x70; + CARD8 buf; + CARD16 vendorID, deviceID; + Bool status = FALSE; + char outputNameBuffer[32]; + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered viaSiI164Init.\n")); + + if (!xf86I2CProbeAddress(pI2CBus, i2cAddr)) { + xf86DrvMsg(pScrn->scrnIndex, X_PROBED, + "I2C device not found.\n"); + goto exit; + } + + pI2CDevice = xf86CreateI2CDevRec(); + if (!pI2CDevice) { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "Failed to create an I2C bus device record.\n"); + goto exit; + } + + pI2CDevice->DevName = "SiI 164"; + pI2CDevice->SlaveAddr = i2cAddr; + pI2CDevice->pI2CBus = pI2CBus; + if (!xf86I2CDevInit(pI2CDevice)) { + xf86DestroyI2CDevRec(pI2CDevice, TRUE); + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "Failed to initialize a device on I2C bus.\n"); + goto exit; + } + + xf86I2CReadByte(pI2CDevice, 0, &buf); + vendorID = buf; + xf86I2CReadByte(pI2CDevice, 1, &buf); + vendorID |= buf << 8; + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Vendor ID: 0x%04x\n", vendorID)); + + xf86I2CReadByte(pI2CDevice, 2, &buf); + deviceID = buf; + xf86I2CReadByte(pI2CDevice, 3, &buf); + deviceID |= buf << 8; + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Device ID: 0x%04x\n", deviceID)); + + if ((vendorID != 0x0001) || (deviceID != 0x0006)) { + xf86DestroyI2CDevRec(pI2CDevice, TRUE); + xf86DrvMsg(pScrn->scrnIndex, X_PROBED, + "SiI 164 external TMDS transmitter not detected.\n"); + goto exit; + } + + xf86DrvMsg(pScrn->scrnIndex, X_PROBED, + "SiI 164 external TMDS transmitter detected.\n"); + + pSiI164Rec = xnfcalloc(1, sizeof(viaSiI164Rec)); + if (!pSiI164Rec) { + xf86DestroyI2CDevRec(pI2CDevice, TRUE); + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "Failed to allocate working storage for SiI 164.\n"); + goto exit; + } + + // Remembering which I2C bus is used for SiI 164. + pSiI164Rec->SiI164I2CDev = pI2CDevice; + + xf86I2CReadByte(pI2CDevice, 0x06, &buf); + pSiI164Rec->DotclockMin = buf * 1000; + + xf86I2CReadByte(pI2CDevice, 0x07, &buf); + pSiI164Rec->DotclockMax = (buf + 65) * 1000; + + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Supported SiI 164 Dot Clock Range: " + "%d to %d MHz\n", + pSiI164Rec->DotclockMin / 1000, + pSiI164Rec->DotclockMax / 1000); + + /* The code to dynamically designate the particular DVI (i.e., DVI-1, + * DVI-2, etc.) for xrandr was borrowed from xf86-video-r128 DDX. */ + sprintf(outputNameBuffer, "DVI-%d", (pVia->numberDVI + 1)); + output = xf86OutputCreate(pScrn, &via_sii164_funcs, outputNameBuffer); + if (!output) { + free(pSiI164Rec); + xf86DestroyI2CDevRec(pI2CDevice, TRUE); + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "Failed to allocate X Server display output record for " + "SiI 164.\n"); + goto exit; + } + + output->driver_private = pSiI164Rec; + + /* Since there are two (2) display controllers registered with the + * X.Org Server and both IGA1 and IGA2 can handle DVI without any + * limitations, possible_crtcs should be set to 0x3 (0b11) so that + * either display controller can get assigned to handle DVI. */ + output->possible_crtcs = (1 << 1) | (1 << 0); + + output->possible_clones = 0; + output->interlaceAllowed = FALSE; + output->doubleScanAllowed = FALSE; + + viaSiI164DumpRegisters(pScrn, pI2CDevice); + + pVia->numberDVI++; + status = TRUE; +exit: + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting viaSiI164Init.\n")); + return status; +} diff -Nru xserver-xorg-video-openchrome-0.5.0/src/via_sii164.h xserver-xorg-video-openchrome-0.6.0/src/via_sii164.h --- xserver-xorg-video-openchrome-0.5.0/src/via_sii164.h 1970-01-01 00:00:00.000000000 +0000 +++ xserver-xorg-video-openchrome-0.6.0/src/via_sii164.h 2017-02-26 23:53:37.000000000 +0000 @@ -0,0 +1,54 @@ +/* + * Copyright 2016 Kevin Brace + * Copyright 2016 The OpenChrome Project + * [https://www.freedesktop.org/wiki/Openchrome] + * Copyright 2014 SHS SERVICES GmbH + * Copyright 2006-2009 Luc Verhaegen. + * + * 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 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 _VIA_SII164_H_ +#define _VIA_SII164_H_ 1 + +#define VIA_SII164_VEN 0x20 +#define VIA_SII164_HEN 0x10 +#define VIA_SII164_DSEL 0x08 +#define VIA_SII164_BSEL 0x04 +#define VIA_SII164_EDGE 0x02 +#define VIA_SII164_PDB 0x01 + +typedef struct _viaSiI164 { + I2CDevPtr SiI164I2CDev; + + int DotclockMin; + int DotclockMax; + CARD8 Register08; + CARD8 Register09; + CARD8 Register0A; + CARD8 Register0C; +} viaSiI164Rec, *viaSiI164RecPtr; + + +const xf86OutputFuncsRec via_sii164_funcs; + +Bool viaSiI164Init(ScrnInfoPtr pScrn, I2CBusPtr pI2CBus); + +#endif /* _VIA_SII164_H_ */ diff -Nru xserver-xorg-video-openchrome-0.5.0/src/via_tmds.c xserver-xorg-video-openchrome-0.6.0/src/via_tmds.c --- xserver-xorg-video-openchrome-0.5.0/src/via_tmds.c 1970-01-01 00:00:00.000000000 +0000 +++ xserver-xorg-video-openchrome-0.6.0/src/via_tmds.c 2017-02-27 23:52:30.000000000 +0000 @@ -0,0 +1,1238 @@ +/* + * Copyright 2016 Kevin Brace + * Copyright 2015-2016 The OpenChrome Project + * [https://www.freedesktop.org/wiki/Openchrome] + * Copyright 2014 SHS SERVICES GmbH + * + * 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 + * 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. + */ + +/* + * via_tmds.c + * + * Handles initialization of TMDS (DVI) related resources and + * controls the integrated TMDS transmitter found in CX700 and + * later VIA Technologies chipsets. + * + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include "via_driver.h" +#include "via_vt1632.h" +#include "via_sii164.h" + + +/* + 1. Formula: + 2^13 X 0.0698uSec [1/14.318MHz] = 8192 X 0.0698uSec =572.1uSec + Timer = Counter x 572 uSec + 2. Note: + 0.0698 uSec is too small to compute for hardware. So we multiply a + reference value(2^13) to make it big enough to compute for hardware. + 3. Note: + The meaning of the TD0~TD3 are count of the clock. + TD(sec) = (sec)/(per clock) x (count of clocks) +*/ +#define TD0 200 +#define TD1 25 +#define TD2 0 +#define TD3 25 + + +/* + * Initializes most registers related to VIA Technologies IGP + * integrated TMDS transmitter. Synchronization polarity and + * display output source need to be set separately. */ +static void +viaTMDSInitRegisters(ScrnInfoPtr pScrn) +{ + vgaHWPtr hwp = VGAHWPTR(pScrn); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered viaTMDSInitRegisters.\n")); + + /* Activate DVI + LVDS2 mode. */ + /* 3X5.D2[5:4] - Display Channel Select + * 00: LVDS1 + LVDS2 + * 01: DVI + LVDS2 + * 10: One Dual LVDS Channel (High Resolution Pannel) + * 11: Single Channel DVI */ + ViaCrtcMask(hwp, 0xD2, 0x10, 0x30); + + /* Various DVI PLL settings should be set to default settings. */ + /* 3X5.D1[7] - PLL2 Reference Clock Edge Select Bit + * 0: PLLCK lock to rising edge of reference clock + * 1: PLLCK lock to falling edge of reference clock + * 3X5.D1[6:5] - PLL2 Charge Pump Current Set Bits + * 00: ICH = 12.5 uA + * 01: ICH = 25.0 uA + * 10: ICH = 37.5 uA + * 11: ICH = 50.0 uA + * 3X5.D1[4:1] - Reserved + * 3X5.D1[0] - PLL2 Control Voltage Measurement Enable Bit */ + ViaCrtcMask(hwp, 0xD1, 0x00, 0xE1); + + /* Disable DVI test mode. */ + /* 3X5.D5[7] - PD1 Enable Selection + * 1: Select by power flag + * 0: By register + * 3X5.D5[5] - DVI Testing Mode Enable + * 3X5.D5[4] - DVI Testing Format Selection + * 0: Half cycle + * 1: LFSR mode */ + ViaCrtcMask(hwp, 0xD5, 0x00, 0xB0); + + /* Disable DVI sense interrupt. */ + /* 3C5.2B[7] - DVI Sense Interrupt Enable + * 0: Disable + * 1: Enable */ + ViaSeqMask(hwp, 0x2B, 0x00, 0x80); + + /* Clear DVI sense interrupt status. */ + /* 3C5.2B[6] - DVI Sense Interrupt Status + * (This bit has a RW1C attribute.) */ + ViaSeqMask(hwp, 0x2B, 0x40, 0x40); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting viaTMDSInitRegisters.\n")); +} + +/* + * Sets the polarity of horizontal synchronization and vertical + * synchronization. + */ +static void +viaTMDSSetSyncPolarity(ScrnInfoPtr pScrn, DisplayModePtr mode) +{ + vgaHWPtr hwp = VGAHWPTR(pScrn); + CARD8 cr97; + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered viaTMDSSetSyncPolarity.\n")); + + /* 3X5.97[6] - DVI (TMDS) VSYNC Polarity + * 0: Positive + * 1: Negative + * 3X5.97[5] - DVI (TMDS) HSYNC Polarity + * 0: Positive + * 1: Negative */ + cr97 = hwp->readCrtc(hwp, 0x97); + if (mode->Flags & V_NHSYNC) { + cr97 |= 0x20; + } else { + cr97 &= (~0x20); + } + + if (mode->Flags & V_NVSYNC) { + cr97 |= 0x40; + } else { + cr97 &= (~0x40); + } + + ViaCrtcMask(hwp, 0x97, cr97, 0x60); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting viaTMDSSetSyncPolarity.\n")); +} + +/* + * Sets IGA1 or IGA2 as the display output source for VIA Technologies IGP + * integrated TMDS transmitter. + */ +static void +viaTMDSSetSource(ScrnInfoPtr pScrn, CARD8 displaySource) +{ + vgaHWPtr hwp = VGAHWPTR(pScrn); + CARD8 temp = displaySource; + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered viaTMDSSetSource.\n")); + + /* Set integrated TMDS transmitter display output source. + * The integrated TMDS transmitter appears to utilize LVDS1's data + * source selection bit (3X5.99[4]). */ + /* 3X5.99[4] - LVDS Channel1 Data Source Selection + * 0: Primary Display + * 1: Secondary Display */ + ViaCrtcMask(hwp, 0x99, temp << 4, 0x10); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Integrated TMDS Transmitter Display Output Source: IGA%d\n", + (temp & 0x01) + 1); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting viaTMDSSetSource.\n")); +} + +/* + * Returns TMDS receiver detection state for VIA Technologies IGP + * integrated TMDS transmitter. + */ +static Bool +viaTMDSSense(ScrnInfoPtr pScrn) +{ + vgaHWPtr hwp = VGAHWPTR(pScrn); + VIAPtr pVia = VIAPTR(pScrn); + CARD8 tmdsReceiverDetected = 0x00; + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered viaTMDSSense.\n")); + + /* For now, faking DVI detection.*/ + tmdsReceiverDetected = 0x01; + + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Integrated TMDS transmitter %s a TMDS receiver.\n", + (tmdsReceiverDetected & 0x01) ? "detected" : "did not detect"); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting viaTMDSSense.\n")); + return tmdsReceiverDetected; +} + +static void +viaTMDSPower(ScrnInfoPtr pScrn, Bool powerState) +{ + vgaHWPtr hwp = VGAHWPTR(pScrn); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered viaTMDSPower.\n")); + + if (powerState) { + /* 3X5.91[7] - Software Direct On / Off Display Period + in the Panel Path + 0: On + 1: Off */ + ViaCrtcMask(hwp, 0x91, 0x00, 0x80); + + /* 3X5.91[0] - Hardware or Software Control Power Sequence + 1: Software Control */ + ViaCrtcMask(hwp, 0x91, 0x01, 0x01); + + usleep(TD0); + + /* 3X5.91[4] - Software VDD On + 0: Off + 1: On */ + ViaCrtcMask(hwp, 0x91, 0x10, 0x10); + + usleep(TD1); + + /* 3X5.91[3] - Software Data On + 0: Off + 1: On */ + ViaCrtcMask(hwp, 0x91, 0x08, 0x08); + + /* 3X5.D2[3] - Power Down (Active High) for DVI + * 0: TMDS power on + * 1: TMDS power down */ + ViaCrtcMask(hwp, 0xD2, 0x00, 0x08); + } else { + ViaCrtcMask(hwp, 0xD2, 0x08, 0x08); + + ViaCrtcMask(hwp, 0x91, 0x00, 0x08); + + usleep(TD1); + + ViaCrtcMask(hwp, 0x91, 0x00, 0x10); + } + + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Integrated TMDS (DVI) Power: %s\n", + powerState ? "On" : "Off"); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting viaTMDSPower.\n")); +} + +static void +viaTMDSIOPadSetting(ScrnInfoPtr pScrn, Bool ioPadOn) +{ + vgaHWPtr hwp = VGAHWPTR(pScrn); + VIAPtr pVia = VIAPTR(pScrn); + CARD8 sr12, sr13, sr5a; + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered viaTMDSIOPadSetting.\n")); + + if ((pVia->Chipset == VIA_CX700) + || (pVia->Chipset == VIA_VX800) + || (pVia->Chipset == VIA_VX855) + || (pVia->Chipset == VIA_VX900)) { + + sr5a = hwp->readSeq(hwp, 0x5A); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "SR5A: 0x%02X\n", sr5a)); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Setting 3C5.5A[0] to 0.\n")); + ViaSeqMask(hwp, 0x5A, sr5a & 0xFE, 0x01); + } + + sr12 = hwp->readSeq(hwp, 0x12); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "SR12: 0x%02X\n", sr12)); + sr13 = hwp->readSeq(hwp, 0x13); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "SR13: 0x%02X\n", sr13)); + + switch (pVia->Chipset) { + case VIA_CX700: + case VIA_VX800: + case VIA_VX855: + case VIA_VX900: + /* 3C5.13[7:6] - DVP1D15 and DVP1D14 pin strappings + * 00: LVDS1 + LVDS2 + * 01: DVI + LVDS2 + * 10: Dual LVDS (LVDS1 + LVDS2 used + * simultaneously) + * 11: DVI only */ + if ((((~(sr13 & 0x80)) && (sr13 & 0x40)) + || ((sr13 & 0x80) && (sr13 & 0x40))) + || (pVia->isVIANanoBook)) { + + viaLVDS1SetIOPadSetting(pScrn, ioPadOn ? 0x03 : 0x00); + } + + break; + default: + break; + } + + if ((pVia->Chipset == VIA_CX700) + || (pVia->Chipset == VIA_VX800) + || (pVia->Chipset == VIA_VX855) + || (pVia->Chipset == VIA_VX900)) { + + hwp->writeSeq(hwp, 0x5A, sr5a); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Restoring 3C5.5A[0].\n")); + } + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting viaTMDSIOPadSetting.\n")); +} + +void +viaExtTMDSSetDisplaySource(ScrnInfoPtr pScrn, CARD8 displaySource) +{ + vgaHWPtr hwp = VGAHWPTR(pScrn); + VIAPtr pVia = VIAPTR(pScrn); + CARD8 sr12, sr13, sr5a; + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered viaExtTMDSSetDisplaySource.\n")); + + if ((pVia->Chipset == VIA_CX700) + || (pVia->Chipset == VIA_VX800) + || (pVia->Chipset == VIA_VX855) + || (pVia->Chipset == VIA_VX900)) { + + sr5a = hwp->readSeq(hwp, 0x5A); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "SR5A: 0x%02X\n", sr5a)); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Setting 3C5.5A[0] to 0.\n")); + ViaSeqMask(hwp, 0x5A, sr5a & 0xFE, 0x01); + } + + sr12 = hwp->readSeq(hwp, 0x12); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "SR12: 0x%02X\n", sr12)); + sr13 = hwp->readSeq(hwp, 0x13); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "SR13: 0x%02X\n", sr13)); + switch (pVia->Chipset) { + case VIA_CLE266: + /* 3C5.12[5] - FPD18 pin strapping + * 0: DIP0 (Digital Interface Port 0) is used by + * a TMDS transmitter (DVI) + * 1: DIP0 (Digital Interface Port 0) is used by + * a TV encoder */ + if (!(sr12 & 0x20)) { + viaDIP0SetDisplaySource(pScrn, displaySource); + } else { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "DIP0 was not set up for " + "TMDS transmitter use.\n"); + } + + break; + case VIA_KM400: + case VIA_K8M800: + case VIA_PM800: + case VIA_P4M800PRO: + /* 3C5.13[3] - DVP0D8 pin strapping + * 0: AGP pins are used for AGP + * 1: AGP pins are used by FPDP + * (Flat Panel Display Port) + * 3C5.12[6] - DVP0D6 pin strapping + * 0: Disable DVP0 (Digital Video Port 0) + * 1: Enable DVP0 (Digital Video Port 0) + * 3C5.12[5] - DVP0D5 pin strapping + * 0: DVP0 is used by a TMDS transmitter (DVI) + * 1: DVP0 is used by a TV encoder + * 3C5.12[4] - DVP0D4 pin strapping + * 0: Dual 12-bit FPDP (Flat Panel Display Port) + * 1: 24-bit FPDP (Flat Panel Display Port) */ + if ((sr12 & 0x40) && (!(sr12 & 0x20))) { + viaDVP0SetDisplaySource(pScrn, displaySource); + } else if ((sr13 & 0x08) && (!(sr12 & 0x10))) { + viaDFPLowSetDisplaySource(pScrn, displaySource); + } else { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "None of the external ports were set up for " + "TMDS transmitter use.\n"); + } + + break; + case VIA_P4M890: + case VIA_K8M890: + case VIA_P4M900: + /* 3C5.12[6] - FPD6 pin strapping + * 0: Disable DVP0 (Digital Video Port 0) + * 1: Enable DVP0 (Digital Video Port 0) + * 3C5.12[5] - FPD5 pin strapping + * 0: DVP0 is used by a TMDS transmitter (DVI) + * 1: DVP0 is used by a TV encoder */ + if ((sr12 & 0x40) && (!(sr12 & 0x20))) { + viaDVP0SetDisplaySource(pScrn, displaySource); + } else if (!(sr12 & 0x10)) { + viaDFPLowSetDisplaySource(pScrn, displaySource); + } else { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "None of the external ports were set up for " + "TMDS transmitter use.\n"); + } + + break; + case VIA_CX700: + case VIA_VX800: + case VIA_VX855: + case VIA_VX900: + /* 3C5.13[6] - DVP1 DVP / capture port selection + * 0: DVP1 is used as a DVP (Digital Video Port) + * 1: DVP1 is used as a capture port + */ + if (!(sr13 & 0x40)) { + viaDVP1SetDisplaySource(pScrn, displaySource); + } else { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "DVP1 is not set up for TMDS " + "transmitter use.\n"); + } + + break; + default: + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "Unrecognized IGP for " + "TMDS transmitter use.\n"); + break; + } + + if ((pVia->Chipset == VIA_CX700) + || (pVia->Chipset == VIA_VX800) + || (pVia->Chipset == VIA_VX855) + || (pVia->Chipset == VIA_VX900)) { + + hwp->writeSeq(hwp, 0x5A, sr5a); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Restoring 3C5.5A[0].\n")); + } + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting viaExtTMDSSetDisplaySource.\n")); +} + +void +viaExtTMDSEnableIOPads(ScrnInfoPtr pScrn, CARD8 ioPadState) +{ + + vgaHWPtr hwp = VGAHWPTR(pScrn); + VIAPtr pVia = VIAPTR(pScrn); + CARD8 sr12, sr13, sr5a; + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered viaExtTMDSEnableIOPads.\n")); + + if ((pVia->Chipset == VIA_CX700) + || (pVia->Chipset == VIA_VX800) + || (pVia->Chipset == VIA_VX855) + || (pVia->Chipset == VIA_VX900)) { + + sr5a = hwp->readSeq(hwp, 0x5A); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "SR5A: 0x%02X\n", sr5a)); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Setting 3C5.5A[0] to 0.\n")); + ViaSeqMask(hwp, 0x5A, sr5a & 0xFE, 0x01); + } + + sr12 = hwp->readSeq(hwp, 0x12); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "SR12: 0x%02X\n", sr12)); + sr13 = hwp->readSeq(hwp, 0x13); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "SR13: 0x%02X\n", sr13)); + switch (pVia->Chipset) { + case VIA_CLE266: + /* 3C5.12[5] - FPD18 pin strapping + * 0: DIP0 (Digital Interface Port 0) is used by + * a TMDS transmitter (DVI) + * 1: DIP0 (Digital Interface Port 0) is used by + * a TV encoder */ + if (!(sr12 & 0x20)) { + viaDIP0EnableIOPads(pScrn, ioPadState); + } else { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "DIP0 was not set up for " + "TMDS transmitter use.\n"); + } + + break; + case VIA_KM400: + case VIA_K8M800: + case VIA_PM800: + case VIA_P4M800PRO: + /* 3C5.13[3] - DVP0D8 pin strapping + * 0: AGP pins are used for AGP + * 1: AGP pins are used by FPDP + * (Flat Panel Display Port) + * 3C5.12[6] - DVP0D6 pin strapping + * 0: Disable DVP0 (Digital Video Port 0) + * 1: Enable DVP0 (Digital Video Port 0) + * 3C5.12[5] - DVP0D5 pin strapping + * 0: DVP0 is used by a TMDS transmitter (DVI) + * 1: DVP0 is used by a TV encoder + * 3C5.12[4] - DVP0D4 pin strapping + * 0: Dual 12-bit FPDP (Flat Panel Display Port) + * 1: 24-bit FPDP (Flat Panel Display Port) */ + if ((sr12 & 0x40) && (!(sr12 & 0x20))) { + viaDVP0EnableIOPads(pScrn, ioPadState); + } else if ((sr13 & 0x08) && (!(sr12 & 0x10))) { + viaDFPLowEnableIOPads(pScrn, ioPadState); + } else { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "None of the external ports were set up for " + "TMDS transmitter use.\n"); + } + + break; + case VIA_P4M890: + case VIA_K8M890: + case VIA_P4M900: + /* 3C5.12[6] - FPD6 pin strapping + * 0: Disable DVP0 (Digital Video Port 0) + * 1: Enable DVP0 (Digital Video Port 0) + * 3C5.12[5] - FPD5 pin strapping + * 0: DVP0 is used by a TMDS transmitter (DVI) + * 1: DVP0 is used by a TV encoder */ + if ((sr12 & 0x40) && (!(sr12 & 0x20))) { + viaDVP0EnableIOPads(pScrn, ioPadState); + } else if (!(sr12 & 0x10)) { + viaDFPLowEnableIOPads(pScrn, ioPadState); + } else { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "None of the external ports were set up for " + "TMDS transmitter use.\n"); + } + + break; + case VIA_CX700: + case VIA_VX800: + case VIA_VX855: + case VIA_VX900: + /* 3C5.13[6] - DVP1 DVP / capture port selection + * 0: DVP1 is used as a DVP (Digital Video Port) + * 1: DVP1 is used as a capture port + */ + if (!(sr13 & 0x40)) { + viaDVP1EnableIOPads(pScrn, ioPadState); + } else { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "DVP1 is not set up for TMDS " + "transmitter use.\n"); + } + + break; + default: + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "Unrecognized IGP for " + "TMDS transmitter use.\n"); + break; + } + + if ((pVia->Chipset == VIA_CX700) + || (pVia->Chipset == VIA_VX800) + || (pVia->Chipset == VIA_VX855) + || (pVia->Chipset == VIA_VX900)) { + + hwp->writeSeq(hwp, 0x5A, sr5a); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Restoring 3C5.5A[0].\n")); + } + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting viaExtTMDSEnableIOPads.\n")); +} + +void +viaExtTMDSSetClockDriveStrength(ScrnInfoPtr pScrn, CARD8 clockDriveStrength) +{ + vgaHWPtr hwp = VGAHWPTR(pScrn); + VIAPtr pVia = VIAPTR(pScrn); + CARD8 sr12, sr13, sr5a; + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered viaExtTMDSSetClockDriveStrength.\n")); + + if ((pVia->Chipset == VIA_CX700) + || (pVia->Chipset == VIA_VX800) + || (pVia->Chipset == VIA_VX855) + || (pVia->Chipset == VIA_VX900)) { + + sr5a = hwp->readSeq(hwp, 0x5A); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "SR5A: 0x%02X\n", sr5a)); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Setting 3C5.5A[0] to 0.\n")); + ViaSeqMask(hwp, 0x5A, sr5a & 0xFE, 0x01); + } + + sr12 = hwp->readSeq(hwp, 0x12); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "SR12: 0x%02X\n", sr12)); + sr13 = hwp->readSeq(hwp, 0x13); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "SR13: 0x%02X\n", sr13)); + switch (pVia->Chipset) { + case VIA_CLE266: + /* 3C5.12[5] - FPD18 pin strapping + * 0: DIP0 (Digital Interface Port 0) is used by + * a TMDS transmitter (DVI) + * 1: DIP0 (Digital Interface Port 0) is used by + * a TV encoder */ + if (!(sr12 & 0x20)) { + viaDIP0SetClockDriveStrength(pScrn, clockDriveStrength); + } + + break; + case VIA_KM400: + case VIA_K8M800: + case VIA_PM800: + case VIA_P4M800PRO: + /* 3C5.12[6] - DVP0D6 pin strapping + * 0: Disable DVP0 (Digital Video Port 0) + * 1: Enable DVP0 (Digital Video Port 0) + * 3C5.12[5] - DVP0D5 pin strapping + * 0: DVP0 is used by a TMDS transmitter (DVI) + * 1: DVP0 is used by a TV encoder */ + if ((sr12 & 0x40) && (!(sr12 & 0x20))) { + viaDVP0SetClockDriveStrength(pScrn, clockDriveStrength); + } + + break; + case VIA_P4M890: + case VIA_K8M890: + case VIA_P4M900: + /* 3C5.12[6] - FPD6 pin strapping + * 0: Disable DVP0 (Digital Video Port 0) + * 1: Enable DVP0 (Digital Video Port 0) + * 3C5.12[5] - FPD5 pin strapping + * 0: DVP0 is used by a TMDS transmitter (DVI) + * 1: DVP0 is used by a TV encoder */ + if ((sr12 & 0x40) && (!(sr12 & 0x20))) { + viaDVP0SetClockDriveStrength(pScrn, clockDriveStrength); + } + + break; + case VIA_CX700: + case VIA_VX800: + case VIA_VX855: + case VIA_VX900: + /* 3C5.13[6] - DVP1 DVP / capture port selection + * 0: DVP1 is used as a DVP (Digital Video Port) + * 1: DVP1 is used as a capture port */ + if (!(sr13 & 0x40)) { + viaDVP1SetClockDriveStrength(pScrn, clockDriveStrength); + } + + break; + default: + break; + } + + if ((pVia->Chipset == VIA_CX700) + || (pVia->Chipset == VIA_VX800) + || (pVia->Chipset == VIA_VX855) + || (pVia->Chipset == VIA_VX900)) { + + hwp->writeSeq(hwp, 0x5A, sr5a); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Restoring 3C5.5A[0].\n")); + } + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting viaExtTMDSSetClockDriveStrength.\n")); +} + +void +viaExtTMDSSetDataDriveStrength(ScrnInfoPtr pScrn, CARD8 dataDriveStrength) +{ + vgaHWPtr hwp = VGAHWPTR(pScrn); + VIAPtr pVia = VIAPTR(pScrn); + CARD8 sr12, sr13, sr5a; + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered viaExtTMDSSetDataDriveStrength.\n")); + + if ((pVia->Chipset == VIA_CX700) + || (pVia->Chipset == VIA_VX800) + || (pVia->Chipset == VIA_VX855) + || (pVia->Chipset == VIA_VX900)) { + + sr5a = hwp->readSeq(hwp, 0x5A); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "SR5A: 0x%02X\n", sr5a)); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Setting 3C5.5A[0] to 0.\n")); + ViaSeqMask(hwp, 0x5A, sr5a & 0xFE, 0x01); + } + + sr12 = hwp->readSeq(hwp, 0x12); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "SR12: 0x%02X\n", sr12)); + sr13 = hwp->readSeq(hwp, 0x13); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "SR13: 0x%02X\n", sr13)); + switch (pVia->Chipset) { + case VIA_CLE266: + /* 3C5.12[5] - FPD18 pin strapping + * 0: DIP0 (Digital Interface Port 0) is used by + * a TMDS transmitter (DVI) + * 1: DIP0 (Digital Interface Port 0) is used by + * a TV encoder */ + if (!(sr12 & 0x20)) { + viaDIP0SetDataDriveStrength(pScrn, dataDriveStrength); + } + + break; + case VIA_KM400: + case VIA_K8M800: + case VIA_PM800: + case VIA_P4M800PRO: + /* 3C5.12[6] - DVP0D6 pin strapping + * 0: Disable DVP0 (Digital Video Port 0) + * 1: Enable DVP0 (Digital Video Port 0) + * 3C5.12[5] - DVP0D5 pin strapping + * 0: DVP0 is used by a TMDS transmitter (DVI) + * 1: DVP0 is used by a TV encoder */ + if ((sr12 & 0x40) && (!(sr12 & 0x20))) { + viaDVP0SetDataDriveStrength(pScrn, dataDriveStrength); + } + + break; + case VIA_P4M890: + case VIA_K8M890: + case VIA_P4M900: + /* 3C5.12[6] - FPD6 pin strapping + * 0: Disable DVP0 (Digital Video Port 0) + * 1: Enable DVP0 (Digital Video Port 0) + * 3C5.12[5] - FPD5 pin strapping + * 0: DVP0 is used by a TMDS transmitter (DVI) + * 1: DVP0 is used by a TV encoder */ + if ((sr12 & 0x40) && (!(sr12 & 0x20))) { + viaDVP0SetDataDriveStrength(pScrn, dataDriveStrength); + } + + break; + case VIA_CX700: + case VIA_VX800: + case VIA_VX855: + case VIA_VX900: + /* 3C5.13[6] - DVP1 DVP / capture port selection + * 0: DVP1 is used as a DVP (Digital Video Port) + * 1: DVP1 is used as a capture port */ + if (!(sr13 & 0x40)) { + viaDVP1SetDataDriveStrength(pScrn, dataDriveStrength); + } + + break; + default: + break; + } + + if ((pVia->Chipset == VIA_CX700) + || (pVia->Chipset == VIA_VX800) + || (pVia->Chipset == VIA_VX855) + || (pVia->Chipset == VIA_VX900)) { + + hwp->writeSeq(hwp, 0x5A, sr5a); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Restoring 3C5.5A[0].\n")); + } + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting viaExtTMDSSetDataDriveStrength.\n")); +} + +static void +via_tmds_create_resources(xf86OutputPtr output) +{ + ScrnInfoPtr pScrn = output->scrn; + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered via_tmds_create_resources.\n")); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting via_tmds_create_resources.\n")); +} + +static void +via_tmds_dpms(xf86OutputPtr output, int mode) +{ + ScrnInfoPtr pScrn = output->scrn; + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered via_tmds_dpms.\n")); + + switch (mode) { + case DPMSModeOn: + viaTMDSPower(pScrn, TRUE); + viaTMDSIOPadSetting(pScrn, TRUE); + break; + case DPMSModeStandby: + case DPMSModeSuspend: + case DPMSModeOff: + viaTMDSPower(pScrn, FALSE); + viaTMDSIOPadSetting(pScrn, FALSE); + break; + default: + break; + } + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting via_tmds_dpms.\n")); +} + +static void +via_tmds_save(xf86OutputPtr output) +{ + ScrnInfoPtr pScrn = output->scrn; + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered via_tmds_save.\n")); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting via_tmds_save.\n")); +} + +static void +via_tmds_restore(xf86OutputPtr output) +{ + ScrnInfoPtr pScrn = output->scrn; + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered via_tmds_restore.\n")); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting via_tmds_restore.\n")); +} + +static int +via_tmds_mode_valid(xf86OutputPtr output, DisplayModePtr pMode) +{ + ScrnInfoPtr pScrn = output->scrn; + int status; + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered via_tmds_mode_valid.\n")); + + if (!ViaModeDotClockTranslate(pScrn, pMode)) { + status = MODE_NOCLOCK; + } else { + status = MODE_OK; + } + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting via_tmds_mode_valid.\n")); + return status; +} + +static Bool +via_tmds_mode_fixup(xf86OutputPtr output, DisplayModePtr mode, + DisplayModePtr adjusted_mode) +{ + ScrnInfoPtr pScrn = output->scrn; + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered via_tmds_mode_fixup.\n")); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting via_tmds_mode_fixup.\n")); + return TRUE; +} + +static void +via_tmds_prepare(xf86OutputPtr output) +{ + ScrnInfoPtr pScrn = output->scrn; + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered via_tmds_prepare.\n")); + + viaTMDSPower(pScrn, FALSE); + viaTMDSIOPadSetting(pScrn, FALSE); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting via_tmds_prepare.\n")); +} + +static void +via_tmds_commit(xf86OutputPtr output) +{ + ScrnInfoPtr pScrn = output->scrn; + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered via_tmds_commit.\n")); + + viaTMDSPower(pScrn, TRUE); + viaTMDSIOPadSetting(pScrn, TRUE); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting via_tmds_commit.\n")); +} + +static void +via_tmds_mode_set(xf86OutputPtr output, DisplayModePtr mode, + DisplayModePtr adjusted_mode) +{ + ScrnInfoPtr pScrn = output->scrn; + drmmode_crtc_private_ptr iga = output->crtc->driver_private; + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered via_tmds_mode_set.\n")); + + /* Initialize VIA IGP integrated TMDS transmitter registers. */ + viaTMDSInitRegisters(pScrn); + + /* Set integrated TMDS transmitter synchronization polarity for + * both horizontal synchronization and vertical synchronization. */ + viaTMDSSetSyncPolarity(pScrn, adjusted_mode); + + if (output->crtc) { + viaTMDSSetSource(pScrn, iga->index ? 0x01 : 0x00); + } + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting via_tmds_mode_set.\n")); +} + +static xf86OutputStatus +via_tmds_detect(xf86OutputPtr output) +{ + xf86MonPtr mon; + xf86OutputStatus status = XF86OutputStatusDisconnected; + ScrnInfoPtr pScrn = output->scrn; + VIAPtr pVia = VIAPTR(pScrn); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered via_tmds_detect.\n")); + + /* Check for DVI presence by sensing the TMDS receiver connected + * to the integrated TMDS transmitter. */ + if (viaTMDSSense(pScrn)) { + + if (!pVia->pI2CBus2) { + goto exit; + } + + /* Assume that only I2C bus 2 is used for the DVI connected to the + * integrated TMDS transmitter. */ + if (!xf86I2CProbeAddress(pVia->pI2CBus2, 0xA0)) { + xf86DrvMsg(pScrn->scrnIndex, X_PROBED, + "I2C device on I2C Bus 2 does not support EDID.\n"); + goto exit; + } + + xf86DrvMsg(pScrn->scrnIndex, X_PROBED, + "Obtaining EDID for DVI.\n"); + + /* Since DVI presence was established, access the I2C bus, + * in order to obtain EDID from the monitor. */ + mon = xf86OutputGetEDID(output, pVia->pI2CBus2); + + /* Is the interface type digital? */ + if (mon && DIGITAL(mon->features.input_type)) { + status = XF86OutputStatusConnected; + xf86DrvMsg(pScrn->scrnIndex, X_PROBED, + "Detected a monitor connected to DVI.\n"); + xf86OutputSetEDID(output, mon); + } else { + xf86DrvMsg(pScrn->scrnIndex, X_PROBED, + "Could not obtain EDID from a monitor " + "connected to DVI.\n"); + } + } + +exit: + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting via_tmds_detect.\n")); + return status; +} + +#ifdef RANDR_12_INTERFACE +static Bool +via_tmds_set_property(xf86OutputPtr output, Atom property, + RRPropertyValuePtr value) +{ + ScrnInfoPtr pScrn = output->scrn; + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered via_tmds_set_property.\n")); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting via_tmds_set_property.\n")); + return TRUE; +} +#endif + +#ifdef RANDR_13_INTERFACE +static Bool +via_tmds_get_property(xf86OutputPtr output, Atom property) +{ + ScrnInfoPtr pScrn = output->scrn; + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered via_tmds_get_property.\n")); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting via_tmds_get_property.\n")); + return FALSE; +} +#endif + +static void +via_tmds_destroy(xf86OutputPtr output) +{ + ScrnInfoPtr pScrn = output->scrn; + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered via_tmds_destroy.\n")); + + if (output->driver_private) { + free(output->driver_private); + } + + output->driver_private = NULL; + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting via_tmds_destroy.\n")); +} + + + + +static const xf86OutputFuncsRec via_tmds_funcs = { + .create_resources = via_tmds_create_resources, + .dpms = via_tmds_dpms, + .save = via_tmds_save, + .restore = via_tmds_restore, + .mode_valid = via_tmds_mode_valid, + .mode_fixup = via_tmds_mode_fixup, + .prepare = via_tmds_prepare, + .commit = via_tmds_commit, + .mode_set = via_tmds_mode_set, + .detect = via_tmds_detect, + .get_modes = xf86OutputGetEDIDModes, +#ifdef RANDR_12_INTERFACE + .set_property = via_tmds_set_property, +#endif +#ifdef RANDR_13_INTERFACE + .get_property = via_tmds_get_property, +#endif + .destroy = via_tmds_destroy, +}; + + +Bool +viaTMDSInit(ScrnInfoPtr pScrn) +{ + xf86OutputPtr output; + vgaHWPtr hwp = VGAHWPTR(pScrn); + VIAPtr pVia = VIAPTR(pScrn); + VIATMDSRecPtr pVIATMDSRec = NULL; + CARD8 sr13, sr5a; + Bool status = FALSE; + char outputNameBuffer[32]; + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered viaTMDSInit.\n")); + + sr5a = hwp->readSeq(hwp, 0x5A); + ViaSeqMask(hwp, 0x5A, sr5a | 0x01, 0x01); + sr13 = hwp->readSeq(hwp, 0x13); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "SR13: 0x%02X\n", sr13)); + hwp->writeSeq(hwp, 0x5A, sr5a); + + /* 3C5.13[7:6] - Integrated LVDS / DVI Mode Select + * (DVP1D15-14 pin strapping) + * 00: LVDS1 + LVDS2 + * 01: DVI + LVDS2 + * 10: Dual LVDS Channel (High Resolution Panel) + * 11: One DVI only (decrease the clock jitter) */ + /* Check for DVI presence using pin strappings. + * VIA Technologies NanoBook reference design based products + * have their pin strappings set to a wrong setting to communicate + * the presence of DVI, so it requires special handling here. */ + if ((((~(sr13 & 0x80)) && (sr13 & 0x40)) + || ((sr13 & 0x80) && (sr13 & 0x40))) + || (pVia->isVIANanoBook)) { + + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Integrated TMDS transmitter found via pin strapping.\n"); + } else { + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Integrated TMDS transmitter not found.\n"); + goto exit; + } + + pVIATMDSRec = xnfcalloc(1, sizeof(VIATMDSRec)); + if (!pVIATMDSRec) { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "Failed to allocate working storage for integrated " + "TMDS transmitter.\n"); + goto exit; + } + + /* The code to dynamically designate the particular DVI (i.e., DVI-1, + * DVI-2, etc.) for xrandr was borrowed from xf86-video-r128 DDX. */ + sprintf(outputNameBuffer, "DVI-%d", (pVia->numberDVI + 1)); + output = xf86OutputCreate(pScrn, &via_tmds_funcs, outputNameBuffer); + if (!output) { + free(pVIATMDSRec); + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "Failed to allocate X Server display output record for " + "integrated TMDS transmitter.\n"); + goto exit; + } + + output->driver_private = pVIATMDSRec; + + /* Since there are two (2) display controllers registered with the + * X.Org Server and both IGA1 and IGA2 can handle DVI without any + * limitations, possible_crtcs should be set to 0x3 (0b11) so that + * either display controller can get assigned to handle DVI. */ + output->possible_crtcs = (1 << 1) | (1 << 0); + + output->possible_clones = 0; + output->interlaceAllowed = FALSE; + output->doubleScanAllowed = FALSE; + + pVia->numberDVI++; + status = TRUE; +exit: + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting viaTMDSInit.\n")); + return status; +} + +void +via_dvi_init(ScrnInfoPtr pScrn) +{ + VIAPtr pVia = VIAPTR(pScrn); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered via_dvi_init.\n")); + + if (!pVia->pI2CBus2 || !pVia->pI2CBus3) { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "I2C Bus 2 or I2C Bus 3 does not exist.\n"); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting via_dvi_init.\n")); + return; + } + + /* Check to see if we are dealing with the latest VIA chipsets. */ + if ((pVia->Chipset == VIA_CX700) + || (pVia->Chipset == VIA_VX800) + || (pVia->Chipset == VIA_VX855) + || (pVia->Chipset == VIA_VX900)) { + + if (!viaTMDSInit(pScrn)) { + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Integrated TMDS transmitter for DVI not found.\n"); + } else { + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Integrated TMDS transmitter for DVI was " + "initialized successfully.\n"); + } + } + + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Probing I2C Bus 2 for VT1632.\n"); + if (!viaVT1632Init(pScrn, pVia->pI2CBus2)) { + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "I2C Bus 2 was not initialized for DVI use.\n"); + } else { + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "VT1632 attached to I2C Bus 2 was initialized " + "successfully for DVI use.\n"); + } + + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Probing I2C Bus 3 for VT1632.\n"); + if (!viaVT1632Init(pScrn, pVia->pI2CBus3)) { + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "I2C Bus 3 was not initialized for DVI use.\n"); + } else { + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "VT1632 attached to I2C Bus 3 was initialized " + "successfully for DVI use.\n"); + } + + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Probing I2C Bus 2 for SiI 164.\n"); + if (!viaSiI164Init(pScrn, pVia->pI2CBus2)) { + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "I2C Bus 2 was not initialized for DVI use.\n"); + } else { + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "SiI 164 attached to I2C Bus 2 was initialized " + "successfully for DVI use.\n"); + } + + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Probing I2C Bus 3 for SiI 164.\n"); + if (!viaSiI164Init(pScrn, pVia->pI2CBus3)) { + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "I2C Bus 3 was not initialized for DVI use.\n"); + } else { + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "SiI 164 attached to I2C Bus 3 was initialized " + "successfully for DVI use.\n"); + } + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting via_dvi_init.\n")); +} diff -Nru xserver-xorg-video-openchrome-0.5.0/src/via_tv.c xserver-xorg-video-openchrome-0.6.0/src/via_tv.c --- xserver-xorg-video-openchrome-0.5.0/src/via_tv.c 1970-01-01 00:00:00.000000000 +0000 +++ xserver-xorg-video-openchrome-0.6.0/src/via_tv.c 2017-02-26 23:53:37.000000000 +0000 @@ -0,0 +1,898 @@ +/* + * Copyright 2005-2016 The OpenChrome Project + * [https://www.freedesktop.org/wiki/Openchrome] + * Copyright 2004-2005 The Unichrome Project [unichrome.sf.net] + * Copyright 1998-2003 VIA Technologies, Inc. All Rights Reserved. + * Copyright 2001-2003 S3 Graphics, Inc. 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 + * 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. + */ + +/* + * via_tv.c + * + * Handles the initialization and management of TV output related + * resources. + * + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "via_driver.h" +#include + +static void +viaTVSetDisplaySource(ScrnInfoPtr pScrn, CARD8 displaySource) +{ + + vgaHWPtr hwp = VGAHWPTR(pScrn); + VIAPtr pVia = VIAPTR(pScrn); + CARD8 sr12, sr13, sr5a; + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered viaTVSetDisplaySource.\n")); + + if ((pVia->Chipset == VIA_CX700) + || (pVia->Chipset == VIA_VX800) + || (pVia->Chipset == VIA_VX855) + || (pVia->Chipset == VIA_VX900)) { + + sr5a = hwp->readSeq(hwp, 0x5A); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "SR5A: 0x%02X\n", sr5a)); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Setting 3C5.5A[0] to 0.\n")); + ViaSeqMask(hwp, 0x5A, sr5a & 0xFE, 0x01); + } + + sr12 = hwp->readSeq(hwp, 0x12); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "SR12: 0x%02X\n", sr12)); + sr13 = hwp->readSeq(hwp, 0x13); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "SR13: 0x%02X\n", sr13)); + switch (pVia->Chipset) { + case VIA_CLE266: + /* 3C5.12[5] - FPD18 pin strapping + * 0: DIP0 (Digital Interface Port 0) is used by + * a TMDS transmitter (DVI) + * 1: DIP0 (Digital Interface Port 0) is used by + * a TV encoder */ + if (sr12 & 0x20) { + viaDIP0SetDisplaySource(pScrn, displaySource); + } else { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "DIP0 was not set up for " + "an external TV encoder use.\n"); + } + + break; + case VIA_KM400: + case VIA_K8M800: + case VIA_PM800: + case VIA_P4M800PRO: + /* 3C5.13[3] - DVP0D8 pin strapping + * 0: AGP pins are used for AGP + * 1: AGP pins are used by FPDP + * (Flat Panel Display Port) + * 3C5.12[6] - DVP0D6 pin strapping + * 0: Disable DVP0 (Digital Video Port 0) + * 1: Enable DVP0 (Digital Video Port 0) + * 3C5.12[5] - DVP0D5 pin strapping + * 0: DVP0 is used by a TMDS transmitter (DVI) + * 1: DVP0 is used by a TV encoder + * 3C5.12[4] - DVP0D4 pin strapping + * 0: Dual 12-bit FPDP (Flat Panel Display Port) + * 1: 24-bit FPDP (Flat Panel Display Port) */ + if ((sr12 & 0x40) && (sr12 & 0x20)) { + viaDVP0SetDisplaySource(pScrn, displaySource); + } else if ((sr13 & 0x08) && (!(sr12 & 0x10))) { + viaDFPLowSetDisplaySource(pScrn, displaySource); + } else if (sr13 & 0x08) { + viaDVP1SetDisplaySource(pScrn, displaySource); + } else { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "None of the external ports were set up for " + "external TV encoder use.\n"); + } + + break; + case VIA_P4M890: + case VIA_K8M890: + case VIA_P4M900: + /* 3C5.12[6] - FPD6 pin strapping + * 0: Disable DVP0 (Digital Video Port 0) + * 1: Enable DVP0 (Digital Video Port 0) + * 3C5.12[5] - FPD5 pin strapping + * 0: DVP0 is used by a TMDS transmitter (DVI) + * 1: DVP0 is used by a TV encoder + * 3C5.12[4] - FPD4 pin strapping + * 0: Dual 12-bit FPDP (Flat Panel Display Port) + * 1: 24-bit FPDP (Flat Panel Display Port) */ + if ((sr12 & 0x40) && (sr12 & 0x20) && (!(sr12 & 0x10))) { + viaDVP0SetDisplaySource(pScrn, displaySource); + } else { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "Unrecognized external TV encoder use.\n" + "Contact the developer for assistance.\n"); + } + + break; + case VIA_CX700: + case VIA_VX800: + case VIA_VX855: + case VIA_VX900: + /* 3C5.13[6] - DVP1 DVP / capture port selection + * 0: DVP1 is used as a DVP (Digital Video Port) + * 1: DVP1 is used as a capture port + */ + if (!(sr13 & 0x40)) { + viaDVP1SetDisplaySource(pScrn, displaySource); + } else { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "DVP1 is not set up for external TV " + "encoder use.\n"); + } + + break; + default: + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "Unrecognized IGP for " + "an external TV encoder use.\n"); + break; + } + + if ((pVia->Chipset == VIA_CX700) + || (pVia->Chipset == VIA_VX800) + || (pVia->Chipset == VIA_VX855) + || (pVia->Chipset == VIA_VX900)) { + + hwp->writeSeq(hwp, 0x5A, sr5a); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Restoring 3C5.5A[0].\n")); + } + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting viaTVSetDisplaySource.\n")); +} + +static void +viaTVEnableIOPads(ScrnInfoPtr pScrn, CARD8 ioPadState) +{ + vgaHWPtr hwp = VGAHWPTR(pScrn); + VIAPtr pVia = VIAPTR(pScrn); + CARD8 sr12, sr13, sr5a; + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered viaTVEnableIOPads.\n")); + + if ((pVia->Chipset == VIA_CX700) + || (pVia->Chipset == VIA_VX800) + || (pVia->Chipset == VIA_VX855) + || (pVia->Chipset == VIA_VX900)) { + + sr5a = hwp->readSeq(hwp, 0x5A); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "SR5A: 0x%02X\n", sr5a)); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Setting 3C5.5A[0] to 0.\n")); + ViaSeqMask(hwp, 0x5A, sr5a & 0xFE, 0x01); + } + + sr12 = hwp->readSeq(hwp, 0x12); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "SR12: 0x%02X\n", sr12)); + sr13 = hwp->readSeq(hwp, 0x13); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "SR13: 0x%02X\n", sr13)); + switch (pVia->Chipset) { + case VIA_CLE266: + /* 3C5.12[5] - FPD18 pin strapping + * 0: DIP0 (Digital Interface Port 0) is used by + * a TMDS transmitter (DVI) + * 1: DIP0 (Digital Interface Port 0) is used by + * a TV encoder */ + if (sr12 & 0x20) { + viaDIP0EnableIOPads(pScrn, ioPadState); + } else { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "DIP0 is not set up for " + "an external TV encoder use.\n"); + } + + break; + case VIA_KM400: + case VIA_K8M800: + case VIA_PM800: + case VIA_P4M800PRO: + /* 3C5.13[3] - DVP0D8 pin strapping + * 0: AGP pins are used for AGP + * 1: AGP pins are used by FPDP + * (Flat Panel Display Port) + * 3C5.12[6] - DVP0D6 pin strapping + * 0: Disable DVP0 (Digital Video Port 0) + * 1: Enable DVP0 (Digital Video Port 0) + * 3C5.12[5] - DVP0D5 pin strapping + * 0: DVP0 is used by a TMDS transmitter (DVI) + * 1: DVP0 is used by a TV encoder + * 3C5.12[4] - DVP0D4 pin strapping + * 0: Dual 12-bit FPDP (Flat Panel Display Port) + * 1: 24-bit FPDP (Flat Panel Display Port) */ + if ((sr12 & 0x40) && (sr12 & 0x20)) { + viaDVP0EnableIOPads(pScrn, ioPadState); + } else if ((sr13 & 0x08) && (!(sr12 & 0x10))) { + viaDFPLowEnableIOPads(pScrn, ioPadState); + } else if (sr13 & 0x08) { + viaDVP1EnableIOPads(pScrn, ioPadState); + } else { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "None of the external ports were set up for " + "external TV encoder use.\n"); + } + + break; + case VIA_P4M890: + case VIA_K8M890: + case VIA_P4M900: + /* 3C5.12[6] - FPD6 pin strapping + * 0: Disable DVP0 (Digital Video Port 0) + * 1: Enable DVP0 (Digital Video Port 0) + * 3C5.12[5] - FPD5 pin strapping + * 0: DVP0 is used by a TMDS transmitter (DVI) + * 1: DVP0 is used by a TV encoder + * 3C5.12[4] - FPD4 pin strapping + * 0: Dual 12-bit FPDP (Flat Panel Display Port) + * 1: 24-bit FPDP (Flat Panel Display Port) */ + if ((sr12 & 0x40) && (sr12 & 0x20) && (!(sr12 & 0x10))) { + viaDVP0EnableIOPads(pScrn, ioPadState); + } else { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "Unrecognized external TV encoder use.\n" + "Contact the developer for assistance.\n"); + } + + break; + case VIA_CX700: + case VIA_VX800: + case VIA_VX855: + case VIA_VX900: + /* 3C5.13[6] - DVP1 DVP / capture port selection + * 0: DVP1 is used as a DVP (Digital Video Port) + * 1: DVP1 is used as a capture port + */ + if (!(sr13 & 0x40)) { + viaDVP1EnableIOPads(pScrn, ioPadState); + } else { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "DVP1 is not set up for external TV " + "encoder use.\n"); + } + + break; + default: + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "Unrecognized IGP for " + "an external TV encoder use.\n"); + break; + } + + if ((pVia->Chipset == VIA_CX700) + || (pVia->Chipset == VIA_VX800) + || (pVia->Chipset == VIA_VX855) + || (pVia->Chipset == VIA_VX900)) { + + hwp->writeSeq(hwp, 0x5A, sr5a); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Restoring 3C5.5A[0].\n")); + } + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting viaTVEnableIOPads.\n")); +} + +static void +viaTVSetClockDriveStrength(ScrnInfoPtr pScrn, CARD8 clockDriveStrength) +{ + vgaHWPtr hwp = VGAHWPTR(pScrn); + VIAPtr pVia = VIAPTR(pScrn); + CARD8 sr12, sr13, sr5a; + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered viaTVSetClockDriveStrength.\n")); + + if ((pVia->Chipset == VIA_CX700) + || (pVia->Chipset == VIA_VX800) + || (pVia->Chipset == VIA_VX855) + || (pVia->Chipset == VIA_VX900)) { + + sr5a = hwp->readSeq(hwp, 0x5A); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "SR5A: 0x%02X\n", sr5a)); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Setting 3C5.5A[0] to 0.\n")); + ViaSeqMask(hwp, 0x5A, sr5a & 0xFE, 0x01); + } + + sr12 = hwp->readSeq(hwp, 0x12); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "SR12: 0x%02X\n", sr12)); + sr13 = hwp->readSeq(hwp, 0x13); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "SR13: 0x%02X\n", sr13)); + switch (pVia->Chipset) { + case VIA_CLE266: + /* 3C5.12[5] - FPD18 pin strapping + * 0: DIP0 (Digital Interface Port 0) is used by + * a TMDS transmitter (DVI) + * 1: DIP0 (Digital Interface Port 0) is used by + * a TV encoder */ + if (sr12 & 0x20) { + viaDIP0SetClockDriveStrength(pScrn, clockDriveStrength); + } + + break; + case VIA_KM400: + case VIA_K8M800: + case VIA_PM800: + case VIA_P4M800PRO: + /* 3C5.13[3] - DVP0D8 pin strapping + * 0: AGP pins are used for AGP + * 1: AGP pins are used by FPDP + * (Flat Panel Display Port) + * 3C5.12[6] - DVP0D6 pin strapping + * 0: Disable DVP0 (Digital Video Port 0) + * 1: Enable DVP0 (Digital Video Port 0) + * 3C5.12[5] - DVP0D5 pin strapping + * 0: DVP0 is used by a TMDS transmitter (DVI) + * 1: DVP0 is used by a TV encoder + * 3C5.12[4] - DVP0D4 pin strapping + * 0: Dual 12-bit FPDP (Flat Panel Display Port) + * 1: 24-bit FPDP (Flat Panel Display Port) */ + if ((sr12 & 0x40) && (sr12 & 0x20)) { + viaDVP0SetClockDriveStrength(pScrn, clockDriveStrength); + } else if ((sr13 & 0x08) && (!(sr12 & 0x10))) { + } else if (sr13 & 0x08) { + viaDVP1SetClockDriveStrength(pScrn, clockDriveStrength); + } + + break; + case VIA_P4M890: + case VIA_K8M890: + case VIA_P4M900: + /* 3C5.12[6] - FPD6 pin strapping + * 0: Disable DVP0 (Digital Video Port 0) + * 1: Enable DVP0 (Digital Video Port 0) + * 3C5.12[5] - FPD5 pin strapping + * 0: DVP0 is used by a TMDS transmitter (DVI) + * 1: DVP0 is used by a TV encoder + * 3C5.12[4] - FPD4 pin strapping + * 0: Dual 12-bit FPDP (Flat Panel Display Port) + * 1: 24-bit FPDP (Flat Panel Display Port) */ + if ((sr12 & 0x40) && (sr12 & 0x20) && (!(sr12 & 0x10))) { + viaDVP0SetClockDriveStrength(pScrn, clockDriveStrength); + } + + break; + case VIA_CX700: + case VIA_VX800: + case VIA_VX855: + case VIA_VX900: + /* 3C5.13[6] - DVP1 DVP / capture port selection + * 0: DVP1 is used as a DVP (Digital Video Port) + * 1: DVP1 is used as a capture port */ + if (!(sr13 & 0x40)) { + viaDVP1SetClockDriveStrength(pScrn, clockDriveStrength); + } + + break; + default: + break; + } + + if ((pVia->Chipset == VIA_CX700) + || (pVia->Chipset == VIA_VX800) + || (pVia->Chipset == VIA_VX855) + || (pVia->Chipset == VIA_VX900)) { + + hwp->writeSeq(hwp, 0x5A, sr5a); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Restoring 3C5.5A[0].\n")); + } + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting viaTVSetClockDriveStrength.\n")); +} + +static void +viaTVSetDataDriveStrength(ScrnInfoPtr pScrn, CARD8 dataDriveStrength) +{ + vgaHWPtr hwp = VGAHWPTR(pScrn); + VIAPtr pVia = VIAPTR(pScrn); + CARD8 sr12, sr13, sr5a; + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered viaTVSetDataDriveStrength.\n")); + + if ((pVia->Chipset == VIA_CX700) + || (pVia->Chipset == VIA_VX800) + || (pVia->Chipset == VIA_VX855) + || (pVia->Chipset == VIA_VX900)) { + + sr5a = hwp->readSeq(hwp, 0x5A); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "SR5A: 0x%02X\n", sr5a)); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Setting 3C5.5A[0] to 0.\n")); + ViaSeqMask(hwp, 0x5A, sr5a & 0xFE, 0x01); + } + + sr12 = hwp->readSeq(hwp, 0x12); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "SR12: 0x%02X\n", sr12)); + sr13 = hwp->readSeq(hwp, 0x13); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "SR13: 0x%02X\n", sr13)); + switch (pVia->Chipset) { + case VIA_CLE266: + /* 3C5.12[5] - FPD18 pin strapping + * 0: DIP0 (Digital Interface Port 0) is used by + * a TMDS transmitter (DVI) + * 1: DIP0 (Digital Interface Port 0) is used by + * a TV encoder */ + if (sr12 & 0x20) { + viaDIP0SetDataDriveStrength(pScrn, dataDriveStrength); + } + + break; + case VIA_KM400: + case VIA_K8M800: + case VIA_PM800: + case VIA_P4M800PRO: + /* 3C5.13[3] - DVP0D8 pin strapping + * 0: AGP pins are used for AGP + * 1: AGP pins are used by FPDP + * (Flat Panel Display Port) + * 3C5.12[6] - DVP0D6 pin strapping + * 0: Disable DVP0 (Digital Video Port 0) + * 1: Enable DVP0 (Digital Video Port 0) + * 3C5.12[5] - DVP0D5 pin strapping + * 0: DVP0 is used by a TMDS transmitter (DVI) + * 1: DVP0 is used by a TV encoder + * 3C5.12[4] - DVP0D4 pin strapping + * 0: Dual 12-bit FPDP (Flat Panel Display Port) + * 1: 24-bit FPDP (Flat Panel Display Port) */ + if ((sr12 & 0x40) && (sr12 & 0x20)) { + viaDVP0SetDataDriveStrength(pScrn, dataDriveStrength); + } else if ((sr13 & 0x08) && (!(sr12 & 0x10))) { + } else if (sr13 & 0x08) { + viaDVP1SetDataDriveStrength(pScrn, dataDriveStrength); + } + + break; + case VIA_P4M890: + case VIA_K8M890: + case VIA_P4M900: + /* 3C5.12[6] - FPD6 pin strapping + * 0: Disable DVP0 (Digital Video Port 0) + * 1: Enable DVP0 (Digital Video Port 0) + * 3C5.12[5] - FPD5 pin strapping + * 0: DVP0 is used by a TMDS transmitter (DVI) + * 1: DVP0 is used by a TV encoder + * 3C5.12[4] - FPD4 pin strapping + * 0: Dual 12-bit FPDP (Flat Panel Display Port) + * 1: 24-bit FPDP (Flat Panel Display Port) */ + if ((sr12 & 0x40) && (sr12 & 0x20) && (!(sr12 & 0x10))) { + viaDVP0SetDataDriveStrength(pScrn, dataDriveStrength); + } + + break; + case VIA_CX700: + case VIA_VX800: + case VIA_VX855: + case VIA_VX900: + /* 3C5.13[6] - DVP1 DVP / capture port selection + * 0: DVP1 is used as a DVP (Digital Video Port) + * 1: DVP1 is used as a capture port */ + if (!(sr13 & 0x40)) { + viaDVP1SetDataDriveStrength(pScrn, dataDriveStrength); + } + + break; + default: + break; + } + + if ((pVia->Chipset == VIA_CX700) + || (pVia->Chipset == VIA_VX800) + || (pVia->Chipset == VIA_VX855) + || (pVia->Chipset == VIA_VX900)) { + + hwp->writeSeq(hwp, 0x5A, sr5a); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Restoring 3C5.5A[0].\n")); + } + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting viaTVSetDataDriveStrength.\n")); +} + +static void +ViaTVSave(ScrnInfoPtr pScrn) +{ + VIABIOSInfoPtr pBIOSInfo = VIAPTR(pScrn)->pBIOSInfo; + + if (pBIOSInfo->TVSave) + pBIOSInfo->TVSave(pScrn); +} + +static void +ViaTVRestore(ScrnInfoPtr pScrn) +{ + VIABIOSInfoPtr pBIOSInfo = VIAPTR(pScrn)->pBIOSInfo; + + if (pBIOSInfo->TVRestore) + pBIOSInfo->TVRestore(pScrn); +} + +static Bool +ViaTVDACSense(ScrnInfoPtr pScrn) +{ + VIABIOSInfoPtr pBIOSInfo = VIAPTR(pScrn)->pBIOSInfo; + + if (pBIOSInfo->TVDACSense) + return pBIOSInfo->TVDACSense(pScrn); + return FALSE; +} + +static void +ViaTVSetMode(xf86CrtcPtr crtc, DisplayModePtr mode) +{ + ScrnInfoPtr pScrn = crtc->scrn; + VIAPtr pVia = VIAPTR(pScrn); + VIABIOSInfoPtr pBIOSInfo = pVia->pBIOSInfo; + + if (pBIOSInfo->TVModeI2C) + pBIOSInfo->TVModeI2C(pScrn, mode); + + if (pBIOSInfo->TVModeCrtc) + pBIOSInfo->TVModeCrtc(crtc, mode); + + /* TV reset. */ + xf86I2CWriteByte(pBIOSInfo->TVI2CDev, 0x1D, 0x00); + xf86I2CWriteByte(pBIOSInfo->TVI2CDev, 0x1D, 0x80); +} + +static void +ViaTVPower(ScrnInfoPtr pScrn, Bool On) +{ + VIABIOSInfoPtr pBIOSInfo = VIAPTR(pScrn)->pBIOSInfo; + +#ifdef HAVE_DEBUG + if (On) + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "ViaTVPower: On.\n"); + else + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "ViaTVPower: Off.\n"); +#endif + + if (pBIOSInfo->TVPower) + pBIOSInfo->TVPower(pScrn, On); +} + +#ifdef HAVE_DEBUG +void +ViaTVPrintRegs(ScrnInfoPtr pScrn) +{ + VIABIOSInfoPtr pBIOSInfo = VIAPTR(pScrn)->pBIOSInfo; + + if (pBIOSInfo->TVPrintRegs) + pBIOSInfo->TVPrintRegs(pScrn); +} +#endif /* HAVE_DEBUG */ + +static void +via_tv_create_resources(xf86OutputPtr output) +{ +} + +#ifdef RANDR_12_INTERFACE +static Bool +via_tv_set_property(xf86OutputPtr output, Atom property, + RRPropertyValuePtr value) +{ + return TRUE; +} + +static Bool +via_tv_get_property(xf86OutputPtr output, Atom property) +{ + return FALSE; +} +#endif + +static void +via_tv_dpms(xf86OutputPtr output, int mode) +{ + ScrnInfoPtr pScrn = output->scrn; + + switch (mode) { + case DPMSModeOn: + ViaTVPower(pScrn, TRUE); + break; + + case DPMSModeStandby: + case DPMSModeSuspend: + case DPMSModeOff: + ViaTVPower(pScrn, FALSE); + break; + } +} + +static void +via_tv_save(xf86OutputPtr output) +{ + ScrnInfoPtr pScrn = output->scrn; + + ViaTVSave(pScrn); +} + +static void +via_tv_restore(xf86OutputPtr output) +{ + ScrnInfoPtr pScrn = output->scrn; + + ViaTVRestore(pScrn); +} + +static int +via_tv_mode_valid(xf86OutputPtr output, DisplayModePtr pMode) +{ + ScrnInfoPtr pScrn = output->scrn; + int ret = MODE_OK; + + if (!ViaModeDotClockTranslate(pScrn, pMode)) + return MODE_NOCLOCK; + + return ret; +} + +static Bool +via_tv_mode_fixup(xf86OutputPtr output, DisplayModePtr mode, + DisplayModePtr adjusted_mode) +{ + return TRUE; +} + +static void +via_tv_prepare(xf86OutputPtr output) +{ + via_tv_dpms(output, DPMSModeOff); +} + +static void +via_tv_commit(xf86OutputPtr output) +{ + via_tv_dpms(output, DPMSModeOn); +} + +static void +via_tv_mode_set(xf86OutputPtr output, DisplayModePtr mode, + DisplayModePtr adjusted_mode) +{ + ScrnInfoPtr pScrn = output->scrn; + drmmode_crtc_private_ptr iga = output->crtc->driver_private; + VIAPtr pVia = VIAPTR(pScrn); + + /* TV on FirstCrtc */ + if (output->crtc) { + viaTVSetDisplaySource(pScrn, iga->index ? 0x01 : 0x00); + + /* Set I/O pads to automatic on / off mode. */ + viaTVEnableIOPads(pScrn, 0x03); + + viaTVSetClockDriveStrength(pScrn, 0x03); + viaTVSetDataDriveStrength(pScrn, 0x03); + + ViaTVSetMode(output->crtc, adjusted_mode); + } + + pVia->FirstInit = FALSE; +} + +static xf86OutputStatus +via_tv_detect(xf86OutputPtr output) +{ + xf86OutputStatus status = XF86OutputStatusDisconnected; + ScrnInfoPtr pScrn = output->scrn; + + if (ViaTVDACSense(pScrn)) + status = XF86OutputStatusConnected; + return status; +} + +static DisplayModePtr +via_tv_get_modes(xf86OutputPtr output) +{ + DisplayModePtr modes = NULL, mode = NULL; + ScrnInfoPtr pScrn = output->scrn; + VIAPtr pVia = VIAPTR(pScrn); + int i; + + for (i = 0; i < pVia->pBIOSInfo->TVNumModes; i++) { + mode = xf86DuplicateMode(&pVia->pBIOSInfo->TVModes[i]); + modes = xf86ModesAdd(modes, mode); + } + return modes; +} + +static void +via_tv_destroy(xf86OutputPtr output) +{ +} + +static const xf86OutputFuncsRec via_tv_funcs = { + .create_resources = via_tv_create_resources, +#ifdef RANDR_12_INTERFACE + .set_property = via_tv_set_property, +#endif +#ifdef RANDR_13_INTERFACE + .get_property = via_tv_get_property, +#endif + .dpms = via_tv_dpms, + .save = via_tv_save, + .restore = via_tv_restore, + .mode_valid = via_tv_mode_valid, + .mode_fixup = via_tv_mode_fixup, + .prepare = via_tv_prepare, + .commit = via_tv_commit, + .mode_set = via_tv_mode_set, + .detect = via_tv_detect, + .get_modes = via_tv_get_modes, + .destroy = via_tv_destroy, +}; + +/* + * + */ +Bool +via_tv_init(ScrnInfoPtr pScrn) +{ + VIAPtr pVia = VIAPTR(pScrn); + VIABIOSInfoPtr pBIOSInfo = pVia->pBIOSInfo; + xf86OutputPtr output = NULL; + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered via_tv_init.\n")); + + /* preset some pBIOSInfo TV related values -- move up */ + pBIOSInfo->TVEncoder = VIA_NONETV; + pBIOSInfo->TVI2CDev = NULL; + pBIOSInfo->TVSave = NULL; + pBIOSInfo->TVRestore = NULL; + pBIOSInfo->TVDACSense = NULL; + pBIOSInfo->TVModeValid = NULL; + pBIOSInfo->TVModeI2C = NULL; + pBIOSInfo->TVModeCrtc = NULL; + pBIOSInfo->TVPower = NULL; + pBIOSInfo->TVModes = NULL; + pBIOSInfo->TVPrintRegs = NULL; + pBIOSInfo->LCDPower = NULL; + pBIOSInfo->TVNumRegs = 0; + + /* + * On an SK43G (KM400/Ch7011), false positive detections at a VT162x + * chip were observed, so try to detect the Ch7011 first. + */ + if (pVia->pI2CBus2 && xf86I2CProbeAddress(pVia->pI2CBus2, 0xEC)) + pBIOSInfo->TVI2CDev = ViaCH7xxxDetect(pScrn, pVia->pI2CBus2, 0xEC); + else if (pVia->pI2CBus2 && xf86I2CProbeAddress(pVia->pI2CBus2, 0x40)) + pBIOSInfo->TVI2CDev = ViaVT162xDetect(pScrn, pVia->pI2CBus2, 0x40); + else if (pVia->pI2CBus3 && xf86I2CProbeAddress(pVia->pI2CBus3, 0x40)) + pBIOSInfo->TVI2CDev = ViaVT162xDetect(pScrn, pVia->pI2CBus3, 0x40); + else if (pVia->pI2CBus2 && xf86I2CProbeAddress(pVia->pI2CBus2, 0xEA)) + pBIOSInfo->TVI2CDev = ViaCH7xxxDetect(pScrn, pVia->pI2CBus2, 0xEA); + else if (pVia->pI2CBus3 && xf86I2CProbeAddress(pVia->pI2CBus3, 0xEA)) + pBIOSInfo->TVI2CDev = ViaCH7xxxDetect(pScrn, pVia->pI2CBus3, 0xEA); + + if (!pBIOSInfo->TVI2CDev) { + xf86DrvMsg(pScrn->scrnIndex, X_PROBED, + "Did not detect a TV encoder.\n"); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting via_tv_init.\n")); + + return FALSE; + } + + switch (pBIOSInfo->TVEncoder) { + case VIA_VT1621: + case VIA_VT1622: + case VIA_VT1623: + case VIA_VT1625: + ViaVT162xInit(pScrn); + break; + case VIA_CH7011: + case VIA_CH7019A: + case VIA_CH7019B: + ViaCH7xxxInit(pScrn); + break; + default: + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "Was not able to initialize a known TV encoder.\n"); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting via_tv_init.\n")); + return FALSE; + break; + } + + if (!pBIOSInfo->TVSave || !pBIOSInfo->TVRestore + || !pBIOSInfo->TVDACSense || !pBIOSInfo->TVModeValid + || !pBIOSInfo->TVModeI2C || !pBIOSInfo->TVModeCrtc + || !pBIOSInfo->TVPower || !pBIOSInfo->TVModes + || !pBIOSInfo->TVPrintRegs) { + + xf86DestroyI2CDevRec(pBIOSInfo->TVI2CDev, TRUE); + + pBIOSInfo->TVI2CDev = NULL; + pBIOSInfo->TVOutput = TVOUTPUT_NONE; + pBIOSInfo->TVEncoder = VIA_NONETV; + pBIOSInfo->TVI2CDev = NULL; + pBIOSInfo->TVSave = NULL; + pBIOSInfo->TVRestore = NULL; + pBIOSInfo->TVDACSense = NULL; + pBIOSInfo->TVModeValid = NULL; + pBIOSInfo->TVModeI2C = NULL; + pBIOSInfo->TVModeCrtc = NULL; + pBIOSInfo->TVPower = NULL; + pBIOSInfo->TVModes = NULL; + pBIOSInfo->TVPrintRegs = NULL; + pBIOSInfo->TVNumRegs = 0; + + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "TV encoder was not properly initialized.\n"); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting via_tv_init.\n")); + return FALSE; + } + + output = xf86OutputCreate(pScrn, &via_tv_funcs, "TV-1"); + pVia->FirstInit = TRUE; + + if (output) { + /* Allow tv output on both crtcs, set bit 0 and 1. */ + output->possible_crtcs = 0x3; + } else { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "Failed to register TV-1.\n"); + } + + pBIOSInfo->tv = output; + /* Save now */ + pBIOSInfo->TVSave(pScrn); + +#ifdef HAVE_DEBUG + if (VIAPTR(pScrn)->PrintTVRegs) + pBIOSInfo->TVPrintRegs(pScrn); +#endif + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting via_tv_init.\n")); + return TRUE; +} diff -Nru xserver-xorg-video-openchrome-0.5.0/src/via_ums.c xserver-xorg-video-openchrome-0.6.0/src/via_ums.c --- xserver-xorg-video-openchrome-0.5.0/src/via_ums.c 2016-07-06 16:21:06.000000000 +0000 +++ xserver-xorg-video-openchrome-0.6.0/src/via_ums.c 2017-02-26 23:53:37.000000000 +0000 @@ -1,6 +1,6 @@ /* * Copyright 2011-2016 The OpenChrome Project - * [http://www.freedesktop.org/wiki/Openchrome] + * [https://www.freedesktop.org/wiki/Openchrome] * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -186,7 +186,7 @@ xf86DrvMsg(pScrn->scrnIndex, X_PROBED, "Mapping the frame buffer at address 0x%lX with " - "size %u KB.\n", + "size %lu KB.\n", pVia->FrameBufferBase, pVia->videoRambytes / 1024); #ifdef HAVE_PCIACCESS @@ -277,9 +277,6 @@ viaMMIOEnable(pScrn); - /* Unlock CRTC. */ - ViaCrtcMask(hwp, 0x47, 0x00, 0x01); - vgaHWGetIOBase(hwp); DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, @@ -924,6 +921,13 @@ VIABIOSInfoPtr pBIOSInfo; xf86CrtcPtr iga1, iga2; + /* 3X5.3B through 3X5.3F are scratch pad registers. */ + pVia->originalCR3B = hwp->readCrtc(hwp, 0x3B); + pVia->originalCR3C = hwp->readCrtc(hwp, 0x3C); + pVia->originalCR3D = hwp->readCrtc(hwp, 0x3D); + pVia->originalCR3E = hwp->readCrtc(hwp, 0x3E); + pVia->originalCR3F = hwp->readCrtc(hwp, 0x3F); + /* Read memory bandwidth from registers. */ pVia->MemClk = hwp->readCrtc(hwp, 0x3D) >> 4; DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, @@ -1018,34 +1022,12 @@ iga2_rec->index = 1; iga2->driver_private = iga2_rec; - /* Init HI_X0 for cursor */ - switch (pVia->Chipset) { - case VIA_CX700: - /* case VIA_CN750: */ - case VIA_P4M890: - case VIA_P4M900: - case VIA_VX800: - case VIA_VX855: - case VIA_VX900: - /* set 0 as transparent color key for IGA 2 */ - VIASETREG(HI_TRANSPARENT_COLOR, 0); - VIASETREG(HI_INVTCOLOR, 0X00FFFFFF); - VIASETREG(ALPHA_V3_PREFIFO_CONTROL, 0xE0000); - VIASETREG(ALPHA_V3_FIFO_CONTROL, 0xE0F0000); - - /* set 0 as transparent color key for IGA 1 */ - VIASETREG(PRIM_HI_TRANSCOLOR, 0); - VIASETREG(PRIM_HI_FIFO, 0x0D000D0F); - VIASETREG(PRIM_HI_INVTCOLOR, 0x00FFFFFF); - VIASETREG(V327_HI_INVTCOLOR, 0x00FFFFFF); - break; - - default: - VIASETREG(HI_TRANSPARENT_COLOR, 0); - VIASETREG(HI_INVTCOLOR, 0X00FFFFFF); - VIASETREG(ALPHA_V3_PREFIFO_CONTROL, 0xE0000); - VIASETREG(ALPHA_V3_FIFO_CONTROL, 0xE0F0000); - break; + if (!pScrn->bitsPerPixel) { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "Detected bitsPerPixel to be 0 bit.\n"); + xf86CrtcDestroy(iga2); + xf86CrtcDestroy(iga1); + return FALSE; } /* @@ -1060,8 +1042,8 @@ * We should be able to limit the memory available for a mode to 32 MB, * but miScanLineWidth fails to catch this properly (apertureSize). */ - max_pitch = 8192 / ((pScrn->bitsPerPixel + 7) >> 3); - max_height = max_pitch; + max_pitch = (8192 / ((pScrn->bitsPerPixel + 7) >> 3)) - (16 / ((pScrn->bitsPerPixel + 7) >> 3)); + max_height = 8192 / ((pScrn->bitsPerPixel + 7) >> 3); xf86CrtcSetSizeRange(pScrn, 320, 200, max_pitch, max_height); diff -Nru xserver-xorg-video-openchrome-0.5.0/src/via_ums.h xserver-xorg-video-openchrome-0.6.0/src/via_ums.h --- xserver-xorg-video-openchrome-0.5.0/src/via_ums.h 2016-07-06 16:21:06.000000000 +0000 +++ xserver-xorg-video-openchrome-0.6.0/src/via_ums.h 2017-02-26 23:53:37.000000000 +0000 @@ -1,7 +1,7 @@ /* * Copyright 2016 Kevin Brace * Copyright 2005-2016 The OpenChrome Project - * [http://www.freedesktop.org/wiki/Openchrome] + * [https://www.freedesktop.org/wiki/Openchrome] * Copyright 2004-2005 The Unichrome Project [unichrome.sf.net] * Copyright 1998-2003 VIA Technologies, Inc. All Rights Reserved. * Copyright 2001-2003 S3 Graphics, Inc. All Rights Reserved. @@ -116,11 +116,21 @@ #define VIA_DI_PORT_DVP0 0x1 #define VIA_DI_PORT_DVP1 0x2 #define VIA_DI_PORT_DFPLOW 0x4 +#define VIA_DI_PORT_LVDS1 0x4 +#define VIA_DI_PORT_TMDS 0x4 #define VIA_DI_PORT_DFPHIGH 0x8 +#define VIA_DI_PORT_LVDS2 0x8 + +/* External TMDS (DVI) Transmitter Type */ +#define VIA_TMDS_NONE 0x0 +#define VIA_TMDS_VT1632 0x1 + typedef struct ViaPanelMode { - int Width ; - int Height ; + int Width; + int Height; + Bool useDualEdge; + Bool useDithering; } ViaPanelModeRec, *ViaPanelModePtr ; typedef struct ViaPanelInfo { @@ -128,6 +138,9 @@ /* Native physical resolution */ int NativeHeight; int NativeWidth; + Bool useDualEdge; + Bool useDithering; + /* Native resolution index, see via_panel.c */ CARD8 NativeModeIndex; /* Determine if we must use the hardware scaler @@ -163,7 +176,6 @@ int TVDeflicker; CARD8 TVRegs[0xFF]; int TVNumRegs; - int TVDIPort; /* TV Callbacks */ void (*TVSave) (ScrnInfoPtr pScrn); @@ -180,6 +192,21 @@ } VIABIOSInfoRec, *VIABIOSInfoPtr; + +typedef struct _VIATMDSRec { + I2CBusPtr pVIATMDSI2CBus; +} VIATMDSRec, *VIATMDSRecPtr; + +typedef struct +{ + CARD16 X; + CARD16 Y; + CARD16 Bpp; + CARD8 bRamClock; + CARD8 bTuningValue; +} ViaExpireNumberTable; + + /* via_ums.c */ void viaUnmapMMIO(ScrnInfoPtr pScrn); void viaDisableVQ(ScrnInfoPtr pScrn); @@ -189,28 +216,38 @@ Bool umsCrtcInit(ScrnInfoPtr pScrn); /* via_output.c */ +void viaDIP0SetDisplaySource(ScrnInfoPtr pScrn, CARD8 displaySource); +void viaDIP0EnableIOPads(ScrnInfoPtr pScrn, CARD8 ioPadState); +void viaDIP0SetClockDriveStrength(ScrnInfoPtr pScrn, + CARD8 clockDriveStrength); +void viaDIP0SetDataDriveStrength(ScrnInfoPtr pScrn, + CARD8 dataDriveStrength); +void viaDVP0SetDisplaySource(ScrnInfoPtr pScrn, CARD8 displaySource); +void viaDVP0EnableIOPads(ScrnInfoPtr pScrn, CARD8 ioPadState); +void viaDVP0SetClockDriveStrength(ScrnInfoPtr pScrn, + CARD8 clockDriveStrength); +void viaDVP0SetDataDriveStrength(ScrnInfoPtr pScrn, + CARD8 dataDriveStrength); +void viaDVP1SetDisplaySource(ScrnInfoPtr pScrn, CARD8 displaySource); +void viaDVP1EnableIOPads(ScrnInfoPtr pScrn, CARD8 ioPadState); +void viaDVP1SetClockDriveStrength(ScrnInfoPtr pScrn, + CARD8 clockDriveStrength); +void viaDVP1SetDataDriveStrength(ScrnInfoPtr pScrn, + CARD8 dataDriveStrength); +void viaDFPLowSetDisplaySource(ScrnInfoPtr pScrn, CARD8 displaySource); +void viaDFPLowEnableIOPads(ScrnInfoPtr pScrn, CARD8 ioPadState); void viaOutputDetect(ScrnInfoPtr pScrn); CARD32 ViaGetMemoryBandwidth(ScrnInfoPtr pScrn); CARD32 ViaModeDotClockTranslate(ScrnInfoPtr pScrn, DisplayModePtr mode); -void viaTMDSPower(ScrnInfoPtr pScrn, Bool On); -void ViaTVPower(ScrnInfoPtr pScrn, Bool On); -void ViaTVSave(ScrnInfoPtr pScrn); -void ViaTVRestore(ScrnInfoPtr pScrn); -#ifdef HAVE_DEBUG -void ViaTVPrintRegs(ScrnInfoPtr pScrn); -#endif void viaProbePinStrapping(ScrnInfoPtr pScrn); void ViaSetPrimaryDotclock(ScrnInfoPtr pScrn, CARD32 clock); void ViaSetSecondaryDotclock(ScrnInfoPtr pScrn, CARD32 clock); void ViaSetUseExternalClock(vgaHWPtr hwp); /* via_display.c */ -void viaIGA1DPMSControl(ScrnInfoPtr pScrn, CARD8 dpmsControl); -void viaIGA2DisplayOutput(ScrnInfoPtr pScrn, Bool outputState); void viaIGA2DisplayChannel(ScrnInfoPtr pScrn, Bool channelState); void viaDisplayInit(ScrnInfoPtr pScrn); void ViaGammaDisable(ScrnInfoPtr pScrn); -void ViaCRTCInit(ScrnInfoPtr pScrn); void viaIGAInitCommon(ScrnInfoPtr pScrn); void viaIGA1Init(ScrnInfoPtr pScrn); void viaIGA1SetFBStartingAddress(xf86CrtcPtr crtc, int x, int y); @@ -224,13 +261,27 @@ void viaIGA2Restore(ScrnInfoPtr pScrn); void ViaShadowCRTCSetMode(ScrnInfoPtr pScrn, DisplayModePtr mode); +/* via_analog.c */ +void via_analog_init(ScrnInfoPtr pScrn); + /* via_lvds.c */ +void viaLVDS1SetIOPadSetting(ScrnInfoPtr pScrn, CARD8 ioPadState); void via_lvds_init(ScrnInfoPtr pScrn); -/* in via_bandwidth.c */ -void ViaSetPrimaryFIFO(ScrnInfoPtr pScrn, DisplayModePtr mode); -void ViaSetSecondaryFIFO(ScrnInfoPtr pScrn, DisplayModePtr mode); -void ViaDisablePrimaryFIFO(ScrnInfoPtr pScrn); +/* via_tmds.c */ +void viaExtTMDSSetDisplaySource(ScrnInfoPtr pScrn, CARD8 displaySource); +void viaExtTMDSEnableIOPads(ScrnInfoPtr pScrn, CARD8 ioPadState); +void viaExtTMDSSetClockDriveStrength(ScrnInfoPtr pScrn, + CARD8 clockDriveStrength); +void viaExtTMDSSetDataDriveStrength(ScrnInfoPtr pScrn, + CARD8 dataDriveStrength); +void via_dvi_init(ScrnInfoPtr pScrn); + +/*via_tv.c */ +#ifdef HAVE_DEBUG +void ViaTVPrintRegs(ScrnInfoPtr pScrn); +#endif +Bool via_tv_init(ScrnInfoPtr pScrn); /* via_vt162x.c */ I2CDevPtr ViaVT162xDetect(ScrnInfoPtr pScrn, I2CBusPtr pBus, CARD8 Address); diff -Nru xserver-xorg-video-openchrome-0.5.0/src/via_vgahw.c xserver-xorg-video-openchrome-0.6.0/src/via_vgahw.c --- xserver-xorg-video-openchrome-0.5.0/src/via_vgahw.c 2016-07-06 16:21:06.000000000 +0000 +++ xserver-xorg-video-openchrome-0.6.0/src/via_vgahw.c 2017-01-06 03:33:01.000000000 +0000 @@ -34,7 +34,7 @@ #include "xf86.h" #include "via_driver.h" /* for HAVE_DEBUG */ -#if ABI_VIDEODRV_VERSION < 12 +#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12 #define PIOOFFSET hwp->PIOOffset #else #define PIOOFFSET 0 diff -Nru xserver-xorg-video-openchrome-0.5.0/src/via_vt162x.c xserver-xorg-video-openchrome-0.6.0/src/via_vt162x.c --- xserver-xorg-video-openchrome-0.5.0/src/via_vt162x.c 2016-07-06 16:21:06.000000000 +0000 +++ xserver-xorg-video-openchrome-0.6.0/src/via_vt162x.c 2017-01-06 03:33:01.000000000 +0000 @@ -48,18 +48,15 @@ case VIA_CX700: case VIA_VX800: case VIA_VX855: - /* IGA1 */ + case VIA_VX900: + /* IGA1 */ if (!iga->index) { - if(pBIOSInfo->TVDIPort == VIA_DI_PORT_DVP1) - ViaCrtcMask(hwp, 0x6C, 0xB0, 0xF0); - else if(pBIOSInfo->TVDIPort == VIA_DI_PORT_DVP0) - ViaCrtcMask(hwp, 0x6C, 0x90, 0xF0); + /* Fixing it to DVP1 for IGA1. */ + ViaCrtcMask(hwp, 0x6C, 0xB0, 0xF0); + /* IGA2 */ } else { - /* IGA2 */ - if(pBIOSInfo->TVDIPort == VIA_DI_PORT_DVP1) - ViaCrtcMask(hwp, 0x6C, 0x0B, 0x0F); - else if(pBIOSInfo->TVDIPort == VIA_DI_PORT_DVP0) - ViaCrtcMask(hwp, 0x6C, 0x09, 0x0F); + /* Fixing it to DVP1 for IGA2. */ + ViaCrtcMask(hwp, 0x6C, 0x0B, 0x0F); } break; default: diff -Nru xserver-xorg-video-openchrome-0.5.0/src/via_vt1632.c xserver-xorg-video-openchrome-0.6.0/src/via_vt1632.c --- xserver-xorg-video-openchrome-0.5.0/src/via_vt1632.c 2016-07-06 16:21:06.000000000 +0000 +++ xserver-xorg-video-openchrome-0.6.0/src/via_vt1632.c 2017-02-26 23:53:37.000000000 +0000 @@ -1,5 +1,9 @@ /* + * Copyright 2016 Kevin Brace + * Copyright 2016 The OpenChrome Project + * [https://www.freedesktop.org/wiki/Openchrome] * Copyright 2014 SHS SERVICES GmbH + * Copyright 2006-2009 Luc Verhaegen. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -28,274 +32,464 @@ #include "via_driver.h" #include "via_vt1632.h" -static Bool -xf86I2CMaskByte(I2CDevPtr d, I2CByte subaddr, I2CByte value, I2CByte mask) +static void +viaVT1632DumpRegisters(ScrnInfoPtr pScrn, I2CDevPtr pDev) { - I2CByte tmp; - Bool ret; + int i; + CARD8 tmp; - ret = xf86I2CReadByte(d, subaddr, &tmp); - if (!ret) - return FALSE; + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered viaVT1632DumpRegisters.\n")); - tmp &= ~mask; - tmp |= (value & mask); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Dumping VT1632(A) registers.\n")); + for (i = 0; i <= 0x0f; i++) { + xf86I2CReadByte(pDev, i, &tmp); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "0x%02x: 0x%02x\n", i, tmp)); + } - return xf86I2CWriteByte(d, subaddr, tmp); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting viaVT1632DumpRegisters.\n")); } static void -via_vt1632_dump_registers(ScrnInfoPtr pScrn, I2CDevPtr pDev) +viaVT1632InitRegisters(ScrnInfoPtr pScrn, I2CDevPtr pDev) +{ + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered viaVT1632InitRegisters.\n")); + + /* For Wyse C00X VX855 chipset DVP1 (Digital Video Port 1), use + * 12-bit mode with dual edge transfer, along with rising edge + * data capture first mode. This is likely true for CX700, VX700, + * VX800, and VX900 chipsets as well. */ + xf86I2CWriteByte(pDev, 0x08, + VIA_VT1632_VEN | VIA_VT1632_HEN | + VIA_VT1632_DSEL | + VIA_VT1632_EDGE | VIA_VT1632_PDB); + + /* Route receiver detect bit (Offset 0x09[2]) as the output of + * MSEN pin. */ + xf86I2CWriteByte(pDev, 0x09, 0x20); + + /* Turning on deskew feature caused screen display issues. + * This was observed with Wyse C00X. */ + xf86I2CWriteByte(pDev, 0x0A, 0x00); + + /* While VIA Technologies VT1632A datasheet insists on setting this + * register to 0x89 as the recommended setting, in practice, this + * leads to a blank screen on the display with Wyse C00X. According to + * Silicon Image SiI 164 datasheet (VT1632A is a pin and mostly + * register compatible chip), offset 0x0C is for PLL filter enable, + * PLL filter setting, and continuous SYNC enable bits. All of these are + * turned off for proper operation. */ + xf86I2CWriteByte(pDev, 0x0C, 0x00); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting viaVT1632InitRegisters.\n")); +} + +/* + * Returns TMDS receiver detection state for VIA Technologies VT1632 + * external TMDS transmitter. + */ +static Bool +viaVT1632Sense(ScrnInfoPtr pScrn, I2CDevPtr pDev) { - int i; CARD8 tmp; + Bool receiverDetected = FALSE; DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Entered via_vt1632_dump_registers.\n")); + "Entered viaVT1632Sense.\n")); - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "VT1632A: dumping registers:\n")); - for (i = 0; i <= 0x0f; i++) { - xf86I2CReadByte(pDev, i, &tmp); - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "VT1632A: 0x%02x: 0x%02x\n", i, tmp)); + xf86I2CReadByte(pDev, 0x09, &tmp); + if (tmp & 0x04) { + receiverDetected = TRUE; + } + + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "VT1632 %s a TMDS receiver.\n", + receiverDetected ? "detected" : "did not detect"); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting viaVT1632Sense.\n")); + return receiverDetected; +} + +static void +viaVT1632Power(ScrnInfoPtr pScrn, I2CDevPtr pDev, Bool powerState) +{ + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered viaVT1632Power.\n")); + + xf86I2CMaskByte(pDev, 0x08, powerState ? 0x01 : 0x00, 0x01); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "VT1632 (DVI) Power: %s\n", + powerState ? "On" : "Off"); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting viaVT1632Power.\n")); +} + +static void +viaVT1632SaveRegisters(ScrnInfoPtr pScrn, I2CDevPtr pDev, + viaVT1632RecPtr pVIAVT1632Rec) +{ + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered viaVT1632SaveRegisters.\n")); + + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Saving VT1632 registers.\n"); + xf86I2CReadByte(pDev, 0x08, &pVIAVT1632Rec->Register08); + xf86I2CReadByte(pDev, 0x09, &pVIAVT1632Rec->Register09); + xf86I2CReadByte(pDev, 0x0A, &pVIAVT1632Rec->Register0A); + xf86I2CReadByte(pDev, 0x0C, &pVIAVT1632Rec->Register0C); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting viaVT1632SaveRegisters.\n")); +} + +static void +viaVT1632RestoreRegisters(ScrnInfoPtr pScrn, I2CDevPtr pDev, + viaVT1632RecPtr pVIAVT1632Rec) +{ + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered viaVT1632RestoreRegisters.\n")); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Restoring VT1632 registers.\n")); + xf86I2CWriteByte(pDev, 0x08, pVIAVT1632Rec->Register08); + xf86I2CWriteByte(pDev, 0x09, pVIAVT1632Rec->Register09); + xf86I2CWriteByte(pDev, 0x0A, pVIAVT1632Rec->Register0A); + xf86I2CWriteByte(pDev, 0x0C, pVIAVT1632Rec->Register0C); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting viaVT1632RestoreRegisters.\n")); +} + +static int +viaVT1632CheckModeValidity(xf86OutputPtr output, DisplayModePtr pMode) +{ + ScrnInfoPtr pScrn = output->scrn; + viaVT1632RecPtr pVIAVT1632Rec = output->driver_private; + int status = MODE_OK; + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered viaVT1632CheckModeValidity.\n")); + + if (pMode->Clock < pVIAVT1632Rec->DotclockMin) { + status = MODE_CLOCK_LOW; + goto exit; } + if (pMode->Clock > pVIAVT1632Rec->DotclockMax) { + status = MODE_CLOCK_HIGH; + } + +exit: DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Exiting via_vt1632_dump_registers.\n")); + "Exiting viaVT1632CheckModeValidity.\n")); + return status; } +static void +via_vt1632_create_resources(xf86OutputPtr output) +{ +} -void -via_vt1632_power(xf86OutputPtr output, Bool powerState) +static void +via_vt1632_dpms(xf86OutputPtr output, int mode) { - ViaVT1632Ptr Private = output->driver_private; ScrnInfoPtr pScrn = output->scrn; + viaVT1632RecPtr pVIAVT1632Rec = output->driver_private; DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Entered via_vt1632_power.\n")); + "Entered via_vt1632_dpms.\n")); - xf86I2CMaskByte(Private->VT1632I2CDev, 0x08, powerState ? 0x01 : 0x00, 0x01); - xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "VT1632A Power: %s\n", - powerState ? "On" : "Off"); + switch (mode) { + case DPMSModeOn: + viaVT1632Power(pScrn, pVIAVT1632Rec->VT1632I2CDev, TRUE); + break; + case DPMSModeStandby: + case DPMSModeSuspend: + case DPMSModeOff: + viaVT1632Power(pScrn, pVIAVT1632Rec->VT1632I2CDev, FALSE); + break; + default: + break; + } DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Exiting via_vt1632_power.\n")); + "Exiting via_vt1632_dpms.\n")); } -void +static void via_vt1632_save(xf86OutputPtr output) { - ViaVT1632Ptr Private = output->driver_private; ScrnInfoPtr pScrn = output->scrn; + viaVT1632RecPtr pVIAVT1632Rec = output->driver_private; DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Entered via_vt1632_save.\n")); - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "VT1632A: Saving the content of registers " - "0x08, 0x09, 0x0A, and 0x0C.\n")); - xf86I2CReadByte(Private->VT1632I2CDev, 0x08, &Private->Register08); - xf86I2CReadByte(Private->VT1632I2CDev, 0x09, &Private->Register09); - xf86I2CReadByte(Private->VT1632I2CDev, 0x0A, &Private->Register0A); - xf86I2CReadByte(Private->VT1632I2CDev, 0x0C, &Private->Register0C); + viaVT1632SaveRegisters(pScrn, pVIAVT1632Rec->VT1632I2CDev, pVIAVT1632Rec); DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Exiting via_vt1632_save.\n")); } -void +static void via_vt1632_restore(xf86OutputPtr output) { - ViaVT1632Ptr Private = output->driver_private; ScrnInfoPtr pScrn = output->scrn; + viaVT1632RecPtr pVIAVT1632Rec = output->driver_private; DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Entered via_vt1632_restore.\n")); - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "VT1632A: Restoring registers 0x08, 0x09, " - "0x0A, and 0x0C.\n")); - xf86I2CWriteByte(Private->VT1632I2CDev, 0x08, Private->Register08); - xf86I2CWriteByte(Private->VT1632I2CDev, 0x09, Private->Register09); - xf86I2CWriteByte(Private->VT1632I2CDev, 0x0A, Private->Register0A); - xf86I2CWriteByte(Private->VT1632I2CDev, 0x0C, Private->Register0C); + viaVT1632RestoreRegisters(pScrn, pVIAVT1632Rec->VT1632I2CDev, + pVIAVT1632Rec); DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Exiting via_vt1632_restore.\n")); } -int +static int via_vt1632_mode_valid(xf86OutputPtr output, DisplayModePtr pMode) { - ViaVT1632Ptr Private = output->driver_private; - ScrnInfoPtr pScrn = output->scrn; - - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Entered via_vt1632_mode_valid.\n")); + return viaVT1632CheckModeValidity(output, pMode); +} - if (pMode->Clock < Private->DotclockMin) { - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Exiting via_vt1632_mode_valid.\n")); - return MODE_CLOCK_LOW; - } +static Bool +via_vt1632_mode_fixup(xf86OutputPtr output, DisplayModePtr mode, + DisplayModePtr adjusted_mode) +{ + return TRUE; +} - if (pMode->Clock > Private->DotclockMax) { - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Exiting via_vt1632_mode_valid.\n")); - return MODE_CLOCK_HIGH; - } +static void +via_vt1632_prepare(xf86OutputPtr output) +{ +} - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Exiting via_vt1632_mode_valid.\n")); - return MODE_OK; +static void +via_vt1632_commit(xf86OutputPtr output) +{ } -void +static void via_vt1632_mode_set(xf86OutputPtr output, DisplayModePtr mode, DisplayModePtr adjusted_mode) { - ViaVT1632Ptr Private = output->driver_private; ScrnInfoPtr pScrn = output->scrn; + drmmode_crtc_private_ptr iga = output->crtc->driver_private; + viaVT1632RecPtr pVIAVT1632Rec = output->driver_private; - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Entered via_vt1632_mode_set.\n")); - xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "VT1632A: Enabling DVI.\n"); - - via_vt1632_dump_registers(pScrn, Private->VT1632I2CDev); + if (output->crtc) { + viaExtTMDSSetClockDriveStrength(pScrn, 0x03); + viaExtTMDSSetDataDriveStrength(pScrn, 0x03); + viaExtTMDSEnableIOPads(pScrn, 0x03); + + viaVT1632DumpRegisters(pScrn, pVIAVT1632Rec->VT1632I2CDev); + viaVT1632InitRegisters(pScrn, pVIAVT1632Rec->VT1632I2CDev); + viaVT1632DumpRegisters(pScrn, pVIAVT1632Rec->VT1632I2CDev); - /* For Wyse C00X VX855 chipset DVP1 (Digital Video Port 1), use - * 12-bit mode with dual edge transfer, along with rising edge - * data capture first mode. This is likely true for CX700, VX700, - * VX800, and VX900 chipsets as well. */ - xf86I2CWriteByte(Private->VT1632I2CDev, 0x08, - VIA_VT1632_VEN | VIA_VT1632_HEN | - VIA_VT1632_DSEL | - VIA_VT1632_EDGE | VIA_VT1632_PDB); - - /* Route receiver detect bit (Offset 0x09[2]) as the output of - * MSEN pin. */ - xf86I2CWriteByte(Private->VT1632I2CDev, 0x09, 0x20); - - /* Turning on deskew feature caused screen display issues. - * This was observed with Wyse C00X. */ - xf86I2CWriteByte(Private->VT1632I2CDev, 0x0A, 0x00); - - /* While VIA Technologies VT1632A datasheet insists on setting this - * register to 0x89 as the recommended setting, in practice, this - * leads to a blank screen on the display with Wyse C00X. According to - * Silicon Image SiI 164 datasheet (VT1632A is a pin and mostly - * register compatible chip), offset 0x0C is for PLL filter enable, - * PLL filter setting, and continuous SYNC enable bits. All of these are - * turned off for proper operation. */ - xf86I2CWriteByte(Private->VT1632I2CDev, 0x0C, 0x00); - - via_vt1632_dump_registers(pScrn, Private->VT1632I2CDev); + viaExtTMDSSetDisplaySource(pScrn, iga->index ? 0x01 : 0x00); + } DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Exiting via_vt1632_mode_set.\n")); } -xf86OutputStatus +static xf86OutputStatus via_vt1632_detect(xf86OutputPtr output) { - ViaVT1632Ptr Private = output->driver_private; - xf86OutputStatus status; + xf86MonPtr mon; + xf86OutputStatus status = XF86OutputStatusDisconnected; ScrnInfoPtr pScrn = output->scrn; - CARD8 tmp; - - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Entered via_vt1632_detect.\n")); + viaVT1632RecPtr pVIAVT1632Rec = output->driver_private; - xf86I2CReadByte(Private->VT1632I2CDev, 0x09, &tmp); - if (tmp & 0x04) { - xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "VT1632A: DVI device is detected.\n"); - status = XF86OutputStatusConnected; - } else { - xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "VT1632A: DVI device was not detected.\n"); - status = XF86OutputStatusDisconnected; + /* Check for the DVI presence via VT1632 first before accessing + * I2C bus. */ + if (viaVT1632Sense(pScrn, pVIAVT1632Rec->VT1632I2CDev)) { + + /* Since DVI presence was established, access the I2C bus + * assigned to DVI. */ + mon = xf86OutputGetEDID(output, pVIAVT1632Rec->VT1632I2CDev->pI2CBus); + + /* Is the interface type digital? */ + if (mon && DIGITAL(mon->features.input_type)) { + status = XF86OutputStatusConnected; + xf86DrvMsg(pScrn->scrnIndex, X_PROBED, + "Detected a monitor connected to DVI.\n"); + xf86OutputSetEDID(output, mon); + } else { + xf86DrvMsg(pScrn->scrnIndex, X_PROBED, + "Could not obtain EDID from a monitor " + "connected to DVI.\n"); + } } - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Exiting via_vt1632_detect.\n")); return status; } -BOOL -via_vt1632_probe(ScrnInfoPtr pScrn, I2CDevPtr pDev) { - CARD8 buf = 0; - CARD16 VendorID = 0; - CARD16 DeviceID = 0; +#ifdef RANDR_12_INTERFACE +static Bool +via_vt1632_set_property(xf86OutputPtr output, Atom property, + RRPropertyValuePtr value) +{ + return TRUE; +} - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Entered via_vt1632_probe.\n")); +static Bool +via_vt1632_get_property(xf86OutputPtr output, Atom property) +{ + return FALSE; +} +#endif - xf86I2CReadByte(pDev, 0, &buf); - VendorID = buf; - xf86I2CReadByte(pDev, 1, &buf); - VendorID |= buf << 8; - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Vendor ID: 0x%04x\n", VendorID)); +static void +via_vt1632_destroy(xf86OutputPtr output) +{ +} + +const xf86OutputFuncsRec via_vt1632_funcs = { + .create_resources = via_vt1632_create_resources, + .dpms = via_vt1632_dpms, + .save = via_vt1632_save, + .restore = via_vt1632_restore, + .mode_valid = via_vt1632_mode_valid, + .mode_fixup = via_vt1632_mode_fixup, + .prepare = via_vt1632_prepare, + .commit = via_vt1632_commit, + .mode_set = via_vt1632_mode_set, + .detect = via_vt1632_detect, + .get_modes = xf86OutputGetEDIDModes, +#ifdef RANDR_12_INTERFACE + .set_property = via_vt1632_set_property, +#endif +#ifdef RANDR_13_INTERFACE + .get_property = via_vt1632_get_property, +#endif + .destroy = via_vt1632_destroy, +}; + +Bool +viaVT1632Init(ScrnInfoPtr pScrn, I2CBusPtr pI2CBus) +{ + xf86OutputPtr output; + VIAPtr pVia = VIAPTR(pScrn); + viaVT1632RecPtr pVIAVT1632Rec = NULL; + I2CDevPtr pI2CDevice = NULL; + I2CSlaveAddr i2cAddr = 0x10; + CARD8 buf; + CARD16 vendorID, deviceID; + Bool status = FALSE; + char outputNameBuffer[32]; - xf86I2CReadByte(pDev, 2, &buf); - DeviceID = buf; - xf86I2CReadByte(pDev, 3, &buf); - DeviceID |= buf << 8; DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Device ID: 0x%04x\n", DeviceID)); + "Entered viaVT1632Init.\n")); - if ((VendorID != 0x1106) || (DeviceID != 0x3192)) { + if (!xf86I2CProbeAddress(pI2CBus, i2cAddr)) { xf86DrvMsg(pScrn->scrnIndex, X_PROBED, - "VT1632A DVI transmitter not detected.\n"); - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Exiting via_vt1632_probe.\n")); - return FALSE; + "I2C device not found.\n"); + goto exit; } - xf86DrvMsg(pScrn->scrnIndex, X_PROBED, - "VT1632A DVI transmitter detected.\n"); - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Exiting via_vt1632_probe.\n")); - return TRUE; -} + pI2CDevice = xf86CreateI2CDevRec(); + if (!pI2CDevice) { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "Failed to create an I2C bus device record.\n"); + goto exit; + } -ViaVT1632Ptr -via_vt1632_init(ScrnInfoPtr pScrn, I2CDevPtr pDev) -{ - VIAPtr pVia = VIAPTR(pScrn); - ViaVT1632Ptr Private = NULL; - CARD8 buf = 0; + pI2CDevice->DevName = "VT1632"; + pI2CDevice->SlaveAddr = i2cAddr; + pI2CDevice->pI2CBus = pI2CBus; + if (!xf86I2CDevInit(pI2CDevice)) { + xf86DestroyI2CDevRec(pI2CDevice, TRUE); + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "Failed to initialize a device on I2C bus.\n"); + goto exit; + } + xf86I2CReadByte(pI2CDevice, 0, &buf); + vendorID = buf; + xf86I2CReadByte(pI2CDevice, 1, &buf); + vendorID |= buf << 8; + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Vendor ID: 0x%04x\n", vendorID)); + + xf86I2CReadByte(pI2CDevice, 2, &buf); + deviceID = buf; + xf86I2CReadByte(pI2CDevice, 3, &buf); + deviceID |= buf << 8; DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Entered via_vt1632_init.\n")); + "Device ID: 0x%04x\n", deviceID)); - Private = xnfcalloc(1, sizeof(ViaVT1632Rec)); - if (!Private) { + if ((vendorID != 0x1106) || (deviceID != 0x3192)) { + xf86DestroyI2CDevRec(pI2CDevice, TRUE); + xf86DrvMsg(pScrn->scrnIndex, X_PROBED, + "VT1632 external TMDS transmitter not detected.\n"); + goto exit; + } + + xf86DrvMsg(pScrn->scrnIndex, X_PROBED, + "VT1632 external TMDS transmitter detected.\n"); + + pVIAVT1632Rec = xnfcalloc(1, sizeof(viaVT1632Rec)); + if (!pVIAVT1632Rec) { + xf86DestroyI2CDevRec(pI2CDevice, TRUE); xf86DrvMsg(pScrn->scrnIndex, X_ERROR, - "Failed to allocate memory for DVI initialization.\n"); - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Exiting via_vt1632_init.\n")); - return NULL; + "Failed to allocate working storage for VT1632.\n"); + goto exit; } - Private->VT1632I2CDev = pDev; - xf86I2CReadByte(pDev, 0x06, &buf); - Private->DotclockMin = buf * 1000; + // Remembering which I2C bus is used for VT1632. + pVIAVT1632Rec->VT1632I2CDev = pI2CDevice; - xf86I2CReadByte(pDev, 0x07, &buf); - Private->DotclockMax = (buf + 65) * 1000; + xf86I2CReadByte(pI2CDevice, 0x06, &buf); + pVIAVT1632Rec->DotclockMin = buf * 1000; - xf86DrvMsg(pScrn->scrnIndex, X_INFO, "VT1632A Dot Clock Range: " + xf86I2CReadByte(pI2CDevice, 0x07, &buf); + pVIAVT1632Rec->DotclockMax = (buf + 65) * 1000; + + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Supported VT1632 Dot Clock Range: " "%d to %d MHz\n", - Private->DotclockMin / 1000, - Private->DotclockMax / 1000); + pVIAVT1632Rec->DotclockMin / 1000, + pVIAVT1632Rec->DotclockMax / 1000); - via_vt1632_dump_registers(pScrn, pDev); + /* The code to dynamically designate the particular DVI (i.e., DVI-1, + * DVI-2, etc.) for xrandr was borrowed from xf86-video-r128 DDX. */ + sprintf(outputNameBuffer, "DVI-%d", (pVia->numberDVI + 1)); + output = xf86OutputCreate(pScrn, &via_vt1632_funcs, outputNameBuffer); + if (!output) { + free(pVIAVT1632Rec); + xf86DestroyI2CDevRec(pI2CDevice, TRUE); + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "Failed to allocate X Server display output record for " + "VT1632.\n"); + goto exit; + } + output->driver_private = pVIAVT1632Rec; + + /* Since there are two (2) display controllers registered with the + * X.Org Server and both IGA1 and IGA2 can handle DVI without any + * limitations, possible_crtcs should be set to 0x3 (0b11) so that + * either display controller can get assigned to handle DVI. */ + output->possible_crtcs = (1 << 1) | (1 << 0); + + output->possible_clones = 0; + output->interlaceAllowed = FALSE; + output->doubleScanAllowed = FALSE; + + viaVT1632DumpRegisters(pScrn, pI2CDevice); + + pVia->numberDVI++; + status = TRUE; +exit: DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Exiting via_vt1632_init.\n")); - return Private; + "Exiting viaVT1632Init.\n")); + return status; } diff -Nru xserver-xorg-video-openchrome-0.5.0/src/via_vt1632.h xserver-xorg-video-openchrome-0.6.0/src/via_vt1632.h --- xserver-xorg-video-openchrome-0.5.0/src/via_vt1632.h 2016-07-06 16:21:06.000000000 +0000 +++ xserver-xorg-video-openchrome-0.6.0/src/via_vt1632.h 2017-01-06 03:33:01.000000000 +0000 @@ -1,5 +1,6 @@ /* * Copyright 2014 SHS SERVICES GmbH + * Copyright 2006-2009 Luc Verhaegen. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -31,7 +32,7 @@ #define VIA_VT1632_EDGE 0x02 #define VIA_VT1632_PDB 0x01 -typedef struct _ViaVT1632 { +typedef struct _viaVT1632Rec { I2CDevPtr VT1632I2CDev; int DotclockMin; @@ -40,15 +41,11 @@ CARD8 Register09; CARD8 Register0A; CARD8 Register0C; -} ViaVT1632Rec, *ViaVT1632Ptr; +} viaVT1632Rec, *viaVT1632RecPtr; -void via_vt1632_power(xf86OutputPtr output, Bool powerState); -void via_vt1632_save(xf86OutputPtr output); -void via_vt1632_restore(xf86OutputPtr output); -int via_vt1632_mode_valid(xf86OutputPtr output, DisplayModePtr pMode); -void via_vt1632_mode_set(xf86OutputPtr output, DisplayModePtr mode, DisplayModePtr adjusted_mode); -xf86OutputStatus via_vt1632_detect(xf86OutputPtr output); -BOOL via_vt1632_probe(ScrnInfoPtr pScrn, I2CDevPtr pDev); -ViaVT1632Ptr via_vt1632_init(ScrnInfoPtr pScrn, I2CDevPtr pDev); + +const xf86OutputFuncsRec via_vt1632_funcs; + +Bool viaVT1632Init(ScrnInfoPtr pScrn, I2CBusPtr pI2CBus); #endif /* _VIA_VT1632_H_ */ diff -Nru xserver-xorg-video-openchrome-0.5.0/src/via_xv.c xserver-xorg-video-openchrome-0.6.0/src/via_xv.c --- xserver-xorg-video-openchrome-0.5.0/src/via_xv.c 2016-07-06 16:21:06.000000000 +0000 +++ xserver-xorg-video-openchrome-0.6.0/src/via_xv.c 2017-01-06 03:33:01.000000000 +0000 @@ -357,7 +357,7 @@ memEfficiency = (float)SINGLE_3205_133; break; default: - ErrorF("Unknow DRAM Type!\n"); + ErrorF("Unknown DRAM Type!\n"); mClock = 166; memEfficiency = (float)SINGLE_3205_133; break; diff -Nru xserver-xorg-video-openchrome-0.5.0/src/xvmc/Makefile.in xserver-xorg-video-openchrome-0.6.0/src/xvmc/Makefile.in --- xserver-xorg-video-openchrome-0.5.0/src/xvmc/Makefile.in 2016-07-06 16:22:04.000000000 +0000 +++ xserver-xorg-video-openchrome-0.6.0/src/xvmc/Makefile.in 2017-03-07 11:19:03.000000000 +0000 @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2014 Free Software Foundation, Inc. - +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -15,61 +16,6 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -89,12 +35,12 @@ build_triplet = @build@ host_triplet = @host@ subdir = src/xvmc +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -138,14 +84,9 @@ @XVMC_TRUE@ libchromeXvMC_la-viaXvMC.lo \ @XVMC_TRUE@ libchromeXvMC_la-xf86dri.lo libchromeXvMC_la_OBJECTS = $(am_libchromeXvMC_la_OBJECTS) -AM_V_lt = $(am__v_lt_@AM_V@) -am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) -am__v_lt_0 = --silent -am__v_lt_1 = -libchromeXvMC_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ - $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ - $(libchromeXvMC_la_CFLAGS) $(CFLAGS) \ - $(libchromeXvMC_la_LDFLAGS) $(LDFLAGS) -o $@ +libchromeXvMC_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libchromeXvMC_la_CFLAGS) \ + $(CFLAGS) $(libchromeXvMC_la_LDFLAGS) $(LDFLAGS) -o $@ @XVMC_TRUE@am_libchromeXvMC_la_rpath = -rpath $(libdir) libchromeXvMCPro_la_DEPENDENCIES = am__libchromeXvMCPro_la_SOURCES_DIST = viaLowLevelPro.c driDrawable.c \ @@ -157,79 +98,34 @@ @XVMC_TRUE@ libchromeXvMCPro_la-viaXvMC.lo \ @XVMC_TRUE@ libchromeXvMCPro_la-xf86dri.lo libchromeXvMCPro_la_OBJECTS = $(am_libchromeXvMCPro_la_OBJECTS) -libchromeXvMCPro_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ - $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ +libchromeXvMCPro_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(libchromeXvMCPro_la_CFLAGS) $(CFLAGS) \ $(libchromeXvMCPro_la_LDFLAGS) $(LDFLAGS) -o $@ @XVMC_TRUE@am_libchromeXvMCPro_la_rpath = -rpath $(libdir) -AM_V_P = $(am__v_P_@AM_V@) -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -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) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_@AM_V@) -am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) -am__v_CC_0 = @echo " CC " $@; -am__v_CC_1 = +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_@AM_V@) -am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) -am__v_CCLD_0 = @echo " CCLD " $@; -am__v_CCLD_1 = +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ SOURCES = $(libchromeXvMC_la_SOURCES) $(libchromeXvMCPro_la_SOURCES) DIST_SOURCES = $(am__libchromeXvMC_la_SOURCES_DIST) \ $(am__libchromeXvMCPro_la_SOURCES_DIST) -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -# Read a list of newline-separated strings from the standard input, -# and print each of them once, without duplicates. Input order is -# *not* preserved. -am__uniquify_input = $(AWK) '\ - BEGIN { nonempty = 0; } \ - { items[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in items) print i; }; } \ -' -# Make sure the list of sources is unique. This is necessary because, -# e.g., the same source file might be shared among _SOURCES variables -# for different programs/libraries. -am__define_uniq_tagged_files = \ - list='$(am__tagged_files)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ @@ -279,7 +175,6 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ @@ -431,6 +326,7 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/xvmc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/xvmc/Makefile +.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -448,9 +344,9 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): - 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 \ @@ -458,8 +354,6 @@ else :; fi; \ done; \ test -z "$$list2" || { \ - echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } @@ -475,20 +369,16 @@ clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; \ - locs=`for p in $$list; do echo $$p; done | \ - sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ - sort -u`; \ - test -z "$$locs" || { \ - echo rm -f $${locs}; \ - rm -f $${locs}; \ - } - + @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 libchromeXvMC.la: $(libchromeXvMC_la_OBJECTS) $(libchromeXvMC_la_DEPENDENCIES) $(EXTRA_libchromeXvMC_la_DEPENDENCIES) - $(AM_V_CCLD)$(libchromeXvMC_la_LINK) $(am_libchromeXvMC_la_rpath) $(libchromeXvMC_la_OBJECTS) $(libchromeXvMC_la_LIBADD) $(LIBS) - + $(libchromeXvMC_la_LINK) $(am_libchromeXvMC_la_rpath) $(libchromeXvMC_la_OBJECTS) $(libchromeXvMC_la_LIBADD) $(LIBS) libchromeXvMCPro.la: $(libchromeXvMCPro_la_OBJECTS) $(libchromeXvMCPro_la_DEPENDENCIES) $(EXTRA_libchromeXvMCPro_la_DEPENDENCIES) - $(AM_V_CCLD)$(libchromeXvMCPro_la_LINK) $(am_libchromeXvMCPro_la_rpath) $(libchromeXvMCPro_la_OBJECTS) $(libchromeXvMCPro_la_LIBADD) $(LIBS) + $(libchromeXvMCPro_la_LINK) $(am_libchromeXvMCPro_la_rpath) $(libchromeXvMCPro_la_OBJECTS) $(libchromeXvMCPro_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -506,81 +396,81 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libchromeXvMC_la-xf86dri.Plo@am__quote@ .c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@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@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< +@am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@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@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@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@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< libchromeXvMC_la-viaLowLevel.lo: viaLowLevel.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libchromeXvMC_la_CFLAGS) $(CFLAGS) -MT libchromeXvMC_la-viaLowLevel.lo -MD -MP -MF $(DEPDIR)/libchromeXvMC_la-viaLowLevel.Tpo -c -o libchromeXvMC_la-viaLowLevel.lo `test -f 'viaLowLevel.c' || echo '$(srcdir)/'`viaLowLevel.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libchromeXvMC_la-viaLowLevel.Tpo $(DEPDIR)/libchromeXvMC_la-viaLowLevel.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='viaLowLevel.c' object='libchromeXvMC_la-viaLowLevel.lo' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libchromeXvMC_la_CFLAGS) $(CFLAGS) -MT libchromeXvMC_la-viaLowLevel.lo -MD -MP -MF $(DEPDIR)/libchromeXvMC_la-viaLowLevel.Tpo -c -o libchromeXvMC_la-viaLowLevel.lo `test -f 'viaLowLevel.c' || echo '$(srcdir)/'`viaLowLevel.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libchromeXvMC_la-viaLowLevel.Tpo $(DEPDIR)/libchromeXvMC_la-viaLowLevel.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='viaLowLevel.c' object='libchromeXvMC_la-viaLowLevel.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libchromeXvMC_la_CFLAGS) $(CFLAGS) -c -o libchromeXvMC_la-viaLowLevel.lo `test -f 'viaLowLevel.c' || echo '$(srcdir)/'`viaLowLevel.c +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libchromeXvMC_la_CFLAGS) $(CFLAGS) -c -o libchromeXvMC_la-viaLowLevel.lo `test -f 'viaLowLevel.c' || echo '$(srcdir)/'`viaLowLevel.c libchromeXvMC_la-driDrawable.lo: driDrawable.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libchromeXvMC_la_CFLAGS) $(CFLAGS) -MT libchromeXvMC_la-driDrawable.lo -MD -MP -MF $(DEPDIR)/libchromeXvMC_la-driDrawable.Tpo -c -o libchromeXvMC_la-driDrawable.lo `test -f 'driDrawable.c' || echo '$(srcdir)/'`driDrawable.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libchromeXvMC_la-driDrawable.Tpo $(DEPDIR)/libchromeXvMC_la-driDrawable.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='driDrawable.c' object='libchromeXvMC_la-driDrawable.lo' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libchromeXvMC_la_CFLAGS) $(CFLAGS) -MT libchromeXvMC_la-driDrawable.lo -MD -MP -MF $(DEPDIR)/libchromeXvMC_la-driDrawable.Tpo -c -o libchromeXvMC_la-driDrawable.lo `test -f 'driDrawable.c' || echo '$(srcdir)/'`driDrawable.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libchromeXvMC_la-driDrawable.Tpo $(DEPDIR)/libchromeXvMC_la-driDrawable.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='driDrawable.c' object='libchromeXvMC_la-driDrawable.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libchromeXvMC_la_CFLAGS) $(CFLAGS) -c -o libchromeXvMC_la-driDrawable.lo `test -f 'driDrawable.c' || echo '$(srcdir)/'`driDrawable.c +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libchromeXvMC_la_CFLAGS) $(CFLAGS) -c -o libchromeXvMC_la-driDrawable.lo `test -f 'driDrawable.c' || echo '$(srcdir)/'`driDrawable.c libchromeXvMC_la-viaXvMC.lo: viaXvMC.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libchromeXvMC_la_CFLAGS) $(CFLAGS) -MT libchromeXvMC_la-viaXvMC.lo -MD -MP -MF $(DEPDIR)/libchromeXvMC_la-viaXvMC.Tpo -c -o libchromeXvMC_la-viaXvMC.lo `test -f 'viaXvMC.c' || echo '$(srcdir)/'`viaXvMC.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libchromeXvMC_la-viaXvMC.Tpo $(DEPDIR)/libchromeXvMC_la-viaXvMC.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='viaXvMC.c' object='libchromeXvMC_la-viaXvMC.lo' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libchromeXvMC_la_CFLAGS) $(CFLAGS) -MT libchromeXvMC_la-viaXvMC.lo -MD -MP -MF $(DEPDIR)/libchromeXvMC_la-viaXvMC.Tpo -c -o libchromeXvMC_la-viaXvMC.lo `test -f 'viaXvMC.c' || echo '$(srcdir)/'`viaXvMC.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libchromeXvMC_la-viaXvMC.Tpo $(DEPDIR)/libchromeXvMC_la-viaXvMC.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='viaXvMC.c' object='libchromeXvMC_la-viaXvMC.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libchromeXvMC_la_CFLAGS) $(CFLAGS) -c -o libchromeXvMC_la-viaXvMC.lo `test -f 'viaXvMC.c' || echo '$(srcdir)/'`viaXvMC.c +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libchromeXvMC_la_CFLAGS) $(CFLAGS) -c -o libchromeXvMC_la-viaXvMC.lo `test -f 'viaXvMC.c' || echo '$(srcdir)/'`viaXvMC.c libchromeXvMC_la-xf86dri.lo: xf86dri.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libchromeXvMC_la_CFLAGS) $(CFLAGS) -MT libchromeXvMC_la-xf86dri.lo -MD -MP -MF $(DEPDIR)/libchromeXvMC_la-xf86dri.Tpo -c -o libchromeXvMC_la-xf86dri.lo `test -f 'xf86dri.c' || echo '$(srcdir)/'`xf86dri.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libchromeXvMC_la-xf86dri.Tpo $(DEPDIR)/libchromeXvMC_la-xf86dri.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xf86dri.c' object='libchromeXvMC_la-xf86dri.lo' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libchromeXvMC_la_CFLAGS) $(CFLAGS) -MT libchromeXvMC_la-xf86dri.lo -MD -MP -MF $(DEPDIR)/libchromeXvMC_la-xf86dri.Tpo -c -o libchromeXvMC_la-xf86dri.lo `test -f 'xf86dri.c' || echo '$(srcdir)/'`xf86dri.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libchromeXvMC_la-xf86dri.Tpo $(DEPDIR)/libchromeXvMC_la-xf86dri.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xf86dri.c' object='libchromeXvMC_la-xf86dri.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libchromeXvMC_la_CFLAGS) $(CFLAGS) -c -o libchromeXvMC_la-xf86dri.lo `test -f 'xf86dri.c' || echo '$(srcdir)/'`xf86dri.c +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libchromeXvMC_la_CFLAGS) $(CFLAGS) -c -o libchromeXvMC_la-xf86dri.lo `test -f 'xf86dri.c' || echo '$(srcdir)/'`xf86dri.c libchromeXvMCPro_la-viaLowLevelPro.lo: viaLowLevelPro.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libchromeXvMCPro_la_CFLAGS) $(CFLAGS) -MT libchromeXvMCPro_la-viaLowLevelPro.lo -MD -MP -MF $(DEPDIR)/libchromeXvMCPro_la-viaLowLevelPro.Tpo -c -o libchromeXvMCPro_la-viaLowLevelPro.lo `test -f 'viaLowLevelPro.c' || echo '$(srcdir)/'`viaLowLevelPro.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libchromeXvMCPro_la-viaLowLevelPro.Tpo $(DEPDIR)/libchromeXvMCPro_la-viaLowLevelPro.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='viaLowLevelPro.c' object='libchromeXvMCPro_la-viaLowLevelPro.lo' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libchromeXvMCPro_la_CFLAGS) $(CFLAGS) -MT libchromeXvMCPro_la-viaLowLevelPro.lo -MD -MP -MF $(DEPDIR)/libchromeXvMCPro_la-viaLowLevelPro.Tpo -c -o libchromeXvMCPro_la-viaLowLevelPro.lo `test -f 'viaLowLevelPro.c' || echo '$(srcdir)/'`viaLowLevelPro.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libchromeXvMCPro_la-viaLowLevelPro.Tpo $(DEPDIR)/libchromeXvMCPro_la-viaLowLevelPro.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='viaLowLevelPro.c' object='libchromeXvMCPro_la-viaLowLevelPro.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libchromeXvMCPro_la_CFLAGS) $(CFLAGS) -c -o libchromeXvMCPro_la-viaLowLevelPro.lo `test -f 'viaLowLevelPro.c' || echo '$(srcdir)/'`viaLowLevelPro.c +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libchromeXvMCPro_la_CFLAGS) $(CFLAGS) -c -o libchromeXvMCPro_la-viaLowLevelPro.lo `test -f 'viaLowLevelPro.c' || echo '$(srcdir)/'`viaLowLevelPro.c libchromeXvMCPro_la-driDrawable.lo: driDrawable.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libchromeXvMCPro_la_CFLAGS) $(CFLAGS) -MT libchromeXvMCPro_la-driDrawable.lo -MD -MP -MF $(DEPDIR)/libchromeXvMCPro_la-driDrawable.Tpo -c -o libchromeXvMCPro_la-driDrawable.lo `test -f 'driDrawable.c' || echo '$(srcdir)/'`driDrawable.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libchromeXvMCPro_la-driDrawable.Tpo $(DEPDIR)/libchromeXvMCPro_la-driDrawable.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='driDrawable.c' object='libchromeXvMCPro_la-driDrawable.lo' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libchromeXvMCPro_la_CFLAGS) $(CFLAGS) -MT libchromeXvMCPro_la-driDrawable.lo -MD -MP -MF $(DEPDIR)/libchromeXvMCPro_la-driDrawable.Tpo -c -o libchromeXvMCPro_la-driDrawable.lo `test -f 'driDrawable.c' || echo '$(srcdir)/'`driDrawable.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libchromeXvMCPro_la-driDrawable.Tpo $(DEPDIR)/libchromeXvMCPro_la-driDrawable.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='driDrawable.c' object='libchromeXvMCPro_la-driDrawable.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libchromeXvMCPro_la_CFLAGS) $(CFLAGS) -c -o libchromeXvMCPro_la-driDrawable.lo `test -f 'driDrawable.c' || echo '$(srcdir)/'`driDrawable.c +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libchromeXvMCPro_la_CFLAGS) $(CFLAGS) -c -o libchromeXvMCPro_la-driDrawable.lo `test -f 'driDrawable.c' || echo '$(srcdir)/'`driDrawable.c libchromeXvMCPro_la-viaXvMC.lo: viaXvMC.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libchromeXvMCPro_la_CFLAGS) $(CFLAGS) -MT libchromeXvMCPro_la-viaXvMC.lo -MD -MP -MF $(DEPDIR)/libchromeXvMCPro_la-viaXvMC.Tpo -c -o libchromeXvMCPro_la-viaXvMC.lo `test -f 'viaXvMC.c' || echo '$(srcdir)/'`viaXvMC.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libchromeXvMCPro_la-viaXvMC.Tpo $(DEPDIR)/libchromeXvMCPro_la-viaXvMC.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='viaXvMC.c' object='libchromeXvMCPro_la-viaXvMC.lo' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libchromeXvMCPro_la_CFLAGS) $(CFLAGS) -MT libchromeXvMCPro_la-viaXvMC.lo -MD -MP -MF $(DEPDIR)/libchromeXvMCPro_la-viaXvMC.Tpo -c -o libchromeXvMCPro_la-viaXvMC.lo `test -f 'viaXvMC.c' || echo '$(srcdir)/'`viaXvMC.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libchromeXvMCPro_la-viaXvMC.Tpo $(DEPDIR)/libchromeXvMCPro_la-viaXvMC.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='viaXvMC.c' object='libchromeXvMCPro_la-viaXvMC.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libchromeXvMCPro_la_CFLAGS) $(CFLAGS) -c -o libchromeXvMCPro_la-viaXvMC.lo `test -f 'viaXvMC.c' || echo '$(srcdir)/'`viaXvMC.c +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libchromeXvMCPro_la_CFLAGS) $(CFLAGS) -c -o libchromeXvMCPro_la-viaXvMC.lo `test -f 'viaXvMC.c' || echo '$(srcdir)/'`viaXvMC.c libchromeXvMCPro_la-xf86dri.lo: xf86dri.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libchromeXvMCPro_la_CFLAGS) $(CFLAGS) -MT libchromeXvMCPro_la-xf86dri.lo -MD -MP -MF $(DEPDIR)/libchromeXvMCPro_la-xf86dri.Tpo -c -o libchromeXvMCPro_la-xf86dri.lo `test -f 'xf86dri.c' || echo '$(srcdir)/'`xf86dri.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libchromeXvMCPro_la-xf86dri.Tpo $(DEPDIR)/libchromeXvMCPro_la-xf86dri.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xf86dri.c' object='libchromeXvMCPro_la-xf86dri.lo' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libchromeXvMCPro_la_CFLAGS) $(CFLAGS) -MT libchromeXvMCPro_la-xf86dri.lo -MD -MP -MF $(DEPDIR)/libchromeXvMCPro_la-xf86dri.Tpo -c -o libchromeXvMCPro_la-xf86dri.lo `test -f 'xf86dri.c' || echo '$(srcdir)/'`xf86dri.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libchromeXvMCPro_la-xf86dri.Tpo $(DEPDIR)/libchromeXvMCPro_la-xf86dri.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xf86dri.c' object='libchromeXvMCPro_la-xf86dri.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libchromeXvMCPro_la_CFLAGS) $(CFLAGS) -c -o libchromeXvMCPro_la-xf86dri.lo `test -f 'xf86dri.c' || echo '$(srcdir)/'`xf86dri.c +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libchromeXvMCPro_la_CFLAGS) $(CFLAGS) -c -o libchromeXvMCPro_la-xf86dri.lo `test -f 'xf86dri.c' || echo '$(srcdir)/'`xf86dri.c mostlyclean-libtool: -rm -f *.lo @@ -588,15 +478,26 @@ clean-libtool: -rm -rf .libs _libs -ID: $(am__tagged_files) - $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-am -TAGS: tags +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-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ - $(am__define_uniq_tagged_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; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -608,11 +509,15 @@ $$unique; \ fi; \ fi -ctags: ctags-am - -CTAGS: ctags -ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - $(am__define_uniq_tagged_files); \ +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 @@ -621,21 +526,6 @@ here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" -cscopelist: cscopelist-am - -cscopelist-am: $(am__tagged_files) - list='$(am__tagged_files)'; \ - case "$(srcdir)" in \ - [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ - *) sdir=$(subdir)/$(srcdir) ;; \ - esac; \ - for i in $$list; do \ - if test -f "$$i"; then \ - echo "$(subdir)/$$i"; \ - else \ - echo "$$sdir/$$i"; \ - fi; \ - done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -780,21 +670,19 @@ .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ - clean-libLTLIBRARIES clean-libtool cscopelist-am ctags \ - ctags-am 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-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libLTLIBRARIES 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-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-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 tags-am uninstall uninstall-am uninstall-libLTLIBRARIES - -.PRECIOUS: Makefile + tags uninstall uninstall-am uninstall-libLTLIBRARIES # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -Nru xserver-xorg-video-openchrome-0.5.0/tools/Makefile.in xserver-xorg-video-openchrome-0.6.0/tools/Makefile.in --- xserver-xorg-video-openchrome-0.5.0/tools/Makefile.in 2016-07-06 16:22:04.000000000 +0000 +++ xserver-xorg-video-openchrome-0.6.0/tools/Makefile.in 2017-03-07 11:19:04.000000000 +0000 @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2014 Free Software Foundation, Inc. - +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -15,61 +16,6 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -90,12 +36,12 @@ host_triplet = @host@ @TOOLS_TRUE@sbin_PROGRAMS = via_regs_dump$(EXEEXT) subdir = tools +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -106,77 +52,28 @@ @TOOLS_TRUE@am_via_regs_dump_OBJECTS = registers.$(OBJEXT) via_regs_dump_OBJECTS = $(am_via_regs_dump_OBJECTS) via_regs_dump_LDADD = $(LDADD) -AM_V_lt = $(am__v_lt_@AM_V@) -am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) -am__v_lt_0 = --silent -am__v_lt_1 = -AM_V_P = $(am__v_P_@AM_V@) -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -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) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_@AM_V@) -am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) -am__v_CC_0 = @echo " CC " $@; -am__v_CC_1 = +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_@AM_V@) -am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) -am__v_CCLD_0 = @echo " CCLD " $@; -am__v_CCLD_1 = +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ SOURCES = $(via_regs_dump_SOURCES) DIST_SOURCES = $(am__via_regs_dump_SOURCES_DIST) -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -# Read a list of newline-separated strings from the standard input, -# and print each of them once, without duplicates. Input order is -# *not* preserved. -am__uniquify_input = $(AWK) '\ - BEGIN { nonempty = 0; } \ - { items[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in items) print i; }; } \ -' -# Make sure the list of sources is unique. This is necessary because, -# e.g., the same source file might be shared among _SOURCES variables -# for different programs/libraries. -am__define_uniq_tagged_files = \ - list='$(am__tagged_files)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ @@ -226,7 +123,6 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ @@ -337,6 +233,7 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tools/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign tools/Makefile +.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -356,19 +253,14 @@ $(am__aclocal_m4_deps): install-sbinPROGRAMS: $(sbin_PROGRAMS) @$(NORMAL_INSTALL) + test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)" @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \ - fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p \ - || test -f $$p1 \ - ; then echo "$$p"; echo "$$p"; else :; fi; \ + while read p p1; do if test -f $$p || test -f $$p1; \ + then echo "$$p"; echo "$$p"; else :; fi; \ done | \ - sed -e 'p;s,.*/,,;n;h' \ - -e 's|.*|.|' \ + sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ @@ -389,8 +281,7 @@ @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' \ - `; \ + -e 's/$$/$(EXEEXT)/' `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(sbindir)" && rm -f $$files @@ -403,10 +294,9 @@ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list - via_regs_dump$(EXEEXT): $(via_regs_dump_OBJECTS) $(via_regs_dump_DEPENDENCIES) $(EXTRA_via_regs_dump_DEPENDENCIES) @rm -f via_regs_dump$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(via_regs_dump_OBJECTS) $(via_regs_dump_LDADD) $(LIBS) + $(LINK) $(via_regs_dump_OBJECTS) $(via_regs_dump_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -417,25 +307,25 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/registers.Po@am__quote@ .c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@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@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< +@am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@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@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@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@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -443,15 +333,26 @@ clean-libtool: -rm -rf .libs _libs -ID: $(am__tagged_files) - $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-am -TAGS: tags +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-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ - $(am__define_uniq_tagged_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; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -463,11 +364,15 @@ $$unique; \ fi; \ fi -ctags: ctags-am - -CTAGS: ctags -ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - $(am__define_uniq_tagged_files); \ +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 @@ -476,21 +381,6 @@ here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" -cscopelist: cscopelist-am - -cscopelist-am: $(am__tagged_files) - list='$(am__tagged_files)'; \ - case "$(srcdir)" in \ - [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ - *) sdir=$(subdir)/$(srcdir) ;; \ - esac; \ - for i in $$list; do \ - if test -f "$$i"; then \ - echo "$(subdir)/$$i"; \ - else \ - echo "$$sdir/$$i"; \ - fi; \ - done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -635,21 +525,19 @@ .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-sbinPROGRAMS cscopelist-am ctags ctags-am \ - 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-man install-pdf install-pdf-am \ - install-ps install-ps-am install-sbinPROGRAMS install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-sbinPROGRAMS 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-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-sbinPROGRAMS 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 tags-am uninstall uninstall-am uninstall-sbinPROGRAMS - -.PRECIOUS: Makefile + tags uninstall uninstall-am uninstall-sbinPROGRAMS # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -Nru xserver-xorg-video-openchrome-0.5.0/tools/registers.c xserver-xorg-video-openchrome-0.6.0/tools/registers.c --- xserver-xorg-video-openchrome-0.5.0/tools/registers.c 2016-07-06 16:21:06.000000000 +0000 +++ xserver-xorg-video-openchrome-0.6.0/tools/registers.c 2017-01-06 03:33:01.000000000 +0000 @@ -15,7 +15,7 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include