diff -Nru banshee-community-extensions-2.0.1/aclocal.m4 banshee-community-extensions-2.2.0/aclocal.m4 --- banshee-community-extensions-2.0.1/aclocal.m4 2011-05-03 20:45:01.000000000 +0000 +++ banshee-community-extensions-2.2.0/aclocal.m4 2011-09-19 20:36:47.000000000 +0000 @@ -748,7972 +748,6 @@ # AC_DEFUN([AC_PROG_INTLTOOL], ...) -# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008 Free Software Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -m4_define([_LT_COPYING], [dnl -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008 Free Software Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is part of GNU Libtool. -# -# GNU Libtool is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, or -# obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -]) - -# serial 56 LT_INIT - - -# LT_PREREQ(VERSION) -# ------------------ -# Complain and exit if this libtool version is less that VERSION. -m4_defun([LT_PREREQ], -[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, - [m4_default([$3], - [m4_fatal([Libtool version $1 or higher is required], - 63)])], - [$2])]) - - -# _LT_CHECK_BUILDDIR -# ------------------ -# Complain if the absolute build directory name contains unusual characters -m4_defun([_LT_CHECK_BUILDDIR], -[case `pwd` in - *\ * | *\ *) - AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; -esac -]) - - -# LT_INIT([OPTIONS]) -# ------------------ -AC_DEFUN([LT_INIT], -[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT -AC_BEFORE([$0], [LT_LANG])dnl -AC_BEFORE([$0], [LT_OUTPUT])dnl -AC_BEFORE([$0], [LTDL_INIT])dnl -m4_require([_LT_CHECK_BUILDDIR])dnl - -dnl Autoconf doesn't catch unexpanded LT_ macros by default: -m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl -m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl -dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 -dnl unless we require an AC_DEFUNed macro: -AC_REQUIRE([LTOPTIONS_VERSION])dnl -AC_REQUIRE([LTSUGAR_VERSION])dnl -AC_REQUIRE([LTVERSION_VERSION])dnl -AC_REQUIRE([LTOBSOLETE_VERSION])dnl -m4_require([_LT_PROG_LTMAIN])dnl - -dnl Parse OPTIONS -_LT_SET_OPTIONS([$0], [$1]) - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' -AC_SUBST(LIBTOOL)dnl - -_LT_SETUP - -# Only expand once: -m4_define([LT_INIT]) -])# LT_INIT - -# Old names: -AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) -AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_PROG_LIBTOOL], []) -dnl AC_DEFUN([AM_PROG_LIBTOOL], []) - - -# _LT_CC_BASENAME(CC) -# ------------------- -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -m4_defun([_LT_CC_BASENAME], -[for cc_temp in $1""; do - case $cc_temp in - compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; - distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` -]) - - -# _LT_FILEUTILS_DEFAULTS -# ---------------------- -# It is okay to use these file commands and assume they have been set -# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. -m4_defun([_LT_FILEUTILS_DEFAULTS], -[: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} -])# _LT_FILEUTILS_DEFAULTS - - -# _LT_SETUP -# --------- -m4_defun([_LT_SETUP], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -_LT_DECL([], [host_alias], [0], [The host system])dnl -_LT_DECL([], [host], [0])dnl -_LT_DECL([], [host_os], [0])dnl -dnl -_LT_DECL([], [build_alias], [0], [The build system])dnl -_LT_DECL([], [build], [0])dnl -_LT_DECL([], [build_os], [0])dnl -dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([LT_PATH_LD])dnl -AC_REQUIRE([LT_PATH_NM])dnl -dnl -AC_REQUIRE([AC_PROG_LN_S])dnl -test -z "$LN_S" && LN_S="ln -s" -_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl -dnl -AC_REQUIRE([LT_CMD_MAX_LEN])dnl -_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl -_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl -dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_CHECK_SHELL_FEATURES])dnl -m4_require([_LT_CMD_RELOAD])dnl -m4_require([_LT_CHECK_MAGIC_METHOD])dnl -m4_require([_LT_CMD_OLD_ARCHIVE])dnl -m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl - -_LT_CONFIG_LIBTOOL_INIT([ -# See if we are running on zsh, and set the options which allow our -# commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi -]) -if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - -_LT_CHECK_OBJDIR - -m4_require([_LT_TAG_COMPILER])dnl -_LT_PROG_ECHO_BACKSLASH - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\([["`\\]]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - -# Global variables: -ofile=libtool -can_build_shared=yes - -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a - -with_gnu_ld="$lt_cv_prog_gnu_ld" - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o - -_LT_CC_BASENAME([$compiler]) - -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - _LT_PATH_MAGIC - fi - ;; -esac - -# Use C for the default configuration in the libtool script -LT_SUPPORTED_TAG([CC]) -_LT_LANG_C_CONFIG -_LT_LANG_DEFAULT_CONFIG -_LT_CONFIG_COMMANDS -])# _LT_SETUP - - -# _LT_PROG_LTMAIN -# --------------- -# Note that this code is called both from `configure', and `config.status' -# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, -# `config.status' has no value for ac_aux_dir unless we are using Automake, -# so we pass a copy along to make sure it has a sensible value anyway. -m4_defun([_LT_PROG_LTMAIN], -[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl -_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) -ltmain="$ac_aux_dir/ltmain.sh" -])# _LT_PROG_LTMAIN - - - -# So that we can recreate a full libtool script including additional -# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS -# in macros and then make a single call at the end using the `libtool' -# label. - - -# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) -# ---------------------------------------- -# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL_INIT], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_INIT], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_INIT]) - - -# _LT_CONFIG_LIBTOOL([COMMANDS]) -# ------------------------------ -# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) - - -# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) -# ----------------------------------------------------- -m4_defun([_LT_CONFIG_SAVE_COMMANDS], -[_LT_CONFIG_LIBTOOL([$1]) -_LT_CONFIG_LIBTOOL_INIT([$2]) -]) - - -# _LT_FORMAT_COMMENT([COMMENT]) -# ----------------------------- -# Add leading comment marks to the start of each line, and a trailing -# full-stop to the whole comment if one is not present already. -m4_define([_LT_FORMAT_COMMENT], -[m4_ifval([$1], [ -m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], - [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) -)]) - - - - - -# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) -# ------------------------------------------------------------------- -# CONFIGNAME is the name given to the value in the libtool script. -# VARNAME is the (base) name used in the configure script. -# VALUE may be 0, 1 or 2 for a computed quote escaped value based on -# VARNAME. Any other value will be used directly. -m4_define([_LT_DECL], -[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], - [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], - [m4_ifval([$1], [$1], [$2])]) - lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) - m4_ifval([$4], - [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) - lt_dict_add_subkey([lt_decl_dict], [$2], - [tagged?], [m4_ifval([$5], [yes], [no])])]) -]) - - -# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) -# -------------------------------------------------------- -m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) - - -# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_tag_varnames], -[_lt_decl_filter([tagged?], [yes], $@)]) - - -# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) -# --------------------------------------------------------- -m4_define([_lt_decl_filter], -[m4_case([$#], - [0], [m4_fatal([$0: too few arguments: $#])], - [1], [m4_fatal([$0: too few arguments: $#: $1])], - [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], - [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], - [lt_dict_filter([lt_decl_dict], $@)])[]dnl -]) - - -# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) -# -------------------------------------------------- -m4_define([lt_decl_quote_varnames], -[_lt_decl_filter([value], [1], $@)]) - - -# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_dquote_varnames], -[_lt_decl_filter([value], [2], $@)]) - - -# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_varnames_tagged], -[m4_assert([$# <= 2])dnl -_$0(m4_quote(m4_default([$1], [[, ]])), - m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), - m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) -m4_define([_lt_decl_varnames_tagged], -[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) - - -# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_all_varnames], -[_$0(m4_quote(m4_default([$1], [[, ]])), - m4_if([$2], [], - m4_quote(lt_decl_varnames), - m4_quote(m4_shift($@))))[]dnl -]) -m4_define([_lt_decl_all_varnames], -[lt_join($@, lt_decl_varnames_tagged([$1], - lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl -]) - - -# _LT_CONFIG_STATUS_DECLARE([VARNAME]) -# ------------------------------------ -# Quote a variable value, and forward it to `config.status' so that its -# declaration there will have the same value as in `configure'. VARNAME -# must have a single quote delimited value for this to work. -m4_define([_LT_CONFIG_STATUS_DECLARE], -[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`']) - - -# _LT_CONFIG_STATUS_DECLARATIONS -# ------------------------------ -# We delimit libtool config variables with single quotes, so when -# we write them to config.status, we have to be sure to quote all -# embedded single quotes properly. In configure, this macro expands -# each variable declared with _LT_DECL (and _LT_TAGDECL) into: -# -# ='`$ECHO "X$" | $Xsed -e "$delay_single_quote_subst"`' -m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], -[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), - [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAGS -# ---------------- -# Output comment and list of tags supported by the script -m4_defun([_LT_LIBTOOL_TAGS], -[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl -available_tags="_LT_TAGS"dnl -]) - - -# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) -# ----------------------------------- -# Extract the dictionary values for VARNAME (optionally with TAG) and -# expand to a commented shell variable setting: -# -# # Some comment about what VAR is for. -# visible_name=$lt_internal_name -m4_define([_LT_LIBTOOL_DECLARE], -[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], - [description])))[]dnl -m4_pushdef([_libtool_name], - m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl -m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), - [0], [_libtool_name=[$]$1], - [1], [_libtool_name=$lt_[]$1], - [2], [_libtool_name=$lt_[]$1], - [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl -m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl -]) - - -# _LT_LIBTOOL_CONFIG_VARS -# ----------------------- -# Produce commented declarations of non-tagged libtool config variables -# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' -# script. Tagged libtool config variables (even for the LIBTOOL CONFIG -# section) are produced by _LT_LIBTOOL_TAG_VARS. -m4_defun([_LT_LIBTOOL_CONFIG_VARS], -[m4_foreach([_lt_var], - m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAG_VARS(TAG) -# ------------------------- -m4_define([_LT_LIBTOOL_TAG_VARS], -[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) - - -# _LT_TAGVAR(VARNAME, [TAGNAME]) -# ------------------------------ -m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) - - -# _LT_CONFIG_COMMANDS -# ------------------- -# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of -# variables for single and double quote escaping we saved from calls -# to _LT_DECL, we can put quote escaped variables declarations -# into `config.status', and then the shell code to quote escape them in -# for loops in `config.status'. Finally, any additional code accumulated -# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. -m4_defun([_LT_CONFIG_COMMANDS], -[AC_PROVIDE_IFELSE([LT_OUTPUT], - dnl If the libtool generation code has been placed in $CONFIG_LT, - dnl instead of duplicating it all over again into config.status, - dnl then we will have config.status run $CONFIG_LT later, so it - dnl needs to know what name is stored there: - [AC_CONFIG_COMMANDS([libtool], - [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], - dnl If the libtool generation code is destined for config.status, - dnl expand the accumulated commands and init code now: - [AC_CONFIG_COMMANDS([libtool], - [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) -])#_LT_CONFIG_COMMANDS - - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], -[ - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='$sed_quote_subst' -double_quote_subst='$double_quote_subst' -delay_variable_subst='$delay_variable_subst' -_LT_CONFIG_STATUS_DECLARATIONS -LTCC='$LTCC' -LTCFLAGS='$LTCFLAGS' -compiler='$compiler_DEFAULT' - -# Quote evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_quote_varnames); do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_dquote_varnames); do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Fix-up fallback echo if it was mangled by the above quoting rules. -case \$lt_ECHO in -*'\\\[$]0 --fallback-echo"')dnl " - lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\` - ;; -esac - -_LT_OUTPUT_LIBTOOL_INIT -]) - - -# LT_OUTPUT -# --------- -# This macro allows early generation of the libtool script (before -# AC_OUTPUT is called), incase it is used in configure for compilation -# tests. -AC_DEFUN([LT_OUTPUT], -[: ${CONFIG_LT=./config.lt} -AC_MSG_NOTICE([creating $CONFIG_LT]) -cat >"$CONFIG_LT" <<_LTEOF -#! $SHELL -# Generated by $as_me. -# Run this file to recreate a libtool stub with the current configuration. - -lt_cl_silent=false -SHELL=\${CONFIG_SHELL-$SHELL} -_LTEOF - -cat >>"$CONFIG_LT" <<\_LTEOF -AS_SHELL_SANITIZE -_AS_PREPARE - -exec AS_MESSAGE_FD>&1 -exec AS_MESSAGE_LOG_FD>>config.log -{ - echo - AS_BOX([Running $as_me.]) -} >&AS_MESSAGE_LOG_FD - -lt_cl_help="\ -\`$as_me' creates a local libtool stub from the current configuration, -for use in further configure time tests before the real libtool is -generated. - -Usage: $[0] [[OPTIONS]] - - -h, --help print this help, then exit - -V, --version print version number, then exit - -q, --quiet do not print progress messages - -d, --debug don't remove temporary files - -Report bugs to ." - -lt_cl_version="\ -m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl -m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) -configured by $[0], generated by m4_PACKAGE_STRING. - -Copyright (C) 2008 Free Software Foundation, Inc. -This config.lt script is free software; the Free Software Foundation -gives unlimited permision to copy, distribute and modify it." - -while test $[#] != 0 -do - case $[1] in - --version | --v* | -V ) - echo "$lt_cl_version"; exit 0 ;; - --help | --h* | -h ) - echo "$lt_cl_help"; exit 0 ;; - --debug | --d* | -d ) - debug=: ;; - --quiet | --q* | --silent | --s* | -q ) - lt_cl_silent=: ;; - - -*) AC_MSG_ERROR([unrecognized option: $[1] -Try \`$[0] --help' for more information.]) ;; - - *) AC_MSG_ERROR([unrecognized argument: $[1] -Try \`$[0] --help' for more information.]) ;; - esac - shift -done - -if $lt_cl_silent; then - exec AS_MESSAGE_FD>/dev/null -fi -_LTEOF - -cat >>"$CONFIG_LT" <<_LTEOF -_LT_OUTPUT_LIBTOOL_COMMANDS_INIT -_LTEOF - -cat >>"$CONFIG_LT" <<\_LTEOF -AC_MSG_NOTICE([creating $ofile]) -_LT_OUTPUT_LIBTOOL_COMMANDS -AS_EXIT(0) -_LTEOF -chmod +x "$CONFIG_LT" - -# configure is writing to config.log, but config.lt does its own redirection, -# appending to config.log, which fails on DOS, as config.log is still kept -# open by configure. Here we exec the FD to /dev/null, effectively closing -# config.log, so it can be properly (re)opened and appended to by config.lt. -if test "$no_create" != yes; then - lt_cl_success=: - test "$silent" = yes && - lt_config_lt_args="$lt_config_lt_args --quiet" - exec AS_MESSAGE_LOG_FD>/dev/null - $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false - exec AS_MESSAGE_LOG_FD>>config.log - $lt_cl_success || AS_EXIT(1) -fi -])# LT_OUTPUT - - -# _LT_CONFIG(TAG) -# --------------- -# If TAG is the built-in tag, create an initial libtool script with a -# default configuration from the untagged config vars. Otherwise add code -# to config.status for appending the configuration named by TAG from the -# matching tagged config vars. -m4_defun([_LT_CONFIG], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -_LT_CONFIG_SAVE_COMMANDS([ - m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl - m4_if(_LT_TAG, [C], [ - # See if we are running on zsh, and set the options which allow our - # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - - cfgfile="${ofile}T" - trap "$RM \"$cfgfile\"; exit 1" 1 2 15 - $RM "$cfgfile" - - cat <<_LT_EOF >> "$cfgfile" -#! $SHELL - -# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -_LT_COPYING -_LT_LIBTOOL_TAGS - -# ### BEGIN LIBTOOL CONFIG -_LT_LIBTOOL_CONFIG_VARS -_LT_LIBTOOL_TAG_VARS -# ### END LIBTOOL CONFIG - -_LT_EOF - - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -_LT_EOF - ;; - esac - - _LT_PROG_LTMAIN - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - _LT_PROG_XSI_SHELLFNS - - sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" -], -[cat <<_LT_EOF >> "$ofile" - -dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded -dnl in a comment (ie after a #). -# ### BEGIN LIBTOOL TAG CONFIG: $1 -_LT_LIBTOOL_TAG_VARS(_LT_TAG) -# ### END LIBTOOL TAG CONFIG: $1 -_LT_EOF -])dnl /m4_if -], -[m4_if([$1], [], [ - PACKAGE='$PACKAGE' - VERSION='$VERSION' - TIMESTAMP='$TIMESTAMP' - RM='$RM' - ofile='$ofile'], []) -])dnl /_LT_CONFIG_SAVE_COMMANDS -])# _LT_CONFIG - - -# LT_SUPPORTED_TAG(TAG) -# --------------------- -# Trace this macro to discover what tags are supported by the libtool -# --tag option, using: -# autoconf --trace 'LT_SUPPORTED_TAG:$1' -AC_DEFUN([LT_SUPPORTED_TAG], []) - - -# C support is built-in for now -m4_define([_LT_LANG_C_enabled], []) -m4_define([_LT_TAGS], []) - - -# LT_LANG(LANG) -# ------------- -# Enable libtool support for the given language if not already enabled. -AC_DEFUN([LT_LANG], -[AC_BEFORE([$0], [LT_OUTPUT])dnl -m4_case([$1], - [C], [_LT_LANG(C)], - [C++], [_LT_LANG(CXX)], - [Java], [_LT_LANG(GCJ)], - [Fortran 77], [_LT_LANG(F77)], - [Fortran], [_LT_LANG(FC)], - [Windows Resource], [_LT_LANG(RC)], - [m4_ifdef([_LT_LANG_]$1[_CONFIG], - [_LT_LANG($1)], - [m4_fatal([$0: unsupported language: "$1"])])])dnl -])# LT_LANG - - -# _LT_LANG(LANGNAME) -# ------------------ -m4_defun([_LT_LANG], -[m4_ifdef([_LT_LANG_]$1[_enabled], [], - [LT_SUPPORTED_TAG([$1])dnl - m4_append([_LT_TAGS], [$1 ])dnl - m4_define([_LT_LANG_]$1[_enabled], [])dnl - _LT_LANG_$1_CONFIG($1)])dnl -])# _LT_LANG - - -# _LT_LANG_DEFAULT_CONFIG -# ----------------------- -m4_defun([_LT_LANG_DEFAULT_CONFIG], -[AC_PROVIDE_IFELSE([AC_PROG_CXX], - [LT_LANG(CXX)], - [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) - -AC_PROVIDE_IFELSE([AC_PROG_F77], - [LT_LANG(F77)], - [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) - -AC_PROVIDE_IFELSE([AC_PROG_FC], - [LT_LANG(FC)], - [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) - -dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal -dnl pulling things in needlessly. -AC_PROVIDE_IFELSE([AC_PROG_GCJ], - [LT_LANG(GCJ)], - [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], - [LT_LANG(GCJ)], - [AC_PROVIDE_IFELSE([LT_PROG_GCJ], - [LT_LANG(GCJ)], - [m4_ifdef([AC_PROG_GCJ], - [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) - m4_ifdef([A][M_PROG_GCJ], - [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) - m4_ifdef([LT_PROG_GCJ], - [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) - -AC_PROVIDE_IFELSE([LT_PROG_RC], - [LT_LANG(RC)], - [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) -])# _LT_LANG_DEFAULT_CONFIG - -# Obsolete macros: -AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) -AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) -AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) -AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_CXX], []) -dnl AC_DEFUN([AC_LIBTOOL_F77], []) -dnl AC_DEFUN([AC_LIBTOOL_FC], []) -dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) - - -# _LT_TAG_COMPILER -# ---------------- -m4_defun([_LT_TAG_COMPILER], -[AC_REQUIRE([AC_PROG_CC])dnl - -_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl -_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl -_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl -_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC -])# _LT_TAG_COMPILER - - -# _LT_COMPILER_BOILERPLATE -# ------------------------ -# Check for compiler boilerplate output or warnings with -# the simple compiler test code. -m4_defun([_LT_COMPILER_BOILERPLATE], -[m4_require([_LT_DECL_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* -])# _LT_COMPILER_BOILERPLATE - - -# _LT_LINKER_BOILERPLATE -# ---------------------- -# Check for linker boilerplate output or warnings with -# the simple link test code. -m4_defun([_LT_LINKER_BOILERPLATE], -[m4_require([_LT_DECL_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* -])# _LT_LINKER_BOILERPLATE - -# _LT_REQUIRED_DARWIN_CHECKS -# ------------------------- -m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ - case $host_os in - rhapsody* | darwin*) - AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) - AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) - AC_CHECK_TOOL([LIPO], [lipo], [:]) - AC_CHECK_TOOL([OTOOL], [otool], [:]) - AC_CHECK_TOOL([OTOOL64], [otool64], [:]) - _LT_DECL([], [DSYMUTIL], [1], - [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) - _LT_DECL([], [NMEDIT], [1], - [Tool to change global to local symbols on Mac OS X]) - _LT_DECL([], [LIPO], [1], - [Tool to manipulate fat objects and archives on Mac OS X]) - _LT_DECL([], [OTOOL], [1], - [ldd/readelf like tool for Mach-O binaries on Mac OS X]) - _LT_DECL([], [OTOOL64], [1], - [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) - - AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], - [lt_cv_apple_cc_single_mod=no - if test -z "${LT_MULTI_MODULE}"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - rm -rf libconftest.dylib* - echo "int foo(void){return 1;}" > conftest.c - echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ --dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib -Wl,-single_module conftest.c 2>conftest.err - _lt_result=$? - if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then - lt_cv_apple_cc_single_mod=yes - else - cat conftest.err >&AS_MESSAGE_LOG_FD - fi - rm -rf libconftest.dylib* - rm -f conftest.* - fi]) - AC_CACHE_CHECK([for -exported_symbols_list linker flag], - [lt_cv_ld_exported_symbols_list], - [lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [lt_cv_ld_exported_symbols_list=yes], - [lt_cv_ld_exported_symbols_list=no]) - LDFLAGS="$save_LDFLAGS" - ]) - case $host_os in - rhapsody* | darwin1.[[012]]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[[012]]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then - _lt_dar_single_mod='$single_module' - fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - if test "$DSYMUTIL" != ":"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac -]) - - -# _LT_DARWIN_LINKER_FEATURES -# -------------------------- -# Checks for linker and compiler features on darwin -m4_defun([_LT_DARWIN_LINKER_FEATURES], -[ - m4_require([_LT_REQUIRED_DARWIN_CHECKS]) - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_automatic, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_TAGVAR(whole_archive_flag_spec, $1)='' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" - case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=echo - _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - m4_if([$1], [CXX], -[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then - _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" - fi -],[]) - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi -]) - -# _LT_SYS_MODULE_PATH_AIX -# ----------------------- -# Links a minimal program and checks the executable -# for the system default hardcoded library path. In most cases, -# this is /usr/lib:/lib, but when the MPI compilers are used -# the location of the communication and MPI libs are included too. -# If we don't find anything, use the default library path according -# to the aix ld manual. -m4_defun([_LT_SYS_MODULE_PATH_AIX], -[m4_require([_LT_DECL_SED])dnl -AC_LINK_IFELSE(AC_LANG_PROGRAM,[ -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi],[]) -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -])# _LT_SYS_MODULE_PATH_AIX - - -# _LT_SHELL_INIT(ARG) -# ------------------- -m4_define([_LT_SHELL_INIT], -[ifdef([AC_DIVERSION_NOTICE], - [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], - [AC_DIVERT_PUSH(NOTICE)]) -$1 -AC_DIVERT_POP -])# _LT_SHELL_INIT - - -# _LT_PROG_ECHO_BACKSLASH -# ----------------------- -# Add some code to the start of the generated configure script which -# will find an echo command which doesn't interpret backslashes. -m4_defun([_LT_PROG_ECHO_BACKSLASH], -[_LT_SHELL_INIT([ -# Check that we are running under the correct shell. -SHELL=${CONFIG_SHELL-/bin/sh} - -case X$lt_ECHO in -X*--fallback-echo) - # Remove one level of quotation (which was required for Make). - ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` - ;; -esac - -ECHO=${lt_ECHO-echo} -if test "X[$]1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X[$]1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then - # Yippee, $ECHO works! - : -else - # Restart under the correct shell. - exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} -fi - -if test "X[$]1" = X--fallback-echo; then - # used as fallback echo - shift - cat <<_LT_EOF -[$]* -_LT_EOF - exit 0 -fi - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -if test -z "$lt_ECHO"; then - if test "X${echo_test_string+set}" != Xset; then - # find a string as large as possible, as long as the shell can cope with it - for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do - # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if { echo_test_string=`eval $cmd`; } 2>/dev/null && - { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null - then - break - fi - done - fi - - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - : - else - # The Solaris, AIX, and Digital Unix default echo programs unquote - # backslashes. This makes it impossible to quote backslashes using - # echo "$something" | sed 's/\\/\\\\/g' - # - # So, first we look for a working echo in the user's PATH. - - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for dir in $PATH /usr/ucb; do - IFS="$lt_save_ifs" - if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && - test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$dir/echo" - break - fi - done - IFS="$lt_save_ifs" - - if test "X$ECHO" = Xecho; then - # We didn't find a better echo, so look for alternatives. - if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # This shell has a builtin print -r that does the trick. - ECHO='print -r' - elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && - test "X$CONFIG_SHELL" != X/bin/ksh; then - # If we have ksh, try running configure again with it. - ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} - export ORIGINAL_CONFIG_SHELL - CONFIG_SHELL=/bin/ksh - export CONFIG_SHELL - exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} - else - # Try using printf. - ECHO='printf %s\n' - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # Cool, printf works - : - elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL - export CONFIG_SHELL - SHELL="$CONFIG_SHELL" - export SHELL - ECHO="$CONFIG_SHELL [$]0 --fallback-echo" - elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$CONFIG_SHELL [$]0 --fallback-echo" - else - # maybe with a smaller string... - prev=: - - for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do - if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null - then - break - fi - prev="$cmd" - done - - if test "$prev" != 'sed 50q "[$]0"'; then - echo_test_string=`eval $prev` - export echo_test_string - exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} - else - # Oops. We lost completely, so just stick with echo. - ECHO=echo - fi - fi - fi - fi - fi -fi - -# Copy echo and quote the copy suitably for passing to libtool from -# the Makefile, instead of quoting the original, which is used later. -lt_ECHO=$ECHO -if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then - lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" -fi - -AC_SUBST(lt_ECHO) -]) -_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) -_LT_DECL([], [ECHO], [1], - [An echo program that does not interpret backslashes]) -])# _LT_PROG_ECHO_BACKSLASH - - -# _LT_ENABLE_LOCK -# --------------- -m4_defun([_LT_ENABLE_LOCK], -[AC_ARG_ENABLE([libtool-lock], - [AS_HELP_STRING([--disable-libtool-lock], - [avoid locking (might break parallel builds)])]) -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE="32" - ;; - *ELF-64*) - HPUX_IA64_MODE="64" - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out which ABI we are using. - echo '[#]line __oline__ "configure"' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - if test "$lt_cv_prog_gnu_ld" = yes; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; - ppc64-*linux*|powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - ppc*-*linux*|powerpc*-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, - [AC_LANG_PUSH(C) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) - AC_LANG_POP]) - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; -sparc*-*solaris*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -esac - -need_locks="$enable_libtool_lock" -])# _LT_ENABLE_LOCK - - -# _LT_CMD_OLD_ARCHIVE -# ------------------- -m4_defun([_LT_CMD_OLD_ARCHIVE], -[AC_CHECK_TOOL(AR, ar, false) -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru -_LT_DECL([], [AR], [1], [The archiver]) -_LT_DECL([], [AR_FLAGS], [1]) - -AC_CHECK_TOOL(STRIP, strip, :) -test -z "$STRIP" && STRIP=: -_LT_DECL([], [STRIP], [1], [A symbol stripping program]) - -AC_CHECK_TOOL(RANLIB, ranlib, :) -test -z "$RANLIB" && RANLIB=: -_LT_DECL([], [RANLIB], [1], - [Commands used to install an old-style archive]) - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" -fi -_LT_DECL([], [old_postinstall_cmds], [2]) -_LT_DECL([], [old_postuninstall_cmds], [2]) -_LT_TAGDECL([], [old_archive_cmds], [2], - [Commands used to build an old-style archive]) -])# _LT_CMD_OLD_ARCHIVE - - -# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------------------- -# Check whether the given compiler option works -AC_DEFUN([_LT_COMPILER_OPTION], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$3" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - fi - $RM conftest* -]) - -if test x"[$]$2" = xyes; then - m4_if([$5], , :, [$5]) -else - m4_if([$6], , :, [$6]) -fi -])# _LT_COMPILER_OPTION - -# Old name: -AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) - - -# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------- -# Check whether the given linker option works -AC_DEFUN([_LT_LINKER_OPTION], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $3" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&AS_MESSAGE_LOG_FD - $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - else - $2=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" -]) - -if test x"[$]$2" = xyes; then - m4_if([$4], , :, [$4]) -else - m4_if([$5], , :, [$5]) -fi -])# _LT_LINKER_OPTION - -# Old name: -AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) - - -# LT_CMD_MAX_LEN -#--------------- -AC_DEFUN([LT_CMD_MAX_LEN], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -# find the maximum length of command line arguments -AC_MSG_CHECKING([the maximum length of command line arguments]) -AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl - i=0 - teststring="ABCD" - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw* | cegcc*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8 ; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ - = "XX$teststring$teststring"; } >/dev/null 2>&1 && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - # Only check the string length outside the loop. - lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` - teststring= - # Add a significant safety factor because C++ compilers can tack on - # massive amounts of additional arguments before passing them to the - # linker. It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac -]) -if test -n $lt_cv_sys_max_cmd_len ; then - AC_MSG_RESULT($lt_cv_sys_max_cmd_len) -else - AC_MSG_RESULT(none) -fi -max_cmd_len=$lt_cv_sys_max_cmd_len -_LT_DECL([], [max_cmd_len], [0], - [What is the maximum length of a command?]) -])# LT_CMD_MAX_LEN - -# Old name: -AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) - - -# _LT_HEADER_DLFCN -# ---------------- -m4_defun([_LT_HEADER_DLFCN], -[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl -])# _LT_HEADER_DLFCN - - -# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, -# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) -# ---------------------------------------------------------------- -m4_defun([_LT_TRY_DLOPEN_SELF], -[m4_require([_LT_HEADER_DLFCN])dnl -if test "$cross_compiling" = yes; then : - [$4] -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -[#line __oline__ "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -}] -_LT_EOF - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) $1 ;; - x$lt_dlneed_uscore) $2 ;; - x$lt_dlunknown|x*) $3 ;; - esac - else : - # compilation failed - $3 - fi -fi -rm -fr conftest* -])# _LT_TRY_DLOPEN_SELF - - -# LT_SYS_DLOPEN_SELF -# ------------------ -AC_DEFUN([LT_SYS_DLOPEN_SELF], -[m4_require([_LT_HEADER_DLFCN])dnl -if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32* | cegcc*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ]) - ;; - - *) - AC_CHECK_FUNC([shl_load], - [lt_cv_dlopen="shl_load"], - [AC_CHECK_LIB([dld], [shl_load], - [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], - [AC_CHECK_FUNC([dlopen], - [lt_cv_dlopen="dlopen"], - [AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], - [AC_CHECK_LIB([svld], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], - [AC_CHECK_LIB([dld], [dld_link], - [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) - ]) - ]) - ]) - ]) - ]) - ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" - - AC_CACHE_CHECK([whether a program can dlopen itself], - lt_cv_dlopen_self, [dnl - _LT_TRY_DLOPEN_SELF( - lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, - lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) - ]) - - if test "x$lt_cv_dlopen_self" = xyes; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - AC_CACHE_CHECK([whether a statically linked program can dlopen itself], - lt_cv_dlopen_self_static, [dnl - _LT_TRY_DLOPEN_SELF( - lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, - lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) - ]) - fi - - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi -_LT_DECL([dlopen_support], [enable_dlopen], [0], - [Whether dlopen is supported]) -_LT_DECL([dlopen_self], [enable_dlopen_self], [0], - [Whether dlopen of programs is supported]) -_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], - [Whether dlopen of statically linked programs is supported]) -])# LT_SYS_DLOPEN_SELF - -# Old name: -AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) - - -# _LT_COMPILER_C_O([TAGNAME]) -# --------------------------- -# Check to see if options -c and -o are simultaneously supported by compiler. -# This macro does not hard code the compiler like AC_PROG_CC_C_O. -m4_defun([_LT_COMPILER_C_O], -[m4_require([_LT_DECL_SED])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_TAG_COMPILER])dnl -AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], - [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], - [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - fi - fi - chmod u+w . 2>&AS_MESSAGE_LOG_FD - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* -]) -_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], - [Does compiler simultaneously support -c and -o options?]) -])# _LT_COMPILER_C_O - - -# _LT_COMPILER_FILE_LOCKS([TAGNAME]) -# ---------------------------------- -# Check to see if we can do hard links to lock some files if needed -m4_defun([_LT_COMPILER_FILE_LOCKS], -[m4_require([_LT_ENABLE_LOCK])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -_LT_COMPILER_C_O([$1]) - -hard_links="nottested" -if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - AC_MSG_CHECKING([if we can lock with hard links]) - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - AC_MSG_RESULT([$hard_links]) - if test "$hard_links" = no; then - AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) - need_locks=warn - fi -else - need_locks=no -fi -_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) -])# _LT_COMPILER_FILE_LOCKS - - -# _LT_CHECK_OBJDIR -# ---------------- -m4_defun([_LT_CHECK_OBJDIR], -[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], -[rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null]) -objdir=$lt_cv_objdir -_LT_DECL([], [objdir], [0], - [The name of the directory that contains temporary libtool files])dnl -m4_pattern_allow([LT_OBJDIR])dnl -AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", - [Define to the sub-directory in which libtool stores uninstalled libraries.]) -])# _LT_CHECK_OBJDIR - - -# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) -# -------------------------------------- -# Check hardcoding attributes. -m4_defun([_LT_LINKER_HARDCODE_LIBPATH], -[AC_MSG_CHECKING([how to hardcode library paths into programs]) -_LT_TAGVAR(hardcode_action, $1)= -if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || - test -n "$_LT_TAGVAR(runpath_var, $1)" || - test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then - - # We can hardcode non-existent directories. - if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && - test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then - # Linking always hardcodes the temporary library directory. - _LT_TAGVAR(hardcode_action, $1)=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - _LT_TAGVAR(hardcode_action, $1)=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - _LT_TAGVAR(hardcode_action, $1)=unsupported -fi -AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) - -if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || - test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi -_LT_TAGDECL([], [hardcode_action], [0], - [How to hardcode a shared library path into an executable]) -])# _LT_LINKER_HARDCODE_LIBPATH - - -# _LT_CMD_STRIPLIB -# ---------------- -m4_defun([_LT_CMD_STRIPLIB], -[m4_require([_LT_DECL_EGREP]) -striplib= -old_striplib= -AC_MSG_CHECKING([whether stripping libraries is possible]) -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - AC_MSG_RESULT([yes]) -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - fi - ;; - *) - AC_MSG_RESULT([no]) - ;; - esac -fi -_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) -_LT_DECL([], [striplib], [1]) -])# _LT_CMD_STRIPLIB - - -# _LT_SYS_DYNAMIC_LINKER([TAG]) -# ----------------------------- -# PORTME Fill in your ld.so characteristics -m4_defun([_LT_SYS_DYNAMIC_LINKER], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_OBJDUMP])dnl -m4_require([_LT_DECL_SED])dnl -AC_MSG_CHECKING([dynamic linker characteristics]) -m4_if([$1], - [], [ -if test "$GCC" = yes; then - case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` - else - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[[lt_foo]]++; } - if (lt_freq[[lt_foo]] == 1) { print lt_foo; } -}'` - sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi]) -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix[[4-9]]*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[[01]] | aix4.[[01]].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[[45]]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; - - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' -m4_if([$1], [],[ - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd1*) - dynamic_linker=no - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[[123]]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[[01]]* | freebsdelf3.[[01]]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ - freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -interix[[3-9]]*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # Some binutils ld are patched to set DT_RUNPATH - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ - LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], - [shlibpath_overrides_runpath=yes])]) - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsdelf*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='NetBSD ld.elf_so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[[89]] | openbsd2.[[89]].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -AC_MSG_RESULT([$dynamic_linker]) -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" -fi - -_LT_DECL([], [variables_saved_for_relink], [1], - [Variables whose values should be saved in libtool wrapper scripts and - restored at link time]) -_LT_DECL([], [need_lib_prefix], [0], - [Do we need the "lib" prefix for modules?]) -_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) -_LT_DECL([], [version_type], [0], [Library versioning type]) -_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) -_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) -_LT_DECL([], [shlibpath_overrides_runpath], [0], - [Is shlibpath searched before the hard-coded library search path?]) -_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) -_LT_DECL([], [library_names_spec], [1], - [[List of archive names. First name is the real one, the rest are links. - The last name is the one that the linker finds with -lNAME]]) -_LT_DECL([], [soname_spec], [1], - [[The coded name of the library, if different from the real name]]) -_LT_DECL([], [postinstall_cmds], [2], - [Command to use after installation of a shared archive]) -_LT_DECL([], [postuninstall_cmds], [2], - [Command to use after uninstallation of a shared archive]) -_LT_DECL([], [finish_cmds], [2], - [Commands used to finish a libtool library installation in a directory]) -_LT_DECL([], [finish_eval], [1], - [[As "finish_cmds", except a single script fragment to be evaled but - not shown]]) -_LT_DECL([], [hardcode_into_libs], [0], - [Whether we should hardcode library paths into libraries]) -_LT_DECL([], [sys_lib_search_path_spec], [2], - [Compile-time system search path for libraries]) -_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], - [Run-time system search path for libraries]) -])# _LT_SYS_DYNAMIC_LINKER - - -# _LT_PATH_TOOL_PREFIX(TOOL) -# -------------------------- -# find a file program which can recognize shared library -AC_DEFUN([_LT_PATH_TOOL_PREFIX], -[m4_require([_LT_DECL_EGREP])dnl -AC_MSG_CHECKING([for $1]) -AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, -[case $MAGIC_CMD in -[[\\/*] | ?:[\\/]*]) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR -dnl $ac_dummy forces splitting on constant user-supplied paths. -dnl POSIX.2 word splitting is done only on the output of word expansions, -dnl not every word. This closes a longstanding sh security hole. - ac_dummy="m4_if([$2], , $PATH, [$2])" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$1; then - lt_cv_path_MAGIC_CMD="$ac_dir/$1" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac]) -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - AC_MSG_RESULT($MAGIC_CMD) -else - AC_MSG_RESULT(no) -fi -_LT_DECL([], [MAGIC_CMD], [0], - [Used to examine libraries when file_magic_cmd begins with "file"])dnl -])# _LT_PATH_TOOL_PREFIX - -# Old name: -AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) - - -# _LT_PATH_MAGIC -# -------------- -# find a file program which can recognize a shared library -m4_defun([_LT_PATH_MAGIC], -[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) - else - MAGIC_CMD=: - fi -fi -])# _LT_PATH_MAGIC - - -# LT_PATH_LD -# ---------- -# find the pathname to the GNU or non-GNU linker -AC_DEFUN([LT_PATH_LD], -[AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_DECL_EGREP])dnl - -AC_ARG_WITH([gnu-ld], - [AS_HELP_STRING([--with-gnu-ld], - [assume the C compiler uses GNU ld @<:@default=no@:>@])], - [test "$withval" = no || with_gnu_ld=yes], - [with_gnu_ld=no])dnl - -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - AC_MSG_CHECKING([for ld used by $CC]) - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [[\\/]]* | ?:[[\\/]]*) - re_direlt='/[[^/]][[^/]]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - AC_MSG_CHECKING([for GNU ld]) -else - AC_MSG_CHECKING([for non-GNU ld]) -fi -AC_CACHE_VAL(lt_cv_path_LD, -[if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; - -cegcc) - # use the weaker test based on 'objdump'. See mingw*. - lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[[3-9]]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -*nto* | *qnx*) - lt_cv_deplibs_check_method=pass_all - ;; - -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -tpf*) - lt_cv_deplibs_check_method=pass_all - ;; -esac -]) -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown - -_LT_DECL([], [deplibs_check_method], [1], - [Method to check whether dependent libraries are shared objects]) -_LT_DECL([], [file_magic_cmd], [1], - [Command to use when deplibs_check_method == "file_magic"]) -])# _LT_CHECK_MAGIC_METHOD - - -# LT_PATH_NM -# ---------- -# find the pathname to a BSD- or MS-compatible name lister -AC_DEFUN([LT_PATH_NM], -[AC_REQUIRE([AC_PROG_CC])dnl -AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, -[if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - : ${lt_cv_path_NM=no} -fi]) -if test "$lt_cv_path_NM" != "no"; then - NM="$lt_cv_path_NM" -else - # Didn't find any BSD compatible name lister, look for dumpbin. - AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :) - AC_SUBST([DUMPBIN]) - if test "$DUMPBIN" != ":"; then - NM="$DUMPBIN" - fi -fi -test -z "$NM" && NM=nm -AC_SUBST([NM]) -_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl - -AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], - [lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD) - cat conftest.out >&AS_MESSAGE_LOG_FD - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -f conftest*]) -])# LT_PATH_NM - -# Old names: -AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) -AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_PROG_NM], []) -dnl AC_DEFUN([AC_PROG_NM], []) - - -# LT_LIB_M -# -------- -# check for math library -AC_DEFUN([LT_LIB_M], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -LIBM= -case $host in -*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) - # These system don't have libm, or don't need it - ;; -*-ncr-sysv4.3*) - AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") - AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") - ;; -*) - AC_CHECK_LIB(m, cos, LIBM="-lm") - ;; -esac -AC_SUBST([LIBM]) -])# LT_LIB_M - -# Old name: -AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_CHECK_LIBM], []) - - -# _LT_COMPILER_NO_RTTI([TAGNAME]) -# ------------------------------- -m4_defun([_LT_COMPILER_NO_RTTI], -[m4_require([_LT_TAG_COMPILER])dnl - -_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - -if test "$GCC" = yes; then - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' - - _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], - lt_cv_prog_compiler_rtti_exceptions, - [-fno-rtti -fno-exceptions], [], - [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) -fi -_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], - [Compiler flag to turn off builtin functions]) -])# _LT_COMPILER_NO_RTTI - - -# _LT_CMD_GLOBAL_SYMBOLS -# ---------------------- -m4_defun([_LT_CMD_GLOBAL_SYMBOLS], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([LT_PATH_NM])dnl -AC_REQUIRE([LT_PATH_LD])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_TAG_COMPILER])dnl - -# Check for command to grab the raw symbol name followed by C symbol from nm. -AC_MSG_CHECKING([command to parse $NM output from $compiler object]) -AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], -[ -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[[BCDEGRST]]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[[BCDT]]' - ;; -cygwin* | mingw* | pw32* | cegcc*) - symcode='[[ABCDGISTW]]' - ;; -hpux*) - if test "$host_cpu" = ia64; then - symcode='[[ABCDEGRST]]' - fi - ;; -irix* | nonstopux*) - symcode='[[BCDEGRST]]' - ;; -osf*) - symcode='[[BCDEGQRST]]' - ;; -solaris*) - symcode='[[BDRT]]' - ;; -sco3.2v5*) - symcode='[[DT]]' - ;; -sysv4.2uw2*) - symcode='[[DT]]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[[ABDT]]' - ;; -sysv4) - symcode='[[DFNSTU]]' - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[[ABCDGIRSTW]]' ;; -esac - -# Transform an extracted symbol line into a proper C declaration. -# Some systems (esp. on ia64) link data and code symbols differently, -# so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# Try without a prefix underscore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function - # and D for any global variable. - # Also find C++ and __fastcall symbols from MSVC++, - # which start with @ or ?. - lt_cv_sys_global_symbol_pipe="$AWK ['"\ -" {last_section=section; section=\$ 3};"\ -" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ -" \$ 0!~/External *\|/{next};"\ -" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ -" {if(hide[section]) next};"\ -" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ -" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ -" s[1]~/^[@?]/{print s[1], s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ -" ' prfx=^$ac_symprfx]" - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <<_LT_EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(void); -void nm_test_func(void){} -#ifdef __cplusplus -} -#endif -int main(){nm_test_var='a';nm_test_func();return(0);} -_LT_EOF - - if AC_TRY_EVAL(ac_compile); then - # Now try to grab the symbols. - nlist=conftest.nm - if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -#ifdef __cplusplus -extern "C" { -#endif - -_LT_EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' - - cat <<_LT_EOF >> conftest.$ac_ext - -/* The mapping between symbol names and symbols. */ -const struct { - const char *name; - void *address; -} -lt__PROGRAM__LTX_preloaded_symbols[[]] = -{ - { "@PROGRAM@", (void *) 0 }, -_LT_EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt__PROGRAM__LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif -_LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_save_LIBS="$LIBS" - lt_save_CFLAGS="$CFLAGS" - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then - pipe_works=yes - fi - LIBS="$lt_save_LIBS" - CFLAGS="$lt_save_CFLAGS" - else - echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD - fi - else - echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done -]) -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - AC_MSG_RESULT(failed) -else - AC_MSG_RESULT(ok) -fi - -_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], - [Take the output of nm and produce a listing of raw symbols and C names]) -_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], - [Transform the output of nm in a proper C declaration]) -_LT_DECL([global_symbol_to_c_name_address], - [lt_cv_sys_global_symbol_to_c_name_address], [1], - [Transform the output of nm in a C name address pair]) -_LT_DECL([global_symbol_to_c_name_address_lib_prefix], - [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], - [Transform the output of nm in a C name address pair when lib prefix is needed]) -]) # _LT_CMD_GLOBAL_SYMBOLS - - -# _LT_COMPILER_PIC([TAGNAME]) -# --------------------------- -m4_defun([_LT_COMPILER_PIC], -[m4_require([_LT_TAG_COMPILER])dnl -_LT_TAGVAR(lt_prog_compiler_wl, $1)= -_LT_TAGVAR(lt_prog_compiler_pic, $1)= -_LT_TAGVAR(lt_prog_compiler_static, $1)= - -AC_MSG_CHECKING([for $compiler option to produce PIC]) -m4_if([$1], [CXX], [ - # C++ specific cases for pic, static, wl, etc. - if test "$GXX" = yes; then - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - mingw* | cygwin* | os2* | pw32* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - *djgpp*) - # DJGPP does not support shared libraries at all - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - else - case $host_os in - aix[[4-9]]*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - chorus*) - case $cc_basename in - cxch68*) - # Green Hills C++ Compiler - # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" - ;; - esac - ;; - dgux*) - case $cc_basename in - ec++*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - ghcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - freebsd* | dragonfly*) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - if test "$host_cpu" != ia64; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - fi - ;; - aCC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - interix*) - # This is c89, which is MS Visual C++ (no shared libs) - # Anyone wants to do a port? - ;; - irix5* | irix6* | nonstopux*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - # CC pic flag -KPIC is the default. - ;; - *) - ;; - esac - ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - KCC*) - # KAI C++ Compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - ecpc* ) - # old Intel C++ for x86_64 which still supported -KPIC. - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - icpc* ) - # Intel C++, used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - cxx*) - # Compaq C++ - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - xlc* | xlC*) - # IBM XL 8.0 on PPC - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - esac - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd* | netbsdelf*-gnu) - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - ;; - RCC*) - # Rational C++ 2.4.1 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - cxx*) - # Digital/Compaq C++ - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - *) - ;; - esac - ;; - psos*) - ;; - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - lcc*) - # Lucid - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - *) - ;; - esac - ;; - vxworks*) - ;; - *) - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -], -[ - if test "$GCC" = yes; then - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - enable_shared=no - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - - hpux9* | hpux10* | hpux11*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC (with -KPIC) is the default. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - # old Intel for x86_64 which still supported -KPIC. - ecc*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' - _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - ccc*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All Alpha code is PIC. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - xl*) - # IBM XL C 8.0/Fortran 10.1 on PPC - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C 5.9 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - ;; - *Sun\ F*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='' - ;; - esac - ;; - esac - ;; - - newsos6) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - - osf3* | osf4* | osf5*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All OSF/1 code is PIC. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - rdos*) - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - solaris*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; - *) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; - esac - ;; - - sunos4*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - unicos*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - - uts4*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *) - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -]) -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" - ;; -esac -AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) -_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], - [How to pass a linker flag through the compiler]) - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then - _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], - [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], - [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], - [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in - "" | " "*) ;; - *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; - esac], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) -fi -_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], - [Additional compiler flags for building library objects]) - -# -# Check to make sure the static flag actually works. -# -wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" -_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], - _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), - $lt_tmp_static_flag, - [], - [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) -_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], - [Compiler flag to prevent dynamic linking]) -])# _LT_COMPILER_PIC - - -# _LT_LINKER_SHLIBS([TAGNAME]) -# ---------------------------- -# See if the linker supports building shared libraries. -m4_defun([_LT_LINKER_SHLIBS], -[AC_REQUIRE([LT_PATH_LD])dnl -AC_REQUIRE([LT_PATH_NM])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl -m4_require([_LT_TAG_COMPILER])dnl -AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) -m4_if([$1], [CXX], [ - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - case $host_os in - aix[[4-9]]*) - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - ;; - pw32*) - _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" - ;; - cygwin* | mingw* | cegcc*) - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' - ;; - linux* | k*bsd*-gnu) - _LT_TAGVAR(link_all_deplibs, $1)=no - ;; - *) - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; - esac - _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] -], [ - runpath_var= - _LT_TAGVAR(allow_undefined_flag, $1)= - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(archive_cmds, $1)= - _LT_TAGVAR(archive_expsym_cmds, $1)= - _LT_TAGVAR(compiler_needs_object, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - _LT_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - _LT_TAGVAR(hardcode_automatic, $1)=no - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= - _LT_TAGVAR(hardcode_libdir_separator, $1)= - _LT_TAGVAR(hardcode_minus_L, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_TAGVAR(inherit_rpath, $1)=no - _LT_TAGVAR(link_all_deplibs, $1)=unknown - _LT_TAGVAR(module_cmds, $1)= - _LT_TAGVAR(module_expsym_cmds, $1)= - _LT_TAGVAR(old_archive_from_new_cmds, $1)= - _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= - _LT_TAGVAR(thread_safe_flag_spec, $1)= - _LT_TAGVAR(whole_archive_flag_spec, $1)= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - _LT_TAGVAR(include_expsyms, $1)= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. -dnl Note also adjust exclude_expsyms for C++ above. - extract_expsyms_cmds= - - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - linux* | k*bsd*-gnu) - _LT_TAGVAR(link_all_deplibs, $1)=no - ;; - esac - - _LT_TAGVAR(ld_shlibs, $1)=yes - if test "$with_gnu_ld" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - supports_anon_versioning=no - case `$LD -v 2>&1` in - *GNU\ gold*) supports_anon_versioning=yes ;; - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[[3-9]]*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: the GNU linker, at least up to release 2.9.1, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. - -_LT_EOF - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='' - ;; - m68k) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - interix[[3-9]]*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) - tmp_diet=no - if test "$host_os" = linux-dietlibc; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test "$tmp_diet" = no - then - tmp_addflag= - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - lf95*) # Lahey Fortran 8.1 - _LT_TAGVAR(whole_archive_flag_spec, $1)= - tmp_sharedflag='--shared' ;; - xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac - _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - - case $cc_basename in - xlf*) - # IBM XL Fortran 10.1 on PPC cannot create shared libs itself - _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' - _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $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 - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - sunos4*) - _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - - if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then - runpath_var= - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=yes - _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - _LT_TAGVAR(hardcode_direct, $1)=unsupported - fi - ;; - - aix[[4-9]]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_TAGVAR(archive_cmds, $1)='' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' - - if test "$GCC" = yes; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - _LT_TAGVAR(link_all_deplibs, $1)=no - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - _LT_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared libraries. - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='' - ;; - m68k) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - ;; - - bsdi[[45]]*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' - # FIXME: Should let the user specify the lib program. - _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' - _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - ;; - - darwin* | rhapsody*) - _LT_DARWIN_LINKER_FEATURES($1) - ;; - - dgux*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - freebsd1*) - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - hpux9*) - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_direct, $1)=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - fi - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - AC_LINK_IFELSE(int foo(void) {}, - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - ) - LDFLAGS="$save_LDFLAGS" - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(inherit_rpath, $1)=yes - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - newsos6) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *nto* | *qnx*) - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - else - case $host_os in - openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - ;; - esac - fi - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - os2*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - else - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' - - # Both c and cxx compiler support -rpath directly - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - solaris*) - _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' - _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='${wl}' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - fi - ;; - esac - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4) - case $host_vendor in - sni) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' - _LT_TAGVAR(hardcode_direct, $1)=no - ;; - motorola) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4.3*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - _LT_TAGVAR(ld_shlibs, $1)=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - - if test x$host_vendor = xsni; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' - ;; - esac - fi - fi -]) -AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) -test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - -_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld - -_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl -_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl -_LT_DECL([], [extract_expsyms_cmds], [2], - [The commands to extract the exported symbol list from a shared archive]) - -# -# Do we need to explicitly link libc? -# -case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in -x|xyes) - # Assume -lc should be added - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $_LT_TAGVAR(archive_cmds, $1) in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - AC_MSG_CHECKING([whether -lc should be explicitly linked in]) - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if AC_TRY_EVAL(ac_compile) 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) - pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) - _LT_TAGVAR(allow_undefined_flag, $1)= - if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) - then - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - else - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - fi - _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)]) - ;; - esac - fi - ;; -esac - -_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], - [Whether or not to add -lc for building shared libraries]) -_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], - [enable_shared_with_static_runtimes], [0], - [Whether or not to disallow shared libs when runtime libs are static]) -_LT_TAGDECL([], [export_dynamic_flag_spec], [1], - [Compiler flag to allow reflexive dlopens]) -_LT_TAGDECL([], [whole_archive_flag_spec], [1], - [Compiler flag to generate shared objects directly from archives]) -_LT_TAGDECL([], [compiler_needs_object], [1], - [Whether the compiler copes with passing no objects directly]) -_LT_TAGDECL([], [old_archive_from_new_cmds], [2], - [Create an old-style archive from a shared archive]) -_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], - [Create a temporary old-style archive to link instead of a shared archive]) -_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) -_LT_TAGDECL([], [archive_expsym_cmds], [2]) -_LT_TAGDECL([], [module_cmds], [2], - [Commands used to build a loadable module if different from building - a shared archive.]) -_LT_TAGDECL([], [module_expsym_cmds], [2]) -_LT_TAGDECL([], [with_gnu_ld], [1], - [Whether we are building with GNU ld or not]) -_LT_TAGDECL([], [allow_undefined_flag], [1], - [Flag that allows shared libraries with undefined symbols to be built]) -_LT_TAGDECL([], [no_undefined_flag], [1], - [Flag that enforces no undefined symbols]) -_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], - [Flag to hardcode $libdir into a binary during linking. - This must work even if $libdir does not exist]) -_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], - [[If ld is used when linking, flag to hardcode $libdir into a binary - during linking. This must work even if $libdir does not exist]]) -_LT_TAGDECL([], [hardcode_libdir_separator], [1], - [Whether we need a single "-rpath" flag with a separated argument]) -_LT_TAGDECL([], [hardcode_direct], [0], - [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes - DIR into the resulting binary]) -_LT_TAGDECL([], [hardcode_direct_absolute], [0], - [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes - DIR into the resulting binary and the resulting library dependency is - "absolute", i.e impossible to change by setting ${shlibpath_var} if the - library is relocated]) -_LT_TAGDECL([], [hardcode_minus_L], [0], - [Set to "yes" if using the -LDIR flag during linking hardcodes DIR - into the resulting binary]) -_LT_TAGDECL([], [hardcode_shlibpath_var], [0], - [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR - into the resulting binary]) -_LT_TAGDECL([], [hardcode_automatic], [0], - [Set to "yes" if building a shared library automatically hardcodes DIR - into the library and all subsequent libraries and executables linked - against it]) -_LT_TAGDECL([], [inherit_rpath], [0], - [Set to yes if linker adds runtime paths of dependent libraries - to runtime path list]) -_LT_TAGDECL([], [link_all_deplibs], [0], - [Whether libtool must link a program against all its dependency libraries]) -_LT_TAGDECL([], [fix_srcfile_path], [1], - [Fix the shell variable $srcfile for the compiler]) -_LT_TAGDECL([], [always_export_symbols], [0], - [Set to "yes" if exported symbols are required]) -_LT_TAGDECL([], [export_symbols_cmds], [2], - [The commands to list exported symbols]) -_LT_TAGDECL([], [exclude_expsyms], [1], - [Symbols that should not be listed in the preloaded symbols]) -_LT_TAGDECL([], [include_expsyms], [1], - [Symbols that must always be exported]) -_LT_TAGDECL([], [prelink_cmds], [2], - [Commands necessary for linking programs (against libraries) with templates]) -_LT_TAGDECL([], [file_list_spec], [1], - [Specify filename containing input files]) -dnl FIXME: Not yet implemented -dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], -dnl [Compiler flag to generate thread safe objects]) -])# _LT_LINKER_SHLIBS - - -# _LT_LANG_C_CONFIG([TAG]) -# ------------------------ -# Ensure that the configuration variables for a C compiler are suitably -# defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to `libtool'. -m4_defun([_LT_LANG_C_CONFIG], -[m4_require([_LT_DECL_EGREP])dnl -lt_save_CC="$CC" -AC_LANG_PUSH(C) - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - -_LT_TAG_COMPILER -# Save the default compiler, since it gets overwritten when the other -# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. -compiler_DEFAULT=$CC - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -if test -n "$compiler"; then - _LT_COMPILER_NO_RTTI($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - LT_SYS_DLOPEN_SELF - _LT_CMD_STRIPLIB - - # Report which library types will actually be built - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_CONFIG($1) -fi -AC_LANG_POP -CC="$lt_save_CC" -])# _LT_LANG_C_CONFIG - - -# _LT_PROG_CXX -# ------------ -# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++ -# compiler, we have our own version here. -m4_defun([_LT_PROG_CXX], -[ -pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes]) -AC_PROG_CXX -if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - AC_PROG_CXXCPP -else - _lt_caught_CXX_error=yes -fi -popdef([AC_MSG_ERROR]) -])# _LT_PROG_CXX - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([_LT_PROG_CXX], []) - - -# _LT_LANG_CXX_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for a C++ compiler are suitably -# defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to `libtool'. -m4_defun([_LT_LANG_CXX_CONFIG], -[AC_REQUIRE([_LT_PROG_CXX])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_EGREP])dnl - -AC_LANG_PUSH(C++) -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(compiler_needs_object, $1)=no -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for C++ test sources. -ac_ext=cpp - -# Object file extension for compiled C++ test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the CXX compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_caught_CXX_error" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="int some_variable = 0;" - - # Code to be used in simple link tests - lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC=$CC - lt_save_LD=$LD - lt_save_GCC=$GCC - GCC=$GXX - lt_save_with_gnu_ld=$with_gnu_ld - lt_save_path_LD=$lt_cv_path_LD - if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then - lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx - else - $as_unset lt_cv_prog_gnu_ld - fi - if test -n "${lt_cv_path_LDCXX+set}"; then - lt_cv_path_LD=$lt_cv_path_LDCXX - else - $as_unset lt_cv_path_LD - fi - test -z "${LDCXX+set}" || LD=$LDCXX - CC=${CXX-"c++"} - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - - if test -n "$compiler"; then - # We don't want -fno-exception when compiling C++ code, so set the - # no_builtin_flag separately - if test "$GXX" = yes; then - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' - else - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - fi - - if test "$GXX" = yes; then - # Set up default GNU C++ configuration - - LT_PATH_LD - - # Check if GNU C++ uses GNU ld as the underlying linker, since the - # archiving commands below assume that GNU ld is being used. - if test "$with_gnu_ld" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - - # If archive_cmds runs LD, not CC, wlarc should be empty - # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to - # investigate it a little bit more. (MM) - wlarc='${wl}' - - # ancient GNU ld didn't support --whole-archive et. al. - if eval "`$CC -print-prog-name=ld` --help 2>&1" | - $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - with_gnu_ld=no - wlarc= - - # A generic and very simple default shared library creation - # command for GNU C++ for the case where it uses the native - # linker, instead of GNU ld. If possible, this setting should - # overridden to take advantage of the native linker features on - # the platform it is being used on. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - fi - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - - else - GXX=no - with_gnu_ld=no - wlarc= - fi - - # PORTME: fill in a description of your system's C++ link characteristics - AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) - _LT_TAGVAR(ld_shlibs, $1)=yes - case $host_os in - aix3*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aix[[4-9]]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) - for ld_flag in $LDFLAGS; do - case $ld_flag in - *-brtl*) - aix_use_runtimelinking=yes - break - ;; - esac - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_TAGVAR(archive_cmds, $1)='' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' - - if test "$GXX" = yes; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)= - fi - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to - # export. - _LT_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an empty - # executable. - _LT_SYS_MODULE_PATH_AIX - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared - # libraries. - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - chorus*) - case $cc_basename in - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - darwin* | rhapsody*) - _LT_DARWIN_LINKER_FEATURES($1) - ;; - - dgux*) - case $cc_basename in - ec++*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - ghcx*) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - freebsd[[12]]*) - # C++ shared libraries reported to be fairly broken before - # switch to ELF - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - freebsd-elf*) - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - ;; - - freebsd* | dragonfly*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - _LT_TAGVAR(ld_shlibs, $1)=yes - ;; - - gnu*) - ;; - - hpux9*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - *) - if test "$GXX" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - hpux10*|hpux11*) - if test $with_gnu_ld = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - ;; - *) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - esac - fi - case $host_cpu in - hppa*64*|ia64*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - ;; - esac - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - *) - if test "$GXX" = yes; then - if test $with_gnu_ld = no; then - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - fi - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - interix[[3-9]]*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - irix5* | irix6*) - case $cc_basename in - CC*) - # SGI C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - - # Archives containing C++ object files must be created using - # "CC -ar", where "CC" is the IRIX C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' - ;; - *) - if test "$GXX" = yes; then - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' - fi - fi - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - esac - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(inherit_rpath, $1)=yes - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' - ;; - icpc* | ecpc* ) - # Intel C++ - with_gnu_ld=yes - # version 8.0 and above of icpc choke on multiply defined symbols - # if we add $predep_objects and $postdep_objects, however 7.1 and - # earlier do not add the objects themselves. - case `$CC -V 2>&1` in - *"Version 7."*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 8.0 or newer - tmp_idyn= - case $host_cpu in - ia64*) tmp_idyn=' -i_dynamic';; - esac - _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - case `$CC -V` in - *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*) - _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ - compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' - _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ - $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ - $RANLIB $oldlib' - _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - ;; - *) # Version 6 will use weak symbols - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - ;; - cxx*) - # Compaq C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' - - runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - xl*) - # IBM XL 8.0 on PPC, with GNU ld - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - - # Not sure whether something based on - # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 - # would be better. - output_verbose_link_cmd='echo' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - esac - ;; - esac - ;; - - lynxos*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - m88k*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - mvs*) - case $cc_basename in - cxx*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - fi - # Workaround some broken pre-1.5 toolchains - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' - ;; - - *nto* | *qnx*) - _LT_TAGVAR(ld_shlibs, $1)=yes - ;; - - openbsd2*) - # C++ shared libraries are fairly broken - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - fi - output_verbose_link_cmd=echo - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - case $host in - osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; - *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; - esac - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - cxx*) - case $host in - osf3*) - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - ;; - *) - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ - $RM $lib.exp' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - case $host in - osf3*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - psos*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - lcc*) - # Lucid - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_TAGVAR(archive_cmds_need_lc,$1)=yes - _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. - # Supported since Solaris 2.6 (maybe 2.5.1?) - _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - ;; - esac - _LT_TAGVAR(link_all_deplibs, $1)=yes - - output_verbose_link_cmd='echo' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - - # The C++ compiler must be used to create the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' - ;; - *) - # GNU C++ compiler with Solaris linker - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' - if $CC --version | $GREP -v '^2\.7' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - else - # g++ 2.7 appears to require `-G' NOT `-shared' on this - # platform. - _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - fi - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - ;; - esac - fi - ;; - esac - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - vxworks*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - - AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) - test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - - _LT_TAGVAR(GCC, $1)="$GXX" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_SYS_HIDDEN_LIBDEPS($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - CC=$lt_save_CC - LDCXX=$LD - LD=$lt_save_LD - GCC=$lt_save_GCC - with_gnu_ld=$lt_save_with_gnu_ld - lt_cv_path_LDCXX=$lt_cv_path_LD - lt_cv_path_LD=$lt_save_path_LD - lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld - lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld -fi # test "$_lt_caught_CXX_error" != yes - -AC_LANG_POP -])# _LT_LANG_CXX_CONFIG - - -# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) -# --------------------------------- -# Figure out "hidden" library dependencies from verbose -# compiler output when linking a shared library. -# Parse the compiler output and extract the necessary -# objects, libraries and library flags. -m4_defun([_LT_SYS_HIDDEN_LIBDEPS], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -# Dependencies to place before and after the object being linked: -_LT_TAGVAR(predep_objects, $1)= -_LT_TAGVAR(postdep_objects, $1)= -_LT_TAGVAR(predeps, $1)= -_LT_TAGVAR(postdeps, $1)= -_LT_TAGVAR(compiler_lib_search_path, $1)= - -dnl we can't use the lt_simple_compile_test_code here, -dnl because it contains code intended for an executable, -dnl not a library. It's possible we should let each -dnl tag define a new lt_????_link_test_code variable, -dnl but it's only used here... -m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF -int a; -void foo (void) { a = 0; } -_LT_EOF -], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF -class Foo -{ -public: - Foo (void) { a = 0; } -private: - int a; -}; -_LT_EOF -], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF - subroutine foo - implicit none - integer*4 a - a=0 - return - end -_LT_EOF -], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF - subroutine foo - implicit none - integer a - a=0 - return - end -_LT_EOF -], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF -public class foo { - private int a; - public void bar (void) { - a = 0; - } -}; -_LT_EOF -]) -dnl Parse the compiler output and extract the necessary -dnl objects, libraries and library flags. -if AC_TRY_EVAL(ac_compile); then - # Parse the compiler output and extract the necessary - # objects, libraries and library flags. - - # Sentinel used to keep track of whether or not we are before - # the conftest object file. - pre_test_object_deps_done=no - - for p in `eval "$output_verbose_link_cmd"`; do - case $p in - - -L* | -R* | -l*) - # Some compilers place space between "-{L,R}" and the path. - # Remove the space. - if test $p = "-L" || - test $p = "-R"; then - prev=$p - continue - else - prev= - fi - - if test "$pre_test_object_deps_done" = no; then - case $p in - -L* | -R*) - # Internal compiler library paths should come after those - # provided the user. The postdeps already come after the - # user supplied libs so there is no need to process them. - if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then - _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" - else - _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" - fi - ;; - # The "-l" case would never come before the object being - # linked, so don't bother handling this case. - esac - else - if test -z "$_LT_TAGVAR(postdeps, $1)"; then - _LT_TAGVAR(postdeps, $1)="${prev}${p}" - else - _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" - fi - fi - ;; - - *.$objext) - # This assumes that the test object file only shows up - # once in the compiler output. - if test "$p" = "conftest.$objext"; then - pre_test_object_deps_done=yes - continue - fi - - if test "$pre_test_object_deps_done" = no; then - if test -z "$_LT_TAGVAR(predep_objects, $1)"; then - _LT_TAGVAR(predep_objects, $1)="$p" - else - _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" - fi - else - if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then - _LT_TAGVAR(postdep_objects, $1)="$p" - else - _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" - fi - fi - ;; - - *) ;; # Ignore the rest. - - esac - done - - # Clean up. - rm -f a.out a.exe -else - echo "libtool.m4: error: problem compiling $1 test program" -fi - -$RM -f confest.$objext - -# PORTME: override above test on systems where it is broken -m4_if([$1], [CXX], -[case $host_os in -interix[[3-9]]*) - # Interix 3.5 installs completely hosed .la files for C++, so rather than - # hack all around it, let's just trust "g++" to DTRT. - _LT_TAGVAR(predep_objects,$1)= - _LT_TAGVAR(postdep_objects,$1)= - _LT_TAGVAR(postdeps,$1)= - ;; - -linux*) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - if test "$solaris_use_stlport4" != yes; then - _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; - -solaris*) - case $cc_basename in - CC*) - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - # Adding this requires a known-good setup of shared libraries for - # Sun compiler versions before 5.6, else PIC objects from an old - # archive will be linked into the output, leading to subtle bugs. - if test "$solaris_use_stlport4" != yes; then - _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; -esac -]) - -case " $_LT_TAGVAR(postdeps, $1) " in -*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; -esac - _LT_TAGVAR(compiler_lib_search_dirs, $1)= -if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then - _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` -fi -_LT_TAGDECL([], [compiler_lib_search_dirs], [1], - [The directories searched by this compiler when creating a shared library]) -_LT_TAGDECL([], [predep_objects], [1], - [Dependencies to place before and after the objects being linked to - create a shared library]) -_LT_TAGDECL([], [postdep_objects], [1]) -_LT_TAGDECL([], [predeps], [1]) -_LT_TAGDECL([], [postdeps], [1]) -_LT_TAGDECL([], [compiler_lib_search_path], [1], - [The library search path used internally by the compiler when linking - a shared library]) -])# _LT_SYS_HIDDEN_LIBDEPS - - -# _LT_PROG_F77 -# ------------ -# Since AC_PROG_F77 is broken, in that it returns the empty string -# if there is no fortran compiler, we have our own version here. -m4_defun([_LT_PROG_F77], -[ -pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes]) -AC_PROG_F77 -if test -z "$F77" || test "X$F77" = "Xno"; then - _lt_disable_F77=yes -fi -popdef([AC_MSG_ERROR]) -])# _LT_PROG_F77 - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([_LT_PROG_F77], []) - - -# _LT_LANG_F77_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for a Fortran 77 compiler are -# suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_F77_CONFIG], -[AC_REQUIRE([_LT_PROG_F77])dnl -AC_LANG_PUSH(Fortran 77) - -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for f77 test sources. -ac_ext=f - -# Object file extension for compiled f77 test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the F77 compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_disable_F77" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="\ - subroutine t - return - end -" - - # Code to be used in simple link tests - lt_simple_link_test_code="\ - program t - end -" - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC="$CC" - lt_save_GCC=$GCC - CC=${F77-"f77"} - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - GCC=$G77 - if test -n "$compiler"; then - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_TAGVAR(GCC, $1)="$G77" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - GCC=$lt_save_GCC - CC="$lt_save_CC" -fi # test "$_lt_disable_F77" != yes - -AC_LANG_POP -])# _LT_LANG_F77_CONFIG - - -# _LT_PROG_FC -# ----------- -# Since AC_PROG_FC is broken, in that it returns the empty string -# if there is no fortran compiler, we have our own version here. -m4_defun([_LT_PROG_FC], -[ -pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes]) -AC_PROG_FC -if test -z "$FC" || test "X$FC" = "Xno"; then - _lt_disable_FC=yes -fi -popdef([AC_MSG_ERROR]) -])# _LT_PROG_FC - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([_LT_PROG_FC], []) - - -# _LT_LANG_FC_CONFIG([TAG]) -# ------------------------- -# Ensure that the configuration variables for a Fortran compiler are -# suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_FC_CONFIG], -[AC_REQUIRE([_LT_PROG_FC])dnl -AC_LANG_PUSH(Fortran) - -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for fc test sources. -ac_ext=${ac_fc_srcext-f} - -# Object file extension for compiled fc test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the FC compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_disable_FC" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="\ - subroutine t - return - end -" - - # Code to be used in simple link tests - lt_simple_link_test_code="\ - program t - end -" - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC="$CC" - lt_save_GCC=$GCC - CC=${FC-"f95"} - compiler=$CC - GCC=$ac_cv_fc_compiler_gnu - - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - - if test -n "$compiler"; then - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_SYS_HIDDEN_LIBDEPS($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - GCC=$lt_save_GCC - CC="$lt_save_CC" -fi # test "$_lt_disable_FC" != yes - -AC_LANG_POP -])# _LT_LANG_FC_CONFIG - - -# _LT_LANG_GCJ_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for the GNU Java Compiler compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_GCJ_CONFIG], -[AC_REQUIRE([LT_PROG_GCJ])dnl -AC_LANG_SAVE - -# Source file extension for Java test sources. -ac_ext=java - -# Object file extension for compiled Java test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="class foo {}" - -# Code to be used in simple link tests -lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_TAG_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -lt_save_GCC=$GCC -GCC=yes -CC=${GCJ-"gcj"} -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_TAGVAR(LD, $1)="$LD" -_LT_CC_BASENAME([$compiler]) - -# GCJ did not exist at the time GCC didn't implicitly link libc in. -_LT_TAGVAR(archive_cmds_need_lc, $1)=no - -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds - -if test -n "$compiler"; then - _LT_COMPILER_NO_RTTI($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) -fi - -AC_LANG_RESTORE - -GCC=$lt_save_GCC -CC="$lt_save_CC" -])# _LT_LANG_GCJ_CONFIG - - -# _LT_LANG_RC_CONFIG([TAG]) -# ------------------------- -# Ensure that the configuration variables for the Windows resource compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_RC_CONFIG], -[AC_REQUIRE([LT_PROG_RC])dnl -AC_LANG_SAVE - -# Source file extension for RC test sources. -ac_ext=rc - -# Object file extension for compiled RC test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' - -# Code to be used in simple link tests -lt_simple_link_test_code="$lt_simple_compile_test_code" - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_TAG_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -lt_save_GCC=$GCC -GCC= -CC=${RC-"windres"} -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) -_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - -if test -n "$compiler"; then - : - _LT_CONFIG($1) -fi - -GCC=$lt_save_GCC -AC_LANG_RESTORE -CC="$lt_save_CC" -])# _LT_LANG_RC_CONFIG - - -# LT_PROG_GCJ -# ----------- -AC_DEFUN([LT_PROG_GCJ], -[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], - [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], - [AC_CHECK_TOOL(GCJ, gcj,) - test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" - AC_SUBST(GCJFLAGS)])])[]dnl -]) - -# Old name: -AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_GCJ], []) - - -# LT_PROG_RC -# ---------- -AC_DEFUN([LT_PROG_RC], -[AC_CHECK_TOOL(RC, windres,) -]) - -# Old name: -AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_RC], []) - - -# _LT_DECL_EGREP -# -------------- -# If we don't have a new enough Autoconf to choose the best grep -# available, choose the one first in the user's PATH. -m4_defun([_LT_DECL_EGREP], -[AC_REQUIRE([AC_PROG_EGREP])dnl -AC_REQUIRE([AC_PROG_FGREP])dnl -test -z "$GREP" && GREP=grep -_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) -_LT_DECL([], [EGREP], [1], [An ERE matcher]) -_LT_DECL([], [FGREP], [1], [A literal string matcher]) -dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too -AC_SUBST([GREP]) -]) - - -# _LT_DECL_OBJDUMP -# -------------- -# If we don't have a new enough Autoconf to choose the best objdump -# available, choose the one first in the user's PATH. -m4_defun([_LT_DECL_OBJDUMP], -[AC_CHECK_TOOL(OBJDUMP, objdump, false) -test -z "$OBJDUMP" && OBJDUMP=objdump -_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) -AC_SUBST([OBJDUMP]) -]) - - -# _LT_DECL_SED -# ------------ -# Check for a fully-functional sed program, that truncates -# as few characters as possible. Prefer GNU sed if found. -m4_defun([_LT_DECL_SED], -[AC_PROG_SED -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" -_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) -_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], - [Sed that helps us avoid accidentally triggering echo(1) options like -n]) -])# _LT_DECL_SED - -m4_ifndef([AC_PROG_SED], [ -# NOTE: This macro has been submitted for inclusion into # -# GNU Autoconf as AC_PROG_SED. When it is available in # -# a released version of Autoconf we should remove this # -# macro and use it instead. # - -m4_defun([AC_PROG_SED], -[AC_MSG_CHECKING([for a sed that does not truncate output]) -AC_CACHE_VAL(lt_cv_path_SED, -[# Loop through the user's path and test for sed and gsed. -# Then use that list of sed's as ones to test for truncation. -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for lt_ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then - lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" - fi - done - done -done -IFS=$as_save_IFS -lt_ac_max=0 -lt_ac_count=0 -# Add /usr/xpg4/bin/sed as it is typically found on Solaris -# along with /bin/sed that truncates output. -for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do - test ! -f $lt_ac_sed && continue - cat /dev/null > conftest.in - lt_ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >conftest.in - # Check for GNU sed and select it if it is found. - if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then - lt_cv_path_SED=$lt_ac_sed - break - fi - while true; do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo >>conftest.nl - $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break - cmp -s conftest.out conftest.nl || break - # 10000 chars as input seems more than enough - test $lt_ac_count -gt 10 && break - lt_ac_count=`expr $lt_ac_count + 1` - if test $lt_ac_count -gt $lt_ac_max; then - lt_ac_max=$lt_ac_count - lt_cv_path_SED=$lt_ac_sed - fi - done -done -]) -SED=$lt_cv_path_SED -AC_SUBST([SED]) -AC_MSG_RESULT([$SED]) -])#AC_PROG_SED -])#m4_ifndef - -# Old name: -AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_SED], []) - - -# _LT_CHECK_SHELL_FEATURES -# ------------------------ -# Find out whether the shell is Bourne or XSI compatible, -# or has some other useful features. -m4_defun([_LT_CHECK_SHELL_FEATURES], -[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) -# Try some XSI features -xsi_shell=no -( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -AC_MSG_RESULT([$xsi_shell]) -_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) - -AC_MSG_CHECKING([whether the shell understands "+="]) -lt_shell_append=no -( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ - >/dev/null 2>&1 \ - && lt_shell_append=yes -AC_MSG_RESULT([$lt_shell_append]) -_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) - -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset -else - lt_unset=false -fi -_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl - -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - lt_SP2NL='tr \040 \012' - lt_NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - lt_SP2NL='tr \100 \n' - lt_NL2SP='tr \r\n \100\100' - ;; -esac -_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl -_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl -])# _LT_CHECK_SHELL_FEATURES - - -# _LT_PROG_XSI_SHELLFNS -# --------------------- -# Bourne and XSI compatible variants of some useful shell functions. -m4_defun([_LT_PROG_XSI_SHELLFNS], -[case $xsi_shell in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac -} - -# func_basename file -func_basename () -{ - func_basename_result="${1##*/}" -} - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}" -} - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -func_stripname () -{ - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary parameter first. - func_stripname_result=${3} - func_stripname_result=${func_stripname_result#"${1}"} - func_stripname_result=${func_stripname_result%"${2}"} -} - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=${1%%=*} - func_opt_split_arg=${1#*=} -} - -# func_lo2o object -func_lo2o () -{ - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=${1%.*}.lo -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=$(( $[*] )) -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=${#1} -} - -_LT_EOF - ;; - *) # Bourne compatible functions. - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi -} - -# func_basename file -func_basename () -{ - func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` -} - -dnl func_dirname_and_basename -dnl A portable version of this function is already defined in general.m4sh -dnl so there is no need for it here. - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# func_strip_suffix prefix name -func_stripname () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; - esac -} - -# sed scripts: -my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' -my_sed_long_arg='1s/^-[[^=]]*=//' - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` - func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` -} - -# func_lo2o object -func_lo2o () -{ - func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'` -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=`expr "$[@]"` -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` -} - -_LT_EOF -esac - -case $lt_shell_append in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$[1]+=\$[2]" -} -_LT_EOF - ;; - *) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$[1]=\$$[1]\$[2]" -} - -_LT_EOF - ;; - esac -]) - -# Helper functions for option handling. -*- Autoconf -*- -# -# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. -# Written by Gary V. Vaughan, 2004 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# serial 6 ltoptions.m4 - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) - - -# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) -# ------------------------------------------ -m4_define([_LT_MANGLE_OPTION], -[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) - - -# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) -# --------------------------------------- -# Set option OPTION-NAME for macro MACRO-NAME, and if there is a -# matching handler defined, dispatch to it. Other OPTION-NAMEs are -# saved as a flag. -m4_define([_LT_SET_OPTION], -[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl -m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), - _LT_MANGLE_DEFUN([$1], [$2]), - [m4_warning([Unknown $1 option `$2'])])[]dnl -]) - - -# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) -# ------------------------------------------------------------ -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -m4_define([_LT_IF_OPTION], -[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) - - -# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) -# ------------------------------------------------------- -# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME -# are set. -m4_define([_LT_UNLESS_OPTIONS], -[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), - [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), - [m4_define([$0_found])])])[]dnl -m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 -])[]dnl -]) - - -# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) -# ---------------------------------------- -# OPTION-LIST is a space-separated list of Libtool options associated -# with MACRO-NAME. If any OPTION has a matching handler declared with -# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about -# the unknown option and exit. -m4_defun([_LT_SET_OPTIONS], -[# Set options -m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), - [_LT_SET_OPTION([$1], _LT_Option)]) - -m4_if([$1],[LT_INIT],[ - dnl - dnl Simply set some default values (i.e off) if boolean options were not - dnl specified: - _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no - ]) - _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no - ]) - dnl - dnl If no reference was made to various pairs of opposing options, then - dnl we run the default mode handler for the pair. For example, if neither - dnl `shared' nor `disable-shared' was passed, we enable building of shared - dnl archives by default: - _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) - _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) - _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) - _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], - [_LT_ENABLE_FAST_INSTALL]) - ]) -])# _LT_SET_OPTIONS - - - -# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) -# ----------------------------------------- -m4_define([_LT_MANGLE_DEFUN], -[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) - - -# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) -# ----------------------------------------------- -m4_define([LT_OPTION_DEFINE], -[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl -])# LT_OPTION_DEFINE - - -# dlopen -# ------ -LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes -]) - -AU_DEFUN([AC_LIBTOOL_DLOPEN], -[_LT_SET_OPTION([LT_INIT], [dlopen]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `dlopen' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) - - -# win32-dll -# --------- -# Declare package support for building win32 dll's. -LT_OPTION_DEFINE([LT_INIT], [win32-dll], -[enable_win32_dll=yes - -case $host in -*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) - AC_CHECK_TOOL(AS, as, false) - AC_CHECK_TOOL(DLLTOOL, dlltool, false) - AC_CHECK_TOOL(OBJDUMP, objdump, false) - ;; -esac - -test -z "$AS" && AS=as -_LT_DECL([], [AS], [0], [Assembler program])dnl - -test -z "$DLLTOOL" && DLLTOOL=dlltool -_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl - -test -z "$OBJDUMP" && OBJDUMP=objdump -_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl -])# win32-dll - -AU_DEFUN([AC_LIBTOOL_WIN32_DLL], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -_LT_SET_OPTION([LT_INIT], [win32-dll]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `win32-dll' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) - - -# _LT_ENABLE_SHARED([DEFAULT]) -# ---------------------------- -# implement the --enable-shared flag, and supports the `shared' and -# `disable-shared' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_SHARED], -[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([shared], - [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], - [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) - - _LT_DECL([build_libtool_libs], [enable_shared], [0], - [Whether or not to build shared libraries]) -])# _LT_ENABLE_SHARED - -LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) - -# Old names: -AC_DEFUN([AC_ENABLE_SHARED], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) -]) - -AC_DEFUN([AC_DISABLE_SHARED], -[_LT_SET_OPTION([LT_INIT], [disable-shared]) -]) - -AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) -AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_ENABLE_SHARED], []) -dnl AC_DEFUN([AM_DISABLE_SHARED], []) - - - -# _LT_ENABLE_STATIC([DEFAULT]) -# ---------------------------- -# implement the --enable-static flag, and support the `static' and -# `disable-static' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_STATIC], -[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([static], - [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], - [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_static=]_LT_ENABLE_STATIC_DEFAULT) - - _LT_DECL([build_old_libs], [enable_static], [0], - [Whether or not to build static libraries]) -])# _LT_ENABLE_STATIC - -LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) - -# Old names: -AC_DEFUN([AC_ENABLE_STATIC], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) -]) - -AC_DEFUN([AC_DISABLE_STATIC], -[_LT_SET_OPTION([LT_INIT], [disable-static]) -]) - -AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) -AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_ENABLE_STATIC], []) -dnl AC_DEFUN([AM_DISABLE_STATIC], []) - - - -# _LT_ENABLE_FAST_INSTALL([DEFAULT]) -# ---------------------------------- -# implement the --enable-fast-install flag, and support the `fast-install' -# and `disable-fast-install' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_FAST_INSTALL], -[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([fast-install], - [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], - [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) - -_LT_DECL([fast_install], [enable_fast_install], [0], - [Whether or not to optimize for fast installation])dnl -])# _LT_ENABLE_FAST_INSTALL - -LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) - -# Old names: -AU_DEFUN([AC_ENABLE_FAST_INSTALL], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you put -the `fast-install' option into LT_INIT's first parameter.]) -]) - -AU_DEFUN([AC_DISABLE_FAST_INSTALL], -[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you put -the `disable-fast-install' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) -dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) - - -# _LT_WITH_PIC([MODE]) -# -------------------- -# implement the --with-pic flag, and support the `pic-only' and `no-pic' -# LT_INIT options. -# MODE is either `yes' or `no'. If omitted, it defaults to `both'. -m4_define([_LT_WITH_PIC], -[AC_ARG_WITH([pic], - [AS_HELP_STRING([--with-pic], - [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], - [pic_mode="$withval"], - [pic_mode=default]) - -test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) - -_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl -])# _LT_WITH_PIC - -LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) -LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) - -# Old name: -AU_DEFUN([AC_LIBTOOL_PICMODE], -[_LT_SET_OPTION([LT_INIT], [pic-only]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `pic-only' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) - - -m4_define([_LTDL_MODE], []) -LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], - [m4_define([_LTDL_MODE], [nonrecursive])]) -LT_OPTION_DEFINE([LTDL_INIT], [recursive], - [m4_define([_LTDL_MODE], [recursive])]) -LT_OPTION_DEFINE([LTDL_INIT], [subproject], - [m4_define([_LTDL_MODE], [subproject])]) - -m4_define([_LTDL_TYPE], []) -LT_OPTION_DEFINE([LTDL_INIT], [installable], - [m4_define([_LTDL_TYPE], [installable])]) -LT_OPTION_DEFINE([LTDL_INIT], [convenience], - [m4_define([_LTDL_TYPE], [convenience])]) - -# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- -# -# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. -# Written by Gary V. Vaughan, 2004 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# serial 6 ltsugar.m4 - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) - - -# lt_join(SEP, ARG1, [ARG2...]) -# ----------------------------- -# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their -# associated separator. -# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier -# versions in m4sugar had bugs. -m4_define([lt_join], -[m4_if([$#], [1], [], - [$#], [2], [[$2]], - [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) -m4_define([_lt_join], -[m4_if([$#$2], [2], [], - [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) - - -# lt_car(LIST) -# lt_cdr(LIST) -# ------------ -# Manipulate m4 lists. -# These macros are necessary as long as will still need to support -# Autoconf-2.59 which quotes differently. -m4_define([lt_car], [[$1]]) -m4_define([lt_cdr], -[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], - [$#], 1, [], - [m4_dquote(m4_shift($@))])]) -m4_define([lt_unquote], $1) - - -# lt_append(MACRO-NAME, STRING, [SEPARATOR]) -# ------------------------------------------ -# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. -# Note that neither SEPARATOR nor STRING are expanded; they are appended -# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). -# No SEPARATOR is output if MACRO-NAME was previously undefined (different -# than defined and empty). -# -# This macro is needed until we can rely on Autoconf 2.62, since earlier -# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. -m4_define([lt_append], -[m4_define([$1], - m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) - - - -# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) -# ---------------------------------------------------------- -# Produce a SEP delimited list of all paired combinations of elements of -# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list -# has the form PREFIXmINFIXSUFFIXn. -# Needed until we can rely on m4_combine added in Autoconf 2.62. -m4_define([lt_combine], -[m4_if(m4_eval([$# > 3]), [1], - [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl -[[m4_foreach([_Lt_prefix], [$2], - [m4_foreach([_Lt_suffix], - ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, - [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) - - -# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) -# ----------------------------------------------------------------------- -# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited -# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. -m4_define([lt_if_append_uniq], -[m4_ifdef([$1], - [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], - [lt_append([$1], [$2], [$3])$4], - [$5])], - [lt_append([$1], [$2], [$3])$4])]) - - -# lt_dict_add(DICT, KEY, VALUE) -# ----------------------------- -m4_define([lt_dict_add], -[m4_define([$1($2)], [$3])]) - - -# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) -# -------------------------------------------- -m4_define([lt_dict_add_subkey], -[m4_define([$1($2:$3)], [$4])]) - - -# lt_dict_fetch(DICT, KEY, [SUBKEY]) -# ---------------------------------- -m4_define([lt_dict_fetch], -[m4_ifval([$3], - m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), - m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) - - -# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) -# ----------------------------------------------------------------- -m4_define([lt_if_dict_fetch], -[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], - [$5], - [$6])]) - - -# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) -# -------------------------------------------------------------- -m4_define([lt_dict_filter], -[m4_if([$5], [], [], - [lt_join(m4_quote(m4_default([$4], [[, ]])), - lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), - [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl -]) - -# ltversion.m4 -- version numbers -*- Autoconf -*- -# -# Copyright (C) 2004 Free Software Foundation, Inc. -# Written by Scott James Remnant, 2004 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# Generated from ltversion.in. - -# serial 3017 ltversion.m4 -# This file is part of GNU Libtool - -m4_define([LT_PACKAGE_VERSION], [2.2.6b]) -m4_define([LT_PACKAGE_REVISION], [1.3017]) - -AC_DEFUN([LTVERSION_VERSION], -[macro_version='2.2.6b' -macro_revision='1.3017' -_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) -_LT_DECL(, macro_revision, 0) -]) - -# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- -# -# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. -# Written by Scott James Remnant, 2004. -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# serial 4 lt~obsolete.m4 - -# These exist entirely to fool aclocal when bootstrapping libtool. -# -# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) -# which have later been changed to m4_define as they aren't part of the -# exported API, or moved to Autoconf or Automake where they belong. -# -# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN -# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us -# using a macro with the same name in our local m4/libtool.m4 it'll -# pull the old libtool.m4 in (it doesn't see our shiny new m4_define -# and doesn't know about Autoconf macros at all.) -# -# So we provide this file, which has a silly filename so it's always -# included after everything else. This provides aclocal with the -# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything -# because those macros already exist, or will be overwritten later. -# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. -# -# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. -# Yes, that means every name once taken will need to remain here until -# we give up compatibility with versions before 1.7, at which point -# we need to keep only those names which we still refer to. - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) - -m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) -m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) -m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) -m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) -m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) -m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) -m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) -m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) -m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) -m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) -m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) -m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) -m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) -m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) -m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) -m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) -m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) -m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) -m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) -m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) -m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) -m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) -m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) -m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) -m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) -m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) -m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) -m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) -m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) -m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) -m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) -m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) -m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) -m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) -m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) -m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) -m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) -m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) -m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) -m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) -m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) -m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) -m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])]) -m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) -m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) -m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) -m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) -m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) -m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) -m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) -m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) - # nls.m4 serial 5 (gettext-0.18) dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation, dnl Inc. @@ -8884,7 +918,7 @@ Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -_PKG_TEXT])dnl +_PKG_TEXT])[]dnl ]) elif test $pkg_failed = untried; then AC_MSG_RESULT([no]) @@ -8895,7 +929,7 @@ _PKG_TEXT -To get pkg-config, see .])dnl +To get pkg-config, see .])[]dnl ]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS @@ -9905,6 +1939,7 @@ ]) # _AM_PROG_TAR m4_include([build/m4/extensions/alarmclock.m4]) +m4_include([build/m4/extensions/albumartwriter.m4]) m4_include([build/m4/extensions/ampache.m4]) m4_include([build/m4/extensions/appindicator.m4]) m4_include([build/m4/extensions/awn.m4]) @@ -9912,6 +1947,7 @@ m4_include([build/m4/extensions/clutterflow.m4]) m4_include([build/m4/extensions/common.m4]) m4_include([build/m4/extensions/coverwallpaper.m4]) +m4_include([build/m4/extensions/duplicatesongdetector.m4]) m4_include([build/m4/extensions/jamendo.m4]) m4_include([build/m4/extensions/karaoke.m4]) m4_include([build/m4/extensions/lastfmfingerprint.m4]) @@ -9931,6 +1967,11 @@ m4_include([build/m4/shamrock/expansions.m4]) m4_include([build/m4/shamrock/gnome-doc.m4]) m4_include([build/m4/shamrock/i18n.m4]) +m4_include([build/m4/shamrock/libtool.m4]) +m4_include([build/m4/shamrock/ltoptions.m4]) +m4_include([build/m4/shamrock/ltsugar.m4]) +m4_include([build/m4/shamrock/ltversion.m4]) +m4_include([build/m4/shamrock/lt~obsolete.m4]) m4_include([build/m4/shamrock/mono.m4]) m4_include([build/m4/shamrock/nunit.m4]) m4_include([build/m4/shamrock/programs.m4]) diff -Nru banshee-community-extensions-2.0.1/AUTHORS banshee-community-extensions-2.2.0/AUTHORS --- banshee-community-extensions-2.0.1/AUTHORS 2011-05-03 20:28:02.000000000 +0000 +++ banshee-community-extensions-2.2.0/AUTHORS 2011-08-25 19:24:15.000000000 +0000 @@ -1,11 +1,13 @@ Extension Maintainers: AlarmClock Bertrand Lorentz + AlbumArtWriter Kevin Anthony Ampache John Moore AppIndicator Sense Hofstede Awn Marcos Almeida Jr ClutterFlow Mathijs Dumon CoverWallpaper David Corrales + DuplicateSongDetector Kevin Anthony Jamendo Bertrand Lorentz Janez Troha Karaoke Frank Ziegler @@ -38,8 +40,11 @@ Iain Lane Jo Shields Kriss + Nicholas Parker Patrick Niklaus Patrick van Staveren + Philipp Ittershagen + Raimo Radczewski Rodney Dawes Ruben Vermeersch Samuel Gyger diff -Nru banshee-community-extensions-2.0.1/build/m4/extensions/albumartwriter.m4 banshee-community-extensions-2.2.0/build/m4/extensions/albumartwriter.m4 --- banshee-community-extensions-2.0.1/build/m4/extensions/albumartwriter.m4 1970-01-01 00:00:00.000000000 +0000 +++ banshee-community-extensions-2.2.0/build/m4/extensions/albumartwriter.m4 2011-08-15 09:42:41.000000000 +0000 @@ -0,0 +1,11 @@ +AC_DEFUN([BCE_ALBUMARTWRITER], +[ + BCE_ARG_DISABLE([AlbumArtWriter], [yes]) + + if test "x$enable_AlbumArtWriter" = "xyes"; then + AM_CONDITIONAL(ENABLE_ALBUMARTWRITER, true) + else + AM_CONDITIONAL(ENABLE_ALBUMARTWRITER, false) + fi +]) + diff -Nru banshee-community-extensions-2.0.1/build/m4/extensions/duplicatesongdetector.m4 banshee-community-extensions-2.2.0/build/m4/extensions/duplicatesongdetector.m4 --- banshee-community-extensions-2.0.1/build/m4/extensions/duplicatesongdetector.m4 1970-01-01 00:00:00.000000000 +0000 +++ banshee-community-extensions-2.2.0/build/m4/extensions/duplicatesongdetector.m4 2011-08-25 16:59:30.000000000 +0000 @@ -0,0 +1,11 @@ +AC_DEFUN([BCE_DUPLICATESONGDETECTOR], +[ + BCE_ARG_DISABLE([DuplicateSongDetector], [yes]) + + if test "x$enable_DuplicateSongDetector" = "xyes"; then + AM_CONDITIONAL(ENABLE_DUPLICATESONGDETECTOR, true) + else + AM_CONDITIONAL(ENABLE_DUPLICATESONGDETECTOR, false) + fi +]) + diff -Nru banshee-community-extensions-2.0.1/build/m4/Makefile.in banshee-community-extensions-2.2.0/build/m4/Makefile.in --- banshee-community-extensions-2.0.1/build/m4/Makefile.in 2011-05-03 20:45:04.000000000 +0000 +++ banshee-community-extensions-2.2.0/build/m4/Makefile.in 2011-09-19 20:36:50.000000000 +0000 @@ -37,6 +37,7 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/m4/extensions/alarmclock.m4 \ + $(top_srcdir)/build/m4/extensions/albumartwriter.m4 \ $(top_srcdir)/build/m4/extensions/ampache.m4 \ $(top_srcdir)/build/m4/extensions/appindicator.m4 \ $(top_srcdir)/build/m4/extensions/awn.m4 \ @@ -44,6 +45,7 @@ $(top_srcdir)/build/m4/extensions/clutterflow.m4 \ $(top_srcdir)/build/m4/extensions/common.m4 \ $(top_srcdir)/build/m4/extensions/coverwallpaper.m4 \ + $(top_srcdir)/build/m4/extensions/duplicatesongdetector.m4 \ $(top_srcdir)/build/m4/extensions/jamendo.m4 \ $(top_srcdir)/build/m4/extensions/karaoke.m4 \ $(top_srcdir)/build/m4/extensions/lastfmfingerprint.m4 \ @@ -63,6 +65,11 @@ $(top_srcdir)/build/m4/shamrock/expansions.m4 \ $(top_srcdir)/build/m4/shamrock/gnome-doc.m4 \ $(top_srcdir)/build/m4/shamrock/i18n.m4 \ + $(top_srcdir)/build/m4/shamrock/libtool.m4 \ + $(top_srcdir)/build/m4/shamrock/ltoptions.m4 \ + $(top_srcdir)/build/m4/shamrock/ltsugar.m4 \ + $(top_srcdir)/build/m4/shamrock/ltversion.m4 \ + $(top_srcdir)/build/m4/shamrock/lt~obsolete.m4 \ $(top_srcdir)/build/m4/shamrock/mono.m4 \ $(top_srcdir)/build/m4/shamrock/nunit.m4 \ $(top_srcdir)/build/m4/shamrock/programs.m4 \ @@ -77,7 +84,6 @@ DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AM_MAKEFLAGS = @AM_MAKEFLAGS@ diff -Nru banshee-community-extensions-2.0.1/build/m4/shamrock/libtool.m4 banshee-community-extensions-2.2.0/build/m4/shamrock/libtool.m4 --- banshee-community-extensions-2.0.1/build/m4/shamrock/libtool.m4 1970-01-01 00:00:00.000000000 +0000 +++ banshee-community-extensions-2.2.0/build/m4/shamrock/libtool.m4 2011-09-19 20:36:43.000000000 +0000 @@ -0,0 +1,7377 @@ +# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008 Free Software Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +m4_define([_LT_COPYING], [dnl +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008 Free Software Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is part of GNU Libtool. +# +# GNU Libtool is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, or +# obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +]) + +# serial 56 LT_INIT + + +# LT_PREREQ(VERSION) +# ------------------ +# Complain and exit if this libtool version is less that VERSION. +m4_defun([LT_PREREQ], +[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, + [m4_default([$3], + [m4_fatal([Libtool version $1 or higher is required], + 63)])], + [$2])]) + + +# _LT_CHECK_BUILDDIR +# ------------------ +# Complain if the absolute build directory name contains unusual characters +m4_defun([_LT_CHECK_BUILDDIR], +[case `pwd` in + *\ * | *\ *) + AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; +esac +]) + + +# LT_INIT([OPTIONS]) +# ------------------ +AC_DEFUN([LT_INIT], +[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT +AC_BEFORE([$0], [LT_LANG])dnl +AC_BEFORE([$0], [LT_OUTPUT])dnl +AC_BEFORE([$0], [LTDL_INIT])dnl +m4_require([_LT_CHECK_BUILDDIR])dnl + +dnl Autoconf doesn't catch unexpanded LT_ macros by default: +m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl +m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl +dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 +dnl unless we require an AC_DEFUNed macro: +AC_REQUIRE([LTOPTIONS_VERSION])dnl +AC_REQUIRE([LTSUGAR_VERSION])dnl +AC_REQUIRE([LTVERSION_VERSION])dnl +AC_REQUIRE([LTOBSOLETE_VERSION])dnl +m4_require([_LT_PROG_LTMAIN])dnl + +dnl Parse OPTIONS +_LT_SET_OPTIONS([$0], [$1]) + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ltmain" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' +AC_SUBST(LIBTOOL)dnl + +_LT_SETUP + +# Only expand once: +m4_define([LT_INIT]) +])# LT_INIT + +# Old names: +AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) +AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_PROG_LIBTOOL], []) +dnl AC_DEFUN([AM_PROG_LIBTOOL], []) + + +# _LT_CC_BASENAME(CC) +# ------------------- +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +m4_defun([_LT_CC_BASENAME], +[for cc_temp in $1""; do + case $cc_temp in + compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; + distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +]) + + +# _LT_FILEUTILS_DEFAULTS +# ---------------------- +# It is okay to use these file commands and assume they have been set +# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. +m4_defun([_LT_FILEUTILS_DEFAULTS], +[: ${CP="cp -f"} +: ${MV="mv -f"} +: ${RM="rm -f"} +])# _LT_FILEUTILS_DEFAULTS + + +# _LT_SETUP +# --------- +m4_defun([_LT_SETUP], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +_LT_DECL([], [host_alias], [0], [The host system])dnl +_LT_DECL([], [host], [0])dnl +_LT_DECL([], [host_os], [0])dnl +dnl +_LT_DECL([], [build_alias], [0], [The build system])dnl +_LT_DECL([], [build], [0])dnl +_LT_DECL([], [build_os], [0])dnl +dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([LT_PATH_LD])dnl +AC_REQUIRE([LT_PATH_NM])dnl +dnl +AC_REQUIRE([AC_PROG_LN_S])dnl +test -z "$LN_S" && LN_S="ln -s" +_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl +dnl +AC_REQUIRE([LT_CMD_MAX_LEN])dnl +_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl +_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl +dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_CHECK_SHELL_FEATURES])dnl +m4_require([_LT_CMD_RELOAD])dnl +m4_require([_LT_CHECK_MAGIC_METHOD])dnl +m4_require([_LT_CMD_OLD_ARCHIVE])dnl +m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl + +_LT_CONFIG_LIBTOOL_INIT([ +# See if we are running on zsh, and set the options which allow our +# commands through without removal of \ escapes INIT. +if test -n "\${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi +]) +if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi + +_LT_CHECK_OBJDIR + +m4_require([_LT_TAG_COMPILER])dnl +_LT_PROG_ECHO_BACKSLASH + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\([["`\\]]\)/\\\1/g' + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +# Global variables: +ofile=libtool +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a + +with_gnu_ld="$lt_cv_prog_gnu_ld" + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$LD" && LD=ld +test -z "$ac_objext" && ac_objext=o + +_LT_CC_BASENAME([$compiler]) + +# Only perform the check for file, if the check method requires it +test -z "$MAGIC_CMD" && MAGIC_CMD=file +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + _LT_PATH_MAGIC + fi + ;; +esac + +# Use C for the default configuration in the libtool script +LT_SUPPORTED_TAG([CC]) +_LT_LANG_C_CONFIG +_LT_LANG_DEFAULT_CONFIG +_LT_CONFIG_COMMANDS +])# _LT_SETUP + + +# _LT_PROG_LTMAIN +# --------------- +# Note that this code is called both from `configure', and `config.status' +# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, +# `config.status' has no value for ac_aux_dir unless we are using Automake, +# so we pass a copy along to make sure it has a sensible value anyway. +m4_defun([_LT_PROG_LTMAIN], +[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl +_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) +ltmain="$ac_aux_dir/ltmain.sh" +])# _LT_PROG_LTMAIN + + +## ------------------------------------- ## +## Accumulate code for creating libtool. ## +## ------------------------------------- ## + +# So that we can recreate a full libtool script including additional +# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS +# in macros and then make a single call at the end using the `libtool' +# label. + + +# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) +# ---------------------------------------- +# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. +m4_define([_LT_CONFIG_LIBTOOL_INIT], +[m4_ifval([$1], + [m4_append([_LT_OUTPUT_LIBTOOL_INIT], + [$1 +])])]) + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_INIT]) + + +# _LT_CONFIG_LIBTOOL([COMMANDS]) +# ------------------------------ +# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. +m4_define([_LT_CONFIG_LIBTOOL], +[m4_ifval([$1], + [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], + [$1 +])])]) + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) + + +# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) +# ----------------------------------------------------- +m4_defun([_LT_CONFIG_SAVE_COMMANDS], +[_LT_CONFIG_LIBTOOL([$1]) +_LT_CONFIG_LIBTOOL_INIT([$2]) +]) + + +# _LT_FORMAT_COMMENT([COMMENT]) +# ----------------------------- +# Add leading comment marks to the start of each line, and a trailing +# full-stop to the whole comment if one is not present already. +m4_define([_LT_FORMAT_COMMENT], +[m4_ifval([$1], [ +m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], + [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) +)]) + + + +## ------------------------ ## +## FIXME: Eliminate VARNAME ## +## ------------------------ ## + + +# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) +# ------------------------------------------------------------------- +# CONFIGNAME is the name given to the value in the libtool script. +# VARNAME is the (base) name used in the configure script. +# VALUE may be 0, 1 or 2 for a computed quote escaped value based on +# VARNAME. Any other value will be used directly. +m4_define([_LT_DECL], +[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], + [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], + [m4_ifval([$1], [$1], [$2])]) + lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) + m4_ifval([$4], + [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) + lt_dict_add_subkey([lt_decl_dict], [$2], + [tagged?], [m4_ifval([$5], [yes], [no])])]) +]) + + +# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) +# -------------------------------------------------------- +m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) + + +# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) +# ------------------------------------------------ +m4_define([lt_decl_tag_varnames], +[_lt_decl_filter([tagged?], [yes], $@)]) + + +# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) +# --------------------------------------------------------- +m4_define([_lt_decl_filter], +[m4_case([$#], + [0], [m4_fatal([$0: too few arguments: $#])], + [1], [m4_fatal([$0: too few arguments: $#: $1])], + [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], + [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], + [lt_dict_filter([lt_decl_dict], $@)])[]dnl +]) + + +# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) +# -------------------------------------------------- +m4_define([lt_decl_quote_varnames], +[_lt_decl_filter([value], [1], $@)]) + + +# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) +# --------------------------------------------------- +m4_define([lt_decl_dquote_varnames], +[_lt_decl_filter([value], [2], $@)]) + + +# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) +# --------------------------------------------------- +m4_define([lt_decl_varnames_tagged], +[m4_assert([$# <= 2])dnl +_$0(m4_quote(m4_default([$1], [[, ]])), + m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), + m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) +m4_define([_lt_decl_varnames_tagged], +[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) + + +# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) +# ------------------------------------------------ +m4_define([lt_decl_all_varnames], +[_$0(m4_quote(m4_default([$1], [[, ]])), + m4_if([$2], [], + m4_quote(lt_decl_varnames), + m4_quote(m4_shift($@))))[]dnl +]) +m4_define([_lt_decl_all_varnames], +[lt_join($@, lt_decl_varnames_tagged([$1], + lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl +]) + + +# _LT_CONFIG_STATUS_DECLARE([VARNAME]) +# ------------------------------------ +# Quote a variable value, and forward it to `config.status' so that its +# declaration there will have the same value as in `configure'. VARNAME +# must have a single quote delimited value for this to work. +m4_define([_LT_CONFIG_STATUS_DECLARE], +[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`']) + + +# _LT_CONFIG_STATUS_DECLARATIONS +# ------------------------------ +# We delimit libtool config variables with single quotes, so when +# we write them to config.status, we have to be sure to quote all +# embedded single quotes properly. In configure, this macro expands +# each variable declared with _LT_DECL (and _LT_TAGDECL) into: +# +# ='`$ECHO "X$" | $Xsed -e "$delay_single_quote_subst"`' +m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], +[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), + [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) + + +# _LT_LIBTOOL_TAGS +# ---------------- +# Output comment and list of tags supported by the script +m4_defun([_LT_LIBTOOL_TAGS], +[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl +available_tags="_LT_TAGS"dnl +]) + + +# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) +# ----------------------------------- +# Extract the dictionary values for VARNAME (optionally with TAG) and +# expand to a commented shell variable setting: +# +# # Some comment about what VAR is for. +# visible_name=$lt_internal_name +m4_define([_LT_LIBTOOL_DECLARE], +[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], + [description])))[]dnl +m4_pushdef([_libtool_name], + m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl +m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), + [0], [_libtool_name=[$]$1], + [1], [_libtool_name=$lt_[]$1], + [2], [_libtool_name=$lt_[]$1], + [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl +m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl +]) + + +# _LT_LIBTOOL_CONFIG_VARS +# ----------------------- +# Produce commented declarations of non-tagged libtool config variables +# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' +# script. Tagged libtool config variables (even for the LIBTOOL CONFIG +# section) are produced by _LT_LIBTOOL_TAG_VARS. +m4_defun([_LT_LIBTOOL_CONFIG_VARS], +[m4_foreach([_lt_var], + m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), + [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) + + +# _LT_LIBTOOL_TAG_VARS(TAG) +# ------------------------- +m4_define([_LT_LIBTOOL_TAG_VARS], +[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), + [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) + + +# _LT_TAGVAR(VARNAME, [TAGNAME]) +# ------------------------------ +m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) + + +# _LT_CONFIG_COMMANDS +# ------------------- +# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of +# variables for single and double quote escaping we saved from calls +# to _LT_DECL, we can put quote escaped variables declarations +# into `config.status', and then the shell code to quote escape them in +# for loops in `config.status'. Finally, any additional code accumulated +# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. +m4_defun([_LT_CONFIG_COMMANDS], +[AC_PROVIDE_IFELSE([LT_OUTPUT], + dnl If the libtool generation code has been placed in $CONFIG_LT, + dnl instead of duplicating it all over again into config.status, + dnl then we will have config.status run $CONFIG_LT later, so it + dnl needs to know what name is stored there: + [AC_CONFIG_COMMANDS([libtool], + [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], + dnl If the libtool generation code is destined for config.status, + dnl expand the accumulated commands and init code now: + [AC_CONFIG_COMMANDS([libtool], + [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) +])#_LT_CONFIG_COMMANDS + + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], +[ + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +sed_quote_subst='$sed_quote_subst' +double_quote_subst='$double_quote_subst' +delay_variable_subst='$delay_variable_subst' +_LT_CONFIG_STATUS_DECLARATIONS +LTCC='$LTCC' +LTCFLAGS='$LTCFLAGS' +compiler='$compiler_DEFAULT' + +# Quote evaled strings. +for var in lt_decl_all_varnames([[ \ +]], lt_decl_quote_varnames); do + case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + *[[\\\\\\\`\\"\\\$]]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +# Double-quote double-evaled strings. +for var in lt_decl_all_varnames([[ \ +]], lt_decl_dquote_varnames); do + case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + *[[\\\\\\\`\\"\\\$]]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +# Fix-up fallback echo if it was mangled by the above quoting rules. +case \$lt_ECHO in +*'\\\[$]0 --fallback-echo"')dnl " + lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\` + ;; +esac + +_LT_OUTPUT_LIBTOOL_INIT +]) + + +# LT_OUTPUT +# --------- +# This macro allows early generation of the libtool script (before +# AC_OUTPUT is called), incase it is used in configure for compilation +# tests. +AC_DEFUN([LT_OUTPUT], +[: ${CONFIG_LT=./config.lt} +AC_MSG_NOTICE([creating $CONFIG_LT]) +cat >"$CONFIG_LT" <<_LTEOF +#! $SHELL +# Generated by $as_me. +# Run this file to recreate a libtool stub with the current configuration. + +lt_cl_silent=false +SHELL=\${CONFIG_SHELL-$SHELL} +_LTEOF + +cat >>"$CONFIG_LT" <<\_LTEOF +AS_SHELL_SANITIZE +_AS_PREPARE + +exec AS_MESSAGE_FD>&1 +exec AS_MESSAGE_LOG_FD>>config.log +{ + echo + AS_BOX([Running $as_me.]) +} >&AS_MESSAGE_LOG_FD + +lt_cl_help="\ +\`$as_me' creates a local libtool stub from the current configuration, +for use in further configure time tests before the real libtool is +generated. + +Usage: $[0] [[OPTIONS]] + + -h, --help print this help, then exit + -V, --version print version number, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + +Report bugs to ." + +lt_cl_version="\ +m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl +m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) +configured by $[0], generated by m4_PACKAGE_STRING. + +Copyright (C) 2008 Free Software Foundation, Inc. +This config.lt script is free software; the Free Software Foundation +gives unlimited permision to copy, distribute and modify it." + +while test $[#] != 0 +do + case $[1] in + --version | --v* | -V ) + echo "$lt_cl_version"; exit 0 ;; + --help | --h* | -h ) + echo "$lt_cl_help"; exit 0 ;; + --debug | --d* | -d ) + debug=: ;; + --quiet | --q* | --silent | --s* | -q ) + lt_cl_silent=: ;; + + -*) AC_MSG_ERROR([unrecognized option: $[1] +Try \`$[0] --help' for more information.]) ;; + + *) AC_MSG_ERROR([unrecognized argument: $[1] +Try \`$[0] --help' for more information.]) ;; + esac + shift +done + +if $lt_cl_silent; then + exec AS_MESSAGE_FD>/dev/null +fi +_LTEOF + +cat >>"$CONFIG_LT" <<_LTEOF +_LT_OUTPUT_LIBTOOL_COMMANDS_INIT +_LTEOF + +cat >>"$CONFIG_LT" <<\_LTEOF +AC_MSG_NOTICE([creating $ofile]) +_LT_OUTPUT_LIBTOOL_COMMANDS +AS_EXIT(0) +_LTEOF +chmod +x "$CONFIG_LT" + +# configure is writing to config.log, but config.lt does its own redirection, +# appending to config.log, which fails on DOS, as config.log is still kept +# open by configure. Here we exec the FD to /dev/null, effectively closing +# config.log, so it can be properly (re)opened and appended to by config.lt. +if test "$no_create" != yes; then + lt_cl_success=: + test "$silent" = yes && + lt_config_lt_args="$lt_config_lt_args --quiet" + exec AS_MESSAGE_LOG_FD>/dev/null + $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false + exec AS_MESSAGE_LOG_FD>>config.log + $lt_cl_success || AS_EXIT(1) +fi +])# LT_OUTPUT + + +# _LT_CONFIG(TAG) +# --------------- +# If TAG is the built-in tag, create an initial libtool script with a +# default configuration from the untagged config vars. Otherwise add code +# to config.status for appending the configuration named by TAG from the +# matching tagged config vars. +m4_defun([_LT_CONFIG], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +_LT_CONFIG_SAVE_COMMANDS([ + m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl + m4_if(_LT_TAG, [C], [ + # See if we are running on zsh, and set the options which allow our + # commands through without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + + cfgfile="${ofile}T" + trap "$RM \"$cfgfile\"; exit 1" 1 2 15 + $RM "$cfgfile" + + cat <<_LT_EOF >> "$cfgfile" +#! $SHELL + +# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +_LT_COPYING +_LT_LIBTOOL_TAGS + +# ### BEGIN LIBTOOL CONFIG +_LT_LIBTOOL_CONFIG_VARS +_LT_LIBTOOL_TAG_VARS +# ### END LIBTOOL CONFIG + +_LT_EOF + + case $host_os in + aix3*) + cat <<\_LT_EOF >> "$cfgfile" +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +_LT_EOF + ;; + esac + + _LT_PROG_LTMAIN + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + _LT_PROG_XSI_SHELLFNS + + sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" +], +[cat <<_LT_EOF >> "$ofile" + +dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded +dnl in a comment (ie after a #). +# ### BEGIN LIBTOOL TAG CONFIG: $1 +_LT_LIBTOOL_TAG_VARS(_LT_TAG) +# ### END LIBTOOL TAG CONFIG: $1 +_LT_EOF +])dnl /m4_if +], +[m4_if([$1], [], [ + PACKAGE='$PACKAGE' + VERSION='$VERSION' + TIMESTAMP='$TIMESTAMP' + RM='$RM' + ofile='$ofile'], []) +])dnl /_LT_CONFIG_SAVE_COMMANDS +])# _LT_CONFIG + + +# LT_SUPPORTED_TAG(TAG) +# --------------------- +# Trace this macro to discover what tags are supported by the libtool +# --tag option, using: +# autoconf --trace 'LT_SUPPORTED_TAG:$1' +AC_DEFUN([LT_SUPPORTED_TAG], []) + + +# C support is built-in for now +m4_define([_LT_LANG_C_enabled], []) +m4_define([_LT_TAGS], []) + + +# LT_LANG(LANG) +# ------------- +# Enable libtool support for the given language if not already enabled. +AC_DEFUN([LT_LANG], +[AC_BEFORE([$0], [LT_OUTPUT])dnl +m4_case([$1], + [C], [_LT_LANG(C)], + [C++], [_LT_LANG(CXX)], + [Java], [_LT_LANG(GCJ)], + [Fortran 77], [_LT_LANG(F77)], + [Fortran], [_LT_LANG(FC)], + [Windows Resource], [_LT_LANG(RC)], + [m4_ifdef([_LT_LANG_]$1[_CONFIG], + [_LT_LANG($1)], + [m4_fatal([$0: unsupported language: "$1"])])])dnl +])# LT_LANG + + +# _LT_LANG(LANGNAME) +# ------------------ +m4_defun([_LT_LANG], +[m4_ifdef([_LT_LANG_]$1[_enabled], [], + [LT_SUPPORTED_TAG([$1])dnl + m4_append([_LT_TAGS], [$1 ])dnl + m4_define([_LT_LANG_]$1[_enabled], [])dnl + _LT_LANG_$1_CONFIG($1)])dnl +])# _LT_LANG + + +# _LT_LANG_DEFAULT_CONFIG +# ----------------------- +m4_defun([_LT_LANG_DEFAULT_CONFIG], +[AC_PROVIDE_IFELSE([AC_PROG_CXX], + [LT_LANG(CXX)], + [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) + +AC_PROVIDE_IFELSE([AC_PROG_F77], + [LT_LANG(F77)], + [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) + +AC_PROVIDE_IFELSE([AC_PROG_FC], + [LT_LANG(FC)], + [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) + +dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal +dnl pulling things in needlessly. +AC_PROVIDE_IFELSE([AC_PROG_GCJ], + [LT_LANG(GCJ)], + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], + [LT_LANG(GCJ)], + [AC_PROVIDE_IFELSE([LT_PROG_GCJ], + [LT_LANG(GCJ)], + [m4_ifdef([AC_PROG_GCJ], + [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) + m4_ifdef([A][M_PROG_GCJ], + [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) + m4_ifdef([LT_PROG_GCJ], + [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) + +AC_PROVIDE_IFELSE([LT_PROG_RC], + [LT_LANG(RC)], + [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) +])# _LT_LANG_DEFAULT_CONFIG + +# Obsolete macros: +AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) +AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) +AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) +AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_CXX], []) +dnl AC_DEFUN([AC_LIBTOOL_F77], []) +dnl AC_DEFUN([AC_LIBTOOL_FC], []) +dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) + + +# _LT_TAG_COMPILER +# ---------------- +m4_defun([_LT_TAG_COMPILER], +[AC_REQUIRE([AC_PROG_CC])dnl + +_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl +_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl +_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl +_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC +])# _LT_TAG_COMPILER + + +# _LT_COMPILER_BOILERPLATE +# ------------------------ +# Check for compiler boilerplate output or warnings with +# the simple compiler test code. +m4_defun([_LT_COMPILER_BOILERPLATE], +[m4_require([_LT_DECL_SED])dnl +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$RM conftest* +])# _LT_COMPILER_BOILERPLATE + + +# _LT_LINKER_BOILERPLATE +# ---------------------- +# Check for linker boilerplate output or warnings with +# the simple link test code. +m4_defun([_LT_LINKER_BOILERPLATE], +[m4_require([_LT_DECL_SED])dnl +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$RM -r conftest* +])# _LT_LINKER_BOILERPLATE + +# _LT_REQUIRED_DARWIN_CHECKS +# ------------------------- +m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ + case $host_os in + rhapsody* | darwin*) + AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) + AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) + AC_CHECK_TOOL([LIPO], [lipo], [:]) + AC_CHECK_TOOL([OTOOL], [otool], [:]) + AC_CHECK_TOOL([OTOOL64], [otool64], [:]) + _LT_DECL([], [DSYMUTIL], [1], + [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) + _LT_DECL([], [NMEDIT], [1], + [Tool to change global to local symbols on Mac OS X]) + _LT_DECL([], [LIPO], [1], + [Tool to manipulate fat objects and archives on Mac OS X]) + _LT_DECL([], [OTOOL], [1], + [ldd/readelf like tool for Mach-O binaries on Mac OS X]) + _LT_DECL([], [OTOOL64], [1], + [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) + + AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], + [lt_cv_apple_cc_single_mod=no + if test -z "${LT_MULTI_MODULE}"; then + # By default we will add the -single_module flag. You can override + # by either setting the environment variable LT_MULTI_MODULE + # non-empty at configure time, or by adding -multi_module to the + # link flags. + rm -rf libconftest.dylib* + echo "int foo(void){return 1;}" > conftest.c + echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ +-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD + $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ + -dynamiclib -Wl,-single_module conftest.c 2>conftest.err + _lt_result=$? + if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then + lt_cv_apple_cc_single_mod=yes + else + cat conftest.err >&AS_MESSAGE_LOG_FD + fi + rm -rf libconftest.dylib* + rm -f conftest.* + fi]) + AC_CACHE_CHECK([for -exported_symbols_list linker flag], + [lt_cv_ld_exported_symbols_list], + [lt_cv_ld_exported_symbols_list=no + save_LDFLAGS=$LDFLAGS + echo "_main" > conftest.sym + LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], + [lt_cv_ld_exported_symbols_list=yes], + [lt_cv_ld_exported_symbols_list=no]) + LDFLAGS="$save_LDFLAGS" + ]) + case $host_os in + rhapsody* | darwin1.[[012]]) + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + darwin1.*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + darwin*) # darwin 5.x on + # if running on 10.5 or later, the deployment target defaults + # to the OS version, if on x86, and 10.4, the deployment + # target defaults to 10.4. Don't you love it? + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + 10.[[012]]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + esac + ;; + esac + if test "$lt_cv_apple_cc_single_mod" = "yes"; then + _lt_dar_single_mod='$single_module' + fi + if test "$lt_cv_ld_exported_symbols_list" = "yes"; then + _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' + else + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + if test "$DSYMUTIL" != ":"; then + _lt_dsymutil='~$DSYMUTIL $lib || :' + else + _lt_dsymutil= + fi + ;; + esac +]) + + +# _LT_DARWIN_LINKER_FEATURES +# -------------------------- +# Checks for linker and compiler features on darwin +m4_defun([_LT_DARWIN_LINKER_FEATURES], +[ + m4_require([_LT_REQUIRED_DARWIN_CHECKS]) + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_automatic, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_TAGVAR(whole_archive_flag_spec, $1)='' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" + case $cc_basename in + ifort*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=echo + _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" + _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + m4_if([$1], [CXX], +[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then + _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" + fi +],[]) + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi +]) + +# _LT_SYS_MODULE_PATH_AIX +# ----------------------- +# Links a minimal program and checks the executable +# for the system default hardcoded library path. In most cases, +# this is /usr/lib:/lib, but when the MPI compilers are used +# the location of the communication and MPI libs are included too. +# If we don't find anything, use the default library path according +# to the aix ld manual. +m4_defun([_LT_SYS_MODULE_PATH_AIX], +[m4_require([_LT_DECL_SED])dnl +AC_LINK_IFELSE(AC_LANG_PROGRAM,[ +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi],[]) +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi +])# _LT_SYS_MODULE_PATH_AIX + + +# _LT_SHELL_INIT(ARG) +# ------------------- +m4_define([_LT_SHELL_INIT], +[ifdef([AC_DIVERSION_NOTICE], + [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], + [AC_DIVERT_PUSH(NOTICE)]) +$1 +AC_DIVERT_POP +])# _LT_SHELL_INIT + + +# _LT_PROG_ECHO_BACKSLASH +# ----------------------- +# Add some code to the start of the generated configure script which +# will find an echo command which doesn't interpret backslashes. +m4_defun([_LT_PROG_ECHO_BACKSLASH], +[_LT_SHELL_INIT([ +# Check that we are running under the correct shell. +SHELL=${CONFIG_SHELL-/bin/sh} + +case X$lt_ECHO in +X*--fallback-echo) + # Remove one level of quotation (which was required for Make). + ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` + ;; +esac + +ECHO=${lt_ECHO-echo} +if test "X[$]1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift +elif test "X[$]1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : +elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then + # Yippee, $ECHO works! + : +else + # Restart under the correct shell. + exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} +fi + +if test "X[$]1" = X--fallback-echo; then + # used as fallback echo + shift + cat <<_LT_EOF +[$]* +_LT_EOF + exit 0 +fi + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +if test -z "$lt_ECHO"; then + if test "X${echo_test_string+set}" != Xset; then + # find a string as large as possible, as long as the shell can cope with it + for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do + # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... + if { echo_test_string=`eval $cmd`; } 2>/dev/null && + { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null + then + break + fi + done + fi + + if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && + echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + : + else + # The Solaris, AIX, and Digital Unix default echo programs unquote + # backslashes. This makes it impossible to quote backslashes using + # echo "$something" | sed 's/\\/\\\\/g' + # + # So, first we look for a working echo in the user's PATH. + + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for dir in $PATH /usr/ucb; do + IFS="$lt_save_ifs" + if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && + test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + ECHO="$dir/echo" + break + fi + done + IFS="$lt_save_ifs" + + if test "X$ECHO" = Xecho; then + # We didn't find a better echo, so look for alternatives. + if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && + echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # This shell has a builtin print -r that does the trick. + ECHO='print -r' + elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && + test "X$CONFIG_SHELL" != X/bin/ksh; then + # If we have ksh, try running configure again with it. + ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} + export ORIGINAL_CONFIG_SHELL + CONFIG_SHELL=/bin/ksh + export CONFIG_SHELL + exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} + else + # Try using printf. + ECHO='printf %s\n' + if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && + echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # Cool, printf works + : + elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL + export CONFIG_SHELL + SHELL="$CONFIG_SHELL" + export SHELL + ECHO="$CONFIG_SHELL [$]0 --fallback-echo" + elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + ECHO="$CONFIG_SHELL [$]0 --fallback-echo" + else + # maybe with a smaller string... + prev=: + + for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do + if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null + then + break + fi + prev="$cmd" + done + + if test "$prev" != 'sed 50q "[$]0"'; then + echo_test_string=`eval $prev` + export echo_test_string + exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} + else + # Oops. We lost completely, so just stick with echo. + ECHO=echo + fi + fi + fi + fi + fi +fi + +# Copy echo and quote the copy suitably for passing to libtool from +# the Makefile, instead of quoting the original, which is used later. +lt_ECHO=$ECHO +if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then + lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" +fi + +AC_SUBST(lt_ECHO) +]) +_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) +_LT_DECL([], [ECHO], [1], + [An echo program that does not interpret backslashes]) +])# _LT_PROG_ECHO_BACKSLASH + + +# _LT_ENABLE_LOCK +# --------------- +m4_defun([_LT_ENABLE_LOCK], +[AC_ARG_ENABLE([libtool-lock], + [AS_HELP_STRING([--disable-libtool-lock], + [avoid locking (might break parallel builds)])]) +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '[#]line __oline__ "configure"' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +s390*-*linux*|s390*-*tpf*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_i386_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_x86_64_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*|s390*-*tpf*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, + [AC_LANG_PUSH(C) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) + AC_LANG_POP]) + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +sparc*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) LD="${LD-ld} -m elf64_sparc" ;; + *) + if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then + LD="${LD-ld} -64" + fi + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; +esac + +need_locks="$enable_libtool_lock" +])# _LT_ENABLE_LOCK + + +# _LT_CMD_OLD_ARCHIVE +# ------------------- +m4_defun([_LT_CMD_OLD_ARCHIVE], +[AC_CHECK_TOOL(AR, ar, false) +test -z "$AR" && AR=ar +test -z "$AR_FLAGS" && AR_FLAGS=cru +_LT_DECL([], [AR], [1], [The archiver]) +_LT_DECL([], [AR_FLAGS], [1]) + +AC_CHECK_TOOL(STRIP, strip, :) +test -z "$STRIP" && STRIP=: +_LT_DECL([], [STRIP], [1], [A symbol stripping program]) + +AC_CHECK_TOOL(RANLIB, ranlib, :) +test -z "$RANLIB" && RANLIB=: +_LT_DECL([], [RANLIB], [1], + [Commands used to install an old-style archive]) + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" +fi +_LT_DECL([], [old_postinstall_cmds], [2]) +_LT_DECL([], [old_postuninstall_cmds], [2]) +_LT_TAGDECL([], [old_archive_cmds], [2], + [Commands used to build an old-style archive]) +])# _LT_CMD_OLD_ARCHIVE + + +# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) +# ---------------------------------------------------------------- +# Check whether the given compiler option works +AC_DEFUN([_LT_COMPILER_OPTION], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_SED])dnl +AC_CACHE_CHECK([$1], [$2], + [$2=no + m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$3" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + fi + $RM conftest* +]) + +if test x"[$]$2" = xyes; then + m4_if([$5], , :, [$5]) +else + m4_if([$6], , :, [$6]) +fi +])# _LT_COMPILER_OPTION + +# Old name: +AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) + + +# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [ACTION-SUCCESS], [ACTION-FAILURE]) +# ---------------------------------------------------- +# Check whether the given linker option works +AC_DEFUN([_LT_LINKER_OPTION], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_SED])dnl +AC_CACHE_CHECK([$1], [$2], + [$2=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $3" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&AS_MESSAGE_LOG_FD + $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + else + $2=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" +]) + +if test x"[$]$2" = xyes; then + m4_if([$4], , :, [$4]) +else + m4_if([$5], , :, [$5]) +fi +])# _LT_LINKER_OPTION + +# Old name: +AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) + + +# LT_CMD_MAX_LEN +#--------------- +AC_DEFUN([LT_CMD_MAX_LEN], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +# find the maximum length of command line arguments +AC_MSG_CHECKING([the maximum length of command line arguments]) +AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl + i=0 + teststring="ABCD" + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` + if test -n "$lt_cv_sys_max_cmd_len"; then + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + else + # Make teststring a little bigger before we do anything with it. + # a 1K string should be a reasonable start. + for i in 1 2 3 4 5 6 7 8 ; do + teststring=$teststring$teststring + done + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ + = "XX$teststring$teststring"; } >/dev/null 2>&1 && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + # Only check the string length outside the loop. + lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` + teststring= + # Add a significant safety factor because C++ compilers can tack on + # massive amounts of additional arguments before passing them to the + # linker. It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + fi + ;; + esac +]) +if test -n $lt_cv_sys_max_cmd_len ; then + AC_MSG_RESULT($lt_cv_sys_max_cmd_len) +else + AC_MSG_RESULT(none) +fi +max_cmd_len=$lt_cv_sys_max_cmd_len +_LT_DECL([], [max_cmd_len], [0], + [What is the maximum length of a command?]) +])# LT_CMD_MAX_LEN + +# Old name: +AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) + + +# _LT_HEADER_DLFCN +# ---------------- +m4_defun([_LT_HEADER_DLFCN], +[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl +])# _LT_HEADER_DLFCN + + +# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, +# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) +# ---------------------------------------------------------------- +m4_defun([_LT_TRY_DLOPEN_SELF], +[m4_require([_LT_HEADER_DLFCN])dnl +if test "$cross_compiling" = yes; then : + [$4] +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +[#line __oline__ "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +}] +_LT_EOF + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) $1 ;; + x$lt_dlneed_uscore) $2 ;; + x$lt_dlunknown|x*) $3 ;; + esac + else : + # compilation failed + $3 + fi +fi +rm -fr conftest* +])# _LT_TRY_DLOPEN_SELF + + +# LT_SYS_DLOPEN_SELF +# ------------------ +AC_DEFUN([LT_SYS_DLOPEN_SELF], +[m4_require([_LT_HEADER_DLFCN])dnl +if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32* | cegcc*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ]) + ;; + + *) + AC_CHECK_FUNC([shl_load], + [lt_cv_dlopen="shl_load"], + [AC_CHECK_LIB([dld], [shl_load], + [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], + [AC_CHECK_FUNC([dlopen], + [lt_cv_dlopen="dlopen"], + [AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], + [AC_CHECK_LIB([svld], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], + [AC_CHECK_LIB([dld], [dld_link], + [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) + ]) + ]) + ]) + ]) + ]) + ;; + esac + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + AC_CACHE_CHECK([whether a program can dlopen itself], + lt_cv_dlopen_self, [dnl + _LT_TRY_DLOPEN_SELF( + lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, + lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) + ]) + + if test "x$lt_cv_dlopen_self" = xyes; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + AC_CACHE_CHECK([whether a statically linked program can dlopen itself], + lt_cv_dlopen_self_static, [dnl + _LT_TRY_DLOPEN_SELF( + lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, + lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) + ]) + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi +_LT_DECL([dlopen_support], [enable_dlopen], [0], + [Whether dlopen is supported]) +_LT_DECL([dlopen_self], [enable_dlopen_self], [0], + [Whether dlopen of programs is supported]) +_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], + [Whether dlopen of statically linked programs is supported]) +])# LT_SYS_DLOPEN_SELF + +# Old name: +AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) + + +# _LT_COMPILER_C_O([TAGNAME]) +# --------------------------- +# Check to see if options -c and -o are simultaneously supported by compiler. +# This macro does not hard code the compiler like AC_PROG_CC_C_O. +m4_defun([_LT_COMPILER_C_O], +[m4_require([_LT_DECL_SED])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_TAG_COMPILER])dnl +AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], + [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], + [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + fi + fi + chmod u+w . 2>&AS_MESSAGE_LOG_FD + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* +]) +_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], + [Does compiler simultaneously support -c and -o options?]) +])# _LT_COMPILER_C_O + + +# _LT_COMPILER_FILE_LOCKS([TAGNAME]) +# ---------------------------------- +# Check to see if we can do hard links to lock some files if needed +m4_defun([_LT_COMPILER_FILE_LOCKS], +[m4_require([_LT_ENABLE_LOCK])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +_LT_COMPILER_C_O([$1]) + +hard_links="nottested" +if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + AC_MSG_CHECKING([if we can lock with hard links]) + hard_links=yes + $RM conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + AC_MSG_RESULT([$hard_links]) + if test "$hard_links" = no; then + AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) + need_locks=warn + fi +else + need_locks=no +fi +_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) +])# _LT_COMPILER_FILE_LOCKS + + +# _LT_CHECK_OBJDIR +# ---------------- +m4_defun([_LT_CHECK_OBJDIR], +[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], +[rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null]) +objdir=$lt_cv_objdir +_LT_DECL([], [objdir], [0], + [The name of the directory that contains temporary libtool files])dnl +m4_pattern_allow([LT_OBJDIR])dnl +AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", + [Define to the sub-directory in which libtool stores uninstalled libraries.]) +])# _LT_CHECK_OBJDIR + + +# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) +# -------------------------------------- +# Check hardcoding attributes. +m4_defun([_LT_LINKER_HARDCODE_LIBPATH], +[AC_MSG_CHECKING([how to hardcode library paths into programs]) +_LT_TAGVAR(hardcode_action, $1)= +if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || + test -n "$_LT_TAGVAR(runpath_var, $1)" || + test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then + + # We can hardcode non-existent directories. + if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && + test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then + # Linking always hardcodes the temporary library directory. + _LT_TAGVAR(hardcode_action, $1)=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + _LT_TAGVAR(hardcode_action, $1)=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + _LT_TAGVAR(hardcode_action, $1)=unsupported +fi +AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) + +if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || + test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi +_LT_TAGDECL([], [hardcode_action], [0], + [How to hardcode a shared library path into an executable]) +])# _LT_LINKER_HARDCODE_LIBPATH + + +# _LT_CMD_STRIPLIB +# ---------------- +m4_defun([_LT_CMD_STRIPLIB], +[m4_require([_LT_DECL_EGREP]) +striplib= +old_striplib= +AC_MSG_CHECKING([whether stripping libraries is possible]) +if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + AC_MSG_RESULT([yes]) +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + old_striplib="$STRIP -S" + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + fi + ;; + *) + AC_MSG_RESULT([no]) + ;; + esac +fi +_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) +_LT_DECL([], [striplib], [1]) +])# _LT_CMD_STRIPLIB + + +# _LT_SYS_DYNAMIC_LINKER([TAG]) +# ----------------------------- +# PORTME Fill in your ld.so characteristics +m4_defun([_LT_SYS_DYNAMIC_LINKER], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_OBJDUMP])dnl +m4_require([_LT_DECL_SED])dnl +AC_MSG_CHECKING([dynamic linker characteristics]) +m4_if([$1], + [], [ +if test "$GCC" = yes; then + case $host_os in + darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; + *) lt_awk_arg="/^libraries:/" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` + else + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # Ok, now we have the path, separated by spaces, we can step through it + # and add multilib dir if necessary. + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path/$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" + else + test -d "$lt_sys_path" && \ + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" + fi + done + lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' +BEGIN {RS=" "; FS="/|\n";} { + lt_foo=""; + lt_count=0; + for (lt_i = NF; lt_i > 0; lt_i--) { + if ($lt_i != "" && $lt_i != ".") { + if ($lt_i == "..") { + lt_count++; + } else { + if (lt_count == 0) { + lt_foo="/" $lt_i lt_foo; + } else { + lt_count--; + } + } + } + } + if (lt_foo != "") { lt_freq[[lt_foo]]++; } + if (lt_freq[[lt_foo]] == 1) { print lt_foo; } +}'` + sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi]) +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix[[4-9]]*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[[01]] | aix4.[[01]].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + case $host_cpu in + powerpc) + # Since July 2007 AmigaOS4 officially supports .so libraries. + # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + ;; + m68k) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + esac + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[[45]]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' +m4_if([$1], [],[ + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[[123]]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[[01]]* | freebsdelf3.[[01]]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ + freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix[[3-9]]*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # Some binutils ld are patched to set DT_RUNPATH + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ + LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], + [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], + [shlibpath_overrides_runpath=yes])]) + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +*nto* | *qnx*) + version_type=qnx + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='ldqnx.so' + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[[89]] | openbsd2.[[89]].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +tpf*) + # TPF is a cross-target only. Preferred cross-host = GNU/Linux. + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +AC_MSG_RESULT([$dynamic_linker]) +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +fi +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" +fi + +_LT_DECL([], [variables_saved_for_relink], [1], + [Variables whose values should be saved in libtool wrapper scripts and + restored at link time]) +_LT_DECL([], [need_lib_prefix], [0], + [Do we need the "lib" prefix for modules?]) +_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) +_LT_DECL([], [version_type], [0], [Library versioning type]) +_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) +_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) +_LT_DECL([], [shlibpath_overrides_runpath], [0], + [Is shlibpath searched before the hard-coded library search path?]) +_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) +_LT_DECL([], [library_names_spec], [1], + [[List of archive names. First name is the real one, the rest are links. + The last name is the one that the linker finds with -lNAME]]) +_LT_DECL([], [soname_spec], [1], + [[The coded name of the library, if different from the real name]]) +_LT_DECL([], [postinstall_cmds], [2], + [Command to use after installation of a shared archive]) +_LT_DECL([], [postuninstall_cmds], [2], + [Command to use after uninstallation of a shared archive]) +_LT_DECL([], [finish_cmds], [2], + [Commands used to finish a libtool library installation in a directory]) +_LT_DECL([], [finish_eval], [1], + [[As "finish_cmds", except a single script fragment to be evaled but + not shown]]) +_LT_DECL([], [hardcode_into_libs], [0], + [Whether we should hardcode library paths into libraries]) +_LT_DECL([], [sys_lib_search_path_spec], [2], + [Compile-time system search path for libraries]) +_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], + [Run-time system search path for libraries]) +])# _LT_SYS_DYNAMIC_LINKER + + +# _LT_PATH_TOOL_PREFIX(TOOL) +# -------------------------- +# find a file program which can recognize shared library +AC_DEFUN([_LT_PATH_TOOL_PREFIX], +[m4_require([_LT_DECL_EGREP])dnl +AC_MSG_CHECKING([for $1]) +AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, +[case $MAGIC_CMD in +[[\\/*] | ?:[\\/]*]) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR +dnl $ac_dummy forces splitting on constant user-supplied paths. +dnl POSIX.2 word splitting is done only on the output of word expansions, +dnl not every word. This closes a longstanding sh security hole. + ac_dummy="m4_if([$2], , $PATH, [$2])" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$1; then + lt_cv_path_MAGIC_CMD="$ac_dir/$1" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac]) +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + AC_MSG_RESULT($MAGIC_CMD) +else + AC_MSG_RESULT(no) +fi +_LT_DECL([], [MAGIC_CMD], [0], + [Used to examine libraries when file_magic_cmd begins with "file"])dnl +])# _LT_PATH_TOOL_PREFIX + +# Old name: +AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) + + +# _LT_PATH_MAGIC +# -------------- +# find a file program which can recognize a shared library +m4_defun([_LT_PATH_MAGIC], +[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) + else + MAGIC_CMD=: + fi +fi +])# _LT_PATH_MAGIC + + +# LT_PATH_LD +# ---------- +# find the pathname to the GNU or non-GNU linker +AC_DEFUN([LT_PATH_LD], +[AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_DECL_EGREP])dnl + +AC_ARG_WITH([gnu-ld], + [AS_HELP_STRING([--with-gnu-ld], + [assume the C compiler uses GNU ld @<:@default=no@:>@])], + [test "$withval" = no || with_gnu_ld=yes], + [with_gnu_ld=no])dnl + +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + AC_MSG_CHECKING([for ld used by $CC]) + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [[\\/]]* | ?:[[\\/]]*) + re_direlt='/[[^/]][[^/]]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + AC_MSG_CHECKING([for GNU ld]) +else + AC_MSG_CHECKING([for non-GNU ld]) +fi +AC_CACHE_VAL(lt_cv_path_LD, +[if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else + lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; + +cegcc) + # use the weaker test based on 'objdump'. See mingw*. + lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; + +freebsd* | dragonfly*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case $host_cpu in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +interix[[3-9]]*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +*nto* | *qnx*) + lt_cv_deplibs_check_method=pass_all + ;; + +openbsd*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + fi + ;; + +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; + +rdos*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv4 | sysv4.3*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +tpf*) + lt_cv_deplibs_check_method=pass_all + ;; +esac +]) +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown + +_LT_DECL([], [deplibs_check_method], [1], + [Method to check whether dependent libraries are shared objects]) +_LT_DECL([], [file_magic_cmd], [1], + [Command to use when deplibs_check_method == "file_magic"]) +])# _LT_CHECK_MAGIC_METHOD + + +# LT_PATH_NM +# ---------- +# find the pathname to a BSD- or MS-compatible name lister +AC_DEFUN([LT_PATH_NM], +[AC_REQUIRE([AC_PROG_CC])dnl +AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, +[if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + : ${lt_cv_path_NM=no} +fi]) +if test "$lt_cv_path_NM" != "no"; then + NM="$lt_cv_path_NM" +else + # Didn't find any BSD compatible name lister, look for dumpbin. + AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :) + AC_SUBST([DUMPBIN]) + if test "$DUMPBIN" != ":"; then + NM="$DUMPBIN" + fi +fi +test -z "$NM" && NM=nm +AC_SUBST([NM]) +_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl + +AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], + [lt_cv_nm_interface="BSD nm" + echo "int some_variable = 0;" > conftest.$ac_ext + (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$ac_compile" 2>conftest.err) + cat conftest.err >&AS_MESSAGE_LOG_FD + (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) + cat conftest.err >&AS_MESSAGE_LOG_FD + (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD) + cat conftest.out >&AS_MESSAGE_LOG_FD + if $GREP 'External.*some_variable' conftest.out > /dev/null; then + lt_cv_nm_interface="MS dumpbin" + fi + rm -f conftest*]) +])# LT_PATH_NM + +# Old names: +AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) +AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_PROG_NM], []) +dnl AC_DEFUN([AC_PROG_NM], []) + + +# LT_LIB_M +# -------- +# check for math library +AC_DEFUN([LT_LIB_M], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +LIBM= +case $host in +*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) + # These system don't have libm, or don't need it + ;; +*-ncr-sysv4.3*) + AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") + AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") + ;; +*) + AC_CHECK_LIB(m, cos, LIBM="-lm") + ;; +esac +AC_SUBST([LIBM]) +])# LT_LIB_M + +# Old name: +AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_CHECK_LIBM], []) + + +# _LT_COMPILER_NO_RTTI([TAGNAME]) +# ------------------------------- +m4_defun([_LT_COMPILER_NO_RTTI], +[m4_require([_LT_TAG_COMPILER])dnl + +_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= + +if test "$GCC" = yes; then + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' + + _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], + lt_cv_prog_compiler_rtti_exceptions, + [-fno-rtti -fno-exceptions], [], + [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) +fi +_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], + [Compiler flag to turn off builtin functions]) +])# _LT_COMPILER_NO_RTTI + + +# _LT_CMD_GLOBAL_SYMBOLS +# ---------------------- +m4_defun([_LT_CMD_GLOBAL_SYMBOLS], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([LT_PATH_NM])dnl +AC_REQUIRE([LT_PATH_LD])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_TAG_COMPILER])dnl + +# Check for command to grab the raw symbol name followed by C symbol from nm. +AC_MSG_CHECKING([command to parse $NM output from $compiler object]) +AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], +[ +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[[BCDEGRST]]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[[BCDT]]' + ;; +cygwin* | mingw* | pw32* | cegcc*) + symcode='[[ABCDGISTW]]' + ;; +hpux*) + if test "$host_cpu" = ia64; then + symcode='[[ABCDEGRST]]' + fi + ;; +irix* | nonstopux*) + symcode='[[BCDEGRST]]' + ;; +osf*) + symcode='[[BCDEGQRST]]' + ;; +solaris*) + symcode='[[BDRT]]' + ;; +sco3.2v5*) + symcode='[[DT]]' + ;; +sysv4.2uw2*) + symcode='[[DT]]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[[ABDT]]' + ;; +sysv4) + symcode='[[DFNSTU]]' + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[[ABCDGIRSTW]]' ;; +esac + +# Transform an extracted symbol line into a proper C declaration. +# Some systems (esp. on ia64) link data and code symbols differently, +# so use this general approach. +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" + +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac + +# Try without a prefix underscore, then with it. +for ac_symprfx in "" "_"; do + + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + + # Write the raw and C identifiers. + if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Fake it for dumpbin and say T for any non-static function + # and D for any global variable. + # Also find C++ and __fastcall symbols from MSVC++, + # which start with @ or ?. + lt_cv_sys_global_symbol_pipe="$AWK ['"\ +" {last_section=section; section=\$ 3};"\ +" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ +" \$ 0!~/External *\|/{next};"\ +" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ +" {if(hide[section]) next};"\ +" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ +" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ +" s[1]~/^[@?]/{print s[1], s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ +" ' prfx=^$ac_symprfx]" + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext <<_LT_EOF +#ifdef __cplusplus +extern "C" { +#endif +char nm_test_var; +void nm_test_func(void); +void nm_test_func(void){} +#ifdef __cplusplus +} +#endif +int main(){nm_test_var='a';nm_test_func();return(0);} +_LT_EOF + + if AC_TRY_EVAL(ac_compile); then + # Now try to grab the symbols. + nlist=conftest.nm + if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext +#ifdef __cplusplus +extern "C" { +#endif + +_LT_EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' + + cat <<_LT_EOF >> conftest.$ac_ext + +/* The mapping between symbol names and symbols. */ +const struct { + const char *name; + void *address; +} +lt__PROGRAM__LTX_preloaded_symbols[[]] = +{ + { "@PROGRAM@", (void *) 0 }, +_LT_EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + cat <<\_LT_EOF >> conftest.$ac_ext + {0, (void *) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt__PROGRAM__LTX_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif +_LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_save_LIBS="$LIBS" + lt_save_CFLAGS="$CFLAGS" + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS="$lt_save_LIBS" + CFLAGS="$lt_save_CFLAGS" + else + echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD + fi + else + echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD + cat conftest.$ac_ext >&5 + fi + rm -rf conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done +]) +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + AC_MSG_RESULT(failed) +else + AC_MSG_RESULT(ok) +fi + +_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], + [Take the output of nm and produce a listing of raw symbols and C names]) +_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], + [Transform the output of nm in a proper C declaration]) +_LT_DECL([global_symbol_to_c_name_address], + [lt_cv_sys_global_symbol_to_c_name_address], [1], + [Transform the output of nm in a C name address pair]) +_LT_DECL([global_symbol_to_c_name_address_lib_prefix], + [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], + [Transform the output of nm in a C name address pair when lib prefix is needed]) +]) # _LT_CMD_GLOBAL_SYMBOLS + + +# _LT_COMPILER_PIC([TAGNAME]) +# --------------------------- +m4_defun([_LT_COMPILER_PIC], +[m4_require([_LT_TAG_COMPILER])dnl +_LT_TAGVAR(lt_prog_compiler_wl, $1)= +_LT_TAGVAR(lt_prog_compiler_pic, $1)= +_LT_TAGVAR(lt_prog_compiler_static, $1)= + +AC_MSG_CHECKING([for $compiler option to produce PIC]) +m4_if([$1], [CXX], [ + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | cygwin* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + interix[[3-9]]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + case $host_os in + aix[[4-9]]*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68*) + # Green Hills C++ Compiler + # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" + ;; + esac + ;; + dgux*) + case $cc_basename in + ec++*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + ghcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | dragonfly*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + if test "$host_cpu" != ia64; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + fi + ;; + aCC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + ;; + *) + ;; + esac + ;; + interix*) + # This is c89, which is MS Visual C++ (no shared libs) + # Anyone wants to do a port? + ;; + irix5* | irix6* | nonstopux*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux* | k*bsd*-gnu | kopensolaris*-gnu) + case $cc_basename in + KCC*) + # KAI C++ Compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + ecpc* ) + # old Intel C++ for x86_64 which still supported -KPIC. + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + icpc* ) + # Intel C++, used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + cxx*) + # Compaq C++ + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + xlc* | xlC*) + # IBM XL 8.0 on PPC + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + esac + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd* | netbsdelf*-gnu) + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + ;; + RCC*) + # Rational C++ 2.4.1 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + cxx*) + # Digital/Compaq C++ + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + lcc*) + # Lucid + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + *) + ;; + esac + ;; + vxworks*) + ;; + *) + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +], +[ + if test "$GCC" = yes; then + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + + interix[[3-9]]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + enable_shared=no + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + + hpux9* | hpux10* | hpux11*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC (with -KPIC) is the default. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + linux* | k*bsd*-gnu | kopensolaris*-gnu) + case $cc_basename in + # old Intel for x86_64 which still supported -KPIC. + ecc*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + # icc used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + icc* | ifort*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + # Lahey Fortran 8.1. + lf95*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' + _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + ccc*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All Alpha code is PIC. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + xl*) + # IBM XL C 8.0/Fortran 10.1 on PPC + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C 5.9 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + *Sun\ F*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='' + ;; + esac + ;; + esac + ;; + + newsos6) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + + osf3* | osf4* | osf5*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All OSF/1 code is PIC. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + rdos*) + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + solaris*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; + *) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; + esac + ;; + + sunos4*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + unicos*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + + uts4*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + *) + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +]) +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" + ;; +esac +AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) +_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], + [How to pass a linker flag through the compiler]) + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then + _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], + [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], + [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], + [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in + "" | " "*) ;; + *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; + esac], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) +fi +_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], + [Additional compiler flags for building library objects]) + +# +# Check to make sure the static flag actually works. +# +wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" +_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], + _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), + $lt_tmp_static_flag, + [], + [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) +_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], + [Compiler flag to prevent dynamic linking]) +])# _LT_COMPILER_PIC + + +# _LT_LINKER_SHLIBS([TAGNAME]) +# ---------------------------- +# See if the linker supports building shared libraries. +m4_defun([_LT_LINKER_SHLIBS], +[AC_REQUIRE([LT_PATH_LD])dnl +AC_REQUIRE([LT_PATH_NM])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl +m4_require([_LT_TAG_COMPILER])dnl +AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) +m4_if([$1], [CXX], [ + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + case $host_os in + aix[[4-9]]*) + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + ;; + pw32*) + _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" + ;; + cygwin* | mingw* | cegcc*) + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' + ;; + linux* | k*bsd*-gnu) + _LT_TAGVAR(link_all_deplibs, $1)=no + ;; + *) + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac + _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] +], [ + runpath_var= + _LT_TAGVAR(allow_undefined_flag, $1)= + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(archive_cmds, $1)= + _LT_TAGVAR(archive_expsym_cmds, $1)= + _LT_TAGVAR(compiler_needs_object, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + _LT_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(hardcode_automatic, $1)=no + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= + _LT_TAGVAR(hardcode_libdir_separator, $1)= + _LT_TAGVAR(hardcode_minus_L, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_TAGVAR(inherit_rpath, $1)=no + _LT_TAGVAR(link_all_deplibs, $1)=unknown + _LT_TAGVAR(module_cmds, $1)= + _LT_TAGVAR(module_expsym_cmds, $1)= + _LT_TAGVAR(old_archive_from_new_cmds, $1)= + _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= + _LT_TAGVAR(thread_safe_flag_spec, $1)= + _LT_TAGVAR(whole_archive_flag_spec, $1)= + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + _LT_TAGVAR(include_expsyms, $1)= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + # Exclude shared library initialization/finalization symbols. +dnl Note also adjust exclude_expsyms for C++ above. + extract_expsyms_cmds= + + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + linux* | k*bsd*-gnu) + _LT_TAGVAR(link_all_deplibs, $1)=no + ;; + esac + + _LT_TAGVAR(ld_shlibs, $1)=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + supports_anon_versioning=no + case `$LD -v 2>&1` in + *GNU\ gold*) supports_anon_versioning=yes ;; + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix[[3-9]]*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +_LT_EOF + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='' + ;; + m68k) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + interix[[3-9]]*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) + tmp_diet=no + if test "$host_os" = linux-dietlibc; then + case $cc_basename in + diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) + esac + fi + if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ + && test "$tmp_diet" = no + then + tmp_addflag= + tmp_sharedflag='-shared' + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + lf95*) # Lahey Fortran 8.1 + _LT_TAGVAR(whole_archive_flag_spec, $1)= + tmp_sharedflag='--shared' ;; + xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) + tmp_sharedflag='-qmkshrobj' + tmp_addflag= ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + esac + _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + + case $cc_basename in + xlf*) + # IBM XL Fortran 10.1 on PPC cannot create shared libs itself + _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' + _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $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 + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + sunos4*) + _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + + if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then + runpath_var= + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=yes + _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + _LT_TAGVAR(hardcode_direct, $1)=unsupported + fi + ;; + + aix[[4-9]]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_TAGVAR(archive_cmds, $1)='' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' + + if test "$GCC" = yes; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + _LT_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + _LT_TAGVAR(link_all_deplibs, $1)=no + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + _LT_TAGVAR(always_export_symbols, $1)=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared libraries. + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='' + ;; + m68k) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + ;; + + bsdi[[45]]*) + _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' + # FIXME: Should let the user specify the lib program. + _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' + _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + ;; + + darwin* | rhapsody*) + _LT_DARWIN_LINKER_FEATURES($1) + ;; + + dgux*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + freebsd1*) + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + hpux9*) + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_direct, $1)=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + AC_LINK_IFELSE(int foo(void) {}, + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + ) + LDFLAGS="$save_LDFLAGS" + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(inherit_rpath, $1)=yes + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + newsos6) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *nto* | *qnx*) + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + else + case $host_os in + openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + ;; + esac + fi + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + os2*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + else + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ + $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + + # Both c and cxx compiler support -rpath directly + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + solaris*) + _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' + if test "$GCC" = yes; then + wlarc='${wl}' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) + wlarc='' + _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' + ;; + *) + wlarc='${wl}' + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + ;; + esac + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. GCC discards it without `$wl', + # but is careful enough not to reorder. + # Supported since Solaris 2.6 (maybe 2.5.1?) + if test "$GCC" = yes; then + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + fi + ;; + esac + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4) + case $host_vendor in + sni) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' + _LT_TAGVAR(hardcode_direct, $1)=no + ;; + motorola) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4.3*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + _LT_TAGVAR(ld_shlibs, $1)=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + + if test x$host_vendor = xsni; then + case $host in + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' + ;; + esac + fi + fi +]) +AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) +test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + +_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld + +_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl +_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl +_LT_DECL([], [extract_expsyms_cmds], [2], + [The commands to extract the exported symbol list from a shared archive]) + +# +# Do we need to explicitly link libc? +# +case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in +x|xyes) + # Assume -lc should be added + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $_LT_TAGVAR(archive_cmds, $1) in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + AC_MSG_CHECKING([whether -lc should be explicitly linked in]) + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if AC_TRY_EVAL(ac_compile) 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) + pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) + _LT_TAGVAR(allow_undefined_flag, $1)= + if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) + then + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + else + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + fi + _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)]) + ;; + esac + fi + ;; +esac + +_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], + [Whether or not to add -lc for building shared libraries]) +_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], + [enable_shared_with_static_runtimes], [0], + [Whether or not to disallow shared libs when runtime libs are static]) +_LT_TAGDECL([], [export_dynamic_flag_spec], [1], + [Compiler flag to allow reflexive dlopens]) +_LT_TAGDECL([], [whole_archive_flag_spec], [1], + [Compiler flag to generate shared objects directly from archives]) +_LT_TAGDECL([], [compiler_needs_object], [1], + [Whether the compiler copes with passing no objects directly]) +_LT_TAGDECL([], [old_archive_from_new_cmds], [2], + [Create an old-style archive from a shared archive]) +_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], + [Create a temporary old-style archive to link instead of a shared archive]) +_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) +_LT_TAGDECL([], [archive_expsym_cmds], [2]) +_LT_TAGDECL([], [module_cmds], [2], + [Commands used to build a loadable module if different from building + a shared archive.]) +_LT_TAGDECL([], [module_expsym_cmds], [2]) +_LT_TAGDECL([], [with_gnu_ld], [1], + [Whether we are building with GNU ld or not]) +_LT_TAGDECL([], [allow_undefined_flag], [1], + [Flag that allows shared libraries with undefined symbols to be built]) +_LT_TAGDECL([], [no_undefined_flag], [1], + [Flag that enforces no undefined symbols]) +_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], + [Flag to hardcode $libdir into a binary during linking. + This must work even if $libdir does not exist]) +_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], + [[If ld is used when linking, flag to hardcode $libdir into a binary + during linking. This must work even if $libdir does not exist]]) +_LT_TAGDECL([], [hardcode_libdir_separator], [1], + [Whether we need a single "-rpath" flag with a separated argument]) +_LT_TAGDECL([], [hardcode_direct], [0], + [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes + DIR into the resulting binary]) +_LT_TAGDECL([], [hardcode_direct_absolute], [0], + [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes + DIR into the resulting binary and the resulting library dependency is + "absolute", i.e impossible to change by setting ${shlibpath_var} if the + library is relocated]) +_LT_TAGDECL([], [hardcode_minus_L], [0], + [Set to "yes" if using the -LDIR flag during linking hardcodes DIR + into the resulting binary]) +_LT_TAGDECL([], [hardcode_shlibpath_var], [0], + [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR + into the resulting binary]) +_LT_TAGDECL([], [hardcode_automatic], [0], + [Set to "yes" if building a shared library automatically hardcodes DIR + into the library and all subsequent libraries and executables linked + against it]) +_LT_TAGDECL([], [inherit_rpath], [0], + [Set to yes if linker adds runtime paths of dependent libraries + to runtime path list]) +_LT_TAGDECL([], [link_all_deplibs], [0], + [Whether libtool must link a program against all its dependency libraries]) +_LT_TAGDECL([], [fix_srcfile_path], [1], + [Fix the shell variable $srcfile for the compiler]) +_LT_TAGDECL([], [always_export_symbols], [0], + [Set to "yes" if exported symbols are required]) +_LT_TAGDECL([], [export_symbols_cmds], [2], + [The commands to list exported symbols]) +_LT_TAGDECL([], [exclude_expsyms], [1], + [Symbols that should not be listed in the preloaded symbols]) +_LT_TAGDECL([], [include_expsyms], [1], + [Symbols that must always be exported]) +_LT_TAGDECL([], [prelink_cmds], [2], + [Commands necessary for linking programs (against libraries) with templates]) +_LT_TAGDECL([], [file_list_spec], [1], + [Specify filename containing input files]) +dnl FIXME: Not yet implemented +dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], +dnl [Compiler flag to generate thread safe objects]) +])# _LT_LINKER_SHLIBS + + +# _LT_LANG_C_CONFIG([TAG]) +# ------------------------ +# Ensure that the configuration variables for a C compiler are suitably +# defined. These variables are subsequently used by _LT_CONFIG to write +# the compiler configuration to `libtool'. +m4_defun([_LT_LANG_C_CONFIG], +[m4_require([_LT_DECL_EGREP])dnl +lt_save_CC="$CC" +AC_LANG_PUSH(C) + +# Source file extension for C test sources. +ac_ext=c + +# Object file extension for compiled C test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}' + +_LT_TAG_COMPILER +# Save the default compiler, since it gets overwritten when the other +# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. +compiler_DEFAULT=$CC + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + LT_SYS_DLOPEN_SELF + _LT_CMD_STRIPLIB + + # Report which library types will actually be built + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_CONFIG($1) +fi +AC_LANG_POP +CC="$lt_save_CC" +])# _LT_LANG_C_CONFIG + + +# _LT_PROG_CXX +# ------------ +# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++ +# compiler, we have our own version here. +m4_defun([_LT_PROG_CXX], +[ +pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes]) +AC_PROG_CXX +if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + AC_PROG_CXXCPP +else + _lt_caught_CXX_error=yes +fi +popdef([AC_MSG_ERROR]) +])# _LT_PROG_CXX + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([_LT_PROG_CXX], []) + + +# _LT_LANG_CXX_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for a C++ compiler are suitably +# defined. These variables are subsequently used by _LT_CONFIG to write +# the compiler configuration to `libtool'. +m4_defun([_LT_LANG_CXX_CONFIG], +[AC_REQUIRE([_LT_PROG_CXX])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_EGREP])dnl + +AC_LANG_PUSH(C++) +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(compiler_needs_object, $1)=no +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for C++ test sources. +ac_ext=cpp + +# Object file extension for compiled C++ test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the CXX compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_caught_CXX_error" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="int some_variable = 0;" + + # Code to be used in simple link tests + lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC=$CC + lt_save_LD=$LD + lt_save_GCC=$GCC + GCC=$GXX + lt_save_with_gnu_ld=$with_gnu_ld + lt_save_path_LD=$lt_cv_path_LD + if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then + lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx + else + $as_unset lt_cv_prog_gnu_ld + fi + if test -n "${lt_cv_path_LDCXX+set}"; then + lt_cv_path_LD=$lt_cv_path_LDCXX + else + $as_unset lt_cv_path_LD + fi + test -z "${LDCXX+set}" || LD=$LDCXX + CC=${CXX-"c++"} + compiler=$CC + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + + if test -n "$compiler"; then + # We don't want -fno-exception when compiling C++ code, so set the + # no_builtin_flag separately + if test "$GXX" = yes; then + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' + else + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= + fi + + if test "$GXX" = yes; then + # Set up default GNU C++ configuration + + LT_PATH_LD + + # Check if GNU C++ uses GNU ld as the underlying linker, since the + # archiving commands below assume that GNU ld is being used. + if test "$with_gnu_ld" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + + # If archive_cmds runs LD, not CC, wlarc should be empty + # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to + # investigate it a little bit more. (MM) + wlarc='${wl}' + + # ancient GNU ld didn't support --whole-archive et. al. + if eval "`$CC -print-prog-name=ld` --help 2>&1" | + $GREP 'no-whole-archive' > /dev/null; then + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + with_gnu_ld=no + wlarc= + + # A generic and very simple default shared library creation + # command for GNU C++ for the case where it uses the native + # linker, instead of GNU ld. If possible, this setting should + # overridden to take advantage of the native linker features on + # the platform it is being used on. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + fi + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + + else + GXX=no + with_gnu_ld=no + wlarc= + fi + + # PORTME: fill in a description of your system's C++ link characteristics + AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) + _LT_TAGVAR(ld_shlibs, $1)=yes + case $host_os in + aix3*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aix[[4-9]]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) + for ld_flag in $LDFLAGS; do + case $ld_flag in + *-brtl*) + aix_use_runtimelinking=yes + break + ;; + esac + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_TAGVAR(archive_cmds, $1)='' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' + + if test "$GXX" = yes; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + _LT_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)= + fi + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to + # export. + _LT_TAGVAR(always_export_symbols, $1)=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an empty + # executable. + _LT_SYS_MODULE_PATH_AIX + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared + # libraries. + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + darwin* | rhapsody*) + _LT_DARWIN_LINKER_FEATURES($1) + ;; + + dgux*) + case $cc_basename in + ec++*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + ghcx*) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + freebsd[[12]]*) + # C++ shared libraries reported to be fairly broken before + # switch to ELF + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + freebsd-elf*) + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + ;; + + freebsd* | dragonfly*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + _LT_TAGVAR(ld_shlibs, $1)=yes + ;; + + gnu*) + ;; + + hpux9*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + ;; + *) + if test "$GXX" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + ;; + *) + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + esac + fi + case $host_cpu in + hppa*64*|ia64*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + esac + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + ;; + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + interix[[3-9]]*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + irix5* | irix6*) + case $cc_basename in + CC*) + # SGI C++ + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + + # Archives containing C++ object files must be created using + # "CC -ar", where "CC" is the IRIX C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' + ;; + *) + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' + fi + fi + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + esac + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(inherit_rpath, $1)=yes + ;; + + linux* | k*bsd*-gnu | kopensolaris*-gnu) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc* | ecpc* ) + # Intel C++ + with_gnu_ld=yes + # version 8.0 and above of icpc choke on multiply defined symbols + # if we add $predep_objects and $postdep_objects, however 7.1 and + # earlier do not add the objects themselves. + case `$CC -V 2>&1` in + *"Version 7."*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) # Version 8.0 or newer + tmp_idyn= + case $host_cpu in + ia64*) tmp_idyn=' -i_dynamic';; + esac + _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + case `$CC -V` in + *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*) + _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ + compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' + _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ + $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ + $RANLIB $oldlib' + _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + ;; + *) # Version 6 will use weak symbols + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + ;; + cxx*) + # Compaq C++ + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' + + runpath_var=LD_RUN_PATH + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + ;; + xl*) + # IBM XL 8.0 on PPC, with GNU ld + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + + # Not sure whether something based on + # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 + # would be better. + output_verbose_link_cmd='echo' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + esac + ;; + esac + ;; + + lynxos*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + m88k*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + mvs*) + case $cc_basename in + cxx*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + fi + # Workaround some broken pre-1.5 toolchains + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + ;; + + *nto* | *qnx*) + _LT_TAGVAR(ld_shlibs, $1)=yes + ;; + + openbsd2*) + # C++ shared libraries are fairly broken + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd=echo + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + case $host in + osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; + *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; + esac + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + cxx*) + case $host in + osf3*) + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + ;; + *) + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ + $RM $lib.exp' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + case $host in + osf3*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + psos*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + lcc*) + # Lucid + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_TAGVAR(archive_cmds_need_lc,$1)=yes + _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. + # Supported since Solaris 2.6 (maybe 2.5.1?) + _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + ;; + esac + _LT_TAGVAR(link_all_deplibs, $1)=yes + + output_verbose_link_cmd='echo' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + + # The C++ compiler must be used to create the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + ;; + *) + # GNU C++ compiler with Solaris linker + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' + if $CC --version | $GREP -v '^2\.7' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + else + # g++ 2.7 appears to require `-G' NOT `-shared' on this + # platform. + _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + fi + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + ;; + esac + fi + ;; + esac + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + vxworks*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + + AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) + test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + + _LT_TAGVAR(GCC, $1)="$GXX" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_SYS_HIDDEN_LIBDEPS($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + CC=$lt_save_CC + LDCXX=$LD + LD=$lt_save_LD + GCC=$lt_save_GCC + with_gnu_ld=$lt_save_with_gnu_ld + lt_cv_path_LDCXX=$lt_cv_path_LD + lt_cv_path_LD=$lt_save_path_LD + lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld + lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld +fi # test "$_lt_caught_CXX_error" != yes + +AC_LANG_POP +])# _LT_LANG_CXX_CONFIG + + +# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) +# --------------------------------- +# Figure out "hidden" library dependencies from verbose +# compiler output when linking a shared library. +# Parse the compiler output and extract the necessary +# objects, libraries and library flags. +m4_defun([_LT_SYS_HIDDEN_LIBDEPS], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +# Dependencies to place before and after the object being linked: +_LT_TAGVAR(predep_objects, $1)= +_LT_TAGVAR(postdep_objects, $1)= +_LT_TAGVAR(predeps, $1)= +_LT_TAGVAR(postdeps, $1)= +_LT_TAGVAR(compiler_lib_search_path, $1)= + +dnl we can't use the lt_simple_compile_test_code here, +dnl because it contains code intended for an executable, +dnl not a library. It's possible we should let each +dnl tag define a new lt_????_link_test_code variable, +dnl but it's only used here... +m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF +int a; +void foo (void) { a = 0; } +_LT_EOF +], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF +class Foo +{ +public: + Foo (void) { a = 0; } +private: + int a; +}; +_LT_EOF +], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF + subroutine foo + implicit none + integer*4 a + a=0 + return + end +_LT_EOF +], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF + subroutine foo + implicit none + integer a + a=0 + return + end +_LT_EOF +], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF +public class foo { + private int a; + public void bar (void) { + a = 0; + } +}; +_LT_EOF +]) +dnl Parse the compiler output and extract the necessary +dnl objects, libraries and library flags. +if AC_TRY_EVAL(ac_compile); then + # Parse the compiler output and extract the necessary + # objects, libraries and library flags. + + # Sentinel used to keep track of whether or not we are before + # the conftest object file. + pre_test_object_deps_done=no + + for p in `eval "$output_verbose_link_cmd"`; do + case $p in + + -L* | -R* | -l*) + # Some compilers place space between "-{L,R}" and the path. + # Remove the space. + if test $p = "-L" || + test $p = "-R"; then + prev=$p + continue + else + prev= + fi + + if test "$pre_test_object_deps_done" = no; then + case $p in + -L* | -R*) + # Internal compiler library paths should come after those + # provided the user. The postdeps already come after the + # user supplied libs so there is no need to process them. + if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then + _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" + else + _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" + fi + ;; + # The "-l" case would never come before the object being + # linked, so don't bother handling this case. + esac + else + if test -z "$_LT_TAGVAR(postdeps, $1)"; then + _LT_TAGVAR(postdeps, $1)="${prev}${p}" + else + _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" + fi + fi + ;; + + *.$objext) + # This assumes that the test object file only shows up + # once in the compiler output. + if test "$p" = "conftest.$objext"; then + pre_test_object_deps_done=yes + continue + fi + + if test "$pre_test_object_deps_done" = no; then + if test -z "$_LT_TAGVAR(predep_objects, $1)"; then + _LT_TAGVAR(predep_objects, $1)="$p" + else + _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" + fi + else + if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then + _LT_TAGVAR(postdep_objects, $1)="$p" + else + _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" + fi + fi + ;; + + *) ;; # Ignore the rest. + + esac + done + + # Clean up. + rm -f a.out a.exe +else + echo "libtool.m4: error: problem compiling $1 test program" +fi + +$RM -f confest.$objext + +# PORTME: override above test on systems where it is broken +m4_if([$1], [CXX], +[case $host_os in +interix[[3-9]]*) + # Interix 3.5 installs completely hosed .la files for C++, so rather than + # hack all around it, let's just trust "g++" to DTRT. + _LT_TAGVAR(predep_objects,$1)= + _LT_TAGVAR(postdep_objects,$1)= + _LT_TAGVAR(postdeps,$1)= + ;; + +linux*) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + if test "$solaris_use_stlport4" != yes; then + _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi + ;; + esac + ;; + +solaris*) + case $cc_basename in + CC*) + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + # Adding this requires a known-good setup of shared libraries for + # Sun compiler versions before 5.6, else PIC objects from an old + # archive will be linked into the output, leading to subtle bugs. + if test "$solaris_use_stlport4" != yes; then + _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi + ;; + esac + ;; +esac +]) + +case " $_LT_TAGVAR(postdeps, $1) " in +*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; +esac + _LT_TAGVAR(compiler_lib_search_dirs, $1)= +if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then + _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` +fi +_LT_TAGDECL([], [compiler_lib_search_dirs], [1], + [The directories searched by this compiler when creating a shared library]) +_LT_TAGDECL([], [predep_objects], [1], + [Dependencies to place before and after the objects being linked to + create a shared library]) +_LT_TAGDECL([], [postdep_objects], [1]) +_LT_TAGDECL([], [predeps], [1]) +_LT_TAGDECL([], [postdeps], [1]) +_LT_TAGDECL([], [compiler_lib_search_path], [1], + [The library search path used internally by the compiler when linking + a shared library]) +])# _LT_SYS_HIDDEN_LIBDEPS + + +# _LT_PROG_F77 +# ------------ +# Since AC_PROG_F77 is broken, in that it returns the empty string +# if there is no fortran compiler, we have our own version here. +m4_defun([_LT_PROG_F77], +[ +pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes]) +AC_PROG_F77 +if test -z "$F77" || test "X$F77" = "Xno"; then + _lt_disable_F77=yes +fi +popdef([AC_MSG_ERROR]) +])# _LT_PROG_F77 + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([_LT_PROG_F77], []) + + +# _LT_LANG_F77_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for a Fortran 77 compiler are +# suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_F77_CONFIG], +[AC_REQUIRE([_LT_PROG_F77])dnl +AC_LANG_PUSH(Fortran 77) + +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for f77 test sources. +ac_ext=f + +# Object file extension for compiled f77 test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the F77 compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_disable_F77" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="\ + subroutine t + return + end +" + + # Code to be used in simple link tests + lt_simple_link_test_code="\ + program t + end +" + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC="$CC" + lt_save_GCC=$GCC + CC=${F77-"f77"} + compiler=$CC + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + GCC=$G77 + if test -n "$compiler"; then + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_TAGVAR(GCC, $1)="$G77" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + GCC=$lt_save_GCC + CC="$lt_save_CC" +fi # test "$_lt_disable_F77" != yes + +AC_LANG_POP +])# _LT_LANG_F77_CONFIG + + +# _LT_PROG_FC +# ----------- +# Since AC_PROG_FC is broken, in that it returns the empty string +# if there is no fortran compiler, we have our own version here. +m4_defun([_LT_PROG_FC], +[ +pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes]) +AC_PROG_FC +if test -z "$FC" || test "X$FC" = "Xno"; then + _lt_disable_FC=yes +fi +popdef([AC_MSG_ERROR]) +])# _LT_PROG_FC + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([_LT_PROG_FC], []) + + +# _LT_LANG_FC_CONFIG([TAG]) +# ------------------------- +# Ensure that the configuration variables for a Fortran compiler are +# suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_FC_CONFIG], +[AC_REQUIRE([_LT_PROG_FC])dnl +AC_LANG_PUSH(Fortran) + +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for fc test sources. +ac_ext=${ac_fc_srcext-f} + +# Object file extension for compiled fc test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the FC compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_disable_FC" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="\ + subroutine t + return + end +" + + # Code to be used in simple link tests + lt_simple_link_test_code="\ + program t + end +" + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC="$CC" + lt_save_GCC=$GCC + CC=${FC-"f95"} + compiler=$CC + GCC=$ac_cv_fc_compiler_gnu + + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + + if test -n "$compiler"; then + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_SYS_HIDDEN_LIBDEPS($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + GCC=$lt_save_GCC + CC="$lt_save_CC" +fi # test "$_lt_disable_FC" != yes + +AC_LANG_POP +])# _LT_LANG_FC_CONFIG + + +# _LT_LANG_GCJ_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for the GNU Java Compiler compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_GCJ_CONFIG], +[AC_REQUIRE([LT_PROG_GCJ])dnl +AC_LANG_SAVE + +# Source file extension for Java test sources. +ac_ext=java + +# Object file extension for compiled Java test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="class foo {}" + +# Code to be used in simple link tests +lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +lt_save_GCC=$GCC +GCC=yes +CC=${GCJ-"gcj"} +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_TAGVAR(LD, $1)="$LD" +_LT_CC_BASENAME([$compiler]) + +# GCJ did not exist at the time GCC didn't implicitly link libc in. +_LT_TAGVAR(archive_cmds_need_lc, $1)=no + +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) +fi + +AC_LANG_RESTORE + +GCC=$lt_save_GCC +CC="$lt_save_CC" +])# _LT_LANG_GCJ_CONFIG + + +# _LT_LANG_RC_CONFIG([TAG]) +# ------------------------- +# Ensure that the configuration variables for the Windows resource compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_RC_CONFIG], +[AC_REQUIRE([LT_PROG_RC])dnl +AC_LANG_SAVE + +# Source file extension for RC test sources. +ac_ext=rc + +# Object file extension for compiled RC test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' + +# Code to be used in simple link tests +lt_simple_link_test_code="$lt_simple_compile_test_code" + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +lt_save_GCC=$GCC +GCC= +CC=${RC-"windres"} +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) +_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + +if test -n "$compiler"; then + : + _LT_CONFIG($1) +fi + +GCC=$lt_save_GCC +AC_LANG_RESTORE +CC="$lt_save_CC" +])# _LT_LANG_RC_CONFIG + + +# LT_PROG_GCJ +# ----------- +AC_DEFUN([LT_PROG_GCJ], +[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], + [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], + [AC_CHECK_TOOL(GCJ, gcj,) + test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" + AC_SUBST(GCJFLAGS)])])[]dnl +]) + +# Old name: +AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_GCJ], []) + + +# LT_PROG_RC +# ---------- +AC_DEFUN([LT_PROG_RC], +[AC_CHECK_TOOL(RC, windres,) +]) + +# Old name: +AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_RC], []) + + +# _LT_DECL_EGREP +# -------------- +# If we don't have a new enough Autoconf to choose the best grep +# available, choose the one first in the user's PATH. +m4_defun([_LT_DECL_EGREP], +[AC_REQUIRE([AC_PROG_EGREP])dnl +AC_REQUIRE([AC_PROG_FGREP])dnl +test -z "$GREP" && GREP=grep +_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) +_LT_DECL([], [EGREP], [1], [An ERE matcher]) +_LT_DECL([], [FGREP], [1], [A literal string matcher]) +dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too +AC_SUBST([GREP]) +]) + + +# _LT_DECL_OBJDUMP +# -------------- +# If we don't have a new enough Autoconf to choose the best objdump +# available, choose the one first in the user's PATH. +m4_defun([_LT_DECL_OBJDUMP], +[AC_CHECK_TOOL(OBJDUMP, objdump, false) +test -z "$OBJDUMP" && OBJDUMP=objdump +_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) +AC_SUBST([OBJDUMP]) +]) + + +# _LT_DECL_SED +# ------------ +# Check for a fully-functional sed program, that truncates +# as few characters as possible. Prefer GNU sed if found. +m4_defun([_LT_DECL_SED], +[AC_PROG_SED +test -z "$SED" && SED=sed +Xsed="$SED -e 1s/^X//" +_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) +_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], + [Sed that helps us avoid accidentally triggering echo(1) options like -n]) +])# _LT_DECL_SED + +m4_ifndef([AC_PROG_SED], [ +############################################################ +# NOTE: This macro has been submitted for inclusion into # +# GNU Autoconf as AC_PROG_SED. When it is available in # +# a released version of Autoconf we should remove this # +# macro and use it instead. # +############################################################ + +m4_defun([AC_PROG_SED], +[AC_MSG_CHECKING([for a sed that does not truncate output]) +AC_CACHE_VAL(lt_cv_path_SED, +[# Loop through the user's path and test for sed and gsed. +# Then use that list of sed's as ones to test for truncation. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for lt_ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then + lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" + fi + done + done +done +IFS=$as_save_IFS +lt_ac_max=0 +lt_ac_count=0 +# Add /usr/xpg4/bin/sed as it is typically found on Solaris +# along with /bin/sed that truncates output. +for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do + test ! -f $lt_ac_sed && continue + cat /dev/null > conftest.in + lt_ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >conftest.in + # Check for GNU sed and select it if it is found. + if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then + lt_cv_path_SED=$lt_ac_sed + break + fi + while true; do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo >>conftest.nl + $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break + cmp -s conftest.out conftest.nl || break + # 10000 chars as input seems more than enough + test $lt_ac_count -gt 10 && break + lt_ac_count=`expr $lt_ac_count + 1` + if test $lt_ac_count -gt $lt_ac_max; then + lt_ac_max=$lt_ac_count + lt_cv_path_SED=$lt_ac_sed + fi + done +done +]) +SED=$lt_cv_path_SED +AC_SUBST([SED]) +AC_MSG_RESULT([$SED]) +])#AC_PROG_SED +])#m4_ifndef + +# Old name: +AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_SED], []) + + +# _LT_CHECK_SHELL_FEATURES +# ------------------------ +# Find out whether the shell is Bourne or XSI compatible, +# or has some other useful features. +m4_defun([_LT_CHECK_SHELL_FEATURES], +[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) +# Try some XSI features +xsi_shell=no +( _lt_dummy="a/b/c" + test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +AC_MSG_RESULT([$xsi_shell]) +_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) + +AC_MSG_CHECKING([whether the shell understands "+="]) +lt_shell_append=no +( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ + >/dev/null 2>&1 \ + && lt_shell_append=yes +AC_MSG_RESULT([$lt_shell_append]) +_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) + +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + lt_unset=unset +else + lt_unset=false +fi +_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl + +# test EBCDIC or ASCII +case `echo X|tr X '\101'` in + A) # ASCII based system + # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr + lt_SP2NL='tr \040 \012' + lt_NL2SP='tr \015\012 \040\040' + ;; + *) # EBCDIC based system + lt_SP2NL='tr \100 \n' + lt_NL2SP='tr \r\n \100\100' + ;; +esac +_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl +_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl +])# _LT_CHECK_SHELL_FEATURES + + +# _LT_PROG_XSI_SHELLFNS +# --------------------- +# Bourne and XSI compatible variants of some useful shell functions. +m4_defun([_LT_PROG_XSI_SHELLFNS], +[case $xsi_shell in + yes) + cat << \_LT_EOF >> "$cfgfile" + +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac +} + +# func_basename file +func_basename () +{ + func_basename_result="${1##*/}" +} + +# func_dirname_and_basename file append nondir_replacement +# perform func_basename and func_dirname in a single function +# call: +# dirname: Compute the dirname of FILE. If nonempty, +# add APPEND to the result, otherwise set result +# to NONDIR_REPLACEMENT. +# value returned in "$func_dirname_result" +# basename: Compute filename of FILE. +# value retuned in "$func_basename_result" +# Implementation must be kept synchronized with func_dirname +# and func_basename. For efficiency, we do not delegate to +# those functions but instead duplicate the functionality here. +func_dirname_and_basename () +{ + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac + func_basename_result="${1##*/}" +} + +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +func_stripname () +{ + # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are + # positional parameters, so assign one to ordinary parameter first. + func_stripname_result=${3} + func_stripname_result=${func_stripname_result#"${1}"} + func_stripname_result=${func_stripname_result%"${2}"} +} + +# func_opt_split +func_opt_split () +{ + func_opt_split_opt=${1%%=*} + func_opt_split_arg=${1#*=} +} + +# func_lo2o object +func_lo2o () +{ + case ${1} in + *.lo) func_lo2o_result=${1%.lo}.${objext} ;; + *) func_lo2o_result=${1} ;; + esac +} + +# func_xform libobj-or-source +func_xform () +{ + func_xform_result=${1%.*}.lo +} + +# func_arith arithmetic-term... +func_arith () +{ + func_arith_result=$(( $[*] )) +} + +# func_len string +# STRING may not start with a hyphen. +func_len () +{ + func_len_result=${#1} +} + +_LT_EOF + ;; + *) # Bourne compatible functions. + cat << \_LT_EOF >> "$cfgfile" + +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + # Extract subdirectory from the argument. + func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` + if test "X$func_dirname_result" = "X${1}"; then + func_dirname_result="${3}" + else + func_dirname_result="$func_dirname_result${2}" + fi +} + +# func_basename file +func_basename () +{ + func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` +} + +dnl func_dirname_and_basename +dnl A portable version of this function is already defined in general.m4sh +dnl so there is no need for it here. + +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +# func_strip_suffix prefix name +func_stripname () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "X${3}" \ + | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "X${3}" \ + | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; + esac +} + +# sed scripts: +my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' +my_sed_long_arg='1s/^-[[^=]]*=//' + +# func_opt_split +func_opt_split () +{ + func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` + func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` +} + +# func_lo2o object +func_lo2o () +{ + func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` +} + +# func_xform libobj-or-source +func_xform () +{ + func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'` +} + +# func_arith arithmetic-term... +func_arith () +{ + func_arith_result=`expr "$[@]"` +} + +# func_len string +# STRING may not start with a hyphen. +func_len () +{ + func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` +} + +_LT_EOF +esac + +case $lt_shell_append in + yes) + cat << \_LT_EOF >> "$cfgfile" + +# func_append var value +# Append VALUE to the end of shell variable VAR. +func_append () +{ + eval "$[1]+=\$[2]" +} +_LT_EOF + ;; + *) + cat << \_LT_EOF >> "$cfgfile" + +# func_append var value +# Append VALUE to the end of shell variable VAR. +func_append () +{ + eval "$[1]=\$$[1]\$[2]" +} + +_LT_EOF + ;; + esac +]) diff -Nru banshee-community-extensions-2.0.1/build/m4/shamrock/lt~obsolete.m4 banshee-community-extensions-2.2.0/build/m4/shamrock/lt~obsolete.m4 --- banshee-community-extensions-2.0.1/build/m4/shamrock/lt~obsolete.m4 1970-01-01 00:00:00.000000000 +0000 +++ banshee-community-extensions-2.2.0/build/m4/shamrock/lt~obsolete.m4 2011-09-19 20:36:43.000000000 +0000 @@ -0,0 +1,92 @@ +# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- +# +# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. +# Written by Scott James Remnant, 2004. +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# serial 4 lt~obsolete.m4 + +# These exist entirely to fool aclocal when bootstrapping libtool. +# +# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) +# which have later been changed to m4_define as they aren't part of the +# exported API, or moved to Autoconf or Automake where they belong. +# +# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN +# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us +# using a macro with the same name in our local m4/libtool.m4 it'll +# pull the old libtool.m4 in (it doesn't see our shiny new m4_define +# and doesn't know about Autoconf macros at all.) +# +# So we provide this file, which has a silly filename so it's always +# included after everything else. This provides aclocal with the +# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything +# because those macros already exist, or will be overwritten later. +# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. +# +# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. +# Yes, that means every name once taken will need to remain here until +# we give up compatibility with versions before 1.7, at which point +# we need to keep only those names which we still refer to. + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) + +m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) +m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) +m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) +m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) +m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) +m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) +m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) +m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) +m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) +m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) +m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) +m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) +m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) +m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) +m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) +m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) +m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) +m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) +m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) +m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) +m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) +m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) +m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) +m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) +m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) +m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) +m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) +m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) +m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) +m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) +m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) +m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) +m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) +m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) +m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) +m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) +m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) +m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) +m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) +m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) +m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) +m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) +m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])]) +m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) +m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) +m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) +m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) +m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) +m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) +m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) +m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) diff -Nru banshee-community-extensions-2.0.1/build/m4/shamrock/ltoptions.m4 banshee-community-extensions-2.2.0/build/m4/shamrock/ltoptions.m4 --- banshee-community-extensions-2.0.1/build/m4/shamrock/ltoptions.m4 1970-01-01 00:00:00.000000000 +0000 +++ banshee-community-extensions-2.2.0/build/m4/shamrock/ltoptions.m4 2011-09-19 20:36:43.000000000 +0000 @@ -0,0 +1,368 @@ +# Helper functions for option handling. -*- Autoconf -*- +# +# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. +# Written by Gary V. Vaughan, 2004 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# serial 6 ltoptions.m4 + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) + + +# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) +# ------------------------------------------ +m4_define([_LT_MANGLE_OPTION], +[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) + + +# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) +# --------------------------------------- +# Set option OPTION-NAME for macro MACRO-NAME, and if there is a +# matching handler defined, dispatch to it. Other OPTION-NAMEs are +# saved as a flag. +m4_define([_LT_SET_OPTION], +[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl +m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), + _LT_MANGLE_DEFUN([$1], [$2]), + [m4_warning([Unknown $1 option `$2'])])[]dnl +]) + + +# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) +# ------------------------------------------------------------ +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +m4_define([_LT_IF_OPTION], +[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) + + +# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) +# ------------------------------------------------------- +# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME +# are set. +m4_define([_LT_UNLESS_OPTIONS], +[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), + [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), + [m4_define([$0_found])])])[]dnl +m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 +])[]dnl +]) + + +# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) +# ---------------------------------------- +# OPTION-LIST is a space-separated list of Libtool options associated +# with MACRO-NAME. If any OPTION has a matching handler declared with +# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about +# the unknown option and exit. +m4_defun([_LT_SET_OPTIONS], +[# Set options +m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), + [_LT_SET_OPTION([$1], _LT_Option)]) + +m4_if([$1],[LT_INIT],[ + dnl + dnl Simply set some default values (i.e off) if boolean options were not + dnl specified: + _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no + ]) + _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no + ]) + dnl + dnl If no reference was made to various pairs of opposing options, then + dnl we run the default mode handler for the pair. For example, if neither + dnl `shared' nor `disable-shared' was passed, we enable building of shared + dnl archives by default: + _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) + _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) + _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) + _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], + [_LT_ENABLE_FAST_INSTALL]) + ]) +])# _LT_SET_OPTIONS + + +## --------------------------------- ## +## Macros to handle LT_INIT options. ## +## --------------------------------- ## + +# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) +# ----------------------------------------- +m4_define([_LT_MANGLE_DEFUN], +[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) + + +# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) +# ----------------------------------------------- +m4_define([LT_OPTION_DEFINE], +[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl +])# LT_OPTION_DEFINE + + +# dlopen +# ------ +LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes +]) + +AU_DEFUN([AC_LIBTOOL_DLOPEN], +[_LT_SET_OPTION([LT_INIT], [dlopen]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `dlopen' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) + + +# win32-dll +# --------- +# Declare package support for building win32 dll's. +LT_OPTION_DEFINE([LT_INIT], [win32-dll], +[enable_win32_dll=yes + +case $host in +*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) + AC_CHECK_TOOL(AS, as, false) + AC_CHECK_TOOL(DLLTOOL, dlltool, false) + AC_CHECK_TOOL(OBJDUMP, objdump, false) + ;; +esac + +test -z "$AS" && AS=as +_LT_DECL([], [AS], [0], [Assembler program])dnl + +test -z "$DLLTOOL" && DLLTOOL=dlltool +_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl + +test -z "$OBJDUMP" && OBJDUMP=objdump +_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl +])# win32-dll + +AU_DEFUN([AC_LIBTOOL_WIN32_DLL], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +_LT_SET_OPTION([LT_INIT], [win32-dll]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `win32-dll' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) + + +# _LT_ENABLE_SHARED([DEFAULT]) +# ---------------------------- +# implement the --enable-shared flag, and supports the `shared' and +# `disable-shared' LT_INIT options. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +m4_define([_LT_ENABLE_SHARED], +[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([shared], + [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], + [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) + + _LT_DECL([build_libtool_libs], [enable_shared], [0], + [Whether or not to build shared libraries]) +])# _LT_ENABLE_SHARED + +LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) + +# Old names: +AC_DEFUN([AC_ENABLE_SHARED], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) +]) + +AC_DEFUN([AC_DISABLE_SHARED], +[_LT_SET_OPTION([LT_INIT], [disable-shared]) +]) + +AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) +AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_ENABLE_SHARED], []) +dnl AC_DEFUN([AM_DISABLE_SHARED], []) + + + +# _LT_ENABLE_STATIC([DEFAULT]) +# ---------------------------- +# implement the --enable-static flag, and support the `static' and +# `disable-static' LT_INIT options. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +m4_define([_LT_ENABLE_STATIC], +[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([static], + [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], + [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_static=]_LT_ENABLE_STATIC_DEFAULT) + + _LT_DECL([build_old_libs], [enable_static], [0], + [Whether or not to build static libraries]) +])# _LT_ENABLE_STATIC + +LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) + +# Old names: +AC_DEFUN([AC_ENABLE_STATIC], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) +]) + +AC_DEFUN([AC_DISABLE_STATIC], +[_LT_SET_OPTION([LT_INIT], [disable-static]) +]) + +AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) +AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_ENABLE_STATIC], []) +dnl AC_DEFUN([AM_DISABLE_STATIC], []) + + + +# _LT_ENABLE_FAST_INSTALL([DEFAULT]) +# ---------------------------------- +# implement the --enable-fast-install flag, and support the `fast-install' +# and `disable-fast-install' LT_INIT options. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +m4_define([_LT_ENABLE_FAST_INSTALL], +[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([fast-install], + [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], + [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) + +_LT_DECL([fast_install], [enable_fast_install], [0], + [Whether or not to optimize for fast installation])dnl +])# _LT_ENABLE_FAST_INSTALL + +LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) + +# Old names: +AU_DEFUN([AC_ENABLE_FAST_INSTALL], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you put +the `fast-install' option into LT_INIT's first parameter.]) +]) + +AU_DEFUN([AC_DISABLE_FAST_INSTALL], +[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you put +the `disable-fast-install' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) +dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) + + +# _LT_WITH_PIC([MODE]) +# -------------------- +# implement the --with-pic flag, and support the `pic-only' and `no-pic' +# LT_INIT options. +# MODE is either `yes' or `no'. If omitted, it defaults to `both'. +m4_define([_LT_WITH_PIC], +[AC_ARG_WITH([pic], + [AS_HELP_STRING([--with-pic], + [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], + [pic_mode="$withval"], + [pic_mode=default]) + +test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) + +_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl +])# _LT_WITH_PIC + +LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) +LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) + +# Old name: +AU_DEFUN([AC_LIBTOOL_PICMODE], +[_LT_SET_OPTION([LT_INIT], [pic-only]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `pic-only' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) + +## ----------------- ## +## LTDL_INIT Options ## +## ----------------- ## + +m4_define([_LTDL_MODE], []) +LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], + [m4_define([_LTDL_MODE], [nonrecursive])]) +LT_OPTION_DEFINE([LTDL_INIT], [recursive], + [m4_define([_LTDL_MODE], [recursive])]) +LT_OPTION_DEFINE([LTDL_INIT], [subproject], + [m4_define([_LTDL_MODE], [subproject])]) + +m4_define([_LTDL_TYPE], []) +LT_OPTION_DEFINE([LTDL_INIT], [installable], + [m4_define([_LTDL_TYPE], [installable])]) +LT_OPTION_DEFINE([LTDL_INIT], [convenience], + [m4_define([_LTDL_TYPE], [convenience])]) diff -Nru banshee-community-extensions-2.0.1/build/m4/shamrock/ltsugar.m4 banshee-community-extensions-2.2.0/build/m4/shamrock/ltsugar.m4 --- banshee-community-extensions-2.0.1/build/m4/shamrock/ltsugar.m4 1970-01-01 00:00:00.000000000 +0000 +++ banshee-community-extensions-2.2.0/build/m4/shamrock/ltsugar.m4 2011-09-19 20:36:43.000000000 +0000 @@ -0,0 +1,123 @@ +# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- +# +# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. +# Written by Gary V. Vaughan, 2004 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# serial 6 ltsugar.m4 + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) + + +# lt_join(SEP, ARG1, [ARG2...]) +# ----------------------------- +# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their +# associated separator. +# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier +# versions in m4sugar had bugs. +m4_define([lt_join], +[m4_if([$#], [1], [], + [$#], [2], [[$2]], + [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) +m4_define([_lt_join], +[m4_if([$#$2], [2], [], + [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) + + +# lt_car(LIST) +# lt_cdr(LIST) +# ------------ +# Manipulate m4 lists. +# These macros are necessary as long as will still need to support +# Autoconf-2.59 which quotes differently. +m4_define([lt_car], [[$1]]) +m4_define([lt_cdr], +[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], + [$#], 1, [], + [m4_dquote(m4_shift($@))])]) +m4_define([lt_unquote], $1) + + +# lt_append(MACRO-NAME, STRING, [SEPARATOR]) +# ------------------------------------------ +# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. +# Note that neither SEPARATOR nor STRING are expanded; they are appended +# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). +# No SEPARATOR is output if MACRO-NAME was previously undefined (different +# than defined and empty). +# +# This macro is needed until we can rely on Autoconf 2.62, since earlier +# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. +m4_define([lt_append], +[m4_define([$1], + m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) + + + +# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) +# ---------------------------------------------------------- +# Produce a SEP delimited list of all paired combinations of elements of +# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list +# has the form PREFIXmINFIXSUFFIXn. +# Needed until we can rely on m4_combine added in Autoconf 2.62. +m4_define([lt_combine], +[m4_if(m4_eval([$# > 3]), [1], + [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl +[[m4_foreach([_Lt_prefix], [$2], + [m4_foreach([_Lt_suffix], + ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, + [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) + + +# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) +# ----------------------------------------------------------------------- +# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited +# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. +m4_define([lt_if_append_uniq], +[m4_ifdef([$1], + [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], + [lt_append([$1], [$2], [$3])$4], + [$5])], + [lt_append([$1], [$2], [$3])$4])]) + + +# lt_dict_add(DICT, KEY, VALUE) +# ----------------------------- +m4_define([lt_dict_add], +[m4_define([$1($2)], [$3])]) + + +# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) +# -------------------------------------------- +m4_define([lt_dict_add_subkey], +[m4_define([$1($2:$3)], [$4])]) + + +# lt_dict_fetch(DICT, KEY, [SUBKEY]) +# ---------------------------------- +m4_define([lt_dict_fetch], +[m4_ifval([$3], + m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), + m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) + + +# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) +# ----------------------------------------------------------------- +m4_define([lt_if_dict_fetch], +[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], + [$5], + [$6])]) + + +# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) +# -------------------------------------------------------------- +m4_define([lt_dict_filter], +[m4_if([$5], [], [], + [lt_join(m4_quote(m4_default([$4], [[, ]])), + lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), + [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl +]) diff -Nru banshee-community-extensions-2.0.1/build/m4/shamrock/ltversion.m4 banshee-community-extensions-2.2.0/build/m4/shamrock/ltversion.m4 --- banshee-community-extensions-2.0.1/build/m4/shamrock/ltversion.m4 1970-01-01 00:00:00.000000000 +0000 +++ banshee-community-extensions-2.2.0/build/m4/shamrock/ltversion.m4 2011-09-19 20:36:43.000000000 +0000 @@ -0,0 +1,23 @@ +# ltversion.m4 -- version numbers -*- Autoconf -*- +# +# Copyright (C) 2004 Free Software Foundation, Inc. +# Written by Scott James Remnant, 2004 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# Generated from ltversion.in. + +# serial 3017 ltversion.m4 +# This file is part of GNU Libtool + +m4_define([LT_PACKAGE_VERSION], [2.2.6b]) +m4_define([LT_PACKAGE_REVISION], [1.3017]) + +AC_DEFUN([LTVERSION_VERSION], +[macro_version='2.2.6b' +macro_revision='1.3017' +_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) +_LT_DECL(, macro_revision, 0) +]) diff -Nru banshee-community-extensions-2.0.1/build/Makefile.in banshee-community-extensions-2.2.0/build/Makefile.in --- banshee-community-extensions-2.0.1/build/Makefile.in 2011-05-03 20:45:04.000000000 +0000 +++ banshee-community-extensions-2.2.0/build/Makefile.in 2011-09-19 20:36:50.000000000 +0000 @@ -37,6 +37,7 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/m4/extensions/alarmclock.m4 \ + $(top_srcdir)/build/m4/extensions/albumartwriter.m4 \ $(top_srcdir)/build/m4/extensions/ampache.m4 \ $(top_srcdir)/build/m4/extensions/appindicator.m4 \ $(top_srcdir)/build/m4/extensions/awn.m4 \ @@ -44,6 +45,7 @@ $(top_srcdir)/build/m4/extensions/clutterflow.m4 \ $(top_srcdir)/build/m4/extensions/common.m4 \ $(top_srcdir)/build/m4/extensions/coverwallpaper.m4 \ + $(top_srcdir)/build/m4/extensions/duplicatesongdetector.m4 \ $(top_srcdir)/build/m4/extensions/jamendo.m4 \ $(top_srcdir)/build/m4/extensions/karaoke.m4 \ $(top_srcdir)/build/m4/extensions/lastfmfingerprint.m4 \ @@ -63,6 +65,11 @@ $(top_srcdir)/build/m4/shamrock/expansions.m4 \ $(top_srcdir)/build/m4/shamrock/gnome-doc.m4 \ $(top_srcdir)/build/m4/shamrock/i18n.m4 \ + $(top_srcdir)/build/m4/shamrock/libtool.m4 \ + $(top_srcdir)/build/m4/shamrock/ltoptions.m4 \ + $(top_srcdir)/build/m4/shamrock/ltsugar.m4 \ + $(top_srcdir)/build/m4/shamrock/ltversion.m4 \ + $(top_srcdir)/build/m4/shamrock/lt~obsolete.m4 \ $(top_srcdir)/build/m4/shamrock/mono.m4 \ $(top_srcdir)/build/m4/shamrock/nunit.m4 \ $(top_srcdir)/build/m4/shamrock/programs.m4 \ @@ -117,7 +124,6 @@ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ -ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AM_MAKEFLAGS = @AM_MAKEFLAGS@ diff -Nru banshee-community-extensions-2.0.1/configure banshee-community-extensions-2.2.0/configure --- banshee-community-extensions-2.0.1/configure 2011-05-03 20:45:03.000000000 +0000 +++ banshee-community-extensions-2.2.0/configure 2011-09-19 20:36:49.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.67 for banshee-community-extensions 2.0.1. +# Generated by GNU Autoconf 2.67 for banshee-community-extensions 2.2.0. # # Report bugs to . # @@ -702,8 +702,8 @@ # Identity of this package. PACKAGE_NAME='banshee-community-extensions' PACKAGE_TARNAME='banshee-community-extensions' -PACKAGE_VERSION='2.0.1' -PACKAGE_STRING='banshee-community-extensions 2.0.1' +PACKAGE_VERSION='2.2.0' +PACKAGE_STRING='banshee-community-extensions 2.2.0' PACKAGE_BUGREPORT='http://bugzilla.gnome.org/enter_bug.cgi?product=banshee&component=Community%20Extensions' PACKAGE_URL='' @@ -816,6 +816,8 @@ ENABLE_JAMENDO_TRUE BANSHEE_WEBBROWSER_LIBS BANSHEE_WEBBROWSER_CFLAGS +ENABLE_DUPLICATESONGDETECTOR_FALSE +ENABLE_DUPLICATESONGDETECTOR_TRUE ENABLE_COVERWALLPAPER_FALSE ENABLE_COVERWALLPAPER_TRUE GCONFSHARP_LIBS @@ -837,6 +839,8 @@ APPINDICATORSHARP_CFLAGS ENABLE_AMPACHE_FALSE ENABLE_AMPACHE_TRUE +ENABLE_ALBUMARTWRITER_FALSE +ENABLE_ALBUMARTWRITER_TRUE ENABLE_ALARMCLOCK_FALSE ENABLE_ALARMCLOCK_TRUE NUNIT_CONSOLE @@ -974,7 +978,6 @@ INTLTOOL_MERGE INTLTOOL_UPDATE USE_NLS -ACLOCAL_AMFLAGS MAINT MAINTAINER_MODE_FALSE MAINTAINER_MODE_TRUE @@ -1063,11 +1066,13 @@ enable_release enable_tests enable_alarmclock +enable_albumartwriter enable_ampache enable_appindicator enable_awn enable_clutterflow enable_coverwallpaper +enable_duplicatesongdetector enable_jamendo enable_lastfmfingerprint enable_lcd @@ -1688,7 +1693,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 banshee-community-extensions 2.0.1 to adapt to many kinds of systems. +\`configure' configures banshee-community-extensions 2.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1759,7 +1764,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of banshee-community-extensions 2.0.1:";; + short | recursive ) echo "Configuration of banshee-community-extensions 2.2.0:";; esac cat <<\_ACEOF @@ -1767,7 +1772,7 @@ --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-maintainer-mode enable make rules and dependencies not useful + --disable-maintainer-mode disable make rules and dependencies not useful (and sometimes confusing) to the casual installer --disable-nls do not use Native Language Support --disable-dependency-tracking speeds up one-time build @@ -1785,12 +1790,16 @@ --enable-release Use release configuration --enable-tests Enable NUnit tests --disable-alarmclock Do not build the AlarmClock extension + --disable-albumartwriter + Do not build the AlbumArtWriter extension --disable-ampache Do not build the Ampache extension --disable-appindicator Do not build the AppIndicator extension --disable-awn Do not build the Awn extension --disable-clutterflow Do not build the ClutterFlow extension --disable-coverwallpaper Do not build the CoverWallpaper extension + --disable-duplicatesongdetector + Do not build the DuplicateSongDetector extension --disable-jamendo Do not build the Jamendo extension --disable-lastfmfingerprint Do not build the LastfmFingerprint extension @@ -1996,7 +2005,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -banshee-community-extensions configure 2.0.1 +banshee-community-extensions configure 2.2.0 generated by GNU Autoconf 2.67 Copyright (C) 2010 Free Software Foundation, Inc. @@ -2486,7 +2495,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by banshee-community-extensions $as_me 2.0.1, which was +It was created by banshee-community-extensions $as_me 2.2.0, which was generated by GNU Autoconf 2.67. Invocation command line was $ $0 $@ @@ -3302,7 +3311,7 @@ # Define the identity of the package. PACKAGE='banshee-community-extensions' - VERSION='2.0.1' + VERSION='2.2.0' cat >>confdefs.h <<_ACEOF @@ -3424,13 +3433,13 @@ -{ $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; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to disable maintainer-specific portions of Makefiles" >&5 +$as_echo_n "checking whether to disable maintainer-specific portions of Makefiles... " >&6; } # Check whether --enable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then : enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval else - USE_MAINTAINER_MODE=no + USE_MAINTAINER_MODE=yes fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 @@ -3448,8 +3457,6 @@ ac_config_headers="$ac_config_headers config.h" -ACLOCAL_AMFLAGS="-I build/m4/shamrock -I build/m4/shave -I build/m4/extensions \${ACLOCAL_FLAGS}" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 @@ -5669,13 +5676,13 @@ else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:5672: $ac_compile\"" >&5) + (eval echo "\"\$as_me:5679: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:5675: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:5682: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:5678: output\"" >&5) + (eval echo "\"\$as_me:5685: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -6880,7 +6887,7 @@ ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 6883 "configure"' > conftest.$ac_ext + echo '#line 6890 "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -8380,6 +8387,10 @@ $RM -r conftest* +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= @@ -8405,11 +8416,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8408: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8419: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8412: \$? = $ac_status" >&5 + echo "$as_me:8423: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -8744,11 +8755,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8747: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8758: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8751: \$? = $ac_status" >&5 + echo "$as_me:8762: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -8849,11 +8860,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8852: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8863: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8856: \$? = $ac_status" >&5 + echo "$as_me:8867: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -8904,11 +8915,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8907: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8918: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8911: \$? = $ac_status" >&5 + echo "$as_me:8922: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -11288,7 +11299,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11291 "configure" +#line 11302 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11384,7 +11395,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11387 "configure" +#line 11398 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12266,12 +12277,12 @@ pkg_cv_BANSHEE_CFLAGS="$BANSHEE_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"banshee-thickclient >= 1.9.6\""; } >&5 - ($PKG_CONFIG --exists --print-errors "banshee-thickclient >= 1.9.6") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"banshee-thickclient >= 2.1.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "banshee-thickclient >= 2.1.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_BANSHEE_CFLAGS=`$PKG_CONFIG --cflags "banshee-thickclient >= 1.9.6" 2>/dev/null` + pkg_cv_BANSHEE_CFLAGS=`$PKG_CONFIG --cflags "banshee-thickclient >= 2.1.0" 2>/dev/null` else pkg_failed=yes fi @@ -12282,12 +12293,12 @@ pkg_cv_BANSHEE_LIBS="$BANSHEE_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"banshee-thickclient >= 1.9.6\""; } >&5 - ($PKG_CONFIG --exists --print-errors "banshee-thickclient >= 1.9.6") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"banshee-thickclient >= 2.1.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "banshee-thickclient >= 2.1.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_BANSHEE_LIBS=`$PKG_CONFIG --libs "banshee-thickclient >= 1.9.6" 2>/dev/null` + pkg_cv_BANSHEE_LIBS=`$PKG_CONFIG --libs "banshee-thickclient >= 2.1.0" 2>/dev/null` else pkg_failed=yes fi @@ -12307,14 +12318,14 @@ _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - BANSHEE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "banshee-thickclient >= 1.9.6" 2>&1` + BANSHEE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "banshee-thickclient >= 2.1.0" 2>&1` else - BANSHEE_PKG_ERRORS=`$PKG_CONFIG --print-errors "banshee-thickclient >= 1.9.6" 2>&1` + BANSHEE_PKG_ERRORS=`$PKG_CONFIG --print-errors "banshee-thickclient >= 2.1.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$BANSHEE_PKG_ERRORS" >&5 - as_fn_error $? "Package requirements (banshee-thickclient >= 1.9.6) were not met: + as_fn_error $? "Package requirements (banshee-thickclient >= 2.1.0) were not met: $BANSHEE_PKG_ERRORS @@ -15750,11 +15761,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15753: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15764: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15757: \$? = $ac_status" >&5 + echo "$as_me:15768: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -15849,11 +15860,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15852: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15863: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:15856: \$? = $ac_status" >&5 + echo "$as_me:15867: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -15901,11 +15912,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15904: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15915: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:15908: \$? = $ac_status" >&5 + echo "$as_me:15919: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -18143,6 +18154,38 @@ + # Check whether --enable-albumartwriter was given. +if test "${enable_albumartwriter+set}" = set; then : + enableval=$enable_albumartwriter; enable_AlbumArtWriter=$enableval +else + enable_AlbumArtWriter=yes + +fi + + + + if test "x$enable_AlbumArtWriter" = "xyes"; then + if true; then + ENABLE_ALBUMARTWRITER_TRUE= + ENABLE_ALBUMARTWRITER_FALSE='#' +else + ENABLE_ALBUMARTWRITER_TRUE='#' + ENABLE_ALBUMARTWRITER_FALSE= +fi + + else + if false; then + ENABLE_ALBUMARTWRITER_TRUE= + ENABLE_ALBUMARTWRITER_FALSE='#' +else + ENABLE_ALBUMARTWRITER_TRUE='#' + ENABLE_ALBUMARTWRITER_FALSE= +fi + + fi + + + # Check whether --enable-ampache was given. if test "${enable_ampache+set}" = set; then : enableval=$enable_ampache; enable_Ampache=$enableval @@ -18714,6 +18757,38 @@ + # Check whether --enable-duplicatesongdetector was given. +if test "${enable_duplicatesongdetector+set}" = set; then : + enableval=$enable_duplicatesongdetector; enable_DuplicateSongDetector=$enableval +else + enable_DuplicateSongDetector=yes + +fi + + + + if test "x$enable_DuplicateSongDetector" = "xyes"; then + if true; then + ENABLE_DUPLICATESONGDETECTOR_TRUE= + ENABLE_DUPLICATESONGDETECTOR_FALSE='#' +else + ENABLE_DUPLICATESONGDETECTOR_TRUE='#' + ENABLE_DUPLICATESONGDETECTOR_FALSE= +fi + + else + if false; then + ENABLE_DUPLICATESONGDETECTOR_TRUE= + ENABLE_DUPLICATESONGDETECTOR_FALSE='#' +else + ENABLE_DUPLICATESONGDETECTOR_TRUE='#' + ENABLE_DUPLICATESONGDETECTOR_FALSE= +fi + + fi + + + # Check whether --enable-jamendo was given. if test "${enable_jamendo+set}" = set; then : enableval=$enable_jamendo; enable_Jamendo=$enableval @@ -21079,7 +21154,7 @@ -ac_config_files="$ac_config_files Makefile build/Makefile build/m4/Makefile build/m4/shave/shave build/m4/shave/shave-libtool help/Makefile po/Makefile.in src/Makefile src/Karaoke/Makefile src/AssemblyInfo.cs src/AlarmClock/Makefile src/Ampache/Makefile src/AppIndicator/Makefile src/Awn/Makefile src/ClutterFlow/Makefile src/ClutterFlow/Banshee.ClutterFlow/Makefile src/ClutterFlow/ClutterFlow/Makefile src/CoverWallpaper/Makefile src/Jamendo/Makefile src/LastfmFingerprint/Makefile src/LastfmFingerprint/Banshee.LastfmFingerprint/Makefile src/LastfmFingerprint/liblastfmfpbridge/Makefile src/LCD/Makefile src/Lirc/Makefile src/Lirc/lirc-glue/Makefile src/Lirc/Banshee.Lirc/Makefile src/Lirc/GUITestHarness/Makefile src/Lirc/NUnitTests/Makefile src/LiveRadio/Makefile src/Lyrics/Makefile src/OpenVP/Makefile src/OpenVP/Cdh.Affe/Makefile src/OpenVP/Cdh.Affe.Tests/Makefile src/OpenVP/OpenVP/Makefile src/OpenVP/OpenVP.Core/Makefile src/OpenVP/OpenVP.Scripting/Makefile src/OpenVP/Banshee.OpenVP/Makefile src/OpenVP/Banshee.OpenVP.Visualizations/Makefile src/Magnatune/Makefile src/Mirage/Makefile src/Mirage/libmirageaudio/Makefile src/Mirage/Mirage/Makefile src/Mirage/Banshee.Mirage/Makefile src/Mirage/Test/Makefile src/RadioStationFetcher/Makefile src/RandomByLastfm/Makefile src/StreamRecorder/Makefile src/Telepathy/Makefile src/Telepathy/Banshee.Telepathy/Makefile src/ZeitgeistDataprovider/Makefile" +ac_config_files="$ac_config_files Makefile build/Makefile build/m4/Makefile build/m4/shave/shave build/m4/shave/shave-libtool help/Makefile po/Makefile.in src/Makefile src/AssemblyInfo.cs src/AlarmClock/Makefile src/AlbumArtWriter/Makefile src/Ampache/Makefile src/AppIndicator/Makefile src/Awn/Makefile src/ClutterFlow/Makefile src/ClutterFlow/Banshee.ClutterFlow/Makefile src/ClutterFlow/ClutterFlow/Makefile src/CoverWallpaper/Makefile src/DuplicateSongDetector/Makefile src/Jamendo/Makefile src/Karaoke/Makefile src/LastfmFingerprint/Makefile src/LastfmFingerprint/Banshee.LastfmFingerprint/Makefile src/LastfmFingerprint/liblastfmfpbridge/Makefile src/LCD/Makefile src/Lirc/Makefile src/Lirc/lirc-glue/Makefile src/Lirc/Banshee.Lirc/Makefile src/Lirc/GUITestHarness/Makefile src/Lirc/NUnitTests/Makefile src/LiveRadio/Makefile src/Lyrics/Makefile src/OpenVP/Makefile src/OpenVP/Cdh.Affe/Makefile src/OpenVP/Cdh.Affe.Tests/Makefile src/OpenVP/OpenVP/Makefile src/OpenVP/OpenVP.Core/Makefile src/OpenVP/OpenVP.Scripting/Makefile src/OpenVP/Banshee.OpenVP/Makefile src/OpenVP/Banshee.OpenVP.Visualizations/Makefile src/Magnatune/Makefile src/Mirage/Makefile src/Mirage/libmirageaudio/Makefile src/Mirage/Mirage/Makefile src/Mirage/Banshee.Mirage/Makefile src/Mirage/Test/Makefile src/RadioStationFetcher/Makefile src/RandomByLastfm/Makefile src/StreamRecorder/Makefile src/Telepathy/Makefile src/Telepathy/Banshee.Telepathy/Makefile src/ZeitgeistDataprovider/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -21271,6 +21346,14 @@ as_fn_error $? "conditional \"ENABLE_ALARMCLOCK\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${ENABLE_ALBUMARTWRITER_TRUE}" && test -z "${ENABLE_ALBUMARTWRITER_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_ALBUMARTWRITER\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ENABLE_ALBUMARTWRITER_TRUE}" && test -z "${ENABLE_ALBUMARTWRITER_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_ALBUMARTWRITER\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${ENABLE_AMPACHE_TRUE}" && test -z "${ENABLE_AMPACHE_FALSE}"; then as_fn_error $? "conditional \"ENABLE_AMPACHE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -21311,6 +21394,14 @@ as_fn_error $? "conditional \"ENABLE_COVERWALLPAPER\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${ENABLE_DUPLICATESONGDETECTOR_TRUE}" && test -z "${ENABLE_DUPLICATESONGDETECTOR_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_DUPLICATESONGDETECTOR\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ENABLE_DUPLICATESONGDETECTOR_TRUE}" && test -z "${ENABLE_DUPLICATESONGDETECTOR_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_DUPLICATESONGDETECTOR\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${ENABLE_JAMENDO_TRUE}" && test -z "${ENABLE_JAMENDO_FALSE}"; then as_fn_error $? "conditional \"ENABLE_JAMENDO\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -21839,7 +21930,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by banshee-community-extensions $as_me 2.0.1, which was +This file was extended by banshee-community-extensions $as_me 2.2.0, which was generated by GNU Autoconf 2.67. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -21905,7 +21996,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -banshee-community-extensions config.status 2.0.1 +banshee-community-extensions config.status 2.2.0 configured by $0, generated by GNU Autoconf 2.67, with options \\"\$ac_cs_config\\" @@ -22398,9 +22489,9 @@ "help/Makefile") CONFIG_FILES="$CONFIG_FILES help/Makefile" ;; "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; - "src/Karaoke/Makefile") CONFIG_FILES="$CONFIG_FILES src/Karaoke/Makefile" ;; "src/AssemblyInfo.cs") CONFIG_FILES="$CONFIG_FILES src/AssemblyInfo.cs" ;; "src/AlarmClock/Makefile") CONFIG_FILES="$CONFIG_FILES src/AlarmClock/Makefile" ;; + "src/AlbumArtWriter/Makefile") CONFIG_FILES="$CONFIG_FILES src/AlbumArtWriter/Makefile" ;; "src/Ampache/Makefile") CONFIG_FILES="$CONFIG_FILES src/Ampache/Makefile" ;; "src/AppIndicator/Makefile") CONFIG_FILES="$CONFIG_FILES src/AppIndicator/Makefile" ;; "src/Awn/Makefile") CONFIG_FILES="$CONFIG_FILES src/Awn/Makefile" ;; @@ -22408,7 +22499,9 @@ "src/ClutterFlow/Banshee.ClutterFlow/Makefile") CONFIG_FILES="$CONFIG_FILES src/ClutterFlow/Banshee.ClutterFlow/Makefile" ;; "src/ClutterFlow/ClutterFlow/Makefile") CONFIG_FILES="$CONFIG_FILES src/ClutterFlow/ClutterFlow/Makefile" ;; "src/CoverWallpaper/Makefile") CONFIG_FILES="$CONFIG_FILES src/CoverWallpaper/Makefile" ;; + "src/DuplicateSongDetector/Makefile") CONFIG_FILES="$CONFIG_FILES src/DuplicateSongDetector/Makefile" ;; "src/Jamendo/Makefile") CONFIG_FILES="$CONFIG_FILES src/Jamendo/Makefile" ;; + "src/Karaoke/Makefile") CONFIG_FILES="$CONFIG_FILES src/Karaoke/Makefile" ;; "src/LastfmFingerprint/Makefile") CONFIG_FILES="$CONFIG_FILES src/LastfmFingerprint/Makefile" ;; "src/LastfmFingerprint/Banshee.LastfmFingerprint/Makefile") CONFIG_FILES="$CONFIG_FILES src/LastfmFingerprint/Banshee.LastfmFingerprint/Makefile" ;; "src/LastfmFingerprint/liblastfmfpbridge/Makefile") CONFIG_FILES="$CONFIG_FILES src/LastfmFingerprint/liblastfmfpbridge/Makefile" ;; @@ -24014,11 +24107,13 @@ Extensions: Alarm Clock: ${enable_AlarmClock} + AlbumArtWriter: ${enable_AlbumArtWriter} Ampache: ${enable_Ampache} AppIndicator: ${enable_AppIndicator} Awn: ${enable_Awn} ClutterFlow: ${enable_ClutterFlow} CoverWallpaper: ${enable_CoverWallpaper} + DuplicateSongDetector: ${enable_DuplicateSongDetector} Jamendo: ${enable_Jamendo} Karaoke: ${enable_Karaoke} LastfmFingerprint: ${enable_LastfmFingerprint} diff -Nru banshee-community-extensions-2.0.1/configure.ac banshee-community-extensions-2.2.0/configure.ac --- banshee-community-extensions-2.0.1/configure.ac 2011-05-03 20:25:21.000000000 +0000 +++ banshee-community-extensions-2.2.0/configure.ac 2011-09-19 20:30:24.000000000 +0000 @@ -1,11 +1,10 @@ AC_PREREQ(2.52) -AC_INIT([banshee-community-extensions], 2.0.1, +AC_INIT([banshee-community-extensions], 2.2.0, [http://bugzilla.gnome.org/enter_bug.cgi?product=banshee&component=Community%20Extensions]) AM_INIT_AUTOMAKE([1.9 dist-bzip2 tar-ustar dist-zip foreign]) -AM_MAINTAINER_MODE +AM_MAINTAINER_MODE([enable]) AM_CONFIG_HEADER([config.h]) -AC_SUBST([ACLOCAL_AMFLAGS], ["-I build/m4/shamrock -I build/m4/shave -I build/m4/extensions \${ACLOCAL_FLAGS}"]) IT_PROG_INTLTOOL([0.35.0]) AC_PROG_LIBTOOL @@ -29,7 +28,7 @@ SHAMROCK_FIND_MONO_RUNTIME dnl Banshee deps -PKG_CHECK_MODULES(BANSHEE, banshee-thickclient >= 1.9.6) +PKG_CHECK_MODULES(BANSHEE, banshee-thickclient >= 2.1.0) AC_SUBST(BANSHEE_LIBS) dnl Banshee Extensions Path @@ -78,11 +77,13 @@ dnl Extensions BCE_ALARMCLOCK +BCE_ALBUMARTWRITER BCE_AMPACHE BCE_APPINDICATOR BCE_AWN BCE_CLUTTERFLOW BCE_COVERWALLPAPER +BCE_DUPLICATESONGDETECTOR BCE_JAMENDO BCE_LASTFMFINGERPRINT BCE_LCD @@ -132,10 +133,10 @@ po/Makefile.in src/Makefile -src/Karaoke/Makefile src/AssemblyInfo.cs src/AlarmClock/Makefile +src/AlbumArtWriter/Makefile src/Ampache/Makefile src/AppIndicator/Makefile src/Awn/Makefile @@ -143,7 +144,9 @@ src/ClutterFlow/Banshee.ClutterFlow/Makefile src/ClutterFlow/ClutterFlow/Makefile src/CoverWallpaper/Makefile +src/DuplicateSongDetector/Makefile src/Jamendo/Makefile +src/Karaoke/Makefile src/LastfmFingerprint/Makefile src/LastfmFingerprint/Banshee.LastfmFingerprint/Makefile src/LastfmFingerprint/liblastfmfpbridge/Makefile @@ -199,11 +202,13 @@ Extensions: Alarm Clock: ${enable_AlarmClock} + AlbumArtWriter: ${enable_AlbumArtWriter} Ampache: ${enable_Ampache} AppIndicator: ${enable_AppIndicator} Awn: ${enable_Awn} ClutterFlow: ${enable_ClutterFlow} CoverWallpaper: ${enable_CoverWallpaper} + DuplicateSongDetector: ${enable_DuplicateSongDetector} Jamendo: ${enable_Jamendo} Karaoke: ${enable_Karaoke} LastfmFingerprint: ${enable_LastfmFingerprint} diff -Nru banshee-community-extensions-2.0.1/debian/autogen.sh banshee-community-extensions-2.2.0/debian/autogen.sh --- banshee-community-extensions-2.0.1/debian/autogen.sh 1970-01-01 00:00:00.000000000 +0000 +++ banshee-community-extensions-2.2.0/debian/autogen.sh 2011-09-27 07:45:20.000000000 +0000 @@ -0,0 +1,85 @@ +#!/usr/bin/env bash + +PROJECT=banshee-community-extensions + +function error () { + echo "Error: $1" 1>&2 + exit 1 +} + +function check_autotool_version () { + which $1 &>/dev/null || { + error "$1 is not installed, and is required to configure $PACKAGE" + } + + version=$($1 --version | head -n 1 | cut -f4 -d' ') + major=$(echo $version | cut -f1 -d.) + minor=$(echo $version | cut -f2 -d.) + rev=$(echo $version | cut -f3 -d. | sed 's/[^0-9].*$//') + major_check=$(echo $2 | cut -f1 -d.) + minor_check=$(echo $2 | cut -f2 -d.) + rev_check=$(echo $2 | cut -f3 -d.) + + if [ $major -lt $major_check ]; then + do_bail=yes + elif [[ $minor -lt $minor_check && $major = $major_check ]]; then + do_bail=yes + elif [[ $rev -lt $rev_check && $minor = $minor_check && $major = $major_check ]]; then + do_bail=yes + fi + + if [ x"$do_bail" = x"yes" ]; then + error "$1 version $2 or better is required to configure $PROJECT" + fi +} + +function run () { + echo "Running $@ ..." + $@ 2>.autogen.log || { + cat .autogen.log 1>&2 + rm .autogen.log + error "Could not run $1, which is required to configure $PROJECT" + } + rm .autogen.log +} + +srcdir=$(dirname $0) +test -z "$srcdir" && srcdir=. + +(test -f $srcdir/configure.ac) || { + error "Directory \"$srcdir\" does not look like the top-level $PROJECT directory" +} + +# MacPorts on OS X only seems to have glibtoolize +WHICHLIBTOOLIZE=$(which libtoolize || which glibtoolize) +if [ x"$WHICHLIBTOOLIZE" == x"" ]; then + error "libtool is required to configure $PROJECT" +fi +LIBTOOLIZE=$(basename $WHICHLIBTOOLIZE) + +check_autotool_version aclocal 1.9 +check_autotool_version automake 1.9 +check_autotool_version autoconf 2.53 +check_autotool_version $LIBTOOLIZE 1.4.3 +check_autotool_version intltoolize 0.35.0 +check_autotool_version pkg-config 0.14.0 + +run intltoolize --force --copy +run $LIBTOOLIZE --force --copy --automake +run aclocal -I build/m4/shamrock -I build/m4/shave -I build/m4/extensions $ACLOCAL_FLAGS +run autoconf +run autoheader +test -f config.h.in && touch config.h.in +run automake --gnu --add-missing --force --copy \ + -Wno-portability -Wno-portability + +if [ $# = 0 ]; then + echo "WARNING: I am going to run configure without any arguments." +fi + +if [ -z "$NOCONFIGURE" ]; then + run ./configure --enable-maintainer-mode $@ +else + echo "Done. ./configure skipped because NOCONFIGURE was set" +fi + diff -Nru banshee-community-extensions-2.0.1/debian/banshee-extension-albumartwriter.install banshee-community-extensions-2.2.0/debian/banshee-extension-albumartwriter.install --- banshee-community-extensions-2.0.1/debian/banshee-extension-albumartwriter.install 1970-01-01 00:00:00.000000000 +0000 +++ banshee-community-extensions-2.2.0/debian/banshee-extension-albumartwriter.install 2011-09-27 07:45:20.000000000 +0000 @@ -0,0 +1 @@ +/usr/lib/banshee/Extensions/Banshee.AlbumArtWriter.* diff -Nru banshee-community-extensions-2.0.1/debian/banshee-extension-duplicatesongdetector.install banshee-community-extensions-2.2.0/debian/banshee-extension-duplicatesongdetector.install --- banshee-community-extensions-2.0.1/debian/banshee-extension-duplicatesongdetector.install 1970-01-01 00:00:00.000000000 +0000 +++ banshee-community-extensions-2.2.0/debian/banshee-extension-duplicatesongdetector.install 2011-09-27 07:45:20.000000000 +0000 @@ -0,0 +1 @@ +/usr/lib/banshee/Extensions/Banshee.DuplicateSongDetector.* diff -Nru banshee-community-extensions-2.0.1/debian/changelog banshee-community-extensions-2.2.0/debian/changelog --- banshee-community-extensions-2.0.1/debian/changelog 2011-05-07 11:44:30.000000000 +0000 +++ banshee-community-extensions-2.2.0/debian/changelog 2011-09-27 07:45:20.000000000 +0000 @@ -1,3 +1,121 @@ +banshee-community-extensions (2.2.0-1ubuntu1~hyper1+natty) natty; urgency=low + + * Backport to natty + + -- Chow Loong Jin Tue, 27 Sep 2011 15:45:13 +0800 + +banshee-community-extensions (2.2.0-1ubuntu1~hyper1+oneiric) oneiric; urgency=low + + * Backport to oneiric + + -- Chow Loong Jin Tue, 27 Sep 2011 05:42:20 +0800 + +banshee-community-extensions (2.2.0-1ubuntu1) oneiric; urgency=low + + * [c0b3875] Merge from Debian Unstable (LP: #856579), remaining changes: + + Enable AppIndicator extension + + -- Chow Loong Jin Thu, 22 Sep 2011 13:55:22 +0800 + +banshee-community-extensions (2.2.0-1) unstable; urgency=low + + * [4940fab] Imported Upstream version 2.2.0 + + Notable bug fixes: + - Karaoke: Fix crash when switching to Now Playing + - Lyrics: Fix crash when switching to Now Playing + + -- Chow Loong Jin Tue, 20 Sep 2011 18:45:46 +0800 + +banshee-community-extensions (2.1.4-1) experimental; urgency=low + + * [233bb9c] Imported Upstream version 2.1.4 + + Enhancements since 2.1.3: + - DuplicateSongDetector: Add toggling by activating row + - DuplicateSongDetector: Add a refresh and close button to the toolbar + - OpenVP: Add new "Spectrum Scan" and "Spectrum Rain" visualizations + - OpenVP: Make "Scaled Voiceprint" visualization look nicer (bgo#658304) + + Notable bugs fixed since 2.1.3: + - ClutterFlow: Fix crash when searching (bgo#658334) + - StreamRecorder: Fix files not being split by metadata + (bgo#656339, LP: #824393) + + -- Chow Loong Jin Fri, 09 Sep 2011 09:38:07 +0800 + +banshee-community-extensions (2.1.3-1) experimental; urgency=low + + * [7f6490e] Enable lirc package + * [11e79bc] Imported Upstream version 2.1.3 + + New extensions: + - AlbumArtWriter: Write album art to the folder containing the music files + - DuplicateSongDetector: Detect and remove duplicate songs in your library + + Enhancements: + - Mirage: Re-enable rescan and reset methods (bgo#653826) + - OpenVP: Add a new "Scaled Voiceprint" visualization + + Notable bugs fixed: + - RandomByLastfm: Do not query Last.fm when offline (bgo#634785) + - LastfmFingerprint: Build only if enabled in the build (bgo#657013) + * [6cfc562] Add Album Art Writer and Duplicate Song Detection extensions + * [85d613c] Drop upstreamed patches + * [4c4630f] No change Standards-Version bump (3.9.1 → 3.9.1) + * [bc88cbf] Fix deletion of .la files + + -- Chow Loong Jin Sat, 27 Aug 2011 22:45:56 +0800 + +banshee-community-extensions (2.1.1-2ubuntu1) oneiric; urgency=low + + * [c0b3875] Merge from Debian Unstable, remaining changes: + + Enable LIRC and AppIndicator extensions + + -- Iain Lane Sun, 26 Jun 2011 13:31:44 +0100 + +banshee-community-extensions (2.1.1-2) experimental; urgency=low + + * No-change rebuild vs. new zeitgeist-sharp ABI + + -- Iain Lane Fri, 17 Jun 2011 15:31:08 +0100 + +banshee-community-extensions (2.1.1-1) experimental; urgency=low + + * [39d331d] Fix pushd usage inside Makefile + * [2b7eac6] Imported Upstream version 2.1.1: + + Enhancements since 2.0.0: + - Use dbus-sharp instead of ndesk-dbus. The Telepathy extension does not + bundle the ndesk-dbus sources anymore. + - ClutterFlow: Major refactoring and code cleanup, for better readability. + + Notable bugs fixed since 2.0.0: + - ClutterFlow: Fix NRE crash (bgo#647134) + - Karaoke: add an gst_init() call to make sure gstreamer is working + - Karaoke: fix NRE on dispose if audiokaraoke was not found + - LastfmFingerprint: Don't strdup strings + - LastfmFingerprint: Fix empty name exception (bgo#648168) + - Lirc: Drop liblirc_client.so moduleref (LP: #773686) + - LiveRadio: Re-enable ShoutCast with request structure from + RadioStationFetcher + - Lyrics: Always update pane title when track changes (bgo#647108) + - RadioStationFetcher: Updated the shoutcast plugin to fix the IP address + - ZeitgeistDataprovider: Register dataprovider in DataSource Registry + (LP: #691842) + - ZeitgeistDataprovider: Differenciate between ScheduledActivity and + UserActivity (LP: #748120) + * [b28fd78] Drop upstreamed patches + * Fix unresolved modulerefs with cli-common-dev 0.8 (Closes: #627384) + + [0787020] Exclude libgdk-win32 moduleref + + [597f885] Cherry-pick liblastfmfpbridge dllmap + + [94a7827] Exclude glibsharpglue-2 moduleref + + [f042731] Cherry-pick patch to fix gstreamer dllimport + * [b83b3e2] Use dh_gencontrol -- -V for substvars + + -- Chow Loong Jin Tue, 14 Jun 2011 02:31:33 +0800 + +banshee-community-extensions (2.0.1-2) unstable; urgency=low + + * [09b59ed] Bump banshee build-dep for dbus# + * [e468baa] Cherry-pick port to DBus# + * [bf2d84e] Add autogen + * [7025c67] Change build-deps for dbus# port + + -- Chow Loong Jin Sun, 10 Jul 2011 10:08:08 +0100 + banshee-community-extensions (2.0.1-1ubuntu1~hyper1+natty) natty; urgency=low * Backport to natty @@ -17,7 +135,7 @@ -- Chow Loong Jin Sat, 07 May 2011 17:12:01 +0800 -banshee-community-extensions (2.0.1-1) UNRELEASED; urgency=low +banshee-community-extensions (2.0.1-1) unstable; urgency=low * [c02b8fd] Move over to bz2 in debian/watch * [536b6d6] New upstream bugfix release: diff -Nru banshee-community-extensions-2.0.1/debian/control banshee-community-extensions-2.2.0/debian/control --- banshee-community-extensions-2.0.1/debian/control 2011-05-07 11:44:30.000000000 +0000 +++ banshee-community-extensions-2.2.0/debian/control 2011-09-27 07:45:20.000000000 +0000 @@ -5,11 +5,13 @@ XSBC-Original-Maintainer: Debian CLI Applications Team Uploaders: Chow Loong Jin Build-Depends: debhelper (>= 7.0.50), + dh-autoreconf, + libgconf2-dev, cli-common-dev (>= 0.5.7), mono-devel (>= 2.4.2.3), autotools-dev, lsb-release, - banshee (>= 1.9.6), + banshee (>= 2.1.0), pkg-config, liblircclient-dev (>= 0.8.6), libglib2.0-dev, @@ -23,8 +25,8 @@ libglib2.0-cil-dev, libgtk2.0-cil-dev, libtaglib-cil-dev, - libndesk-dbus-glib1.0-cil-dev, - libndesk-dbus1.0-cil-dev, + libdbus-glib1.0-cil-dev, + libdbus1.0-cil-dev, libmono-addins-cil-dev, libnotify-cil-dev, libappindicator0.1-cil-dev, @@ -36,7 +38,7 @@ libclutter-cil-dev, libclutter-gtk-cil-dev, libzeitgeist-cil-dev -Standards-Version: 3.9.1 +Standards-Version: 3.9.2 Vcs-Git: git://git.debian.org/git/pkg-cli-apps/packages/banshee-community-extensions.git Vcs-Browser: http://git.debian.org/?p=pkg-cli-apps/packages/banshee-community-extensions.git Homepage: http://gitorious.org/banshee-community-extensions @@ -45,11 +47,13 @@ Architecture: all Enhances: banshee Recommends: banshee-extension-alarm (>= ${source:Version}), + banshee-extension-albumartwriter (>= ${source:Version}), banshee-extension-ampache (>= ${source:Version}), banshee-extension-appindicator (>= ${source:Version}), banshee-extension-awn (>= ${source:Version}), banshee-extension-coverwallpaper (>= ${source:Version}), banshee-extension-clutterflow (>= ${source:Version}), + banshee-extension-duplicatesongdetector (>= ${source:Version}), banshee-extension-jamendo (>= ${source:Version}), banshee-extension-lastfmfingerprint (>= ${source:Version}), banshee-extension-lcd (>= ${source:Version}), @@ -94,6 +98,17 @@ . Banshee is a media management and playback application for the GNOME desktop. +Package: banshee-extension-albumartwriter +Enhances: banshee +Architecture: all +Depends: banshee-extensions-common (= ${source:Version}), + ${cli:Depends}, ${misc:Depends} +Description: Album art writer extension for Banshee + This package contains the Album Art Writer extension for Banshee which writes + album art from the cache to the folder containing the music files. + . + Banshee is a media management and playback application for the GNOME desktop. + Package: banshee-extension-ampache Enhances: banshee Architecture: all @@ -150,6 +165,16 @@ . Banshee is a media management and playback application for the GNOME desktop. +Package: banshee-extension-duplicatesongdetector +Architecture: all +Depends: banshee-extensions-common (= ${source:Version}), + ${cli:Depends}, ${misc:Depends} +Description: Duplicate song detector extension for Banshee + This package adds duplicate song detection to Banshee, allowing it to detect + and remove duplicate songs in your library. + . + Banshee is a media management and playback application for the GNOME desktop. + Package: banshee-extension-jamendo Enhances: banshee Architecture: all diff -Nru banshee-community-extensions-2.0.1/debian/rules banshee-community-extensions-2.2.0/debian/rules --- banshee-community-extensions-2.0.1/debian/rules 2011-05-07 11:44:30.000000000 +0000 +++ banshee-community-extensions-2.2.0/debian/rules 2011-09-27 07:45:20.000000000 +0000 @@ -12,11 +12,13 @@ --enable-gnome \ --enable-schemas-install \ --enable-alarmclock \ + --enable-albumartwriter \ --enable-ampache \ --enable-appindicator \ --enable-awn \ --enable-clutterflow \ --enable-coverwallpaper \ + --enable-duplicatesongdetector \ --enable-jamendo \ --enable-karaoke \ --enable-lastfmfingerprint \ @@ -38,16 +40,27 @@ override_dh_auto_install: dh_auto_install - find debian/tmp -name '*.la' -o -name '*.a' -delete + find debian/tmp \( -name '*.la' -o -name '*.a' \) -delete override_dh_gencontrol: - for pkg in `sed -n 's/^Package: //p' debian/control`; do \ - echo "banshee:Version=$(BANSHEE_VERSION)" >> debian/$$pkg.substvars; \ - done - dh_gencontrol + dh_gencontrol -- -Vbanshee:Version=$(BANSHEE_VERSION) override_dh_makeclilibs: # do nothing -- we do not want clilibs to come # from anything, and especially not clutterflow. +override_dh_autoreconf: autogen.sh + NOCONFIGURE=1 dh_autoreconf ./autogen.sh -- + +autogen.sh: debian/autogen.sh + ln -s $< $@ + +clean: + rm -f autogen.sh + +override_dh_clideps: + dh_clideps \ + --exclude-moduleref=libgdk-win32-2.0-0.dll \ + --exclude-moduleref=glibsharpglue-2 + %: - dh $@ + dh $@ --with=autoreconf diff -Nru banshee-community-extensions-2.0.1/help/Makefile.in banshee-community-extensions-2.2.0/help/Makefile.in --- banshee-community-extensions-2.0.1/help/Makefile.in 2011-05-03 20:45:04.000000000 +0000 +++ banshee-community-extensions-2.2.0/help/Makefile.in 2011-09-19 20:36:50.000000000 +0000 @@ -62,6 +62,7 @@ subdir = help ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/m4/extensions/alarmclock.m4 \ + $(top_srcdir)/build/m4/extensions/albumartwriter.m4 \ $(top_srcdir)/build/m4/extensions/ampache.m4 \ $(top_srcdir)/build/m4/extensions/appindicator.m4 \ $(top_srcdir)/build/m4/extensions/awn.m4 \ @@ -69,6 +70,7 @@ $(top_srcdir)/build/m4/extensions/clutterflow.m4 \ $(top_srcdir)/build/m4/extensions/common.m4 \ $(top_srcdir)/build/m4/extensions/coverwallpaper.m4 \ + $(top_srcdir)/build/m4/extensions/duplicatesongdetector.m4 \ $(top_srcdir)/build/m4/extensions/jamendo.m4 \ $(top_srcdir)/build/m4/extensions/karaoke.m4 \ $(top_srcdir)/build/m4/extensions/lastfmfingerprint.m4 \ @@ -88,6 +90,11 @@ $(top_srcdir)/build/m4/shamrock/expansions.m4 \ $(top_srcdir)/build/m4/shamrock/gnome-doc.m4 \ $(top_srcdir)/build/m4/shamrock/i18n.m4 \ + $(top_srcdir)/build/m4/shamrock/libtool.m4 \ + $(top_srcdir)/build/m4/shamrock/ltoptions.m4 \ + $(top_srcdir)/build/m4/shamrock/ltsugar.m4 \ + $(top_srcdir)/build/m4/shamrock/ltversion.m4 \ + $(top_srcdir)/build/m4/shamrock/lt~obsolete.m4 \ $(top_srcdir)/build/m4/shamrock/mono.m4 \ $(top_srcdir)/build/m4/shamrock/nunit.m4 \ $(top_srcdir)/build/m4/shamrock/programs.m4 \ @@ -102,7 +109,6 @@ DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AM_MAKEFLAGS = @AM_MAKEFLAGS@ diff -Nru banshee-community-extensions-2.0.1/ltmain.sh banshee-community-extensions-2.2.0/ltmain.sh --- banshee-community-extensions-2.0.1/ltmain.sh 2011-05-03 20:44:58.000000000 +0000 +++ banshee-community-extensions-2.2.0/ltmain.sh 2011-09-19 20:36:43.000000000 +0000 @@ -65,7 +65,7 @@ # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.2.6b Debian-2.2.6b-2ubuntu1 +# $progname: (GNU libtool) 2.2.6b Debian-2.2.6b-2ubuntu3 # automake: $automake_version # autoconf: $autoconf_version # @@ -73,7 +73,7 @@ PROGRAM=ltmain.sh PACKAGE=libtool -VERSION="2.2.6b Debian-2.2.6b-2ubuntu1" +VERSION="2.2.6b Debian-2.2.6b-2ubuntu3" TIMESTAMP="" package_revision=1.3017 diff -Nru banshee-community-extensions-2.0.1/Makefile.am banshee-community-extensions-2.2.0/Makefile.am --- banshee-community-extensions-2.0.1/Makefile.am 2011-03-19 17:15:01.000000000 +0000 +++ banshee-community-extensions-2.2.0/Makefile.am 2011-05-28 12:12:34.000000000 +0000 @@ -1,3 +1,5 @@ +ACLOCAL_AMFLAGS = -I build/m4/shamrock -I build/m4/shave -I build/m4/extensions ${ACLOCAL_FLAGS} + SUBDIRS = \ build \ help \ @@ -56,9 +58,7 @@ update-pot: if [ "x$(top_srcdir)" = "x$(top_builddir)" ]; then \ - pushd $(top_builddir)/po; \ - $(MAKE) $(GETTEXT_PACKAGE).pot; \ - popd; \ + $(MAKE) -C "$(top_builddir)/po" $(GETTEXT_PACKAGE).pot; \ fi; # --------------- diff -Nru banshee-community-extensions-2.0.1/Makefile.in banshee-community-extensions-2.2.0/Makefile.in --- banshee-community-extensions-2.0.1/Makefile.in 2011-05-03 20:45:07.000000000 +0000 +++ banshee-community-extensions-2.2.0/Makefile.in 2011-09-19 20:36:54.000000000 +0000 @@ -42,6 +42,7 @@ install-sh ltmain.sh missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/m4/extensions/alarmclock.m4 \ + $(top_srcdir)/build/m4/extensions/albumartwriter.m4 \ $(top_srcdir)/build/m4/extensions/ampache.m4 \ $(top_srcdir)/build/m4/extensions/appindicator.m4 \ $(top_srcdir)/build/m4/extensions/awn.m4 \ @@ -49,6 +50,7 @@ $(top_srcdir)/build/m4/extensions/clutterflow.m4 \ $(top_srcdir)/build/m4/extensions/common.m4 \ $(top_srcdir)/build/m4/extensions/coverwallpaper.m4 \ + $(top_srcdir)/build/m4/extensions/duplicatesongdetector.m4 \ $(top_srcdir)/build/m4/extensions/jamendo.m4 \ $(top_srcdir)/build/m4/extensions/karaoke.m4 \ $(top_srcdir)/build/m4/extensions/lastfmfingerprint.m4 \ @@ -68,6 +70,11 @@ $(top_srcdir)/build/m4/shamrock/expansions.m4 \ $(top_srcdir)/build/m4/shamrock/gnome-doc.m4 \ $(top_srcdir)/build/m4/shamrock/i18n.m4 \ + $(top_srcdir)/build/m4/shamrock/libtool.m4 \ + $(top_srcdir)/build/m4/shamrock/ltoptions.m4 \ + $(top_srcdir)/build/m4/shamrock/ltsugar.m4 \ + $(top_srcdir)/build/m4/shamrock/ltversion.m4 \ + $(top_srcdir)/build/m4/shamrock/lt~obsolete.m4 \ $(top_srcdir)/build/m4/shamrock/mono.m4 \ $(top_srcdir)/build/m4/shamrock/nunit.m4 \ $(top_srcdir)/build/m4/shamrock/programs.m4 \ @@ -134,7 +141,6 @@ distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ -ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AM_MAKEFLAGS = @AM_MAKEFLAGS@ @@ -354,6 +360,7 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ +ACLOCAL_AMFLAGS = -I build/m4/shamrock -I build/m4/shave -I build/m4/extensions ${ACLOCAL_FLAGS} SUBDIRS = \ build \ help \ @@ -923,9 +930,7 @@ update-pot: if [ "x$(top_srcdir)" = "x$(top_builddir)" ]; then \ - pushd $(top_builddir)/po; \ - $(MAKE) $(GETTEXT_PACKAGE).pot; \ - popd; \ + $(MAKE) -C "$(top_builddir)/po" $(GETTEXT_PACKAGE).pot; \ fi; prepare-release: distcheck diff -Nru banshee-community-extensions-2.0.1/NEWS banshee-community-extensions-2.2.0/NEWS --- banshee-community-extensions-2.0.1/NEWS 2011-05-03 20:42:54.000000000 +0000 +++ banshee-community-extensions-2.2.0/NEWS 2011-09-19 20:30:56.000000000 +0000 @@ -1,11 +1,99 @@ ================================= -Version 2.0.1 - May 3, 2011 +Version 2.2.0 - September 21, 2011 +================================= + +Contributors since 2.0.0: +Bertrand Lorentz, Chow Loong Jin, Frank Ziegler, Kevin Anthony, Kriss, +Manish Sinha, Nicholas Parker, Olivier Dufour, Philipp Ittershagen, +Raimo Radczewski + +New extensions since 2.0.0: +* AlbumArtWriter: Write album art to the folder containing the music files +* DuplicateSongDetector: Detect and remove duplicate songs in your library + +Enhancements since 2.0.0: +* ClutterFlow: Major refactoring and code cleanup, for better readability. +* DuplicateSongDetector: Add toggling by activating row +* DuplicateSongDetector: Add a refresh and close button to the toolbar +* Mirage: Re-enable rescan and reset methods (bgo#653826) +* OpenVP: Add new "Spectrum Scan" and "Spectrum Rain" visualizations +* OpenVP: Make "Scaled Voiceprint" visualization look nicer (bgo#658304) +* OpenVP: Add a new "Scaled Voiceprint" visualization +* Use dbus-sharp instead of ndesk-dbus. The Telepathy extension does not bundle + the ndesk-dbus sources anymore. + +Notable bugs fixed since 2.0.0: +* ClutterFlow: Fix crash when searching (bgo#658334) +* ClutterFlow: Fix NRE crash (bgo#647134) +* Karaoke: add an gst_init() call to make sure gstreamer is working +* Karaoke: fix NRE on dispose if audiokaraoke was not found +* Karaoke: Fix crash when switching to Now Playing +* LastfmFingerprint: Build only if enabled in the build (bgo#657013) +* LastfmFingerprint: Don't strdup strings +* LastfmFingerprint: Fix empty name exception (bgo#648168) +* Lirc: Drop liblirc_client.so moduleref (lp#773686) +* LiveRadio: Re-enable ShoutCast with request structure from RadioStationFetcher +* Lyrics: Always update pane title when track changes (bgo#647108) +* Lyrics: Fix crash when switching to Now Playing +* RadioStationFetcher: Updated the shoutcast plugin to fix the IP address +* RandomByLastfm: Do not query Last.fm when offline (bgo#634785) +* StreamRecorder: Fix files not being split by metadata (bgo#656339) +* ZeitgeistDataprovider: Register dataprovider in DataSource Registry (lp#691842) +* ZeitgeistDataprovider: Differenciate between ScheduledActivity and UserActivity (lp#748120) + + +================================= +Version 2.1.4 - September 8, 2011 +================================= + +Contributors since 2.1.3: +Bertrand Lorentz, Kevin Anthony, Nicholas Parker + +Enhancements since 2.1.3: +* DuplicateSongDetector: Add toggling by activating row +* DuplicateSongDetector: Add a refresh and close button to the toolbar +* OpenVP: Add new "Spectrum Scan" and "Spectrum Rain" visualizations +* OpenVP: Make "Scaled Voiceprint" visualization look nicer (bgo#658304) + +Notable bugs fixed since 2.1.3: +* ClutterFlow: Fix crash when searching (bgo#658334) +* StreamRecorder: Fix files not being split by metadata (bgo#656339) + + +================================= +Version 2.1.3 - August 25, 2011 +================================= + +Contributors since 2.1.1: +Bertrand Lorentz, Chow Loong Jin, Kevin Anthony, Nicholas Parker, +Philipp Ittershagen, Raimo Radczewski + +New extensions since 2.1.1: +* AlbumArtWriter: Write album art to the folder containing the music files +* DuplicateSongDetector: Detect and remove duplicate songs in your library + +Enhancements since 2.1.1: +* Mirage: Re-enable rescan and reset methods (bgo#653826) +* OpenVP: Add a new "Scaled Voiceprint" visualization + +Notable bugs fixed since 2.1.1: +* RandomByLastfm: Do not query Last.fm when offline (bgo#634785) +* LastfmFingerprint: Build only if enabled in the build (bgo#657013) + + +================================= +Version 2.1.1 - June 13, 2011 ================================= Contributors since 2.0.0: Bertrand Lorentz, Chow Loong Jin, Frank Ziegler, Kriss, Manish Sinha, Olivier Dufour +Enhancements since 2.0.0: +* Use dbus-sharp instead of ndesk-dbus. The Telepathy extension does not bundle + the ndesk-dbus sources anymore. +* ClutterFlow: Major refactoring and code cleanup, for better readability. + Notable bugs fixed since 2.0.0: * ClutterFlow: Fix NRE crash (bgo#647134) * Karaoke: add an gst_init() call to make sure gstreamer is working @@ -19,6 +107,7 @@ * ZeitgeistDataprovider: Register dataprovider in DataSource Registry (lp#691842) * ZeitgeistDataprovider: Differenciate between ScheduledActivity and UserActivity (lp#748120) + ================================= Version 2.0.0 - April 6, 2011 ================================= diff -Nru banshee-community-extensions-2.0.1/po/de.po banshee-community-extensions-2.2.0/po/de.po --- banshee-community-extensions-2.0.1/po/de.po 2011-03-24 19:48:38.000000000 +0000 +++ banshee-community-extensions-2.2.0/po/de.po 2011-09-19 20:36:11.000000000 +0000 @@ -1,15 +1,18 @@ # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. # +# Translators: +# Bertrand Lorentz , 2011. +# Christoph Bauer , 2011. +# fixx , 2011. msgid "" msgstr "" "Project-Id-Version: Banshee Community Extensions\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=banshee&component=Community%20Extensions\n" -"POT-Creation-Date: 2011-03-22 23:13+0100\n" -"PO-Revision-Date: 2011-03-23 00:09+0000\n" -"Last-Translator: bl8 \n" +"POT-Creation-Date: 2011-09-08 21:22+0200\n" +"PO-Revision-Date: 2011-09-09 00:16+0000\n" +"Last-Translator: cb5264 \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -106,17 +109,29 @@ msgid "Start Timer" msgstr "Starte Timer" +#: ../src/AlbumArtWriter/Banshee.AlbumArtWriter/AlbumArtWriterJob.cs:48 +msgid "Saving Cover Art To Album folders" +msgstr "" + +#: ../src/AlbumArtWriter/Banshee.AlbumArtWriter/AlbumArtWriterJob.cs:99 +#: ../src/Lyrics/Banshee.Lyrics/Banshee.Lyrics/LyricsDownloadJob.cs:61 +#, csharp-format +msgid "{0} - {1}" +msgstr "{0} - {1}" + #: ../src/Ampache/Banshee.Ampache/Gui/AmpacheView.cs:73 msgid "Connect" msgstr "Verbinden" #: ../src/Ampache/Banshee.Ampache/Gui/AmpacheView.cs:85 #: ../src/Ampache/Banshee.Ampache/Gui/AmpacheView.cs:92 +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:73 msgid "Artist" msgstr "Künstler" #: ../src/Ampache/Banshee.Ampache/Gui/AmpacheView.cs:87 #: ../src/Ampache/Banshee.Ampache/Gui/AmpacheView.cs:93 +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:74 msgid "Album" msgstr "Album" @@ -155,6 +170,7 @@ msgstr "S_chließen" #: ../src/AppIndicator/Banshee.AppIndicator/AppIndicatorService.cs:133 +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/DuplicateSongDetectorSource.cs:50 msgid "Close" msgstr "Schließen" @@ -184,7 +200,7 @@ #: ../src/AppIndicator/Banshee.AppIndicator/AppIndicatorService.cs:308 #, csharp-format msgid "by '{0}' from '{1}'" -msgstr "von '{0}' aus '{1}'S" +msgstr "von '{0}' aus '{1}'" #. Translators: {0} is for Album Title; #. e.g. 'from Killing with a Smile' @@ -204,7 +220,7 @@ msgid "Skip this item" msgstr "Dieses Element überspringen" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowContents.cs:263 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowContents.cs:269 msgid "Track list" msgstr "Trackliste" @@ -221,27 +237,19 @@ "Höhere Werte bedeuten schnelleres Scrolling." #: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:57 -msgid "Enable threaded loading of artwork" -msgstr "Lade Artworks in eigenen Threads" - -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:58 -msgid "If enabled ClutterFlow will use threading to load it's artwork" -msgstr "Wenn gesetzt benutzt ClutterFlow eigene Threads um Artworks zu laden" - -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:64 msgid "Unfolds the track list" msgstr "Klappt die Trackliste aus" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:65 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:58 msgid "If checked it will display the track list when not in fullscreen mode" msgstr "" "Wenn gesetzt wird die Trackliste angezeigt wenn kein Vollbild aktiviert ist" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:85 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:78 msgid "Immediately apply playback mode changes" msgstr "Wende Playback Mode Änderungen sofort an" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:86 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:79 msgid "" "Starts playing a new song immediately after the playback mode changed (Party" " Mode or Album Mode)" @@ -249,85 +257,139 @@ "Startet die Wiedergabe eines neuen Liedes sofort nach Änderung des Playback " "Mode (Party Mode oder Album Mode)" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:92 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:85 msgid "Display album _label" msgstr "Zeige Album _Label" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:93 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:86 msgid "Wether or not the album label needs to be shown above the artwork" msgstr "Bestimmt, ob das Album Label über dem Artwork gezeigt wird" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:99 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:92 msgid "Display track _title" msgstr "Zeige Track _Titel" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:100 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:93 msgid "" "Wether or not the album title needs to be shown above the artwork in " "fullscreen mode" msgstr "" "Bestimmt, ob der Album Titel im Vollbild Modus über dem Artwork gezeigt wird" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:106 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:99 msgid "Texture size in pixels" msgstr "Texturgröße in Pixeln" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:107 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:100 msgid "The in-memory size of the cover textures in pixels" msgstr "Die Größe der Covertextur in Pixeln im Speicher" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:113 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:106 msgid "Minimal cover size in pixels" msgstr "Minimale Covergröße in Pixeln" +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:107 #: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:114 -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:121 msgid "The on-stage minimal cover size in pixels" msgstr "Minimale On-Stage Covergröße in Pixeln" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:120 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:113 msgid "Maximal cover size in pixels" msgstr "Maximale Covergröße in Pixeln" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:127 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:120 msgid "Number of visible covers at the side" msgstr "Anzahl der sichtbaren Covers an der Seite" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:128 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:121 msgid "" "The number of covers that need to be displayed on the stage (at one side)" msgstr "" "Die Anzahl der Covers welche auf der Bühne angezeigt werden sollen (pro " "Seite)" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:134 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:127 msgid "Sort covers by" msgstr "Ordne Covers nach" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:135 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:128 msgid "Selects on what basis covers should be sorted" msgstr "Wählt das Kriterium aus, nach dem Covers sortiert werden." -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:231 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:180 msgid "Show ClutterFlow Browser" msgstr "Zeige den ClutterFlow Browser" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:232 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:181 msgid "Show or hide the ClutterFlow browser" msgstr "Zeige oder verstecke den ClutterFlow Browser" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:325 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:277 msgid "ClutterFlow" msgstr "ClutterFlow" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:328 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:280 msgid "General" msgstr "Allgemein" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:337 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:288 msgid "Dimensions" msgstr "Ausmaße" +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:383 +msgid "" +"For changes to these values to take effect, you need to restart Banshee" +msgstr "Damit die Änderungen wirksam werden, musst du Banshee neu starten." + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/DuplicateSongDetectorAction.cs:46 +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/DuplicateSongDetectorAction.cs:49 +msgid "Detect Duplicate Songs" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/DuplicateSongDetectorSource.cs:45 +msgid "Duplicate Song Detector" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/DuplicateSongDetectorSource.cs:55 +msgid "Refresh" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:61 +msgid "Remove Selected Songs" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:64 +msgid "Delete Selected Songs" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:71 +msgid "Select" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:72 +msgid "Song Title" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:75 +msgid "File" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:164 +msgid "Are you sure you want to permanently delete the selected items?" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:166 +msgid "If you delete the selection, it will be permanently lost." +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:170 +msgid "Remove selection from Library?" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:172 +msgid "Are you sure you want to remove the selected items from your Library?" +msgstr "" + #: ../src/Jamendo/Banshee.Jamendo/JamendoDownloadManager.cs:62 msgid "Jamendo Downloads" msgstr "Jamendo Downloads" @@ -347,12 +409,14 @@ #: ../src/Karaoke/Banshee.Karaoke/Gui/ContextPage.cs:45 msgid "Karaoke" -msgstr "" +msgstr "Karaoke" #: ../src/Karaoke/Banshee.Karaoke/Gui/KaraokePane.cs:131 msgid "" "You are disconnected from the internet, so karaoke lyrics are not available." msgstr "" +"Karaoke Texte sind derzeit nicht verfügbar, da der Computer nicht mit dem " +"Internet verbunden ist." #: ../src/Karaoke/Banshee.Karaoke/KaraokeConfigDialog.cs:84 msgid "Karaoke configuration" @@ -401,7 +465,7 @@ #: ../src/Karaoke/Banshee.Karaoke/KaraokeConfigDialog.cs:121 msgid "Enable lyrics display in Context Pane" -msgstr "" +msgstr "Aktiviere die Anzeige von Karaoke Texten in der Kontext-Leiste" #: ../src/Karaoke/Banshee.Karaoke/KaraokeConfigDialog.cs:124 msgid "Restore _defaults" @@ -771,11 +835,6 @@ msgid "Downloading Lyrics" msgstr "Lyrics herunterladen" -#: ../src/Lyrics/Banshee.Lyrics/Banshee.Lyrics/LyricsDownloadJob.cs:61 -#, csharp-format -msgid "{0} - {1}" -msgstr "{0} - {1}" - #: ../src/Lyrics/Banshee.Lyrics/Banshee.Lyrics/LyricsService.cs:171 msgid "L_yrics" msgstr "L_yrics" @@ -875,6 +934,7 @@ msgstr "Durchsuchte deine Musikbibliothek nach möglichen Duplikaten" #: ../src/Mirage/Banshee.Mirage/MiragePlugin.cs:265 +#: ../src/Mirage/Banshee.Mirage/MiragePlugin.cs:307 msgid "Reset Mirage" msgstr "Mirage zurücksetzen" @@ -902,6 +962,18 @@ msgid "Scan for Duplicates" msgstr "Scanne nach Duplikaten" +#: ../src/Mirage/Banshee.Mirage/MiragePlugin.cs:305 +msgid "" +"Do you really want to reset the Mirage Extension?\n" +"All extracted information will be lost. Your music will have to be re-analyzed to use Mirage again." +msgstr "" + +#: ../src/Mirage/Banshee.Mirage/MiragePlugin.cs:318 +msgid "" +"Mirage was reset. Your music will have to be re-analyzed to use Mirage " +"again." +msgstr "" + #: ../src/Mirage/Banshee.Mirage/RandomBySimilar.cs:54 msgid "Shuffle by Similar" msgstr "Zufallswiedergabe nach Ähnlichkeit" @@ -1016,27 +1088,27 @@ msgid "www.xiph.org {0} stations available." msgstr "www.xiph.org {0} Stationen verfügbar." -#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmSimilarArtists.cs:66 +#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmSimilarArtists.cs:67 msgid "Shuffle by similar Artists (via Lastfm)" msgstr "Zufallswiedergabe nach ähnlichen Künstlern (nach last.fm)" -#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmSimilarArtists.cs:67 +#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmSimilarArtists.cs:68 msgid "by similar artists" msgstr "nach ähnlichen Künstlern" -#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmSimilarArtists.cs:68 +#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmSimilarArtists.cs:69 msgid "Play songs similar to those already played (via Lastfm)" msgstr "Spiele Lieder ähnlich denen die schon gespiel wurden (nach last.fm)" -#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmUserTopArtists.cs:60 +#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmUserTopArtists.cs:61 msgid "Shuffle by your Top Artists (via Lastfm)" msgstr "Zufallswiedergabe nach Deinen Top Künstlern (nach last.fm)" -#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmUserTopArtists.cs:61 +#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmUserTopArtists.cs:62 msgid "by your top artists" msgstr "nach Deinen Top Künstlern" -#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmUserTopArtists.cs:62 +#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmUserTopArtists.cs:63 msgid "Play songs from your Top Artists (via Lastfm)" msgstr "Spiele Lieder Deiner Top Künstler (nach last.fm)" @@ -1260,3 +1332,5 @@ #: ../src/Telepathy/Banshee.Telepathy/Banshee.Telepathy.Gui/TransferManagerUi.cs:131 msgid "Initializing" msgstr "Initialisiere" + + diff -Nru banshee-community-extensions-2.0.1/po/el.po banshee-community-extensions-2.2.0/po/el.po --- banshee-community-extensions-2.0.1/po/el.po 2011-03-24 19:48:38.000000000 +0000 +++ banshee-community-extensions-2.2.0/po/el.po 2011-09-19 20:36:08.000000000 +0000 @@ -1,14 +1,15 @@ # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. # +# Translators: +# Dimitris Glezos , 2011. msgid "" msgstr "" "Project-Id-Version: Banshee Community Extensions\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=banshee&component=Community%20Extensions\n" -"POT-Creation-Date: 2011-03-22 23:13+0100\n" -"PO-Revision-Date: 2011-03-23 00:09+0000\n" +"POT-Creation-Date: 2011-09-08 21:22+0200\n" +"PO-Revision-Date: 2011-09-09 00:16+0000\n" "Last-Translator: glezos \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" @@ -106,17 +107,29 @@ msgid "Start Timer" msgstr "" +#: ../src/AlbumArtWriter/Banshee.AlbumArtWriter/AlbumArtWriterJob.cs:48 +msgid "Saving Cover Art To Album folders" +msgstr "" + +#: ../src/AlbumArtWriter/Banshee.AlbumArtWriter/AlbumArtWriterJob.cs:99 +#: ../src/Lyrics/Banshee.Lyrics/Banshee.Lyrics/LyricsDownloadJob.cs:61 +#, csharp-format +msgid "{0} - {1}" +msgstr "" + #: ../src/Ampache/Banshee.Ampache/Gui/AmpacheView.cs:73 msgid "Connect" msgstr "Σύνδεση" #: ../src/Ampache/Banshee.Ampache/Gui/AmpacheView.cs:85 #: ../src/Ampache/Banshee.Ampache/Gui/AmpacheView.cs:92 +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:73 msgid "Artist" msgstr "Καλλιτέχνης" #: ../src/Ampache/Banshee.Ampache/Gui/AmpacheView.cs:87 #: ../src/Ampache/Banshee.Ampache/Gui/AmpacheView.cs:93 +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:74 msgid "Album" msgstr "Άλμπουμ" @@ -155,6 +168,7 @@ msgstr "_Κλείσιμο" #: ../src/AppIndicator/Banshee.AppIndicator/AppIndicatorService.cs:133 +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/DuplicateSongDetectorSource.cs:50 msgid "Close" msgstr "Κλείσιμο" @@ -202,7 +216,7 @@ msgid "Skip this item" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowContents.cs:263 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowContents.cs:269 msgid "Track list" msgstr "Λίστα κομματιών" @@ -217,107 +231,153 @@ msgstr "" #: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:57 -msgid "Enable threaded loading of artwork" -msgstr "" - -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:58 -msgid "If enabled ClutterFlow will use threading to load it's artwork" -msgstr "" - -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:64 msgid "Unfolds the track list" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:65 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:58 msgid "If checked it will display the track list when not in fullscreen mode" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:85 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:78 msgid "Immediately apply playback mode changes" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:86 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:79 msgid "" "Starts playing a new song immediately after the playback mode changed (Party" " Mode or Album Mode)" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:92 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:85 msgid "Display album _label" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:93 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:86 msgid "Wether or not the album label needs to be shown above the artwork" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:99 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:92 msgid "Display track _title" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:100 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:93 msgid "" "Wether or not the album title needs to be shown above the artwork in " "fullscreen mode" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:106 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:99 msgid "Texture size in pixels" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:107 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:100 msgid "The in-memory size of the cover textures in pixels" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:113 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:106 msgid "Minimal cover size in pixels" msgstr "Ελάχιστο μέγεθος εξωφύλλου σε pixel" +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:107 #: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:114 -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:121 msgid "The on-stage minimal cover size in pixels" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:120 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:113 msgid "Maximal cover size in pixels" msgstr "Μέγιστο μέγεθος εξωφύλλου σε pixel" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:127 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:120 msgid "Number of visible covers at the side" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:128 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:121 msgid "" "The number of covers that need to be displayed on the stage (at one side)" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:134 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:127 msgid "Sort covers by" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:135 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:128 msgid "Selects on what basis covers should be sorted" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:231 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:180 msgid "Show ClutterFlow Browser" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:232 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:181 msgid "Show or hide the ClutterFlow browser" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:325 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:277 msgid "ClutterFlow" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:328 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:280 msgid "General" msgstr "Γενικά" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:337 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:288 msgid "Dimensions" msgstr "Διαστάσεις" +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:383 +msgid "" +"For changes to these values to take effect, you need to restart Banshee" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/DuplicateSongDetectorAction.cs:46 +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/DuplicateSongDetectorAction.cs:49 +msgid "Detect Duplicate Songs" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/DuplicateSongDetectorSource.cs:45 +msgid "Duplicate Song Detector" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/DuplicateSongDetectorSource.cs:55 +msgid "Refresh" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:61 +msgid "Remove Selected Songs" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:64 +msgid "Delete Selected Songs" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:71 +msgid "Select" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:72 +msgid "Song Title" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:75 +msgid "File" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:164 +msgid "Are you sure you want to permanently delete the selected items?" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:166 +msgid "If you delete the selection, it will be permanently lost." +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:170 +msgid "Remove selection from Library?" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:172 +msgid "Are you sure you want to remove the selected items from your Library?" +msgstr "" + #: ../src/Jamendo/Banshee.Jamendo/JamendoDownloadManager.cs:62 msgid "Jamendo Downloads" msgstr "" @@ -750,11 +810,6 @@ msgid "Downloading Lyrics" msgstr "" -#: ../src/Lyrics/Banshee.Lyrics/Banshee.Lyrics/LyricsDownloadJob.cs:61 -#, csharp-format -msgid "{0} - {1}" -msgstr "" - #: ../src/Lyrics/Banshee.Lyrics/Banshee.Lyrics/LyricsService.cs:171 msgid "L_yrics" msgstr "" @@ -849,6 +904,7 @@ msgstr "" #: ../src/Mirage/Banshee.Mirage/MiragePlugin.cs:265 +#: ../src/Mirage/Banshee.Mirage/MiragePlugin.cs:307 msgid "Reset Mirage" msgstr "" @@ -870,6 +926,18 @@ msgid "Scan for Duplicates" msgstr "" +#: ../src/Mirage/Banshee.Mirage/MiragePlugin.cs:305 +msgid "" +"Do you really want to reset the Mirage Extension?\n" +"All extracted information will be lost. Your music will have to be re-analyzed to use Mirage again." +msgstr "" + +#: ../src/Mirage/Banshee.Mirage/MiragePlugin.cs:318 +msgid "" +"Mirage was reset. Your music will have to be re-analyzed to use Mirage " +"again." +msgstr "" + #: ../src/Mirage/Banshee.Mirage/RandomBySimilar.cs:54 msgid "Shuffle by Similar" msgstr "" @@ -979,27 +1047,27 @@ msgid "www.xiph.org {0} stations available." msgstr "" -#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmSimilarArtists.cs:66 +#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmSimilarArtists.cs:67 msgid "Shuffle by similar Artists (via Lastfm)" msgstr "" -#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmSimilarArtists.cs:67 +#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmSimilarArtists.cs:68 msgid "by similar artists" msgstr "" -#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmSimilarArtists.cs:68 +#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmSimilarArtists.cs:69 msgid "Play songs similar to those already played (via Lastfm)" msgstr "" -#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmUserTopArtists.cs:60 +#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmUserTopArtists.cs:61 msgid "Shuffle by your Top Artists (via Lastfm)" msgstr "" -#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmUserTopArtists.cs:61 +#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmUserTopArtists.cs:62 msgid "by your top artists" msgstr "" -#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmUserTopArtists.cs:62 +#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmUserTopArtists.cs:63 msgid "Play songs from your Top Artists (via Lastfm)" msgstr "" @@ -1211,3 +1279,5 @@ #: ../src/Telepathy/Banshee.Telepathy/Banshee.Telepathy.Gui/TransferManagerUi.cs:131 msgid "Initializing" msgstr "" + + diff -Nru banshee-community-extensions-2.0.1/po/es.po banshee-community-extensions-2.2.0/po/es.po --- banshee-community-extensions-2.0.1/po/es.po 2011-03-24 19:48:38.000000000 +0000 +++ banshee-community-extensions-2.2.0/po/es.po 2011-09-19 20:36:25.000000000 +0000 @@ -1,14 +1,16 @@ # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. # +# Translators: +# freddy sequera , 2011. +# Ricardo A. Hermosilla Carrillo , 2011. msgid "" msgstr "" "Project-Id-Version: Banshee Community Extensions\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=banshee&component=Community%20Extensions\n" -"POT-Creation-Date: 2011-03-22 23:13+0100\n" -"PO-Revision-Date: 2011-03-23 00:09+0000\n" +"POT-Creation-Date: 2011-09-08 21:22+0200\n" +"PO-Revision-Date: 2011-09-09 00:16+0000\n" "Last-Translator: nemecis1000 \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" @@ -106,17 +108,29 @@ msgid "Start Timer" msgstr "" +#: ../src/AlbumArtWriter/Banshee.AlbumArtWriter/AlbumArtWriterJob.cs:48 +msgid "Saving Cover Art To Album folders" +msgstr "" + +#: ../src/AlbumArtWriter/Banshee.AlbumArtWriter/AlbumArtWriterJob.cs:99 +#: ../src/Lyrics/Banshee.Lyrics/Banshee.Lyrics/LyricsDownloadJob.cs:61 +#, csharp-format +msgid "{0} - {1}" +msgstr "{0} - {1}" + #: ../src/Ampache/Banshee.Ampache/Gui/AmpacheView.cs:73 msgid "Connect" msgstr "Conectar" #: ../src/Ampache/Banshee.Ampache/Gui/AmpacheView.cs:85 #: ../src/Ampache/Banshee.Ampache/Gui/AmpacheView.cs:92 +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:73 msgid "Artist" msgstr "Artista" #: ../src/Ampache/Banshee.Ampache/Gui/AmpacheView.cs:87 #: ../src/Ampache/Banshee.Ampache/Gui/AmpacheView.cs:93 +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:74 msgid "Album" msgstr "Álbum" @@ -155,6 +169,7 @@ msgstr "_Cerrar" #: ../src/AppIndicator/Banshee.AppIndicator/AppIndicatorService.cs:133 +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/DuplicateSongDetectorSource.cs:50 msgid "Close" msgstr "Cerrar" @@ -204,7 +219,7 @@ msgid "Skip this item" msgstr "Saltar este elemento" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowContents.cs:263 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowContents.cs:269 msgid "Track list" msgstr "Lista de pistas" @@ -221,30 +236,20 @@ "arrastrados. Valores altos significan desplazamiento más rápido" #: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:57 -msgid "Enable threaded loading of artwork" -msgstr "Habilitar la carga hilada del arte de portada" - -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:58 -msgid "If enabled ClutterFlow will use threading to load it's artwork" -msgstr "" -"Si ClutterFlow está habilitado, se utilizará la hilación para cargar el arte" -" de portada" - -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:64 msgid "Unfolds the track list" msgstr "Despliega la lista de pistas" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:65 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:58 msgid "If checked it will display the track list when not in fullscreen mode" msgstr "" "Si está seleccionado, mostrará la lista de pistas cuando no esté en modo " "pantalla completa" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:85 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:78 msgid "Immediately apply playback mode changes" msgstr "Inmediatamente aplicar los cambios al modo de reproducción" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:86 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:79 msgid "" "Starts playing a new song immediately after the playback mode changed (Party" " Mode or Album Mode)" @@ -252,21 +257,21 @@ "Comenzar inmediatamente la reproducción de una nueva canción después que el " "modo de reproducción cambió (Modo Fiesta o Modo Álbum)" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:92 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:85 msgid "Display album _label" msgstr "Mostrar etiqueta del á_lbum" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:93 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:86 msgid "Wether or not the album label needs to be shown above the artwork" msgstr "" "Sea o no la etiqueta álbum tiene que ser demostrado por encima de la obra de" " arte" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:99 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:92 msgid "Display track _title" msgstr "Mostrar _título de la pista" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:100 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:93 msgid "" "Wether or not the album title needs to be shown above the artwork in " "fullscreen mode" @@ -274,65 +279,119 @@ "Sea o no el título del álbum tiene que ser demostrado por encima de la obra " "de arte en el modo de pantalla completa" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:106 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:99 msgid "Texture size in pixels" msgstr "Texturizar tamaño en píxeles" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:107 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:100 msgid "The in-memory size of the cover textures in pixels" msgstr "Tamaño en memoria de las texturas de las portadas en píxeles" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:113 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:106 msgid "Minimal cover size in pixels" msgstr "Tamaño mínimo de las portadas en píxeles" +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:107 #: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:114 -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:121 msgid "The on-stage minimal cover size in pixels" msgstr "Tamaño mínimo de la portada en mostrador en píxeles" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:120 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:113 msgid "Maximal cover size in pixels" msgstr "Tamaño máximo de la portada en píxeles" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:127 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:120 msgid "Number of visible covers at the side" msgstr "Número de portadas visibles" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:128 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:121 msgid "" "The number of covers that need to be displayed on the stage (at one side)" msgstr "" "Número de portadas que necesitan ser mostradas en el mostrador (a un lado)" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:134 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:127 msgid "Sort covers by" msgstr "Ordenar portadas por" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:135 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:128 msgid "Selects on what basis covers should be sorted" msgstr "Selecciona en qué orden mostrar las portadas" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:231 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:180 msgid "Show ClutterFlow Browser" msgstr "Mostrar navegador ClutterFlow" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:232 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:181 msgid "Show or hide the ClutterFlow browser" msgstr "Mostrar u ocultar el navegador ClutterFlow" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:325 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:277 msgid "ClutterFlow" msgstr "ClutterFlow" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:328 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:280 msgid "General" msgstr "General" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:337 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:288 msgid "Dimensions" msgstr "Dimensiones" +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:383 +msgid "" +"For changes to these values to take effect, you need to restart Banshee" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/DuplicateSongDetectorAction.cs:46 +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/DuplicateSongDetectorAction.cs:49 +msgid "Detect Duplicate Songs" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/DuplicateSongDetectorSource.cs:45 +msgid "Duplicate Song Detector" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/DuplicateSongDetectorSource.cs:55 +msgid "Refresh" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:61 +msgid "Remove Selected Songs" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:64 +msgid "Delete Selected Songs" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:71 +msgid "Select" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:72 +msgid "Song Title" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:75 +msgid "File" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:164 +msgid "Are you sure you want to permanently delete the selected items?" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:166 +msgid "If you delete the selection, it will be permanently lost." +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:170 +msgid "Remove selection from Library?" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:172 +msgid "Are you sure you want to remove the selected items from your Library?" +msgstr "" + #: ../src/Jamendo/Banshee.Jamendo/JamendoDownloadManager.cs:62 msgid "Jamendo Downloads" msgstr "Descargas Jamendo" @@ -772,11 +831,6 @@ msgid "Downloading Lyrics" msgstr "Descargando letras" -#: ../src/Lyrics/Banshee.Lyrics/Banshee.Lyrics/LyricsDownloadJob.cs:61 -#, csharp-format -msgid "{0} - {1}" -msgstr "{0} - {1}" - #: ../src/Lyrics/Banshee.Lyrics/Banshee.Lyrics/LyricsService.cs:171 msgid "L_yrics" msgstr "L_etras de Canciones" @@ -875,6 +929,7 @@ msgstr "Busca en tu biblioteca de música posibles duplicados" #: ../src/Mirage/Banshee.Mirage/MiragePlugin.cs:265 +#: ../src/Mirage/Banshee.Mirage/MiragePlugin.cs:307 msgid "Reset Mirage" msgstr "Restablecer Mirage" @@ -903,6 +958,18 @@ msgid "Scan for Duplicates" msgstr "Analizar en busca de duplicados" +#: ../src/Mirage/Banshee.Mirage/MiragePlugin.cs:305 +msgid "" +"Do you really want to reset the Mirage Extension?\n" +"All extracted information will be lost. Your music will have to be re-analyzed to use Mirage again." +msgstr "" + +#: ../src/Mirage/Banshee.Mirage/MiragePlugin.cs:318 +msgid "" +"Mirage was reset. Your music will have to be re-analyzed to use Mirage " +"again." +msgstr "" + #: ../src/Mirage/Banshee.Mirage/RandomBySimilar.cs:54 msgid "Shuffle by Similar" msgstr "Shuffle similares" @@ -1017,27 +1084,27 @@ msgid "www.xiph.org {0} stations available." msgstr "www.xiph.org {0} las emisoras disponibles." -#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmSimilarArtists.cs:66 +#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmSimilarArtists.cs:67 msgid "Shuffle by similar Artists (via Lastfm)" msgstr "" -#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmSimilarArtists.cs:67 +#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmSimilarArtists.cs:68 msgid "by similar artists" msgstr "" -#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmSimilarArtists.cs:68 +#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmSimilarArtists.cs:69 msgid "Play songs similar to those already played (via Lastfm)" msgstr "Escuchar similares a los ya jugados (a través de Lastfm) canciones" -#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmUserTopArtists.cs:60 +#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmUserTopArtists.cs:61 msgid "Shuffle by your Top Artists (via Lastfm)" msgstr "" -#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmUserTopArtists.cs:61 +#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmUserTopArtists.cs:62 msgid "by your top artists" msgstr "por su mejores artistas" -#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmUserTopArtists.cs:62 +#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmUserTopArtists.cs:63 msgid "Play songs from your Top Artists (via Lastfm)" msgstr "" @@ -1252,3 +1319,5 @@ #: ../src/Telepathy/Banshee.Telepathy/Banshee.Telepathy.Gui/TransferManagerUi.cs:131 msgid "Initializing" msgstr "Inicialización" + + diff -Nru banshee-community-extensions-2.0.1/po/fi.po banshee-community-extensions-2.2.0/po/fi.po --- banshee-community-extensions-2.0.1/po/fi.po 2011-03-24 19:48:38.000000000 +0000 +++ banshee-community-extensions-2.2.0/po/fi.po 2011-09-19 20:36:19.000000000 +0000 @@ -1,14 +1,15 @@ # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. # +# Translators: +# Bertrand Lorentz , 2011. msgid "" msgstr "" "Project-Id-Version: Banshee Community Extensions\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=banshee&component=Community%20Extensions\n" -"POT-Creation-Date: 2011-03-22 23:13+0100\n" -"PO-Revision-Date: 2011-03-23 00:09+0000\n" +"POT-Creation-Date: 2011-09-08 21:22+0200\n" +"PO-Revision-Date: 2011-09-09 00:16+0000\n" "Last-Translator: bl8 \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" @@ -106,17 +107,29 @@ msgid "Start Timer" msgstr "" +#: ../src/AlbumArtWriter/Banshee.AlbumArtWriter/AlbumArtWriterJob.cs:48 +msgid "Saving Cover Art To Album folders" +msgstr "" + +#: ../src/AlbumArtWriter/Banshee.AlbumArtWriter/AlbumArtWriterJob.cs:99 +#: ../src/Lyrics/Banshee.Lyrics/Banshee.Lyrics/LyricsDownloadJob.cs:61 +#, csharp-format +msgid "{0} - {1}" +msgstr "" + #: ../src/Ampache/Banshee.Ampache/Gui/AmpacheView.cs:73 msgid "Connect" msgstr "" #: ../src/Ampache/Banshee.Ampache/Gui/AmpacheView.cs:85 #: ../src/Ampache/Banshee.Ampache/Gui/AmpacheView.cs:92 +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:73 msgid "Artist" msgstr "" #: ../src/Ampache/Banshee.Ampache/Gui/AmpacheView.cs:87 #: ../src/Ampache/Banshee.Ampache/Gui/AmpacheView.cs:93 +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:74 msgid "Album" msgstr "" @@ -155,6 +168,7 @@ msgstr "_Sulje" #: ../src/AppIndicator/Banshee.AppIndicator/AppIndicatorService.cs:133 +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/DuplicateSongDetectorSource.cs:50 msgid "Close" msgstr "" @@ -202,7 +216,7 @@ msgid "Skip this item" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowContents.cs:263 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowContents.cs:269 msgid "Track list" msgstr "" @@ -217,107 +231,153 @@ msgstr "" #: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:57 -msgid "Enable threaded loading of artwork" -msgstr "" - -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:58 -msgid "If enabled ClutterFlow will use threading to load it's artwork" -msgstr "" - -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:64 msgid "Unfolds the track list" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:65 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:58 msgid "If checked it will display the track list when not in fullscreen mode" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:85 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:78 msgid "Immediately apply playback mode changes" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:86 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:79 msgid "" "Starts playing a new song immediately after the playback mode changed (Party" " Mode or Album Mode)" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:92 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:85 msgid "Display album _label" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:93 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:86 msgid "Wether or not the album label needs to be shown above the artwork" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:99 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:92 msgid "Display track _title" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:100 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:93 msgid "" "Wether or not the album title needs to be shown above the artwork in " "fullscreen mode" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:106 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:99 msgid "Texture size in pixels" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:107 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:100 msgid "The in-memory size of the cover textures in pixels" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:113 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:106 msgid "Minimal cover size in pixels" msgstr "" +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:107 #: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:114 -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:121 msgid "The on-stage minimal cover size in pixels" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:120 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:113 msgid "Maximal cover size in pixels" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:127 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:120 msgid "Number of visible covers at the side" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:128 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:121 msgid "" "The number of covers that need to be displayed on the stage (at one side)" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:134 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:127 msgid "Sort covers by" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:135 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:128 msgid "Selects on what basis covers should be sorted" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:231 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:180 msgid "Show ClutterFlow Browser" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:232 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:181 msgid "Show or hide the ClutterFlow browser" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:325 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:277 msgid "ClutterFlow" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:328 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:280 msgid "General" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:337 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:288 msgid "Dimensions" msgstr "" +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:383 +msgid "" +"For changes to these values to take effect, you need to restart Banshee" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/DuplicateSongDetectorAction.cs:46 +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/DuplicateSongDetectorAction.cs:49 +msgid "Detect Duplicate Songs" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/DuplicateSongDetectorSource.cs:45 +msgid "Duplicate Song Detector" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/DuplicateSongDetectorSource.cs:55 +msgid "Refresh" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:61 +msgid "Remove Selected Songs" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:64 +msgid "Delete Selected Songs" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:71 +msgid "Select" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:72 +msgid "Song Title" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:75 +msgid "File" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:164 +msgid "Are you sure you want to permanently delete the selected items?" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:166 +msgid "If you delete the selection, it will be permanently lost." +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:170 +msgid "Remove selection from Library?" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:172 +msgid "Are you sure you want to remove the selected items from your Library?" +msgstr "" + #: ../src/Jamendo/Banshee.Jamendo/JamendoDownloadManager.cs:62 msgid "Jamendo Downloads" msgstr "" @@ -750,11 +810,6 @@ msgid "Downloading Lyrics" msgstr "" -#: ../src/Lyrics/Banshee.Lyrics/Banshee.Lyrics/LyricsDownloadJob.cs:61 -#, csharp-format -msgid "{0} - {1}" -msgstr "" - #: ../src/Lyrics/Banshee.Lyrics/Banshee.Lyrics/LyricsService.cs:171 msgid "L_yrics" msgstr "" @@ -849,6 +904,7 @@ msgstr "" #: ../src/Mirage/Banshee.Mirage/MiragePlugin.cs:265 +#: ../src/Mirage/Banshee.Mirage/MiragePlugin.cs:307 msgid "Reset Mirage" msgstr "" @@ -870,6 +926,18 @@ msgid "Scan for Duplicates" msgstr "" +#: ../src/Mirage/Banshee.Mirage/MiragePlugin.cs:305 +msgid "" +"Do you really want to reset the Mirage Extension?\n" +"All extracted information will be lost. Your music will have to be re-analyzed to use Mirage again." +msgstr "" + +#: ../src/Mirage/Banshee.Mirage/MiragePlugin.cs:318 +msgid "" +"Mirage was reset. Your music will have to be re-analyzed to use Mirage " +"again." +msgstr "" + #: ../src/Mirage/Banshee.Mirage/RandomBySimilar.cs:54 msgid "Shuffle by Similar" msgstr "" @@ -983,27 +1051,27 @@ msgid "www.xiph.org {0} stations available." msgstr "www.xiph.org {0} asemaa tarjolla." -#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmSimilarArtists.cs:66 +#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmSimilarArtists.cs:67 msgid "Shuffle by similar Artists (via Lastfm)" msgstr "" -#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmSimilarArtists.cs:67 +#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmSimilarArtists.cs:68 msgid "by similar artists" msgstr "" -#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmSimilarArtists.cs:68 +#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmSimilarArtists.cs:69 msgid "Play songs similar to those already played (via Lastfm)" msgstr "" -#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmUserTopArtists.cs:60 +#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmUserTopArtists.cs:61 msgid "Shuffle by your Top Artists (via Lastfm)" msgstr "" -#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmUserTopArtists.cs:61 +#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmUserTopArtists.cs:62 msgid "by your top artists" msgstr "" -#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmUserTopArtists.cs:62 +#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmUserTopArtists.cs:63 msgid "Play songs from your Top Artists (via Lastfm)" msgstr "" @@ -1219,3 +1287,5 @@ #: ../src/Telepathy/Banshee.Telepathy/Banshee.Telepathy.Gui/TransferManagerUi.cs:131 msgid "Initializing" msgstr "" + + diff -Nru banshee-community-extensions-2.0.1/po/fr.po banshee-community-extensions-2.2.0/po/fr.po --- banshee-community-extensions-2.0.1/po/fr.po 2011-03-24 19:48:38.000000000 +0000 +++ banshee-community-extensions-2.2.0/po/fr.po 2011-09-19 20:36:03.000000000 +0000 @@ -1,14 +1,17 @@ # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. # +# Translators: +# Bertrand Lorentz , 2011. +# G37 , 2011. +# olivier dufour , 2011. msgid "" msgstr "" "Project-Id-Version: Banshee Community Extensions\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=banshee&component=Community%20Extensions\n" -"POT-Creation-Date: 2011-03-22 23:13+0100\n" -"PO-Revision-Date: 2011-03-24 19:32+0000\n" +"POT-Creation-Date: 2011-09-08 21:22+0200\n" +"PO-Revision-Date: 2011-09-09 00:16+0000\n" "Last-Translator: bl8 \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" @@ -106,17 +109,29 @@ msgid "Start Timer" msgstr "Démarrer le minuteur" +#: ../src/AlbumArtWriter/Banshee.AlbumArtWriter/AlbumArtWriterJob.cs:48 +msgid "Saving Cover Art To Album folders" +msgstr "" + +#: ../src/AlbumArtWriter/Banshee.AlbumArtWriter/AlbumArtWriterJob.cs:99 +#: ../src/Lyrics/Banshee.Lyrics/Banshee.Lyrics/LyricsDownloadJob.cs:61 +#, csharp-format +msgid "{0} - {1}" +msgstr "{0} - {1}" + #: ../src/Ampache/Banshee.Ampache/Gui/AmpacheView.cs:73 msgid "Connect" msgstr "Connecter" #: ../src/Ampache/Banshee.Ampache/Gui/AmpacheView.cs:85 #: ../src/Ampache/Banshee.Ampache/Gui/AmpacheView.cs:92 +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:73 msgid "Artist" msgstr "Artiste" #: ../src/Ampache/Banshee.Ampache/Gui/AmpacheView.cs:87 #: ../src/Ampache/Banshee.Ampache/Gui/AmpacheView.cs:93 +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:74 msgid "Album" msgstr "Album" @@ -155,6 +170,7 @@ msgstr "_Fermer" #: ../src/AppIndicator/Banshee.AppIndicator/AppIndicatorService.cs:133 +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/DuplicateSongDetectorSource.cs:50 msgid "Close" msgstr "Fermer" @@ -204,7 +220,7 @@ msgid "Skip this item" msgstr "Sauter cet élément" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowContents.cs:263 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowContents.cs:269 msgid "Track list" msgstr "Liste des pistes" @@ -221,30 +237,20 @@ "plus la valeur est grande plus le défilement est rapide" #: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:57 -msgid "Enable threaded loading of artwork" -msgstr "Activer le chargement asynchrone des illustrations" - -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:58 -msgid "If enabled ClutterFlow will use threading to load it's artwork" -msgstr "" -"Si cette option est activée, ClutterFlow chargera les illustrations en tache" -" de fonds." - -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:64 msgid "Unfolds the track list" msgstr "Déployer la liste des pistes" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:65 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:58 msgid "If checked it will display the track list when not in fullscreen mode" msgstr "" "Si coché, la liste des pistes est affichée lorsque l'on n'est pas en mode " "plein écran" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:85 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:78 msgid "Immediately apply playback mode changes" msgstr "Appliquer immédiatement les changements de mode de lecture" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:86 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:79 msgid "" "Starts playing a new song immediately after the playback mode changed (Party" " Mode or Album Mode)" @@ -252,20 +258,20 @@ "Commence à lire un nouveau morceau immédiatement après le changement de mode" " de lecture (mode Album ou Mode fête)" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:92 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:85 msgid "Display album _label" msgstr "Afficher le _nom de l'album" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:93 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:86 msgid "Wether or not the album label needs to be shown above the artwork" msgstr "" "Si oui ou non le nom de l'album doit être montré au-dessus de la couverture" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:99 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:92 msgid "Display track _title" msgstr "Afficher le _titre de la piste" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:100 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:93 msgid "" "Wether or not the album title needs to be shown above the artwork in " "fullscreen mode" @@ -273,65 +279,119 @@ "Si oui ou non le titre de l'album doit être montré au dessus de la " "couverture en mode plein écran" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:106 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:99 msgid "Texture size in pixels" msgstr "Taille de la texture en pixels" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:107 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:100 msgid "The in-memory size of the cover textures in pixels" msgstr "La taille en mémoire des textures de la pochette en pixels" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:113 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:106 msgid "Minimal cover size in pixels" msgstr "Taille minimal de la pochette en pixels" +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:107 #: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:114 -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:121 msgid "The on-stage minimal cover size in pixels" msgstr "La taille minimale de la pochette en pixels" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:120 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:113 msgid "Maximal cover size in pixels" msgstr "La taille maximale de la pochette en pixels" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:127 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:120 msgid "Number of visible covers at the side" msgstr "Nombre de pochettes visibles sur le côté" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:128 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:121 msgid "" "The number of covers that need to be displayed on the stage (at one side)" msgstr "" "Le nombre de pochettes qui doivent être affichées sur la scène (d'un côté)" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:134 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:127 msgid "Sort covers by" msgstr "Trier les pochettes par" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:135 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:128 msgid "Selects on what basis covers should be sorted" msgstr "Sélectionner sur quelle base les pochettes doivent être triées" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:231 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:180 msgid "Show ClutterFlow Browser" msgstr "Montrer le navigateur ClutterFlow" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:232 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:181 msgid "Show or hide the ClutterFlow browser" msgstr "Afficher ou masquer le navigateur ClutterFlow" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:325 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:277 msgid "ClutterFlow" msgstr "ClutterFlow" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:328 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:280 msgid "General" msgstr "Général" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:337 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:288 msgid "Dimensions" msgstr "Dimensions" +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:383 +msgid "" +"For changes to these values to take effect, you need to restart Banshee" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/DuplicateSongDetectorAction.cs:46 +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/DuplicateSongDetectorAction.cs:49 +msgid "Detect Duplicate Songs" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/DuplicateSongDetectorSource.cs:45 +msgid "Duplicate Song Detector" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/DuplicateSongDetectorSource.cs:55 +msgid "Refresh" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:61 +msgid "Remove Selected Songs" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:64 +msgid "Delete Selected Songs" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:71 +msgid "Select" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:72 +msgid "Song Title" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:75 +msgid "File" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:164 +msgid "Are you sure you want to permanently delete the selected items?" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:166 +msgid "If you delete the selection, it will be permanently lost." +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:170 +msgid "Remove selection from Library?" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:172 +msgid "Are you sure you want to remove the selected items from your Library?" +msgstr "" + #: ../src/Jamendo/Banshee.Jamendo/JamendoDownloadManager.cs:62 msgid "Jamendo Downloads" msgstr "Téléchargements Jamendo " @@ -783,11 +843,6 @@ msgid "Downloading Lyrics" msgstr "Téléchargement des paroles" -#: ../src/Lyrics/Banshee.Lyrics/Banshee.Lyrics/LyricsDownloadJob.cs:61 -#, csharp-format -msgid "{0} - {1}" -msgstr "{0} - {1}" - #: ../src/Lyrics/Banshee.Lyrics/Banshee.Lyrics/LyricsService.cs:171 msgid "L_yrics" msgstr "_Paroles" @@ -888,6 +943,7 @@ "Recherches dans votre bibliothèque pour trouver des doublons éventuels" #: ../src/Mirage/Banshee.Mirage/MiragePlugin.cs:265 +#: ../src/Mirage/Banshee.Mirage/MiragePlugin.cs:307 msgid "Reset Mirage" msgstr "Réinitialiser Mirage" @@ -916,6 +972,18 @@ msgid "Scan for Duplicates" msgstr "Recherche de doublons" +#: ../src/Mirage/Banshee.Mirage/MiragePlugin.cs:305 +msgid "" +"Do you really want to reset the Mirage Extension?\n" +"All extracted information will be lost. Your music will have to be re-analyzed to use Mirage again." +msgstr "" + +#: ../src/Mirage/Banshee.Mirage/MiragePlugin.cs:318 +msgid "" +"Mirage was reset. Your music will have to be re-analyzed to use Mirage " +"again." +msgstr "" + #: ../src/Mirage/Banshee.Mirage/RandomBySimilar.cs:54 msgid "Shuffle by Similar" msgstr "Mélanger par similitude" @@ -1028,27 +1096,27 @@ msgid "www.xiph.org {0} stations available." msgstr "www.xiph.org {0} stations disponibles." -#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmSimilarArtists.cs:66 +#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmSimilarArtists.cs:67 msgid "Shuffle by similar Artists (via Lastfm)" msgstr "Mélanger par artistes similaires (via Lastfm)" -#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmSimilarArtists.cs:67 +#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmSimilarArtists.cs:68 msgid "by similar artists" msgstr "par artistes similaires" -#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmSimilarArtists.cs:68 +#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmSimilarArtists.cs:69 msgid "Play songs similar to those already played (via Lastfm)" msgstr "Ecouter des morceaux similaires à celles déjà jouées (via Lastfm)" -#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmUserTopArtists.cs:60 +#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmUserTopArtists.cs:61 msgid "Shuffle by your Top Artists (via Lastfm)" msgstr "Mélanger par vos artistes préférés (via Lastfm)" -#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmUserTopArtists.cs:61 +#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmUserTopArtists.cs:62 msgid "by your top artists" msgstr "par vos artistes préférés" -#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmUserTopArtists.cs:62 +#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmUserTopArtists.cs:63 msgid "Play songs from your Top Artists (via Lastfm)" msgstr "Ecouter les morceaux de vos artistes préférés (via Lastfm)" @@ -1270,3 +1338,5 @@ #: ../src/Telepathy/Banshee.Telepathy/Banshee.Telepathy.Gui/TransferManagerUi.cs:131 msgid "Initializing" msgstr "Initialisation en cours" + + diff -Nru banshee-community-extensions-2.0.1/po/it.po banshee-community-extensions-2.2.0/po/it.po --- banshee-community-extensions-2.0.1/po/it.po 2011-04-04 20:39:00.000000000 +0000 +++ banshee-community-extensions-2.2.0/po/it.po 2011-09-19 20:36:14.000000000 +0000 @@ -1,14 +1,16 @@ # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. # +# Translators: +# Bertrand Lorentz , 2011. +# Gianvito Cavasoli , 2010, 2011. msgid "" msgstr "" "Project-Id-Version: Banshee Community Extensions\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=banshee&component=Community%20Extensions\n" -"POT-Creation-Date: 2011-03-22 23:13+0100\n" -"PO-Revision-Date: 2011-04-03 15:21+0000\n" +"POT-Creation-Date: 2011-09-08 21:22+0200\n" +"PO-Revision-Date: 2011-09-15 08:26+0000\n" "Last-Translator: Janvitus \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" @@ -106,17 +108,29 @@ msgid "Start Timer" msgstr "Avvia sveglia" +#: ../src/AlbumArtWriter/Banshee.AlbumArtWriter/AlbumArtWriterJob.cs:48 +msgid "Saving Cover Art To Album folders" +msgstr "Salvataggio copertina per le cartelle degli album" + +#: ../src/AlbumArtWriter/Banshee.AlbumArtWriter/AlbumArtWriterJob.cs:99 +#: ../src/Lyrics/Banshee.Lyrics/Banshee.Lyrics/LyricsDownloadJob.cs:61 +#, csharp-format +msgid "{0} - {1}" +msgstr "{0} - {1}" + #: ../src/Ampache/Banshee.Ampache/Gui/AmpacheView.cs:73 msgid "Connect" msgstr "Connetti" #: ../src/Ampache/Banshee.Ampache/Gui/AmpacheView.cs:85 #: ../src/Ampache/Banshee.Ampache/Gui/AmpacheView.cs:92 +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:73 msgid "Artist" msgstr "Artista" #: ../src/Ampache/Banshee.Ampache/Gui/AmpacheView.cs:87 #: ../src/Ampache/Banshee.Ampache/Gui/AmpacheView.cs:93 +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:74 msgid "Album" msgstr "Album" @@ -155,6 +169,7 @@ msgstr "_Chiudi" #: ../src/AppIndicator/Banshee.AppIndicator/AppIndicatorService.cs:133 +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/DuplicateSongDetectorSource.cs:50 msgid "Close" msgstr "Chiude" @@ -204,7 +219,7 @@ msgid "Skip this item" msgstr "Salta questo elemento" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowContents.cs:263 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowContents.cs:269 msgid "Track list" msgstr "Elenco tracce" @@ -221,28 +236,20 @@ "valore alto significa uno scorrimento veloce" #: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:57 -msgid "Enable threaded loading of artwork" -msgstr "Abilitare il caricamento dell'elenco delle copertine" - -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:58 -msgid "If enabled ClutterFlow will use threading to load it's artwork" -msgstr "Se abilitata ClutterFlow userà l'elenco per caricare le copertine" - -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:64 msgid "Unfolds the track list" msgstr "Spiega l'elenco delle tracce" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:65 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:58 msgid "If checked it will display the track list when not in fullscreen mode" msgstr "" -"Se impostata verrà mostrato l'elenco delle tracce quando non si è a schermo " +"Se impostata sarà mostrato l'elenco delle tracce quando non si è a schermo " "intero" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:85 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:78 msgid "Immediately apply playback mode changes" msgstr "Applicare immediatamente le modifiche alla modalità di riproduzione" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:86 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:79 msgid "" "Starts playing a new song immediately after the playback mode changed (Party" " Mode or Album Mode)" @@ -250,19 +257,19 @@ "Avvia la riproduzione di un nuovo brano immediatamente dopo le modifiche " "alla modalità di riproduzione (modalità party o modalità album)" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:92 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:85 msgid "Display album _label" msgstr "Mostrare l'_etichetta dell'album" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:93 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:86 msgid "Wether or not the album label needs to be shown above the artwork" msgstr "Indica se mostrare o no l'etichetta dell'album sopra la copertina" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:99 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:92 msgid "Display track _title" msgstr "Mostrare _titolo della traccia" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:100 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:93 msgid "" "Wether or not the album title needs to be shown above the artwork in " "fullscreen mode" @@ -270,65 +277,121 @@ "Indica se mostrare o no il titolo della traccia sopra la copertina nella " "modalità a schermo intero" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:106 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:99 msgid "Texture size in pixels" msgstr "Dimensione delle texture in pixel" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:107 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:100 msgid "The in-memory size of the cover textures in pixels" msgstr "La dimensione in memoria delle texture in pixel della copertina" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:113 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:106 msgid "Minimal cover size in pixels" msgstr "Dimensione minima della copertina in pixel" +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:107 #: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:114 -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:121 msgid "The on-stage minimal cover size in pixels" msgstr "La dimensione minima della copertina sul palco in pixel" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:120 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:113 msgid "Maximal cover size in pixels" msgstr "Dimensione massima della copertina in pixel" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:127 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:120 msgid "Number of visible covers at the side" msgstr "Numero di copertine visibili sul lato" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:128 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:121 msgid "" "The number of covers that need to be displayed on the stage (at one side)" msgstr "" "Il numero di copertine che devono essere mostrare sul palco (su ogni lato)" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:134 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:127 msgid "Sort covers by" msgstr "Ordina copertine per" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:135 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:128 msgid "Selects on what basis covers should be sorted" msgstr "Seleziona su quali basi le copertine devono essere ordinate" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:231 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:180 msgid "Show ClutterFlow Browser" msgstr "Mostra esploratore ClutterFlow" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:232 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:181 msgid "Show or hide the ClutterFlow browser" msgstr "Mostra o nasconde l'esploratore di ClutterFlow" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:325 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:277 msgid "ClutterFlow" msgstr "ClutterFlow" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:328 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:280 msgid "General" msgstr "Generale" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:337 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:288 msgid "Dimensions" msgstr "Dimensioni" +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:383 +msgid "" +"For changes to these values to take effect, you need to restart Banshee" +msgstr "" +"Per applicare le modifiche effettuate a questi valori, è necessario " +"riavviare Banshee" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/DuplicateSongDetectorAction.cs:46 +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/DuplicateSongDetectorAction.cs:49 +msgid "Detect Duplicate Songs" +msgstr "Rileva brani duplicati" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/DuplicateSongDetectorSource.cs:45 +msgid "Duplicate Song Detector" +msgstr "Rilevatore brani dup0licati" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/DuplicateSongDetectorSource.cs:55 +msgid "Refresh" +msgstr "Ricarica" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:61 +msgid "Remove Selected Songs" +msgstr "Rimuovi brani selezionati" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:64 +msgid "Delete Selected Songs" +msgstr "Elimina brani selezionati" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:71 +msgid "Select" +msgstr "Seleziona" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:72 +msgid "Song Title" +msgstr "Titolo brano" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:75 +msgid "File" +msgstr "File" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:164 +msgid "Are you sure you want to permanently delete the selected items?" +msgstr "Eliminare permanentemente l'elemento selezionato?" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:166 +msgid "If you delete the selection, it will be permanently lost." +msgstr "Se si elimina la selezione, questa sarà persa definitivamente." + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:170 +msgid "Remove selection from Library?" +msgstr "Rimuovere la selezione dalla collezione?" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:172 +msgid "Are you sure you want to remove the selected items from your Library?" +msgstr "Rimuovere gli elementi selezionati dalla collezione?" + #: ../src/Jamendo/Banshee.Jamendo/JamendoDownloadManager.cs:62 msgid "Jamendo Downloads" msgstr "Scaricamenti Jamendo" @@ -779,11 +842,6 @@ msgid "Downloading Lyrics" msgstr "Scaricamento testi" -#: ../src/Lyrics/Banshee.Lyrics/Banshee.Lyrics/LyricsDownloadJob.cs:61 -#, csharp-format -msgid "{0} - {1}" -msgstr "{0} - {1}" - #: ../src/Lyrics/Banshee.Lyrics/Banshee.Lyrics/LyricsService.cs:171 msgid "L_yrics" msgstr "_Testi" @@ -882,6 +940,7 @@ msgstr "Cerca nella collezione musicale per possibili duplicati" #: ../src/Mirage/Banshee.Mirage/MiragePlugin.cs:265 +#: ../src/Mirage/Banshee.Mirage/MiragePlugin.cs:307 msgid "Reset Mirage" msgstr "Azzera Mirage" @@ -909,6 +968,22 @@ msgid "Scan for Duplicates" msgstr "Scansiona per i duplicati" +#: ../src/Mirage/Banshee.Mirage/MiragePlugin.cs:305 +msgid "" +"Do you really want to reset the Mirage Extension?\n" +"All extracted information will be lost. Your music will have to be re-analyzed to use Mirage again." +msgstr "" +"Azzerare l'estensione Mirage?\n" +"Tutte le informazioni estratte saranno perse. La musica dovrà essere rianalizzata per usare di nuovo questa estensione." + +#: ../src/Mirage/Banshee.Mirage/MiragePlugin.cs:318 +msgid "" +"Mirage was reset. Your music will have to be re-analyzed to use Mirage " +"again." +msgstr "" +"Mirage è stata azzerata. La musica dovrà essere rianalizzata per usare di " +"nuovo questa estensione." + #: ../src/Mirage/Banshee.Mirage/RandomBySimilar.cs:54 msgid "Shuffle by Similar" msgstr "Mistra per simile" @@ -1023,27 +1098,27 @@ msgid "www.xiph.org {0} stations available." msgstr "{0} stazioni disponibili da www.xiph.org" -#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmSimilarArtists.cs:66 +#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmSimilarArtists.cs:67 msgid "Shuffle by similar Artists (via Lastfm)" msgstr "Mischia per artisti simili (via Last.fm)" -#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmSimilarArtists.cs:67 +#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmSimilarArtists.cs:68 msgid "by similar artists" msgstr "per artisti simili" -#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmSimilarArtists.cs:68 +#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmSimilarArtists.cs:69 msgid "Play songs similar to those already played (via Lastfm)" msgstr "Riproduce brani simili a quelli già riprodotti (via Last.fm)" -#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmUserTopArtists.cs:60 +#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmUserTopArtists.cs:61 msgid "Shuffle by your Top Artists (via Lastfm)" msgstr "Mischia per artisti preferiti (via Last.fm)" -#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmUserTopArtists.cs:61 +#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmUserTopArtists.cs:62 msgid "by your top artists" msgstr "per artisti preferiti" -#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmUserTopArtists.cs:62 +#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmUserTopArtists.cs:63 msgid "Play songs from your Top Artists (via Lastfm)" msgstr "Riproduce brani dai propri artisti preferiti (via Last.fm)" @@ -1264,3 +1339,5 @@ #: ../src/Telepathy/Banshee.Telepathy/Banshee.Telepathy.Gui/TransferManagerUi.cs:131 msgid "Initializing" msgstr "Inizializzazione" + + diff -Nru banshee-community-extensions-2.0.1/po/POTFILES.in banshee-community-extensions-2.2.0/po/POTFILES.in --- banshee-community-extensions-2.0.1/po/POTFILES.in 2011-03-22 20:55:07.000000000 +0000 +++ banshee-community-extensions-2.2.0/po/POTFILES.in 2011-08-25 19:44:59.000000000 +0000 @@ -6,12 +6,16 @@ src/AlarmClock/Banshee.AlarmClock/AlarmConfigDialog.cs src/AlarmClock/Banshee.AlarmClock/ConfigurationDialog.cs src/AlarmClock/Banshee.AlarmClock/SleepTimerConfigDialog.cs +src/AlbumArtWriter/Banshee.AlbumArtWriter/AlbumArtWriterJob.cs src/Ampache/Banshee.Ampache/Gui/AmpacheView.cs src/Ampache/gtk-gui/Banshee.Ampache.PreferenceView.cs src/AppIndicator/Banshee.AppIndicator/AppIndicatorService.cs src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowContents.cs src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs +src/DuplicateSongDetector/Banshee.DuplicateSongDetector/DuplicateSongDetectorAction.cs +src/DuplicateSongDetector/Banshee.DuplicateSongDetector/DuplicateSongDetectorSource.cs +src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs src/Jamendo/Banshee.Jamendo/JamendoDownloadManager.cs src/Jamendo/Banshee.Jamendo/JamendoWebBrowserShell.cs src/Karaoke/Banshee.Karaoke/Gui/ContextPage.cs diff -Nru banshee-community-extensions-2.0.1/po/pt.po banshee-community-extensions-2.2.0/po/pt.po --- banshee-community-extensions-2.0.1/po/pt.po 2011-03-24 19:48:38.000000000 +0000 +++ banshee-community-extensions-2.2.0/po/pt.po 2011-09-19 20:36:06.000000000 +0000 @@ -1,14 +1,15 @@ # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. # +# Translators: +# António Lima , 2011. msgid "" msgstr "" "Project-Id-Version: Banshee Community Extensions\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=banshee&component=Community%20Extensions\n" -"POT-Creation-Date: 2011-03-22 23:13+0100\n" -"PO-Revision-Date: 2011-03-23 00:09+0000\n" +"POT-Creation-Date: 2011-09-08 21:22+0200\n" +"PO-Revision-Date: 2011-09-09 00:16+0000\n" "Last-Translator: amrlima \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" @@ -106,17 +107,29 @@ msgid "Start Timer" msgstr "Iniciar Temporizador" +#: ../src/AlbumArtWriter/Banshee.AlbumArtWriter/AlbumArtWriterJob.cs:48 +msgid "Saving Cover Art To Album folders" +msgstr "" + +#: ../src/AlbumArtWriter/Banshee.AlbumArtWriter/AlbumArtWriterJob.cs:99 +#: ../src/Lyrics/Banshee.Lyrics/Banshee.Lyrics/LyricsDownloadJob.cs:61 +#, csharp-format +msgid "{0} - {1}" +msgstr "{0} - {1}" + #: ../src/Ampache/Banshee.Ampache/Gui/AmpacheView.cs:73 msgid "Connect" msgstr "Ligar" #: ../src/Ampache/Banshee.Ampache/Gui/AmpacheView.cs:85 #: ../src/Ampache/Banshee.Ampache/Gui/AmpacheView.cs:92 +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:73 msgid "Artist" msgstr "Artista" #: ../src/Ampache/Banshee.Ampache/Gui/AmpacheView.cs:87 #: ../src/Ampache/Banshee.Ampache/Gui/AmpacheView.cs:93 +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:74 msgid "Album" msgstr "Álbum" @@ -155,6 +168,7 @@ msgstr "Fe_char" #: ../src/AppIndicator/Banshee.AppIndicator/AppIndicatorService.cs:133 +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/DuplicateSongDetectorSource.cs:50 msgid "Close" msgstr "Fechar" @@ -204,7 +218,7 @@ msgid "Skip this item" msgstr "Saltar este item" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowContents.cs:263 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowContents.cs:269 msgid "Track list" msgstr "Lista de faixas" @@ -221,29 +235,20 @@ " mais altos significam rolamento mais rápido" #: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:57 -msgid "Enable threaded loading of artwork" -msgstr "Activar carregamento de arte com tarefas" - -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:58 -msgid "If enabled ClutterFlow will use threading to load it's artwork" -msgstr "" -"Se activado, o ClutterFlow irá utilizar tarefas para carregar a arte de capa" - -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:64 msgid "Unfolds the track list" msgstr "Desenrola a lista de faixas" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:65 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:58 msgid "If checked it will display the track list when not in fullscreen mode" msgstr "" "Se marcado, irá apresentar a lista de faixas quando não estiver em modo de " "ecrã inteiro" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:85 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:78 msgid "Immediately apply playback mode changes" msgstr "Aplicar imediatamente as alterações de modo de reprodução" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:86 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:79 msgid "" "Starts playing a new song immediately after the playback mode changed (Party" " Mode or Album Mode)" @@ -251,19 +256,19 @@ "Começa a reproduzir uma música nova imediatamente após alteração do modo de " "reprodução (Modo de Festa ou Modo de Álbum)" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:92 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:85 msgid "Display album _label" msgstr "Apresentar _etiqueta de álbum" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:93 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:86 msgid "Wether or not the album label needs to be shown above the artwork" msgstr "Se é necessário apresentar a etiqueta de álbum acima da arte de capa" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:99 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:92 msgid "Display track _title" msgstr "Apresentar _título de faixa" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:100 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:93 msgid "" "Wether or not the album title needs to be shown above the artwork in " "fullscreen mode" @@ -271,65 +276,119 @@ "Se é necessário apresentar o título de álbum acima da arte de capa no modo " "de ecrã inteiro" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:106 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:99 msgid "Texture size in pixels" msgstr "Tamanho da textura em pixeis" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:107 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:100 msgid "The in-memory size of the cover textures in pixels" msgstr "O tamanho de memória, em pixeis, das texturas de capa" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:113 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:106 msgid "Minimal cover size in pixels" msgstr "Tamanho mínimo de capa em pixeis" +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:107 #: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:114 -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:121 msgid "The on-stage minimal cover size in pixels" msgstr "O tamanho mínimo de capa em palco em pixeis" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:120 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:113 msgid "Maximal cover size in pixels" msgstr "Tamanho máximo de capa em pixeis" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:127 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:120 msgid "Number of visible covers at the side" msgstr "Número de capas visíveis no lado" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:128 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:121 msgid "" "The number of covers that need to be displayed on the stage (at one side)" msgstr "" "O número de capas que precisam de ser apresentados no palco (num lado)" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:134 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:127 msgid "Sort covers by" msgstr "Ordenar capas por" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:135 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:128 msgid "Selects on what basis covers should be sorted" msgstr "Selecciona em que base as capas devem ser ordenadas" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:231 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:180 msgid "Show ClutterFlow Browser" msgstr "Mostrar Navegador ClutterFlow" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:232 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:181 msgid "Show or hide the ClutterFlow browser" msgstr "Apresentar ou esconder o navegador ClutterFlow" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:325 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:277 msgid "ClutterFlow" msgstr "ClutterFlow" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:328 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:280 msgid "General" msgstr "Geral" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:337 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:288 msgid "Dimensions" msgstr "Dimensões" +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:383 +msgid "" +"For changes to these values to take effect, you need to restart Banshee" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/DuplicateSongDetectorAction.cs:46 +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/DuplicateSongDetectorAction.cs:49 +msgid "Detect Duplicate Songs" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/DuplicateSongDetectorSource.cs:45 +msgid "Duplicate Song Detector" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/DuplicateSongDetectorSource.cs:55 +msgid "Refresh" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:61 +msgid "Remove Selected Songs" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:64 +msgid "Delete Selected Songs" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:71 +msgid "Select" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:72 +msgid "Song Title" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:75 +msgid "File" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:164 +msgid "Are you sure you want to permanently delete the selected items?" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:166 +msgid "If you delete the selection, it will be permanently lost." +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:170 +msgid "Remove selection from Library?" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:172 +msgid "Are you sure you want to remove the selected items from your Library?" +msgstr "" + #: ../src/Jamendo/Banshee.Jamendo/JamendoDownloadManager.cs:62 msgid "Jamendo Downloads" msgstr "Transferências do Jamendo" @@ -776,11 +835,6 @@ msgid "Downloading Lyrics" msgstr "A Transferir Letra" -#: ../src/Lyrics/Banshee.Lyrics/Banshee.Lyrics/LyricsDownloadJob.cs:61 -#, csharp-format -msgid "{0} - {1}" -msgstr "{0} - {1}" - #: ../src/Lyrics/Banshee.Lyrics/Banshee.Lyrics/LyricsService.cs:171 msgid "L_yrics" msgstr "Le_tras" @@ -880,6 +934,7 @@ msgstr "Pesquisa a sua Biblioteca de Música por possíveis duplicados" #: ../src/Mirage/Banshee.Mirage/MiragePlugin.cs:265 +#: ../src/Mirage/Banshee.Mirage/MiragePlugin.cs:307 msgid "Reset Mirage" msgstr "Reiniciar o Mirage" @@ -908,6 +963,18 @@ msgid "Scan for Duplicates" msgstr "Pesquisar Duplicados" +#: ../src/Mirage/Banshee.Mirage/MiragePlugin.cs:305 +msgid "" +"Do you really want to reset the Mirage Extension?\n" +"All extracted information will be lost. Your music will have to be re-analyzed to use Mirage again." +msgstr "" + +#: ../src/Mirage/Banshee.Mirage/MiragePlugin.cs:318 +msgid "" +"Mirage was reset. Your music will have to be re-analyzed to use Mirage " +"again." +msgstr "" + #: ../src/Mirage/Banshee.Mirage/RandomBySimilar.cs:54 msgid "Shuffle by Similar" msgstr "Baralhar por Similaridade" @@ -1022,27 +1089,27 @@ msgid "www.xiph.org {0} stations available." msgstr "www.xiph.org {0} estações disponíveis." -#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmSimilarArtists.cs:66 +#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmSimilarArtists.cs:67 msgid "Shuffle by similar Artists (via Lastfm)" msgstr "Baralhar por Artistas similares (via Lastfm)" -#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmSimilarArtists.cs:67 +#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmSimilarArtists.cs:68 msgid "by similar artists" msgstr "por artistas similares" -#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmSimilarArtists.cs:68 +#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmSimilarArtists.cs:69 msgid "Play songs similar to those already played (via Lastfm)" msgstr "Reproduzir músicas semelhantes às já reproduzidas (via Lastfm)" -#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmUserTopArtists.cs:60 +#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmUserTopArtists.cs:61 msgid "Shuffle by your Top Artists (via Lastfm)" msgstr "Baralhar pelos seus Artistas de Topo (via Lastfm)" -#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmUserTopArtists.cs:61 +#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmUserTopArtists.cs:62 msgid "by your top artists" msgstr "pelos seus artistas de topo" -#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmUserTopArtists.cs:62 +#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmUserTopArtists.cs:63 msgid "Play songs from your Top Artists (via Lastfm)" msgstr "Reproduzir músicas pelos seus Artistas de Topo (via Lastfm)" @@ -1262,3 +1329,5 @@ #: ../src/Telepathy/Banshee.Telepathy/Banshee.Telepathy.Gui/TransferManagerUi.cs:131 msgid "Initializing" msgstr "A inicializar" + + diff -Nru banshee-community-extensions-2.0.1/po/ru_RU.po banshee-community-extensions-2.2.0/po/ru_RU.po --- banshee-community-extensions-2.0.1/po/ru_RU.po 2011-03-24 19:48:38.000000000 +0000 +++ banshee-community-extensions-2.2.0/po/ru_RU.po 2011-09-19 20:35:57.000000000 +0000 @@ -1,14 +1,15 @@ # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. # +# Translators: +# hammer , 2011. msgid "" msgstr "" "Project-Id-Version: Banshee Community Extensions\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=banshee&component=Community%20Extensions\n" -"POT-Creation-Date: 2011-03-22 23:13+0100\n" -"PO-Revision-Date: 2011-03-23 00:09+0000\n" +"POT-Creation-Date: 2011-09-08 21:22+0200\n" +"PO-Revision-Date: 2011-09-09 00:16+0000\n" "Last-Translator: hammer \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" @@ -106,17 +107,29 @@ msgid "Start Timer" msgstr "" +#: ../src/AlbumArtWriter/Banshee.AlbumArtWriter/AlbumArtWriterJob.cs:48 +msgid "Saving Cover Art To Album folders" +msgstr "" + +#: ../src/AlbumArtWriter/Banshee.AlbumArtWriter/AlbumArtWriterJob.cs:99 +#: ../src/Lyrics/Banshee.Lyrics/Banshee.Lyrics/LyricsDownloadJob.cs:61 +#, csharp-format +msgid "{0} - {1}" +msgstr "" + #: ../src/Ampache/Banshee.Ampache/Gui/AmpacheView.cs:73 msgid "Connect" msgstr "Подключиться" #: ../src/Ampache/Banshee.Ampache/Gui/AmpacheView.cs:85 #: ../src/Ampache/Banshee.Ampache/Gui/AmpacheView.cs:92 +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:73 msgid "Artist" msgstr "Исполнитель" #: ../src/Ampache/Banshee.Ampache/Gui/AmpacheView.cs:87 #: ../src/Ampache/Banshee.Ampache/Gui/AmpacheView.cs:93 +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:74 msgid "Album" msgstr "Альбом" @@ -155,6 +168,7 @@ msgstr "_Закрыть" #: ../src/AppIndicator/Banshee.AppIndicator/AppIndicatorService.cs:133 +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/DuplicateSongDetectorSource.cs:50 msgid "Close" msgstr "Закрыть" @@ -202,7 +216,7 @@ msgid "Skip this item" msgstr "Пропустить этот элемент" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowContents.cs:263 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowContents.cs:269 msgid "Track list" msgstr "Список дорожек" @@ -217,107 +231,153 @@ msgstr "" #: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:57 -msgid "Enable threaded loading of artwork" -msgstr "" - -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:58 -msgid "If enabled ClutterFlow will use threading to load it's artwork" -msgstr "" - -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:64 msgid "Unfolds the track list" msgstr "Развернуть список дорожек" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:65 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:58 msgid "If checked it will display the track list when not in fullscreen mode" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:85 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:78 msgid "Immediately apply playback mode changes" msgstr "Немедленно применить режим проигрывания" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:86 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:79 msgid "" "Starts playing a new song immediately after the playback mode changed (Party" " Mode or Album Mode)" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:92 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:85 msgid "Display album _label" msgstr "Показывать _метку альбома" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:93 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:86 msgid "Wether or not the album label needs to be shown above the artwork" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:99 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:92 msgid "Display track _title" msgstr "Пказывать _название дорожки" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:100 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:93 msgid "" "Wether or not the album title needs to be shown above the artwork in " "fullscreen mode" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:106 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:99 msgid "Texture size in pixels" msgstr "Размер текстуры в пикселах" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:107 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:100 msgid "The in-memory size of the cover textures in pixels" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:113 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:106 msgid "Minimal cover size in pixels" msgstr "Минимальный размер обложки в пикселах" +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:107 #: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:114 -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:121 msgid "The on-stage minimal cover size in pixels" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:120 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:113 msgid "Maximal cover size in pixels" msgstr "Мкасимальный размер обложки в пикселах" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:127 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:120 msgid "Number of visible covers at the side" msgstr "Количество отображаемых обложек на стороне" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:128 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:121 msgid "" "The number of covers that need to be displayed on the stage (at one side)" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:134 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:127 msgid "Sort covers by" msgstr "Сортировать обложки по" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:135 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:128 msgid "Selects on what basis covers should be sorted" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:231 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:180 msgid "Show ClutterFlow Browser" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:232 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:181 msgid "Show or hide the ClutterFlow browser" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:325 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:277 msgid "ClutterFlow" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:328 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:280 msgid "General" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:337 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:288 msgid "Dimensions" msgstr "Размеры" +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:383 +msgid "" +"For changes to these values to take effect, you need to restart Banshee" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/DuplicateSongDetectorAction.cs:46 +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/DuplicateSongDetectorAction.cs:49 +msgid "Detect Duplicate Songs" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/DuplicateSongDetectorSource.cs:45 +msgid "Duplicate Song Detector" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/DuplicateSongDetectorSource.cs:55 +msgid "Refresh" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:61 +msgid "Remove Selected Songs" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:64 +msgid "Delete Selected Songs" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:71 +msgid "Select" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:72 +msgid "Song Title" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:75 +msgid "File" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:164 +msgid "Are you sure you want to permanently delete the selected items?" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:166 +msgid "If you delete the selection, it will be permanently lost." +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:170 +msgid "Remove selection from Library?" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:172 +msgid "Are you sure you want to remove the selected items from your Library?" +msgstr "" + #: ../src/Jamendo/Banshee.Jamendo/JamendoDownloadManager.cs:62 msgid "Jamendo Downloads" msgstr "" @@ -750,11 +810,6 @@ msgid "Downloading Lyrics" msgstr "" -#: ../src/Lyrics/Banshee.Lyrics/Banshee.Lyrics/LyricsDownloadJob.cs:61 -#, csharp-format -msgid "{0} - {1}" -msgstr "" - #: ../src/Lyrics/Banshee.Lyrics/Banshee.Lyrics/LyricsService.cs:171 msgid "L_yrics" msgstr "" @@ -849,6 +904,7 @@ msgstr "" #: ../src/Mirage/Banshee.Mirage/MiragePlugin.cs:265 +#: ../src/Mirage/Banshee.Mirage/MiragePlugin.cs:307 msgid "Reset Mirage" msgstr "" @@ -870,6 +926,18 @@ msgid "Scan for Duplicates" msgstr "" +#: ../src/Mirage/Banshee.Mirage/MiragePlugin.cs:305 +msgid "" +"Do you really want to reset the Mirage Extension?\n" +"All extracted information will be lost. Your music will have to be re-analyzed to use Mirage again." +msgstr "" + +#: ../src/Mirage/Banshee.Mirage/MiragePlugin.cs:318 +msgid "" +"Mirage was reset. Your music will have to be re-analyzed to use Mirage " +"again." +msgstr "" + #: ../src/Mirage/Banshee.Mirage/RandomBySimilar.cs:54 msgid "Shuffle by Similar" msgstr "" @@ -979,27 +1047,27 @@ msgid "www.xiph.org {0} stations available." msgstr "" -#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmSimilarArtists.cs:66 +#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmSimilarArtists.cs:67 msgid "Shuffle by similar Artists (via Lastfm)" msgstr "" -#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmSimilarArtists.cs:67 +#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmSimilarArtists.cs:68 msgid "by similar artists" msgstr "" -#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmSimilarArtists.cs:68 +#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmSimilarArtists.cs:69 msgid "Play songs similar to those already played (via Lastfm)" msgstr "" -#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmUserTopArtists.cs:60 +#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmUserTopArtists.cs:61 msgid "Shuffle by your Top Artists (via Lastfm)" msgstr "" -#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmUserTopArtists.cs:61 +#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmUserTopArtists.cs:62 msgid "by your top artists" msgstr "" -#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmUserTopArtists.cs:62 +#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmUserTopArtists.cs:63 msgid "Play songs from your Top Artists (via Lastfm)" msgstr "" @@ -1211,3 +1279,5 @@ #: ../src/Telepathy/Banshee.Telepathy/Banshee.Telepathy.Gui/TransferManagerUi.cs:131 msgid "Initializing" msgstr "" + + diff -Nru banshee-community-extensions-2.0.1/po/sk.po banshee-community-extensions-2.2.0/po/sk.po --- banshee-community-extensions-2.0.1/po/sk.po 2011-05-03 20:43:45.000000000 +0000 +++ banshee-community-extensions-2.2.0/po/sk.po 2011-09-19 20:36:17.000000000 +0000 @@ -1,14 +1,15 @@ # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. # +# Translators: +# pavolzetor , 2011. msgid "" msgstr "" "Project-Id-Version: Banshee Community Extensions\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=banshee&component=Community%20Extensions\n" -"POT-Creation-Date: 2011-03-22 23:13+0100\n" -"PO-Revision-Date: 2011-05-01 11:13+0000\n" +"POT-Creation-Date: 2011-09-08 21:22+0200\n" +"PO-Revision-Date: 2011-09-09 00:16+0000\n" "Last-Translator: pavolzetor \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" @@ -106,17 +107,29 @@ msgid "Start Timer" msgstr "" +#: ../src/AlbumArtWriter/Banshee.AlbumArtWriter/AlbumArtWriterJob.cs:48 +msgid "Saving Cover Art To Album folders" +msgstr "" + +#: ../src/AlbumArtWriter/Banshee.AlbumArtWriter/AlbumArtWriterJob.cs:99 +#: ../src/Lyrics/Banshee.Lyrics/Banshee.Lyrics/LyricsDownloadJob.cs:61 +#, csharp-format +msgid "{0} - {1}" +msgstr "" + #: ../src/Ampache/Banshee.Ampache/Gui/AmpacheView.cs:73 msgid "Connect" msgstr "Pripojiť" #: ../src/Ampache/Banshee.Ampache/Gui/AmpacheView.cs:85 #: ../src/Ampache/Banshee.Ampache/Gui/AmpacheView.cs:92 +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:73 msgid "Artist" msgstr "Interpret" #: ../src/Ampache/Banshee.Ampache/Gui/AmpacheView.cs:87 #: ../src/Ampache/Banshee.Ampache/Gui/AmpacheView.cs:93 +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:74 msgid "Album" msgstr "Album" @@ -155,6 +168,7 @@ msgstr "Za_vrieť" #: ../src/AppIndicator/Banshee.AppIndicator/AppIndicatorService.cs:133 +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/DuplicateSongDetectorSource.cs:50 msgid "Close" msgstr "Zavrieť" @@ -204,7 +218,7 @@ msgid "Skip this item" msgstr "Preskočiť túto položku" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowContents.cs:263 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowContents.cs:269 msgid "Track list" msgstr "Zoznam skladieb" @@ -219,107 +233,153 @@ msgstr "" #: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:57 -msgid "Enable threaded loading of artwork" -msgstr "" - -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:58 -msgid "If enabled ClutterFlow will use threading to load it's artwork" -msgstr "" - -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:64 msgid "Unfolds the track list" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:65 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:58 msgid "If checked it will display the track list when not in fullscreen mode" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:85 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:78 msgid "Immediately apply playback mode changes" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:86 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:79 msgid "" "Starts playing a new song immediately after the playback mode changed (Party" " Mode or Album Mode)" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:92 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:85 msgid "Display album _label" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:93 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:86 msgid "Wether or not the album label needs to be shown above the artwork" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:99 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:92 msgid "Display track _title" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:100 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:93 msgid "" "Wether or not the album title needs to be shown above the artwork in " "fullscreen mode" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:106 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:99 msgid "Texture size in pixels" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:107 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:100 msgid "The in-memory size of the cover textures in pixels" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:113 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:106 msgid "Minimal cover size in pixels" msgstr "" +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:107 #: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:114 -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:121 msgid "The on-stage minimal cover size in pixels" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:120 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:113 msgid "Maximal cover size in pixels" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:127 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:120 msgid "Number of visible covers at the side" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:128 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:121 msgid "" "The number of covers that need to be displayed on the stage (at one side)" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:134 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:127 msgid "Sort covers by" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:135 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:128 msgid "Selects on what basis covers should be sorted" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:231 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:180 msgid "Show ClutterFlow Browser" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:232 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:181 msgid "Show or hide the ClutterFlow browser" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:325 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:277 msgid "ClutterFlow" msgstr "" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:328 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:280 msgid "General" msgstr "Všeobecné" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:337 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:288 msgid "Dimensions" msgstr "Rozmery" +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:383 +msgid "" +"For changes to these values to take effect, you need to restart Banshee" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/DuplicateSongDetectorAction.cs:46 +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/DuplicateSongDetectorAction.cs:49 +msgid "Detect Duplicate Songs" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/DuplicateSongDetectorSource.cs:45 +msgid "Duplicate Song Detector" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/DuplicateSongDetectorSource.cs:55 +msgid "Refresh" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:61 +msgid "Remove Selected Songs" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:64 +msgid "Delete Selected Songs" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:71 +msgid "Select" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:72 +msgid "Song Title" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:75 +msgid "File" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:164 +msgid "Are you sure you want to permanently delete the selected items?" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:166 +msgid "If you delete the selection, it will be permanently lost." +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:170 +msgid "Remove selection from Library?" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:172 +msgid "Are you sure you want to remove the selected items from your Library?" +msgstr "" + #: ../src/Jamendo/Banshee.Jamendo/JamendoDownloadManager.cs:62 msgid "Jamendo Downloads" msgstr "" @@ -752,11 +812,6 @@ msgid "Downloading Lyrics" msgstr "Sťahuje sa text piesne" -#: ../src/Lyrics/Banshee.Lyrics/Banshee.Lyrics/LyricsDownloadJob.cs:61 -#, csharp-format -msgid "{0} - {1}" -msgstr "" - #: ../src/Lyrics/Banshee.Lyrics/Banshee.Lyrics/LyricsService.cs:171 msgid "L_yrics" msgstr "_Text piesne" @@ -851,6 +906,7 @@ msgstr "" #: ../src/Mirage/Banshee.Mirage/MiragePlugin.cs:265 +#: ../src/Mirage/Banshee.Mirage/MiragePlugin.cs:307 msgid "Reset Mirage" msgstr "" @@ -872,6 +928,18 @@ msgid "Scan for Duplicates" msgstr "" +#: ../src/Mirage/Banshee.Mirage/MiragePlugin.cs:305 +msgid "" +"Do you really want to reset the Mirage Extension?\n" +"All extracted information will be lost. Your music will have to be re-analyzed to use Mirage again." +msgstr "" + +#: ../src/Mirage/Banshee.Mirage/MiragePlugin.cs:318 +msgid "" +"Mirage was reset. Your music will have to be re-analyzed to use Mirage " +"again." +msgstr "" + #: ../src/Mirage/Banshee.Mirage/RandomBySimilar.cs:54 msgid "Shuffle by Similar" msgstr "" @@ -981,27 +1049,27 @@ msgid "www.xiph.org {0} stations available." msgstr "" -#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmSimilarArtists.cs:66 +#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmSimilarArtists.cs:67 msgid "Shuffle by similar Artists (via Lastfm)" msgstr "" -#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmSimilarArtists.cs:67 +#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmSimilarArtists.cs:68 msgid "by similar artists" msgstr "" -#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmSimilarArtists.cs:68 +#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmSimilarArtists.cs:69 msgid "Play songs similar to those already played (via Lastfm)" msgstr "" -#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmUserTopArtists.cs:60 +#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmUserTopArtists.cs:61 msgid "Shuffle by your Top Artists (via Lastfm)" msgstr "" -#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmUserTopArtists.cs:61 +#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmUserTopArtists.cs:62 msgid "by your top artists" msgstr "" -#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmUserTopArtists.cs:62 +#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmUserTopArtists.cs:63 msgid "Play songs from your Top Artists (via Lastfm)" msgstr "" @@ -1213,3 +1281,5 @@ #: ../src/Telepathy/Banshee.Telepathy/Banshee.Telepathy.Gui/TransferManagerUi.cs:131 msgid "Initializing" msgstr "" + + diff -Nru banshee-community-extensions-2.0.1/po/uk_UA.po banshee-community-extensions-2.2.0/po/uk_UA.po --- banshee-community-extensions-2.0.1/po/uk_UA.po 2011-05-03 20:43:48.000000000 +0000 +++ banshee-community-extensions-2.2.0/po/uk_UA.po 2011-09-19 20:36:00.000000000 +0000 @@ -1,14 +1,15 @@ # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. # +# Translators: +# Сергій Гаврилов , 2011. msgid "" msgstr "" "Project-Id-Version: Banshee Community Extensions\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=banshee&component=Community%20Extensions\n" -"POT-Creation-Date: 2011-03-22 23:13+0100\n" -"PO-Revision-Date: 2011-04-11 21:47+0000\n" +"POT-Creation-Date: 2011-09-08 21:22+0200\n" +"PO-Revision-Date: 2011-09-09 00:16+0000\n" "Last-Translator: Sergiy_Gavrylov \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" @@ -106,17 +107,29 @@ msgid "Start Timer" msgstr "Запустити таймер" +#: ../src/AlbumArtWriter/Banshee.AlbumArtWriter/AlbumArtWriterJob.cs:48 +msgid "Saving Cover Art To Album folders" +msgstr "" + +#: ../src/AlbumArtWriter/Banshee.AlbumArtWriter/AlbumArtWriterJob.cs:99 +#: ../src/Lyrics/Banshee.Lyrics/Banshee.Lyrics/LyricsDownloadJob.cs:61 +#, csharp-format +msgid "{0} - {1}" +msgstr "{0} - {1}" + #: ../src/Ampache/Banshee.Ampache/Gui/AmpacheView.cs:73 msgid "Connect" msgstr "З'єднати" #: ../src/Ampache/Banshee.Ampache/Gui/AmpacheView.cs:85 #: ../src/Ampache/Banshee.Ampache/Gui/AmpacheView.cs:92 +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:73 msgid "Artist" msgstr "Виконавець" #: ../src/Ampache/Banshee.Ampache/Gui/AmpacheView.cs:87 #: ../src/Ampache/Banshee.Ampache/Gui/AmpacheView.cs:93 +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:74 msgid "Album" msgstr "Альбом" @@ -155,6 +168,7 @@ msgstr "_Закрити" #: ../src/AppIndicator/Banshee.AppIndicator/AppIndicatorService.cs:133 +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/DuplicateSongDetectorSource.cs:50 msgid "Close" msgstr "Закрити" @@ -204,7 +218,7 @@ msgid "Skip this item" msgstr "Пропустити цей елемент" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowContents.cs:263 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowContents.cs:269 msgid "Track list" msgstr "Список доріжок" @@ -221,27 +235,19 @@ "прокручування" #: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:57 -msgid "Enable threaded loading of artwork" -msgstr "Увімкнути потокове завантаження обкладинок" - -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:58 -msgid "If enabled ClutterFlow will use threading to load it's artwork" -msgstr "Якщо увімкнено, ClutterFlow завантажуватиме обкладинки через потік" - -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:64 msgid "Unfolds the track list" msgstr "Розкривати список доріжок" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:65 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:58 msgid "If checked it will display the track list when not in fullscreen mode" msgstr "" "Якщо позначено, список доріжок показуватиметься в режимі не на повний екран" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:85 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:78 msgid "Immediately apply playback mode changes" msgstr "Негайно застосувати змінений режим відтворення" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:86 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:79 msgid "" "Starts playing a new song immediately after the playback mode changed (Party" " Mode or Album Mode)" @@ -249,83 +255,137 @@ "Запускає відтворення нового твору негайно після зміни режиму відтворення " "(Режими вечірки або альбому)" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:92 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:85 msgid "Display album _label" msgstr "Показувати категорію а_льбому" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:93 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:86 msgid "Wether or not the album label needs to be shown above the artwork" msgstr "Чи потрібно показувати категорію альбому вище обкладинки" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:99 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:92 msgid "Display track _title" msgstr "Показувати _назву доріжки" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:100 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:93 msgid "" "Wether or not the album title needs to be shown above the artwork in " "fullscreen mode" msgstr "" "Чи потрібно показувати назву альбому вище обкладинки у повноекранному режимі" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:106 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:99 msgid "Texture size in pixels" msgstr "Розмір текстури в пікселях" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:107 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:100 msgid "The in-memory size of the cover textures in pixels" msgstr "Розмір в пам'яті текстури обкладинки в пікселях" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:113 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:106 msgid "Minimal cover size in pixels" msgstr "Мінімальний розмір обкладинки в пікселях" +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:107 #: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:114 -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:121 msgid "The on-stage minimal cover size in pixels" msgstr "Мінімальний розмір обкладинки в пікселях до показу" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:120 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:113 msgid "Maximal cover size in pixels" msgstr "Максимальний розмір обкладинки в пікселях" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:127 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:120 msgid "Number of visible covers at the side" msgstr "Кількість видимих обкладинок на панелі" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:128 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:121 msgid "" "The number of covers that need to be displayed on the stage (at one side)" msgstr "Кількість видимих обкладинок, які потрібно показувати на панелі" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:134 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:127 msgid "Sort covers by" msgstr "Сортувати обкладинки за" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:135 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs:128 msgid "Selects on what basis covers should be sorted" msgstr "Вибрати спосіб сортування основних обкладинок" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:231 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:180 msgid "Show ClutterFlow Browser" msgstr "Показувати переглядач ClutterFlow" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:232 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:181 msgid "Show or hide the ClutterFlow browser" msgstr "Показати чи приховати переглядач ClutterFlow" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:325 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:277 msgid "ClutterFlow" msgstr "ClutterFlow" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:328 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:280 msgid "General" msgstr "Загальне" -#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:337 +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:288 msgid "Dimensions" msgstr "Розміри" +#: ../src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs:383 +msgid "" +"For changes to these values to take effect, you need to restart Banshee" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/DuplicateSongDetectorAction.cs:46 +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/DuplicateSongDetectorAction.cs:49 +msgid "Detect Duplicate Songs" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/DuplicateSongDetectorSource.cs:45 +msgid "Duplicate Song Detector" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/DuplicateSongDetectorSource.cs:55 +msgid "Refresh" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:61 +msgid "Remove Selected Songs" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:64 +msgid "Delete Selected Songs" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:71 +msgid "Select" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:72 +msgid "Song Title" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:75 +msgid "File" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:164 +msgid "Are you sure you want to permanently delete the selected items?" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:166 +msgid "If you delete the selection, it will be permanently lost." +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:170 +msgid "Remove selection from Library?" +msgstr "" + +#: ../src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs:172 +msgid "Are you sure you want to remove the selected items from your Library?" +msgstr "" + #: ../src/Jamendo/Banshee.Jamendo/JamendoDownloadManager.cs:62 msgid "Jamendo Downloads" msgstr "Завантаження з Jamendo" @@ -764,11 +824,6 @@ msgid "Downloading Lyrics" msgstr "Завантаження текстів" -#: ../src/Lyrics/Banshee.Lyrics/Banshee.Lyrics/LyricsDownloadJob.cs:61 -#, csharp-format -msgid "{0} - {1}" -msgstr "{0} - {1}" - #: ../src/Lyrics/Banshee.Lyrics/Banshee.Lyrics/LyricsService.cs:171 msgid "L_yrics" msgstr "L_yrics" @@ -867,6 +922,7 @@ msgstr "Пошук можливих дублікатів у фонотеці" #: ../src/Mirage/Banshee.Mirage/MiragePlugin.cs:265 +#: ../src/Mirage/Banshee.Mirage/MiragePlugin.cs:307 msgid "Reset Mirage" msgstr "Перезавантажити Mirage" @@ -894,6 +950,18 @@ msgid "Scan for Duplicates" msgstr "Пошук дублікатів" +#: ../src/Mirage/Banshee.Mirage/MiragePlugin.cs:305 +msgid "" +"Do you really want to reset the Mirage Extension?\n" +"All extracted information will be lost. Your music will have to be re-analyzed to use Mirage again." +msgstr "" + +#: ../src/Mirage/Banshee.Mirage/MiragePlugin.cs:318 +msgid "" +"Mirage was reset. Your music will have to be re-analyzed to use Mirage " +"again." +msgstr "" + #: ../src/Mirage/Banshee.Mirage/RandomBySimilar.cs:54 msgid "Shuffle by Similar" msgstr "Перемішати за подібними" @@ -1007,27 +1075,27 @@ msgid "www.xiph.org {0} stations available." msgstr "Доступно {0} www.xiph.org станцій." -#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmSimilarArtists.cs:66 +#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmSimilarArtists.cs:67 msgid "Shuffle by similar Artists (via Lastfm)" msgstr "Перемішати за подібним виконавцем (через Lastfm)" -#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmSimilarArtists.cs:67 +#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmSimilarArtists.cs:68 msgid "by similar artists" msgstr "за подібним виконавцем" -#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmSimilarArtists.cs:68 +#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmSimilarArtists.cs:69 msgid "Play songs similar to those already played (via Lastfm)" msgstr "Відтворювати твори подібні до вже відтворених (через Lastfm)" -#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmUserTopArtists.cs:60 +#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmUserTopArtists.cs:61 msgid "Shuffle by your Top Artists (via Lastfm)" msgstr "Перемішати за вашим рейтингом виконавців (через Lastfm)" -#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmUserTopArtists.cs:61 +#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmUserTopArtists.cs:62 msgid "by your top artists" msgstr "за вашим рейтингом виконавців" -#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmUserTopArtists.cs:62 +#: ../src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmUserTopArtists.cs:63 msgid "Play songs from your Top Artists (via Lastfm)" msgstr "Відтворювати твори за вашим рейтингом виконавців (через Lastfm)" @@ -1243,3 +1311,5 @@ #: ../src/Telepathy/Banshee.Telepathy/Banshee.Telepathy.Gui/TransferManagerUi.cs:131 msgid "Initializing" msgstr "Ініціалізація" + + diff -Nru banshee-community-extensions-2.0.1/README banshee-community-extensions-2.2.0/README --- banshee-community-extensions-2.0.1/README 2011-03-24 19:48:39.000000000 +0000 +++ banshee-community-extensions-2.2.0/README 2011-06-09 21:33:46.000000000 +0000 @@ -32,7 +32,7 @@ Dependencies ======================= -Banshee 1.9.6 and its devel packages are required. Some extensions have +Banshee 2.1.0 and its devel packages are required. Some extensions have specific requirements. AppIndicator diff -Nru banshee-community-extensions-2.0.1/src/AlarmClock/Makefile.in banshee-community-extensions-2.2.0/src/AlarmClock/Makefile.in --- banshee-community-extensions-2.0.1/src/AlarmClock/Makefile.in 2011-05-03 20:45:04.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/AlarmClock/Makefile.in 2011-09-19 20:36:50.000000000 +0000 @@ -42,6 +42,7 @@ subdir = src/AlarmClock ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/m4/extensions/alarmclock.m4 \ + $(top_srcdir)/build/m4/extensions/albumartwriter.m4 \ $(top_srcdir)/build/m4/extensions/ampache.m4 \ $(top_srcdir)/build/m4/extensions/appindicator.m4 \ $(top_srcdir)/build/m4/extensions/awn.m4 \ @@ -49,6 +50,7 @@ $(top_srcdir)/build/m4/extensions/clutterflow.m4 \ $(top_srcdir)/build/m4/extensions/common.m4 \ $(top_srcdir)/build/m4/extensions/coverwallpaper.m4 \ + $(top_srcdir)/build/m4/extensions/duplicatesongdetector.m4 \ $(top_srcdir)/build/m4/extensions/jamendo.m4 \ $(top_srcdir)/build/m4/extensions/karaoke.m4 \ $(top_srcdir)/build/m4/extensions/lastfmfingerprint.m4 \ @@ -68,6 +70,11 @@ $(top_srcdir)/build/m4/shamrock/expansions.m4 \ $(top_srcdir)/build/m4/shamrock/gnome-doc.m4 \ $(top_srcdir)/build/m4/shamrock/i18n.m4 \ + $(top_srcdir)/build/m4/shamrock/libtool.m4 \ + $(top_srcdir)/build/m4/shamrock/ltoptions.m4 \ + $(top_srcdir)/build/m4/shamrock/ltsugar.m4 \ + $(top_srcdir)/build/m4/shamrock/ltversion.m4 \ + $(top_srcdir)/build/m4/shamrock/lt~obsolete.m4 \ $(top_srcdir)/build/m4/shamrock/mono.m4 \ $(top_srcdir)/build/m4/shamrock/nunit.m4 \ $(top_srcdir)/build/m4/shamrock/programs.m4 \ @@ -104,7 +111,6 @@ DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AM_MAKEFLAGS = @AM_MAKEFLAGS@ diff -Nru banshee-community-extensions-2.0.1/src/AlbumArtWriter/AlbumArtWriter.addin.xml banshee-community-extensions-2.2.0/src/AlbumArtWriter/AlbumArtWriter.addin.xml --- banshee-community-extensions-2.0.1/src/AlbumArtWriter/AlbumArtWriter.addin.xml 1970-01-01 00:00:00.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/AlbumArtWriter/AlbumArtWriter.addin.xml 2011-08-15 09:42:41.000000000 +0000 @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + diff -Nru banshee-community-extensions-2.0.1/src/AlbumArtWriter/Banshee.AlbumArtWriter/AlbumArtWriterJob.cs banshee-community-extensions-2.2.0/src/AlbumArtWriter/Banshee.AlbumArtWriter/AlbumArtWriterJob.cs --- banshee-community-extensions-2.0.1/src/AlbumArtWriter/Banshee.AlbumArtWriter/AlbumArtWriterJob.cs 1970-01-01 00:00:00.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/AlbumArtWriter/Banshee.AlbumArtWriter/AlbumArtWriterJob.cs 2011-08-24 19:58:27.000000000 +0000 @@ -0,0 +1,133 @@ +// +// AlbumArtWriterJob.cs +// +// Authors: +// Kevin Anthony +// +// Copyright (C) 2011 Kevin Anthony +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// + +using System; +using System.IO; + +using Mono.Addins; + +using Hyena; +using Hyena.Jobs; +using Hyena.Data.Sqlite; + +using Banshee.Base; +using Banshee.Collection.Database; +using Banshee.ServiceStack; + +namespace Banshee.AlbumArtWriter +{ + public class AlbumArtWriterJob : DbIteratorJob + { + private DateTime CurrentTime; + private DateTime TimeOffset; + public AlbumArtWriterJob () : base(AddinManager.CurrentLocalizer.GetString ("Saving Cover Art To Album folders")) + { + CurrentTime = DateTime.Now; + TimeOffset = CurrentTime - TimeSpan.FromDays (7); + CountCommand = new HyenaSqliteCommand (@" + SELECT count(DISTINCT CoreTracks.AlbumID) + FROM CoreTracks, CoreAlbums + WHERE + CoreTracks.PrimarySourceID = ? AND + CoreTracks.AlbumID = CoreAlbums.AlbumID AND + CoreTracks.AlbumID NOT IN ( + SELECT AlbumID from AlbumArtWriter WHERE + SavedOrTried > 0 AND LastUpdated >= ?) + ", ServiceManager.SourceManager.MusicLibrary.DbId, TimeOffset); + + SelectCommand = new HyenaSqliteCommand (@" + SELECT DISTINCT CoreAlbums.AlbumID, CoreAlbums.Title, CoreArtists.Name, CoreTracks.Uri, CoreTracks.TrackID + FROM CoreTracks, CoreArtists, CoreAlbums + WHERE + CoreTracks.PrimarySourceID = ? AND + CoreTracks.AlbumID = CoreAlbums.AlbumID AND + CoreAlbums.ArtistID = CoreArtists.ArtistID AND + CoreTracks.AlbumID NOT IN ( + SELECT AlbumID from AlbumArtWriter WHERE + SavedOrTried > 0 AND LastUpdated >= ?) + GROUP BY CoreTracks.AlbumID ORDER BY CoreTracks.DateUpdatedStamp DESC LIMIT ?", ServiceManager.SourceManager.MusicLibrary.DbId, TimeOffset, 1); + + SetResources (Resource.Database); + PriorityHints = PriorityHints.LongRunning; + + IsBackground = true; + CanCancel = true; + DelayShow = true; + } + + public void Start () + { + Register (); + } + + private class CoverartTrackInfo : DatabaseTrackInfo + { + public int DbId { + set { TrackId = value; } + } + } + + protected override void IterateCore (HyenaDataReader reader) + { + var track = new CoverartTrackInfo { AlbumTitle = reader.Get (1), ArtistName = reader.Get (2), PrimarySource = ServiceManager.SourceManager.MusicLibrary, Uri = new SafeUri (reader.Get (3)), DbId = reader.Get (4), AlbumId = reader.Get (0) }; + + Status = String.Format (AddinManager.CurrentLocalizer.GetString ("{0} - {1}"), track.ArtistName, track.AlbumTitle); + WriteArt (track); + } + + private void WriteArt (DatabaseTrackInfo track) + { + string ArtWorkPath = CoverArtSpec.GetPath (track.ArtworkId); + string WritePath = Path.Combine (Path.GetDirectoryName (track.LocalPath), "album.jpg"); + + if (File.Exists (ArtWorkPath)) { + if (!File.Exists (WritePath)) { + try { + File.Copy (ArtWorkPath, WritePath); + Log.DebugFormat ("Copying: {0} \t\t to: {1}", ArtWorkPath, WritePath); + ServiceManager.DbConnection.Execute ("INSERT OR REPLACE INTO AlbumArtWriter (AlbumID, SavedOrTried,LastUpdated) VALUES (?, ?, ?)", track.AlbumId, 3, CurrentTime); + } catch (IOException error) { + ServiceManager.DbConnection.Execute ("INSERT OR REPLACE INTO AlbumArtWriter (AlbumID, SavedOrTried,LastUpdated) VALUES (?, ?, ?)", track.AlbumId, 1, CurrentTime); + Log.Warning (error.Message); + } + } else { + Log.DebugFormat ("Album already has artwork in folder {0}", WritePath); + ServiceManager.DbConnection.Execute ("INSERT OR REPLACE INTO AlbumArtWriter (AlbumID, SavedOrTried,LastUpdated) VALUES (?, ?, ?)", track.AlbumId, 2, CurrentTime); + } + } else { + Log.DebugFormat ("Artwork does not exist for album {0} - {1} - {2}", track.AlbumArtist, track.AlbumTitle, ArtWorkPath); + ServiceManager.DbConnection.Execute ("INSERT OR REPLACE INTO AlbumArtWriter (AlbumID, SavedOrTried,LastUpdated) VALUES (?, ?, ?)", track.AlbumId, 1, CurrentTime); + } + } + + protected override void OnCancelled () + { + AbortThread (); + } + } +} diff -Nru banshee-community-extensions-2.0.1/src/AlbumArtWriter/Banshee.AlbumArtWriter/AlbumArtWriterService.cs banshee-community-extensions-2.2.0/src/AlbumArtWriter/Banshee.AlbumArtWriter/AlbumArtWriterService.cs --- banshee-community-extensions-2.0.1/src/AlbumArtWriter/Banshee.AlbumArtWriter/AlbumArtWriterService.cs 1970-01-01 00:00:00.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/AlbumArtWriter/Banshee.AlbumArtWriter/AlbumArtWriterService.cs 2011-08-24 19:58:27.000000000 +0000 @@ -0,0 +1,129 @@ +// +// AlbumArtWriterService.cs +// +// Authors: +// Kevin Anthony +// +// Copyright (C) 2011 Kevin Anthony +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// + +using System; + +using Mono.Addins; + +using Banshee.ServiceStack; +using Banshee.Configuration; +using Banshee.Sources; + +namespace Banshee.AlbumArtWriter +{ + public class AlbumArtWriterService : IExtensionService + { + private bool disposed; + private AlbumArtWriterJob job; + + public AlbumArtWriterService () + { + } + + void IExtensionService.Initialize () + { + /* + * if SavedOrTried = 0, try and download the art + * if SavedOrTried = 1, we have tried this session + * if SavedOrTried = 2, art is already in folder + * if SavedOrTired = 3, we were successful in writing art to folder + */ + if (!ServiceManager.DbConnection.TableExists ("AlbumArtWriter")) { + ServiceManager.DbConnection.Execute (@" + CREATE TABLE AlbumArtWriter ( + AlbumID INTEGER UNIQUE, + SavedOrTried INTEGER + )"); + DatabaseConfigurationClient.Client.Set("AlbumArtWriter", "Version", 1); + } + if (DatabaseConfigurationClient.Client.Get ("AlbumArtWriter", "Version", 0) < 2) { + ServiceManager.DbConnection.Execute (@"ALTER TABLE AlbumArtWriter ADD COLUMN LastUpdated INTEGER"); + DatabaseConfigurationClient.Client.Set("AlbumArtWriter", "Version", 2); + } + if (!ServiceStartup ()) { + ServiceManager.SourceManager.SourceAdded += OnSourceAdded; + } + } + + private void OnSourceAdded (SourceAddedArgs args) + { + if (ServiceStartup ()) { + ServiceManager.SourceManager.SourceAdded -= OnSourceAdded; + } + } + + private bool ServiceStartup () + { + if (ServiceManager.SourceManager.MusicLibrary == null) { + return false; + } + + Initialize (); + + return true; + } + + private void Initialize () + { + ServiceManager.SourceManager.MusicLibrary.TracksAdded += OnTracksAdded; + StartWriterJob (); + } + + public void Dispose () + { + if (disposed) { + return; + } + + ServiceManager.SourceManager.MusicLibrary.TracksAdded -= OnTracksAdded; + /* Setting SavedOrTried to 0 where SavedOrTried = 1 allows album art to be written next time */ + ServiceManager.DbConnection.Execute (@"UPDATE AlbumArtWriter SET SavedOrTried = 0 WHERE SavedOrTried = 1"); + disposed = true; + } + + public void StartWriterJob () + { + if (job == null) { + job = new AlbumArtWriterJob (); + job.Finished += delegate { + job = null; + }; + job.Start (); + } + } + + private void OnTracksAdded (Source sender, TrackEventArgs args) + { + StartWriterJob (); + } + + string IService.ServiceName { + get { return "AlbumArtWriterService"; } + } + } +} diff -Nru banshee-community-extensions-2.0.1/src/AlbumArtWriter/Makefile.am banshee-community-extensions-2.2.0/src/AlbumArtWriter/Makefile.am --- banshee-community-extensions-2.0.1/src/AlbumArtWriter/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/AlbumArtWriter/Makefile.am 2011-08-15 09:42:41.000000000 +0000 @@ -0,0 +1,14 @@ +ASSEMBLY = Banshee.AlbumArtWriter +LINK = $(BANSHEE_LIBS) + +SOURCES = \ + Banshee.AlbumArtWriter/AlbumArtWriterJob.cs \ + Banshee.AlbumArtWriter/AlbumArtWriterService.cs + +RESOURCES = AlbumArtWriter.addin.xml + +if ENABLE_ALBUMARTWRITER +include $(top_srcdir)/build/build.mk +else +EXTRA_DIST = $(SOURCES) $(RESOURCES) +endif diff -Nru banshee-community-extensions-2.0.1/src/AlbumArtWriter/Makefile.in banshee-community-extensions-2.2.0/src/AlbumArtWriter/Makefile.in --- banshee-community-extensions-2.0.1/src/AlbumArtWriter/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/AlbumArtWriter/Makefile.in 2011-09-19 20:36:50.000000000 +0000 @@ -0,0 +1,664 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(top_srcdir)/build/build.environment.mk \ + $(top_srcdir)/build/build.mk \ + $(top_srcdir)/build/build.rules.mk +@ENABLE_ALBUMARTWRITER_TRUE@@ENABLE_TESTS_TRUE@am__append_1 = " $(NUNIT_LIBS) $(MONO_NUNIT_LIBS)" +subdir = src/AlbumArtWriter +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/build/m4/extensions/alarmclock.m4 \ + $(top_srcdir)/build/m4/extensions/albumartwriter.m4 \ + $(top_srcdir)/build/m4/extensions/ampache.m4 \ + $(top_srcdir)/build/m4/extensions/appindicator.m4 \ + $(top_srcdir)/build/m4/extensions/awn.m4 \ + $(top_srcdir)/build/m4/extensions/banshee.m4 \ + $(top_srcdir)/build/m4/extensions/clutterflow.m4 \ + $(top_srcdir)/build/m4/extensions/common.m4 \ + $(top_srcdir)/build/m4/extensions/coverwallpaper.m4 \ + $(top_srcdir)/build/m4/extensions/duplicatesongdetector.m4 \ + $(top_srcdir)/build/m4/extensions/jamendo.m4 \ + $(top_srcdir)/build/m4/extensions/karaoke.m4 \ + $(top_srcdir)/build/m4/extensions/lastfmfingerprint.m4 \ + $(top_srcdir)/build/m4/extensions/lcd.m4 \ + $(top_srcdir)/build/m4/extensions/lirc.m4 \ + $(top_srcdir)/build/m4/extensions/liveradio.m4 \ + $(top_srcdir)/build/m4/extensions/lyrics.m4 \ + $(top_srcdir)/build/m4/extensions/magnatune.m4 \ + $(top_srcdir)/build/m4/extensions/mirage.m4 \ + $(top_srcdir)/build/m4/extensions/openvp.m4 \ + $(top_srcdir)/build/m4/extensions/radiostationfetcher.m4 \ + $(top_srcdir)/build/m4/extensions/randombylastfm.m4 \ + $(top_srcdir)/build/m4/extensions/streamrecorder.m4 \ + $(top_srcdir)/build/m4/extensions/telepathy.m4 \ + $(top_srcdir)/build/m4/extensions/zeitgeistdp.m4 \ + $(top_srcdir)/build/m4/shave/shave.m4 \ + $(top_srcdir)/build/m4/shamrock/expansions.m4 \ + $(top_srcdir)/build/m4/shamrock/gnome-doc.m4 \ + $(top_srcdir)/build/m4/shamrock/i18n.m4 \ + $(top_srcdir)/build/m4/shamrock/libtool.m4 \ + $(top_srcdir)/build/m4/shamrock/ltoptions.m4 \ + $(top_srcdir)/build/m4/shamrock/ltsugar.m4 \ + $(top_srcdir)/build/m4/shamrock/ltversion.m4 \ + $(top_srcdir)/build/m4/shamrock/lt~obsolete.m4 \ + $(top_srcdir)/build/m4/shamrock/mono.m4 \ + $(top_srcdir)/build/m4/shamrock/nunit.m4 \ + $(top_srcdir)/build/m4/shamrock/programs.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(moduledir)" +SCRIPTS = $(module_SCRIPTS) +DIST_SOURCES = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALL_LINGUAS = @ALL_LINGUAS@ +AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ +APPINDICATORSHARP_CFLAGS = @APPINDICATORSHARP_CFLAGS@ +APPINDICATORSHARP_LIBS = @APPINDICATORSHARP_LIBS@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BANSHEE_CFLAGS = @BANSHEE_CFLAGS@ +BANSHEE_EXTDIR = @BANSHEE_EXTDIR@ +BANSHEE_LASTFM_CFLAGS = @BANSHEE_LASTFM_CFLAGS@ +BANSHEE_LASTFM_LIBS = @BANSHEE_LASTFM_LIBS@ +BANSHEE_LIBDIR = @BANSHEE_LIBDIR@ +BANSHEE_LIBS = @BANSHEE_LIBS@ +BANSHEE_NOWPLAYING_CFLAGS = @BANSHEE_NOWPLAYING_CFLAGS@ +BANSHEE_NOWPLAYING_LIBS = @BANSHEE_NOWPLAYING_LIBS@ +BANSHEE_WEBBROWSER_CFLAGS = @BANSHEE_WEBBROWSER_CFLAGS@ +BANSHEE_WEBBROWSER_LIBS = @BANSHEE_WEBBROWSER_LIBS@ +BUILD_HOST_CPU = @BUILD_HOST_CPU@ +BUILD_HOST_OS = @BUILD_HOST_OS@ +BUILD_TIME = @BUILD_TIME@ +BUILD_VENDOR_ID = @BUILD_VENDOR_ID@ +CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CLUTTER_BUNDLEFILES = @CLUTTER_BUNDLEFILES@ +CLUTTER_SHARP_CFLAGS = @CLUTTER_SHARP_CFLAGS@ +CLUTTER_SHARP_LIBS = @CLUTTER_SHARP_LIBS@ +CONFIG_STATUS_DEPENDENCIES = @CONFIG_STATUS_DEPENDENCIES@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DATADIRNAME = @DATADIRNAME@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ +DOC_USER_FORMATS = @DOC_USER_FORMATS@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +ENABLE_RELEASE = @ENABLE_RELEASE@ +EXEEXT = @EXEEXT@ +EXTENSION_DIR = @EXTENSION_DIR@ +F77 = @F77@ +FC = @FC@ +FFTW3F_CFLAGS = @FFTW3F_CFLAGS@ +FFTW3F_LIBS = @FFTW3F_LIBS@ +FGREP = @FGREP@ +GCONFSHARP_CFLAGS = @GCONFSHARP_CFLAGS@ +GCONFSHARP_LIBS = @GCONFSHARP_LIBS@ +GCONFTOOL = @GCONFTOOL@ +GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ +GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ +GCONF_SHARP_20_CFLAGS = @GCONF_SHARP_20_CFLAGS@ +GCONF_SHARP_20_LIBS = @GCONF_SHARP_20_LIBS@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ +GMCS_FLAGS = @GMCS_FLAGS@ +GMOFILES = @GMOFILES@ +GMSGFMT = @GMSGFMT@ +GNOME_DOC_UTILS_CFLAGS = @GNOME_DOC_UTILS_CFLAGS@ +GNOME_DOC_UTILS_LIBS = @GNOME_DOC_UTILS_LIBS@ +GREP = @GREP@ +GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ +GSTREAMER_LIBS = @GSTREAMER_LIBS@ +HELP_DIR = @HELP_DIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INSTOBJEXT = @INSTOBJEXT@ +INTLLIBS = @INTLLIBS@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +JAY = @JAY@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBSAMPLERATE_CFLAGS = @LIBSAMPLERATE_CFLAGS@ +LIBSAMPLERATE_LIBS = @LIBSAMPLERATE_LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEFLAGS = @MAKEFLAGS@ +MAKEINFO = @MAKEINFO@ +MCS = @MCS@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MONO = @MONO@ +MONO_CFLAGS = @MONO_CFLAGS@ +MONO_LIBS = @MONO_LIBS@ +MONO_MODULE_CFLAGS = @MONO_MODULE_CFLAGS@ +MONO_MODULE_LIBS = @MONO_MODULE_LIBS@ +MSGFMT = @MSGFMT@ +MSGFMT_OPTS = @MSGFMT_OPTS@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +NOTIFYSHARP_CFLAGS = @NOTIFYSHARP_CFLAGS@ +NOTIFYSHARP_LIBS = @NOTIFYSHARP_LIBS@ +NOTIFY_SHARP_CFLAGS = @NOTIFY_SHARP_CFLAGS@ +NOTIFY_SHARP_LIBS = @NOTIFY_SHARP_LIBS@ +NUNIT_CFLAGS = @NUNIT_CFLAGS@ +NUNIT_CONSOLE = @NUNIT_CONSOLE@ +NUNIT_LIBS = @NUNIT_LIBS@ +OBJC = @OBJC@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OMF_DIR = @OMF_DIR@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +POFILES = @POFILES@ +POSUB = @POSUB@ +PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ +PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ +Q = @Q@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +TAO_FREEGLUT_CFLAGS = @TAO_FREEGLUT_CFLAGS@ +TAO_FREEGLUT_LIBS = @TAO_FREEGLUT_LIBS@ +TAO_OPENGL_CFLAGS = @TAO_OPENGL_CFLAGS@ +TAO_OPENGL_LIBS = @TAO_OPENGL_LIBS@ +TAO_SDL_CFLAGS = @TAO_SDL_CFLAGS@ +TAO_SDL_LIBS = @TAO_SDL_LIBS@ +USE_NLS = @USE_NLS@ +V = @V@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +ZEITGEIST_SHARP_CFLAGS = @ZEITGEIST_SHARP_CFLAGS@ +ZEITGEIST_SHARP_LIBS = @ZEITGEIST_SHARP_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +expanded_bindir = @expanded_bindir@ +expanded_datadir = @expanded_datadir@ +expanded_libdir = @expanded_libdir@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +ASSEMBLY = Banshee.AlbumArtWriter +LINK = $(BANSHEE_LIBS) $(am__append_1) +SOURCES = \ + Banshee.AlbumArtWriter/AlbumArtWriterJob.cs \ + Banshee.AlbumArtWriter/AlbumArtWriterService.cs + +RESOURCES = AlbumArtWriter.addin.xml + +# Initializers +@ENABLE_ALBUMARTWRITER_TRUE@MONO_BASE_PATH = +@ENABLE_ALBUMARTWRITER_TRUE@MONO_ADDINS_PATH = + +# All extensions are libraries +@ENABLE_ALBUMARTWRITER_TRUE@TARGET = library +@ENABLE_ALBUMARTWRITER_TRUE@DIR_BIN = $(top_builddir)/bin + +# Install Paths +@ENABLE_ALBUMARTWRITER_TRUE@DEFAULT_INSTALL_DIR = $(pkglibdir) +@ENABLE_ALBUMARTWRITER_TRUE@EXTENSIONS_INSTALL_DIR = $(DEFAULT_INSTALL_DIR)/Extensions +@ENABLE_ALBUMARTWRITER_TRUE@UNIQUE_FILTER_PIPE = tr [:space:] \\n | sort | uniq +@ENABLE_ALBUMARTWRITER_TRUE@BUILD_DATA_DIR = $(top_builddir)/bin/share/$(PACKAGE) +@ENABLE_ALBUMARTWRITER_TRUE@SOURCES_BUILD = $(addprefix $(srcdir)/, \ +@ENABLE_ALBUMARTWRITER_TRUE@ $(SOURCES)) \ +@ENABLE_ALBUMARTWRITER_TRUE@ $(top_srcdir)/src/AssemblyInfo.cs +@ENABLE_ALBUMARTWRITER_TRUE@RESOURCES_EXPANDED = $(addprefix $(srcdir)/, $(RESOURCES)) +@ENABLE_ALBUMARTWRITER_TRUE@RESOURCES_BUILD = $(foreach resource, $(RESOURCES_EXPANDED), \ +@ENABLE_ALBUMARTWRITER_TRUE@ -resource:$(resource),$(notdir $(resource))) + +@ENABLE_ALBUMARTWRITER_TRUE@INSTALL_ICONS = $(top_srcdir)/build/private-icon-theme-installer "$(mkinstalldirs)" "$(INSTALL_DATA)" +@ENABLE_ALBUMARTWRITER_TRUE@THEME_ICONS_SOURCE = $(wildcard $(srcdir)/ThemeIcons/*/*/*.png) $(wildcard $(srcdir)/ThemeIcons/scalable/*/*.svg) +@ENABLE_ALBUMARTWRITER_TRUE@THEME_ICONS_RELATIVE = $(subst $(srcdir)/ThemeIcons/, , $(THEME_ICONS_SOURCE)) +@ENABLE_ALBUMARTWRITER_TRUE@ASSEMBLY_EXTENSION = $(strip $(patsubst library, dll, $(TARGET))) +@ENABLE_ALBUMARTWRITER_TRUE@ASSEMBLY_FILE = $(top_builddir)/bin/$(ASSEMBLY).$(ASSEMBLY_EXTENSION) +@ENABLE_ALBUMARTWRITER_TRUE@INSTALL_DIR_RESOLVED = $(firstword $(subst , $(DEFAULT_INSTALL_DIR), $(INSTALL_DIR))) +@ENABLE_ALBUMARTWRITER_TRUE@@ENABLE_TESTS_TRUE@ENABLE_TESTS_FLAG = "-define:ENABLE_TESTS" +@ENABLE_ALBUMARTWRITER_TRUE@FILTERED_LINK = $(shell echo "$(LINK)" | $(UNIQUE_FILTER_PIPE)) +@ENABLE_ALBUMARTWRITER_TRUE@DEP_LINK = $(shell echo "$(LINK)" | $(UNIQUE_FILTER_PIPE) | sed s,-r:,,g | grep '$(top_builddir)/bin/') +@ENABLE_ALBUMARTWRITER_TRUE@OUTPUT_FILES = \ +@ENABLE_ALBUMARTWRITER_TRUE@ $(ASSEMBLY_FILE) \ +@ENABLE_ALBUMARTWRITER_TRUE@ $(ASSEMBLY_FILE).mdb + +@ENABLE_ALBUMARTWRITER_TRUE@moduledir = $(EXTENSION_DIR) +@ENABLE_ALBUMARTWRITER_TRUE@module_SCRIPTS = $(OUTPUT_FILES) +@ENABLE_ALBUMARTWRITER_FALSE@EXTRA_DIST = $(SOURCES) $(RESOURCES) +@ENABLE_ALBUMARTWRITER_TRUE@EXTRA_DIST = $(SOURCES_BUILD) $(RESOURCES_EXPANDED) $(THEME_ICONS_SOURCE) +@ENABLE_ALBUMARTWRITER_TRUE@CLEANFILES = $(OUTPUT_FILES) TestResult.xml +@ENABLE_ALBUMARTWRITER_TRUE@DISTCLEANFILES = *.pidb +@ENABLE_ALBUMARTWRITER_TRUE@MAINTAINERCLEANFILES = Makefile.in +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/build/build.mk $(top_srcdir)/build/build.environment.mk $(top_srcdir)/build/build.rules.mk $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/AlbumArtWriter/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/AlbumArtWriter/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-moduleSCRIPTS: $(module_SCRIPTS) + @$(NORMAL_INSTALL) + test -z "$(moduledir)" || $(MKDIR_P) "$(DESTDIR)$(moduledir)" + @list='$(module_SCRIPTS)'; test -n "$(moduledir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n' \ + -e 'h;s|.*|.|' \ + -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) { files[d] = files[d] " " $$1; \ + if (++n[d] == $(am__install_max)) { \ + print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ + else { print "f", d "/" $$4, $$1 } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(moduledir)$$dir'"; \ + $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(moduledir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-moduleSCRIPTS: + @$(NORMAL_UNINSTALL) + @list='$(module_SCRIPTS)'; test -n "$(moduledir)" || exit 0; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 's,.*/,,;$(transform)'`; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(moduledir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(moduledir)" && rm -f $$files + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(SCRIPTS) +installdirs: + for dir in "$(DESTDIR)$(moduledir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +@ENABLE_ALBUMARTWRITER_FALSE@install-data-hook: +@ENABLE_ALBUMARTWRITER_FALSE@uninstall-hook: +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-moduleSCRIPTS + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) install-data-hook +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-moduleSCRIPTS + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) uninstall-hook +.MAKE: install-am install-data-am install-strip uninstall-am + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-data-hook install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-moduleSCRIPTS 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-hook \ + uninstall-moduleSCRIPTS + + +@ENABLE_ALBUMARTWRITER_TRUE@@ENABLE_TESTS_TRUE@test: $(ASSEMBLY_FILE) +@ENABLE_ALBUMARTWRITER_TRUE@@ENABLE_TESTS_TRUE@ if test "x$(TEST_ASSEMBLY)" = "xyes"; then \ +@ENABLE_ALBUMARTWRITER_TRUE@@ENABLE_TESTS_TRUE@ LD_LIBRARY_PATH="$(BANSHEE_LIBDIR):$(BANSHEE_EXTDIR):$(EXTENSION_DIR)/..:$(EXTENSION_DIR)${LD_LIBRARY_PATH+:$LD_LIBRARY_PATH}" \ +@ENABLE_ALBUMARTWRITER_TRUE@@ENABLE_TESTS_TRUE@ MONO_PATH="$(BANSHEE_LIBDIR):$(BANSHEE_EXTDIR):$(EXTENSION_DIR)/..:$(EXTENSION_DIR)${MONO_PATH+:$MONO_PATH}" \ +@ENABLE_ALBUMARTWRITER_TRUE@@ENABLE_TESTS_TRUE@ $(NUNIT_CONSOLE) -nologo -noshadow $(ASSEMBLY_FILE); \ +@ENABLE_ALBUMARTWRITER_TRUE@@ENABLE_TESTS_TRUE@ fi + +@ENABLE_ALBUMARTWRITER_TRUE@@ENABLE_TESTS_FALSE@test: + +@ENABLE_ALBUMARTWRITER_TRUE@check: test + +@ENABLE_ALBUMARTWRITER_TRUE@all: $(ASSEMBLY_FILE) theme-icons + +@ENABLE_ALBUMARTWRITER_TRUE@run: +@ENABLE_ALBUMARTWRITER_TRUE@ @pushd $(top_builddir); \ +@ENABLE_ALBUMARTWRITER_TRUE@ make run \ +@ENABLE_ALBUMARTWRITER_TRUE@ popd; + +@ENABLE_ALBUMARTWRITER_TRUE@build-debug: +@ENABLE_ALBUMARTWRITER_TRUE@ @echo $(DEP_LINK) + +@ENABLE_ALBUMARTWRITER_TRUE@$(ASSEMBLY_FILE).mdb: $(ASSEMBLY_FILE) + +@ENABLE_ALBUMARTWRITER_TRUE@$(ASSEMBLY_FILE): $(SOURCES_BUILD) $(RESOURCES_EXPANDED) $(DEP_LINK) +@ENABLE_ALBUMARTWRITER_TRUE@ @mkdir -p $(top_builddir)/bin +@ENABLE_ALBUMARTWRITER_TRUE@ $(MCS) \ +@ENABLE_ALBUMARTWRITER_TRUE@ $(GMCS_FLAGS) \ +@ENABLE_ALBUMARTWRITER_TRUE@ $(ENABLE_TESTS_FLAG) \ +@ENABLE_ALBUMARTWRITER_TRUE@ $(ASSEMBLY_BUILD_FLAGS) \ +@ENABLE_ALBUMARTWRITER_TRUE@ -debug -target:$(TARGET) -out:$@ \ +@ENABLE_ALBUMARTWRITER_TRUE@ $(BUILD_DEFINES) \ +@ENABLE_ALBUMARTWRITER_TRUE@ $(FILTERED_LINK) $(RESOURCES_BUILD) $(SOURCES_BUILD) +@ENABLE_ALBUMARTWRITER_TRUE@ @if [ -e $(srcdir)/$(notdir $@.config) ]; then \ +@ENABLE_ALBUMARTWRITER_TRUE@ cp $(srcdir)/$(notdir $@.config) $(top_builddir)/bin; \ +@ENABLE_ALBUMARTWRITER_TRUE@ fi; +@ENABLE_ALBUMARTWRITER_TRUE@ @if [ ! -z "$(EXTRA_BUNDLE)" ]; then \ +@ENABLE_ALBUMARTWRITER_TRUE@ cp $(EXTRA_BUNDLE) $(top_builddir)/bin; \ +@ENABLE_ALBUMARTWRITER_TRUE@ fi; + +@ENABLE_ALBUMARTWRITER_TRUE@theme-icons: $(THEME_ICONS_SOURCE) +@ENABLE_ALBUMARTWRITER_TRUE@ @$(INSTALL_ICONS) -il "$(BUILD_DATA_DIR)" "$(srcdir)" $(THEME_ICONS_RELATIVE) + +@ENABLE_ALBUMARTWRITER_TRUE@install-data-hook: $(THEME_ICONS_SOURCE) +@ENABLE_ALBUMARTWRITER_TRUE@ @$(INSTALL_ICONS) -i "$(DESTDIR)$(pkgdatadir)" "$(srcdir)" $(THEME_ICONS_RELATIVE) +@ENABLE_ALBUMARTWRITER_TRUE@ $(EXTRA_INSTALL_DATA_HOOK) + +@ENABLE_ALBUMARTWRITER_TRUE@uninstall-hook: $(THEME_ICONS_SOURCE) +@ENABLE_ALBUMARTWRITER_TRUE@ @$(INSTALL_ICONS) -u "$(DESTDIR)$(pkgdatadir)" "$(srcdir)" $(THEME_ICONS_RELATIVE) +@ENABLE_ALBUMARTWRITER_TRUE@ $(EXTRA_UNINSTALL_HOOK) + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -Nru banshee-community-extensions-2.0.1/src/Ampache/Makefile.in banshee-community-extensions-2.2.0/src/Ampache/Makefile.in --- banshee-community-extensions-2.0.1/src/Ampache/Makefile.in 2011-05-03 20:45:04.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Ampache/Makefile.in 2011-09-19 20:36:50.000000000 +0000 @@ -42,6 +42,7 @@ subdir = src/Ampache ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/m4/extensions/alarmclock.m4 \ + $(top_srcdir)/build/m4/extensions/albumartwriter.m4 \ $(top_srcdir)/build/m4/extensions/ampache.m4 \ $(top_srcdir)/build/m4/extensions/appindicator.m4 \ $(top_srcdir)/build/m4/extensions/awn.m4 \ @@ -49,6 +50,7 @@ $(top_srcdir)/build/m4/extensions/clutterflow.m4 \ $(top_srcdir)/build/m4/extensions/common.m4 \ $(top_srcdir)/build/m4/extensions/coverwallpaper.m4 \ + $(top_srcdir)/build/m4/extensions/duplicatesongdetector.m4 \ $(top_srcdir)/build/m4/extensions/jamendo.m4 \ $(top_srcdir)/build/m4/extensions/karaoke.m4 \ $(top_srcdir)/build/m4/extensions/lastfmfingerprint.m4 \ @@ -68,6 +70,11 @@ $(top_srcdir)/build/m4/shamrock/expansions.m4 \ $(top_srcdir)/build/m4/shamrock/gnome-doc.m4 \ $(top_srcdir)/build/m4/shamrock/i18n.m4 \ + $(top_srcdir)/build/m4/shamrock/libtool.m4 \ + $(top_srcdir)/build/m4/shamrock/ltoptions.m4 \ + $(top_srcdir)/build/m4/shamrock/ltsugar.m4 \ + $(top_srcdir)/build/m4/shamrock/ltversion.m4 \ + $(top_srcdir)/build/m4/shamrock/lt~obsolete.m4 \ $(top_srcdir)/build/m4/shamrock/mono.m4 \ $(top_srcdir)/build/m4/shamrock/nunit.m4 \ $(top_srcdir)/build/m4/shamrock/programs.m4 \ @@ -104,7 +111,6 @@ DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AM_MAKEFLAGS = @AM_MAKEFLAGS@ diff -Nru banshee-community-extensions-2.0.1/src/AppIndicator/Makefile.in banshee-community-extensions-2.2.0/src/AppIndicator/Makefile.in --- banshee-community-extensions-2.0.1/src/AppIndicator/Makefile.in 2011-05-03 20:45:04.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/AppIndicator/Makefile.in 2011-09-19 20:36:50.000000000 +0000 @@ -42,6 +42,7 @@ subdir = src/AppIndicator ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/m4/extensions/alarmclock.m4 \ + $(top_srcdir)/build/m4/extensions/albumartwriter.m4 \ $(top_srcdir)/build/m4/extensions/ampache.m4 \ $(top_srcdir)/build/m4/extensions/appindicator.m4 \ $(top_srcdir)/build/m4/extensions/awn.m4 \ @@ -49,6 +50,7 @@ $(top_srcdir)/build/m4/extensions/clutterflow.m4 \ $(top_srcdir)/build/m4/extensions/common.m4 \ $(top_srcdir)/build/m4/extensions/coverwallpaper.m4 \ + $(top_srcdir)/build/m4/extensions/duplicatesongdetector.m4 \ $(top_srcdir)/build/m4/extensions/jamendo.m4 \ $(top_srcdir)/build/m4/extensions/karaoke.m4 \ $(top_srcdir)/build/m4/extensions/lastfmfingerprint.m4 \ @@ -68,6 +70,11 @@ $(top_srcdir)/build/m4/shamrock/expansions.m4 \ $(top_srcdir)/build/m4/shamrock/gnome-doc.m4 \ $(top_srcdir)/build/m4/shamrock/i18n.m4 \ + $(top_srcdir)/build/m4/shamrock/libtool.m4 \ + $(top_srcdir)/build/m4/shamrock/ltoptions.m4 \ + $(top_srcdir)/build/m4/shamrock/ltsugar.m4 \ + $(top_srcdir)/build/m4/shamrock/ltversion.m4 \ + $(top_srcdir)/build/m4/shamrock/lt~obsolete.m4 \ $(top_srcdir)/build/m4/shamrock/mono.m4 \ $(top_srcdir)/build/m4/shamrock/nunit.m4 \ $(top_srcdir)/build/m4/shamrock/programs.m4 \ @@ -104,7 +111,6 @@ DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AM_MAKEFLAGS = @AM_MAKEFLAGS@ diff -Nru banshee-community-extensions-2.0.1/src/AssemblyInfo.cs banshee-community-extensions-2.2.0/src/AssemblyInfo.cs --- banshee-community-extensions-2.0.1/src/AssemblyInfo.cs 2011-05-03 20:45:15.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/AssemblyInfo.cs 2011-09-19 20:37:01.000000000 +0000 @@ -1,5 +1,5 @@ using System.Reflection; using System.Runtime.CompilerServices; -[assembly: AssemblyVersion("2.0.1")] +[assembly: AssemblyVersion("2.2.0")] diff -Nru banshee-community-extensions-2.0.1/src/Awn/Banshee.Awn/AwnPlugin.cs banshee-community-extensions-2.2.0/src/Awn/Banshee.Awn/AwnPlugin.cs --- banshee-community-extensions-2.0.1/src/Awn/Banshee.Awn/AwnPlugin.cs 2011-01-22 13:50:52.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Awn/Banshee.Awn/AwnPlugin.cs 2011-05-27 16:50:35.000000000 +0000 @@ -34,7 +34,7 @@ namespace Banshee.Awn { - [NDesk.DBus.Interface("com.google.code.Awn")] + [DBus.Interface("com.google.code.Awn")] public interface IAvantWindowNavigator { void SetTaskIconByName (string TaskName, string ImageFileLocation); @@ -74,8 +74,8 @@ try { Log.DebugFormat ("BansheeAwn. Starting {0}", Application.ActiveClient.ClientId); - awn = NDesk.DBus.Bus.Session.GetObject ("com.google.code.Awn", - new NDesk.DBus.ObjectPath ("/com/google/code/Awn")); + awn = DBus.Bus.Session.GetObject ("com.google.code.Awn", + new DBus.ObjectPath ("/com/google/code/Awn")); // Dummy call to check that awn is really there awn.UnsetTaskIconByName ("banshee-dummy"); diff -Nru banshee-community-extensions-2.0.1/src/Awn/Makefile.in banshee-community-extensions-2.2.0/src/Awn/Makefile.in --- banshee-community-extensions-2.0.1/src/Awn/Makefile.in 2011-05-03 20:45:04.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Awn/Makefile.in 2011-09-19 20:36:50.000000000 +0000 @@ -42,6 +42,7 @@ subdir = src/Awn ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/m4/extensions/alarmclock.m4 \ + $(top_srcdir)/build/m4/extensions/albumartwriter.m4 \ $(top_srcdir)/build/m4/extensions/ampache.m4 \ $(top_srcdir)/build/m4/extensions/appindicator.m4 \ $(top_srcdir)/build/m4/extensions/awn.m4 \ @@ -49,6 +50,7 @@ $(top_srcdir)/build/m4/extensions/clutterflow.m4 \ $(top_srcdir)/build/m4/extensions/common.m4 \ $(top_srcdir)/build/m4/extensions/coverwallpaper.m4 \ + $(top_srcdir)/build/m4/extensions/duplicatesongdetector.m4 \ $(top_srcdir)/build/m4/extensions/jamendo.m4 \ $(top_srcdir)/build/m4/extensions/karaoke.m4 \ $(top_srcdir)/build/m4/extensions/lastfmfingerprint.m4 \ @@ -68,6 +70,11 @@ $(top_srcdir)/build/m4/shamrock/expansions.m4 \ $(top_srcdir)/build/m4/shamrock/gnome-doc.m4 \ $(top_srcdir)/build/m4/shamrock/i18n.m4 \ + $(top_srcdir)/build/m4/shamrock/libtool.m4 \ + $(top_srcdir)/build/m4/shamrock/ltoptions.m4 \ + $(top_srcdir)/build/m4/shamrock/ltsugar.m4 \ + $(top_srcdir)/build/m4/shamrock/ltversion.m4 \ + $(top_srcdir)/build/m4/shamrock/lt~obsolete.m4 \ $(top_srcdir)/build/m4/shamrock/mono.m4 \ $(top_srcdir)/build/m4/shamrock/nunit.m4 \ $(top_srcdir)/build/m4/shamrock/programs.m4 \ @@ -104,7 +111,6 @@ DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AM_MAKEFLAGS = @AM_MAKEFLAGS@ diff -Nru banshee-community-extensions-2.0.1/src/ClutterFlow/Banshee.ClutterFlow/AlbumComparer.cs banshee-community-extensions-2.2.0/src/ClutterFlow/Banshee.ClutterFlow/AlbumComparer.cs --- banshee-community-extensions-2.0.1/src/ClutterFlow/Banshee.ClutterFlow/AlbumComparer.cs 1970-01-01 00:00:00.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/ClutterFlow/Banshee.ClutterFlow/AlbumComparer.cs 2011-05-29 17:37:16.000000000 +0000 @@ -0,0 +1,95 @@ +// +// AlbumComparer.cs +// +// Author: +// Mathijs Dumon +// +// Copyright (c) 2010 Mathijs Dumon +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +using System; +using System.Collections.Generic; + +using Banshee.Collection; + +namespace Banshee.ClutterFlow +{ + public enum SortOptions { Artist = 0 , Album = 1 } + + public interface ISortComparer : IComparer + { + string GetSortLabel (T obj); + } + + public abstract class AlbumComparer : ISortComparer + { + protected virtual string GetTitle (AlbumInfo obj) + { + return (obj.TitleSort ?? obj.Title ?? obj.DisplayTitle ?? ""); + } + + protected virtual string GetArtist (AlbumInfo obj) + { + return (obj.ArtistNameSort ?? obj.ArtistName ?? obj.DisplayArtistName ?? ""); + } + + public abstract int Compare (AlbumInfo x, AlbumInfo y); + public abstract string GetSortLabel (AlbumInfo obj); + } + + public class AlbumAlbumComparer : AlbumComparer + { + + public override string GetSortLabel (AlbumInfo obj) + { + if (obj!=null) { + return obj.TitleSort ?? obj.Title ?? "?"; + } else { + return "?"; + } + } + + public override int Compare (AlbumInfo x, AlbumInfo y) + { + string tx = GetTitle(x) + GetArtist(x); + string ty = GetTitle(y) + GetArtist(y); + return tx.CompareTo(ty); + } + } + + public class AlbumArtistComparer : AlbumComparer + { + public override string GetSortLabel (AlbumInfo obj) + { + if (obj!=null) { + return obj.ArtistNameSort ?? obj.ArtistName ?? "?"; + } else { + return "?"; + } + } + + public override int Compare (AlbumInfo x, AlbumInfo y) + { + string tx = GetArtist(x) + GetTitle(x); + string ty = GetArtist(y) + GetTitle(y); + return tx.CompareTo(ty); + } + } +} \ No newline at end of file diff -Nru banshee-community-extensions-2.0.1/src/ClutterFlow/Banshee.ClutterFlow/AlbumLoader.cs banshee-community-extensions-2.2.0/src/ClutterFlow/Banshee.ClutterFlow/AlbumLoader.cs --- banshee-community-extensions-2.0.1/src/ClutterFlow/Banshee.ClutterFlow/AlbumLoader.cs 2011-05-03 19:59:59.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/ClutterFlow/Banshee.ClutterFlow/AlbumLoader.cs 2011-05-30 16:40:29.000000000 +0000 @@ -28,254 +28,125 @@ using System.Collections.Generic; using Banshee.Collection; -using Banshee.Collection.Database; -using Hyena.Data; using ClutterFlow; namespace Banshee.ClutterFlow { + public class AlbumLoader : IActorLoader + { + #region Events + public event EventHandler SortingChanged; - public interface ISortComparer : IComparer - { - string GetSortLabel (T obj); - } - - public abstract class AlbumComparer : ISortComparer - { - protected virtual string GetTitle (AlbumInfo obj) - { - return (obj.TitleSort ?? obj.Title ?? obj.DisplayTitle ?? ""); - } - - protected virtual string GetArtist (AlbumInfo obj) - { - return (obj.ArtistNameSort ?? obj.ArtistName ?? obj.DisplayArtistName ?? ""); - } - - public abstract int Compare (AlbumInfo x, AlbumInfo y); - public abstract string GetSortLabel (AlbumInfo obj); - } - - public class AlbumAlbumComparer : AlbumComparer - { - - public override string GetSortLabel (AlbumInfo obj) - { - if (obj!=null) { - return obj.TitleSort ?? obj.Title ?? "?"; - } else - return "?"; - } - - public override int Compare (AlbumInfo x, AlbumInfo y) - { - string tx = GetTitle(x) + GetArtist(x); - string ty = GetTitle(y) + GetArtist(y); - return tx.CompareTo(ty); - } - } - - public class AlbumArtistComparer : AlbumComparer - { - public override string GetSortLabel (AlbumInfo obj) - { - if (obj!=null) { - return obj.ArtistNameSort ?? obj.ArtistName ?? "?"; - } else - return "?"; - } - - public override int Compare (AlbumInfo x, AlbumInfo y) - { - string tx = GetArtist(x) + GetTitle(x); - string ty = GetArtist(y) + GetTitle(y); - return tx.CompareTo(ty); - } - } - - public enum SortOptions { Artist = 0 , Album = 1 } - - public abstract class BansheeActorLoader : ActorLoader where TGen : ICacheableItem, new() - { - - #region Fields - #pragma warning disable 0067 - public event EventHandler SortingChanged; - #pragma warning restore 0067 - protected void InvokeSortingChanged () - { - ClutterFlowSchemas.SortBy.Set (Enum.GetName(typeof(SortOptions), SortBy)); - if (SortingChanged!=null) SortingChanged (this, EventArgs.Empty); - } - - protected SortOptions sort_by = (SortOptions) Enum.Parse(typeof(SortOptions), ClutterFlowSchemas.SortBy.Get ()); - public virtual SortOptions SortBy { - get { return sort_by; } - set { - if (value!=sort_by) { - sort_by = value; - RefreshCoverManager (); - InvokeSortingChanged (); - } - } - } - - protected abstract ISortComparer Comparer { get; } - - private int count; //previous model count - - protected List index_map; //maps list indeces to model indeces - - private FilterListModel model; - public virtual FilterListModel Model { - get { return model; } - set { - if (value!=model) { - if (model != null) { - model.Cleared -= OnModelClearedHandler; - model.Reloaded -= OnModelReloadedHandler; - } - - model = value; - - if (model != null) { - model.Cleared += OnModelClearedHandler; - model.Reloaded += OnModelReloadedHandler; - count = model.Count; - } - RefreshCoverManager (); - } - } - } - #endregion - - public BansheeActorLoader (CoverManager coverManager) : base (coverManager) { } - public override void Dispose () - { - Model = null; - base.Dispose (); - } - - public override List GetActors (System.Action method_call) - { - SortedList list = - new SortedList(Comparer); - if (Model!=null) { - for (int i = 1; i < Model.Count; i++) - AddActorToList(Model[i], list); - index_map = new List(list.Values.Count); - for (int i = 0; i < list.Values.Count; i++) { - ClutterFlowBaseActor actor = list.Values[i]; - index_map.Add(actor.Index); - actor.Index = i; - if (method_call!=null) method_call(actor); - } - } - return new List(list.Values); - } - - public virtual int ConvertIndexToModelIndex (int index) - { - return (index_map!=null && index_map.Count > index) ? index_map[index] : 0; - } - - #region Event Handlers - protected void OnModelClearedHandler (object o, EventArgs args) - { - RefreshCoverManager (); - } - - protected void OnModelReloadedHandler (object o, EventArgs args) + protected void OnSortingChanged () { - if (count!=model.Count) { - count=model.Count; - RefreshCoverManager (); + var handler = SortingChanged; + if (handler != null) { + handler (this, EventArgs.Empty); } } #endregion - } - - public class AlbumLoader : BansheeActorLoader - { - #region Events - public event ActorEventHandler ActorActivated; - protected void InvokeActorActivated (ClutterFlowAlbum actor) { - if (ActorActivated!=null) ActorActivated (actor, EventArgs.Empty); - } - #endregion - #region Fields - protected static ISortComparer sort_by_name = new AlbumAlbumComparer (); - protected static ISortComparer sort_by_arst = new AlbumArtistComparer (); - - protected override ISortComparer Comparer { - get { - switch (SortBy) { - case SortOptions.Album: - return sort_by_name; - case SortOptions.Artist: - return sort_by_arst; - default: - return sort_by_name; - } - } - } - - public ClutterFlowAlbum CurrentActor { - get { return (ClutterFlowAlbum) CoverManager.CurrentCover; } - } - - public AlbumInfo CurrentAlbum { + private Dictionary cached_covers = new Dictionary (); + public Dictionary Cache { + get { return cached_covers; } + } + + protected static ISortComparer sort_by_name = new AlbumAlbumComparer (); + protected static ISortComparer sort_by_artist = new AlbumArtistComparer (); + + protected ISortComparer Comparer { get { - if (CoverManager.CurrentCover!=null && CoverManager.CurrentCover is ClutterFlowAlbum) - return (CoverManager.CurrentCover as ClutterFlowAlbum).Album; - else - return null; + switch (SortBy) { + case SortOptions.Album: + return sort_by_name; + case SortOptions.Artist: + return sort_by_artist; + default: + return sort_by_name; + } } } - public int CurrentIndex { - get { - if (CoverManager.CurrentCover!=null && CoverManager.CurrentCover is ClutterFlowAlbum) - return (CoverManager.CurrentCover as ClutterFlowAlbum).Index; - else - return -1; + + private SortOptions sort_by = (SortOptions) Enum.Parse(typeof(SortOptions), ClutterFlowSchemas.SortBy.Get ()); + public SortOptions SortBy { + get { return sort_by; } + set { + if (value != sort_by) { + sort_by = value; + ClutterFlowSchemas.SortBy.Set (Enum.GetName(typeof(SortOptions), SortBy)); + OnSortingChanged (); + } } } - #endregion - public AlbumLoader (CoverManager coverManager) : base (coverManager) - { + //maps list indices to model indices + private List index_map; + + private FilterListModel model; + public FilterListModel Model { + get { return model; } + set { model = value; } } + #endregion + + public AlbumLoader () + { } - public virtual void ScrollTo (AlbumInfo generator) + protected bool disposed = false; + public void Dispose () { - CoverManager.Timeline.Timeout = 500; //give 'm some time to load the song etc. - ScrollTo (ClutterFlowAlbum.CreateCacheKey (generator)); + if (disposed) { + return; + } + disposed = true; + + foreach (ClutterFlowBaseActor actor in cached_covers.Values) { + actor.Dispose (); + } + cached_covers.Clear (); } - - protected override ClutterFlowBaseActor AddActorToList (AlbumInfo generator, SortedList list) + + private ClutterFlowBaseActor AddActorToList (AlbumInfo generator, SortedList list, CoverManager cover_manager) { - if (generator == null) + if (generator == null) { generator = new AlbumInfo (AlbumInfo.UnknownAlbumTitle); + } string key = ClutterFlowAlbum.CreateCacheKey(generator); - ClutterFlowBaseActor actor = Cache.ContainsKey (key) ? Cache[key] : null; - if (actor==null) { - actor = new ClutterFlowAlbum (generator, CoverManager); - actor.Hide (); + ClutterFlowBaseActor actor = null; + if (!Cache.TryGetValue (key, out actor)) { + actor = new ClutterFlowAlbum (generator, cover_manager); + actor.Hide (); Cache.Add (key, actor); } - actor.SortLabel = Comparer.GetSortLabel(generator); + actor.SortLabel = Comparer.GetSortLabel (generator); list[generator] = actor; - actor.Index = list.Count; + actor.Index = list.Count; return actor; } - - public override void HandleActorActivated (ClutterFlowBaseActor actor, EventArgs args) - { - if (actor is ClutterFlowAlbum) - InvokeActorActivated (actor as ClutterFlowAlbum); - } + + public List GetActors (CoverManager cover_manager) + { + SortedList list = + new SortedList(Comparer); + if (Model != null) { + for (int i = 1; i < Model.Count; i++) { + AddActorToList(Model[i], list, cover_manager); + } + index_map = new List(list.Values.Count); + for (int i = 0; i < list.Values.Count; i++) { + ClutterFlowBaseActor actor = list.Values[i]; + index_map.Add(actor.Index); + actor.Index = i; + } + } + return new List(list.Values); + } + + public int ConvertIndexToModelIndex (int index) + { + return (index_map != null && index_map.Count > index) ? index_map[index] : 0; + } } } diff -Nru banshee-community-extensions-2.0.1/src/ClutterFlow/Banshee.ClutterFlow/ArtworkLookup.cs banshee-community-extensions-2.2.0/src/ClutterFlow/Banshee.ClutterFlow/ArtworkLookup.cs --- banshee-community-extensions-2.0.1/src/ClutterFlow/Banshee.ClutterFlow/ArtworkLookup.cs 2011-04-04 19:55:19.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/ClutterFlow/Banshee.ClutterFlow/ArtworkLookup.cs 2011-05-30 19:59:41.000000000 +0000 @@ -44,132 +44,130 @@ /// /// The ArtworkLookup class is an asynchronous worker thread processing artwork lookups. /// - public class ArtworkLookup : IDisposable { - - #region Fields - private ArtworkManager artwork_manager; - - private CoverManager coverManager; - public CoverManager CoverManager { - get { return coverManager; } - } - - public object SyncRoot { - get { return LookupQueue.SyncRoot; } - } - private FloatingQueue LookupQueue = new FloatingQueue (); - - protected bool threaded = false; - public bool Threaded { - get { return threaded; } - } - - protected readonly object stopLock = new object (); // Lock covering stopping and stopped - protected bool stopping = false; // Whether or not the worker thread has been asked to stop - protected bool stopped = true; // Whether or not the worker thread has stopped - - /// - /// Returns whether the worker thread has been asked to stop. - /// This continues to return true even after the thread has stopped. - /// - public bool Stopping { - get { lock (stopLock) { return stopping; } } + public class ArtworkLookup : IDisposable { + + #region Fields + private ArtworkManager artwork_manager; + + private CoverManager cover_manager; + + public object SyncRoot { + get { return LookupQueue.SyncRoot; } + } + private FloatingQueue LookupQueue = new FloatingQueue (); + + // Lock covering stopping and stopped + protected readonly object stopLock = new object (); + // Whether or not the worker thread has been asked to stop + protected bool stopping = false; + // Whether or not the worker thread has stopped + protected bool stopped = true; + + /// + /// Returns whether the worker thread has been asked to stop. + /// This continues to return true even after the thread has stopped. + /// + public bool Stopping { + get { lock (stopLock) { return stopping; } } protected set { lock (stopLock) { stopping = value; } } - } - - //// - // Returns whether the worker thread has stopped. - /// - public bool Stopped { - get { return t!=null ? (t.ThreadState == ThreadState.Stopped) : true; } - } - #endregion - - Thread t; - public ArtworkLookup (CoverManager coverManager) - { - //Log.Debug ("ArtworkLookup ctor ()"); - this.coverManager = coverManager; - CoverManager.TargetIndexChanged += HandleTargetIndexChanged; - artwork_manager = ServiceManager.Get (); - artwork_manager.AddCachedSize (CoverManager.TextureSize); - - threaded = ClutterFlowSchemas.ThreadedArtwork.Get (); - //Start (); - } - - #region Queueing and index hinting - public void Enqueue (ClutterFlowAlbum cover) - { + } + + //// + // Returns whether the worker thread has stopped. + /// + public bool Stopped { + get { return artwork_thread != null ? (artwork_thread.ThreadState == ThreadState.Stopped) : true; } + } + #endregion + + Thread artwork_thread; + public ArtworkLookup (CoverManager cover_manager) + { + //Log.Debug ("ArtworkLookup ctor ()"); + this.cover_manager = cover_manager; + this.cover_manager.TargetIndexChanged += HandleTargetIndexChanged; + artwork_manager = ServiceManager.Get (); + artwork_manager.AddCachedSize (cover_manager.TextureSize); + } + + #region Queueing and index hinting + public void Enqueue (ClutterFlowAlbum cover) + { if (!cover.Enqueued) { cover.Enqueued = true; - if (threaded) { - LookupQueue.Enqueue (cover); - Start (); - } else - LoadUnthreaded (cover); - } - } - - private int new_focus = -1; - private object focusLock = new object (); - protected void HandleTargetIndexChanged(object sender, EventArgs e) - { - //Log.Debug ("ArtworkLookup HandleTargetIndexChanged locking focusLock"); - lock (focusLock) { - //Log.Debug ("ArtworkLookup HandleTargetIndexChanged locked focusLock"); - new_focus = coverManager.TargetIndex; - } - } - #endregion - - #region Start/Stop Handling + LookupQueue.Enqueue (cover); + Start (); + } + } + + private int new_focus = -1; + private object focusLock = new object (); + protected void HandleTargetIndexChanged(object sender, EventArgs e) + { + //Log.Debug ("ArtworkLookup HandleTargetIndexChanged locking focusLock"); + lock (focusLock) { + //Log.Debug ("ArtworkLookup HandleTargetIndexChanged locked focusLock"); + new_focus = cover_manager.TargetIndex; + } + } + #endregion + + #region Start/Stop Handling protected bool disposed = false; - public virtual void Dispose () - { - if (disposed) + public virtual void Dispose () + { + if (disposed) { return; + } disposed = true; - CoverManager.TargetIndexChanged -= HandleTargetIndexChanged; - Log.Debug ("ArtworkLookup Dispose ()"); - Stop (); + cover_manager.TargetIndexChanged -= HandleTargetIndexChanged; + + Stop (); LookupQueue.Dispose (); - } - - // Tells the worker thread to stop, typically after completing its - // current work item. (The thread is *not* guaranteed to have stopped - // by the time this method returns.) - public void Stop () - { + } + + // Tells the worker thread to stop, typically after completing its + // current work item. (The thread is *not* guaranteed to have stopped + // by the time this method returns.) + public void Stop () + { Log.Debug ("ArtworkLookup Stop ()"); Stopping = true; - if (SyncRoot!=null) lock (SyncRoot) { - Monitor.Pulse (SyncRoot); + if (SyncRoot != null) { + lock (SyncRoot) { + Monitor.Pulse (SyncRoot); + } + } + if (artwork_thread != null) { + artwork_thread.Join (); } - if (t!=null) t.Join (); - } + } public void Start () { - if (t==null) { - t = new Thread (new ThreadStart (Run)); - t.Priority = ThreadPriority.BelowNormal; + if (artwork_thread == null) { + artwork_thread = new Thread (new ThreadStart (Run)); + artwork_thread.Priority = ThreadPriority.BelowNormal; stopping = false; - t.Start (); - } else if (t.ThreadState == ThreadState.Unstarted) { + artwork_thread.Start (); + } else if (artwork_thread.ThreadState == ThreadState.Unstarted) { stopping = false; - t.Start (); + artwork_thread.Start (); } } - #endregion - - // Main work loop of the class. - private void Run () - { - if (!disposed) try { + #endregion + + // Main work loop of the class. + private void Run () + { + if (disposed) { + return; + } + + try { Log.Debug ("ArtworkLookup Run ()"); - while (!Stopping) { + while (!Stopping) { //Log.Debug ("ArtworkLookup Run locking focusLock"); lock (focusLock) { //Log.Debug ("ArtworkLookup Run locked focusLock"); @@ -178,49 +176,37 @@ new_focus = -1; } - while (!Stopping && LookupQueue!=null && LookupQueue.Count==0) { - lock (SyncRoot) { + while (!Stopping && LookupQueue != null && LookupQueue.Count == 0) { + lock (SyncRoot) { //Log.Debug ("ArtworkLookup Run - waiting for pulse"); - bool ret = Monitor.Wait (SyncRoot, 5000); + bool ret = Monitor.Wait (SyncRoot, 5000); if (!ret) Stopping = true; //Log.Debug ("ArtworkLookup Run - pulsed"); - } - } - if (Stopping) return; - t.IsBackground = false; - ClutterFlowAlbum cover = LookupQueue.Dequeue (); - float size = cover.CoverManager.TextureSize; - string cache_id = cover.PbId; - Cairo.ImageSurface surface = artwork_manager.LookupScaleSurface(cache_id, (int) size); - if (surface!=null) { + } + } + if (Stopping) { + return; + } + ClutterFlowAlbum cover = LookupQueue.Dequeue (); + float size = cover_manager.TextureSize; + string cache_id = cover.PbId; + Cairo.ImageSurface surface = artwork_manager.LookupScaleSurface (cache_id, (int) size); + if (surface != null) { Gtk.Application.Invoke (delegate { - SetCoverToSurface(cover, surface); + SetCoverToSurface (cover, surface); }); - } - t.IsBackground = true; - } - } finally { - Log.Debug ("ArtworkLookup stopped"); - threaded = ClutterFlowSchemas.ThreadedArtwork.Get (); - t = null; - } - } - - private void LoadUnthreaded (ClutterFlowAlbum cover) - { - float size = cover.CoverManager.TextureSize; - string cache_id = cover.PbId; - Cairo.ImageSurface surface = artwork_manager.LookupScaleSurface(cache_id, (int) size); - if (surface!=null) { - SetCoverToSurface(cover, surface); + } + } + } finally { + Log.Debug ("ArtworkLookup Run done"); } } private void SetCoverToSurface (ClutterFlowAlbum cover, Cairo.ImageSurface surface) { - cover.Enqueued = false; - //cover.SwappedToDefault = false; - ClutterFlowActor.MakeReflection(surface, cover.Cover); + cover.Enqueued = false; + //cover.SwappedToDefault = false; + ClutterFlowActor.MakeReflection (surface, cover.Cover); } - } + } } diff -Nru banshee-community-extensions-2.0.1/src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowAlbum.cs banshee-community-extensions-2.2.0/src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowAlbum.cs --- banshee-community-extensions-2.0.1/src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowAlbum.cs 2010-12-16 17:52:01.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowAlbum.cs 2011-06-09 21:11:19.000000000 +0000 @@ -35,52 +35,42 @@ using ClutterFlow; namespace Banshee.ClutterFlow -{ - /// +{ + /// /// A ClutterFlowAlbum is a subclass of the ClutterFlowActor class, containing /// banshee related Album art fetching code. /// - public class ClutterFlowAlbum : ClutterFlowActor, IEquatable - { - #region Fields - protected static ArtworkLookup lookup; - public static ArtworkLookup Lookup { - get { return lookup; } - set { lookup = value; } - } - - protected AlbumInfo album; - public virtual AlbumInfo Album { - get { return album; } - set { - if (album!=value) { - album = value; - Lookup.Enqueue (this); - } - } - } - - public virtual string PbId { - get { return Album!=null ? Album.ArtworkId : "NOT FOUND"; } - } - - public override string CacheKey { - get { return CreateCacheKey(album); } - set { - throw new System.NotImplementedException ("CacheKey cannot be set directly in a ClutterFlowAlbum," + - "derived from the Album property."); //TODO should use reflection here - } - } - public static string CreateCacheKey(AlbumInfo album) { - return album!=null ? album.ArtistName + "\n" + album.Title : ""; - } - - public override string Label { - get { return album!=null ? album.ArtistName + "\n" + album.Title : ""; } - set { - throw new System.NotImplementedException ("Label cannot be set directly in a ClutterFlowAlbum, derived from the Album property."); - } - } + public class ClutterFlowAlbum : ClutterFlowActor, IEquatable + { + #region Fields + private static ArtworkLookup artwork_lookup; + + private AlbumInfo album; + public AlbumInfo Album { + get { return album; } + set { + if (album != value) { + album = value; + artwork_lookup.Enqueue (this); + } + } + } + + public virtual string PbId { + get { return Album != null ? Album.ArtworkId : "NOT FOUND"; } + } + + public override string CacheKey { + get { return CreateCacheKey (album); } + } + public static string CreateCacheKey (AlbumInfo album) + { + return album != null ? album.ArtistName + "\n" + album.Title : ""; + } + + public override string Label { + get { return album != null ? album.ArtistName + "\n" + album.Title : ""; } + } object sync = new object(); bool enqueued = false; @@ -88,48 +78,31 @@ get { lock (sync) { return enqueued; } } internal set { lock (sync) { enqueued = value; } } } - #endregion + #endregion + + #region Initialization + public ClutterFlowAlbum (AlbumInfo album, CoverManager coverManager) : base (coverManager) + { + this.album = album; + if (artwork_lookup == null) { + artwork_lookup = new ArtworkLookup (CoverManager); + } + artwork_lookup.Enqueue(this); + } - #region Initialization - public ClutterFlowAlbum (AlbumInfo album, CoverManager coverManager) : base (coverManager, null) - { - this.album = album; - Lookup.Enqueue(this); - } - protected override bool SetupStatics () - { - if (lookup==null) lookup = new ArtworkLookup (CoverManager); - return base.SetupStatics (); - } - protected override void DisposeStatics () + public override void Dispose () { - if (lookup!=null) lookup.Dispose (); - lookup = null; - base.DisposeStatics (); - } - #endregion - - #region Texture Handling - protected override Cairo.ImageSurface GetDefaultSurface () - { - Cairo.ImageSurface surface = new Cairo.ImageSurface(Cairo.Format.ARGB32, CoverManager.TextureSize, CoverManager.TextureSize); - Cairo.Context context = new Cairo.Context(surface); - Gdk.CairoHelper.SetSourcePixbuf(context, IconThemeUtils.LoadIcon (CoverManager.TextureSize, "media-optical", "browser-album-cover"), 0, 0); - context.Paint(); - //((IDisposable) context.Target).Dispose(); - ((IDisposable) context).Dispose(); - return surface; - } - - protected override void HandleTextureSizeChanged (object sender, System.EventArgs e) - { - Lookup.Enqueue(this); - } - #endregion - - public virtual bool Equals (ClutterFlowAlbum other) - { - return other.CacheKey==this.CacheKey; - } - } + if (artwork_lookup != null) { + artwork_lookup.Dispose (); + } + artwork_lookup = null; + base.Dispose (); + } + #endregion + + public virtual bool Equals (ClutterFlowAlbum other) + { + return other.CacheKey == this.CacheKey; + } + } } diff -Nru banshee-community-extensions-2.0.1/src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowContents.cs banshee-community-extensions-2.2.0/src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowContents.cs --- banshee-community-extensions-2.0.1/src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowContents.cs 2010-12-16 14:54:53.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowContents.cs 2011-06-09 21:11:19.000000000 +0000 @@ -55,26 +55,26 @@ public class ClutterFlowContents : VBox, ISourceContents, ITrackModelSourceContents { - #region Fields + #region Fields - //WIDGETS: - private Paned container; - public Paned Container { - get { return container; } - } - - private Hyena.Widgets.RoundedFrame frame; - private ClutterFlowView filter_view; - public ClutterFlowView FilterView { - get { return filter_view; } - } + //WIDGETS: + private Paned container; + public Paned Container { + get { return container; } + } + + private Hyena.Widgets.RoundedFrame frame; + private ClutterFlowView filter_view; + public ClutterFlowView FilterView { + get { return filter_view; } + } - private Gtk.Expander main_expander; - private TrackListView main_view; + private Gtk.Expander main_expander; + private TrackListView main_view; public TrackListView TrackView { get { return main_view; } } - IListView ITrackModelSourceContents.TrackView { + IListView ITrackModelSourceContents.TrackView { get { return TrackView; } } @@ -82,17 +82,17 @@ get { return this; } } - //FULLSCREEN HANDLING: + //FULLSCREEN HANDLING: private Gtk.Window video_window; private FullscreenAdapter fullscreen_adapter; private ScreensaverManager screensaver; - - protected bool is_fullscreen = false; - public bool IsFullscreen { - get { return is_fullscreen; } - } - - //SOURCE, TRACKMODEL & (ALBUM) FILTERS: + + protected bool is_fullscreen = false; + public bool IsFullscreen { + get { return is_fullscreen; } + } + + //SOURCE, TRACKMODEL & (ALBUM) FILTERS: protected MusicLibrarySource source; public ISource Source { get { return source; } @@ -104,70 +104,76 @@ protected FilterListModel external_filter; //this is actually fetched from the MusicLibrary - //PLAYBACK RELATED: - private TrackInfo transitioned_track; + //PLAYBACK RELATED: + private TrackInfo transitioned_track; private bool IsParentSource { get { return ServiceManager.PlaybackController.Source!=null && ServiceManager.PlaybackController.Source.Parent==source; } } - private bool IsActiveSource { - get { return ServiceManager.SourceManager.ActiveSource==source; } - } - private bool IsPlaybackSource { - get { return ServiceManager.PlaybackController.Source==source; } - } - private bool InPartyMode { - get { - return (external_filter!=null && (IsPlaybackSource || IsParentSource) && IsActiveSource && external_filter.Selection.AllSelected); - } - } - - //GENERIC: - private string name; - #endregion - - #region Initialising + private bool IsActiveSource { + get { return ServiceManager.SourceManager.ActiveSource==source; } + } + private bool IsPlaybackSource { + get { return ServiceManager.PlaybackController.Source==source; } + } + private bool InPartyMode { + get { + return (external_filter!=null && (IsPlaybackSource || IsParentSource) && IsActiveSource && external_filter.Selection.AllSelected); + } + } + + //GENERIC: + private string name; + #endregion + + #region Initialising public ClutterFlowContents () { - name = "ClutterFlowView"; - InitializeInterface (); - Layout (); - SetupFullscreenHandling (); - SetupPlaybackHandling (); + name = "ClutterFlowView"; + InitializeInterface (); + Layout (); + SetupFullscreenHandling (); + SetupPlaybackHandling (); NoShowAll = true; } protected bool disposed = false; public override void Dispose () { - if (disposed) + if (disposed) { return; + } disposed = true; ResetSource (); video_window.Hidden -= OnFullscreenWindowHidden; - FilterView.UpdatedAlbum -= HandleUpdatedAlbum; - FilterView.PMButton.Toggled -= HandlePMButtonToggled; - FilterView.FSButton.Toggled -= HandleFSButtonToggled; + filter_view.UpdatedAlbum -= HandleUpdatedAlbum; + filter_view.PMButton.Toggled -= HandlePMButtonToggled; + filter_view.FSButton.Toggled -= HandleFSButtonToggled; + filter_view.SortButton.Toggled -= HandleSortButtonToggled; + + FilterView.AlbumLoader.SortingChanged -= HandleSortingChanged; ServiceManager.SourceManager.ActiveSourceChanged -= HandleActiveSourceChanged; ServiceManager.PlaybackController.TrackStarted -= OnPlaybackControllerTrackStarted; ServiceManager.PlaybackController.SourceChanged -= OnPlaybackSourceChanged; - ServiceManager.PlayerEngine.DisconnectEvent (OnPlayerEvent); + ServiceManager.PlayerEngine.DisconnectEvent (OnPlayerEvent); Reset (); - if (filter_view.Parent!=null) frame.Remove (filter_view); - filter_view.DetachEvents (); + if (filter_view.Parent != null) { + frame.Remove (filter_view); + } + filter_view.Dispose (); fullscreen_adapter.Dispose (); screensaver.Dispose (); base.Dispose (); } - #endregion + #endregion - #region Packing & Resetting + #region Packing & Resetting private void Layout () { Reset (); @@ -177,21 +183,21 @@ frame = new Hyena.Widgets.RoundedFrame (); frame.SetFillColor (new Cairo.Color (0, 0, 0)); frame.DrawBorder = false; - frame.Add (filter_view); - filter_view.Show(); + frame.Add (filter_view); + filter_view.Show(); frame.Show (); - container.Pack1 (frame, false, false); + container.Pack1 (frame, false, false); main_expander.Activated += OnExpander; main_expander.SizeRequested += HandleSizeRequested; container.Pack2 (main_expander, true, false); container.Position = 175; PersistentPaneController.Control (container, ControllerName (-1)); - + ShowPack (); } - + private string ControllerName (int filter) { if (filter == -1) @@ -212,21 +218,21 @@ { // The main container gets destroyed since it will be recreated. if (container != null) { - if (frame != null) container.Remove (frame); - if (main_expander != null) container.Remove (main_expander); + if (frame != null) container.Remove (frame); + if (main_expander != null) container.Remove (main_expander); main_expander.Activated -= OnExpander; main_expander.SizeRequested -= HandleSizeRequested; Remove (container); } } - #endregion - - #region View Setup - + #endregion + + #region View Setup + protected void InitializeInterface () { SetupMainView (); - SetupFilterView (); + SetupFilterView (); } protected void SetupMainView () @@ -238,14 +244,14 @@ } protected void SetupFilterView () - { - filter_view = ClutterFlowManager.FilterView; - filter_view.FSButton.IsActive = IsFullscreen; - filter_view.PMButton.IsActive = InPartyMode; - filter_view.LabelTrackIsVisible = ClutterFlowSchemas.DisplayTitle.Get () && IsFullscreen; - filter_view.SortButton.IsActive = (ClutterFlowSchemas.SortBy.Get () != ClutterFlowSchemas.SortBy.DefaultValue); + { + filter_view = new ClutterFlowView (); + filter_view.FSButton.IsActive = IsFullscreen; + filter_view.PMButton.IsActive = InPartyMode; + filter_view.LabelTrackIsVisible = ClutterFlowSchemas.DisplayTitle.Get () && IsFullscreen; + filter_view.SortButton.IsActive = (ClutterFlowSchemas.SortBy.Get () != ClutterFlowSchemas.SortBy.DefaultValue); } - + private Expander CreateScrollableExpander (Widget view) { ScrolledWindow window = null; @@ -278,38 +284,38 @@ if (!main_expander.Expanded) container.Position = container.Allocation.Height - main_expander.LabelWidget.HeightRequest; } - #endregion + #endregion + + #region Fullscreen Handling - #region Fullscreen Handling + protected void SetupFullscreenHandling () + { + GtkElementsService service = ServiceManager.Get (); - protected void SetupFullscreenHandling () - { - GtkElementsService service = ServiceManager.Get (); - fullscreen_adapter = new FullscreenAdapter (); screensaver = new ScreensaverManager (); - + video_window = new FullscreenWindow (service.PrimaryWindow); video_window.Hidden += OnFullscreenWindowHidden; video_window.Realize (); - } - - protected override void OnMapped () - { - OverrideFullscreen (); - base.OnMapped (); - } - - protected override void OnUnmapped () - { - RelinquishFullscreen (); - base.OnUnmapped (); - } + } + + protected override void OnMapped () + { + OverrideFullscreen (); + base.OnMapped (); + } + + protected override void OnUnmapped () + { + RelinquishFullscreen (); + base.OnUnmapped (); + } #region Video Fullscreen Override private ViewActions.FullscreenHandler previous_fullscreen_handler; - + private void DisableFullscreenAction () { InterfaceActionService service = ServiceManager.Get (); @@ -344,33 +350,33 @@ service.ViewActions.Fullscreen = previous_fullscreen_handler; } - + private void OnFullscreenWindowHidden (object o, EventArgs args) { MoveVideoInternal (); DisableFullscreenAction (); } - private bool handlingFullScreen = false; + private bool handlingFullScreen = false; private void FullscreenHandler (bool fullscreen) { - if (!handlingFullScreen) { - handlingFullScreen = true; - FilterView.FSButton.IsActive = fullscreen; - FilterView.LabelTrackIsVisible = ClutterFlowSchemas.DisplayTitle.Get () && fullscreen; - if (fullscreen) { - MoveVideoExternal (true); - video_window.Show (); - fullscreen_adapter.Fullscreen (video_window, true); - screensaver.Inhibit (); - } else { - video_window.Hide (); - screensaver.UnInhibit (); - fullscreen_adapter.Fullscreen (video_window, false); - video_window.Hide (); - } - handlingFullScreen = false; - } + if (!handlingFullScreen) { + handlingFullScreen = true; + FilterView.FSButton.IsActive = fullscreen; + FilterView.LabelTrackIsVisible = ClutterFlowSchemas.DisplayTitle.Get () && fullscreen; + if (fullscreen) { + MoveVideoExternal (true); + video_window.Show (); + fullscreen_adapter.Fullscreen (video_window, true); + screensaver.Inhibit (); + } else { + video_window.Hide (); + screensaver.UnInhibit (); + fullscreen_adapter.Fullscreen (video_window, false); + video_window.Hide (); + } + handlingFullScreen = false; + } } #endregion @@ -381,206 +387,220 @@ filter_view.Reparent (video_window); filter_view.Show (); } - is_fullscreen = true; - if (hidden) - video_window.Hide(); - else - video_window.Show(); + is_fullscreen = true; + if (hidden) + video_window.Hide(); + else + video_window.Show(); } private void MoveVideoInternal () { if (filter_view.Parent != frame) { - if (filter_view.Parent != null) - (filter_view.Parent as Container).Remove (filter_view); - frame.Add (filter_view); - frame.QueueDraw (); - } - is_fullscreen = false; - ShowPack (); - - } - #endregion - - #region Playback Handling - - private void SetupPlaybackHandling () - { - FilterView.UpdatedAlbum += HandleUpdatedAlbum; - FilterView.PMButton.Toggled += HandlePMButtonToggled; - FilterView.FSButton.Toggled += HandleFSButtonToggled; - FilterView.SortButton.Toggled += HandleSortButtonToggled; + if (filter_view.Parent != null) + (filter_view.Parent as Container).Remove (filter_view); + frame.Add (filter_view); + frame.QueueDraw (); + } + is_fullscreen = false; + ShowPack (); + + } + #endregion - ServiceManager.SourceManager.ActiveSourceChanged += HandleActiveSourceChanged; + #region Playback Handling + + private void SetupPlaybackHandling () + { + filter_view.UpdatedAlbum += HandleUpdatedAlbum; + filter_view.PMButton.Toggled += HandlePMButtonToggled; + filter_view.FSButton.Toggled += HandleFSButtonToggled; + filter_view.SortButton.Toggled += HandleSortButtonToggled; + + ServiceManager.SourceManager.ActiveSourceChanged += HandleActiveSourceChanged; ServiceManager.PlaybackController.TrackStarted += OnPlaybackControllerTrackStarted; - ServiceManager.PlayerEngine.ConnectEvent (OnPlayerEvent); - ServiceManager.PlaybackController.SourceChanged += OnPlaybackSourceChanged; - FilterView.AlbumLoader.SortingChanged += HandleSortingChanged; - } - - private void HandleUpdatedAlbum(object sender, EventArgs e) - { - if (!IsActiveSource) ServiceManager.SourceManager.SetActiveSource (source); - SelectActiveAlbum (); - UpdatePlayback (); - FilterView.PMButton.SetSilent (InPartyMode); - } - - private void HandlePMButtonToggled(object sender, EventArgs e) - { - if (!IsActiveSource) ServiceManager.SourceManager.SetActiveSource (source); - if (FilterView.PMButton.IsActive) { - SelectAllTracks (); - UpdatePlayback (); - } else - FilterView.UpdateAlbum (); - } + ServiceManager.PlayerEngine.ConnectEvent (OnPlayerEvent); + ServiceManager.PlaybackController.SourceChanged += OnPlaybackSourceChanged; + FilterView.AlbumLoader.SortingChanged += HandleSortingChanged; + } + + private void HandleUpdatedAlbum(object sender, EventArgs e) + { + if (!IsActiveSource) { + ServiceManager.SourceManager.SetActiveSource (source); + } + SelectActiveAlbum (); + UpdatePlayback (); + FilterView.PMButton.SetSilent (InPartyMode); + } + + private void HandlePMButtonToggled(object sender, EventArgs e) + { + if (!IsActiveSource) { + ServiceManager.SourceManager.SetActiveSource (source); + } + if (FilterView.PMButton.IsActive) { + SelectAllTracks (); + UpdatePlayback (); + } else { + FilterView.UpdateAlbum (); + } + } - private void HandleFSButtonToggled(object sender, EventArgs e) - { + private void HandleFSButtonToggled(object sender, EventArgs e) + { InterfaceActionService service = ServiceManager.Get (); - if (service == null || service.ViewActions == null) + if (service == null || service.ViewActions == null) { return; - service.ViewActions.Fullscreen (FilterView.FSButton.IsActive); - } - - - private void HandleSortButtonToggled (object sender, EventArgs e) - { - if (!FilterView.SortButton.IsActive) - FilterView.AlbumLoader.SortBy = SortOptions.Artist; - else - FilterView.AlbumLoader.SortBy = SortOptions.Album; - } - - - private void HandleSortingChanged (object sender, EventArgs e) - { - if (FilterView.AlbumLoader.SortBy.GetType () == typeof(AlbumArtistComparer)) - FilterView.SortButton.IsActive = false; - else - FilterView.SortButton.IsActive = true; - } - - private void HandleActiveSourceChanged (SourceEventArgs args) - { - FilterView.PMButton.SetSilent (InPartyMode); - } - private void OnPlayerEvent (PlayerEventArgs args) - { - CheckForSwitch (); - } + } + service.ViewActions.Fullscreen (FilterView.FSButton.IsActive); + } + + + private void HandleSortButtonToggled (object sender, EventArgs e) + { + if (!FilterView.SortButton.IsActive) { + FilterView.AlbumLoader.SortBy = SortOptions.Artist; + } else { + FilterView.AlbumLoader.SortBy = SortOptions.Album; + } + } + + + private void HandleSortingChanged (object sender, EventArgs e) + { + FilterView.CoverManager.ReloadCovers (); + + if (FilterView.AlbumLoader.SortBy.GetType () == typeof(AlbumArtistComparer)) { + FilterView.SortButton.IsActive = false; + } else { + FilterView.SortButton.IsActive = true; + } + } + + private void HandleActiveSourceChanged (SourceEventArgs args) + { + FilterView.PMButton.SetSilent (InPartyMode); + } + private void OnPlayerEvent (PlayerEventArgs args) + { + CheckForSwitch (); + } private void OnPlaybackControllerTrackStarted (object o, EventArgs args) - { + { CheckForSwitch (); - } + } private void OnPlaybackSourceChanged (object o, EventArgs args) { - FilterView.PMButton.SetSilent (InPartyMode); + FilterView.PMButton.SetSilent (InPartyMode); } - - /// - /// Checks if we are in PartyMode & if a new song started playing - /// Called from OnPlaybackControllerTrackStarted - /// + + /// + /// Checks if we are in PartyMode & if a new song started playing + /// Called from OnPlaybackControllerTrackStarted + /// private void CheckForSwitch () { - ThreadAssist.ProxyToMain (delegate { - TrackInfo current_track = ServiceManager.PlaybackController.CurrentTrack; - if (current_track != null && transitioned_track != current_track) { - if (IsActiveSource) - FilterView.LabelTrack.SetValueWithAnim (current_track.TrackNumber + " - " + current_track.TrackTitle); - if (InPartyMode) { - DatabaseAlbumInfo album = DatabaseAlbumInfo.FindOrCreate ( - DatabaseArtistInfo.FindOrCreate (current_track.AlbumArtist, current_track.AlbumArtistSort), - current_track.AlbumTitle, current_track.AlbumTitleSort, current_track.IsCompilation); - FilterView.AlbumLoader.ScrollTo(album); - } - transitioned_track = ServiceManager.PlayerEngine.CurrentTrack; - } - - }); - } - - private void UpdatePlayback () - { - if (!ClutterFlowSchemas.InstantPlayback.Get ()) { - ServiceManager.PlaybackController.NextSource = source; - if (!ServiceManager.PlayerEngine.IsPlaying()) - ServiceManager.PlayerEngine.Play(); - } else { - ServiceManager.PlaybackController.Source = source; - if (!ServiceManager.PlayerEngine.IsPlaying()) - ServiceManager.PlayerEngine.Play(); - else - ServiceManager.PlaybackController.Next(); - } - } - #endregion + ThreadAssist.ProxyToMain (delegate { + TrackInfo current_track = ServiceManager.PlaybackController.CurrentTrack; + if (current_track != null && transitioned_track != current_track) { + if (IsActiveSource) + FilterView.LabelTrack.SetValueWithAnim (current_track.TrackNumber + " - " + current_track.TrackTitle); + if (InPartyMode) { + DatabaseAlbumInfo album = DatabaseAlbumInfo.FindOrCreate ( + DatabaseArtistInfo.FindOrCreate (current_track.AlbumArtist, current_track.AlbumArtistSort), + current_track.AlbumTitle, current_track.AlbumTitleSort, current_track.IsCompilation); + FilterView.ScrollTo (album); + } + transitioned_track = ServiceManager.PlayerEngine.CurrentTrack; + } + + }); + } + + private void UpdatePlayback () + { + if (!ClutterFlowSchemas.InstantPlayback.Get ()) { + ServiceManager.PlaybackController.NextSource = source; + if (!ServiceManager.PlayerEngine.IsPlaying()) { + ServiceManager.PlayerEngine.Play(); + } + } else { + ServiceManager.PlaybackController.Source = source; + if (!ServiceManager.PlayerEngine.IsPlaying()) { + ServiceManager.PlayerEngine.Play(); + } else { + ServiceManager.PlaybackController.Next(); + } + } + } + #endregion - #region Source Handling + #region Source Handling public bool SetSource (ISource source) { - if ((source as MusicLibrarySource) == null) - return false; - if ((source as MusicLibrarySource)==this.source) { + if ((source as MusicLibrarySource) == null) { + return false; + } + if ((source as MusicLibrarySource)==this.source) { SelectAllTracks (); - return true; - } else - ResetSource (); - - this.source = (source as MusicLibrarySource); - this.source.TrackModel.Selection.Clear (false); - this.source.TracksAdded += HandleTracksAdded; - this.source.TracksDeleted += HandleTracksDeleted; - - foreach (IFilterListModel list_model in this.source.CurrentFilters) { - list_model.Clear (); //clear selections, we need all albums!! - if (list_model is FilterListModel) { - external_filter = list_model as FilterListModel; - break; - } - } - - main_view.SetModel (TrackModel); - FilterView.SetModel (external_filter); - - return true; - } - - private void HandleTracksAdded (Source sender, TrackEventArgs args) - { - SelectAllTracks (); - } - - private void HandleTracksDeleted (Source sender, TrackEventArgs args) - { - SelectAllTracks (); - } + return true; + } else { + ResetSource (); + } + + this.source = (source as MusicLibrarySource); + this.source.TrackModel.Selection.Clear (false); + this.source.TracksAdded += HandleTracksAdded; + this.source.TracksDeleted += HandleTracksDeleted; + + foreach (IFilterListModel list_model in this.source.CurrentFilters) { + list_model.Clear (); //clear selections, we need all albums!! + if (list_model is FilterListModel) { + external_filter = list_model as FilterListModel; + break; + } + } + + main_view.SetModel (TrackModel); + FilterView.SetModel (external_filter); + + return true; + } + + private void HandleTracksAdded (Source sender, TrackEventArgs args) + { + SelectAllTracks (); + } + + private void HandleTracksDeleted (Source sender, TrackEventArgs args) + { + SelectAllTracks (); + } public void ResetSource () { - if (source!=null) { + if (source!=null) { source.TracksAdded -= HandleTracksAdded; source.TracksDeleted -= HandleTracksDeleted; - source = null; - } + source = null; + } TrackView.SetModel (null); - FilterView.SetModel (null); + FilterView.SetModel (null); } protected void SelectActiveAlbum () // to implement sorting: create a DatabaseAlbumListModel subclass { - AlbumInfo album = FilterView.ActiveAlbum; - if (album!=null) { - external_filter.Selection.Clear (false); - external_filter.Selection.Select (FilterView.ActiveModelIndex); - } - } - protected void SelectAllTracks () - { - external_filter.Selection.SelectAll (); - } - #endregion + AlbumInfo album = FilterView.ActiveAlbum; + if (album!=null) { + external_filter.Selection.Clear (false); + external_filter.Selection.Select (FilterView.ActiveModelIndex); + } + } + protected void SelectAllTracks () + { + external_filter.Selection.SelectAll (); + } + #endregion } } diff -Nru banshee-community-extensions-2.0.1/src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs banshee-community-extensions-2.2.0/src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs --- banshee-community-extensions-2.0.1/src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs 2010-08-13 20:05:55.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowSchemas.cs 2011-06-09 20:16:21.000000000 +0000 @@ -34,14 +34,14 @@ namespace Banshee.ClutterFlow { - /// - /// Static class providing ClutterFlow with setting schema's - /// - public static class ClutterFlowSchemas { + /// + /// Static class providing ClutterFlow with setting schema's + /// + public static class ClutterFlowSchemas { internal static void AddToSection (Section section, SchemaEntry entry, SchemaPreferenceUpdatedHandler func) { - SchemaPreference pref = new SchemaPreference (entry, entry.ShortDescription, entry.LongDescription, func); - section.Add (pref); + SchemaPreference pref = new SchemaPreference (entry, entry.ShortDescription, entry.LongDescription, func); + section.Add (pref); } internal static readonly SchemaEntry DragSensitivity = new SchemaEntry( @@ -50,13 +50,6 @@ AddinManager.CurrentLocalizer.GetString ("Sensitivity for album dragging"), AddinManager.CurrentLocalizer.GetString ("Sets the sensitivity with which albums scroll when dragged, higher values mean faster scrolling") ); - - internal static readonly SchemaEntry ThreadedArtwork = new SchemaEntry( - "clutterflow", "threaded_artwork", - true, - AddinManager.CurrentLocalizer.GetString ("Enable threaded loading of artwork"), - AddinManager.CurrentLocalizer.GetString ("If enabled ClutterFlow will use threading to load it's artwork") - ); internal static readonly SchemaEntry ExpandTrackList = new SchemaEntry( "clutterflow", "expand_track_list", @@ -78,14 +71,14 @@ "Display ClutterFlow", "If checked displays the ClutterFlow browser instead of the default one" ); - + internal static readonly SchemaEntry InstantPlayback = new SchemaEntry( "clutterflow", "instant_playback", true, AddinManager.CurrentLocalizer.GetString ("Immediately apply playback mode changes"), AddinManager.CurrentLocalizer.GetString ("Starts playing a new song immediately after the playback mode changed (Party Mode or Album Mode)") ); - + internal static readonly SchemaEntry DisplayLabel = new SchemaEntry( "clutterflow", "display_album_label", true, @@ -127,12 +120,12 @@ AddinManager.CurrentLocalizer.GetString ("Number of visible covers at the side"), AddinManager.CurrentLocalizer.GetString ("The number of covers that need to be displayed on the stage (at one side)") ); - + internal static readonly SchemaEntry SortBy = new SchemaEntry( "clutterflow", "sort_by", (string) Enum.GetName (typeof(SortOptions), SortOptions.Artist), AddinManager.CurrentLocalizer.GetString ("Sort covers by"), AddinManager.CurrentLocalizer.GetString ("Selects on what basis covers should be sorted") ); - } + } } diff -Nru banshee-community-extensions-2.0.1/src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs banshee-community-extensions-2.2.0/src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs --- banshee-community-extensions-2.0.1/src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs 2010-12-16 19:02:54.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowService.cs 2011-06-09 21:11:19.000000000 +0000 @@ -25,203 +25,152 @@ // THE SOFTWARE. using System; -using System.Collections.Generic; using Gtk; using Mono.Addins; -using Hyena; - -using Clutter; - using Banshee.ServiceStack; using Banshee.Gui; using Banshee.Library; using Banshee.Sources; using Banshee.Sources.Gui; using Banshee.Preferences; +using Banshee.Preferences.Gui; using ClutterFlow; namespace Banshee.ClutterFlow { - - internal static class ClutterFlowManager + public class ClutterFlowService : IExtensionService, IDisposable { - private static int state = 0; - public static event EventHandler BeforeQuit; + #region Fields + string IService.ServiceName { + get { return "ClutterFlowService"; } + } - public static void Init () - { - if (state < 1) { - //TODO provide a static class for initialisation that does not get destroyed when this service is - // it should hold reference to the ActorLoader instances, as they hold precious references to texture, - // data that apparently remains in memory - if (!GLib.Thread.Supported) GLib.Thread.Init(); - Clutter.Threads.Init(); - if (ClutterHelper.gtk_clutter_init (IntPtr.Zero, IntPtr.Zero) != InitError.Success) - throw new System.NotSupportedException ("Unable to initialize GtkClutter"); - System.AppDomain.CurrentDomain.ProcessExit += HandleProcessExit; - state = 1; + private SourceManager source_manager; + private MusicLibrarySource music_library; + + private PreferenceService preference_service; + private InterfaceActionService action_service; + + private uint ui_manager_id; + private ActionGroup clutterflow_actions; + private ToggleAction browser_action; + protected ToggleAction BrowserAction { + get { + if (browser_action==null) { + browser_action = (ToggleAction) action_service.FindAction("BrowserView.BrowserVisibleAction"); + } + return browser_action; + } + } + private ToggleAction cfbrows_action; + protected ToggleAction CfBrowsAction { + get { + if (cfbrows_action==null) { + cfbrows_action = (ToggleAction) action_service.FindAction("ClutterFlowView.ClutterFlowVisibleAction"); + } + return cfbrows_action; } } + private static string menu_xml = @" + + + + + + + + + + "; + + private ClutterFlowContents clutter_flow_contents; + #endregion + + #region Initialization - static void HandleProcessExit(object sender, EventArgs e) + public ClutterFlowService () + { } + + void IExtensionService.Initialize () { - if (state == 1) - System.AppDomain.CurrentDomain.ProcessExit -= HandleProcessExit; - Quit (); + ClutterHelper.Init (); + + preference_service = ServiceManager.Get (); + action_service = ServiceManager.Get (); + + source_manager = ServiceManager.SourceManager; + music_library = source_manager.MusicLibrary; + + if (!SetupPreferences () || !SetupInterfaceActions ()) { + ServiceManager.ServiceStarted += OnServiceStarted; + } else if (!SetupSourceContents ()) { + source_manager.SourceAdded += OnSourceAdded; + } + + //--> TODO Banshee.ServiceStack.Application. register Exit event to close threads etc. } - public static void Quit () + private void OnServiceStarted (ServiceStartedArgs args) { - if (state == 1) { - EventHandler handler = BeforeQuit; - if (handler != null) { - handler (null, EventArgs.Empty); + if (args.Service is Banshee.Preferences.PreferenceService) { + preference_service = (PreferenceService)args.Service; + SetupPreferences (); + } else if (args.Service is Banshee.Gui.InterfaceActionService) { + action_service = (InterfaceActionService)args.Service; + SetupInterfaceActions (); + } + + if (!(preference_service==null || action_service==null)) { + ServiceManager.ServiceStarted -= OnServiceStarted; + if (!SetupSourceContents ()) { + source_manager.SourceAdded += OnSourceAdded; } - Clutter.Application.Quit (); - filter_view.Dispose (); - filter_view = null; - state = 2; } } - private static ClutterFlowView filter_view; - public static ClutterFlowView FilterView { - get { - if (filter_view==null) - filter_view = new ClutterFlowView (); - else if (!filter_view.Attached) - filter_view.AttachEvents (); - return filter_view; + private void OnSourceAdded (SourceAddedArgs args) + { + if (args.Source is MusicLibrarySource) { + music_library = args.Source as MusicLibrarySource; } + SetupSourceContents (); } - } - - public class ClutterFlowService : IExtensionService, IDisposable - { - #region Fields - string IService.ServiceName { - get { return "ClutterFlowService"; } - } - - private SourceManager source_manager; - private MusicLibrarySource music_library; + #endregion - private PreferenceService preference_service; - private InterfaceActionService action_service; - - private uint ui_manager_id; - private ActionGroup clutterflow_actions; - private ToggleAction browser_action; - protected ToggleAction BrowserAction { - get { - if (browser_action==null) - browser_action = (ToggleAction) action_service.FindAction("BrowserView.BrowserVisibleAction"); - return browser_action; - } - } - private ToggleAction cfbrows_action; - protected ToggleAction CfBrowsAction { - get { - if (cfbrows_action==null) - cfbrows_action = (ToggleAction) action_service.FindAction("ClutterFlowView.ClutterFlowVisibleAction"); - return cfbrows_action; - } - } - private static string menu_xml = @" - - - - - - - - - - "; - - private ClutterFlowContents clutter_flow_contents; - #endregion - - #region Initialization - - public ClutterFlowService () - { - ClutterFlowManager.Init (); - } - - void IExtensionService.Initialize () - { - preference_service = ServiceManager.Get (); - action_service = ServiceManager.Get (); - - source_manager = ServiceManager.SourceManager; - music_library = source_manager.MusicLibrary; - - if (!SetupPreferences () || !SetupInterfaceActions ()) - ServiceManager.ServiceStarted += OnServiceStarted; - else if (!SetupSourceContents ()) - source_manager.SourceAdded += OnSourceAdded; - - - //--> TODO Banshee.ServiceStack.Application. register Exit event to close threads etc. - } - - private void OnServiceStarted (ServiceStartedArgs args) - { - if (args.Service is Banshee.Preferences.PreferenceService) { - preference_service = (PreferenceService)args.Service; - SetupPreferences (); - } else if (args.Service is Banshee.Gui.InterfaceActionService) { - action_service = (InterfaceActionService)args.Service; - SetupInterfaceActions (); - } - - if (!(preference_service==null || action_service==null)) { - ServiceManager.ServiceStarted -= OnServiceStarted; - if (!SetupSourceContents ()) - source_manager.SourceAdded += OnSourceAdded; - } - } - - private void OnSourceAdded (SourceAddedArgs args) - { - if (args.Source is MusicLibrarySource) - music_library = args.Source as MusicLibrarySource; - SetupSourceContents (); - } - #endregion - - #region Setup - private bool SetupSourceContents () - { - if (music_library==null || preference_service==null || action_service==null - || ServiceManager.SourceManager.ActiveSource == null) - return false; + #region Setup + private bool SetupSourceContents () + { + if (music_library == null || preference_service == null || action_service == null + || ServiceManager.SourceManager.ActiveSource == null) { + return false; + } + source_manager.SourceAdded -= OnSourceAdded; clutter_flow_contents = new ClutterFlowContents (); - clutter_flow_contents.SetSource(music_library); + clutter_flow_contents.SetSource (music_library); + + if (ClutterFlowSchemas.ShowClutterFlow.Get ()) { + BrowserAction.Active = false; + music_library.Properties.Set ("Nereid.SourceContents", clutter_flow_contents); + } + + LoadPreferences (); + + return true; + } + + private bool SetupPreferences () + { + InstallPreferences (); + + return true; + } + + private bool SetupInterfaceActions () + { - if (ClutterFlowSchemas.ShowClutterFlow.Get ()) { - BrowserAction.Active = false; - music_library.Properties.Set ("Nereid.SourceContents", clutter_flow_contents); - } - - source_manager.SourceAdded -= OnSourceAdded; - return true; - } - - private bool SetupPreferences () - { - InstallPreferences (); - - return true; - } - - private bool SetupInterfaceActions () - { - action_service = ServiceManager.Get (); if (action_service.FindActionGroup ("ClutterFlowView") == null) { @@ -243,48 +192,49 @@ CfBrowsAction.Activated += OnToggleClutterFlow; return true; - } - #endregion + } + #endregion - #region Action Handling + #region Action Handling private void HandleActiveSourceChanged (SourceEventArgs args) { - if (args.Source==music_library) + if (args.Source==music_library) { clutterflow_actions.Visible = true; - else + } else { clutterflow_actions.Visible = false; + } } - private void OnToggleBrowser (object sender, EventArgs e) - { - if (BrowserAction.Active) { + private void OnToggleBrowser (object sender, EventArgs e) + { + if (BrowserAction.Active) { ClutterFlowSchemas.OldShowBrowser.Set (true); - CfBrowsAction.Active = false; - ClutterFlowSchemas.ShowClutterFlow.Set (false); - } - } - - - private void OnToggleClutterFlow (object sender, EventArgs e) - { - if (CfBrowsAction.Active) { - ClutterFlowSchemas.ShowClutterFlow.Set (true); + CfBrowsAction.Active = false; + ClutterFlowSchemas.ShowClutterFlow.Set (false); + } + } + + + private void OnToggleClutterFlow (object sender, EventArgs e) + { + if (CfBrowsAction.Active) { + ClutterFlowSchemas.ShowClutterFlow.Set (true); ClutterFlowSchemas.OldShowBrowser.Set (BrowserAction.Active); - BrowserAction.Active = false; - Clutter.Threads.Enter (); - music_library.Properties.Set ("Nereid.SourceContents", clutter_flow_contents); - Clutter.Threads.Leave (); - } else { - ClutterFlowSchemas.ShowClutterFlow.Set (false); - Clutter.Threads.Enter (); - music_library.Properties.Remove ("Nereid.SourceContents"); - Clutter.Threads.Leave (); - BrowserAction.Active = ClutterFlowSchemas.OldShowBrowser.Get (); - } - } + BrowserAction.Active = false; + Clutter.Threads.Enter (); + music_library.Properties.Set ("Nereid.SourceContents", clutter_flow_contents); + Clutter.Threads.Leave (); + } else { + ClutterFlowSchemas.ShowClutterFlow.Set (false); + Clutter.Threads.Enter (); + music_library.Properties.Remove ("Nereid.SourceContents"); + Clutter.Threads.Leave (); + BrowserAction.Active = ClutterFlowSchemas.OldShowBrowser.Get (); + } + } - private void RemoveClutterFlow () - { + private void RemoveClutterFlow () + { Clutter.Threads.Enter (); music_library.Properties.Remove ("Nereid.SourceContents"); Clutter.Threads.Leave (); @@ -292,9 +242,9 @@ clutter_flow_contents = null; source_manager.ActiveSourceChanged -= HandleActiveSourceChanged; - BrowserAction.Activated -= OnToggleBrowser; + BrowserAction.Activated -= OnToggleBrowser; BrowserAction.Active = ClutterFlowSchemas.OldShowBrowser.Get (); - CfBrowsAction.Activated -= OnToggleClutterFlow; + CfBrowsAction.Activated -= OnToggleClutterFlow; CfBrowsAction.Visible = false; action_service.RemoveActionGroup ("ClutterFlowView"); @@ -308,124 +258,141 @@ action_service = null; browser_action = null; cfbrows_action = null; - } - #endregion + } + #endregion - #region Preferences + #region Preferences - private bool pref_installed = false; - private Page pref_page; + private bool pref_installed = false; + private Page pref_page; private Section general; - private Section dimensions; - - protected void InstallPreferences () - { - if (!pref_installed) { - pref_page = preference_service.Add(new Page("clutterflow", + private Section dimensions; + + protected void InstallPreferences () + { + if (!pref_installed) { + preference_service.InstallWidgetAdapters += OnPreferencesServiceInstallWidgetAdapters; + + pref_page = preference_service.Add(new Page("clutterflow", AddinManager.CurrentLocalizer.GetString ("ClutterFlow"), 10)); - - general = pref_page.Add (new Section ("general", - AddinManager.CurrentLocalizer.GetString ("General"), 1)); - ClutterFlowSchemas.AddToSection (general, ClutterFlowSchemas.InstantPlayback, UpdateLabelVisibility); + + general = pref_page.Add (new Section ("general", + AddinManager.CurrentLocalizer.GetString ("General"), 1)); + ClutterFlowSchemas.AddToSection (general, ClutterFlowSchemas.InstantPlayback, null); ClutterFlowSchemas.AddToSection (general, ClutterFlowSchemas.DisplayLabel, UpdateLabelVisibility); ClutterFlowSchemas.AddToSection (general, ClutterFlowSchemas.DisplayTitle, UpdateTitleVisibility); ClutterFlowSchemas.AddToSection (general, ClutterFlowSchemas.VisibleCovers, UpdateVisibleCovers); - ClutterFlowSchemas.AddToSection (general, ClutterFlowSchemas.DragSensitivity, UpdateDragSensitivity); - ClutterFlowSchemas.AddToSection (general, ClutterFlowSchemas.ThreadedArtwork, UpdateThreadedArtwork); - - dimensions = pref_page.Add (new Section ("dimensions", - AddinManager.CurrentLocalizer.GetString ("Dimensions"), 2)); - ClutterFlowSchemas.AddToSection (dimensions, ClutterFlowSchemas.MinCoverSize, UpdateMinCoverSize); - ClutterFlowSchemas.AddToSection (dimensions, ClutterFlowSchemas.MaxCoverSize, UpdateMinCoverSize); - ClutterFlowSchemas.AddToSection (dimensions, ClutterFlowSchemas.TextureSize, UpdateMinCoverSize); - - LoadPreferences (); - - pref_installed = true; - } - } - - private void LoadPreferences () - { - UpdateThreadedArtwork (); - UpdateDragSensitivity (); - UpdateLabelVisibility (); - UpdateTitleVisibility (); - UpdateVisibleCovers (); - UpdateMinCoverSize (); - UpdateMaxCoverSize (); - UpdateTextureSize (); - } - - private void UpdateThreadedArtwork () - { - - } - - private void UpdateDragSensitivity () - { - if (clutter_flow_contents != null) - clutter_flow_contents.FilterView.DragSensitivity = - (float) ClutterFlowSchemas.DragSensitivity.Get () * 0.1f; - } - - private void UpdateLabelVisibility () - { - if (clutter_flow_contents != null) - clutter_flow_contents.FilterView.LabelCoverIsVisible = - ClutterFlowSchemas.DisplayLabel.Get (); - } - - private void UpdateTitleVisibility () - { - if (clutter_flow_contents != null) - clutter_flow_contents.FilterView.LabelTrackIsVisible = - ClutterFlowSchemas.DisplayTitle.Get (); - } - - private void UpdateVisibleCovers () - { - if (clutter_flow_contents!=null) - clutter_flow_contents.FilterView.CoverManager.VisibleCovers = - ((ClutterFlowSchemas.VisibleCovers.Get () + 1) * 2 + 1); - } - - private void UpdateMinCoverSize () - { - if (clutter_flow_contents != null) - clutter_flow_contents.FilterView.CoverManager.Behaviour.MinCoverWidth = - ClutterFlowSchemas.MinCoverSize.Get (); - } - - private void UpdateMaxCoverSize () - { - if (clutter_flow_contents != null) - clutter_flow_contents.FilterView.CoverManager.Behaviour.MaxCoverWidth = - ClutterFlowSchemas.MaxCoverSize.Get (); - } - - private void UpdateTextureSize () - { - if (clutter_flow_contents != null) - clutter_flow_contents.FilterView.CoverManager.TextureSize = - ClutterFlowSchemas.TextureSize.Get (); - } - + ClutterFlowSchemas.AddToSection (general, ClutterFlowSchemas.DragSensitivity, UpdateDragSensitivity); + + dimensions = pref_page.Add (new Section ("dimensions", + AddinManager.CurrentLocalizer.GetString ("Dimensions"), 2)); + dimensions.Add (new VoidPreference ("dimensions-desc")); + ClutterFlowSchemas.AddToSection (dimensions, ClutterFlowSchemas.MinCoverSize, UpdateMinCoverSize); + ClutterFlowSchemas.AddToSection (dimensions, ClutterFlowSchemas.MaxCoverSize, UpdateMaxCoverSize); + ClutterFlowSchemas.AddToSection (dimensions, ClutterFlowSchemas.TextureSize, UpdateTextureSize); + + pref_installed = true; + } + } + + private void LoadPreferences () + { + UpdateDragSensitivity (); + UpdateLabelVisibility (); + UpdateTitleVisibility (); + UpdateVisibleCovers (); + UpdateMinCoverSize (); + UpdateMaxCoverSize (); + UpdateTextureSize (); + } + + private void UpdateDragSensitivity () + { + if (clutter_flow_contents != null) { + clutter_flow_contents.FilterView.DragSensitivity = + (float) ClutterFlowSchemas.DragSensitivity.Get () * 0.1f; + } + } + + private void UpdateLabelVisibility () + { + if (clutter_flow_contents != null) { + clutter_flow_contents.FilterView.LabelCoverIsVisible = + ClutterFlowSchemas.DisplayLabel.Get (); + } + } + + private void UpdateTitleVisibility () + { + if (clutter_flow_contents != null) { + clutter_flow_contents.FilterView.LabelTrackIsVisible = + ClutterFlowSchemas.DisplayTitle.Get (); + } + } + + private void UpdateVisibleCovers () + { + if (clutter_flow_contents!=null) { + clutter_flow_contents.FilterView.CoverManager.VisibleCovers = + ((ClutterFlowSchemas.VisibleCovers.Get () + 1) * 2 + 1); + } + } + + private void UpdateMinCoverSize () + { + if (clutter_flow_contents != null) { + clutter_flow_contents.FilterView.CoverManager.Behaviour.MinCoverWidth = + ClutterFlowSchemas.MinCoverSize.Get (); + } + } + + private void UpdateMaxCoverSize () + { + if (clutter_flow_contents != null) { + clutter_flow_contents.FilterView.CoverManager.Behaviour.MaxCoverWidth = + ClutterFlowSchemas.MaxCoverSize.Get (); + } + } + + private void UpdateTextureSize () + { + if (clutter_flow_contents != null) { + clutter_flow_contents.FilterView.CoverManager.TextureSize = + ClutterFlowSchemas.TextureSize.Get (); + } + } + private void UninstallPreferences () { + preference_service.InstallWidgetAdapters -= OnPreferencesServiceInstallWidgetAdapters; + preference_service.Remove (pref_page); pref_page = null; general = null; - dimensions = null; - pref_installed = false; + dimensions = null; + pref_installed = false; } - #endregion + + private void OnPreferencesServiceInstallWidgetAdapters (object o, EventArgs args) + { + if (dimensions == null) { + return; + } + + var description_label = new DescriptionLabel (AddinManager.CurrentLocalizer.GetString ( + "For changes to these values to take effect, you need to restart Banshee")); + dimensions["dimensions-desc"].ShowLabel = false; + dimensions["dimensions-desc"].DisplayWidget = description_label; + } + + #endregion private bool disposed = false; - public void Dispose () - { - if (disposed) + public void Dispose () + { + if (disposed) { return; + } disposed = true; ServiceManager.ServiceStarted -= OnServiceStarted; @@ -433,6 +400,8 @@ UninstallPreferences (); RemoveClutterFlow (); - } - } + + ClutterHelper.Quit (); + } + } } diff -Nru banshee-community-extensions-2.0.1/src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowView.cs banshee-community-extensions-2.2.0/src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowView.cs --- banshee-community-extensions-2.0.1/src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowView.cs 2011-03-14 20:01:43.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/ClutterFlow/Banshee.ClutterFlow/ClutterFlowView.cs 2011-06-09 21:11:19.000000000 +0000 @@ -47,59 +47,93 @@ namespace Banshee.ClutterFlow { - - public class ClutterFlowView : Clutter.Embed - { + + public class ClutterFlowView : Clutter.Embed + { #region Fields #region Active/Current Album Related - public event EventHandler UpdatedAlbum; + public event EventHandler UpdatedAlbum; + + private AlbumInfo activeAlbum = null; + public AlbumInfo ActiveAlbum { + get { return activeAlbum; } + protected set { activeAlbum = value; } + } + private int activeIndex = -1; + public int ActiveIndex { + get { return activeIndex; } + protected set { activeIndex = value; } + } + public int ActiveModelIndex { + get { + int ret = AlbumLoader.ConvertIndexToModelIndex (ActiveIndex); + Hyena.Log.DebugFormat ("ActiveModelIndex_get will return {0}", ret); + return ret; + } + } + + public AlbumInfo CurrentAlbum { + get { + var album_actor = cover_manager.CurrentCover as ClutterFlowAlbum; + if (album_actor != null) { + return album_actor.Album; + } else { + return null; + } + } + } - private AlbumInfo activeAlbum = null; - public AlbumInfo ActiveAlbum { - get { return activeAlbum; } - protected set { activeAlbum = value; } - } - private int activeIndex = -1; - public int ActiveIndex { - get { return activeIndex; } - protected set { activeIndex = value; } - } - public int ActiveModelIndex { - get { - int ret = AlbumLoader.ConvertIndexToModelIndex (ActiveIndex); - Hyena.Log.DebugFormat ("ActiveModelIndex_get will return {0}", ret); - return ret; - } - } - public AlbumInfo CurrentAlbum { - get { return albumLoader.CurrentAlbum; } - } - public int CurrentIndex { - get { return albumLoader.CurrentIndex; } - } - public int CurrentModelIndex { - get { return AlbumLoader.ConvertIndexToModelIndex (CurrentIndex); } - } + public int CurrentIndex { + get { + var album_actor = cover_manager.CurrentCover as ClutterFlowAlbum; + if (album_actor != null) { + return album_actor.Index; + } else { + return -1; + } + } + } + + public int CurrentModelIndex { + get { return AlbumLoader.ConvertIndexToModelIndex (CurrentIndex); } + } #endregion #region General - private AlbumLoader albumLoader; - public AlbumLoader AlbumLoader { - get { return albumLoader; } - } - private CoverManager coverManager; - public CoverManager CoverManager { - get { return coverManager; } - } - + private AlbumLoader album_loader; + public AlbumLoader AlbumLoader { + get { return album_loader; } + } + private CoverManager cover_manager; + public CoverManager CoverManager { + get { return cover_manager; } + } + + private int model_count; + public virtual IListModel Model { - get { return albumLoader.Model; } + get { return album_loader.Model; } } public void SetModel (FilterListModel value) { - albumLoader.Model = value; + if (value != album_loader.Model) { + if (album_loader.Model != null) { + album_loader.Model.Cleared -= OnModelClearedHandler; + album_loader.Model.Reloaded -= OnModelReloadedHandler; + } + + album_loader.Model = value; + + if (album_loader.Model != null) { + album_loader.Model.Cleared += OnModelClearedHandler; + album_loader.Model.Reloaded += OnModelReloadedHandler; + model_count = album_loader.Model.Count; + } + CoverManager.ReloadCovers (); + } } + protected bool attached = false; public bool Attached { get { return attached; } @@ -107,120 +141,144 @@ #endregion #region User Interface & Interaction - private bool dragging = false; // wether or not we are currently dragging the viewport around - private double mouse_x, mouse_y; - private float drag_x0, drag_y0; // initial coordinates when the mouse button was pressed down - private int start_index; - - private float drag_sens = 0.3f; - public float DragSensitivity { - get { return drag_sens; } - set { - if (value<0.01f) value = 0.01f; - if (value>2.0f) value = 2.0f; - drag_sens = value; - } - } - - - private ClutterFlowSlider slider; - public ClutterFlowSlider Slider { - get { return slider; } - } - private ClutterWidgetBar widget_bar; - public ClutterWidgetBar WidgetBar { - get { return widget_bar; } - } - private PartyModeButton pm_button; - public PartyModeButton PMButton { - get { return pm_button; } - } - private FullscreenButton fs_button; - public FullscreenButton FSButton { - get { return fs_button; } - } - private SortButton sort_button; - public SortButton SortButton { - get { return sort_button; } - } - private CoverCaption caption_cover; - public CoverCaption LabelCover { - get { return caption_cover; } - } - private TrackCaption caption_track; - public TrackCaption LabelTrack { - get { return caption_track; } - } - - public bool LabelCoverIsVisible { - set { if (value) caption_cover.ShowAll(); else caption_cover.HideAll(); } - } - public bool LabelTrackIsVisible { - set { if (value) caption_track.ShowAll(); else caption_track.HideAll(); } - } - - - private const float rotSens = 0.00001f; - private const float viewportMaxAngleX = 10; // maximum X viewport angle - private const float viewportMinAngleX = -30; // maximum X viewport angle - private const float viewportMaxAngleY = -15; // maximum Y viewport angle - private float viewportAngleX = -5f; // current X viewport angle - public float ViewportAngleX { - get { return viewportAngleX; } - set { - if (value!=viewportAngleX) { - viewportAngleX = value; - if (viewportAngleX < viewportMinAngleX) viewportAngleX = viewportMinAngleX; - if (viewportAngleX > viewportMaxAngleX) viewportAngleX = viewportMaxAngleX; - - if (viewportAngleX < -1f && viewportAngleX > -9f) - coverManager.SetRotation(RotateAxis.Y, -5f, coverManager.Width*0.5f,coverManager.Height*0.5f,coverManager.Behaviour.ZFar); - else - coverManager.SetRotation(RotateAxis.X, viewportAngleX, coverManager.Width*0.5f,coverManager.Height*0.5f,coverManager.Behaviour.ZFar); - - } - } - } - private float viewportAngleY = 0; // current Y viewport angle - public float ViewportAngleY { - get { return viewportAngleY; } - set { - if (value!=viewportAngleY) { - viewportAngleY = value; - if (viewportAngleY < viewportMaxAngleY) viewportAngleY = viewportMaxAngleY; - if (viewportAngleY > -viewportMaxAngleY) viewportAngleY = -viewportMaxAngleY; - - if (viewportAngleY > -4f && viewportAngleY < 4f) - coverManager.SetRotation(RotateAxis.Y, 0, coverManager.Width*0.5f,coverManager.Height*0.5f,coverManager.Behaviour.ZFar); - else - coverManager.SetRotation(RotateAxis.Y, viewportAngleY, coverManager.Width*0.5f,coverManager.Height*0.5f,coverManager.Behaviour.ZFar); - } - } - } + private bool dragging = false; // wether or not we are currently dragging the viewport around + private double mouse_x, mouse_y; + private float drag_x0, drag_y0; // initial coordinates when the mouse button was pressed down + private int start_index; + + private float drag_sens = 0.3f; + public float DragSensitivity { + get { return drag_sens; } + set { + if (value < 0.01f) { + value = 0.01f; + } + if (value > 2.0f) { + value = 2.0f; + } + drag_sens = value; + } + } + + private ClutterFlowSlider slider; + public ClutterFlowSlider Slider { + get { return slider; } + } + private ClutterWidgetBar widget_bar; + public ClutterWidgetBar WidgetBar { + get { return widget_bar; } + } + private PartyModeButton pm_button; + public PartyModeButton PMButton { + get { return pm_button; } + } + private FullscreenButton fs_button; + public FullscreenButton FSButton { + get { return fs_button; } + } + private SortButton sort_button; + public SortButton SortButton { + get { return sort_button; } + } + private CoverCaption caption_cover; + public CoverCaption LabelCover { + get { return caption_cover; } + } + private TrackCaption caption_track; + public TrackCaption LabelTrack { + get { return caption_track; } + } + + public bool LabelCoverIsVisible { + set { + if (value) { + caption_cover.ShowAll(); + } else { + caption_cover.HideAll(); + } + } + } + public bool LabelTrackIsVisible { + set { if (value) { + caption_track.ShowAll(); + } else { + caption_track.HideAll(); + } + } + } + + + private const float rotSens = 0.00001f; + private const float viewportMaxAngleX = 10; // maximum X viewport angle + private const float viewportMinAngleX = -30; // maximum X viewport angle + private const float viewportMaxAngleY = -15; // maximum Y viewport angle + private float viewportAngleX = -5f; // current X viewport angle + public float ViewportAngleX { + get { return viewportAngleX; } + set { + if (value != viewportAngleX) { + viewportAngleX = value; + if (viewportAngleX < viewportMinAngleX) { + viewportAngleX = viewportMinAngleX; + } + if (viewportAngleX > viewportMaxAngleX) { + viewportAngleX = viewportMaxAngleX; + } + + if (viewportAngleX < -1f && viewportAngleX > -9f) { + cover_manager.SetRotation(RotateAxis.Y, -5f, cover_manager.Width*0.5f,cover_manager.Height*0.5f,cover_manager.Behaviour.ZFar); + } else { + cover_manager.SetRotation(RotateAxis.X, viewportAngleX, cover_manager.Width*0.5f,cover_manager.Height*0.5f,cover_manager.Behaviour.ZFar); + } + } + } + } + private float viewportAngleY = 0; // current Y viewport angle + public float ViewportAngleY { + get { return viewportAngleY; } + set { + if (value != viewportAngleY) { + viewportAngleY = value; + if (viewportAngleY < viewportMaxAngleY) { + viewportAngleY = viewportMaxAngleY; + } + if (viewportAngleY > -viewportMaxAngleY) { + viewportAngleY = -viewportMaxAngleY; + } + + if (viewportAngleY > -4f && viewportAngleY < 4f) { + cover_manager.SetRotation(RotateAxis.Y, 0, cover_manager.Width*0.5f,cover_manager.Height*0.5f,cover_manager.Behaviour.ZFar); + } else { + cover_manager.SetRotation(RotateAxis.Y, viewportAngleY, cover_manager.Width*0.5f,cover_manager.Height*0.5f,cover_manager.Behaviour.ZFar); + } + } + } + } #endregion #endregion - #region Initialisation + #region Initialisation public ClutterFlowView () : base () { - SetSizeRequest (300, 200); - Clutter.Global.MotionEventsEnabled = true; + SetSizeRequest (300, 200); + Clutter.Global.MotionEventsEnabled = true; - coverManager = new CoverManager(); - albumLoader = new AlbumLoader (coverManager); + album_loader = new AlbumLoader (); + cover_manager = new CoverManager (album_loader, GetDefaultSurface, ClutterFlowSchemas.TextureSize.Get ()); AttachEvents (); - - SetupViewport (); - SetupSlider (); - SetupLabels (); - SetupWidgetBar (); - } - public void AttachEvents () + SetupViewport (); + SetupSlider (); + SetupLabels (); + SetupWidgetBar (); + } + + private void AttachEvents () { - if (attached) + if (attached) { return; + } attached = true; Stage.AllocationChanged += HandleAllocationChanged; @@ -228,10 +286,10 @@ Stage.ButtonReleaseEvent += HandleButtonReleaseEvent; Stage.ButtonPressEvent += HandleButtonPressEvent; Stage.MotionEvent += HandleMotionEvent; - albumLoader.ActorActivated += HandleActorActivated; + cover_manager.ActorActivated += HandleActorActivated; } - public void DetachEvents () + private void DetachEvents () { if (!attached) return; @@ -241,7 +299,7 @@ Stage.ButtonReleaseEvent -= HandleButtonReleaseEvent; Stage.ButtonPressEvent -= HandleButtonPressEvent; Stage.MotionEvent -= HandleMotionEvent; - albumLoader.ActorActivated -= HandleActorActivated; + cover_manager.ActorActivated -= HandleActorActivated; attached = false; } @@ -249,175 +307,229 @@ protected bool disposed = false; public override void Dispose () { - if (disposed) + if (disposed) { return; + } disposed = true; DetachEvents (); AlbumLoader.Dispose (); CoverManager.Dispose (); - - //base.Dispose (); } - protected void SetupViewport () - { - Stage.Color = new Clutter.Color (0x00, 0x00, 0x00, 0xff); - coverManager.SetRotation (RotateAxis.X, viewportAngleX, Stage.Width/2, Stage.Height/2,0); - Stage.Add (coverManager); + protected void SetupViewport () + { + Stage.Color = new Clutter.Color (0x00, 0x00, 0x00, 0xff); + cover_manager.SetRotation (RotateAxis.X, viewportAngleX, Stage.Width/2, Stage.Height/2,0); + Stage.Add (cover_manager); - - - coverManager.EmptyActor.SetToPb( - IconThemeUtils.LoadIcon (coverManager.TextureSize, "gtk-stop", "clutterflow-large.png") + cover_manager.EmptyActor.SetToPb ( + IconThemeUtils.LoadIcon (cover_manager.TextureSize, "gtk-stop", "clutterflow-large.png") ); - CoverManager.DoubleClickTime = (uint) Gtk.Settings.GetForScreen(this.Screen).DoubleClickTime; - coverManager.LowerBottom (); - coverManager.Show (); - } - - protected void SetupSlider () - { - slider = new ClutterFlowSlider (400, 40, coverManager); - Stage.Add (slider); - } - - protected void SetupLabels () { - caption_cover = new CoverCaption (coverManager, "Sans Bold 10", new Clutter.Color(1.0f,1.0f,1.0f,1.0f)); - Stage.Add (caption_cover); - - caption_track = new TrackCaption (coverManager, "Sans Bold 10", new Clutter.Color(1.0f,1.0f,1.0f,1.0f)); - Stage.Add (caption_track); - } - - protected void SetupWidgetBar () - { - pm_button = new PartyModeButton (); - fs_button = new FullscreenButton (); - sort_button = new SortButton (); - - widget_bar = new ClutterWidgetBar (new Actor[] { pm_button, fs_button, sort_button }); - widget_bar.ShowAll (); - Stage.Add (widget_bar); - widget_bar.SetPosition (5, 5); - } - #endregion - - #region Rendering - //Update all elements: - protected void RedrawInterface () - { - slider.Update (); - caption_cover.Update (); - caption_track.Update (); - - widget_bar.SetPosition (5, 5); - RedrawViewport (); - } - - //Update the coverStage position: - protected void RedrawViewport () - { - coverManager.UpdateBehaviour(); - coverManager.SetRotation(RotateAxis.X, viewportAngleX, coverManager.Width*0.5f, coverManager.Height*0.5f,0); - if (!coverManager.IsVisible) coverManager.Show(); - coverManager.LowerBottom(); - } - #endregion - - #region Event Handling - - protected override void OnSizeAllocated (Gdk.Rectangle allocation) - { - base.OnSizeAllocated (allocation); - RedrawInterface(); - } - - - private void HandleAllocationChanged (object o, AllocationChangedArgs args) - { - RedrawInterface(); - } - - - private void HandleActorActivated (ClutterFlowAlbum actor, EventArgs e) - { - UpdateAlbum (actor); - } - - private void HandleButtonPressEvent(object o, Clutter.ButtonPressEventArgs args) - { - Clutter.EventHelper.GetCoords (args.Event, out drag_x0, out drag_y0); - args.RetVal = true; - } - - void HandleButtonReleaseEvent (object o, Clutter.ButtonReleaseEventArgs args) - { - //if (args.Event.Button==1 && !dragging && coverManager.CurrentCover!=null && ActiveAlbum != CurrentAlbum) - // UpdateAlbum (); - if (dragging) Clutter.Ungrab.Pointer (); - dragging = false; - args.RetVal = true; - } - - private void HandleMotionEvent (object o, Clutter.MotionEventArgs args) - { - if ((args.Event.ModifierState.value__ & Clutter.ModifierType.Button1Mask.value__)!=0) { - float drag_x; float drag_y; - Clutter.EventHelper.GetCoords (args.Event, out drag_x, out drag_y); - if (!dragging) { - if (Math.Abs(drag_x0 - drag_x) > 2 && Math.Abs(drag_y0 - drag_y) > 2) { - start_index = CoverManager.TargetIndex; - Clutter.Grab.Pointer (Stage); - dragging = true; - } - } else { - if ((args.Event.ModifierState.value__ & Clutter.ModifierType.ControlMask.value__)!=0) { - if (!dragging) Clutter.Grab.Pointer (Stage); - ViewportAngleY += (float) (mouse_x - args.Event.X)*rotSens; - ViewportAngleX += (float) (mouse_y - args.Event.Y)*rotSens; - } else { - CoverManager.TargetIndex = start_index + (int) ((drag_x0 - drag_x)*drag_sens); - } - } - } else { - if (dragging) Clutter.Ungrab.Pointer (); - dragging = false; - } - mouse_x = args.Event.X; - mouse_y = args.Event.Y; - - args.RetVal = dragging; - } - - private void HandleScroll (object o, Clutter.ScrollEventArgs args) - { - if (args.Event.Direction==Clutter.ScrollDirection.Down - || args.Event.Direction==Clutter.ScrollDirection.Left) - Scroll(true); - else - Scroll(false); - } - - public void Scroll (bool Backward) - { - if (Backward) coverManager.TargetIndex--; - else coverManager.TargetIndex++; - } - - public void UpdateAlbum () - { - UpdateAlbum (albumLoader.CurrentActor); - } - - public void UpdateAlbum (ClutterFlowAlbum actor) - { - ActiveAlbum = actor.Album; - ActiveIndex = actor.Index; - if (UpdatedAlbum!=null) UpdatedAlbum (ActiveAlbum, EventArgs.Empty); - } - #endregion - - } + CoverManager.DoubleClickTime = (uint) Gtk.Settings.GetForScreen (this.Screen).DoubleClickTime; + cover_manager.LowerBottom (); + cover_manager.Show (); + } + + protected void SetupSlider () + { + slider = new ClutterFlowSlider (400, 40, cover_manager); + Stage.Add (slider); + } + + protected void SetupLabels () { + caption_cover = new CoverCaption (cover_manager, "Sans Bold 10", new Clutter.Color(1.0f,1.0f,1.0f,1.0f)); + Stage.Add (caption_cover); + + caption_track = new TrackCaption (cover_manager, "Sans Bold 10", new Clutter.Color(1.0f,1.0f,1.0f,1.0f)); + Stage.Add (caption_track); + } + + protected void SetupWidgetBar () + { + pm_button = new PartyModeButton (); + fs_button = new FullscreenButton (); + sort_button = new SortButton (); + + widget_bar = new ClutterWidgetBar (new Actor[] { pm_button, fs_button, sort_button }); + widget_bar.ShowAll (); + Stage.Add (widget_bar); + widget_bar.SetPosition (5, 5); + } + #endregion + + #region Rendering + //Update all elements: + protected void RedrawInterface () + { + slider.Update (); + caption_cover.Update (); + caption_track.Update (); + + widget_bar.SetPosition (5, 5); + RedrawViewport (); + } + + //Update the coverStage position: + protected void RedrawViewport () + { + cover_manager.UpdateBehaviour (); + cover_manager.SetRotation (RotateAxis.X, viewportAngleX, cover_manager.Width*0.5f, cover_manager.Height*0.5f,0); + if (!cover_manager.IsVisible) { + cover_manager.Show (); + } + cover_manager.LowerBottom (); + } + #endregion + + protected Cairo.ImageSurface GetDefaultSurface () + { + Cairo.ImageSurface surface = new Cairo.ImageSurface(Cairo.Format.ARGB32, CoverManager.TextureSize, CoverManager.TextureSize); + Cairo.Context context = new Cairo.Context(surface); + Gdk.CairoHelper.SetSourcePixbuf(context, IconThemeUtils.LoadIcon (CoverManager.TextureSize, "media-optical", "browser-album-cover"), 0, 0); + context.Paint(); + //((IDisposable) context.Target).Dispose(); + ((IDisposable) context).Dispose(); + return surface; + } + + + #region Event Handling + + protected override void OnSizeAllocated (Gdk.Rectangle allocation) + { + base.OnSizeAllocated (allocation); + RedrawInterface (); + } + + + private void HandleAllocationChanged (object o, AllocationChangedArgs args) + { + RedrawInterface (); + } + + + private void HandleActorActivated (ClutterFlowBaseActor actor, EventArgs e) + { + var album_actor = actor as ClutterFlowAlbum; + if (album_actor != null) { + UpdateAlbum (album_actor); + } + } + + private void HandleButtonPressEvent (object o, Clutter.ButtonPressEventArgs args) + { + Clutter.EventHelper.GetCoords (args.Event, out drag_x0, out drag_y0); + args.RetVal = true; + } + + void HandleButtonReleaseEvent (object o, Clutter.ButtonReleaseEventArgs args) + { + //if (args.Event.Button==1 && !dragging && coverManager.CurrentCover!=null && ActiveAlbum != CurrentAlbum) + // UpdateAlbum (); + if (dragging) { + Clutter.Ungrab.Pointer (); + } + dragging = false; + args.RetVal = true; + } + + private void HandleMotionEvent (object o, Clutter.MotionEventArgs args) + { + if ((args.Event.ModifierState.value__ & Clutter.ModifierType.Button1Mask.value__) != 0) { + float drag_x; float drag_y; + Clutter.EventHelper.GetCoords (args.Event, out drag_x, out drag_y); + if (!dragging) { + if (Math.Abs(drag_x0 - drag_x) > 2 && Math.Abs(drag_y0 - drag_y) > 2) { + start_index = CoverManager.TargetIndex; + Clutter.Grab.Pointer (Stage); + dragging = true; + } + } else { + if ((args.Event.ModifierState.value__ & Clutter.ModifierType.ControlMask.value__)!=0) { + if (!dragging) { + Clutter.Grab.Pointer (Stage); + } + ViewportAngleY += (float) (mouse_x - args.Event.X)*rotSens; + ViewportAngleX += (float) (mouse_y - args.Event.Y)*rotSens; + } else { + CoverManager.TargetIndex = start_index + (int) ((drag_x0 - drag_x)*drag_sens); + } + } + } else { + if (dragging) { + Clutter.Ungrab.Pointer (); + } + dragging = false; + } + mouse_x = args.Event.X; + mouse_y = args.Event.Y; + + args.RetVal = dragging; + } + + private void HandleScroll (object o, Clutter.ScrollEventArgs args) + { + if (args.Event.Direction == Clutter.ScrollDirection.Down + || args.Event.Direction == Clutter.ScrollDirection.Left) { + Scroll (true); + } else { + Scroll (false); + } + } + + public void Scroll (bool Backward) + { + if (Backward) { + cover_manager.TargetIndex--; + } else { + cover_manager.TargetIndex++; + } + } + + private void ScrollTo (string key) + { + ClutterFlowBaseActor actor = null; + album_loader.Cache.TryGetValue (key, out actor); + if (actor != null && cover_manager.Covers.Contains (actor)) { + cover_manager.TargetIndex = actor.Index; + } + } + + public void ScrollTo (AlbumInfo album) + { + cover_manager.Timeline.Timeout = 500; //give 'm some time to load the song etc. + ScrollTo (ClutterFlowAlbum.CreateCacheKey (album)); + } + + + public void UpdateAlbum () + { + UpdateAlbum (cover_manager.CurrentCover as ClutterFlowAlbum); + } + + public void UpdateAlbum (ClutterFlowAlbum actor) + { + ActiveAlbum = actor.Album; + ActiveIndex = actor.Index; + if (UpdatedAlbum != null) { + UpdatedAlbum (ActiveAlbum, EventArgs.Empty); + } + } + + protected void OnModelClearedHandler (object o, EventArgs args) + { + CoverManager.ReloadCovers (); + } + + protected void OnModelReloadedHandler (object o, EventArgs args) + { + if (model_count != album_loader.Model.Count) { + model_count = album_loader.Model.Count; + CoverManager.ReloadCovers (); + } + } + #endregion + } } diff -Nru banshee-community-extensions-2.0.1/src/ClutterFlow/Banshee.ClutterFlow/FloatingQueue.cs banshee-community-extensions-2.2.0/src/ClutterFlow/Banshee.ClutterFlow/FloatingQueue.cs --- banshee-community-extensions-2.0.1/src/ClutterFlow/Banshee.ClutterFlow/FloatingQueue.cs 2010-08-13 10:57:03.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/ClutterFlow/Banshee.ClutterFlow/FloatingQueue.cs 2011-05-28 21:06:44.000000000 +0000 @@ -1,271 +1,143 @@ -// -// FloatingQueue.cs -// -// Author: -// Mathijs Dumon -// -// Copyright (c) 2010 Mathijs Dumon -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; -using System.Threading; -using System.Collections.Generic; - -using ClutterFlow; - -namespace Banshee.ClutterFlow -{ - - /// - /// The FloatingQueue class runs an IndexedQueue under the hood. It provides you - /// with fast, focused enqueue and dequeue methods. Thread-safe class. - /// - public class FloatingQueue : IDisposable where T : class, IIndexable - { - IndexedQueue queue = new IndexedQueue (); - - private int offset = 0; // the offset from the focus - private int sign = 1; // positive or negative offset - private int focus = 0; - public int Focus { - get { lock (SyncRoot) { return focus; } } - set { - lock (SyncRoot) { - if (focus!=value) { - focus = value; - ResetFloaters (); - } - } - } - } - - public int Count { - get { lock (SyncRoot) { return queue.Count; } } - } - - public object SyncRoot { - get { return queue.SyncRoot; } - } - - public FloatingQueue () - { - lock (SyncRoot) { - queue.Changed += HandleChanged; - } - } - - protected bool disposed = false; - public virtual void Dispose () - { - if (disposed) - return; - disposed = true; - lock (SyncRoot) { - queue.Changed -= HandleChanged; - queue.Dispose (); - } - } - - - #region Methods - - protected virtual void ResetFloaters () - { - offset = 0; - sign = 1; - } - - public virtual void Enqueue (T item) - { - lock (SyncRoot) { - queue.Add(item); - Monitor.Pulse (SyncRoot); - } - } - - public virtual T Dequeue () - { - lock (SyncRoot) { - if (queue.Count==0) { - //Console.WriteLine("Inside zero count dequeue"); - return null; - } else if (queue.Count==1 && queue.TryKey(-1)!=null) { - //Console.WriteLine("Inside offscreen dequeue"); - return queue.PopFrom(-1); - } else { - //Console.WriteLine("Inside normal Dequeue Focus == " + focus + " offset == " + offset); - int index = focus + offset * sign; - T curr = queue.TryKey(index); - while (curr==null || offset == 10000) { - //Console.WriteLine(" WHILE WHILE WHILE"); - sign = -sign; - if (sign < 0) - offset++; - index = focus + offset * sign; - if (sign < 0) //we do not want offscreens to get loaded yet - index = Math.Max(1, index); - curr = queue.TryKey(index); //re-assign - } - return queue.PopFrom(index); - } - } - } - - - private void HandleChanged(object sender, EventArgs e) - { - lock (SyncRoot) { - ResetFloaters (); - } - } - #endregion - } - - /// - /// The IndexedQueue class runs a SortedDictionary under the hood. It provides you - /// with fast, indexed enqueue and dequeue methods. Not a thread-safe class. - /// - internal class IndexedQueue : IDisposable where T : class, IIndexable - { - #region Fields - private SortedDictionary> queue = new SortedDictionary> (); - -#pragma warning disable 0067 - public event EventHandler Changed; -#pragma warning restore 0067 - - public T this [int index] { - get { return queue[index][0]; } - } - - public int Count { - get { return queue.Count; } - } - - private int largest_key = 0; - public int LargestKey { - get { - return largest_key; - } - } - - public object SyncRoot { - get { return queue; } - } - #endregion - - public IndexedQueue () : base () - { - } - protected bool disposed = false; - public virtual void Dispose () - { - if (disposed) - return; - disposed = true; - queue.Clear (); - } - - - #region Methods - public T TryKey (int key) - { - List list; - queue.TryGetValue (key, out list); - return (list==null || list.Count==0) ? null : list[0]; - } - - public void Add (T value) - { - Add (value.Index, value, true); - } - - private void Add (int key, T value, bool do_delegates) - { - if (!queue.ContainsKey (key)) - queue.Add (key, new List ()); - else if (queue[key].Contains (value)) - throw new InvalidOperationException ("An IndexedQueue requires unique values, cannot insert a value twice!"); - queue[key].Add (value); - if (do_delegates) { - value.IndexChanged += HandleIndexChanged; - OnChanged (); - } - } - - /// - /// This method atempts to remove & return the first element of a given key. - /// This does not invoke the Changed event, unlike Add and Remove. - /// - /// - /// The index (a ) - /// - /// - /// The first element for this key. - /// - /// key refers to an empty or null list - public T PopFrom (int key) - { - if (!queue.ContainsKey (key) || queue[key].Count==0) { - throw new InvalidOperationException ("Value not found in IndexedQueue"); - } - T value = queue[key][0]; - value.IndexChanged -= HandleIndexChanged; - queue[key].RemoveAt (0); - if (queue[key].Count==0) - queue.Remove(key); - return value; - } - - public void Remove (T value) - { - Remove (value.Index, value, true); - } - private void Remove (int key, T value, bool do_delegates) - { - if (!queue.ContainsKey (key) || !queue[key].Contains (value)) - throw new InvalidOperationException ("Value not found in IndexedQueue"); - queue[key].Remove (value); - if (do_delegates) { - value.IndexChanged -= HandleIndexChanged; - OnChanged (); - } - if (queue[key].Count==0) - queue.Remove(key); - } - - protected void HandleIndexChanged(IIndexable item, int old_index, int new_index) - { - lock (SyncRoot) { - if (item is T && queue.ContainsKey (old_index) && queue[old_index].Contains ((T) item)) { - Remove (old_index, (T) item, false); - Add (new_index, (T) item, false); - OnChanged (); - } - } - } - - protected virtual void OnChanged () - { - if (Changed!=null) Changed (this, EventArgs.Empty); - } - #endregion - } -} +// +// FloatingQueue.cs +// +// Author: +// Mathijs Dumon +// +// Copyright (c) 2010 Mathijs Dumon +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +using System; +using System.Threading; +using System.Collections.Generic; + +using ClutterFlow; + +namespace Banshee.ClutterFlow +{ + /// + /// The FloatingQueue class runs an IndexedQueue under the hood. It provides you + /// with fast, focused enqueue and dequeue methods. Thread-safe class. + /// + public class FloatingQueue : IDisposable where T : class, IIndexable + { + IndexedQueue queue = new IndexedQueue (); + + // the offset from the focus + private int offset = 0; + // positive or negative offset + private int sign = 1; + private int focus = 0; + public int Focus { + get { lock (SyncRoot) { return focus; } } + set { + lock (SyncRoot) { + if (focus!=value) { + focus = value; + ResetFloaters (); + } + } + } + } + + public int Count { + get { lock (SyncRoot) { return queue.Count; } } + } + + public object SyncRoot { + get { return queue.SyncRoot; } + } + + public FloatingQueue () + { + lock (SyncRoot) { + queue.Changed += HandleChanged; + } + } + + protected bool disposed = false; + public virtual void Dispose () + { + if (disposed) + return; + disposed = true; + lock (SyncRoot) { + queue.Changed -= HandleChanged; + queue.Dispose (); + } + } + + + #region Methods + + protected virtual void ResetFloaters () + { + offset = 0; + sign = 1; + } + + public virtual void Enqueue (T item) + { + lock (SyncRoot) { + queue.Add(item); + Monitor.Pulse (SyncRoot); + } + } + + public virtual T Dequeue () + { + lock (SyncRoot) { + if (queue.Count==0) { + //Console.WriteLine("Inside zero count dequeue"); + return null; + } else if (queue.Count==1 && queue.TryKey(-1)!=null) { + //Console.WriteLine("Inside offscreen dequeue"); + return queue.PopFrom(-1); + } else { + //Console.WriteLine("Inside normal Dequeue Focus == " + focus + " offset == " + offset); + int index = focus + offset * sign; + T curr = queue.TryKey(index); + while (curr==null || offset == 10000) { + //Console.WriteLine(" WHILE WHILE WHILE"); + sign = -sign; + if (sign < 0) + offset++; + index = focus + offset * sign; + if (sign < 0) { + //we do not want offscreens to get loaded yet + index = Math.Max(1, index); + } + curr = queue.TryKey(index); + } + return queue.PopFrom(index); + } + } + } + + + private void HandleChanged(object sender, EventArgs e) + { + lock (SyncRoot) { + ResetFloaters (); + } + } + #endregion + } +} \ No newline at end of file diff -Nru banshee-community-extensions-2.0.1/src/ClutterFlow/Banshee.ClutterFlow/FullscreenButton.cs banshee-community-extensions-2.2.0/src/ClutterFlow/Banshee.ClutterFlow/FullscreenButton.cs --- banshee-community-extensions-2.0.1/src/ClutterFlow/Banshee.ClutterFlow/FullscreenButton.cs 2010-08-13 20:05:55.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/ClutterFlow/Banshee.ClutterFlow/FullscreenButton.cs 2011-05-28 20:47:11.000000000 +0000 @@ -32,77 +32,77 @@ namespace Banshee.ClutterFlow.Buttons { - - public class FullscreenButton : ClutterToggleButton - { - - public FullscreenButton (bool toggled) : base (25, 25, toggled) - { - } - - public FullscreenButton () : this (false) - { - } - - #region Rendering - private void Render (Clutter.CairoTexture texture, int with_state, bool outwards) - { - - texture.Clear (); - Cairo.Context context = texture.Create (); - - double lwidth = 1; - double hlwidth = lwidth*0.5; - - //Draw outline rectangles: - context.Rectangle (hlwidth, hlwidth, texture.Width - lwidth, texture.Height - lwidth); - context.SetSourceRGB (1.0, 1.0, 1.0); - context.LineWidth = lwidth; - context.StrokePreserve (); - double sat = (with_state==0 ? 0.4 : (with_state==1 ? 0.6 : 0.8)); - context.SetSourceRGB (sat, sat, sat); - context.Fill (); - - double dim = 4; - context.MoveTo (-dim, 0); - context.LineTo (outwards ? 0 : -dim, outwards ? 0 : dim); - context.LineTo (0, dim); - context.MoveTo (-dim, dim); - context.LineTo (0, 0); - context.ClosePath (); - Cairo.Path arrow = context.CopyPath (); - context.NewPath (); - - double margin = 2 + hlwidth ; - PointD center = new PointD (texture.Width*0.5, texture.Height*0.5); - PointD transl = new PointD (center.X - margin, -(center.Y - margin)); - context.LineWidth = lwidth; - sat = (with_state==1 ? 0.0 : 1.0); - context.SetSourceRGB (sat,sat,sat); - - context.Translate (center.X, center.Y); - for (int i = 0; i < 4; i++) { - context.Rotate (Math.PI * 0.5 * i); - context.Translate (transl.X, transl.Y); - context.AppendPath (arrow); - context.Stroke (); - context.Translate (-transl.X, -transl.Y); - } - - ((IDisposable) arrow).Dispose (); - ((IDisposable) context.Target).Dispose (); - ((IDisposable) context).Dispose (); - } - - protected override void CreatePassiveTexture (Clutter.CairoTexture texture, int with_state) - { - Render (texture, with_state, true); - } - - protected override void CreateActiveTexture (Clutter.CairoTexture texture, int with_state) - { - Render (texture, with_state, false); - } - #endregion - } + + public class FullscreenButton : ClutterToggleButton + { + + public FullscreenButton (bool toggled) : base (25, 25, toggled) + { + } + + public FullscreenButton () : this (false) + { + } + + #region Rendering + private void Render (Clutter.CairoTexture texture, int with_state, bool outwards) + { + + texture.Clear (); + Cairo.Context context = texture.Create (); + + double lwidth = 1; + double hlwidth = lwidth*0.5; + + //Draw outline rectangles: + context.Rectangle (hlwidth, hlwidth, texture.Width - lwidth, texture.Height - lwidth); + context.SetSourceRGB (1.0, 1.0, 1.0); + context.LineWidth = lwidth; + context.StrokePreserve (); + double sat = (with_state==0 ? 0.4 : (with_state==1 ? 0.6 : 0.8)); + context.SetSourceRGB (sat, sat, sat); + context.Fill (); + + double dim = 4; + context.MoveTo (-dim, 0); + context.LineTo (outwards ? 0 : -dim, outwards ? 0 : dim); + context.LineTo (0, dim); + context.MoveTo (-dim, dim); + context.LineTo (0, 0); + context.ClosePath (); + Cairo.Path arrow = context.CopyPath (); + context.NewPath (); + + double margin = 2 + hlwidth ; + PointD center = new PointD (texture.Width*0.5, texture.Height*0.5); + PointD transl = new PointD (center.X - margin, -(center.Y - margin)); + context.LineWidth = lwidth; + sat = (with_state==1 ? 0.0 : 1.0); + context.SetSourceRGB (sat,sat,sat); + + context.Translate (center.X, center.Y); + for (int i = 0; i < 4; i++) { + context.Rotate (Math.PI * 0.5 * i); + context.Translate (transl.X, transl.Y); + context.AppendPath (arrow); + context.Stroke (); + context.Translate (-transl.X, -transl.Y); + } + + ((IDisposable) arrow).Dispose (); + ((IDisposable) context.Target).Dispose (); + ((IDisposable) context).Dispose (); + } + + protected override void CreatePassiveTexture (Clutter.CairoTexture texture, int with_state) + { + Render (texture, with_state, true); + } + + protected override void CreateActiveTexture (Clutter.CairoTexture texture, int with_state) + { + Render (texture, with_state, false); + } + #endregion + } } diff -Nru banshee-community-extensions-2.0.1/src/ClutterFlow/Banshee.ClutterFlow/IndexedQueue.cs banshee-community-extensions-2.2.0/src/ClutterFlow/Banshee.ClutterFlow/IndexedQueue.cs --- banshee-community-extensions-2.0.1/src/ClutterFlow/Banshee.ClutterFlow/IndexedQueue.cs 1970-01-01 00:00:00.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/ClutterFlow/Banshee.ClutterFlow/IndexedQueue.cs 2011-05-28 21:06:44.000000000 +0000 @@ -0,0 +1,172 @@ +// +// IndexedQueue.cs +// +// Author: +// Mathijs Dumon +// +// Copyright (c) 2010 Mathijs Dumon +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +using System; +using System.Collections.Generic; + +using ClutterFlow; + +namespace Banshee.ClutterFlow +{ + /// + /// The IndexedQueue class runs a SortedDictionary under the hood. It provides you + /// with fast, indexed enqueue and dequeue methods. Not a thread-safe class. + /// + internal class IndexedQueue : IDisposable where T : class, IIndexable + { + #region Fields + private SortedDictionary> queue = new SortedDictionary> (); + + #pragma warning disable 0067 + public event EventHandler Changed; + #pragma warning restore 0067 + + public T this [int index] { + get { return queue[index][0]; } + } + + public int Count { + get { return queue.Count; } + } + + private int largest_key = 0; + public int LargestKey { + get { + return largest_key; + } + } + + public object SyncRoot { + get { return queue; } + } + #endregion + + public IndexedQueue () : base () + { + } + protected bool disposed = false; + public virtual void Dispose () + { + if (disposed) { + return; + } + disposed = true; + queue.Clear (); + } + + #region Methods + public T TryKey (int key) + { + List list; + queue.TryGetValue (key, out list); + return (list==null || list.Count==0) ? null : list[0]; + } + + public void Add (T value) + { + Add (value.Index, value, true); + } + + private void Add (int key, T value, bool do_delegates) + { + if (!queue.ContainsKey (key)) { + queue.Add (key, new List ()); + } else if (queue[key].Contains (value)) { + throw new InvalidOperationException ("An IndexedQueue requires unique values, cannot insert a value twice!"); + } + queue[key].Add (value); + if (do_delegates) { + value.IndexChanged += HandleIndexChanged; + OnChanged (); + } + } + + /// + /// This method atempts to remove & return the first element of a given key. + /// This does not invoke the Changed event, unlike Add and Remove. + /// + /// + /// The index (a ) + /// + /// + /// The first element for this key. + /// + /// key refers to an empty or null list + public T PopFrom (int key) + { + if (!queue.ContainsKey (key) || queue[key].Count==0) { + throw new InvalidOperationException ("Value not found in IndexedQueue"); + } + T value = queue[key][0]; + value.IndexChanged -= HandleIndexChanged; + queue[key].RemoveAt (0); + if (queue[key].Count==0) { + queue.Remove(key); + } + return value; + } + + public void Remove (T value) + { + Remove (value.Index, value, true); + } + + private void Remove (int key, T value, bool do_delegates) + { + if (!queue.ContainsKey (key) || !queue[key].Contains (value)) { + throw new InvalidOperationException ("Value not found in IndexedQueue"); + } + queue[key].Remove (value); + if (do_delegates) { + value.IndexChanged -= HandleIndexChanged; + OnChanged (); + } + if (queue[key].Count==0) { + queue.Remove(key); + } + } + + protected void HandleIndexChanged(IIndexable item, int old_index, int new_index) + { + lock (SyncRoot) { + if (item is T && queue.ContainsKey (old_index) && queue[old_index].Contains ((T) item)) { + Remove (old_index, (T) item, false); + Add (new_index, (T) item, false); + OnChanged (); + } + } + } + + private void OnChanged () + { + var handler = this.Changed; + if ( handler != null) { + handler (this, EventArgs.Empty); + } + } + #endregion + } +} diff -Nru banshee-community-extensions-2.0.1/src/ClutterFlow/Banshee.ClutterFlow/Makefile.am banshee-community-extensions-2.2.0/src/ClutterFlow/Banshee.ClutterFlow/Makefile.am --- banshee-community-extensions-2.0.1/src/ClutterFlow/Banshee.ClutterFlow/Makefile.am 2010-08-13 20:05:55.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/ClutterFlow/Banshee.ClutterFlow/Makefile.am 2011-05-29 17:35:24.000000000 +0000 @@ -3,6 +3,7 @@ ASSEMBLY_GCONF_SCHEMA = banshee-plugin-alarm.schemas.in SOURCES = \ + AlbumComparer.cs \ AlbumLoader.cs \ ArtworkLookup.cs \ ClutterFlowAlbum.cs \ @@ -12,6 +13,7 @@ ClutterFlowView.cs \ FloatingQueue.cs \ FullscreenButton.cs \ + IndexedQueue.cs \ PartyModeButton.cs \ SortButton.cs diff -Nru banshee-community-extensions-2.0.1/src/ClutterFlow/Banshee.ClutterFlow/Makefile.in banshee-community-extensions-2.2.0/src/ClutterFlow/Banshee.ClutterFlow/Makefile.in --- banshee-community-extensions-2.0.1/src/ClutterFlow/Banshee.ClutterFlow/Makefile.in 2011-05-03 20:45:04.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/ClutterFlow/Banshee.ClutterFlow/Makefile.in 2011-09-19 20:36:50.000000000 +0000 @@ -42,6 +42,7 @@ subdir = src/ClutterFlow/Banshee.ClutterFlow ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/m4/extensions/alarmclock.m4 \ + $(top_srcdir)/build/m4/extensions/albumartwriter.m4 \ $(top_srcdir)/build/m4/extensions/ampache.m4 \ $(top_srcdir)/build/m4/extensions/appindicator.m4 \ $(top_srcdir)/build/m4/extensions/awn.m4 \ @@ -49,6 +50,7 @@ $(top_srcdir)/build/m4/extensions/clutterflow.m4 \ $(top_srcdir)/build/m4/extensions/common.m4 \ $(top_srcdir)/build/m4/extensions/coverwallpaper.m4 \ + $(top_srcdir)/build/m4/extensions/duplicatesongdetector.m4 \ $(top_srcdir)/build/m4/extensions/jamendo.m4 \ $(top_srcdir)/build/m4/extensions/karaoke.m4 \ $(top_srcdir)/build/m4/extensions/lastfmfingerprint.m4 \ @@ -68,6 +70,11 @@ $(top_srcdir)/build/m4/shamrock/expansions.m4 \ $(top_srcdir)/build/m4/shamrock/gnome-doc.m4 \ $(top_srcdir)/build/m4/shamrock/i18n.m4 \ + $(top_srcdir)/build/m4/shamrock/libtool.m4 \ + $(top_srcdir)/build/m4/shamrock/ltoptions.m4 \ + $(top_srcdir)/build/m4/shamrock/ltsugar.m4 \ + $(top_srcdir)/build/m4/shamrock/ltversion.m4 \ + $(top_srcdir)/build/m4/shamrock/lt~obsolete.m4 \ $(top_srcdir)/build/m4/shamrock/mono.m4 \ $(top_srcdir)/build/m4/shamrock/nunit.m4 \ $(top_srcdir)/build/m4/shamrock/programs.m4 \ @@ -104,7 +111,6 @@ DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AM_MAKEFLAGS = @AM_MAKEFLAGS@ @@ -330,6 +336,7 @@ $(am__append_1) ASSEMBLY_GCONF_SCHEMA = banshee-plugin-alarm.schemas.in SOURCES = \ + AlbumComparer.cs \ AlbumLoader.cs \ ArtworkLookup.cs \ ClutterFlowAlbum.cs \ @@ -339,6 +346,7 @@ ClutterFlowView.cs \ FloatingQueue.cs \ FullscreenButton.cs \ + IndexedQueue.cs \ PartyModeButton.cs \ SortButton.cs diff -Nru banshee-community-extensions-2.0.1/src/ClutterFlow/Banshee.ClutterFlow/PartyModeButton.cs banshee-community-extensions-2.2.0/src/ClutterFlow/Banshee.ClutterFlow/PartyModeButton.cs --- banshee-community-extensions-2.0.1/src/ClutterFlow/Banshee.ClutterFlow/PartyModeButton.cs 2010-08-13 20:05:55.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/ClutterFlow/Banshee.ClutterFlow/PartyModeButton.cs 2011-05-28 20:47:11.000000000 +0000 @@ -33,98 +33,98 @@ namespace Banshee.ClutterFlow.Buttons { - public class PartyModeButton : ClutterToggleButton - { - public PartyModeButton (bool toggled) : base (25, 25, toggled) - { - } - - public PartyModeButton() : this (false) - { - } - - #region Rendering - protected void DrawSmallCovers (Cairo.Context context, float width, float height, double lwidth) { - context.Save (); - - double hlwidth = lwidth*0.5; - - context.MoveTo (hlwidth, height-hlwidth); - context.LineTo (hlwidth, 0.3*(height-lwidth)); - context.LineTo ((width-lwidth)*0.65, hlwidth); - context.LineTo ((width-lwidth)*0.65, 0.7*(height-lwidth)); - context.ClosePath (); - context.LineWidth = lwidth; - context.SetSourceRGBA (0.1,0.1,0.1,1.0); - context.FillPreserve (); - context.SetSourceRGBA (1.0,1.0,1.0,0.7); - context.Stroke (); - context.Translate ((4+hlwidth), 0); - context.MoveTo (hlwidth, height-hlwidth); - context.LineTo (hlwidth, 0.3*(height-lwidth)); - context.LineTo ((width-lwidth)*0.65, hlwidth); - context.LineTo ((width-lwidth)*0.65, 0.7*(height-lwidth)); - context.ClosePath (); - context.SetSourceRGBA (0.1,0.1,0.1,1.0); - context.FillPreserve (); - context.SetSourceRGBA (1.0,1.0,1.0,0.7); - context.Stroke (); - context.Translate (-(4+hlwidth), 0); - - context.Restore (); - } - - protected override void CreatePassiveTexture (Clutter.CairoTexture texture, int with_state) - { - texture.Clear(); - Cairo.Context context = texture.Create(); - - double lwidth = 1; - double hlwidth = lwidth*0.5; - - //Draw outline rectangles: - DrawSmallCovers (context, texture.Width, texture.Height, lwidth); - - //Draw play icon: - context.MoveTo ((texture.Width-lwidth)*0.5, 0.3*(texture.Height-lwidth)); - context.LineTo ((texture.Width-lwidth)*0.5, texture.Height-hlwidth); - context.LineTo (texture.Width-hlwidth, 0.65*(texture.Height-lwidth)); - context.ClosePath (); - context.LineWidth = lwidth; - double sat = (with_state==0 ? 0.4 : (with_state==1 ? 0.6 : 0.8)); - context.SetSourceRGBA (sat, sat, sat, 1.0); - context.FillPreserve (); - context.SetSourceRGB (1.0,1.0,1.0); - context.Stroke (); - - ((IDisposable) context.Target).Dispose(); - ((IDisposable) context).Dispose(); - } - - protected override void CreateActiveTexture (Clutter.CairoTexture texture, int with_state) - { - texture.Clear (); - Cairo.Context context = texture.Create (); - - double lwidth = 1; - double hlwidth = lwidth*0.5; - - //Draw outline rectangles: - DrawSmallCovers (context, texture.Width, texture.Height, lwidth); - - //Draw stop icon: - double dim = Math.Min (texture.Width*0.6 - hlwidth, texture.Height*0.6 - hlwidth); - context.Rectangle (texture.Width*0.4, texture.Height*0.4, dim, dim); - context.LineWidth = lwidth; - double sat = (with_state==0 ? 0.4 : (with_state==1 ? 0.6 : 0.8)); - context.SetSourceRGBA (sat, sat, sat, 1.0); - context.FillPreserve (); - context.SetSourceRGB (1.0,1.0,1.0); - context.Stroke (); - - ((IDisposable) context.Target).Dispose (); - ((IDisposable) context).Dispose (); - } - #endregion - } + public class PartyModeButton : ClutterToggleButton + { + public PartyModeButton (bool toggled) : base (25, 25, toggled) + { + } + + public PartyModeButton() : this (false) + { + } + + #region Rendering + protected void DrawSmallCovers (Cairo.Context context, float width, float height, double lwidth) { + context.Save (); + + double hlwidth = lwidth*0.5; + + context.MoveTo (hlwidth, height-hlwidth); + context.LineTo (hlwidth, 0.3*(height-lwidth)); + context.LineTo ((width-lwidth)*0.65, hlwidth); + context.LineTo ((width-lwidth)*0.65, 0.7*(height-lwidth)); + context.ClosePath (); + context.LineWidth = lwidth; + context.SetSourceRGBA (0.1,0.1,0.1,1.0); + context.FillPreserve (); + context.SetSourceRGBA (1.0,1.0,1.0,0.7); + context.Stroke (); + context.Translate ((4+hlwidth), 0); + context.MoveTo (hlwidth, height-hlwidth); + context.LineTo (hlwidth, 0.3*(height-lwidth)); + context.LineTo ((width-lwidth)*0.65, hlwidth); + context.LineTo ((width-lwidth)*0.65, 0.7*(height-lwidth)); + context.ClosePath (); + context.SetSourceRGBA (0.1,0.1,0.1,1.0); + context.FillPreserve (); + context.SetSourceRGBA (1.0,1.0,1.0,0.7); + context.Stroke (); + context.Translate (-(4+hlwidth), 0); + + context.Restore (); + } + + protected override void CreatePassiveTexture (Clutter.CairoTexture texture, int with_state) + { + texture.Clear (); + Cairo.Context context = texture.Create (); + + double lwidth = 1; + double hlwidth = lwidth*0.5; + + //Draw outline rectangles: + DrawSmallCovers (context, texture.Width, texture.Height, lwidth); + + //Draw play icon: + context.MoveTo ((texture.Width-lwidth)*0.5, 0.3*(texture.Height-lwidth)); + context.LineTo ((texture.Width-lwidth)*0.5, texture.Height-hlwidth); + context.LineTo (texture.Width-hlwidth, 0.65*(texture.Height-lwidth)); + context.ClosePath (); + context.LineWidth = lwidth; + double sat = (with_state==0 ? 0.4 : (with_state==1 ? 0.6 : 0.8)); + context.SetSourceRGBA (sat, sat, sat, 1.0); + context.FillPreserve (); + context.SetSourceRGB (1.0,1.0,1.0); + context.Stroke (); + + ((IDisposable) context.Target).Dispose(); + ((IDisposable) context).Dispose(); + } + + protected override void CreateActiveTexture (Clutter.CairoTexture texture, int with_state) + { + texture.Clear (); + Cairo.Context context = texture.Create (); + + double lwidth = 1; + double hlwidth = lwidth*0.5; + + //Draw outline rectangles: + DrawSmallCovers (context, texture.Width, texture.Height, lwidth); + + //Draw stop icon: + double dim = Math.Min (texture.Width*0.6 - hlwidth, texture.Height*0.6 - hlwidth); + context.Rectangle (texture.Width*0.4, texture.Height*0.4, dim, dim); + context.LineWidth = lwidth; + double sat = (with_state==0 ? 0.4 : (with_state==1 ? 0.6 : 0.8)); + context.SetSourceRGBA (sat, sat, sat, 1.0); + context.FillPreserve (); + context.SetSourceRGB (1.0,1.0,1.0); + context.Stroke (); + + ((IDisposable) context.Target).Dispose (); + ((IDisposable) context).Dispose (); + } + #endregion + } } diff -Nru banshee-community-extensions-2.0.1/src/ClutterFlow/Banshee.ClutterFlow/SortButton.cs banshee-community-extensions-2.2.0/src/ClutterFlow/Banshee.ClutterFlow/SortButton.cs --- banshee-community-extensions-2.0.1/src/ClutterFlow/Banshee.ClutterFlow/SortButton.cs 2010-08-13 10:57:03.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/ClutterFlow/Banshee.ClutterFlow/SortButton.cs 2011-05-28 20:47:11.000000000 +0000 @@ -12,119 +12,117 @@ namespace Banshee.ClutterFlow.Buttons { - public class SortButton : ClutterToggleButton - { + public class SortButton : ClutterToggleButton + { - public SortButton (bool toggled) : base (25, 25, toggled) - { - } - - public SortButton () : this (false) - { - } - - #region Rendering - private void Render(Clutter.CairoTexture texture, int with_state, bool outwards) - { - - texture.Clear(); - Cairo.Context context = texture.Create(); - - - - double alpha_f = with_state == 0 ? 0.5 : (with_state == 1 ? 0.8 : 1); - - double lwidth = 1; - double hlwidth = lwidth*0.5; - context.LineWidth = lwidth; - - if (outwards) { - context.MoveTo (texture.Width*0.5-texture.Height*0.45, texture.Height*0.9); - context.CurveTo (texture.Width*0.3, texture.Height, texture.Width*0.6, texture.Height, texture.Width*0.5+texture.Height*0.45, texture.Height*0.9); - context.ArcNegative (texture.Width*0.5, texture.Height*0.9, texture.Height*0.45, 0, Math.PI); - context.ClosePath (); - Gradient g1 = new LinearGradient (0, texture.Height/2, 0, texture.Height); - g1.AddColorStop (0, new Cairo.Color (0.6, 0.6, 0.6, 1.0*alpha_f)); - g1.AddColorStop (1.0, new Cairo.Color (1.0, 1.0, 1.0, 1.0*alpha_f)); - context.Pattern = g1; - context.FillPreserve (); - context.SetSourceRGBA (1.0, 1.0, 1.0, 1.0*alpha_f); - context.Stroke (); - ((IDisposable) g1).Dispose (); - - context.Arc (Width*0.5, Height*0.33+lwidth, Height*0.33, 0, Math.PI*2); - context.ClosePath (); - context.Operator = Operator.Source; - Gradient g2 = new RadialGradient (texture.Width*0.5, texture.Height*0.25, 0, texture.Width*0.5, texture.Height*0.25, texture.Width*0.5); - g2.AddColorStop (0, new Cairo.Color (1.0, 1.0, 1.0, 1.0*alpha_f)); - g2.AddColorStop (1.0, new Cairo.Color (0.6, 0.6, 0.6, 1.0*alpha_f)); - context.Pattern = g2; - //context.SetSourceRGBA (1.0, 1.0, 1.0, 1.0*alpha_f); - context.FillPreserve (); - Gradient g3 = new LinearGradient (0, 0, 0, texture.Height*0.5); - g3.AddColorStop (0, new Cairo.Color (1.0, 1.0, 1.0, 1.0*alpha_f)); - g3.AddColorStop (1.0, new Cairo.Color (0, 0, 0, 1.0*alpha_f)); - context.Pattern = g3; - //context.SetSourceRGBA (1.0, 1.0, 1.0, 1.0*alpha_f); - context.Stroke (); - ((IDisposable) g2).Dispose (); - ((IDisposable) g3).Dispose (); - - - } else { - Cairo.PointD c = new Cairo.PointD (texture.Width*0.5, texture.Height*0.5); - double max_r = Math.Min (c.X, c.Y) - hlwidth; - - context.Arc (c.X, c.Y, max_r, 0, Math.PI*2); - context.ArcNegative (c.X, c.Y, max_r*0.25, Math.PI*2, 0); - context.ClosePath (); - context.SetSourceRGBA (0.5, 0.5, 0.5, 1.0*alpha_f); - context.StrokePreserve (); - Gradient g1 = new LinearGradient (0, texture.Height, texture.Width, 0); - g1.AddColorStop(0, new Cairo.Color (1.0, 1.0, 1.0, 1.0*alpha_f)); - g1.AddColorStop(0.5, new Cairo.Color (0.7, 0.7, 0.7, 1.0*alpha_f)); - g1.AddColorStop(1, new Cairo.Color (0.9, 0.9, 0.9, 1.0*alpha_f)); - context.Pattern = g1; - context.Fill (); - ((IDisposable) g1).Dispose (); - - context.ArcNegative (c.X, c.Y, max_r*0.25+lwidth, Math.PI*1.75, Math.PI*0.75); - context.Arc (c.X, c.Y, max_r, Math.PI*0.75, Math.PI*1.75); - context.ClosePath (); - Gradient g2 = new LinearGradient (c.X, c.Y, c.X*0.35, c.Y*0.35); - g2.AddColorStop(0, new Cairo.Color (1.0, 1.0, 1.0, 1.0*alpha_f)); - g2.AddColorStop(1, new Cairo.Color (1.0, 1.0, 1.0, 0.0)); - context.Pattern = g2; - context.Fill (); - ((IDisposable) g2).Dispose (); - - context.ArcNegative (c.X, c.Y, max_r*0.25+lwidth, Math.PI*2, 0); - context.Arc (c.X, c.Y, max_r*0.45, 0, Math.PI*2); - context.SetSourceRGBA (1.0, 1.0, 1.0, 0.8*alpha_f); - context.Fill (); - - context.Arc (c.X, c.Y, max_r-lwidth, 0, Math.PI*2); - Gradient g3 = new LinearGradient (0, texture.Height, texture.Width, 0); - g3.AddColorStop(0, new Cairo.Color (1.0, 1.0, 1.0, 0.0)); - g3.AddColorStop(1, new Cairo.Color (0.9, 0.9, 0.9, 1.0*alpha_f)); - context.Pattern = g3; - context.Stroke (); - ((IDisposable) g3).Dispose (); - } - - ((IDisposable) context.Target).Dispose (); - ((IDisposable) context).Dispose (); - } - - protected override void CreatePassiveTexture (Clutter.CairoTexture texture, int with_state) - { - Render (texture, with_state, true); - } - - protected override void CreateActiveTexture (Clutter.CairoTexture texture, int with_state) - { - Render (texture, with_state, false); - } - #endregion - } + public SortButton (bool toggled) : base (25, 25, toggled) + { + } + + public SortButton () : this (false) + { + } + + #region Rendering + private void Render(Clutter.CairoTexture texture, int with_state, bool outwards) + { + + texture.Clear (); + Cairo.Context context = texture.Create (); + + double alpha_f = with_state == 0 ? 0.5 : (with_state == 1 ? 0.8 : 1); + + double lwidth = 1; + double hlwidth = lwidth*0.5; + context.LineWidth = lwidth; + + if (outwards) { + context.MoveTo (texture.Width*0.5-texture.Height*0.45, texture.Height*0.9); + context.CurveTo (texture.Width*0.3, texture.Height, texture.Width*0.6, texture.Height, texture.Width*0.5+texture.Height*0.45, texture.Height*0.9); + context.ArcNegative (texture.Width*0.5, texture.Height*0.9, texture.Height*0.45, 0, Math.PI); + context.ClosePath (); + Gradient g1 = new LinearGradient (0, texture.Height/2, 0, texture.Height); + g1.AddColorStop (0, new Cairo.Color (0.6, 0.6, 0.6, 1.0*alpha_f)); + g1.AddColorStop (1.0, new Cairo.Color (1.0, 1.0, 1.0, 1.0*alpha_f)); + context.Pattern = g1; + context.FillPreserve (); + context.SetSourceRGBA (1.0, 1.0, 1.0, 1.0*alpha_f); + context.Stroke (); + ((IDisposable) g1).Dispose (); + + context.Arc (Width*0.5, Height*0.33+lwidth, Height*0.33, 0, Math.PI*2); + context.ClosePath (); + context.Operator = Operator.Source; + Gradient g2 = new RadialGradient (texture.Width*0.5, texture.Height*0.25, 0, texture.Width*0.5, texture.Height*0.25, texture.Width*0.5); + g2.AddColorStop (0, new Cairo.Color (1.0, 1.0, 1.0, 1.0*alpha_f)); + g2.AddColorStop (1.0, new Cairo.Color (0.6, 0.6, 0.6, 1.0*alpha_f)); + context.Pattern = g2; + //context.SetSourceRGBA (1.0, 1.0, 1.0, 1.0*alpha_f); + context.FillPreserve (); + Gradient g3 = new LinearGradient (0, 0, 0, texture.Height*0.5); + g3.AddColorStop (0, new Cairo.Color (1.0, 1.0, 1.0, 1.0*alpha_f)); + g3.AddColorStop (1.0, new Cairo.Color (0, 0, 0, 1.0*alpha_f)); + context.Pattern = g3; + //context.SetSourceRGBA (1.0, 1.0, 1.0, 1.0*alpha_f); + context.Stroke (); + ((IDisposable) g2).Dispose (); + ((IDisposable) g3).Dispose (); + + + } else { + Cairo.PointD c = new Cairo.PointD (texture.Width*0.5, texture.Height*0.5); + double max_r = Math.Min (c.X, c.Y) - hlwidth; + + context.Arc (c.X, c.Y, max_r, 0, Math.PI*2); + context.ArcNegative (c.X, c.Y, max_r*0.25, Math.PI*2, 0); + context.ClosePath (); + context.SetSourceRGBA (0.5, 0.5, 0.5, 1.0*alpha_f); + context.StrokePreserve (); + Gradient g1 = new LinearGradient (0, texture.Height, texture.Width, 0); + g1.AddColorStop(0, new Cairo.Color (1.0, 1.0, 1.0, 1.0*alpha_f)); + g1.AddColorStop(0.5, new Cairo.Color (0.7, 0.7, 0.7, 1.0*alpha_f)); + g1.AddColorStop(1, new Cairo.Color (0.9, 0.9, 0.9, 1.0*alpha_f)); + context.Pattern = g1; + context.Fill (); + ((IDisposable) g1).Dispose (); + + context.ArcNegative (c.X, c.Y, max_r*0.25+lwidth, Math.PI*1.75, Math.PI*0.75); + context.Arc (c.X, c.Y, max_r, Math.PI*0.75, Math.PI*1.75); + context.ClosePath (); + Gradient g2 = new LinearGradient (c.X, c.Y, c.X*0.35, c.Y*0.35); + g2.AddColorStop(0, new Cairo.Color (1.0, 1.0, 1.0, 1.0*alpha_f)); + g2.AddColorStop(1, new Cairo.Color (1.0, 1.0, 1.0, 0.0)); + context.Pattern = g2; + context.Fill (); + ((IDisposable) g2).Dispose (); + + context.ArcNegative (c.X, c.Y, max_r*0.25+lwidth, Math.PI*2, 0); + context.Arc (c.X, c.Y, max_r*0.45, 0, Math.PI*2); + context.SetSourceRGBA (1.0, 1.0, 1.0, 0.8*alpha_f); + context.Fill (); + + context.Arc (c.X, c.Y, max_r-lwidth, 0, Math.PI*2); + Gradient g3 = new LinearGradient (0, texture.Height, texture.Width, 0); + g3.AddColorStop(0, new Cairo.Color (1.0, 1.0, 1.0, 0.0)); + g3.AddColorStop(1, new Cairo.Color (0.9, 0.9, 0.9, 1.0*alpha_f)); + context.Pattern = g3; + context.Stroke (); + ((IDisposable) g3).Dispose (); + } + + ((IDisposable) context.Target).Dispose (); + ((IDisposable) context).Dispose (); + } + + protected override void CreatePassiveTexture (Clutter.CairoTexture texture, int with_state) + { + Render (texture, with_state, true); + } + + protected override void CreateActiveTexture (Clutter.CairoTexture texture, int with_state) + { + Render (texture, with_state, false); + } + #endregion + } } diff -Nru banshee-community-extensions-2.0.1/src/ClutterFlow/ClutterFlow/ActorLoader.cs banshee-community-extensions-2.2.0/src/ClutterFlow/ClutterFlow/ActorLoader.cs --- banshee-community-extensions-2.0.1/src/ClutterFlow/ClutterFlow/ActorLoader.cs 2010-12-16 19:02:01.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/ClutterFlow/ClutterFlow/ActorLoader.cs 1970-01-01 00:00:00.000000000 +0000 @@ -1,96 +0,0 @@ -// -// ActorLoader.cs -// -// Author: -// Mathijs Dumon -// -// Copyright (c) 2010 Mathijs Dumon -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - - -using System; -using System.Collections.Generic; -using Clutter; - -namespace ClutterFlow -{ - - public interface IActorLoader : IDisposable { - CoverManager CoverManager { get; } - List GetActors (System.Action method_call); - } - - public abstract class ActorLoader : IActorLoader { - #region Fields - protected Dictionary cached_covers = new Dictionary (); - public virtual Dictionary Cache { - get { return cached_covers; } - } - - private CoverManager coverManager; - public virtual CoverManager CoverManager { - get { return coverManager; } - } - #endregion - - public ActorLoader (CoverManager coverManager) - { - this.coverManager = coverManager; - CoverManager.ActorActivated += HandleActorActivated; - CoverManager.ActorLoader = this; - } - protected bool disposed = false; - public virtual void Dispose () - { - if (disposed) - return; - disposed = true; - - CoverManager.ActorActivated -= HandleActorActivated; - - foreach (ClutterFlowBaseActor actor in cached_covers.Values) - actor.Dispose (); - cached_covers.Clear (); - } - - protected virtual void RefreshCoverManager () - { - CoverManager.ReloadCovers (); - } - - public virtual List GetActors (System.Action method_call) - { - throw new System.NotImplementedException(); - } - - protected virtual ClutterFlowBaseActor AddActorToList(TGen generator, SortedList list) { - throw new System.NotImplementedException(); - } - - public virtual void ScrollTo (TKey key) - { - ClutterFlowBaseActor actor = Cache.ContainsKey (key) ? Cache[key] : null; - if (actor!=null && coverManager.covers.Contains (actor)) - coverManager.TargetIndex = actor.Index; //coverManager.covers.IndexOf (actor); //replace covers with something faster? - } - - public abstract void HandleActorActivated (ClutterFlowBaseActor actor, EventArgs args); - } -} diff -Nru banshee-community-extensions-2.0.1/src/ClutterFlow/ClutterFlow/AlphabetBar.cs banshee-community-extensions-2.2.0/src/ClutterFlow/ClutterFlow/AlphabetBar.cs --- banshee-community-extensions-2.0.1/src/ClutterFlow/ClutterFlow/AlphabetBar.cs 2010-12-16 19:41:31.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/ClutterFlow/ClutterFlow/AlphabetBar.cs 2011-05-28 20:47:11.000000000 +0000 @@ -7,139 +7,139 @@ namespace ClutterFlow.Alphabet { - public class AlphabetEventArgs : EventArgs - { - protected AlphabetChars letter = AlphabetChars.unknown; - public AlphabetChars Letter { - get { return letter; } - } - - public AlphabetEventArgs (AlphabetChars letter) : base () - { - this.letter = letter; - } - } - - - public class AlphabetBar : Clutter.Group - { - - #region Events - public event EventHandler LetterClicked; - protected void InvokeLetterClicked (AlphabetChars letter) - { - if (LetterClicked!=null) LetterClicked (this, new AlphabetEventArgs (letter)); - } - #endregion - - #region Fields - protected CairoTexture background; - - protected Dictionary buttons = new Dictionary(Enum.GetValues(typeof(AlphabetChars)).Length); - public AlphabetButton this [AlphabetChars index] { - get { return buttons[index]; } - } - - protected double Margin { - get { return Width * 0.075; } - } - - #endregion Fields - - #region Initialisation - public AlphabetBar (uint width, uint height) - { - this.SetSize (width, height); - - InitBackground (); - InitButtons (); - - ShowAll (); - } - - protected virtual void InitBackground () - { - background = new CairoTexture ((uint) Width,(uint) Height); - Add (background); - - SetupBackground (); - background.Show (); - } - - protected virtual void SetupBackground () - { - background.Clear(); - Cairo.Context context = background.Create(); - - double lwidth = 1; - double hlwidth = lwidth*0.5; - - double margin = Margin; - - //left curvature: - context.MoveTo (-hlwidth, -hlwidth); - context.CurveTo (margin*0.33, -hlwidth, - margin*0.5, Height*0.4, - margin*0.5, Height*0.5); - context.CurveTo (margin*0.5, Height*0.6, - margin*0.66, Height-hlwidth, - margin-hlwidth, Height-hlwidth); - - - //straight bottom: - context.LineTo (Width-margin-hlwidth, Height-hlwidth); - - //right curvature: - context.CurveTo (Width-margin*0.66, Height - hlwidth, - Width-margin*0.5, Height*0.6, - Width-margin*0.5, Height*0.5); - context.CurveTo (Width-margin*0.5, Height*0.4, - Width-margin*0.33, -hlwidth, - Width-hlwidth, -hlwidth); - - //straight top: - context.LineTo (-hlwidth, -hlwidth); - context.ClosePath (); - - context.LineWidth = lwidth; - context.SetSourceRGBA (1.0, 1.0, 1.0, 1.0); - context.StrokePreserve (); - context.SetSourceRGBA (1.0, 1.0, 1.0, 0.10); - context.Fill (); - - ((IDisposable) context.Target).Dispose(); - ((IDisposable) context).Dispose(); - } - - protected virtual void InitButtons () - { - Array values = Enum.GetValues(typeof(AlphabetChars)); - - int x_step = (int) ((Width * 0.950) / values.Length); - uint b_width = (uint) x_step; - uint b_height = (uint) (Height - 2); - - int x = (int) (Margin*0.5f + x_step); - int y = (int) (Height * 0.5)+2; - - foreach (AlphabetChars key in values) { - buttons[key] = new AlphabetButton (b_width, b_height, key); - buttons[key].ButtonReleaseEvent += HandleButtonReleaseEvent; - Add (buttons[key]); - buttons[key].SetAnchorPoint ((float) buttons[key].Width*0.5f, (float) buttons[key].Height*0.5f); - buttons[key].SetPosition (x, y); - x += x_step; - } - } - #endregion - - #region Event Handling - protected void HandleButtonReleaseEvent (object o, ButtonReleaseEventArgs args) - { - if (o is AlphabetButton) { - InvokeLetterClicked ((o as AlphabetButton).Letter); - } - } - #endregion - } + public class AlphabetEventArgs : EventArgs + { + protected AlphabetChars letter = AlphabetChars.unknown; + public AlphabetChars Letter { + get { return letter; } + } + + public AlphabetEventArgs (AlphabetChars letter) : base () + { + this.letter = letter; + } + } + + + public class AlphabetBar : Clutter.Group + { + + #region Events + public event EventHandler LetterClicked; + protected void InvokeLetterClicked (AlphabetChars letter) + { + if (LetterClicked!=null) LetterClicked (this, new AlphabetEventArgs (letter)); + } + #endregion + + #region Fields + protected CairoTexture background; + + protected Dictionary buttons = new Dictionary(Enum.GetValues(typeof(AlphabetChars)).Length); + public AlphabetButton this [AlphabetChars index] { + get { return buttons[index]; } + } + + protected double Margin { + get { return Width * 0.075; } + } + + #endregion Fields + + #region Initialisation + public AlphabetBar (uint width, uint height) + { + this.SetSize (width, height); + + InitBackground (); + InitButtons (); + + ShowAll (); + } + + protected virtual void InitBackground () + { + background = new CairoTexture ((uint) Width,(uint) Height); + Add (background); + + SetupBackground (); + background.Show (); + } + + protected virtual void SetupBackground () + { + background.Clear(); + Cairo.Context context = background.Create (); + + double lwidth = 1; + double hlwidth = lwidth*0.5; + + double margin = Margin; + + //left curvature: + context.MoveTo (-hlwidth, -hlwidth); + context.CurveTo (margin*0.33, -hlwidth, + margin*0.5, Height*0.4, + margin*0.5, Height*0.5); + context.CurveTo (margin*0.5, Height*0.6, + margin*0.66, Height-hlwidth, + margin-hlwidth, Height-hlwidth); + + + //straight bottom: + context.LineTo (Width-margin-hlwidth, Height-hlwidth); + + //right curvature: + context.CurveTo (Width-margin*0.66, Height - hlwidth, + Width-margin*0.5, Height*0.6, + Width-margin*0.5, Height*0.5); + context.CurveTo (Width-margin*0.5, Height*0.4, + Width-margin*0.33, -hlwidth, + Width-hlwidth, -hlwidth); + + //straight top: + context.LineTo (-hlwidth, -hlwidth); + context.ClosePath (); + + context.LineWidth = lwidth; + context.SetSourceRGBA (1.0, 1.0, 1.0, 1.0); + context.StrokePreserve (); + context.SetSourceRGBA (1.0, 1.0, 1.0, 0.10); + context.Fill (); + + ((IDisposable) context.Target).Dispose(); + ((IDisposable) context).Dispose(); + } + + protected virtual void InitButtons () + { + Array values = Enum.GetValues(typeof(AlphabetChars)); + + int x_step = (int) ((Width * 0.950) / values.Length); + uint b_width = (uint) x_step; + uint b_height = (uint) (Height - 2); + + int x = (int) (Margin*0.5f + x_step); + int y = (int) (Height * 0.5)+2; + + foreach (AlphabetChars key in values) { + buttons[key] = new AlphabetButton (b_width, b_height, key); + buttons[key].ButtonReleaseEvent += HandleButtonReleaseEvent; + Add (buttons[key]); + buttons[key].SetAnchorPoint ((float) buttons[key].Width*0.5f, (float) buttons[key].Height*0.5f); + buttons[key].SetPosition (x, y); + x += x_step; + } + } + #endregion + + #region Event Handling + protected void HandleButtonReleaseEvent (object o, ButtonReleaseEventArgs args) + { + if (o is AlphabetButton) { + InvokeLetterClicked ((o as AlphabetButton).Letter); + } + } + #endregion + } } diff -Nru banshee-community-extensions-2.0.1/src/ClutterFlow/ClutterFlow/AlphabetButton.cs banshee-community-extensions-2.2.0/src/ClutterFlow/ClutterFlow/AlphabetButton.cs --- banshee-community-extensions-2.0.1/src/ClutterFlow/ClutterFlow/AlphabetButton.cs 2010-12-16 19:42:24.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/ClutterFlow/ClutterFlow/AlphabetButton.cs 2011-05-28 20:47:11.000000000 +0000 @@ -10,117 +10,117 @@ { - public enum AlphabetChars { - unknown=0x003F, A=0x0041, B=0x0042, - C=0x0043, D=0x0044, E=0x0045, - F=0x0046, G=0x0047, H=0x0048, - I=0x0049, J=0x004A, K=0x004B, - L=0x004C, M=0x004D, N=0x004E, - O=0x004F, P=0x0050, Q=0x0051, - R=0x0052, S=0x0053, T=0x0054, - U=0x0055, V=0x0056, W=0x0057, - X=0x0058, Y=0x0059, Z=0x005A - } - - public class AlphabetButton : Buttons.ClutterButtonState - { - - #region Fields - protected override int MaxState { - get { return 7; } - } - - protected Text label; - - protected AlphabetChars letter = AlphabetChars.unknown; - public virtual AlphabetChars Letter { - get { return letter; } - set { - if (letter!=value) { - letter = value; - label.Value = ((char) letter).ToString (); - Update (); - } - } - } - - public virtual bool Disabled { - get { return (State & 4) == 4; } - set { - if (value) { - State |= 4; - Reactive = false; - BubbleEvents = false; - } else { - State &= ~4; - Reactive = true; - BubbleEvents = true; - } - Update (); - } - } - #endregion - - #region Initialization - public AlphabetButton (uint width, uint height, AlphabetChars letter) - { - this.SetSize (width, height); - this.letter = letter; - - Initialise (); - } - - protected override void Initialise () - { - base.Initialise (); - this.Reactive = !Disabled; - this.BubbleEvents = !Disabled; - - label = new Text(GetFontName (), ((char) letter).ToString (), GetFontColor ()); - Add (label); - Update (); - } - - #endregion - - #region Update - public override void Update () - { - this.Reactive = !Disabled; - this.BubbleEvents = !Disabled; - - label.FontName = GetFontName (); - label.SetAnchorPoint (label.Width*0.5f, label.Height*0.5f+2); - label.SetPosition (this.Width*0.5f,this.Height*0.5f); - label.SetColor (GetFontColor ()); - label.ShowAll(); - } - - Clutter.Color[] colors; - - protected string GetFontName () - { - return "Sans " + ((state & 5)==1 ? "Bold" : "Normal") + " " + ((int) ((float)Height*0.75f)).ToString (); - } - - protected Clutter.Color GetFontColor () - { - if (colors==null) { - colors = new Clutter.Color[4]; - colors[0] = new Clutter.Color (1.0f, 1.0f, 1.0f, 0.6f); - colors[1] = new Clutter.Color (1.0f, 1.0f, 1.0f, 0.75f); - colors[2] = new Clutter.Color (1.0f, 1.0f, 1.0f, 0.9f); - colors[3] = new Clutter.Color (0.0f, 0.0f, 0.0f, 0.75f); - } - if (state>=4) - return colors[3]; - else if (state >= 2) - return colors[2]; - else if (state == 1) - return colors[1]; - else - return colors[0]; - } - #endregion - } + public enum AlphabetChars { + unknown=0x003F, A=0x0041, B=0x0042, + C=0x0043, D=0x0044, E=0x0045, + F=0x0046, G=0x0047, H=0x0048, + I=0x0049, J=0x004A, K=0x004B, + L=0x004C, M=0x004D, N=0x004E, + O=0x004F, P=0x0050, Q=0x0051, + R=0x0052, S=0x0053, T=0x0054, + U=0x0055, V=0x0056, W=0x0057, + X=0x0058, Y=0x0059, Z=0x005A + } + + public class AlphabetButton : Buttons.ClutterButtonState + { + + #region Fields + protected override int MaxState { + get { return 7; } + } + + protected Text label; + + protected AlphabetChars letter = AlphabetChars.unknown; + public virtual AlphabetChars Letter { + get { return letter; } + set { + if (letter!=value) { + letter = value; + label.Value = ((char) letter).ToString (); + Update (); + } + } + } + + public virtual bool Disabled { + get { return (State & 4) == 4; } + set { + if (value) { + State |= 4; + Reactive = false; + BubbleEvents = false; + } else { + State &= ~4; + Reactive = true; + BubbleEvents = true; + } + Update (); + } + } + #endregion + + #region Initialization + public AlphabetButton (uint width, uint height, AlphabetChars letter) + { + this.SetSize (width, height); + this.letter = letter; + + Initialise (); + } + + protected override void Initialise () + { + base.Initialise (); + this.Reactive = !Disabled; + this.BubbleEvents = !Disabled; + + label = new Text(GetFontName (), ((char) letter).ToString (), GetFontColor ()); + Add (label); + Update (); + } + + #endregion + + #region Update + public override void Update () + { + this.Reactive = !Disabled; + this.BubbleEvents = !Disabled; + + label.FontName = GetFontName (); + label.SetAnchorPoint (label.Width*0.5f, label.Height*0.5f+2); + label.SetPosition (this.Width*0.5f,this.Height*0.5f); + label.SetColor (GetFontColor ()); + label.ShowAll(); + } + + Clutter.Color[] colors; + + protected string GetFontName () + { + return "Sans " + ((state & 5)==1 ? "Bold" : "Normal") + " " + ((int) ((float)Height*0.75f)).ToString (); + } + + protected Clutter.Color GetFontColor () + { + if (colors==null) { + colors = new Clutter.Color[4]; + colors[0] = new Clutter.Color (1.0f, 1.0f, 1.0f, 0.6f); + colors[1] = new Clutter.Color (1.0f, 1.0f, 1.0f, 0.75f); + colors[2] = new Clutter.Color (1.0f, 1.0f, 1.0f, 0.9f); + colors[3] = new Clutter.Color (0.0f, 0.0f, 0.0f, 0.75f); + } + if (state>=4) + return colors[3]; + else if (state >= 2) + return colors[2]; + else if (state == 1) + return colors[1]; + else + return colors[0]; + } + #endregion + } } diff -Nru banshee-community-extensions-2.0.1/src/ClutterFlow/ClutterFlow/Caption.cs banshee-community-extensions-2.2.0/src/ClutterFlow/ClutterFlow/Caption.cs --- banshee-community-extensions-2.0.1/src/ClutterFlow/ClutterFlow/Caption.cs 2010-12-16 19:11:27.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/ClutterFlow/ClutterFlow/Caption.cs 2011-05-28 20:47:11.000000000 +0000 @@ -31,69 +31,69 @@ namespace ClutterFlow.Captions { - - - public abstract class Caption : Clutter.Text - { - - #region Fields - public abstract string DefaultValue { get; set; } - private CoverManager coverManager; - public CoverManager CoverManager { + + public abstract class Caption : Clutter.Text + { + + #region Fields + public abstract string DefaultValue { get; set; } + + private CoverManager coverManager; + public CoverManager CoverManager { get { return coverManager; } } - - protected Animation aFade = null; - #endregion - - public Caption (CoverManager coverManager, string font_name, Color color) : base (clutter_text_new ()) - { - this.coverManager = coverManager; - Editable = false; - Selectable = false; - Activatable = false; - CursorVisible = false; - LineAlignment = Pango.Alignment.Center; - FontName = font_name; - SetColor (color); - Value = DefaultValue; - - UpdatePosition (); - } - - #region Methods - [DllImport("libclutter-glx-1.0.so.0")] - static extern IntPtr clutter_text_new (); - - public virtual void FadeOut () - { - EventHandler hFadeOut = delegate (object sender, EventArgs e) { - aFade = this.Animatev ((ulong) AnimationMode.Linear.value__, (uint) (CoverManager.MaxAnimationSpan*0.5f), new string[] { "opacity" }, new GLib.Value ((byte) 0)); - }; - if (aFade!=null && aFade.Timeline!=null && aFade.Timeline.IsPlaying) - aFade.Completed += hFadeOut; - else - hFadeOut (this, EventArgs.Empty); - } - - public virtual void FadeIn () - { - EventHandler hFadeIn = delegate (object sender, EventArgs e) { - aFade = this.Animatev ((ulong) AnimationMode.Linear.value__, (uint) (CoverManager.MaxAnimationSpan*0.5f), new string[] { "opacity" }, new GLib.Value ((byte) 255)); - }; - if (aFade!=null && aFade.Timeline!=null && aFade.Timeline.IsPlaying) - aFade.Completed += hFadeIn; - else - hFadeIn (this, EventArgs.Empty); - } - - public virtual void Update () - { - UpdatePosition (); - } - - public abstract void UpdatePosition (); - #endregion - } + + protected Animation aFade = null; + #endregion + + public Caption (CoverManager coverManager, string font_name, Color color) : base (clutter_text_new ()) + { + this.coverManager = coverManager; + Editable = false; + Selectable = false; + Activatable = false; + CursorVisible = false; + LineAlignment = Pango.Alignment.Center; + FontName = font_name; + SetColor (color); + Value = DefaultValue; + + UpdatePosition (); + } + + #region Methods + [DllImport("libclutter-glx-1.0.so.0")] + static extern IntPtr clutter_text_new (); + + public virtual void FadeOut () + { + EventHandler hFadeOut = delegate (object sender, EventArgs e) { + aFade = this.Animatev ((ulong) AnimationMode.Linear.value__, (uint) (CoverManager.MaxAnimationSpan*0.5f), new string[] { "opacity" }, new GLib.Value ((byte) 0)); + }; + if (aFade!=null && aFade.Timeline!=null && aFade.Timeline.IsPlaying) + aFade.Completed += hFadeOut; + else + hFadeOut (this, EventArgs.Empty); + } + + public virtual void FadeIn () + { + EventHandler hFadeIn = delegate (object sender, EventArgs e) { + aFade = this.Animatev ((ulong) AnimationMode.Linear.value__, (uint) (CoverManager.MaxAnimationSpan*0.5f), new string[] { "opacity" }, new GLib.Value ((byte) 255)); + }; + if (aFade!=null && aFade.Timeline!=null && aFade.Timeline.IsPlaying) + aFade.Completed += hFadeIn; + else + hFadeIn (this, EventArgs.Empty); + } + + public virtual void Update () + { + UpdatePosition (); + } + + public abstract void UpdatePosition (); + #endregion + } } diff -Nru banshee-community-extensions-2.0.1/src/ClutterFlow/ClutterFlow/ClutterArrowButton.cs banshee-community-extensions-2.2.0/src/ClutterFlow/ClutterFlow/ClutterArrowButton.cs --- banshee-community-extensions-2.0.1/src/ClutterFlow/ClutterFlow/ClutterArrowButton.cs 2010-08-13 20:05:55.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/ClutterFlow/ClutterFlow/ClutterArrowButton.cs 2011-05-28 20:47:11.000000000 +0000 @@ -31,63 +31,63 @@ namespace ClutterFlow.Buttons { - - public class ClutterArrowButton : ClutterButton - { - private byte sense = 0; - public byte Sense { - get { return sense; } - set { - if (value!=sense) { - sense = value; - CreateTextures(); - Update(); - } - } - } - - public ClutterArrowButton(uint width, uint height, int state, byte sense) : base(width, height, state) - { - Sense = sense; - } - - protected override void CreateTexture (Clutter.CairoTexture texture, int with_state) - { - texture.Clear(); - Cairo.Context context = texture.Create(); - - double lwidth = 1; - double hlwidth = lwidth*0.5; - double rotation = Math.PI*(3 - (double) sense) * 0.5; - PointD center = new PointD(texture.Width*0.5, texture.Height*0.5); - - //Set the correct orientation: - context.Translate(center.X, center.Y); - context.Rotate(rotation); - context.Translate(-center.X, -center.Y); - - //Draw border: - context.MoveTo (texture.Width*0.5, hlwidth); - context.ArcNegative (texture.Width,center.Y,(texture.Height-lwidth)/2,1.5*Math.PI,0.5*Math.PI); - context.LineTo (texture.Width*0.5, texture.Height-hlwidth); - context.Arc (texture.Width*0.5,center.Y,(texture.Height-lwidth)/2,0.5*Math.PI,1.5*Math.PI); - context.ClosePath (); - context.LineWidth = lwidth; - context.SetSourceRGBA(1.0,1.0,1.0, with_state==0 ? 0.4 : (with_state==1 ? 0.6 : 0.8)); - context.FillPreserve(); - context.SetSourceRGB(1.0,1.0,1.0); - context.Stroke(); - - //Draw arrow: - context.MoveTo (center.X, center.Y-texture.Height*0.25); - context.LineTo (center.X-texture.Height*0.25, center.Y); - context.LineTo (center.X, center.Y+texture.Height*0.25); - context.LineWidth = lwidth*1.5; - context.SetSourceRGB(0.0,0.0,0.0); - context.Stroke(); - - ((IDisposable) context.Target).Dispose(); - ((IDisposable) context).Dispose(); - } - } + + public class ClutterArrowButton : ClutterButton + { + private byte sense = 0; + public byte Sense { + get { return sense; } + set { + if (value!=sense) { + sense = value; + CreateTextures(); + Update(); + } + } + } + + public ClutterArrowButton(uint width, uint height, int state, byte sense) : base(width, height, state) + { + Sense = sense; + } + + protected override void CreateTexture (Clutter.CairoTexture texture, int with_state) + { + texture.Clear (); + Cairo.Context context = texture.Create (); + + double lwidth = 1; + double hlwidth = lwidth*0.5; + double rotation = Math.PI*(3 - (double) sense) * 0.5; + PointD center = new PointD(texture.Width*0.5, texture.Height*0.5); + + //Set the correct orientation: + context.Translate(center.X, center.Y); + context.Rotate(rotation); + context.Translate(-center.X, -center.Y); + + //Draw border: + context.MoveTo (texture.Width*0.5, hlwidth); + context.ArcNegative (texture.Width,center.Y,(texture.Height-lwidth)/2,1.5*Math.PI,0.5*Math.PI); + context.LineTo (texture.Width*0.5, texture.Height-hlwidth); + context.Arc (texture.Width*0.5,center.Y,(texture.Height-lwidth)/2,0.5*Math.PI,1.5*Math.PI); + context.ClosePath (); + context.LineWidth = lwidth; + context.SetSourceRGBA(1.0,1.0,1.0, with_state==0 ? 0.4 : (with_state==1 ? 0.6 : 0.8)); + context.FillPreserve(); + context.SetSourceRGB(1.0,1.0,1.0); + context.Stroke(); + + //Draw arrow: + context.MoveTo (center.X, center.Y-texture.Height*0.25); + context.LineTo (center.X-texture.Height*0.25, center.Y); + context.LineTo (center.X, center.Y+texture.Height*0.25); + context.LineWidth = lwidth*1.5; + context.SetSourceRGB(0.0,0.0,0.0); + context.Stroke(); + + ((IDisposable) context.Target).Dispose(); + ((IDisposable) context).Dispose(); + } + } } diff -Nru banshee-community-extensions-2.0.1/src/ClutterFlow/ClutterFlow/ClutterButton.cs banshee-community-extensions-2.2.0/src/ClutterFlow/ClutterFlow/ClutterButton.cs --- banshee-community-extensions-2.0.1/src/ClutterFlow/ClutterFlow/ClutterButton.cs 2010-08-13 20:05:55.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/ClutterFlow/ClutterFlow/ClutterButton.cs 2011-06-09 21:11:19.000000000 +0000 @@ -31,138 +31,142 @@ namespace ClutterFlow.Buttons { - public abstract class ClutterButtonState : Group { - - #region Fields - protected bool bubble = false; - public virtual bool BubbleEvents { - get { return bubble; } - set { bubble = value; } - } - - protected int state = 0; - protected abstract int MaxState { get; } - //// - /// State represents the toggle buttons state, the bits represent: - /// 1: mouse_over - /// 2: mouse_down - /// Overriding classes might have more bits,, check MaxBits - /// - public virtual int State { - get { return state; } - set { - value &= MaxState; //block any other bits - if (value!=state) { - state = value; - Update(); - } - } - } - #endregion - - #region Methods - protected virtual void Initialise () { - IsReactive = true; - ButtonPressEvent += HandleButtonPressEvent; - ButtonReleaseEvent += HandleButtonReleaseEvent; - EnterEvent += HandleEnterEvent; - LeaveEvent += HandleLeaveEvent; - } - - public abstract void Update(); - #endregion - - #region Event Handling - protected virtual void HandleEnterEvent(object o, EnterEventArgs args) - { - State |= 1; - args.RetVal = !BubbleEvents; - } - - protected virtual void HandleButtonPressEvent(object o, ButtonPressEventArgs args) - { - State |= 2; - args.RetVal = !BubbleEvents; - } - - protected virtual void HandleButtonReleaseEvent(object o, ButtonReleaseEventArgs args) - { - State &= ~2; - args.RetVal = !BubbleEvents; - } - - protected virtual void HandleLeaveEvent(object o, LeaveEventArgs args) - { - State &= ~1; - args.RetVal = !BubbleEvents; - } - #endregion - } - - public class ClutterButton : ClutterButtonState - { - - #region Fields - protected override int MaxState { - get { return 3; } - } - - protected CairoTexture[] textures; - protected virtual int GetTextureIndex(int with_state) { - return ((with_state == 3) ? 2 : with_state); - } - public virtual CairoTexture StateTexture { - get { return textures[GetTextureIndex(State)]; } - } - #endregion - - #region Initialization - protected ClutterButton (uint width, uint height, int state, bool init) : base () - { - this.State = state; - this.SetSize (width, height); - - if (init) Initialise (); - } - - public ClutterButton (uint width, uint height, int state) : this (width, height, state, true) - { - } - - protected override void Initialise () { - CreateTextures (); - base.Initialise (); - } - - protected virtual void CreateTextures() { - if (textures==null||textures.Length==0) InitTextures(); - for (int i=0; i < textures.Length; i++) { - if (textures[i]!=null) { + public abstract class ClutterButtonState : Group { + + #region Fields + protected bool bubble = false; + public virtual bool BubbleEvents { + get { return bubble; } + set { bubble = value; } + } + + protected int state = 0; + protected abstract int MaxState { get; } + //// + /// State represents the toggle buttons state, the bits represent: + /// 1: mouse_over + /// 2: mouse_down + /// Overriding classes might have more bits,, check MaxBits + /// + public virtual int State { + get { return state; } + set { + value &= MaxState; //block any other bits + if (value!=state) { + state = value; + Update(); + } + } + } + #endregion + + #region Methods + protected virtual void Initialise () { + IsReactive = true; + ButtonPressEvent += HandleButtonPressEvent; + ButtonReleaseEvent += HandleButtonReleaseEvent; + EnterEvent += HandleEnterEvent; + LeaveEvent += HandleLeaveEvent; + } + + public abstract void Update(); + #endregion + + #region Event Handling + protected virtual void HandleEnterEvent(object o, EnterEventArgs args) + { + State |= 1; + args.RetVal = !BubbleEvents; + } + + protected virtual void HandleButtonPressEvent(object o, ButtonPressEventArgs args) + { + State |= 2; + args.RetVal = !BubbleEvents; + } + + protected virtual void HandleButtonReleaseEvent(object o, ButtonReleaseEventArgs args) + { + State &= ~2; + args.RetVal = !BubbleEvents; + } + + protected virtual void HandleLeaveEvent(object o, LeaveEventArgs args) + { + State &= ~1; + args.RetVal = !BubbleEvents; + } + #endregion + } + + public class ClutterButton : ClutterButtonState + { + + #region Fields + protected override int MaxState { + get { return 3; } + } + + protected CairoTexture[] textures; + protected virtual int GetTextureIndex(int with_state) { + return ((with_state == 3) ? 2 : with_state); + } + public virtual CairoTexture StateTexture { + get { return textures[GetTextureIndex(State)]; } + } + #endregion + + #region Initialization + protected ClutterButton (uint width, uint height, int state, bool init) : base () + { + this.State = state; + this.SetSize (width, height); + + if (init) Initialise (); + } + + public ClutterButton (uint width, uint height, int state) : this (width, height, state, true) + { + } + + protected override void Initialise () { + CreateTextures (); + base.Initialise (); + } + + protected virtual void CreateTextures () { + if (textures == null || textures.Length == 0) { + InitTextures (); + } + for (int i=0; i < textures.Length; i++) { + if (textures[i] != null) { GC.SuppressFinalize (textures[i]); - if (textures[i].Parent!=null) ((Container) textures[i].Parent).Remove(textures[i]); - } - textures[i] = new Clutter.CairoTexture((uint) Width,(uint) Height); - Add(textures[i]); - CreateTexture(textures[i], (byte) i); - } - } - - protected virtual void InitTextures() { - textures = new CairoTexture[3]; - } - #endregion - - #region Rendering - protected virtual void CreateTexture(CairoTexture texture, int with_state) { - throw new System.NotImplementedException (); - } - #endregion - - public override void Update() { - HideAll(); - StateTexture.Show(); - Show(); - } - - } + if (textures[i].Parent != null) { + ((Container) textures[i].Parent).Remove(textures[i]); + } + } + textures[i] = new Clutter.CairoTexture((uint) Width,(uint) Height); + Add (textures[i]); + CreateTexture (textures[i], (byte) i); + } + } + + protected virtual void InitTextures () { + textures = new CairoTexture[3]; + } + #endregion + + #region Rendering + protected virtual void CreateTexture (CairoTexture texture, int with_state) { + throw new System.NotImplementedException (); + } + #endregion + + public override void Update() { + HideAll (); + StateTexture.Show (); + Show (); + } + + } } diff -Nru banshee-community-extensions-2.0.1/src/ClutterFlow/ClutterFlow/ClutterFlowActor.cs banshee-community-extensions-2.2.0/src/ClutterFlow/ClutterFlow/ClutterFlowActor.cs --- banshee-community-extensions-2.0.1/src/ClutterFlow/ClutterFlow/ClutterFlowActor.cs 2011-04-04 19:55:19.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/ClutterFlow/ClutterFlow/ClutterFlowActor.cs 2011-06-09 21:11:19.000000000 +0000 @@ -25,294 +25,20 @@ // THE SOFTWARE. using System; -using System.Collections; -using System.Collections.Generic; -using Gdk; using Clutter; -using Cogl; using GLib; namespace ClutterFlow { - - public interface IIndexable : IComparable - { - int Index { get; } - event IndexChangedEventHandler IndexChanged; - } - - public delegate Cairo.ImageSurface NeedSurface(); - public delegate void IndexChangedEventHandler(IIndexable item, int old_index, int new_index); - - public class TextureHolder : IDisposable { - #region Fields - private CoverManager coverManager; - public CoverManager CoverManager { - get { return coverManager; } - } - - protected Cairo.ImageSurface default_surface; - public Cairo.ImageSurface DefaultSurface { - get { - if (default_surface==null && GetDefaultSurface!=null) default_surface = ClutterFlowActor.MakeReflection(GetDefaultSurface()); - return default_surface; - } - } - - protected IntPtr defltTexture; - public IntPtr DefaultTexture { - get { - if (defltTexture==IntPtr.Zero) SetupDefaultTexture (); - return defltTexture; - } - } - - protected IntPtr shadeTexture; - public IntPtr ShadeTexture { - get { - if (shadeTexture==IntPtr.Zero) SetupShadeTexture (); - return shadeTexture; - } - } - - public NeedSurface GetDefaultSurface; - #endregion - - #region Initialisation - public TextureHolder (CoverManager coverManager, NeedSurface getDefaultSurface) - { - this.coverManager = coverManager; - CoverManager.TextureSizeChanged += HandleTextureSizeChanged; - this.GetDefaultSurface = getDefaultSurface; - ReloadDefaultTextures (); - } - - protected bool disposed = false; - public virtual void Dispose () - { - if (disposed) - return; - disposed = true; - - CoverManager.TextureSizeChanged -= HandleTextureSizeChanged; - - if (default_surface != null) { - ((IDisposable) default_surface).Dispose (); - } - Cogl.Handle.Unref (defltTexture); - Cogl.Handle.Unref (shadeTexture); - defltTexture = IntPtr.Zero; - shadeTexture = IntPtr.Zero; - } - - - public void ReloadDefaultTextures () - { - if (default_surface != null) - ((IDisposable) default_surface).Dispose (); - default_surface = null; //reset this so it gets reloaded - - SetupDefaultTexture (); - SetupShadeTexture (); - } - - public void SetupDefaultTexture () - { - if (defltTexture==IntPtr.Zero) { - if (DefaultSurface!=null) { - Cogl.PixelFormat fm; - if (DefaultSurface.Format == Cairo.Format.ARGB32) - fm = PixelFormat.Argb8888Pre; - else //if (DefaultSurface.Format == Cairo.Format.RGB24) - fm = PixelFormat.Rgb888; - - unsafe { - - defltTexture = ClutterHelper.cogl_texture_new_from_data((uint) DefaultSurface.Width, (uint) DefaultSurface.Height, Cogl.TextureFlags.None, - fm, Cogl.PixelFormat.Any, (uint) DefaultSurface.Stride, DefaultSurface.DataPtr); - } - } else { - defltTexture = Cogl.Texture.NewWithSize ((uint) coverManager.TextureSize, (uint) coverManager.TextureSize, - Cogl.TextureFlags.None, Cogl.PixelFormat.Any); - } - } - } - - public void SetupShadeTexture () - { - if (shadeTexture==IntPtr.Zero) { - - Gdk.Pixbuf finalPb = new Gdk.Pixbuf(Colorspace.Rgb, true, 8, coverManager.TextureSize, coverManager.TextureSize*2); - - unsafe { - int dst_rowstride = finalPb.Rowstride; - int dst_width = finalPb.Width; - int shd_width = (int) ((float) dst_width * 0.25f); - int dst_height = finalPb.Height; - byte * dst_byte = (byte *) finalPb.Pixels; - byte * dst_base = dst_byte; - - for (int j = 0; j < dst_height; j++) { - dst_byte = ((byte *) dst_base) + j * dst_rowstride; - for (int i = 0; i < dst_width; i++) { - *dst_byte++ = 0x00; - *dst_byte++ = 0x00; - *dst_byte++ = 0x00; - if (i > shd_width) - *dst_byte++ = (byte) (255 * (float) (i - shd_width) / (float) (dst_width - shd_width)); - else - *dst_byte++ = 0x00; - } - } - } - - unsafe { - shadeTexture = ClutterHelper.cogl_texture_new_from_data((uint) finalPb.Width, (uint) finalPb.Height, Cogl.TextureFlags.None, - PixelFormat.Rgba8888, Cogl.PixelFormat.Any, (uint) finalPb.Rowstride, finalPb.Pixels); - } - } - } - #endregion - - protected void HandleTextureSizeChanged(object sender, EventArgs e) - { - ReloadDefaultTextures (); - } - } - - public abstract class ClutterFlowBaseActor : Clutter.Group, IIndexable - { - #region Fields - private CoverManager coverManager; - public virtual CoverManager CoverManager { - get { return coverManager; } - } - - protected string cache_key = ""; - public virtual string CacheKey { - get { return cache_key; } - set { cache_key = value; } - } - - protected string label = ""; - public virtual string Label { - get { return label; } - set { label = value; } - } - - protected string sort_label = ""; - public virtual string SortLabel { - get { return sort_label; } - set { sort_label = value; } - } - - public virtual event IndexChangedEventHandler IndexChanged; - - protected int index = -1; //-1 = not visible - public virtual int Index { - get { return index; } - set { - if (value!=index) { - int old_index = index; - index = value; - IsReactive = !(index < 0); - if (IndexChanged!=null) IndexChanged (this, old_index, index); - } - } - } - - public virtual int CompareTo (IIndexable obj) { - if (obj.Index==-1 && this.Index!=-1) - return 1; - return obj.Index - this.Index; - } - #endregion - - public ClutterFlowBaseActor (CoverManager cover_manager) : base () - { - coverManager = cover_manager; - coverManager.Add (this); - } - - protected bool disposed = false; - public override void Dispose () - { - if (disposed) - return; - disposed = true; - - coverManager.Remove (this); - - base.Dispose (); - } - - #region Texture Handling - public static void MakeReflection (Cairo.ImageSurface source, CairoTexture dest) { - int w = source.Width + 4; - int h = source.Height * 2 + 4; - - dest.SetSurfaceSize ((uint) w, (uint) h); - - - - Cairo.Context context = dest.Create(); - - MakeReflection (context, source, w, h); - - //((IDisposable) context.Target).Dispose(); - ((IDisposable) context).Dispose(); - } - - - public static Cairo.ImageSurface MakeReflection (Cairo.ImageSurface source) { - int w = source.Width + 4; - int h = source.Height * 2 + 4; - - Cairo.ImageSurface dest = new Cairo.ImageSurface(Cairo.Format.ARGB32, w, h); - Cairo.Context context = new Cairo.Context(dest); - - MakeReflection (context, source, w, h); - - //((IDisposable) context.Target).Dispose(); - ((IDisposable) context).Dispose(); - - return dest; - } - - private static void MakeReflection (Cairo.Context context, Cairo.ImageSurface source, int w, int h) { - - context.ResetClip (); - context.SetSourceSurface(source, 2, 2); - context.Paint(); - - double alpha = -0.3; - double step = 1.0 / (double) source.Height; - - context.Translate(0, h); - context.Scale (1, -1); - context.SetSourceSurface(source, 2, 2); - for (int i = 0; i < source.Height; i++) { - context.Rectangle(0, i+2, w, 1); - context.Clip(); - alpha += step; - context.PaintWithAlpha(Math.Max(Math.Min(alpha, 0.7), 0.0)); - context.ResetClip(); - } - } - #endregion - } - /// /// A ClutterFlowActor is a group containing the actor texture and it's reflection /// It does not contain any animation code, as this is provided by the FlowBehaviour class. /// - public class ClutterFlowActor : ClutterFlowBaseActor - { - #region Fields - protected static TextureHolder textureHolder; - + public class ClutterFlowActor : ClutterFlowBaseActor + { + #region Fields private static bool is_setup = false; public static bool IsSetup { get { return is_setup; } @@ -334,13 +60,13 @@ } } }*/ - - protected bool CanUseShader { - get { - return Clutter.Feature.Available (Clutter.FeatureFlags.ShadersGlsl); - } - } - + + protected bool CanUseShader { + get { + return Clutter.Feature.Available (Clutter.FeatureFlags.ShadersGlsl); + } + } + /*private void SetCoverSwap () { if (swapped) { cover.CoglTexture = textureHolder.DefaultTexture; @@ -352,10 +78,10 @@ }*/ private void SetShadeSwap () { - if (!has_shader) { - shade.CoglTexture = textureHolder.ShadeTexture; - delayed_shade_swap = false; - } + if (!has_shader) { + shade.CoglTexture = CoverManager.TextureHolder.ShadeTexture; + delayed_shade_swap = false; + } } protected Clutter.CairoTexture cover = null; @@ -367,229 +93,193 @@ get { return shade; } } + protected bool shifted_outwards; + #endregion - private NeedSurface getDefaultSurface; - - protected bool shifted_outwards; - #endregion - - #region Initialization - public ClutterFlowActor (CoverManager cover_manager, NeedSurface getDefaultSurface) : base (cover_manager) - { - this.getDefaultSurface = getDefaultSurface; - + #region Initialization + public ClutterFlowActor (CoverManager cover_manager) : base (cover_manager) + { this.ParentSet += HandleParentSet; - this.LeaveEvent += HandleLeaveEvent; - this.ButtonPressEvent += HandleButtonPressEvent; - this.ButtonReleaseEvent += HandleButtonReleaseEvent; - - CoverManager.TextureSizeChanged += HandleTextureSizeChanged; + this.LeaveEvent += HandleLeaveEvent; + this.ButtonPressEvent += HandleButtonPressEvent; + this.ButtonReleaseEvent += HandleButtonReleaseEvent; - IsSetup = SetupStatics (); - SetupActors (); - } + SetupActors (); + } - public sealed override void Dispose () + public override void Dispose () { this.ParentSet -= HandleParentSet; - this.LeaveEvent -= HandleLeaveEvent; + this.LeaveEvent -= HandleLeaveEvent; this.ButtonPressEvent -= HandleButtonPressEvent; this.ButtonReleaseEvent -= HandleButtonReleaseEvent; + } - CoverManager.TextureSizeChanged -= HandleTextureSizeChanged; - getDefaultSurface = null; + protected virtual void SetupActors () + { + SetAnchorPoint (0, 0); - DisposeStatics (); + TryShading (); - base.Dispose (); + SetupCover (); + SetupShade (); + + SetAnchorPoint (this.Width*0.5f, this.Height*0.25f); + SetPosition (0,0); + + ShowAll(); } - protected virtual bool SetupStatics () - { - if (textureHolder==null) - textureHolder = new TextureHolder(CoverManager, getDefaultSurface); - return true; - } - protected virtual void DisposeStatics () - { - if (textureHolder!=null) - textureHolder.Dispose (); - textureHolder = null; - } - protected virtual void SetupActors () - { - SetAnchorPoint (0, 0); - - TryShading (); - - SetupCover (); - SetupShade (); - - SetAnchorPoint (this.Width*0.5f, this.Height*0.25f); - SetPosition (0,0); - - ShowAll(); - } - - protected Clutter.Shader shader; - protected bool has_shader = false; - protected virtual void TryShading () - { - /*if (CanUseShader) { - shader = new Clutter.Shader (); - shader.VertexSource = @" - attribute vec4 gl_Color; - varying vec4 gl_FrontColor; - varying vec4 gl_BackColor; - uniform float alpha; - uniform float angle; - uniform float z; - - void main() - { - gl_TexCoord[0] = gl_MultiTexCoord0; - - float shadow = 1; - if ((gl_TexCoord[0].s == 1 && angle > 0) || (gl_TexCoord[0].s == 0 && angle < 0)) { - shadow = clamp(pow(cos(angle), 2.0) * pow(1 + abs(z - 0.5)*1.25, 2.0), 0.0, 1.0); - } - - gl_Position = ftransform(); - gl_BackColor = vec4(0, 0, 0, 1); - gl_FrontColor = vec4(gl_Color.rgb * shadow, alpha); - }"; - shader.Compile (); - SetShader (shader); - AddNotification ("opacity", OnOpacityChanged); - AddNotification ("rotation-angle-y", OnAngleChanged); - AddNotification ("anchor-x", OnAnchorChanged); - OnOpacityChanged (this, new GLib.NotifyArgs()); - OnAngleChanged (this, new GLib.NotifyArgs()); - OnAnchorChanged (this, new GLib.NotifyArgs()); - has_shader = true; - }*/ - } - - protected virtual void SetupCover () - { - if (cover==null) { - cover = new Clutter.CairoTexture((uint) CoverManager.TextureSize, (uint) CoverManager.TextureSize*2); - Add (cover); - cover.Show (); - cover.Realize (); - } - cover.SetSize (CoverManager.Behaviour.CoverWidth, CoverManager.Behaviour.CoverWidth*2); - cover.SetPosition (0, 0); - cover.Opacity = 255; - - //SwappedToDefault = true; - } - - protected virtual void OnOpacityChanged (object sender, NotifyArgs args) - { - SetShaderParamFloat ("alpha", (float) this.Opacity / 255f); - } - protected virtual void OnAngleChanged (object sender, NotifyArgs args) - { - SetShaderParamFloat ("angle", (float) ((double) GetProperty("rotation-angle-y") * Math.PI / 180)); - } - - protected virtual void OnAnchorChanged (object sender, NotifyArgs args) - { - SetShaderParamFloat ("z", (float) GetProperty("anchor-x") / (float) (Width)); - } - - protected virtual void SetupShade () - { - if (!has_shader) { - if (shade==null) { - shade = new Clutter.Texture(); - Add (shade); - shade.Show (); - shade.Realize (); - if (Stage!=null) - SetShadeSwap (); - else - delayed_shade_swap = true; - } - shade.SetSize (CoverManager.Behaviour.CoverWidth, CoverManager.Behaviour.CoverWidth*2); - shade.SetPosition (0, 0); - shade.Opacity = 255; - - if (cover!=null) Shade.Raise (cover); - } - } - #endregion - - #region Texture Handling - protected virtual Cairo.ImageSurface GetDefaultSurface () - { - return (getDefaultSurface!=null) ? getDefaultSurface() : null; - } - - protected virtual void HandleTextureSizeChanged(object sender, EventArgs e) - { - SetupActors(); - } - #endregion - - #region Behaviour Functions - public void SetShade (byte opacity, bool left) - { - if (!has_shader) { - shade.Opacity = opacity; - if (left) - shade.SetRotation (RotateAxis.Y, 0, shade.Width*0.5f, shade.Height*0.25f, 0); - else - shade.SetRotation (RotateAxis.Y, 180, shade.Width*0.5f, shade.Height*0.25f, 0); - } - } - - public ClutterFlowActor CreateClickClone () - { - if (CoverManager.CurrentCover!=this) - CoverManager.NewCurrentCover += HandleNewCurrentCover; - else - CoverManager.Behaviour.CreateClickedCloneAnimation (this); - return this; - } - - private void HandleNewCurrentCover (ClutterFlowBaseActor Actor, EventArgs args) - { - if (CoverManager.CurrentCover==this) { - CoverManager.NewCurrentCover -= HandleNewCurrentCover; - CoverManager.Behaviour.CreateClickedCloneAnimation (this, CoverManager.MaxAnimationSpan); - } - } - - protected virtual void SlideIn () - { - if (!shifted_outwards) - return; - shifted_outwards = false; - Animation anm = Animatev ((ulong) Clutter.AnimationMode.EaseOutBack.value__, CoverManager.MaxAnimationSpan, - new string[] { "anchor-x" }, new GLib.Value ((float) Width*0.5f)); - if (!has_shader) - shade.AnimateWithTimelinev ((ulong) Clutter.AnimationMode.EaseOutSine.value__, anm.Timeline, - new string[] { "anchor-x" }, new GLib.Value (0.0f)); - } - - protected virtual void SlideOut () - { - if (shifted_outwards) - return; - shifted_outwards = true; - float x, y, z; - double angle = GetRotation(RotateAxis.Y, out x, out y, out z); - float new_anchor_x = (float) (Width * (0.5f + 1.6f*Math.Tan (angle))); - Animation anm = Animatev ((ulong) Clutter.AnimationMode.EaseOutBack.value__, CoverManager.MaxAnimationSpan, - new string[] { "anchor-x" }, new GLib.Value ((float) new_anchor_x)); - if (!has_shader) - shade.AnimateWithTimelinev ((ulong) Clutter.AnimationMode.EaseOutSine.value__, anm.Timeline, - new string[] { "anchor-x" }, new GLib.Value ((float) -new_anchor_x*0.5f)); - } - #endregion - #region Event Handling + protected Clutter.Shader shader; + protected bool has_shader = false; + protected virtual void TryShading () + { + /*if (CanUseShader) { + shader = new Clutter.Shader (); + shader.VertexSource = @" + attribute vec4 gl_Color; + varying vec4 gl_FrontColor; + varying vec4 gl_BackColor; + uniform float alpha; + uniform float angle; + uniform float z; + + void main() + { + gl_TexCoord[0] = gl_MultiTexCoord0; + + float shadow = 1; + if ((gl_TexCoord[0].s == 1 && angle > 0) || (gl_TexCoord[0].s == 0 && angle < 0)) { + shadow = clamp(pow(cos(angle), 2.0) * pow(1 + abs(z - 0.5)*1.25, 2.0), 0.0, 1.0); + } + + gl_Position = ftransform(); + gl_BackColor = vec4(0, 0, 0, 1); + gl_FrontColor = vec4(gl_Color.rgb * shadow, alpha); + }"; + shader.Compile (); + SetShader (shader); + AddNotification ("opacity", OnOpacityChanged); + AddNotification ("rotation-angle-y", OnAngleChanged); + AddNotification ("anchor-x", OnAnchorChanged); + OnOpacityChanged (this, new GLib.NotifyArgs()); + OnAngleChanged (this, new GLib.NotifyArgs()); + OnAnchorChanged (this, new GLib.NotifyArgs()); + has_shader = true; + }*/ + } + + protected virtual void SetupCover () + { + if (cover == null) { + cover = new Clutter.CairoTexture((uint) CoverManager.TextureSize, (uint) CoverManager.TextureSize * 2); + Add (cover); + cover.Show (); + cover.Realize (); + } + cover.SetSize (CoverManager.Behaviour.CoverWidth, CoverManager.Behaviour.CoverWidth * 2); + cover.SetPosition (0, 0); + cover.Opacity = 255; + + //SwappedToDefault = true; + } + + protected virtual void OnOpacityChanged (object sender, NotifyArgs args) + { + SetShaderParamFloat ("alpha", (float) this.Opacity / 255f); + } + protected virtual void OnAngleChanged (object sender, NotifyArgs args) + { + SetShaderParamFloat ("angle", (float) ((double) GetProperty("rotation-angle-y") * Math.PI / 180)); + } + + protected virtual void OnAnchorChanged (object sender, NotifyArgs args) + { + SetShaderParamFloat ("z", (float) GetProperty("anchor-x") / (float) (Width)); + } + + protected virtual void SetupShade () + { + if (!has_shader) { + if (shade==null) { + shade = new Clutter.Texture(); + Add (shade); + shade.Show (); + shade.Realize (); + if (Stage!=null) + SetShadeSwap (); + else + delayed_shade_swap = true; + } + shade.SetSize (CoverManager.Behaviour.CoverWidth, CoverManager.Behaviour.CoverWidth * 2); + shade.SetPosition (0, 0); + shade.Opacity = 255; + + if (cover != null) { + Shade.Raise (cover); + } + } + } + #endregion + + #region Behaviour Functions + public void SetShade (byte opacity, bool left) + { + if (!has_shader) { + shade.Opacity = opacity; + if (left) + shade.SetRotation (RotateAxis.Y, 0, shade.Width*0.5f, shade.Height*0.25f, 0); + else + shade.SetRotation (RotateAxis.Y, 180, shade.Width*0.5f, shade.Height*0.25f, 0); + } + } + + public ClutterFlowActor CreateClickClone () + { + if (CoverManager.CurrentCover!=this) + CoverManager.NewCurrentCover += HandleNewCurrentCover; + else + CoverManager.Behaviour.CreateClickedCloneAnimation (this); + return this; + } + + private void HandleNewCurrentCover (ClutterFlowBaseActor Actor, EventArgs args) + { + if (CoverManager.CurrentCover==this) { + CoverManager.NewCurrentCover -= HandleNewCurrentCover; + CoverManager.Behaviour.CreateClickedCloneAnimation (this, CoverManager.MaxAnimationSpan); + } + } + + protected virtual void SlideIn () + { + if (!shifted_outwards) + return; + shifted_outwards = false; + Animation anm = Animatev ((ulong) Clutter.AnimationMode.EaseOutBack.value__, CoverManager.MaxAnimationSpan, + new string[] { "anchor-x" }, new GLib.Value ((float) Width*0.5f)); + if (!has_shader) + shade.AnimateWithTimelinev ((ulong) Clutter.AnimationMode.EaseOutSine.value__, anm.Timeline, + new string[] { "anchor-x" }, new GLib.Value (0.0f)); + } + + protected virtual void SlideOut () + { + if (shifted_outwards) + return; + shifted_outwards = true; + float x, y, z; + double angle = GetRotation(RotateAxis.Y, out x, out y, out z); + float new_anchor_x = (float) (Width * (0.5f + 1.6f*Math.Tan (angle))); + Animation anm = Animatev ((ulong) Clutter.AnimationMode.EaseOutBack.value__, CoverManager.MaxAnimationSpan, + new string[] { "anchor-x" }, new GLib.Value ((float) new_anchor_x)); + if (!has_shader) + shade.AnimateWithTimelinev ((ulong) Clutter.AnimationMode.EaseOutSine.value__, anm.Timeline, + new string[] { "anchor-x" }, new GLib.Value ((float) -new_anchor_x*0.5f)); + } + #endregion + + #region Event Handling void HandleParentSet(object o, ParentSetArgs args) { if (this.Stage != null) { @@ -598,41 +288,42 @@ } } - protected virtual void HandleLeaveEvent (object o, LeaveEventArgs args) - { - SlideIn (); - args.RetVal = true; - } - - protected virtual void HandleButtonReleaseEvent (object o, ButtonReleaseEventArgs args) - { - if (args.Event.Button == 3) { - SlideIn (); - } else { - if (Index>=0 && Opacity > 0) { - if (CoverManager.CurrentCover==this || args.Event.ClickCount==3) { - CreateClickClone (); - CoverManager.InvokeActorActivated (this); - } else - GLib.Timeout.Add ((uint) (CoverManager.DoubleClickTime*0.75), new GLib.TimeoutHandler (delegate { CoverManager.TargetIndex = Index; return false; })); - } - } + protected virtual void HandleLeaveEvent (object o, LeaveEventArgs args) + { + SlideIn (); + args.RetVal = true; + } + + protected virtual void HandleButtonReleaseEvent (object o, ButtonReleaseEventArgs args) + { + if (args.Event.Button == 3) { + SlideIn (); + } else { + if (Index>=0 && Opacity > 0) { + if (CoverManager.CurrentCover==this || args.Event.ClickCount==3) { + CreateClickClone (); + CoverManager.InvokeActorActivated (this); + } else + GLib.Timeout.Add ((uint) (CoverManager.DoubleClickTime*0.75), new GLib.TimeoutHandler ( + delegate { CoverManager.TargetIndex = Index; return false; })); + } + } args.RetVal = true; - } - - protected virtual void HandleButtonPressEvent (object o, ButtonPressEventArgs args) - { - if (args.Event.Button == 3) { - float x, y; - Clutter.EventHelper.GetCoords (args.Event, out x, out y); - TransformStagePoint (x, y, out x, out y); - if (y < Height*0.5f) - SlideOut (); - args.RetVal = true; - } else { - - } - } - #endregion - } + } + + protected virtual void HandleButtonPressEvent (object o, ButtonPressEventArgs args) + { + if (args.Event.Button == 3) { + float x, y; + Clutter.EventHelper.GetCoords (args.Event, out x, out y); + TransformStagePoint (x, y, out x, out y); + if (y < Height*0.5f) + SlideOut (); + args.RetVal = true; + } else { + + } + } + #endregion + } } diff -Nru banshee-community-extensions-2.0.1/src/ClutterFlow/ClutterFlow/ClutterFlowBaseActor.cs banshee-community-extensions-2.2.0/src/ClutterFlow/ClutterFlow/ClutterFlowBaseActor.cs --- banshee-community-extensions-2.0.1/src/ClutterFlow/ClutterFlow/ClutterFlowBaseActor.cs 1970-01-01 00:00:00.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/ClutterFlow/ClutterFlow/ClutterFlowBaseActor.cs 2011-05-30 16:42:54.000000000 +0000 @@ -0,0 +1,167 @@ +// +// ClutterFlowBaseActor.cs +// +// Author: +// Mathijs Dumon +// +// Copyright (c) 2010 Mathijs Dumon +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +using System; + +using Clutter; + +namespace ClutterFlow +{ + public interface IIndexable : IComparable + { + int Index { get; } + event IndexChangedEventHandler IndexChanged; + } + + public delegate void IndexChangedEventHandler (IIndexable item, int old_index, int new_index); + + public abstract class ClutterFlowBaseActor : Clutter.Group, IIndexable + { + #region Fields + private CoverManager cover_manager; + public CoverManager CoverManager { + get { return cover_manager; } + set { cover_manager = value ; } + } + + protected string cache_key = ""; + public virtual string CacheKey { + get { return cache_key; } + } + + protected string label = ""; + public virtual string Label { + get { return label; } + } + + protected string sort_label = ""; + public virtual string SortLabel { + get { return sort_label; } + set { sort_label = value; } + } + + public virtual event IndexChangedEventHandler IndexChanged; + + protected int index = -1; //-1 = not visible + public virtual int Index { + get { return index; } + set { + if (value != index) { + int old_index = index; + index = value; + IsReactive = !(index < 0); + if (IndexChanged != null) { + IndexChanged (this, old_index, index); + } + } + } + } + + public virtual int CompareTo (IIndexable obj) { + if (obj.Index == -1 && this.Index != -1) { + return 1; + } + return obj.Index - this.Index; + } + #endregion + + public ClutterFlowBaseActor () : base () + { } + + public ClutterFlowBaseActor (CoverManager cover_manager) : base () + { + this.cover_manager = cover_manager; + this.cover_manager.Add (this); + } + + private bool disposed = false; + public override void Dispose () + { + if (disposed) { + return; + } + disposed = true; + + cover_manager.Remove (this); + + base.Dispose (); + } + + #region Texture Handling + public static void MakeReflection (Cairo.ImageSurface source, CairoTexture dest) + { + int w = source.Width + 4; + int h = source.Height * 2 + 4; + + dest.SetSurfaceSize ((uint) w, (uint) h); + + Cairo.Context context = dest.Create (); + + MakeReflection (context, source, w, h); + + //((IDisposable) context.Target).Dispose (); + ((IDisposable) context).Dispose (); + } + + public static Cairo.ImageSurface MakeReflection (Cairo.ImageSurface source) + { + int w = source.Width + 4; + int h = source.Height * 2 + 4; + + Cairo.ImageSurface dest = new Cairo.ImageSurface(Cairo.Format.ARGB32, w, h); + Cairo.Context context = new Cairo.Context(dest); + + MakeReflection (context, source, w, h); + + //((IDisposable) context.Target).Dispose (); + ((IDisposable) context).Dispose (); + + return dest; + } + + private static void MakeReflection (Cairo.Context context, Cairo.ImageSurface source, int w, int h) + { + context.ResetClip (); + context.SetSourceSurface (source, 2, 2); + context.Paint (); + + double alpha = -0.3; + double step = 1.0 / (double) source.Height; + + context.Translate (0, h); + context.Scale (1, -1); + context.SetSourceSurface (source, 2, 2); + for (int i = 0; i < source.Height; i++) { + context.Rectangle (0, i+2, w, 1); + context.Clip (); + alpha += step; + context.PaintWithAlpha (Math.Max (Math.Min (alpha, 0.7), 0.0)); + context.ResetClip (); + } + } + #endregion + } +} diff -Nru banshee-community-extensions-2.0.1/src/ClutterFlow/ClutterFlow/ClutterFlowFixedActor.cs banshee-community-extensions-2.2.0/src/ClutterFlow/ClutterFlow/ClutterFlowFixedActor.cs --- banshee-community-extensions-2.0.1/src/ClutterFlow/ClutterFlow/ClutterFlowFixedActor.cs 2010-12-16 17:50:14.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/ClutterFlow/ClutterFlow/ClutterFlowFixedActor.cs 2011-05-30 16:46:21.000000000 +0000 @@ -32,17 +32,16 @@ namespace ClutterFlow { - - public class ClutterFlowFixedActor : ClutterFlowBaseActor { - #region Fields - protected Clutter.CairoTexture texture; + private uint cover_width; + + private Clutter.CairoTexture texture; public Clutter.CairoTexture Texture { get { if (texture==null) { - texture = new Clutter.CairoTexture ((uint) CoverManager.Behaviour.CoverWidth, (uint) CoverManager.Behaviour.CoverWidth*2); + texture = new Clutter.CairoTexture (cover_width, cover_width * 2); Add (texture); texture.Show (); } @@ -51,20 +50,12 @@ } public override string Label { - get { - return "\nNo Matches Found"; - } - set { - throw new System.NotImplementedException ("Label cannot be set in a ClutterFlowDummyActor."); //TODO should use reflection here - } + get { return "\nNo Matches Found"; } } public override string CacheKey { get { return "Dummy Actor"; } - set { - throw new System.NotImplementedException ("CacheKey cannot be set in a ClutterFlowDummyActor."); //TODO should use reflection here - } } public override string SortLabel { @@ -82,31 +73,31 @@ } #endregion - public ClutterFlowFixedActor (CoverManager cover_manager) : base (cover_manager) + public ClutterFlowFixedActor (uint cover_width) : base () { + this.cover_width = cover_width; IsReactive = false; } - public void SetToPb (Gdk.Pixbuf pb) { - SetAnchorPoint (0, 0); - + SetAnchorPoint (0, 0); + if (pb!=null) { - Cairo.Context context = Texture.Create(); - - Gdk.CairoHelper.SetSourcePixbuf(context, pb, 0, 0); - context.Paint(); - - ((IDisposable) context.Target).Dispose (); - ((IDisposable) context).Dispose (); + Cairo.Context context = Texture.Create (); + + Gdk.CairoHelper.SetSourcePixbuf(context, pb, 0, 0); + context.Paint(); + + ((IDisposable) context.Target).Dispose (); + ((IDisposable) context).Dispose (); } - Texture.SetPosition (0, 0); - + Texture.SetPosition (0, 0); + SetAnchorPoint (this.Width*0.5f, this.Height*0.25f); - - ShowAll (); + + ShowAll (); } } } diff -Nru banshee-community-extensions-2.0.1/src/ClutterFlow/ClutterFlow/ClutterFlowSlider.cs banshee-community-extensions-2.2.0/src/ClutterFlow/ClutterFlow/ClutterFlowSlider.cs --- banshee-community-extensions-2.0.1/src/ClutterFlow/ClutterFlow/ClutterFlowSlider.cs 2010-12-16 18:43:52.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/ClutterFlow/ClutterFlow/ClutterFlowSlider.cs 2011-05-28 20:47:11.000000000 +0000 @@ -33,37 +33,37 @@ namespace ClutterFlow.Slider { - - - public class ClutterFlowSlider : Group - { - #region Fields - private CoverManager coverManager; - public CoverManager CoverManager { - get { return coverManager; } - } - - protected ClutterSlider slider; - protected AlphabetBar alphabet; - - #endregion - - #region Initialisation - public ClutterFlowSlider (float width, float height, CoverManager coverManager) - { - this.IsReactive = true; - this.coverManager = coverManager; + + + public class ClutterFlowSlider : Group + { + #region Fields + private CoverManager coverManager; + public CoverManager CoverManager { + get { return coverManager; } + } + + protected ClutterSlider slider; + protected AlphabetBar alphabet; + + #endregion + + #region Initialisation + public ClutterFlowSlider (float width, float height, CoverManager coverManager) + { + this.IsReactive = true; + this.coverManager = coverManager; CoverManager.CoversChanged += HandleCoversChanged; CoverManager.TargetIndexChanged += HandleTargetIndexChanged; CoverManager.LetterLookupChanged += HandleLetterLookupChanged; this.SetSize (width, height); - this.EnterEvent += HandleEnterEvent; - this.LeaveEvent += HandleLeaveEvent; + this.EnterEvent += HandleEnterEvent; + this.LeaveEvent += HandleLeaveEvent; - InitChildren (); - Update (); - } + InitChildren (); + Update (); + } public override void Dispose () { @@ -79,94 +79,94 @@ base.Dispose (); } - - protected virtual void InitChildren () - { - slider = new ClutterSlider (Width, Height*0.6f); - slider.SetAnchorPoint (0, 0); - slider.SetPosition (0, 0); - slider.SliderHasChanged += HandleSliderHasChanged; - slider.SliderHasMoved += HandleSliderHasMoved; - Add (slider); - slider.Show (); - - alphabet = new AlphabetBar ((uint) (Width-Height*1.5), (uint) (Height*0.4f)); - alphabet.SetAnchorPoint (alphabet.Width*0.5f, alphabet.Height); - alphabet.SetPosition (Width*0.5f, Height); - alphabet.LetterClicked += HandleAlphabetLetterClicked; - Add (alphabet); - alphabet.Opacity = (byte) 0; - alphabet.Show (); - } - #endregion - - public void Update () - { - if (Stage!=null) { - SetAnchorPoint(Width*0.5f, Height); - //Console.WriteLine ("ClutterFlowSlider.Update, Width = " + Width + " coverManager.Behaviour.CenterX = " + coverManager.Behaviour.CenterX); - SetPosition(coverManager.Behaviour.CenterX, Math.Min(coverManager.Behaviour.CenterY + coverManager.Behaviour.CoverWidth * 1.5f, Stage.Height)); - } - slider.Update (); - } - - - #region Event Handling - protected void HandleEnterEvent (object o, EnterEventArgs args) - { - alphabet.Animatev ((ulong) AnimationMode.EaseOutExpo.value__, CoverManager.MaxAnimationSpan, new string[] { "opacity" }, new GLib.Value((byte) 255)); - args.RetVal = true; - } - - protected void HandleLeaveEvent (object o, LeaveEventArgs args) - { - alphabet.Animatev ((ulong) AnimationMode.EaseOutExpo.value__, CoverManager.MaxAnimationSpan, new string[] { "opacity" }, new GLib.Value((byte) 0)); - args.RetVal = true; - } - + + protected virtual void InitChildren () + { + slider = new ClutterSlider (Width, Height*0.6f); + slider.SetAnchorPoint (0, 0); + slider.SetPosition (0, 0); + slider.SliderHasChanged += HandleSliderHasChanged; + slider.SliderHasMoved += HandleSliderHasMoved; + Add (slider); + slider.Show (); + + alphabet = new AlphabetBar ((uint) (Width-Height*1.5), (uint) (Height*0.4f)); + alphabet.SetAnchorPoint (alphabet.Width*0.5f, alphabet.Height); + alphabet.SetPosition (Width*0.5f, Height); + alphabet.LetterClicked += HandleAlphabetLetterClicked; + Add (alphabet); + alphabet.Opacity = (byte) 0; + alphabet.Show (); + } + #endregion + + public void Update () + { + if (Stage!=null) { + SetAnchorPoint(Width*0.5f, Height); + //Console.WriteLine ("ClutterFlowSlider.Update, Width = " + Width + " coverManager.Behaviour.CenterX = " + coverManager.Behaviour.CenterX); + SetPosition(coverManager.Behaviour.CenterX, Math.Min(coverManager.Behaviour.CenterY + coverManager.Behaviour.CoverWidth * 1.5f, Stage.Height)); + } + slider.Update (); + } + + + #region Event Handling + protected void HandleEnterEvent (object o, EnterEventArgs args) + { + alphabet.Animatev ((ulong) AnimationMode.EaseOutExpo.value__, CoverManager.MaxAnimationSpan, new string[] { "opacity" }, new GLib.Value((byte) 255)); + args.RetVal = true; + } + + protected void HandleLeaveEvent (object o, LeaveEventArgs args) + { + alphabet.Animatev ((ulong) AnimationMode.EaseOutExpo.value__, CoverManager.MaxAnimationSpan, new string[] { "opacity" }, new GLib.Value((byte) 0)); + args.RetVal = true; + } + protected void HandleCoversChanged (object sender, EventArgs e) { - slider.UpdateBounds (coverManager.TotalCovers, coverManager.TargetIndex); + slider.UpdateBounds (coverManager.TotalCovers, coverManager.TargetIndex); + } + + bool ignoreTargetIndexOnce = false; + protected void HandleTargetIndexChanged(object sender, EventArgs e) + { + if (coverManager.TargetActor!=null) { + slider.Label = coverManager.TargetActor.SortLabel.ToUpper ().Substring (0,1); + } else + slider.Label = "?"; + if (!ignoreTargetIndexOnce) + slider.HandlePostionFromIndex = coverManager.TargetIndex; + ignoreTargetIndexOnce = false; + } + + protected void HandleSliderHasMoved(object sender, EventArgs e) + { + ignoreTargetIndexOnce = true; + coverManager.TargetIndex = slider.HandlePostionFromIndex; + } + + protected void HandleSliderHasChanged(object sender, EventArgs e) + { + coverManager.TargetIndex = slider.HandlePostionFromIndex; + } + + protected void HandleAlphabetLetterClicked (object sender, AlphabetEventArgs e) + { + ignoreTargetIndexOnce = false; + /*Console.WriteLine ("HandleAlphabetLetterClicked e.Letter = " + e.Letter); + Console.WriteLine ("CoverManager.LetterLookup is " + (CoverManager.LetterLookup == null ? "null" : "not null")); + Console.WriteLine ("CoverManager.LetterLookup.ContainsKey(e.Letter) = " + CoverManager.LetterLookup.ContainsKey(e.Letter)); + Console.WriteLine ("CoverManager.LetterLookup[e.Letter] = " + CoverManager.LetterLookup[e.Letter]);*/ + CoverManager.TargetIndex = CoverManager.LetterLookup[e.Letter]; + } + + protected void HandleLetterLookupChanged (object sender, EventArgs e) + { + foreach (AlphabetChars key in Enum.GetValues(typeof(AlphabetChars))) + alphabet[key].Disabled = CoverManager.LetterLookup[key]==-1; } - - bool ignoreTargetIndexOnce = false; - protected void HandleTargetIndexChanged(object sender, EventArgs e) - { - if (coverManager.TargetActor!=null) { - slider.Label = coverManager.TargetActor.SortLabel.ToUpper ().Substring (0,1); - } else - slider.Label = "?"; - if (!ignoreTargetIndexOnce) - slider.HandlePostionFromIndex = coverManager.TargetIndex; - ignoreTargetIndexOnce = false; - } - - protected void HandleSliderHasMoved(object sender, EventArgs e) - { - ignoreTargetIndexOnce = true; - coverManager.TargetIndex = slider.HandlePostionFromIndex; - } - - protected void HandleSliderHasChanged(object sender, EventArgs e) - { - coverManager.TargetIndex = slider.HandlePostionFromIndex; - } - - protected void HandleAlphabetLetterClicked (object sender, AlphabetEventArgs e) - { - ignoreTargetIndexOnce = false; - /*Console.WriteLine ("HandleAlphabetLetterClicked e.Letter = " + e.Letter); - Console.WriteLine ("CoverManager.LetterLookup is " + (CoverManager.LetterLookup == null ? "null" : "not null")); - Console.WriteLine ("CoverManager.LetterLookup.ContainsKey(e.Letter) = " + CoverManager.LetterLookup.ContainsKey(e.Letter)); - Console.WriteLine ("CoverManager.LetterLookup[e.Letter] = " + CoverManager.LetterLookup[e.Letter]);*/ - CoverManager.TargetIndex = CoverManager.LetterLookup[e.Letter]; - } - - protected void HandleLetterLookupChanged (object sender, EventArgs e) - { - foreach (AlphabetChars key in Enum.GetValues(typeof(AlphabetChars))) - alphabet[key].Disabled = CoverManager.LetterLookup[key]==-1; - } - #endregion - } + #endregion + } } diff -Nru banshee-community-extensions-2.0.1/src/ClutterFlow/ClutterFlow/ClutterFlowTimeline.cs banshee-community-extensions-2.2.0/src/ClutterFlow/ClutterFlow/ClutterFlowTimeline.cs --- banshee-community-extensions-2.0.1/src/ClutterFlow/ClutterFlow/ClutterFlowTimeline.cs 2010-12-16 18:51:36.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/ClutterFlow/ClutterFlow/ClutterFlowTimeline.cs 2011-05-30 19:03:08.000000000 +0000 @@ -94,7 +94,7 @@ set { if (value > 1) value = 1; if (value < 0) value = 0; - if (double.IsInfinity(value) || double.IsNaN(value)) value = 0; + if (double.IsInfinity(value) || double.IsNaN(value)) value = 0; progress = value; delta = (int) Math.Abs(AbsoluteProgress - Target); if (delta==0) InvokeTargetReached (); @@ -219,7 +219,7 @@ //Console.Write (" Moving "); if (Target>AbsoluteProgress) { //Console.Write (" Forward - Target is " + Target + " AbsoluteProgress is " + AbsoluteProgress + "\n"); - Progress += time_delta * Frequency / (double) (IndexCount-1); + Progress += time_delta * Frequency / (double) (IndexCount-1); if (Target<=AbsoluteProgress) Progress = RelativeTarget; } else if (Target SliderHasMoved; - void HandleSliderHasMoved(object sender, EventArgs e) - { - if (SliderHasMoved!=null) SliderHasMoved(this, System.EventArgs.Empty); - } - public event EventHandler SliderHasChanged; - private void HandleSliderHasChanged(object sender, EventArgs e) - { - SetPostionFromIndexSilently(HandlePostionFromIndex); - if (SliderHasChanged!=null) SliderHasChanged(this, System.EventArgs.Empty); - } - #endregion - - #region Fields - protected CairoTexture outline; - protected ClutterArrowButton arrow_left; - protected ClutterArrowButton arrow_right; - protected ClutterSliderHandle handle; - - //Count is 1-based - protected int count = 1; - public int Count { - get { - return count; - } - set { - if (count!=value) { - int index = HandlePostionFromIndex; - count = value; - HandlePostionFromIndex = index; - } - } - } - - public string Label { - get { return handle.Button.Label; } - set { handle.Button.Label = value; } - } - - public uint SliderWidth { - get { return (uint) (Width - Height*1.5f); } - } - #endregion - - #region Initialisation - public ClutterSlider (float width, float height) : base() - { - //this.IsReactive = true; - this.SetSize(width, height); - - handle = new ClutterSliderHandle((float) arrow_width*0.5f + line_width*2, 0, (float) SliderWidth, (float) Height, 0); - handle.SliderHasChanged += HandleSliderHasChanged; - handle.SliderHasMoved += HandleSliderHasMoved; - handle.BubbleEvents = true; - Add(handle); - - outline = new CairoTexture (SliderWidth, (uint) Height); - Add(outline); - outline.SetAnchorPoint (outline.Width*0.5f, outline.Height*0.5f); - outline.SetPosition (Width*0.5f, Height*0.5f); - - arrow_left = new ClutterArrowButton((uint) arrow_width,(uint) arrow_height, 0, 0x03); - arrow_left.ButtonPressEvent += HandleLeftArrowButtonPressEvent; - Add (arrow_left); - arrow_left.SetPosition (0,0); - - arrow_right = new ClutterArrowButton ((uint) arrow_width,(uint) arrow_height, 0, 0x01); - arrow_right.ButtonPressEvent += HandleRightArrowButtonPressEvent; - Add (arrow_right); - arrow_right.SetPosition ((float) (Width-arrow_width),0); - - Update (); - ShowAll (); - } - #endregion - - #region Index & Bounds methods - public void UpdateBounds(int count, int index) - { - this.count = count; - HandlePostionFromIndex = index; - } - - public int HandlePostionFromIndex - { - get { - return (int) Math.Round(handle.Value * (float)(count-1)); - } - set { - int retval = value; - if (retval >= count) retval = count-1; - if (retval < 0) retval = 0; - handle.Value = (float) retval / (float) (count-1); - } - } - - protected void SetPostionFromIndexSilently (int value) - { - if (value >= count) value = count-1; - if (value < 0) value = 0; - handle.SetValueSilently ((float) value / (float) (count-1)); - } - #endregion - - #region Events - protected void HandleLeftArrowButtonPressEvent(object o, ButtonPressEventArgs args) - { - if (args.Event.ClickCount==1 || args.Event.ClickCount%2!=1) - HandlePostionFromIndex -= 1; - args.RetVal = true; - } - - protected void HandleRightArrowButtonPressEvent(object o, ButtonPressEventArgs args) - { - if (args.Event.ClickCount==1 || args.Event.ClickCount%2!=1) - HandlePostionFromIndex += 1; - args.RetVal = true; - } - #endregion - - #region Rendering - private double arrow_height { - get { return Height; } - } - private double arrow_width { - get { return arrow_height*1.25; } - } - private int line_width { - get { return 1; } - } - - public virtual void Update() { - outline.Clear(); - Cairo.Context context = outline.Create(); - + + public class ClutterSlider : Group + { + #region Events + public event EventHandler SliderHasMoved; + void HandleSliderHasMoved(object sender, EventArgs e) + { + if (SliderHasMoved!=null) SliderHasMoved(this, System.EventArgs.Empty); + } + public event EventHandler SliderHasChanged; + private void HandleSliderHasChanged(object sender, EventArgs e) + { + SetPostionFromIndexSilently(HandlePostionFromIndex); + if (SliderHasChanged!=null) SliderHasChanged(this, System.EventArgs.Empty); + } + #endregion + + #region Fields + protected CairoTexture outline; + protected ClutterArrowButton arrow_left; + protected ClutterArrowButton arrow_right; + protected ClutterSliderHandle handle; + + //Count is 1-based + protected int count = 1; + public int Count { + get { + return count; + } + set { + if (count!=value) { + int index = HandlePostionFromIndex; + count = value; + HandlePostionFromIndex = index; + } + } + } + + public string Label { + get { return handle.Button.Label; } + set { handle.Button.Label = value; } + } + + public uint SliderWidth { + get { return (uint) (Width - Height*1.5f); } + } + #endregion + + #region Initialisation + public ClutterSlider (float width, float height) : base() + { + //this.IsReactive = true; + this.SetSize(width, height); + + handle = new ClutterSliderHandle((float) arrow_width*0.5f + line_width*2, 0, (float) SliderWidth, (float) Height, 0); + handle.SliderHasChanged += HandleSliderHasChanged; + handle.SliderHasMoved += HandleSliderHasMoved; + handle.BubbleEvents = true; + Add(handle); + + outline = new CairoTexture (SliderWidth, (uint) Height); + Add(outline); + outline.SetAnchorPoint (outline.Width*0.5f, outline.Height*0.5f); + outline.SetPosition (Width*0.5f, Height*0.5f); + + arrow_left = new ClutterArrowButton((uint) arrow_width,(uint) arrow_height, 0, 0x03); + arrow_left.ButtonPressEvent += HandleLeftArrowButtonPressEvent; + Add (arrow_left); + arrow_left.SetPosition (0,0); + + arrow_right = new ClutterArrowButton ((uint) arrow_width,(uint) arrow_height, 0, 0x01); + arrow_right.ButtonPressEvent += HandleRightArrowButtonPressEvent; + Add (arrow_right); + arrow_right.SetPosition ((float) (Width-arrow_width),0); + + Update (); + ShowAll (); + } + #endregion + + #region Index & Bounds methods + public void UpdateBounds(int count, int index) + { + this.count = count; + HandlePostionFromIndex = index; + } + + public int HandlePostionFromIndex + { + get { + return (int) Math.Round(handle.Value * (float)(count-1)); + } + set { + int retval = value; + if (retval >= count) retval = count-1; + if (retval < 0) retval = 0; + handle.Value = (float) retval / (float) (count-1); + } + } + + protected void SetPostionFromIndexSilently (int value) + { + if (value >= count) value = count-1; + if (value < 0) value = 0; + handle.SetValueSilently ((float) value / (float) (count-1)); + } + #endregion + + #region Events + protected void HandleLeftArrowButtonPressEvent(object o, ButtonPressEventArgs args) + { + if (args.Event.ClickCount==1 || args.Event.ClickCount%2!=1) + HandlePostionFromIndex -= 1; + args.RetVal = true; + } + + protected void HandleRightArrowButtonPressEvent(object o, ButtonPressEventArgs args) + { + if (args.Event.ClickCount==1 || args.Event.ClickCount%2!=1) + HandlePostionFromIndex += 1; + args.RetVal = true; + } + #endregion + + #region Rendering + private double arrow_height { + get { return Height; } + } + private double arrow_width { + get { return arrow_height*1.25; } + } + private int line_width { + get { return 1; } + } + + public virtual void Update() { + outline.Clear(); + Cairo.Context context = outline.Create (); + context.LineWidth = line_width; - context.MoveTo(outline.Height*0.5, 0.5); - context.Arc(outline.Width-outline.Height*0.5,outline.Height*0.5,(outline.Height-line_width)*0.5,1.5*Math.PI,0.5*Math.PI); - context.Arc(outline.Height*0.5,outline.Height*0.5,(outline.Height-line_width)*0.5,0.5*Math.PI,1.5*Math.PI); - context.ClosePath(); - context.SetSourceRGBA(1.0,1.0,1.0,0.2); - context.FillPreserve(); - context.SetSourceRGB(1.0,1.0,1.0); - context.Stroke(); - - ((IDisposable) context.Target).Dispose(); - ((IDisposable) context).Dispose(); - - handle.Update(); - handle.RaiseTop(); - arrow_left.Update(); - arrow_right.Update(); - } - #endregion - } + context.MoveTo(outline.Height*0.5, 0.5); + context.Arc(outline.Width-outline.Height*0.5,outline.Height*0.5,(outline.Height-line_width)*0.5,1.5*Math.PI,0.5*Math.PI); + context.Arc(outline.Height*0.5,outline.Height*0.5,(outline.Height-line_width)*0.5,0.5*Math.PI,1.5*Math.PI); + context.ClosePath(); + context.SetSourceRGBA(1.0,1.0,1.0,0.2); + context.FillPreserve(); + context.SetSourceRGB(1.0,1.0,1.0); + context.Stroke(); + + ((IDisposable) context.Target).Dispose(); + ((IDisposable) context).Dispose(); + + handle.Update(); + handle.RaiseTop(); + arrow_left.Update(); + arrow_right.Update(); + } + #endregion + } } \ No newline at end of file diff -Nru banshee-community-extensions-2.0.1/src/ClutterFlow/ClutterFlow/ClutterSliderHandleButton.cs banshee-community-extensions-2.2.0/src/ClutterFlow/ClutterFlow/ClutterSliderHandleButton.cs --- banshee-community-extensions-2.0.1/src/ClutterFlow/ClutterFlow/ClutterSliderHandleButton.cs 2010-08-13 20:05:55.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/ClutterFlow/ClutterFlow/ClutterSliderHandleButton.cs 2011-05-28 20:47:11.000000000 +0000 @@ -31,52 +31,52 @@ namespace ClutterFlow.Buttons { - - public class ClutterSliderHandleButton : ClutterButton - { - protected Clutter.Text label; - public string Label { - get { return label.Value; } - set { - if (value!=label.Value) { - label.Value = value; - Update (); - } - } - } - - public ClutterSliderHandleButton(uint width, uint height, int state) : base(width, height, state) { - label = new Text("Sans Bold 10", "", new Clutter.Color(0.0f,0.0f,0.0f,0.8f)); - Add (label); - label.SetAnchorPoint (label.Width*0.5f, label.Height*0.5f); - label.SetPosition (this.Width*0.5f,this.Height*0.5f); - label.ShowAll(); - } - - public override void Update () - { - base.Update (); - label.SetAnchorPoint (label.Width*0.5f, label.Height*0.5f); - label.SetPosition (this.Width*0.5f,this.Height*0.5f); - label.ShowAll (); - } - - - protected override void CreateTexture (Clutter.CairoTexture texture, int with_state) { - texture.Clear(); - Cairo.Context context = texture.Create(); - - context.Translate(texture.Width*0.5,texture.Height*0.5); - context.Arc(0,0,(texture.Height-1)*0.5,0,2*Math.PI); - context.ClosePath(); - context.SetSourceRGBA(1.0,1.0,1.0, with_state==0 ? 0.3 : (with_state==1 ? 0.5 : 0.7)); - context.FillPreserve(); - context.SetSourceRGB(1.0,1.0,1.0); - context.LineWidth = 1; - context.Stroke(); - - ((IDisposable) context.Target).Dispose(); - ((IDisposable) context).Dispose(); - } - } + + public class ClutterSliderHandleButton : ClutterButton + { + protected Clutter.Text label; + public string Label { + get { return label.Value; } + set { + if (value!=label.Value) { + label.Value = value; + Update (); + } + } + } + + public ClutterSliderHandleButton(uint width, uint height, int state) : base(width, height, state) { + label = new Text("Sans Bold 10", "", new Clutter.Color(0.0f,0.0f,0.0f,0.8f)); + Add (label); + label.SetAnchorPoint (label.Width*0.5f, label.Height*0.5f); + label.SetPosition (this.Width*0.5f,this.Height*0.5f); + label.ShowAll(); + } + + public override void Update () + { + base.Update (); + label.SetAnchorPoint (label.Width*0.5f, label.Height*0.5f); + label.SetPosition (this.Width*0.5f,this.Height*0.5f); + label.ShowAll (); + } + + + protected override void CreateTexture (Clutter.CairoTexture texture, int with_state) { + texture.Clear(); + Cairo.Context context = texture.Create (); + + context.Translate(texture.Width*0.5,texture.Height*0.5); + context.Arc(0,0,(texture.Height-1)*0.5,0,2*Math.PI); + context.ClosePath(); + context.SetSourceRGBA(1.0,1.0,1.0, with_state==0 ? 0.3 : (with_state==1 ? 0.5 : 0.7)); + context.FillPreserve(); + context.SetSourceRGB(1.0,1.0,1.0); + context.LineWidth = 1; + context.Stroke(); + + ((IDisposable) context.Target).Dispose(); + ((IDisposable) context).Dispose(); + } + } } \ No newline at end of file diff -Nru banshee-community-extensions-2.0.1/src/ClutterFlow/ClutterFlow/ClutterSliderHandle.cs banshee-community-extensions-2.2.0/src/ClutterFlow/ClutterFlow/ClutterSliderHandle.cs --- banshee-community-extensions-2.0.1/src/ClutterFlow/ClutterFlow/ClutterSliderHandle.cs 2010-08-13 20:05:55.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/ClutterFlow/ClutterFlow/ClutterSliderHandle.cs 2011-05-28 20:47:11.000000000 +0000 @@ -32,162 +32,162 @@ namespace ClutterFlow.Slider { - - /// + + /// /// The ClutterSliderHandle is a wrapper around the ClutterSliderHandleButton. /// It restricts it's position to certain bounds, enables dragging of the button /// and makes the slider jump when clicked before or after the button. /// - public class ClutterSliderHandle : Group - { + public class ClutterSliderHandle : Group + { - #region Events - public event EventHandler SliderHasMoved; - private void InvokeSliderHasMoved () - { - if (SliderHasMoved!=null) SliderHasMoved (this, System.EventArgs.Empty); - } - - public event EventHandler SliderHasChanged; - private void InvokeSliderHasChanged () - { - if (SliderHasChanged!=null) SliderHasChanged (this, System.EventArgs.Empty); - } - #endregion - - #region Fields - protected bool bubble = false; - public virtual bool BubbleEvents { - get { return bubble; } - set { bubble = value; } - } - - protected ClutterSliderHandleButton button; - public ClutterSliderHandleButton Button { - get { return button; } - } - - //position of the handle (as a fraction of width - handlewidth) - protected float posval = 0.0f; - public float Value { - get { return posval; } - set { - if (value!=posval) { - SetValueSilently (value); - InvokeSliderHasChanged(); - } - } - } - public void SetValueSilently (float value) { - if (value!=posval) { - if (value>1) posval=1; - else if (value<0 || float.IsNaN(value) || float.IsInfinity(value)) posval=0; - else posval = value; - UpdatePosition(); - InvokeSliderHasMoved(); - } - } - - protected float width; protected float height; - protected float mouseX; - - #endregion - - public ClutterSliderHandle(float x, float y, float width, float height, byte state) : base() - { - SetPosition(x,y); - SetSize(width, height); - - button = new ClutterSliderHandleButton((uint) Height,(uint) Height,state); - button.BubbleEvents = true; - Add(button); - button.Show(); - UpdatePosition(); - - IsReactive = true; - MotionEvent += HandleMotionEvent; - ButtonPressEvent += HandleButtonPressEvent; - ButtonReleaseEvent += HandleButtonReleaseEvent; - EnterEvent += HandleEnterEvent; - LeaveEvent += HandleLeaveEvent; - } - - private void UpdatePosition () - { - if (!float.IsNaN(Value)) - button.SetPosition(Value * (width - height), 0); - else - button.SetPosition(0, 0); - } - - #region Event Handling - protected virtual void HandleEnterEvent (object o, EnterEventArgs args) - { - button.State |= 1; - args.RetVal = !BubbleEvents; - } - - public new void SetSize (float width, float height) - { - this.width = width; - this.height = height; - base.SetSize (width, height); - } - - protected virtual void HandleButtonPressEvent (object o, ButtonPressEventArgs args) - { - Clutter.Grab.Pointer(this); - - float x1; float y1; float x2; - Clutter.EventHelper.GetCoords (args.Event, out x1, out y1); - button.GetTransformedPosition (out x2, out y1); - - if ((x2 + button.Width) < x1) { - //right side increase - Value += 0.1f; - } else if (x2 > x1) { - //left side decrease - Value -= 0.1f; - } - - args.RetVal = true; - } - - protected virtual void HandleButtonReleaseEvent (object o, ButtonReleaseEventArgs args) - { - if (args.Event.Source!=this) button.State = 0; - else button.State &= 1; - Clutter.Ungrab.Pointer (); - InvokeSliderHasChanged (); - args.RetVal = true; - } - - protected virtual void HandleLeaveEvent (object o, LeaveEventArgs args) - { - button.State &= 2; - args.RetVal = !BubbleEvents; - } - - protected void HandleMotionEvent (object o, MotionEventArgs args) - { - float x1; float y1; - Clutter.EventHelper.GetCoords (args.Event, out x1, out y1); - - float tx; float ty; - GetTransformedPosition (out tx, out ty); - - if (x1 <= tx+Width && x1 >= tx && (args.Event.ModifierState.value__ & ModifierType.Button1Mask.value__)!=0 && (button.State & 2)!=0) { - float deltaX = (x1 - mouseX); - SetValueSilently (posval + (deltaX / (width - height))); - } - mouseX = x1; - args.RetVal = true; - } - #endregion - - public void Update () - { - button.Update (); - } - } + #region Events + public event EventHandler SliderHasMoved; + private void InvokeSliderHasMoved () + { + if (SliderHasMoved!=null) SliderHasMoved (this, System.EventArgs.Empty); + } + + public event EventHandler SliderHasChanged; + private void InvokeSliderHasChanged () + { + if (SliderHasChanged!=null) SliderHasChanged (this, System.EventArgs.Empty); + } + #endregion + + #region Fields + protected bool bubble = false; + public virtual bool BubbleEvents { + get { return bubble; } + set { bubble = value; } + } + + protected ClutterSliderHandleButton button; + public ClutterSliderHandleButton Button { + get { return button; } + } + + //position of the handle (as a fraction of width - handlewidth) + protected float posval = 0.0f; + public float Value { + get { return posval; } + set { + if (value!=posval) { + SetValueSilently (value); + InvokeSliderHasChanged(); + } + } + } + public void SetValueSilently (float value) { + if (value!=posval) { + if (value>1) posval=1; + else if (value<0 || float.IsNaN(value) || float.IsInfinity(value)) posval=0; + else posval = value; + UpdatePosition(); + InvokeSliderHasMoved(); + } + } + + protected float width; protected float height; + protected float mouseX; + + #endregion + + public ClutterSliderHandle(float x, float y, float width, float height, byte state) : base() + { + SetPosition(x,y); + SetSize(width, height); + + button = new ClutterSliderHandleButton((uint) Height,(uint) Height,state); + button.BubbleEvents = true; + Add(button); + button.Show(); + UpdatePosition(); + + IsReactive = true; + MotionEvent += HandleMotionEvent; + ButtonPressEvent += HandleButtonPressEvent; + ButtonReleaseEvent += HandleButtonReleaseEvent; + EnterEvent += HandleEnterEvent; + LeaveEvent += HandleLeaveEvent; + } + + private void UpdatePosition () + { + if (!float.IsNaN(Value)) + button.SetPosition(Value * (width - height), 0); + else + button.SetPosition(0, 0); + } + + #region Event Handling + protected virtual void HandleEnterEvent (object o, EnterEventArgs args) + { + button.State |= 1; + args.RetVal = !BubbleEvents; + } + + public new void SetSize (float width, float height) + { + this.width = width; + this.height = height; + base.SetSize (width, height); + } + + protected virtual void HandleButtonPressEvent (object o, ButtonPressEventArgs args) + { + Clutter.Grab.Pointer(this); + + float x1; float y1; float x2; + Clutter.EventHelper.GetCoords (args.Event, out x1, out y1); + button.GetTransformedPosition (out x2, out y1); + + if ((x2 + button.Width) < x1) { + //right side increase + Value += 0.1f; + } else if (x2 > x1) { + //left side decrease + Value -= 0.1f; + } + + args.RetVal = true; + } + + protected virtual void HandleButtonReleaseEvent (object o, ButtonReleaseEventArgs args) + { + if (args.Event.Source!=this) button.State = 0; + else button.State &= 1; + Clutter.Ungrab.Pointer (); + InvokeSliderHasChanged (); + args.RetVal = true; + } + + protected virtual void HandleLeaveEvent (object o, LeaveEventArgs args) + { + button.State &= 2; + args.RetVal = !BubbleEvents; + } + + protected void HandleMotionEvent (object o, MotionEventArgs args) + { + float x1; float y1; + Clutter.EventHelper.GetCoords (args.Event, out x1, out y1); + + float tx; float ty; + GetTransformedPosition (out tx, out ty); + + if (x1 <= tx+Width && x1 >= tx && (args.Event.ModifierState.value__ & ModifierType.Button1Mask.value__)!=0 && (button.State & 2)!=0) { + float deltaX = (x1 - mouseX); + SetValueSilently (posval + (deltaX / (width - height))); + } + mouseX = x1; + args.RetVal = true; + } + #endregion + + public void Update () + { + button.Update (); + } + } } diff -Nru banshee-community-extensions-2.0.1/src/ClutterFlow/ClutterFlow/ClutterToggleButton.cs banshee-community-extensions-2.2.0/src/ClutterFlow/ClutterFlow/ClutterToggleButton.cs --- banshee-community-extensions-2.0.1/src/ClutterFlow/ClutterFlow/ClutterToggleButton.cs 2010-08-13 20:05:55.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/ClutterFlow/ClutterFlow/ClutterToggleButton.cs 2011-05-28 20:47:11.000000000 +0000 @@ -33,113 +33,113 @@ namespace ClutterFlow.Buttons { - - - public abstract class ClutterToggleButton : ClutterButtonState - { - - public event EventHandler Toggled; - protected void InvokeToggled () { - if (Toggled!=null) Toggled (this, EventArgs.Empty); - } - - //// - /// MaxBits represents the toggle buttons maximal bit-states to be set: - /// 1: mouse_over - /// 2: mouse_down - /// 4: toggled - /// - protected override int MaxState { - get { return 7; } - } - - private bool freeze_state = false; - public virtual bool IsActive { - get { return (state & 4) > 0; } - set { - if (!freeze_state) { - if (value && (state & 4)==0) { - State |= 4; - InvokeToggled (); - } else if (!value && (state & 4)>0) { - State &= ~4; - InvokeToggled (); - } - } - } - } - public virtual void SetSilent (bool value) - { - if (!freeze_state) { - if (value && (state & 4)==0) { - State |= 4; - } else if (!value && (state & 4)>0) { - State &= ~4; - } - } - } - - public virtual CairoTexture StateTexture { - get { return (IsActive) ? active_button.StateTexture : passive_button.StateTexture; } - } - - protected ClutterGenericButton passive_button; - protected ClutterGenericButton active_button; - - public ClutterToggleButton (uint width, uint height, bool toggled) : this (width, height, toggled ? 0x04 : 0x00) - { - } - - public ClutterToggleButton (uint width, uint height, int state) : base () - { - this.SetSize (width, height); - this.state = state; - - passive_button = new ClutterGenericButton(width, height, state, CreatePassiveTexture); - passive_button.BubbleEvents = true; - active_button = new ClutterGenericButton(width, height, state, CreateActiveTexture); - active_button.BubbleEvents = true; - - Initialise (); - } - - protected override void Initialise () { - Add (passive_button); - Add (active_button); - - base.Initialise (); - - active_button.Update (); - passive_button.Update (); - Update (); - Show (); - } - - #region Event Handling - protected override void HandleButtonReleaseEvent(object o, ButtonReleaseEventArgs args) - { - State = (state^4) & ~2; - freeze_state = true; //freeze the state untill after the event has finished handling - InvokeToggled (); - freeze_state = false; //thaw the state - args.RetVal = !bubble; - } - #endregion - - public override void Update () { - if ((state & 4) > 0) { - passive_button.Hide (); - active_button.State = state; - active_button.Show (); - } else { - active_button.Hide (); - passive_button.State = state; - passive_button.Show (); - } - Show (); - } - - protected abstract void CreatePassiveTexture (Clutter.CairoTexture texture, int with_state); - protected abstract void CreateActiveTexture (Clutter.CairoTexture texture, int with_state); - } + + + public abstract class ClutterToggleButton : ClutterButtonState + { + + public event EventHandler Toggled; + protected void InvokeToggled () { + if (Toggled!=null) Toggled (this, EventArgs.Empty); + } + + //// + /// MaxBits represents the toggle buttons maximal bit-states to be set: + /// 1: mouse_over + /// 2: mouse_down + /// 4: toggled + /// + protected override int MaxState { + get { return 7; } + } + + private bool freeze_state = false; + public virtual bool IsActive { + get { return (state & 4) > 0; } + set { + if (!freeze_state) { + if (value && (state & 4)==0) { + State |= 4; + InvokeToggled (); + } else if (!value && (state & 4)>0) { + State &= ~4; + InvokeToggled (); + } + } + } + } + public virtual void SetSilent (bool value) + { + if (!freeze_state) { + if (value && (state & 4)==0) { + State |= 4; + } else if (!value && (state & 4)>0) { + State &= ~4; + } + } + } + + public virtual CairoTexture StateTexture { + get { return (IsActive) ? active_button.StateTexture : passive_button.StateTexture; } + } + + protected ClutterGenericButton passive_button; + protected ClutterGenericButton active_button; + + public ClutterToggleButton (uint width, uint height, bool toggled) : this (width, height, toggled ? 0x04 : 0x00) + { + } + + public ClutterToggleButton (uint width, uint height, int state) : base () + { + this.SetSize (width, height); + this.state = state; + + passive_button = new ClutterGenericButton(width, height, state, CreatePassiveTexture); + passive_button.BubbleEvents = true; + active_button = new ClutterGenericButton(width, height, state, CreateActiveTexture); + active_button.BubbleEvents = true; + + Initialise (); + } + + protected override void Initialise () { + Add (passive_button); + Add (active_button); + + base.Initialise (); + + active_button.Update (); + passive_button.Update (); + Update (); + Show (); + } + + #region Event Handling + protected override void HandleButtonReleaseEvent(object o, ButtonReleaseEventArgs args) + { + State = (state^4) & ~2; + freeze_state = true; //freeze the state untill after the event has finished handling + InvokeToggled (); + freeze_state = false; //thaw the state + args.RetVal = !bubble; + } + #endregion + + public override void Update () { + if ((state & 4) > 0) { + passive_button.Hide (); + active_button.State = state; + active_button.Show (); + } else { + active_button.Hide (); + passive_button.State = state; + passive_button.Show (); + } + Show (); + } + + protected abstract void CreatePassiveTexture (Clutter.CairoTexture texture, int with_state); + protected abstract void CreateActiveTexture (Clutter.CairoTexture texture, int with_state); + } } diff -Nru banshee-community-extensions-2.0.1/src/ClutterFlow/ClutterFlow/ClutterWidgetBar.cs banshee-community-extensions-2.2.0/src/ClutterFlow/ClutterFlow/ClutterWidgetBar.cs --- banshee-community-extensions-2.0.1/src/ClutterFlow/ClutterFlow/ClutterWidgetBar.cs 2010-08-13 20:05:55.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/ClutterFlow/ClutterFlow/ClutterWidgetBar.cs 2011-05-28 20:47:11.000000000 +0000 @@ -31,118 +31,118 @@ namespace ClutterFlow { - - public class ClutterWidgetBar : Group - { - - protected CairoTexture text; - - protected float marginX = 6; - public float MarginX { - get { return marginX; } - set { - if (value!=marginX) { - marginX = value; - UpdatePositions (); - } - } - } - - protected float marginY = 4; - public float MarginY { - get { return marginY; } - set { - if (value!=marginY) { - marginY = value; - UpdatePositions (); - } - } - } - - protected float spacing = 5; - public float Spacing { - get { return spacing; } - set { - if (value!=spacing) { - spacing = value; - UpdatePositions (); - } - } - } - - public ClutterWidgetBar (Actor[] actors) : base () - { - foreach (Actor actor in actors) { - this.Add (actor); - } - text = new CairoTexture ((uint) Width,(uint) Height); - this.Add (text); - - UpdatePositions (); - - this.ActorAdded += HandleActorAdded; - this.ActorRemoved += HandleActorRemoved; - } - - void HandleActorRemoved(object o, ActorRemovedArgs args) - { - UpdatePositions (); - } - - void HandleActorAdded(object o, ActorAddedArgs args) - { - UpdatePositions (); - } - - protected void UpdatePositions () - { - /* TODO: variable heights need to be handled */ - float x = marginX; float y = marginY; - text.Hide (); - foreach (Actor actor in this) { - if (actor!=text) { - actor.Hide (); - actor.SetPosition (x, y); - x += actor.Width + spacing; - actor.Show (); - } - } - - UpdateTexture (); - } - - protected void UpdateTexture () - { - text.SetSurfaceSize ((uint) (Width+MarginX),(uint) (Height+MarginY)); - text.Clear (); - Cairo.Context context = text.Create (); - - double lwidth = 1; - double hlwidth = lwidth*0.5; - double width = Width - lwidth; - double height = Height - lwidth; - double radius = Math.Min(marginX, marginY)*0.75; - - if ((radius > height / 2) || (radius > width / 2)) - radius = Math.Min(height / 2, width / 2); - - context.MoveTo (hlwidth, hlwidth + radius); - context.Arc (hlwidth + radius, hlwidth + radius, radius, Math.PI, -Math.PI / 2); - context.LineTo (hlwidth + width - radius, hlwidth); - context.Arc (hlwidth + width - radius, hlwidth + radius, radius, -Math.PI / 2, 0); - context.LineTo (hlwidth + width, hlwidth + height - radius); - context.Arc (hlwidth + width - radius, hlwidth + height - radius, radius, 0, Math.PI / 2); - context.LineTo (hlwidth + radius, hlwidth + height); - context.Arc (hlwidth + radius, hlwidth + height - radius, radius, Math.PI / 2, Math.PI); - context.ClosePath (); - - context.LineWidth = lwidth; - context.SetSourceRGB (1.0,1.0,1.0); - context.Stroke (); - - ((IDisposable) context.Target).Dispose (); - ((IDisposable) context).Dispose (); - } - } + public class ClutterWidgetBar : Group + { + + protected CairoTexture text; + + protected float marginX = 6; + public float MarginX { + get { return marginX; } + set { + if (value!=marginX) { + marginX = value; + UpdatePositions (); + } + } + } + + protected float marginY = 4; + public float MarginY { + get { return marginY; } + set { + if (value!=marginY) { + marginY = value; + UpdatePositions (); + } + } + } + + protected float spacing = 5; + public float Spacing { + get { return spacing; } + set { + if (value!=spacing) { + spacing = value; + UpdatePositions (); + } + } + } + + public ClutterWidgetBar (Actor[] actors) : base () + { + foreach (Actor actor in actors) { + this.Add (actor); + } + text = new CairoTexture ((uint) Width,(uint) Height); + this.Add (text); + + UpdatePositions (); + + this.ActorAdded += HandleActorAdded; + this.ActorRemoved += HandleActorRemoved; + } + + void HandleActorRemoved(object o, ActorRemovedArgs args) + { + UpdatePositions (); + } + + void HandleActorAdded(object o, ActorAddedArgs args) + { + UpdatePositions (); + } + + protected void UpdatePositions () + { + /* TODO: variable heights need to be handled */ + float x = marginX; float y = marginY; + text.Hide (); + foreach (Actor actor in this) { + if (actor!=text) { + actor.Hide (); + actor.SetPosition (x, y); + x += actor.Width + spacing; + actor.Show (); + } + } + + UpdateTexture (); + } + + protected void UpdateTexture () + { + text.SetSurfaceSize ((uint) (Width+MarginX),(uint) (Height+MarginY)); + text.Clear (); + Cairo.Context context = text.Create (); + + double lwidth = 1; + double hlwidth = lwidth*0.5; + double width = Width - lwidth; + double height = Height - lwidth; + double radius = Math.Min(marginX, marginY)*0.75; + + if ((radius > height / 2) || (radius > width / 2)) + radius = Math.Min(height / 2, width / 2); + + context.MoveTo (hlwidth, hlwidth + radius); + context.Arc (hlwidth + radius, hlwidth + radius, radius, Math.PI, -Math.PI / 2); + context.LineTo (hlwidth + width - radius, hlwidth); + context.Arc (hlwidth + width - radius, hlwidth + radius, radius, -Math.PI / 2, 0); + context.LineTo (hlwidth + width, hlwidth + height - radius); + context.Arc (hlwidth + width - radius, hlwidth + height - radius, radius, 0, Math.PI / 2); + context.LineTo (hlwidth + radius, hlwidth + height); + context.Arc (hlwidth + radius, hlwidth + height - radius, radius, Math.PI / 2, Math.PI); + context.ClosePath (); + + context.LineWidth = lwidth; + context.SetSourceRGB (1.0,1.0,1.0); + context.Stroke (); + + ((IDisposable) context.Target).Dispose (); + ((IDisposable) context).Dispose (); + } + + } } diff -Nru banshee-community-extensions-2.0.1/src/ClutterFlow/ClutterFlow/CoverCaption.cs banshee-community-extensions-2.2.0/src/ClutterFlow/ClutterFlow/CoverCaption.cs --- banshee-community-extensions-2.0.1/src/ClutterFlow/ClutterFlow/CoverCaption.cs 2010-12-16 19:12:52.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/ClutterFlow/ClutterFlow/CoverCaption.cs 2011-05-28 20:47:11.000000000 +0000 @@ -30,29 +30,29 @@ namespace ClutterFlow.Captions { - - - public class CoverCaption : Caption - { - #region Fields - protected string defaultValue = "Unkown Artist\nUnkown Album"; - public override string DefaultValue { - get { return defaultValue; } - set { - if (value!=defaultValue) { - if (Value==defaultValue) Value = value; - defaultValue = value; - } - } - } - #endregion - - public CoverCaption (CoverManager coverManager, string font_name, Color color) : base (coverManager, font_name, color) - { + + + public class CoverCaption : Caption + { + #region Fields + protected string defaultValue = "Unkown Artist\nUnkown Album"; + public override string DefaultValue { + get { return defaultValue; } + set { + if (value!=defaultValue) { + if (Value==defaultValue) Value = value; + defaultValue = value; + } + } + } + #endregion + + public CoverCaption (CoverManager coverManager, string font_name, Color color) : base (coverManager, font_name, color) + { CoverManager.NewCurrentCover += HandleNewCurrentCover; CoverManager.TargetIndexChanged += HandleTargetIndexChanged; CoverManager.CoversChanged += HandleCoversChanged; - } + } public override void Dispose () { @@ -63,50 +63,50 @@ base.Dispose (); } - #region Methods + #region Methods - public override void Update () - { - SetTextFromCover (CoverManager.CurrentCover); - base.Update (); - } - - public override void UpdatePosition () - { - if (Stage!=null) { - SetAnchorPoint (Width*0.5f, Height*0.5f); - SetPosition(CoverManager.Behaviour.CenterX, Math.Max(CoverManager.Behaviour.CenterY - CoverManager.Behaviour.CoverWidth, Height*0.6f)); - } - } + public override void Update () + { + SetTextFromCover (CoverManager.CurrentCover); + base.Update (); + } + + public override void UpdatePosition () + { + if (Stage!=null) { + SetAnchorPoint (Width*0.5f, Height*0.5f); + SetPosition(CoverManager.Behaviour.CenterX, Math.Max(CoverManager.Behaviour.CenterY - CoverManager.Behaviour.CoverWidth, Height*0.6f)); + } + } - protected void SetTextFromCover(ClutterFlowBaseActor cover) - { + protected void SetTextFromCover(ClutterFlowBaseActor cover) + { //Console.WriteLine ("SetTextFromCover called"); - if (cover!=null && cover.Label!="") - Value = cover.Label; - else - Value = DefaultValue; - } - #endregion - - #region Event Handling - protected virtual void HandleNewCurrentCover (ClutterFlowBaseActor cover, EventArgs e) - { - if (Opacity>0) FadeOut (); - Update (); - if (IsVisible) FadeIn (); - } - - protected virtual void HandleTargetIndexChanged (object sender, EventArgs e) - { - if (IsVisible) FadeOut (); - } - - protected virtual void HandleCoversChanged(object sender, EventArgs e) - { - Update (); - if (IsVisible) FadeIn (); - } - #endregion - } + if (cover!=null && cover.Label!="") + Value = cover.Label; + else + Value = DefaultValue; + } + #endregion + + #region Event Handling + protected virtual void HandleNewCurrentCover (ClutterFlowBaseActor cover, EventArgs e) + { + if (Opacity>0) FadeOut (); + Update (); + if (IsVisible) FadeIn (); + } + + protected virtual void HandleTargetIndexChanged (object sender, EventArgs e) + { + if (IsVisible) FadeOut (); + } + + protected virtual void HandleCoversChanged(object sender, EventArgs e) + { + Update (); + if (IsVisible) FadeIn (); + } + #endregion + } } diff -Nru banshee-community-extensions-2.0.1/src/ClutterFlow/ClutterFlow/CoverManager.cs banshee-community-extensions-2.2.0/src/ClutterFlow/ClutterFlow/CoverManager.cs --- banshee-community-extensions-2.0.1/src/ClutterFlow/ClutterFlow/CoverManager.cs 2011-03-27 16:02:46.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/ClutterFlow/ClutterFlow/CoverManager.cs 2011-09-06 19:19:17.000000000 +0000 @@ -36,193 +36,213 @@ namespace ClutterFlow { + public delegate void ActorEventHandler(T actor, EventArgs e) where T : ClutterFlowBaseActor; - public delegate void ActorEventHandler(T actor, EventArgs e) where T : ClutterFlowBaseActor; - - public class CoverManager : Clutter.Group { + public class CoverManager : Clutter.Group { #region Events - public event ActorEventHandler ActorActivated; - internal void InvokeActorActivated (ClutterFlowBaseActor cover) + public event ActorEventHandler ActorActivated; + internal void InvokeActorActivated (ClutterFlowBaseActor cover) { - if (ActorActivated!=null) ActorActivated (cover, EventArgs.Empty); - } - - public event ActorEventHandler NewCurrentCover; - protected void InvokeNewCurrentCover (ClutterFlowBaseActor cover) - { - if (NewCurrentCover!=null) NewCurrentCover(cover, EventArgs.Empty); - } - - public event EventHandler CoversChanged; - protected void InvokeCoversChanged () - { - if (CoversChanged!=null) CoversChanged(this, EventArgs.Empty); - } - - public event EventHandler TargetIndexChanged; - protected void InvokeTargetIndexChanged () - { - if (TargetIndexChanged!=null) TargetIndexChanged(this, EventArgs.Empty); - } - - public event EventHandler TextureSizeChanged; - protected void InvokeTextureSizeChanged () - { - //TODO use a timeout here, if the function is called mutliple times shortly after another, we don't get endless recalculation - if (TextureSizeChanged!=null) TextureSizeChanged (this, EventArgs.Empty); + var handler = ActorActivated; + if (handler != null) { + handler (cover, EventArgs.Empty); + } + } + + public event ActorEventHandler NewCurrentCover; + protected void InvokeNewCurrentCover (ClutterFlowBaseActor cover) + { + var handler = NewCurrentCover; + if (handler != null) { + handler (cover, EventArgs.Empty); + } + } + + public event EventHandler CoversChanged; + protected void InvokeCoversChanged () + { + var handler = CoversChanged; + if (handler != null) { + handler (this, EventArgs.Empty); + } + } + + public event EventHandler TargetIndexChanged; + protected void InvokeTargetIndexChanged () + { + var handler = TargetIndexChanged; + if (handler != null) { + handler (this, EventArgs.Empty); + } } public event EventHandler VisibleCoversChanged; protected void InvokeVisibleCoversChanged () - { - if (VisibleCoversChanged!=null) VisibleCoversChanged(this, EventArgs.Empty); + { + var handler = VisibleCoversChanged; + if (handler != null) { + handler (this, EventArgs.Empty); + } + } + + public event EventHandler LetterLookupChanged; + protected void InvokeLetterLookupChanged () + { + var handler = LetterLookupChanged; + if (handler != null) { + handler (this, EventArgs.Empty); + } } - - public event EventHandler LetterLookupChanged; - protected void InvokeLetterLookupChanged () - { - if (LetterLookupChanged!=null) LetterLookupChanged(this, EventArgs.Empty);; - } #endregion #region Fields - protected ClutterFlowTimeline timeline; - public ClutterFlowTimeline Timeline { - get { - if (timeline==null) { + private static TextureHolder texture_holder; + public static TextureHolder TextureHolder { + get { return texture_holder; } + } + + protected ClutterFlowTimeline timeline; + public ClutterFlowTimeline Timeline { + get { + if (timeline == null) { timeline = new ClutterFlowTimeline(this); timeline.TargetMarkerReached += HandleTargetMarkerReached; } - return timeline; - } - } - - protected IActorLoader actorLoader; //Loads the actors (detaches ClutterFlow from Banshee related dependencies) - public IActorLoader ActorLoader { - get { return actorLoader; } - internal set { actorLoader = value; } - } - - public Dictionary letter_lookup; - public Dictionary LetterLookup { - get { return letter_lookup; } - } - - public void ResetLetterLookup () { - letter_lookup = new Dictionary(); - foreach (AlphabetChars key in Enum.GetValues(typeof(AlphabetChars))) - letter_lookup.Add(key, -1); - } - public void UpdateLetterLookup (ClutterFlowBaseActor actor) { - string label = actor.SortLabel.ToUpper ().Normalize (System.Text.NormalizationForm.FormKD); - char letter = label.Length>0 ? char.Parse(label.Substring (0,1)) : '?'; + return timeline; + } + } + + protected IActorLoader actor_loader; //Loads the actors (detaches ClutterFlow from Banshee related dependencies) + public IActorLoader ActorLoader { + get { return actor_loader; } + } + + public Dictionary letter_lookup; + public Dictionary LetterLookup { + get { return letter_lookup; } + } + + public void ResetLetterLookup () { + letter_lookup = new Dictionary(); + foreach (AlphabetChars key in Enum.GetValues(typeof(AlphabetChars))) + letter_lookup.Add(key, -1); + } + public void UpdateLetterLookup (ClutterFlowBaseActor actor) { + string label = actor.SortLabel.ToUpper ().Normalize (System.Text.NormalizationForm.FormKD); + char letter = label.Length>0 ? char.Parse(label.Substring (0,1)) : '?'; AlphabetChars key; - if (char.IsLetter(letter)) - key = (AlphabetChars) letter; - else - key = AlphabetChars.unknown; - if (letter_lookup.ContainsKey (key) && letter_lookup[key] == -1) - letter_lookup[key] = actor.Index; - } - - protected FlowBehaviour behaviour; - public FlowBehaviour Behaviour { - get { return behaviour; } - } + if (char.IsLetter(letter)) + key = (AlphabetChars) letter; + else + key = AlphabetChars.unknown; + if (letter_lookup.ContainsKey (key) && letter_lookup[key] == -1) + letter_lookup[key] = actor.Index; + } + + protected FlowBehaviour behaviour; + public FlowBehaviour Behaviour { + get { return behaviour; } + } #endregion #region Cover-related fields - protected int textureSize = 128; - public int TextureSize { - get { return textureSize; } - set { - if (textureSize!=value) { - textureSize = value; - InvokeTextureSizeChanged (); - } - } - } - - protected int visibleCovers = 17; - public int VisibleCovers { - get { return visibleCovers; } - set { - if (value!=visibleCovers) { - visibleCovers = value; + protected int texture_size; + public int TextureSize { + get { return texture_size; } + set { texture_size = value; } + } + + protected int visibleCovers = 17; + public int VisibleCovers { + get { return visibleCovers; } + set { + if (value != visibleCovers) { + visibleCovers = value; InvokeVisibleCoversChanged (); - } - } - } - public int HalfVisCovers { - get { return (int) ((visibleCovers-1) * 0.5); } - } + } + } + } + public int HalfVisCovers { + get { return (int) ((visibleCovers-1) * 0.5); } + } #endregion #region Animation duration limits - protected static uint maxAnimationSpan = 250; //maximal length of a single step in the animations in ms - public static uint MaxAnimationSpan { - get { return maxAnimationSpan; } - } - - protected static uint minAnimationSpan = 10; //minimal length of a single step in the animations in ms - public static uint MinAnimationSpan { - get { return minAnimationSpan; } - } - - protected static uint doubleClickTime = 200; - public static uint DoubleClickTime { - get { return doubleClickTime; } - set { doubleClickTime = value; } - } + protected static uint maxAnimationSpan = 250; //maximal length of a single step in the animations in ms + public static uint MaxAnimationSpan { + get { return maxAnimationSpan; } + } + + protected static uint minAnimationSpan = 10; //minimal length of a single step in the animations in ms + public static uint MinAnimationSpan { + get { return minAnimationSpan; } + } + + protected static uint doubleClickTime = 200; + public static uint DoubleClickTime { + get { return doubleClickTime; } + set { doubleClickTime = value; } + } #endregion #region Target/Current index handling - private int target_index = 0; // curent targetted cover index - public int TargetIndex { - get { return target_index; } - set { - if (value >= TotalCovers) value = TotalCovers-1; - if (value < 0) value = 0; - if (value!=target_index) { + private int target_index = 0; // curent targetted cover index + public int TargetIndex { + get { return target_index; } + set { + if (value >= TotalCovers) { + value = TotalCovers - 1; + } + if (value < 0) { + value = 0; + } + if (value != target_index) { //Console.WriteLine ("TargetIndex_set to " + value); target_index = value; - current_cover = null; //to prevent clicks to load the old centered cover! + // To prevent clicks to load the old centered cover! + current_cover = null; InvokeTargetIndexChanged(); - } - } - } - - public ClutterFlowBaseActor TargetActor { - get { - if (covers.Count > TargetIndex) - return covers[TargetIndex]; - else - return null; - } - } + } + } + } + + public ClutterFlowBaseActor TargetActor { + get { + if (covers.Count > TargetIndex) + return covers[TargetIndex]; + else + return null; + } + } protected ClutterFlowFixedActor empty_actor; public ClutterFlowFixedActor EmptyActor { get { - if (empty_actor==null) - empty_actor = new ClutterFlowFixedActor (this); + if (empty_actor == null) + empty_actor = new ClutterFlowFixedActor ((uint)behaviour.CoverWidth); return empty_actor; } } - internal List covers; // list with cover actors - public int TotalCovers { // number of covers or zero if null + // list with cover actors + private List covers; + public List Covers { + get { return covers; } + } + + public int TotalCovers { get { return (covers != null) ? covers.Count : 0; } } - private ClutterFlowBaseActor current_cover = null; // currently centered cover + // currently centered cover + private ClutterFlowBaseActor current_cover = null; public ClutterFlowBaseActor CurrentCover { get { return current_cover; } set { - if (value!=current_cover) { + if (value != current_cover) { current_cover = value; InvokeNewCurrentCover (current_cover); } @@ -230,17 +250,20 @@ } #endregion - protected bool needs_reloading = false; - public bool NeedsReloading { - get { return needs_reloading; } - internal set { needs_reloading = value; } - } + protected bool needs_reloading = false; + public bool NeedsReloading { + get { return needs_reloading; } + internal set { needs_reloading = value; } + } #region Initialisation - public CoverManager () : base () - { - behaviour = new FlowBehaviour (this); - } + public CoverManager (IActorLoader actor_loader, GetDefaultSurface get_default_surface, int texture_size) : base () + { + this.actor_loader = actor_loader; + this.texture_size = texture_size; + behaviour = new FlowBehaviour (this); + texture_holder = new TextureHolder (texture_size, get_default_surface); + } public override void Dispose () { @@ -248,8 +271,7 @@ GLib.Source.Remove (reload_timeout); } - ActorLoader.Dispose (); - Behaviour.Dispose (); + behaviour.Dispose (); timeline.Dispose (); covers.Clear (); @@ -266,97 +288,115 @@ }*/ - public void UpdateBehaviour () - { - if (behaviour!=null && Stage!=null) { - behaviour.Height = Stage.Height; - behaviour.Width = Stage.Width; - //Console.WriteLine ("behaviour.CoverWidth = " + behaviour.CoverWidth + "behaviour.Height = " + behaviour.Height + " behaviour.Width = " + behaviour.Width); - } - } - - void HandleTargetMarkerReached(object sender, TargetReachedEventArgs args) - { - if (args.Target==TargetIndex) { - if (covers.Count > args.Target) + public void UpdateBehaviour () + { + if (behaviour != null && Stage != null) { + behaviour.Height = Stage.Height; + behaviour.Width = Stage.Width; + //Console.WriteLine ("behaviour.CoverWidth = " + behaviour.CoverWidth + "behaviour.Height = " + behaviour.Height + " behaviour.Width = " + behaviour.Width); + } + } + + void HandleTargetMarkerReached(object sender, TargetReachedEventArgs args) + { + if (args.Target==TargetIndex) { + if (covers.Count > args.Target) { CurrentCover = covers[(int) args.Target]; - else + } else { CurrentCover = null; - } - } - - private uint reload_timeout = 0; - internal void ReloadCovers () - { - if (reload_timeout > 0) - GLib.Source.Remove(reload_timeout); - reload_timeout = GLib.Timeout.Add (MaxAnimationSpan, new GLib.TimeoutHandler (reload_covers)); - } - - private bool reload_covers () - { - if (Timeline!=null) Timeline.Pause (); - HideAll (); Show (); - if (covers!=null && covers.Count!=0) { - Console.WriteLine("Reloading Covers"); - - int old_target_index = CurrentCover!=null ? covers.IndexOf (CurrentCover) : 0; // the old current index - int new_target_index = 0; // the newly calculated index - bool keep_current = false; // wether or not to keep the current cover centered - - List old_covers = new List(SafeGetRange(covers, old_target_index - HalfVisCovers - 1, visibleCovers + 2)); - foreach (ClutterFlowBaseActor actor in covers) { - if (actor.Data.ContainsKey ("isOldCover")) actor.Data.Remove ("isOldCover"); + } + } + } + + private uint reload_timeout = 0; + public void ReloadCovers () + { + if (reload_timeout > 0) { + GLib.Source.Remove(reload_timeout); + } + reload_timeout = GLib.Timeout.Add (MaxAnimationSpan, new GLib.TimeoutHandler (reload_covers)); + } + + private bool reload_covers () + { + if (Timeline != null) { + Timeline.Pause (); + } + HideAll (); + Show (); + if (covers != null && covers.Count != 0) { + Console.WriteLine("ClutterFlow - Reloading Covers"); + + // the old current index + int old_target_index = CurrentCover!=null ? covers.IndexOf (CurrentCover) : 0; + // the newly calculated index + int new_target_index = 0; + // whether or not to keep the current cover centered + bool keep_current = false; + + List old_covers = new List ( + SafeGetRange (covers, old_target_index - HalfVisCovers - 1, visibleCovers + 2)); + foreach (ClutterFlowBaseActor actor in covers) { + if (actor.Data.ContainsKey ("isOldCover")) { + actor.Data.Remove ("isOldCover"); + } actor.Index = -1; - if (old_covers.Contains (actor)) + if (old_covers.Contains (actor)) { actor.Data.Add ("isOldCover", true); - } + } + } - ResetLetterLookup (); + ResetLetterLookup (); List persistent_covers = new List(); - - covers = new List(actorLoader.GetActors (delegate (ClutterFlowBaseActor actor) { - if (actor.Data.ContainsKey ("isOldCover")) + + covers = actor_loader.GetActors (this); + covers.ForEach (delegate (ClutterFlowBaseActor actor) { + if (actor.Data.ContainsKey ("isOldCover")) { persistent_covers.Add (actor); - if (CurrentCover==actor) keep_current = true; - - UpdateLetterLookup (actor); - })); - InvokeLetterLookupChanged (); - - if (covers.Count==0) { + } + if (CurrentCover==actor) { + keep_current = true; + } + + UpdateLetterLookup (actor); + }); + InvokeLetterLookupChanged (); + + if (covers.Count == 0) { InstallEmptyActor (); - if (old_covers.Contains(EmptyActor)) { - EmptyActor.Show (); - return false; - } - keep_current = true; + if (old_covers.Contains (EmptyActor)) { + EmptyActor.Show (); + return false; + } + keep_current = true; } - //recalculate timeline progression and the target index - if (covers.Count > 1) { - if (keep_current) - new_target_index = CurrentCover.Index; - else { - if (persistent_covers.Count==0) + //recalculate timeline progression and the target index + if (covers.Count > 1) { + if (keep_current) { + new_target_index = CurrentCover.Index; + } else { + if (persistent_covers.Count==0) { new_target_index = (int) Math.Round(Timeline.Progress * (covers.Count-1)); - else if (persistent_covers.Count==1) + } else if (persistent_covers.Count==1) { new_target_index = persistent_covers[0].Index; - else + } else { new_target_index = persistent_covers[(int) (((float) persistent_covers.Count * 0.5f) - 1.0f)].Index; + } } - } + } TargetIndex = new_target_index; Timeline.JumpToTarget (); //Console.WriteLine ("Timeline progress set to " + Timeline.Progress + " Timeline.RelativeTarget is " + Timeline.RelativeTarget); List truly_pers = new List (); - List new_covers = new List(SafeGetRange(covers, new_target_index - HalfVisCovers - 1, visibleCovers + 2)); + List new_covers = new List(SafeGetRange(covers, new_target_index - HalfVisCovers - 1, visibleCovers + 2)); foreach (ClutterFlowBaseActor actor in persistent_covers) { - if (actor!=null) { - if (actor.Data.ContainsKey ("isOldCover")) + if (actor != null) { + if (actor.Data.ContainsKey ("isOldCover")) { actor.Data.Remove ("isOldCover"); + } if (new_covers.Contains (actor)) { truly_pers.Add (actor); new_covers.Remove (actor); @@ -366,7 +406,9 @@ } } foreach (ClutterFlowBaseActor actor in old_covers) { - if (actor!=null) actor.Data.Remove ("isOldCover"); + if (actor != null) { + actor.Data.Remove ("isOldCover"); + } } /*Console.WriteLine ("old_covers contains " + old_covers.Count + " elements:"); @@ -385,24 +427,25 @@ }; Behaviour.FadeCoversInAndOut (old_covers, truly_pers, new_covers, update_target); - } else { - //Console.WriteLine("Loading Covers"); - ResetLetterLookup (); - covers = actorLoader.GetActors (UpdateLetterLookup); - InvokeLetterLookupChanged (); + } else { + Console.WriteLine("ClutterFlow - Loading Covers"); + ResetLetterLookup (); + covers = actor_loader.GetActors (this); + covers.ForEach (UpdateLetterLookup); + InvokeLetterLookupChanged (); TargetIndex = 0; Timeline.JumpToTarget (); if (covers==null || covers.Count==0) { InstallEmptyActor (); - Behaviour.UpdateActors (); + Behaviour.UpdateActors (); Behaviour.FadeInActor (EmptyActor); } Timeline.Play (); - InvokeCoversChanged (); - } - - return false; - } + InvokeCoversChanged (); + } + + return false; + } private void InstallEmptyActor () { @@ -410,36 +453,28 @@ covers.Add (EmptyActor); CurrentCover = EmptyActor; } - - private IEnumerable SafeGetRange(List list, int index, int count) { - for (int i = index; i < index + count; i++) { - ClutterFlowBaseActor cover; - try { - cover = list[i]; - if (cover==null) throw new NullReferenceException(); - } catch { + private IEnumerable SafeGetRange (List list, int index, int count) { + for (int i = index; i < index + count; i++) { + ClutterFlowBaseActor cover = null; + if (i >= 0 && i < list.Count) { + cover = list[i]; + } + if (cover == null) { continue; - } + } yield return cover; - } - yield break; - } - - public void ForSomeCovers(System.Action method_call, int lBound, int uBound) { - if (covers!=null && lBound <= uBound && lBound >= 0 && uBound < covers.Count) { - IEnumerator enumerator = covers.GetRange(lBound, uBound-lBound + 1).GetEnumerator(); - while (enumerator.MoveNext()) - method_call(enumerator.Current); - } - } - - public void ForEachCover(System.Action method_call) { - if (covers!=null) { - IEnumerator enumerator = covers.GetEnumerator(); - while (enumerator.MoveNext()) - method_call(enumerator.Current); - } - } - } -} \ No newline at end of file + } + yield break; + } + + public void ForSomeCovers (System.Action method_call, int lBound, int uBound) { + if (covers != null && lBound <= uBound && lBound >= 0 && uBound < covers.Count) { + IEnumerator enumerator = covers.GetRange(lBound, uBound-lBound + 1).GetEnumerator(); + while (enumerator.MoveNext()) { + method_call(enumerator.Current); + } + } + } + } +} diff -Nru banshee-community-extensions-2.0.1/src/ClutterFlow/ClutterFlow/FlowBehaviour.cs banshee-community-extensions-2.2.0/src/ClutterFlow/ClutterFlow/FlowBehaviour.cs --- banshee-community-extensions-2.0.1/src/ClutterFlow/ClutterFlow/FlowBehaviour.cs 2010-12-16 18:53:11.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/ClutterFlow/ClutterFlow/FlowBehaviour.cs 2011-05-30 19:06:52.000000000 +0000 @@ -32,87 +32,87 @@ namespace ClutterFlow { - public class FlowBehaviour : IDisposable { - - #region Fields - private int zFar = 50; - public int ZFar { - get { return zFar; } - set { - if (value!=zFar) { - zFar = value; - UpdateActors(); - } - } - } - private int zNear = 100; - public int ZNear { - get { return zNear; } - set { - if (value!=zNear) { - zNear = value; - UpdateActors (); - } - } - } - - protected int OffsetZNear = 0; - - protected double rotationAngle = 60; - public double RotationAngle { - get { return rotationAngle; } - set { - if (value!=rotationAngle) { - rotationAngle = value; - UpdateActors (); - } - } - } - - protected float OffsetRotationAngle = 0; - - protected float width = 450; - public float Width { - get { return width; } - set { - if (value!=width) { - width = value; - centerX = value*0.5f; - UpdateCoverWidth (); - UpdateXStepAndSideWidth (); - UpdateActors (); - } - } - } - - protected float height = 200; - public float Height { - get { return height; } - set { - if (value!=height) { - height = value; - centerY = value*0.45f; - UpdateCoverWidth (); - UpdateXStepAndSideWidth (); - UpdateActors (); - } - } - } - - protected float centerY = 100; - public float CenterY { - get { return centerY; } - } - - protected float OffsetCenterX = 0; - protected float centerX = 225; - public float CenterX { - get { return centerX; } - } - - private float CoverCount { - get { return coverManager.VisibleCovers; } - } + public class FlowBehaviour : IDisposable { + + #region Fields + private int zFar = 50; + public int ZFar { + get { return zFar; } + set { + if (value!=zFar) { + zFar = value; + UpdateActors(); + } + } + } + private int zNear = 100; + public int ZNear { + get { return zNear; } + set { + if (value!=zNear) { + zNear = value; + UpdateActors (); + } + } + } + + protected int OffsetZNear = 0; + + protected double rotationAngle = 60; + public double RotationAngle { + get { return rotationAngle; } + set { + if (value!=rotationAngle) { + rotationAngle = value; + UpdateActors (); + } + } + } + + protected float OffsetRotationAngle = 0; + + protected float width = 450; + public float Width { + get { return width; } + set { + if (value!=width) { + width = value; + centerX = value*0.5f; + UpdateCoverWidth (); + UpdateXStepAndSideWidth (); + UpdateActors (); + } + } + } + + protected float height = 200; + public float Height { + get { return height; } + set { + if (value!=height) { + height = value; + centerY = value*0.45f; + UpdateCoverWidth (); + UpdateXStepAndSideWidth (); + UpdateActors (); + } + } + } + + protected float centerY = 100; + public float CenterY { + get { return centerY; } + } + + protected float OffsetCenterX = 0; + protected float centerX = 225; + public float CenterX { + get { return centerX; } + } + + private float CoverCount { + get { return coverManager.VisibleCovers; } + } /*protected List visible_actors = new List (); public List VisibleActors { @@ -123,90 +123,90 @@ get { return (transition_score!=null && transition_score.IsPlaying); } } - public bool HoldUpdates { - get { return CoverManager.Timeline.IsPaused || TransitionAnimationBusy || transition_queue.Count > 0; } - } - - protected void UpdateXStepAndSideWidth () - { - SideMargin = CoverWidth*0.5f; - XStep = (Width - CenterWidth - SideMargin) / CoverCount; - SideWidth = Width*0.5f - (CenterMargin+XStep+SideMargin); - if (SideWidth>CoverWidth) { - SideMargin += SideWidth-CoverWidth; - XStep = (Width - CenterWidth - SideMargin) / CoverCount; - SideWidth = Width*0.5f - (CenterMargin+XStep+SideMargin); - } - } - - protected float coverWidth = 100; - protected float CenterMargin = 75; - protected float SideMargin = 50; - protected float CenterWidth = 150; - protected float XStep = 20; - protected float SideWidth = 100; - public float CoverWidth { - get { return coverWidth; } - protected set { - if (value!=coverWidth) { - coverWidth = value; - CenterMargin = value*0.75f; - CenterWidth = CenterMargin*2; - } - } - } - - protected int maxCoverWidth = 256; - public int MaxCoverWidth { - get { return maxCoverWidth; } - set { - if (maxCoverWidth!=value) { - maxCoverWidth = value; - UpdateCoverWidth (); //TODO use a timeout instead. Multiple update calls may cause slowdowns? - } - } - } - - protected int minCoverWidth = 64; - public int MinCoverWidth { - get { return minCoverWidth; } - set { - if (minCoverWidth!=value) { - minCoverWidth = value; - UpdateCoverWidth (); //TODO use a timeout instead. Multiple update calls may cause slowdowns? - } - } - } - - public void UpdateCoverWidth () - { - CoverWidth = Math.Max(Math.Min(Height*0.5f, maxCoverWidth), minCoverWidth);; - } - - protected float AlphaStep { - get { return 1 / CoverCount; } - } - - protected double previous_progress = 0.0; - protected int pcb = -1; protected int plb; protected int pub; - protected double Progress { - get { return coverManager.Timeline.Progress; } - } - - private CoverManager coverManager; - public CoverManager CoverManager { - get { return coverManager; } - } - #endregion + public bool HoldUpdates { + get { return CoverManager.Timeline.IsPaused || TransitionAnimationBusy || transition_queue.Count > 0; } + } + + protected void UpdateXStepAndSideWidth () + { + SideMargin = CoverWidth*0.5f; + XStep = (Width - CenterWidth - SideMargin) / CoverCount; + SideWidth = Width*0.5f - (CenterMargin+XStep+SideMargin); + if (SideWidth>CoverWidth) { + SideMargin += SideWidth-CoverWidth; + XStep = (Width - CenterWidth - SideMargin) / CoverCount; + SideWidth = Width*0.5f - (CenterMargin+XStep+SideMargin); + } + } + + protected float coverWidth = 100; + protected float CenterMargin = 75; + protected float SideMargin = 50; + protected float CenterWidth = 150; + protected float XStep = 20; + protected float SideWidth = 100; + public float CoverWidth { + get { return coverWidth; } + protected set { + if (value!=coverWidth) { + coverWidth = value; + CenterMargin = value*0.75f; + CenterWidth = CenterMargin*2; + } + } + } + + protected int maxCoverWidth = 256; + public int MaxCoverWidth { + get { return maxCoverWidth; } + set { + if (maxCoverWidth!=value) { + maxCoverWidth = value; + UpdateCoverWidth (); //TODO use a timeout instead. Multiple update calls may cause slowdowns? + } + } + } + + protected int minCoverWidth = 64; + public int MinCoverWidth { + get { return minCoverWidth; } + set { + if (minCoverWidth!=value) { + minCoverWidth = value; + UpdateCoverWidth (); //TODO use a timeout instead. Multiple update calls may cause slowdowns? + } + } + } + + public void UpdateCoverWidth () + { + CoverWidth = Math.Max(Math.Min(Height*0.5f, maxCoverWidth), minCoverWidth); + } + + protected float AlphaStep { + get { return 1 / CoverCount; } + } + + protected double previous_progress = 0.0; + protected int pcb = -1; protected int plb; protected int pub; + protected double Progress { + get { return coverManager.Timeline.Progress; } + } + + private CoverManager coverManager; + public CoverManager CoverManager { + get { return coverManager; } + } + #endregion #region Initialisation - public FlowBehaviour (CoverManager coverManager) - { - this.coverManager = coverManager; + public FlowBehaviour (CoverManager coverManager) + { + this.coverManager = coverManager; CoverManager.VisibleCoversChanged += HandleVisibleCoversChanged; CoverManager.TargetIndexChanged += HandleTargetIndexChanged; CoverManager.Timeline.NewFrame += HandleNewFrame; - } + } public virtual void Dispose () { @@ -214,164 +214,175 @@ CoverManager.TargetIndexChanged -= HandleTargetIndexChanged; CoverManager.Timeline.NewFrame -= HandleNewFrame; - if (fadeInAnim!=null) { + if (fadeInAnim != null) { fadeInAnim.CompleteAnimation (); fadeInAnim = null; } - if (fadeOutAnim!=null) { + if (fadeOutAnim != null) { fadeOutAnim.CompleteAnimation (); fadeOutAnim = null; } } #endregion - #region Event Handling - void HandleNewFrame (object sender, NewFrameEventArgs e) - { - UpdateActors (); - } - - void HandleTargetIndexChanged (object sender, EventArgs e) - { - UpdateActors (); - } - - protected void HandleVisibleCoversChanged (object o, EventArgs args) - { - UpdateActors (); - } - #endregion - - #region Actor Handling (animation) - - public void UpdateActors () - { - if (!HoldUpdates && coverManager.IsVisible) { - //only update covers that were visible at the previous & current progress: - - double current_progress = Progress; - int ccb = Math.Min (coverManager.TotalCovers-1, Math.Max (0, (int) (current_progress * (CoverManager.TotalCovers-1)))); - int clb = Math.Min (coverManager.TotalCovers-1, Math.Max (0, (int) (ccb - (CoverManager.HalfVisCovers + 1)))); - int cub = Math.Min (coverManager.TotalCovers-1, Math.Max (0, (int) (ccb + (CoverManager.HalfVisCovers + 1)))); - - if (pcb==-1) { - pcb = Math.Min (coverManager.TotalCovers-1, Math.Max (0, (int) (previous_progress * (CoverManager.TotalCovers-1)))); - plb = Math.Min (coverManager.TotalCovers-1, Math.Max (0, (int) (pcb - (CoverManager.HalfVisCovers + 1)))); - pub = Math.Min (coverManager.TotalCovers-1, Math.Max (0, (int) (pcb + (CoverManager.HalfVisCovers + 1)))); - } - - if (ccbpcb) - CoverManager.ForSomeCovers (HideActor, plb, clb); - - CoverManager.ForSomeCovers (UpdateActor, clb, cub); - CoverManager.SortDepthOrder (); - - previous_progress = current_progress; - pcb = ccb; - plb = clb; - pub = cub; - } - } - protected void SetPreviousBounds (double progress) + #region Event Handling + void HandleNewFrame (object sender, NewFrameEventArgs e) + { + UpdateActors (); + } + + void HandleTargetIndexChanged (object sender, EventArgs e) + { + UpdateActors (); + } + + protected void HandleVisibleCoversChanged (object o, EventArgs args) + { + UpdateActors (); + } + #endregion + + #region Actor Handling (animation) + + public void UpdateActors () + { + if (!HoldUpdates && coverManager.IsVisible) { + //only update covers that were visible at the previous & current progress: + + double current_progress = Progress; + int ccb = Math.Min (coverManager.TotalCovers-1, Math.Max (0, (int) (current_progress * (CoverManager.TotalCovers-1)))); + int clb = Math.Min (coverManager.TotalCovers-1, Math.Max (0, (int) (ccb - (CoverManager.HalfVisCovers + 1)))); + int cub = Math.Min (coverManager.TotalCovers-1, Math.Max (0, (int) (ccb + (CoverManager.HalfVisCovers + 1)))); + + if (pcb==-1) { + pcb = Math.Min (coverManager.TotalCovers-1, Math.Max (0, (int) (previous_progress * (CoverManager.TotalCovers-1)))); + plb = Math.Min (coverManager.TotalCovers-1, Math.Max (0, (int) (pcb - (CoverManager.HalfVisCovers + 1)))); + pub = Math.Min (coverManager.TotalCovers-1, Math.Max (0, (int) (pcb + (CoverManager.HalfVisCovers + 1)))); + } + + if (ccb < pcb) { + CoverManager.ForSomeCovers (HideActor, cub, pub); + } else if (ccb>pcb) { + CoverManager.ForSomeCovers (HideActor, plb, clb); + } + + CoverManager.ForSomeCovers (UpdateActor, clb, cub); + CoverManager.SortDepthOrder (); + + previous_progress = current_progress; + pcb = ccb; + plb = clb; + pub = cub; + } + } + protected void SetPreviousBounds (double progress) { pcb = Math.Min (coverManager.TotalCovers-1, Math.Max (0, (int) (progress * (CoverManager.TotalCovers-1)))); plb = Math.Min (coverManager.TotalCovers-1, Math.Max (0, (int) (pcb - (CoverManager.HalfVisCovers + 1)))); pub = Math.Min (coverManager.TotalCovers-1, Math.Max (0, (int) (pcb + (CoverManager.HalfVisCovers + 1)))); } - protected void HideActor (ClutterFlowBaseActor actor) - { - actor.Hide (); - } - - protected void UpdateActor (ClutterFlowBaseActor actor) - { - UpdateActor (actor, Progress); - } - - protected void UpdateActor (ClutterFlowBaseActor actor, double progress) - { - UpdateActorWithAlpha (actor, AlphaFunc(actor)); + protected void HideActor (ClutterFlowBaseActor actor) + { + actor.Hide (); + } + + protected void UpdateActor (ClutterFlowBaseActor actor) + { + UpdateActor (actor, Progress); + } - } + protected void UpdateActor (ClutterFlowBaseActor actor, double progress) + { + UpdateActorWithAlpha (actor, AlphaFunc(actor)); + + } protected double AlphaFunc (ClutterFlowBaseActor actor) { - return AlphaFunc (actor, CoverManager.Timeline.Progress); + return AlphaFunc (actor, CoverManager.Timeline.Progress); } - protected double AlphaFunc (ClutterFlowBaseActor actor, double progress) { - - if (actor.Index < 0) + protected double AlphaFunc (ClutterFlowBaseActor actor, double progress) { + + if (actor.Index < 0) { actor.Data["last_alpha"] = (double) 0; - else { - double previous_alpha = (CoverManager.HalfVisCovers - (CoverManager.TotalCovers-1) + } else { + double previous_alpha = (CoverManager.HalfVisCovers - (CoverManager.TotalCovers-1) * progress + actor.Index) / (CoverManager.VisibleCovers-1); - if (previous_alpha<0) previous_alpha=0; - if (previous_alpha>1) previous_alpha=1; + if (previous_alpha<0) { + previous_alpha=0; + } + if (previous_alpha>1) { + previous_alpha=1; + } actor.Data["last_alpha"] = previous_alpha; } return (double) actor.Data["last_alpha"]; - } + } + + protected void UpdateActorWithAlpha (ClutterFlowBaseActor actor, double alpha) { + + float ratio = Math.Min (0.75f * (float) coverManager.Timeline.Delta / (float) coverManager.VisibleCovers, 1.25f); + OffsetRotationAngle = (float) ((rotationAngle / 5) * ratio); + OffsetCenterX = -(float) ((CenterMargin / 2) * ratio); + OffsetZNear = (int) (-(ZNear-ZFar) * 1.5 * ratio); + if (coverManager.Timeline.Direction!=TimelineDirection.Forward) { + OffsetRotationAngle = -OffsetRotationAngle; + OffsetCenterX = -OffsetCenterX; + } - protected void UpdateActorWithAlpha (ClutterFlowBaseActor actor, double alpha) { - - float ratio = Math.Min (0.75f * (float) coverManager.Timeline.Delta / (float) coverManager.VisibleCovers, 1.25f); - OffsetRotationAngle = (float) ((rotationAngle / 5) * ratio); - OffsetCenterX = -(float) ((CenterMargin / 2) * ratio); - OffsetZNear = (int) (-(ZNear-ZFar) * 1.5 * ratio); - if (coverManager.Timeline.Direction!=TimelineDirection.Forward) { - OffsetRotationAngle = -OffsetRotationAngle; - OffsetCenterX = -OffsetCenterX; - } - - actor.SetScale (coverWidth/actor.Width, coverWidth/actor.Width); - if (alpha!=0 || alpha!=1) { + actor.SetScale (coverWidth/actor.Width, coverWidth/actor.Width); + if (alpha!=0 || alpha!=1) { //if (!visible_actors.Contains (actor)) visible_actors.Add (actor); - actor.Show (); - if (alpha=AlphaStep && alpha<=0.5-AlphaStep) { - MoveActorSideways (actor, (float) ((alpha - AlphaStep) / (0.5f - 2*AlphaStep)), true); - } else if (alpha>0.5f-AlphaStep && alpha<0.5f+AlphaStep) { - MoveAndRotateActorCentrally (actor, (float) ((alpha - 0.5f) / AlphaStep)); - } else if (alpha>=0.5f+AlphaStep && alpha<=1-AlphaStep) { - MoveActorSideways (actor, (float) ((1 - AlphaStep - alpha) / (0.5f - 2*AlphaStep)), false); - } else if (alpha>1-AlphaStep) { - MoveAndFadeOutActor (actor, (float) ((1 - alpha) / AlphaStep), false); - } - } else { + actor.Show (); + if (alpha=AlphaStep && alpha<=0.5-AlphaStep) { + MoveActorSideways (actor, (float) ((alpha - AlphaStep) / (0.5f - 2*AlphaStep)), true); + } else if (alpha>0.5f-AlphaStep && alpha<0.5f+AlphaStep) { + MoveAndRotateActorCentrally (actor, (float) ((alpha - 0.5f) / AlphaStep)); + } else if (alpha>=0.5f+AlphaStep && alpha<=1-AlphaStep) { + MoveActorSideways (actor, (float) ((1 - AlphaStep - alpha) / (0.5f - 2*AlphaStep)), false); + } else if (alpha>1-AlphaStep) { + MoveAndFadeOutActor (actor, (float) ((1 - alpha) / AlphaStep), false); + } + } else { //if (visible_actors.Contains (actor)) visible_actors.Remove (actor); actor.Hide (); } - } - - private void MoveAndFadeOutActor (Actor actor, float progress, bool left) - { - actor.SetPosition ((left ? 0 : Width) + (SideMargin + progress * XStep)*(left ? 1 : -1), CenterY); - actor.Depth = zFar - 3 + progress; - actor.SetRotation (Clutter.RotateAxis.Y, (left ? 1 : -1) * rotationAngle + OffsetRotationAngle, 0, 0, 0); - actor.Opacity = (byte) (progress * 223); - if (actor is ClutterFlowActor) (actor as ClutterFlowActor).SetShade (255, left); - } - - private void MoveActorSideways (Actor actor, float progress, bool left) - { - actor.SetPosition (CenterX + OffsetCenterX - (left ? 1 : -1) * ((1-progress)*(SideWidth + OffsetCenterX*(left ? 1 : -1)) + CenterMargin), CenterY); - actor.Depth = zFar - 2 + progress; - actor.SetRotation (Clutter.RotateAxis.Y, (left ? 1 : -1) * rotationAngle + OffsetRotationAngle, 0, 0, 0); - actor.Opacity = (byte) (255 - (1-progress)*32); - if (actor is ClutterFlowActor) (actor as ClutterFlowActor).SetShade (255, left); - } - - private void MoveAndRotateActorCentrally (Actor actor, float progress) - { - actor.SetPosition ((float) (CenterX + OffsetCenterX + CenterMargin*progress), CenterY); - actor.Depth = (float) (zFar + (zNear + OffsetZNear - zFar ) * (1 - Math.Abs(progress))); - actor.SetRotation (Clutter.RotateAxis.Y, -progress * rotationAngle + OffsetRotationAngle, 0, 0, 0); - actor.Opacity = 255; - if (actor is ClutterFlowActor) (actor as ClutterFlowActor).SetShade ((byte) Math.Abs(255*progress), (progress < 0)); - } + } + + private void MoveAndFadeOutActor (Actor actor, float progress, bool left) + { + actor.SetPosition ((left ? 0 : Width) + (SideMargin + progress * XStep)*(left ? 1 : -1), CenterY); + actor.Depth = zFar - 3 + progress; + actor.SetRotation (Clutter.RotateAxis.Y, (left ? 1 : -1) * rotationAngle + OffsetRotationAngle, 0, 0, 0); + actor.Opacity = (byte) (progress * 223); + if (actor is ClutterFlowActor) { + (actor as ClutterFlowActor).SetShade (255, left); + } + } + + private void MoveActorSideways (Actor actor, float progress, bool left) + { + actor.SetPosition (CenterX + OffsetCenterX - (left ? 1 : -1) * ((1-progress)*(SideWidth + OffsetCenterX*(left ? 1 : -1)) + CenterMargin), CenterY); + actor.Depth = zFar - 2 + progress; + actor.SetRotation (Clutter.RotateAxis.Y, (left ? 1 : -1) * rotationAngle + OffsetRotationAngle, 0, 0, 0); + actor.Opacity = (byte) (255 - (1-progress)*32); + if (actor is ClutterFlowActor) { + (actor as ClutterFlowActor).SetShade (255, left); + } + } + + private void MoveAndRotateActorCentrally (Actor actor, float progress) + { + actor.SetPosition ((float) (CenterX + OffsetCenterX + CenterMargin*progress), CenterY); + actor.Depth = (float) (zFar + (zNear + OffsetZNear - zFar ) * (1 - Math.Abs(progress))); + actor.SetRotation (Clutter.RotateAxis.Y, -progress * rotationAngle + OffsetRotationAngle, 0, 0, 0); + actor.Opacity = 255; + if (actor is ClutterFlowActor) { + (actor as ClutterFlowActor).SetShade ((byte) Math.Abs(255*progress), (progress < 0)); + } + } protected const int fade_slow = 1; Score transition_score; @@ -382,7 +393,6 @@ public List NewCovers; public double NewProgress; public EventHandler OnCompletedHandler; - public TransitionStruct (List old_covers, List persistent_covers, List new_covers, double new_progress, EventHandler on_completed) { OldCovers = old_covers; @@ -402,51 +412,63 @@ } } } - Queue transition_queue = new Queue(); - public void FadeCoversInAndOut (List old_covers, + + Queue transition_queue = new Queue(); + public void FadeCoversInAndOut (List old_covers, List persistent_covers, List new_covers, - EventHandler on_completed) - { - FadeCoversInAndOut (old_covers, persistent_covers, new_covers, on_completed, Progress); - } + EventHandler on_completed) + { + FadeCoversInAndOut (old_covers, persistent_covers, new_covers, on_completed, Progress); + } + protected void FadeCoversInAndOut (TransitionStruct trans) { FadeCoversInAndOut (trans.OldCovers, trans.PersistentCovers, trans.NewCovers, trans.OnCompletedHandler, - trans.NewProgress); + trans.NewProgress); } - private void FadeCoversInAndOut (List old_covers, + + private void FadeCoversInAndOut (List old_covers, List persistent_covers, List new_covers, - EventHandler on_completed, double new_progress) - { - - //Console.WriteLine ("FADE COVERS IN AND OUT"); - + EventHandler on_completed, double new_progress) + { + + //Console.WriteLine ("FADE COVERS IN AND OUT"); + if (old_covers==null || persistent_covers==null || new_covers==null) return; if (TransitionAnimationBusy) { transition_queue.Enqueue(new TransitionStruct(old_covers, persistent_covers, new_covers, new_progress, on_completed)); } - if (fadeOutAnim!=null) { fadeOutAnim.CompleteAnimation (); fadeOutAnim = null; } - if (fadeInAnim!=null) { fadeInAnim.CompleteAnimation (); fadeInAnim = null; } - if (t_slide!=null) { t_slide.Advance(t_slide.Duration); t_slide = null; } - - #region fade out of removed covers - foreach (ClutterFlowBaseActor cover in old_covers) { - if (cover!=null) { - FadeOutActor (cover); + if (fadeOutAnim!=null) { + fadeOutAnim.CompleteAnimation (); + fadeOutAnim = null; + } + if (fadeInAnim!=null) { + fadeInAnim.CompleteAnimation (); + fadeInAnim = null; + } + if (t_slide!=null) { + t_slide.Advance(t_slide.Duration); + t_slide = null; + } + + #region fade out of removed covers + foreach (ClutterFlowBaseActor cover in old_covers) { + if (cover!=null) { + FadeOutActor (cover); fadeOutAnim.Timeline.Pause (); - } - } - #endregion - - #region sliding of persistent covers + } + } + #endregion + + #region sliding of persistent covers foreach (ClutterFlowBaseActor cover in persistent_covers) { if (cover!=null) { - cover.Data["alpha_ini"] = cover.Data["last_alpha"]; - cover.Data["alpha_end"] = AlphaFunc(cover, new_progress); + cover.Data["alpha_ini"] = cover.Data["last_alpha"]; + cover.Data["alpha_end"] = AlphaFunc(cover, new_progress); } } t_slide = new Timeline (CoverManager.MaxAnimationSpan*fade_slow); @@ -459,9 +481,9 @@ } } }; - #endregion - - #region fade in of new covers + #endregion + + #region fade in of new covers foreach (ClutterFlowBaseActor cover in new_covers) { if (cover!=null) { UpdateActorWithAlpha (cover, AlphaFunc(cover)); @@ -469,15 +491,15 @@ fadeInAnim.Timeline.Pause (); } } - #endregion - - #region clearing, setting and playing of transition score: + #endregion + + #region clearing, setting and playing of transition score: if (transition_score!=null) { GC.SuppressFinalize (transition_score); transition_score.Completed -= HandleScoreCompleted; - /*if (transition_score.IsPlaying) { - transition_score.Completed - } + /*if (transition_score.IsPlaying) { + transition_score.Completed + } transition_score = null;*/ } transition_score = new Score(); @@ -496,7 +518,7 @@ transition_score.Append(parent, fadeInAnim.Timeline); parent = fadeInAnim.Timeline; } - + SetPreviousBounds (new_progress); CoverManager.SortDepthOrder (); if (parent!=null) { @@ -505,78 +527,78 @@ } else { on_completed (this, EventArgs.Empty); } - #endregion - } + #endregion + } private void HandleScoreCompleted(object sender, EventArgs e) { if (transition_queue != null && transition_queue.Count > 0) FadeCoversInAndOut (transition_queue.Dequeue()); } - - public void CreateClickedCloneAnimation (ClutterFlowBaseActor actor, uint delay) - { - if (actor.Parent!=null) { - Clone clone = new Clone(actor); - MoveAndRotateActorCentrally (clone, 0); - double scaleX, scaleY; actor.GetScale (out scaleX, out scaleY); clone.SetScale (scaleX, scaleY); - - ((Container) actor.Parent).Add (clone); - clone.Hide (); - clone.Opacity = 255; - clone.Depth = ZNear+1; - Timeline timeline = new Timeline (CoverManager.MaxAnimationSpan*4); - timeline.Delay = delay; - timeline.AddMarkerAtTime ("start", 1); - timeline.MarkerReached += delegate { - clone.ShowAll (); - }; - Animation anmn = clone.AnimateWithTimelinev ((ulong) AnimationMode.EaseInExpo.value__, timeline, new string[] { "opacity" }, new GLib.Value ((byte) 50)); - clone.AnimateWithTimelinev ((ulong) AnimationMode.EaseInExpo.value__, timeline, new string[] { "scale-x" }, new GLib.Value (scaleX*2)); - clone.AnimateWithTimelinev ((ulong) AnimationMode.EaseInExpo.value__, timeline, new string[] { "scale-y" }, new GLib.Value (scaleY*2)); - clone.AnimateWithTimelinev ((ulong) AnimationMode.EaseInExpo.value__, timeline, new string[] { "fixed::anchor-x" }, new GLib.Value (clone.Width/2)); - clone.AnimateWithTimelinev ((ulong) AnimationMode.EaseInExpo.value__, timeline, new string[] { "fixed::anchor-y" }, new GLib.Value (clone.Height/4)); - anmn.Completed += HandleClickedCloneCompleted; - } - } - - public void CreateClickedCloneAnimation (ClutterFlowBaseActor actor) - { - CreateClickedCloneAnimation (actor, 0); - } - - protected void HandleClickedCloneCompleted (object sender, EventArgs e) - { - if (sender is Animation && (sender as Animation).Object is Actor) { - Actor actor = (Actor) (sender as Animation).Object; + + public void CreateClickedCloneAnimation (ClutterFlowBaseActor actor, uint delay) + { + if (actor.Parent!=null) { + Clone clone = new Clone(actor); + MoveAndRotateActorCentrally (clone, 0); + double scaleX, scaleY; actor.GetScale (out scaleX, out scaleY); clone.SetScale (scaleX, scaleY); + + ((Container) actor.Parent).Add (clone); + clone.Hide (); + clone.Opacity = 255; + clone.Depth = ZNear+1; + Timeline timeline = new Timeline (CoverManager.MaxAnimationSpan*4); + timeline.Delay = delay; + timeline.AddMarkerAtTime ("start", 1); + timeline.MarkerReached += delegate { + clone.ShowAll (); + }; + Animation anmn = clone.AnimateWithTimelinev ((ulong) AnimationMode.EaseInExpo.value__, timeline, new string[] { "opacity" }, new GLib.Value ((byte) 50)); + clone.AnimateWithTimelinev ((ulong) AnimationMode.EaseInExpo.value__, timeline, new string[] { "scale-x" }, new GLib.Value (scaleX*2)); + clone.AnimateWithTimelinev ((ulong) AnimationMode.EaseInExpo.value__, timeline, new string[] { "scale-y" }, new GLib.Value (scaleY*2)); + clone.AnimateWithTimelinev ((ulong) AnimationMode.EaseInExpo.value__, timeline, new string[] { "fixed::anchor-x" }, new GLib.Value (clone.Width/2)); + clone.AnimateWithTimelinev ((ulong) AnimationMode.EaseInExpo.value__, timeline, new string[] { "fixed::anchor-y" }, new GLib.Value (clone.Height/4)); + anmn.Completed += HandleClickedCloneCompleted; + } + } + + public void CreateClickedCloneAnimation (ClutterFlowBaseActor actor) + { + CreateClickedCloneAnimation (actor, 0); + } + + protected void HandleClickedCloneCompleted (object sender, EventArgs e) + { + if (sender is Animation && (sender as Animation).Object is Actor) { + Actor actor = (Actor) (sender as Animation).Object; GC.SuppressFinalize (actor); actor.Destroy (); actor = null; - (sender as Animation).Completed -= HandleClickedCloneCompleted; - } - } - - protected Animation fadeOutAnim; - public void FadeOutActor (Actor actor) - { - actor.Show (); - if (fadeOutAnim==null) - fadeOutAnim = actor.Animatev ((ulong) Clutter.AnimationMode.Linear.value__, CoverManager.MaxAnimationSpan*fade_slow, new string[] { "opacity" }, new GLib.Value ((byte) 0)); - else - actor.AnimateWithTimelinev ((ulong) Clutter.AnimationMode.Linear.value__, fadeOutAnim.Timeline, new string[] { "opacity" }, new GLib.Value ((byte) 0)); - } - - protected Animation fadeInAnim; - public void FadeInActor (Actor actor) - { + (sender as Animation).Completed -= HandleClickedCloneCompleted; + } + } + + protected Animation fadeOutAnim; + public void FadeOutActor (Actor actor) + { + actor.Show (); + if (fadeOutAnim==null) + fadeOutAnim = actor.Animatev ((ulong) Clutter.AnimationMode.Linear.value__, CoverManager.MaxAnimationSpan*fade_slow, new string[] { "opacity" }, new GLib.Value ((byte) 0)); + else + actor.AnimateWithTimelinev ((ulong) Clutter.AnimationMode.Linear.value__, fadeOutAnim.Timeline, new string[] { "opacity" }, new GLib.Value ((byte) 0)); + } + + protected Animation fadeInAnim; + public void FadeInActor (Actor actor) + { byte opacity = actor.Opacity; actor.Opacity = 0; actor.Show(); - if (fadeInAnim==null) - fadeInAnim = actor.Animatev ((ulong) Clutter.AnimationMode.Linear.value__, CoverManager.MaxAnimationSpan*fade_slow, new string[] { "opacity" }, new GLib.Value ((byte) opacity)); - else + if (fadeInAnim==null) + fadeInAnim = actor.Animatev ((ulong) Clutter.AnimationMode.Linear.value__, CoverManager.MaxAnimationSpan*fade_slow, new string[] { "opacity" }, new GLib.Value ((byte) opacity)); + else actor.AnimateWithTimelinev ((ulong) Clutter.AnimationMode.Linear.value__, fadeInAnim.Timeline, new string[] { "opacity" }, new GLib.Value ((byte) opacity)); - } - #endregion - } + } + #endregion + } } diff -Nru banshee-community-extensions-2.0.1/src/ClutterFlow/ClutterFlow/IActorLoader.cs banshee-community-extensions-2.2.0/src/ClutterFlow/ClutterFlow/IActorLoader.cs --- banshee-community-extensions-2.0.1/src/ClutterFlow/ClutterFlow/IActorLoader.cs 1970-01-01 00:00:00.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/ClutterFlow/ClutterFlow/IActorLoader.cs 2011-05-30 16:44:24.000000000 +0000 @@ -0,0 +1,37 @@ +// +// ActorLoader.cs +// +// Author: +// Mathijs Dumon +// +// Copyright (c) 2010 Mathijs Dumon +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + + +using System; +using System.Collections.Generic; +using Clutter; + +namespace ClutterFlow +{ + public interface IActorLoader : IDisposable { + List GetActors (CoverManager cover_manager); + } +} diff -Nru banshee-community-extensions-2.0.1/src/ClutterFlow/ClutterFlow/Makefile.am banshee-community-extensions-2.2.0/src/ClutterFlow/ClutterFlow/Makefile.am --- banshee-community-extensions-2.0.1/src/ClutterFlow/ClutterFlow/Makefile.am 2010-03-26 23:03:02.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/ClutterFlow/ClutterFlow/Makefile.am 2011-05-29 17:54:48.000000000 +0000 @@ -3,13 +3,13 @@ GMCS_FLAGS = -unsafe SOURCES = \ - ActorLoader.cs \ AlphabetBar.cs \ AlphabetButton.cs \ Caption.cs \ ClutterArrowButton.cs \ ClutterButton.cs \ ClutterFlowActor.cs \ + ClutterFlowBaseActor.cs \ ClutterFlowFixedActor.cs \ ClutterFlowSlider.cs \ ClutterFlowTimeline.cs \ @@ -23,6 +23,8 @@ CoverCaption.cs \ CoverManager.cs \ FlowBehaviour.cs \ + IActorLoader.cs \ + TextureHolder.cs \ TrackCaption.cs if ENABLE_CLUTTERFLOW diff -Nru banshee-community-extensions-2.0.1/src/ClutterFlow/ClutterFlow/Makefile.in banshee-community-extensions-2.2.0/src/ClutterFlow/ClutterFlow/Makefile.in --- banshee-community-extensions-2.0.1/src/ClutterFlow/ClutterFlow/Makefile.in 2011-05-03 20:45:05.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/ClutterFlow/ClutterFlow/Makefile.in 2011-09-19 20:36:50.000000000 +0000 @@ -42,6 +42,7 @@ subdir = src/ClutterFlow/ClutterFlow ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/m4/extensions/alarmclock.m4 \ + $(top_srcdir)/build/m4/extensions/albumartwriter.m4 \ $(top_srcdir)/build/m4/extensions/ampache.m4 \ $(top_srcdir)/build/m4/extensions/appindicator.m4 \ $(top_srcdir)/build/m4/extensions/awn.m4 \ @@ -49,6 +50,7 @@ $(top_srcdir)/build/m4/extensions/clutterflow.m4 \ $(top_srcdir)/build/m4/extensions/common.m4 \ $(top_srcdir)/build/m4/extensions/coverwallpaper.m4 \ + $(top_srcdir)/build/m4/extensions/duplicatesongdetector.m4 \ $(top_srcdir)/build/m4/extensions/jamendo.m4 \ $(top_srcdir)/build/m4/extensions/karaoke.m4 \ $(top_srcdir)/build/m4/extensions/lastfmfingerprint.m4 \ @@ -68,6 +70,11 @@ $(top_srcdir)/build/m4/shamrock/expansions.m4 \ $(top_srcdir)/build/m4/shamrock/gnome-doc.m4 \ $(top_srcdir)/build/m4/shamrock/i18n.m4 \ + $(top_srcdir)/build/m4/shamrock/libtool.m4 \ + $(top_srcdir)/build/m4/shamrock/ltoptions.m4 \ + $(top_srcdir)/build/m4/shamrock/ltsugar.m4 \ + $(top_srcdir)/build/m4/shamrock/ltversion.m4 \ + $(top_srcdir)/build/m4/shamrock/lt~obsolete.m4 \ $(top_srcdir)/build/m4/shamrock/mono.m4 \ $(top_srcdir)/build/m4/shamrock/nunit.m4 \ $(top_srcdir)/build/m4/shamrock/programs.m4 \ @@ -104,7 +111,6 @@ DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AM_MAKEFLAGS = @AM_MAKEFLAGS@ @@ -328,13 +334,13 @@ LINK = $(CLUTTER_SHARP_LIBS) -r:Mono.Cairo -pkg:gtk-sharp-2.0 \ $(am__append_1) SOURCES = \ - ActorLoader.cs \ AlphabetBar.cs \ AlphabetButton.cs \ Caption.cs \ ClutterArrowButton.cs \ ClutterButton.cs \ ClutterFlowActor.cs \ + ClutterFlowBaseActor.cs \ ClutterFlowFixedActor.cs \ ClutterFlowSlider.cs \ ClutterFlowTimeline.cs \ @@ -348,6 +354,8 @@ CoverCaption.cs \ CoverManager.cs \ FlowBehaviour.cs \ + IActorLoader.cs \ + TextureHolder.cs \ TrackCaption.cs diff -Nru banshee-community-extensions-2.0.1/src/ClutterFlow/ClutterFlow/TextureHolder.cs banshee-community-extensions-2.2.0/src/ClutterFlow/ClutterFlow/TextureHolder.cs --- banshee-community-extensions-2.0.1/src/ClutterFlow/ClutterFlow/TextureHolder.cs 1970-01-01 00:00:00.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/ClutterFlow/ClutterFlow/TextureHolder.cs 2011-06-09 21:11:19.000000000 +0000 @@ -0,0 +1,155 @@ +// +// TextureHolder.cs +// +// Author: +// Mathijs Dumon +// +// Copyright (c) 2010 Mathijs Dumon +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +using System; + +using Cogl; +using Gdk; + +namespace ClutterFlow +{ + public delegate Cairo.ImageSurface GetDefaultSurface (); + + public class TextureHolder : IDisposable { + #region Fields + private int texture_size; + + protected Cairo.ImageSurface default_surface; + public Cairo.ImageSurface DefaultSurface { + get { + if (default_surface == null && GetDefaultSurface != null) { + default_surface = ClutterFlowActor.MakeReflection (GetDefaultSurface ()); + } + return default_surface; + } + } + + protected IntPtr default_texture; + public IntPtr DefaultTexture { + get { + if (default_texture == IntPtr.Zero) { + SetupDefaultTexture (); + } + return default_texture; + } + } + + protected IntPtr shade_texture; + public IntPtr ShadeTexture { + get { + if (shade_texture == IntPtr.Zero) { + SetupShadeTexture (); + } + return shade_texture; + } + } + + private GetDefaultSurface GetDefaultSurface; + #endregion + + #region Initialisation + public TextureHolder (int texture_size, GetDefaultSurface get_default_surface) + { + this.texture_size = texture_size; + this.GetDefaultSurface = get_default_surface; + } + + protected bool disposed = false; + public virtual void Dispose () + { + if (disposed) { + return; + } + disposed = true; + + + if (default_surface != null) { + ((IDisposable) default_surface).Dispose (); + } + Cogl.Handle.Unref (default_texture); + Cogl.Handle.Unref (shade_texture); + default_texture = IntPtr.Zero; + shade_texture = IntPtr.Zero; + } + + private void SetupDefaultTexture () + { + if (default_texture == IntPtr.Zero) { + if (DefaultSurface != null) { + Cogl.PixelFormat fm; + if (DefaultSurface.Format == Cairo.Format.ARGB32) { + fm = PixelFormat.Argb8888Pre; + } + else //if (DefaultSurface.Format == Cairo.Format.RGB24) + fm = PixelFormat.Rgb888; + + unsafe { + default_texture = ClutterHelper.cogl_texture_new_from_data((uint) DefaultSurface.Width, (uint) DefaultSurface.Height, Cogl.TextureFlags.None, + fm, Cogl.PixelFormat.Any, (uint) DefaultSurface.Stride, DefaultSurface.DataPtr); + } + } else { + default_texture = Cogl.Texture.NewWithSize ((uint) texture_size, (uint) texture_size, + Cogl.TextureFlags.None, Cogl.PixelFormat.Any); + } + } + } + + private void SetupShadeTexture () + { + if (shade_texture==IntPtr.Zero) { + + Gdk.Pixbuf finalPb = new Gdk.Pixbuf (Colorspace.Rgb, true, 8, texture_size, texture_size); + + unsafe { + int dst_rowstride = finalPb.Rowstride; + int dst_width = finalPb.Width; + int shd_width = (int) ((float) dst_width * 0.25f); + int dst_height = finalPb.Height; + byte * dst_byte = (byte *) finalPb.Pixels; + byte * dst_base = dst_byte; + + for (int j = 0; j < dst_height; j++) { + dst_byte = ((byte *) dst_base) + j * dst_rowstride; + for (int i = 0; i < dst_width; i++) { + *dst_byte++ = 0x00; + *dst_byte++ = 0x00; + *dst_byte++ = 0x00; + if (i > shd_width) + *dst_byte++ = (byte) (255 * (float) (i - shd_width) / (float) (dst_width - shd_width)); + else + *dst_byte++ = 0x00; + } + } + + shade_texture = ClutterHelper.cogl_texture_new_from_data((uint) finalPb.Width, (uint) finalPb.Height, Cogl.TextureFlags.None, + PixelFormat.Rgba8888, Cogl.PixelFormat.Any, (uint) finalPb.Rowstride, finalPb.Pixels); + } + } + } + #endregion + } +} + diff -Nru banshee-community-extensions-2.0.1/src/ClutterFlow/ClutterFlow/TrackCaption.cs banshee-community-extensions-2.2.0/src/ClutterFlow/ClutterFlow/TrackCaption.cs --- banshee-community-extensions-2.0.1/src/ClutterFlow/ClutterFlow/TrackCaption.cs 2010-12-16 19:13:12.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/ClutterFlow/ClutterFlow/TrackCaption.cs 2011-05-28 20:47:11.000000000 +0000 @@ -30,59 +30,59 @@ namespace ClutterFlow.Captions { - - - public class TrackCaption : Caption - { - #region Fields - protected string defaultValue = ""; - public override string DefaultValue { - get { return defaultValue; } - set { - if (value!=defaultValue) { - if (Value==defaultValue) Value = value; - defaultValue = value; - } - } - } - #endregion - - public TrackCaption (CoverManager coverManager, string font_name, Color color) : base (coverManager, font_name, color) - { - } - - #region Methods - - public override void FadeIn () - { - EventHandler hFadeIn = delegate (object sender, EventArgs e) { - this.Value = new_caption; - this.UpdatePosition (); - this.Animatev ((ulong) AnimationMode.Linear.value__, (uint) (CoverManager.MaxAnimationSpan*0.5f), new string[] { "opacity" }, new GLib.Value ((byte) 255)); - aFade = null; - }; - if (aFade!=null && aFade.Timeline.IsPlaying) - aFade.Completed += hFadeIn; - else - hFadeIn (this, EventArgs.Empty); - } - - - public override void UpdatePosition () - { - if (Stage!=null) { - SetAnchorPoint (Width*0.5f, Height*0.5f); - SetPosition(CoverManager.Behaviour.CenterX, Math.Max(CoverManager.Behaviour.CenterY - CoverManager.Behaviour.CoverWidth + Height*3, Height*3.6f)); - } - } - - private string new_caption; - public void SetValueWithAnim (string caption) { - new_caption = caption; - if (Opacity>0) FadeOut (); - FadeIn (); - } - #endregion - } + public class TrackCaption : Caption + { + #region Fields + protected string defaultValue = ""; + public override string DefaultValue { + get { return defaultValue; } + set { + if (value!=defaultValue) { + if (Value==defaultValue) Value = value; + defaultValue = value; + } + } + } + #endregion + + public TrackCaption (CoverManager coverManager, string font_name, Color color) : base (coverManager, font_name, color) + { + } + + #region Methods + + public override void FadeIn () + { + EventHandler hFadeIn = delegate (object sender, EventArgs e) { + this.Value = new_caption; + this.UpdatePosition (); + this.Animatev ((ulong) AnimationMode.Linear.value__, (uint) (CoverManager.MaxAnimationSpan*0.5f), new string[] { "opacity" }, new GLib.Value ((byte) 255)); + aFade = null; + }; + if (aFade!=null && aFade.Timeline.IsPlaying) { + aFade.Completed += hFadeIn; + } else { + hFadeIn (this, EventArgs.Empty); + } + } + + + public override void UpdatePosition () + { + if (Stage!=null) { + SetAnchorPoint (Width*0.5f, Height*0.5f); + SetPosition(CoverManager.Behaviour.CenterX, Math.Max(CoverManager.Behaviour.CenterY - CoverManager.Behaviour.CoverWidth + Height*3, Height*3.6f)); + } + } + + private string new_caption; + public void SetValueWithAnim (string caption) { + new_caption = caption; + if (Opacity>0) { + FadeOut (); + } + FadeIn (); + } + #endregion + } } - diff -Nru banshee-community-extensions-2.0.1/src/ClutterFlow/Makefile.in banshee-community-extensions-2.2.0/src/ClutterFlow/Makefile.in --- banshee-community-extensions-2.0.1/src/ClutterFlow/Makefile.in 2011-05-03 20:45:05.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/ClutterFlow/Makefile.in 2011-09-19 20:36:51.000000000 +0000 @@ -37,6 +37,7 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/m4/extensions/alarmclock.m4 \ + $(top_srcdir)/build/m4/extensions/albumartwriter.m4 \ $(top_srcdir)/build/m4/extensions/ampache.m4 \ $(top_srcdir)/build/m4/extensions/appindicator.m4 \ $(top_srcdir)/build/m4/extensions/awn.m4 \ @@ -44,6 +45,7 @@ $(top_srcdir)/build/m4/extensions/clutterflow.m4 \ $(top_srcdir)/build/m4/extensions/common.m4 \ $(top_srcdir)/build/m4/extensions/coverwallpaper.m4 \ + $(top_srcdir)/build/m4/extensions/duplicatesongdetector.m4 \ $(top_srcdir)/build/m4/extensions/jamendo.m4 \ $(top_srcdir)/build/m4/extensions/karaoke.m4 \ $(top_srcdir)/build/m4/extensions/lastfmfingerprint.m4 \ @@ -63,6 +65,11 @@ $(top_srcdir)/build/m4/shamrock/expansions.m4 \ $(top_srcdir)/build/m4/shamrock/gnome-doc.m4 \ $(top_srcdir)/build/m4/shamrock/i18n.m4 \ + $(top_srcdir)/build/m4/shamrock/libtool.m4 \ + $(top_srcdir)/build/m4/shamrock/ltoptions.m4 \ + $(top_srcdir)/build/m4/shamrock/ltsugar.m4 \ + $(top_srcdir)/build/m4/shamrock/ltversion.m4 \ + $(top_srcdir)/build/m4/shamrock/lt~obsolete.m4 \ $(top_srcdir)/build/m4/shamrock/mono.m4 \ $(top_srcdir)/build/m4/shamrock/nunit.m4 \ $(top_srcdir)/build/m4/shamrock/programs.m4 \ @@ -117,7 +124,6 @@ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ -ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AM_MAKEFLAGS = @AM_MAKEFLAGS@ diff -Nru banshee-community-extensions-2.0.1/src/CoverWallpaper/Makefile.in banshee-community-extensions-2.2.0/src/CoverWallpaper/Makefile.in --- banshee-community-extensions-2.0.1/src/CoverWallpaper/Makefile.in 2011-05-03 20:45:05.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/CoverWallpaper/Makefile.in 2011-09-19 20:36:51.000000000 +0000 @@ -42,6 +42,7 @@ subdir = src/CoverWallpaper ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/m4/extensions/alarmclock.m4 \ + $(top_srcdir)/build/m4/extensions/albumartwriter.m4 \ $(top_srcdir)/build/m4/extensions/ampache.m4 \ $(top_srcdir)/build/m4/extensions/appindicator.m4 \ $(top_srcdir)/build/m4/extensions/awn.m4 \ @@ -49,6 +50,7 @@ $(top_srcdir)/build/m4/extensions/clutterflow.m4 \ $(top_srcdir)/build/m4/extensions/common.m4 \ $(top_srcdir)/build/m4/extensions/coverwallpaper.m4 \ + $(top_srcdir)/build/m4/extensions/duplicatesongdetector.m4 \ $(top_srcdir)/build/m4/extensions/jamendo.m4 \ $(top_srcdir)/build/m4/extensions/karaoke.m4 \ $(top_srcdir)/build/m4/extensions/lastfmfingerprint.m4 \ @@ -68,6 +70,11 @@ $(top_srcdir)/build/m4/shamrock/expansions.m4 \ $(top_srcdir)/build/m4/shamrock/gnome-doc.m4 \ $(top_srcdir)/build/m4/shamrock/i18n.m4 \ + $(top_srcdir)/build/m4/shamrock/libtool.m4 \ + $(top_srcdir)/build/m4/shamrock/ltoptions.m4 \ + $(top_srcdir)/build/m4/shamrock/ltsugar.m4 \ + $(top_srcdir)/build/m4/shamrock/ltversion.m4 \ + $(top_srcdir)/build/m4/shamrock/lt~obsolete.m4 \ $(top_srcdir)/build/m4/shamrock/mono.m4 \ $(top_srcdir)/build/m4/shamrock/nunit.m4 \ $(top_srcdir)/build/m4/shamrock/programs.m4 \ @@ -104,7 +111,6 @@ DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AM_MAKEFLAGS = @AM_MAKEFLAGS@ diff -Nru banshee-community-extensions-2.0.1/src/DuplicateSongDetector/Banshee.DuplicateSongDetector/DuplicateSongDetectorAction.cs banshee-community-extensions-2.2.0/src/DuplicateSongDetector/Banshee.DuplicateSongDetector/DuplicateSongDetectorAction.cs --- banshee-community-extensions-2.0.1/src/DuplicateSongDetector/Banshee.DuplicateSongDetector/DuplicateSongDetectorAction.cs 1970-01-01 00:00:00.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/DuplicateSongDetector/Banshee.DuplicateSongDetector/DuplicateSongDetectorAction.cs 2011-09-08 18:55:43.000000000 +0000 @@ -0,0 +1,65 @@ +// +// DuplicateSongDetectorAction.cs +// +// Authors: +// Kevin Anthony +// +// Copyright (C) 2011 Kevin Anthony +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +using System; + +using Mono.Addins; +using Mono.Unix; + +using Banshee.Base; +using Banshee.Gui; +using Banshee.ServiceStack; + +using Hyena; +using Hyena.Data.Sqlite; + +namespace Banshee.DuplicateSongDetector +{ + public class DuplicateSongDetectorAction : BansheeActionGroup + { + private DuplicateSongDetectorSource source; + + public DuplicateSongDetectorAction () : base (AddinManager.CurrentLocalizer.GetString ("Detect Duplicate Songs")) + { + Add (new Gtk.ActionEntry ("DuplicateSongAction", null, + AddinManager.CurrentLocalizer.GetString ("Detect Duplicate Songs"), null, null, onStartDetecting)); + AddUiFromFile ("GlobalUI.xml"); + } + + public void onStartDetecting (object o, EventArgs args) + { + if (source == null) { + source = new DuplicateSongDetectorSource (); + ServiceManager.SourceManager.MusicLibrary.AddChildSource (source); + } + ServiceManager.SourceManager.SetActiveSource (source); + + SongDuplicateView.ReloadWindow (); + } + } +} + diff -Nru banshee-community-extensions-2.0.1/src/DuplicateSongDetector/Banshee.DuplicateSongDetector/DuplicateSongDetectorSource.cs banshee-community-extensions-2.2.0/src/DuplicateSongDetector/Banshee.DuplicateSongDetector/DuplicateSongDetectorSource.cs --- banshee-community-extensions-2.0.1/src/DuplicateSongDetector/Banshee.DuplicateSongDetector/DuplicateSongDetectorSource.cs 1970-01-01 00:00:00.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/DuplicateSongDetector/Banshee.DuplicateSongDetector/DuplicateSongDetectorSource.cs 2011-09-08 18:55:43.000000000 +0000 @@ -0,0 +1,81 @@ +// +// DuplicateSongDetectorSource.cs +// +// Authors: +// Kevin Anthony +// +// Copyright (C) 2011 Kevin Anthony +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// + +using System; + +using Mono.Addins; + +using Banshee.Base; +using Banshee.Sources; +using Banshee.ServiceStack; +using Banshee.Gui; + +namespace Banshee.DuplicateSongDetector +{ + public class DuplicateSongDetectorSource : Source, IUnmapableSource + { + // In the sources TreeView, sets the order value for this source, small on top + const int sort_order = 190; + + public DuplicateSongDetectorSource () : base(AddinManager.CurrentLocalizer.GetString ("Duplicate Song Detector"), AddinManager.CurrentLocalizer.GetString ("Duplicate Song Detector"), sort_order, "extension-unique-id") + { + Properties.SetStringList ("Icon.Name", "search", "gtk-search"); + Properties.Set ("Nereid.SourceContents", new SongDuplicateView ()); + Properties.SetString ("ActiveSourceUIResource", "ActiveUI.xml"); + Properties.SetString ("UnmapSourceActionLabel", AddinManager.CurrentLocalizer.GetString ("Close")); + Properties.SetString ("UnmapSourceActionIconName", "gtk-close"); + + var actions = new BansheeActionGroup ("duplicate-source"); + actions.AddImportant ( + new Gtk.ActionEntry ("onStartDetecting", Gtk.Stock.Refresh, AddinManager.CurrentLocalizer.GetString ("Refresh"), null, null, (o, a) => { + SongDuplicateView.ReloadWindow (); + }) + ); + actions.Register (); + } + // A count of 0 will be hidden in the source TreeView + public override int Count { + get { return 0; } + } + + //This Allows us to close the window when not in use + public bool CanUnmap { + get { return true; } + } + public bool ConfirmBeforeUnmap { + get { return false; } + } + + public bool Unmap () + { + Parent.RemoveChildSource (this); + Properties.Get ("Nereid.SourceContents").Widget.Destroy (); + return true; + } + } +} diff -Nru banshee-community-extensions-2.0.1/src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs banshee-community-extensions-2.2.0/src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs --- banshee-community-extensions-2.0.1/src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs 1970-01-01 00:00:00.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/DuplicateSongDetector/Banshee.DuplicateSongDetector/SongDuplicateView.cs 2011-09-06 18:33:07.000000000 +0000 @@ -0,0 +1,283 @@ +// +// DuplicateSongView.cs +// +// Author: +// Kevin Anthony +// +// Copyright (c) 2011 Kevin Anthony +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +using System; +using System.IO; + +using Mono.Addins; +using Mono.Unix; + +using Gtk; + +using Hyena; +using Hyena.Data.Sqlite; +using Hyena.Widgets; + +using Banshee.Base; +using Banshee.Library; +using Banshee.Sources; +using Banshee.Sources.Gui; +using Banshee.ServiceStack; +using Banshee.Gui; + +namespace Banshee.DuplicateSongDetector +{ + public class SongDuplicateView : RoundedFrame, ISourceContents + { + private static Gtk.ListStore MusicListStore; + + public SongDuplicateView () + { + Gtk.ScrolledWindow Scroll = new Gtk.ScrolledWindow (); + Gtk.TreeView Tree = new Gtk.TreeView (); + Gtk.VBox vbox = new Gtk.VBox (false, 1); + Gtk.HBox hbox = new Gtk.HBox (false, 1); + Tree.RowActivated += OnRowClicked; + //Buttons For Header + Gtk.Button removeButton = new Gtk.Button (); + removeButton.Label = AddinManager.CurrentLocalizer.GetString ("Remove Selected Songs"); + removeButton.Clicked += OnRemoveCommand; + Gtk.Button deleteButton = new Gtk.Button (); + deleteButton.Label = AddinManager.CurrentLocalizer.GetString ("Delete Selected Songs"); + deleteButton.Clicked += OnDeleteCommand; + + //Create 5 columns, first column is a checkbox, next 4 are text boxes + Gtk.CellRendererToggle selectCell = new Gtk.CellRendererToggle (); + selectCell.Activatable = true; + selectCell.Toggled += OnSelectToggled; + Tree.AppendColumn(AddinManager.CurrentLocalizer.GetString ("Select"),selectCell, "active", 0); + Tree.AppendColumn(AddinManager.CurrentLocalizer.GetString ("Song Title"),new Gtk.CellRendererText (), "text", 1); + Tree.AppendColumn(AddinManager.CurrentLocalizer.GetString ("Artist"),new Gtk.CellRendererText (), "text", 2); + Tree.AppendColumn(AddinManager.CurrentLocalizer.GetString ("Album"),new Gtk.CellRendererText (), "text", 3); + Tree.AppendColumn(AddinManager.CurrentLocalizer.GetString ("File"),new Gtk.CellRendererText (), "text", 4); + // Remove From Library, Delete From Drive, Song Name, Artist Name, Album Name, Formated URI, Actual URI, Database Track ID + MusicListStore = new Gtk.ListStore (typeof(bool), typeof(string), typeof(string), typeof(string), typeof(string), typeof(string), typeof(int)); + Tree.Model = MusicListStore; + //Pack the Tree in a scroll window + Scroll.Add (Tree); + //Pack the buttons in a hbox + hbox.PackStart (removeButton, false, false, 0); + hbox.PackStart (deleteButton, false, false, 0); + //pack the hbox->buttons and Scroll->Tree in a Vbox, tell the Scroll window to Expand and Fill the vbox + vbox.PackStart (hbox, false, false, 0); + vbox.PackStart (Scroll, true, true, 0); + //pack the vbox in the Rounded Frame + Add(vbox); + //Finally, show everything + ShowAll(); + + } +#region ToggleBoxHandling + void OnRowClicked (object o, RowActivatedArgs args) + { + TreeIter Iter; + if ((o as TreeView).Selection.GetSelected(out Iter)){ + bool OldValue = (bool)MusicListStore.GetValue (Iter, 0); + MusicListStore.SetValue (Iter, 0, !OldValue); + Log.DebugFormat ("Setting Selection Value For Row {0} -> {1}", MusicListStore.GetStringFromIter (Iter), !OldValue); + } + } + + void OnSelectToggled (object o, ToggledArgs args) + { + //get the toggled row, pull out the value for the select box, and store the opposite. + TreeIter Iter; + if (MusicListStore.GetIter (out Iter, new TreePath (args.Path))) { + bool OldValue = (bool)MusicListStore.GetValue (Iter, 0); + MusicListStore.SetValue (Iter, 0, !OldValue); + Log.DebugFormat ("Setting Selection Value For Row {0} -> {1}", MusicListStore.GetStringFromIter (Iter), !OldValue); + } + } +#endregion +#region ButtonPushed + void OnRemoveCommand (object o, EventArgs args) + { + OnExecuteCommand (false); + } + + void OnDeleteCommand (object o, EventArgs args) + { + OnExecuteCommand (true); + } + + void OnExecuteCommand (bool Delete) + { + if (ConfirmRemove (Delete)) { + MusicLibrarySource Library = ServiceManager.SourceManager.MusicLibrary; + if (Library.CanRemoveTracks && Library.CanDeleteTracks) { + Gtk.TreeIter Iter = new Gtk.TreeIter (); + if (MusicListStore.GetIterFirst (out Iter)) { + do { + if (Delete && (bool)MusicListStore.GetValue (Iter, 0)) { + //delete + string Uri = (string)MusicListStore.GetValue (Iter, 4); + Uri = Uri.Replace ("file://", ""); + RemoveTrack ((int)MusicListStore.GetValue (Iter, 6)); + DeleteTrack (Uri); + } else if ((bool)MusicListStore.GetValue (Iter, 0)) { + RemoveTrack ((int)MusicListStore.GetValue (Iter, 6)); + } + } while (MusicListStore.IterNext (ref Iter)); + Library.Reload (); + } else { + Log.Warning ("Please Don't Click Execute with nothing selected"); + } + } else { + Log.Warning ("Can not remove or delete any tracks"); + } + ReloadWindow (); + } + } + + private static bool ConfirmRemove (bool delete) + { + bool ret = false; + string header = null; + string message = null; + string button_label = null; + + if (delete) { + header = AddinManager.CurrentLocalizer.GetString ( + "Are you sure you want to permanently delete the selected items?"); + message = AddinManager.CurrentLocalizer.GetString ( + "If you delete the selection, it will be permanently lost."); + button_label = "gtk-delete"; + } else { + header = AddinManager.CurrentLocalizer.GetString ( + "Remove selection from Library?"); + message = AddinManager.CurrentLocalizer.GetString ( + "Are you sure you want to remove the selected items from your Library?"); + button_label = "gtk-remove"; + } + + HigMessageDialog md = new HigMessageDialog (ServiceManager.Get ().PrimaryWindow, + DialogFlags.DestroyWithParent, delete ? MessageType.Warning : MessageType.Question, + ButtonsType.None, header, message); + // Delete from Disk defaults to Cancel and the others to OK/Confirm. + md.AddButton ("gtk-cancel", ResponseType.No, delete); + md.AddButton (button_label, ResponseType.Yes, !delete); + + try { + if (md.Run () == (int)ResponseType.Yes) { + ret = true; + } + } finally { + md.Destroy (); + } + return ret; + } +#endregion +#region DataHandlers + private static void AddData (int ID, String song, String artist, String album, String uri) + { + string NewUri = Uri.UnescapeDataString (uri).Replace ("file://", ""); + if (File.Exists (NewUri)) { + MusicListStore.AppendValues (false, song, artist, album, Uri.UnescapeDataString (uri), uri, ID); + } else { + MusicListStore.AppendValues (true, song, artist, album, Uri.UnescapeDataString (uri), uri, ID); + } + } + + public static void ReloadWindow () + { + ClearData (); + HyenaDataReader reader = new HyenaDataReader (ServiceManager.DbConnection.Query (@"SELECT + CT.TrackID, CT.Title, CA.ArtistName, CA.Title, CT.URI + FROM CoreTracks CT,CoreAlbums CA ON Ct.AlbumID = CA.AlbumID + AND CT.TrackID IN ( + SELECT + CT1.TrackID from CoreTracks CT1,CoreTracks CT2 where + CT1.PrimarySourceID=1 + AND CT1.TrackID <> CT2.TrackID + AND CT1.TitleLowered = CT2.TitleLowered + AND CT1.TrackNumber = CT2.TrackNumber + AND CT1.AlbumID = CT2.AlbumID + AND CT1.ArtistID = CT2.ArtistID + ) + ORDER BY CT.Title")); + while (reader.Read ()) { + int ID = reader.Get (0); + String Title = reader.Get (1); + String Artist = reader.Get (2); + String Album = reader.Get (3); + String URI = reader.Get (4); + AddData (ID, Title, Artist, Album, URI); + } + } + + public void RefreshWindow(){ + ReloadWindow(); + } + + public static void ClearData () + { + Gtk.TreeIter Iter = new Gtk.TreeIter (); + if (MusicListStore.GetIterFirst (out Iter)) { + do { + MusicListStore.Remove (ref Iter); + } while (MusicListStore.IterIsValid (Iter)); + } + } +#endregion +#region RemoveWorkhorse + //I would love to replace the database and File.Delete commands with MusicLibrary.RemoveTracks and MusicLibrary.DeleteTracks + //But i have to wait until better documentation comes out + private void RemoveTrack (int id) + { + ServiceManager.DbConnection.Execute (@"Delete From CoreTracks where TrackId = ?", id); + } + private void DeleteTrack (string uri) + { + File.Delete (uri); + } +#endregion +#region ISourceContents + private MusicLibrarySource source; + public bool SetSource (ISource source) + { + this.source = source as MusicLibrarySource; + return this.source != null; + } + + public ISource Source { + get { return source; } + } + + public void ResetSource () + { + source = null; + } + + public Widget Widget { + get { return this; } + } +#endregion + + } //End of Class + +} // End of NameSpace + + diff -Nru banshee-community-extensions-2.0.1/src/DuplicateSongDetector/DuplicateSongDetector.addin.xml banshee-community-extensions-2.2.0/src/DuplicateSongDetector/DuplicateSongDetector.addin.xml --- banshee-community-extensions-2.0.1/src/DuplicateSongDetector/DuplicateSongDetector.addin.xml 1970-01-01 00:00:00.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/DuplicateSongDetector/DuplicateSongDetector.addin.xml 2011-08-25 17:55:44.000000000 +0000 @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + diff -Nru banshee-community-extensions-2.0.1/src/DuplicateSongDetector/Makefile.am banshee-community-extensions-2.2.0/src/DuplicateSongDetector/Makefile.am --- banshee-community-extensions-2.0.1/src/DuplicateSongDetector/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/DuplicateSongDetector/Makefile.am 2011-09-08 18:55:43.000000000 +0000 @@ -0,0 +1,18 @@ +ASSEMBLY = Banshee.DuplicateSongDetector +LINK = $(BANSHEE_LIBS) + +SOURCES = \ + Banshee.DuplicateSongDetector/DuplicateSongDetectorAction.cs \ + Banshee.DuplicateSongDetector/DuplicateSongDetectorSource.cs \ + Banshee.DuplicateSongDetector/SongDuplicateView.cs + +RESOURCES = \ + DuplicateSongDetector.addin.xml \ + Resources/ActiveUI.xml \ + Resources/GlobalUI.xml + +if ENABLE_DUPLICATESONGDETECTOR +include $(top_srcdir)/build/build.mk +else +EXTRA_DIST = $(SOURCES) $(RESOURCES) +endif diff -Nru banshee-community-extensions-2.0.1/src/DuplicateSongDetector/Makefile.in banshee-community-extensions-2.2.0/src/DuplicateSongDetector/Makefile.in --- banshee-community-extensions-2.0.1/src/DuplicateSongDetector/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/DuplicateSongDetector/Makefile.in 2011-09-19 20:36:51.000000000 +0000 @@ -0,0 +1,669 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(top_srcdir)/build/build.environment.mk \ + $(top_srcdir)/build/build.mk \ + $(top_srcdir)/build/build.rules.mk +@ENABLE_DUPLICATESONGDETECTOR_TRUE@@ENABLE_TESTS_TRUE@am__append_1 = " $(NUNIT_LIBS) $(MONO_NUNIT_LIBS)" +subdir = src/DuplicateSongDetector +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/build/m4/extensions/alarmclock.m4 \ + $(top_srcdir)/build/m4/extensions/albumartwriter.m4 \ + $(top_srcdir)/build/m4/extensions/ampache.m4 \ + $(top_srcdir)/build/m4/extensions/appindicator.m4 \ + $(top_srcdir)/build/m4/extensions/awn.m4 \ + $(top_srcdir)/build/m4/extensions/banshee.m4 \ + $(top_srcdir)/build/m4/extensions/clutterflow.m4 \ + $(top_srcdir)/build/m4/extensions/common.m4 \ + $(top_srcdir)/build/m4/extensions/coverwallpaper.m4 \ + $(top_srcdir)/build/m4/extensions/duplicatesongdetector.m4 \ + $(top_srcdir)/build/m4/extensions/jamendo.m4 \ + $(top_srcdir)/build/m4/extensions/karaoke.m4 \ + $(top_srcdir)/build/m4/extensions/lastfmfingerprint.m4 \ + $(top_srcdir)/build/m4/extensions/lcd.m4 \ + $(top_srcdir)/build/m4/extensions/lirc.m4 \ + $(top_srcdir)/build/m4/extensions/liveradio.m4 \ + $(top_srcdir)/build/m4/extensions/lyrics.m4 \ + $(top_srcdir)/build/m4/extensions/magnatune.m4 \ + $(top_srcdir)/build/m4/extensions/mirage.m4 \ + $(top_srcdir)/build/m4/extensions/openvp.m4 \ + $(top_srcdir)/build/m4/extensions/radiostationfetcher.m4 \ + $(top_srcdir)/build/m4/extensions/randombylastfm.m4 \ + $(top_srcdir)/build/m4/extensions/streamrecorder.m4 \ + $(top_srcdir)/build/m4/extensions/telepathy.m4 \ + $(top_srcdir)/build/m4/extensions/zeitgeistdp.m4 \ + $(top_srcdir)/build/m4/shave/shave.m4 \ + $(top_srcdir)/build/m4/shamrock/expansions.m4 \ + $(top_srcdir)/build/m4/shamrock/gnome-doc.m4 \ + $(top_srcdir)/build/m4/shamrock/i18n.m4 \ + $(top_srcdir)/build/m4/shamrock/libtool.m4 \ + $(top_srcdir)/build/m4/shamrock/ltoptions.m4 \ + $(top_srcdir)/build/m4/shamrock/ltsugar.m4 \ + $(top_srcdir)/build/m4/shamrock/ltversion.m4 \ + $(top_srcdir)/build/m4/shamrock/lt~obsolete.m4 \ + $(top_srcdir)/build/m4/shamrock/mono.m4 \ + $(top_srcdir)/build/m4/shamrock/nunit.m4 \ + $(top_srcdir)/build/m4/shamrock/programs.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(moduledir)" +SCRIPTS = $(module_SCRIPTS) +DIST_SOURCES = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALL_LINGUAS = @ALL_LINGUAS@ +AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ +APPINDICATORSHARP_CFLAGS = @APPINDICATORSHARP_CFLAGS@ +APPINDICATORSHARP_LIBS = @APPINDICATORSHARP_LIBS@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BANSHEE_CFLAGS = @BANSHEE_CFLAGS@ +BANSHEE_EXTDIR = @BANSHEE_EXTDIR@ +BANSHEE_LASTFM_CFLAGS = @BANSHEE_LASTFM_CFLAGS@ +BANSHEE_LASTFM_LIBS = @BANSHEE_LASTFM_LIBS@ +BANSHEE_LIBDIR = @BANSHEE_LIBDIR@ +BANSHEE_LIBS = @BANSHEE_LIBS@ +BANSHEE_NOWPLAYING_CFLAGS = @BANSHEE_NOWPLAYING_CFLAGS@ +BANSHEE_NOWPLAYING_LIBS = @BANSHEE_NOWPLAYING_LIBS@ +BANSHEE_WEBBROWSER_CFLAGS = @BANSHEE_WEBBROWSER_CFLAGS@ +BANSHEE_WEBBROWSER_LIBS = @BANSHEE_WEBBROWSER_LIBS@ +BUILD_HOST_CPU = @BUILD_HOST_CPU@ +BUILD_HOST_OS = @BUILD_HOST_OS@ +BUILD_TIME = @BUILD_TIME@ +BUILD_VENDOR_ID = @BUILD_VENDOR_ID@ +CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CLUTTER_BUNDLEFILES = @CLUTTER_BUNDLEFILES@ +CLUTTER_SHARP_CFLAGS = @CLUTTER_SHARP_CFLAGS@ +CLUTTER_SHARP_LIBS = @CLUTTER_SHARP_LIBS@ +CONFIG_STATUS_DEPENDENCIES = @CONFIG_STATUS_DEPENDENCIES@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DATADIRNAME = @DATADIRNAME@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ +DOC_USER_FORMATS = @DOC_USER_FORMATS@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +ENABLE_RELEASE = @ENABLE_RELEASE@ +EXEEXT = @EXEEXT@ +EXTENSION_DIR = @EXTENSION_DIR@ +F77 = @F77@ +FC = @FC@ +FFTW3F_CFLAGS = @FFTW3F_CFLAGS@ +FFTW3F_LIBS = @FFTW3F_LIBS@ +FGREP = @FGREP@ +GCONFSHARP_CFLAGS = @GCONFSHARP_CFLAGS@ +GCONFSHARP_LIBS = @GCONFSHARP_LIBS@ +GCONFTOOL = @GCONFTOOL@ +GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ +GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ +GCONF_SHARP_20_CFLAGS = @GCONF_SHARP_20_CFLAGS@ +GCONF_SHARP_20_LIBS = @GCONF_SHARP_20_LIBS@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ +GMCS_FLAGS = @GMCS_FLAGS@ +GMOFILES = @GMOFILES@ +GMSGFMT = @GMSGFMT@ +GNOME_DOC_UTILS_CFLAGS = @GNOME_DOC_UTILS_CFLAGS@ +GNOME_DOC_UTILS_LIBS = @GNOME_DOC_UTILS_LIBS@ +GREP = @GREP@ +GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ +GSTREAMER_LIBS = @GSTREAMER_LIBS@ +HELP_DIR = @HELP_DIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INSTOBJEXT = @INSTOBJEXT@ +INTLLIBS = @INTLLIBS@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +JAY = @JAY@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBSAMPLERATE_CFLAGS = @LIBSAMPLERATE_CFLAGS@ +LIBSAMPLERATE_LIBS = @LIBSAMPLERATE_LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEFLAGS = @MAKEFLAGS@ +MAKEINFO = @MAKEINFO@ +MCS = @MCS@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MONO = @MONO@ +MONO_CFLAGS = @MONO_CFLAGS@ +MONO_LIBS = @MONO_LIBS@ +MONO_MODULE_CFLAGS = @MONO_MODULE_CFLAGS@ +MONO_MODULE_LIBS = @MONO_MODULE_LIBS@ +MSGFMT = @MSGFMT@ +MSGFMT_OPTS = @MSGFMT_OPTS@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +NOTIFYSHARP_CFLAGS = @NOTIFYSHARP_CFLAGS@ +NOTIFYSHARP_LIBS = @NOTIFYSHARP_LIBS@ +NOTIFY_SHARP_CFLAGS = @NOTIFY_SHARP_CFLAGS@ +NOTIFY_SHARP_LIBS = @NOTIFY_SHARP_LIBS@ +NUNIT_CFLAGS = @NUNIT_CFLAGS@ +NUNIT_CONSOLE = @NUNIT_CONSOLE@ +NUNIT_LIBS = @NUNIT_LIBS@ +OBJC = @OBJC@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OMF_DIR = @OMF_DIR@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +POFILES = @POFILES@ +POSUB = @POSUB@ +PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ +PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ +Q = @Q@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +TAO_FREEGLUT_CFLAGS = @TAO_FREEGLUT_CFLAGS@ +TAO_FREEGLUT_LIBS = @TAO_FREEGLUT_LIBS@ +TAO_OPENGL_CFLAGS = @TAO_OPENGL_CFLAGS@ +TAO_OPENGL_LIBS = @TAO_OPENGL_LIBS@ +TAO_SDL_CFLAGS = @TAO_SDL_CFLAGS@ +TAO_SDL_LIBS = @TAO_SDL_LIBS@ +USE_NLS = @USE_NLS@ +V = @V@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +ZEITGEIST_SHARP_CFLAGS = @ZEITGEIST_SHARP_CFLAGS@ +ZEITGEIST_SHARP_LIBS = @ZEITGEIST_SHARP_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +expanded_bindir = @expanded_bindir@ +expanded_datadir = @expanded_datadir@ +expanded_libdir = @expanded_libdir@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +ASSEMBLY = Banshee.DuplicateSongDetector +LINK = $(BANSHEE_LIBS) $(am__append_1) +SOURCES = \ + Banshee.DuplicateSongDetector/DuplicateSongDetectorAction.cs \ + Banshee.DuplicateSongDetector/DuplicateSongDetectorSource.cs \ + Banshee.DuplicateSongDetector/SongDuplicateView.cs + +RESOURCES = \ + DuplicateSongDetector.addin.xml \ + Resources/ActiveUI.xml \ + Resources/GlobalUI.xml + + +# Initializers +@ENABLE_DUPLICATESONGDETECTOR_TRUE@MONO_BASE_PATH = +@ENABLE_DUPLICATESONGDETECTOR_TRUE@MONO_ADDINS_PATH = + +# All extensions are libraries +@ENABLE_DUPLICATESONGDETECTOR_TRUE@TARGET = library +@ENABLE_DUPLICATESONGDETECTOR_TRUE@DIR_BIN = $(top_builddir)/bin + +# Install Paths +@ENABLE_DUPLICATESONGDETECTOR_TRUE@DEFAULT_INSTALL_DIR = $(pkglibdir) +@ENABLE_DUPLICATESONGDETECTOR_TRUE@EXTENSIONS_INSTALL_DIR = $(DEFAULT_INSTALL_DIR)/Extensions +@ENABLE_DUPLICATESONGDETECTOR_TRUE@UNIQUE_FILTER_PIPE = tr [:space:] \\n | sort | uniq +@ENABLE_DUPLICATESONGDETECTOR_TRUE@BUILD_DATA_DIR = $(top_builddir)/bin/share/$(PACKAGE) +@ENABLE_DUPLICATESONGDETECTOR_TRUE@SOURCES_BUILD = $(addprefix \ +@ENABLE_DUPLICATESONGDETECTOR_TRUE@ $(srcdir)/, $(SOURCES)) \ +@ENABLE_DUPLICATESONGDETECTOR_TRUE@ $(top_srcdir)/src/AssemblyInfo.cs +@ENABLE_DUPLICATESONGDETECTOR_TRUE@RESOURCES_EXPANDED = $(addprefix $(srcdir)/, $(RESOURCES)) +@ENABLE_DUPLICATESONGDETECTOR_TRUE@RESOURCES_BUILD = $(foreach resource, $(RESOURCES_EXPANDED), \ +@ENABLE_DUPLICATESONGDETECTOR_TRUE@ -resource:$(resource),$(notdir $(resource))) + +@ENABLE_DUPLICATESONGDETECTOR_TRUE@INSTALL_ICONS = $(top_srcdir)/build/private-icon-theme-installer "$(mkinstalldirs)" "$(INSTALL_DATA)" +@ENABLE_DUPLICATESONGDETECTOR_TRUE@THEME_ICONS_SOURCE = $(wildcard $(srcdir)/ThemeIcons/*/*/*.png) $(wildcard $(srcdir)/ThemeIcons/scalable/*/*.svg) +@ENABLE_DUPLICATESONGDETECTOR_TRUE@THEME_ICONS_RELATIVE = $(subst $(srcdir)/ThemeIcons/, , $(THEME_ICONS_SOURCE)) +@ENABLE_DUPLICATESONGDETECTOR_TRUE@ASSEMBLY_EXTENSION = $(strip $(patsubst library, dll, $(TARGET))) +@ENABLE_DUPLICATESONGDETECTOR_TRUE@ASSEMBLY_FILE = $(top_builddir)/bin/$(ASSEMBLY).$(ASSEMBLY_EXTENSION) +@ENABLE_DUPLICATESONGDETECTOR_TRUE@INSTALL_DIR_RESOLVED = $(firstword $(subst , $(DEFAULT_INSTALL_DIR), $(INSTALL_DIR))) +@ENABLE_DUPLICATESONGDETECTOR_TRUE@@ENABLE_TESTS_TRUE@ENABLE_TESTS_FLAG = "-define:ENABLE_TESTS" +@ENABLE_DUPLICATESONGDETECTOR_TRUE@FILTERED_LINK = $(shell echo "$(LINK)" | $(UNIQUE_FILTER_PIPE)) +@ENABLE_DUPLICATESONGDETECTOR_TRUE@DEP_LINK = $(shell echo "$(LINK)" | $(UNIQUE_FILTER_PIPE) | sed s,-r:,,g | grep '$(top_builddir)/bin/') +@ENABLE_DUPLICATESONGDETECTOR_TRUE@OUTPUT_FILES = \ +@ENABLE_DUPLICATESONGDETECTOR_TRUE@ $(ASSEMBLY_FILE) \ +@ENABLE_DUPLICATESONGDETECTOR_TRUE@ $(ASSEMBLY_FILE).mdb + +@ENABLE_DUPLICATESONGDETECTOR_TRUE@moduledir = $(EXTENSION_DIR) +@ENABLE_DUPLICATESONGDETECTOR_TRUE@module_SCRIPTS = $(OUTPUT_FILES) +@ENABLE_DUPLICATESONGDETECTOR_FALSE@EXTRA_DIST = $(SOURCES) $(RESOURCES) +@ENABLE_DUPLICATESONGDETECTOR_TRUE@EXTRA_DIST = $(SOURCES_BUILD) $(RESOURCES_EXPANDED) $(THEME_ICONS_SOURCE) +@ENABLE_DUPLICATESONGDETECTOR_TRUE@CLEANFILES = $(OUTPUT_FILES) TestResult.xml +@ENABLE_DUPLICATESONGDETECTOR_TRUE@DISTCLEANFILES = *.pidb +@ENABLE_DUPLICATESONGDETECTOR_TRUE@MAINTAINERCLEANFILES = Makefile.in +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/build/build.mk $(top_srcdir)/build/build.environment.mk $(top_srcdir)/build/build.rules.mk $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/DuplicateSongDetector/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/DuplicateSongDetector/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-moduleSCRIPTS: $(module_SCRIPTS) + @$(NORMAL_INSTALL) + test -z "$(moduledir)" || $(MKDIR_P) "$(DESTDIR)$(moduledir)" + @list='$(module_SCRIPTS)'; test -n "$(moduledir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n' \ + -e 'h;s|.*|.|' \ + -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) { files[d] = files[d] " " $$1; \ + if (++n[d] == $(am__install_max)) { \ + print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ + else { print "f", d "/" $$4, $$1 } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(moduledir)$$dir'"; \ + $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(moduledir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-moduleSCRIPTS: + @$(NORMAL_UNINSTALL) + @list='$(module_SCRIPTS)'; test -n "$(moduledir)" || exit 0; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 's,.*/,,;$(transform)'`; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(moduledir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(moduledir)" && rm -f $$files + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(SCRIPTS) +installdirs: + for dir in "$(DESTDIR)$(moduledir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +@ENABLE_DUPLICATESONGDETECTOR_FALSE@install-data-hook: +@ENABLE_DUPLICATESONGDETECTOR_FALSE@uninstall-hook: +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-moduleSCRIPTS + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) install-data-hook +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-moduleSCRIPTS + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) uninstall-hook +.MAKE: install-am install-data-am install-strip uninstall-am + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-data-hook install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-moduleSCRIPTS 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-hook \ + uninstall-moduleSCRIPTS + + +@ENABLE_DUPLICATESONGDETECTOR_TRUE@@ENABLE_TESTS_TRUE@test: $(ASSEMBLY_FILE) +@ENABLE_DUPLICATESONGDETECTOR_TRUE@@ENABLE_TESTS_TRUE@ if test "x$(TEST_ASSEMBLY)" = "xyes"; then \ +@ENABLE_DUPLICATESONGDETECTOR_TRUE@@ENABLE_TESTS_TRUE@ LD_LIBRARY_PATH="$(BANSHEE_LIBDIR):$(BANSHEE_EXTDIR):$(EXTENSION_DIR)/..:$(EXTENSION_DIR)${LD_LIBRARY_PATH+:$LD_LIBRARY_PATH}" \ +@ENABLE_DUPLICATESONGDETECTOR_TRUE@@ENABLE_TESTS_TRUE@ MONO_PATH="$(BANSHEE_LIBDIR):$(BANSHEE_EXTDIR):$(EXTENSION_DIR)/..:$(EXTENSION_DIR)${MONO_PATH+:$MONO_PATH}" \ +@ENABLE_DUPLICATESONGDETECTOR_TRUE@@ENABLE_TESTS_TRUE@ $(NUNIT_CONSOLE) -nologo -noshadow $(ASSEMBLY_FILE); \ +@ENABLE_DUPLICATESONGDETECTOR_TRUE@@ENABLE_TESTS_TRUE@ fi + +@ENABLE_DUPLICATESONGDETECTOR_TRUE@@ENABLE_TESTS_FALSE@test: + +@ENABLE_DUPLICATESONGDETECTOR_TRUE@check: test + +@ENABLE_DUPLICATESONGDETECTOR_TRUE@all: $(ASSEMBLY_FILE) theme-icons + +@ENABLE_DUPLICATESONGDETECTOR_TRUE@run: +@ENABLE_DUPLICATESONGDETECTOR_TRUE@ @pushd $(top_builddir); \ +@ENABLE_DUPLICATESONGDETECTOR_TRUE@ make run \ +@ENABLE_DUPLICATESONGDETECTOR_TRUE@ popd; + +@ENABLE_DUPLICATESONGDETECTOR_TRUE@build-debug: +@ENABLE_DUPLICATESONGDETECTOR_TRUE@ @echo $(DEP_LINK) + +@ENABLE_DUPLICATESONGDETECTOR_TRUE@$(ASSEMBLY_FILE).mdb: $(ASSEMBLY_FILE) + +@ENABLE_DUPLICATESONGDETECTOR_TRUE@$(ASSEMBLY_FILE): $(SOURCES_BUILD) $(RESOURCES_EXPANDED) $(DEP_LINK) +@ENABLE_DUPLICATESONGDETECTOR_TRUE@ @mkdir -p $(top_builddir)/bin +@ENABLE_DUPLICATESONGDETECTOR_TRUE@ $(MCS) \ +@ENABLE_DUPLICATESONGDETECTOR_TRUE@ $(GMCS_FLAGS) \ +@ENABLE_DUPLICATESONGDETECTOR_TRUE@ $(ENABLE_TESTS_FLAG) \ +@ENABLE_DUPLICATESONGDETECTOR_TRUE@ $(ASSEMBLY_BUILD_FLAGS) \ +@ENABLE_DUPLICATESONGDETECTOR_TRUE@ -debug -target:$(TARGET) -out:$@ \ +@ENABLE_DUPLICATESONGDETECTOR_TRUE@ $(BUILD_DEFINES) \ +@ENABLE_DUPLICATESONGDETECTOR_TRUE@ $(FILTERED_LINK) $(RESOURCES_BUILD) $(SOURCES_BUILD) +@ENABLE_DUPLICATESONGDETECTOR_TRUE@ @if [ -e $(srcdir)/$(notdir $@.config) ]; then \ +@ENABLE_DUPLICATESONGDETECTOR_TRUE@ cp $(srcdir)/$(notdir $@.config) $(top_builddir)/bin; \ +@ENABLE_DUPLICATESONGDETECTOR_TRUE@ fi; +@ENABLE_DUPLICATESONGDETECTOR_TRUE@ @if [ ! -z "$(EXTRA_BUNDLE)" ]; then \ +@ENABLE_DUPLICATESONGDETECTOR_TRUE@ cp $(EXTRA_BUNDLE) $(top_builddir)/bin; \ +@ENABLE_DUPLICATESONGDETECTOR_TRUE@ fi; + +@ENABLE_DUPLICATESONGDETECTOR_TRUE@theme-icons: $(THEME_ICONS_SOURCE) +@ENABLE_DUPLICATESONGDETECTOR_TRUE@ @$(INSTALL_ICONS) -il "$(BUILD_DATA_DIR)" "$(srcdir)" $(THEME_ICONS_RELATIVE) + +@ENABLE_DUPLICATESONGDETECTOR_TRUE@install-data-hook: $(THEME_ICONS_SOURCE) +@ENABLE_DUPLICATESONGDETECTOR_TRUE@ @$(INSTALL_ICONS) -i "$(DESTDIR)$(pkgdatadir)" "$(srcdir)" $(THEME_ICONS_RELATIVE) +@ENABLE_DUPLICATESONGDETECTOR_TRUE@ $(EXTRA_INSTALL_DATA_HOOK) + +@ENABLE_DUPLICATESONGDETECTOR_TRUE@uninstall-hook: $(THEME_ICONS_SOURCE) +@ENABLE_DUPLICATESONGDETECTOR_TRUE@ @$(INSTALL_ICONS) -u "$(DESTDIR)$(pkgdatadir)" "$(srcdir)" $(THEME_ICONS_RELATIVE) +@ENABLE_DUPLICATESONGDETECTOR_TRUE@ $(EXTRA_UNINSTALL_HOOK) + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -Nru banshee-community-extensions-2.0.1/src/DuplicateSongDetector/Resources/ActiveUI.xml banshee-community-extensions-2.2.0/src/DuplicateSongDetector/Resources/ActiveUI.xml --- banshee-community-extensions-2.0.1/src/DuplicateSongDetector/Resources/ActiveUI.xml 1970-01-01 00:00:00.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/DuplicateSongDetector/Resources/ActiveUI.xml 2011-09-08 17:44:26.000000000 +0000 @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff -Nru banshee-community-extensions-2.0.1/src/DuplicateSongDetector/Resources/GlobalUI.xml banshee-community-extensions-2.2.0/src/DuplicateSongDetector/Resources/GlobalUI.xml --- banshee-community-extensions-2.0.1/src/DuplicateSongDetector/Resources/GlobalUI.xml 1970-01-01 00:00:00.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/DuplicateSongDetector/Resources/GlobalUI.xml 2011-08-25 16:59:30.000000000 +0000 @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff -Nru banshee-community-extensions-2.0.1/src/Jamendo/Makefile.in banshee-community-extensions-2.2.0/src/Jamendo/Makefile.in --- banshee-community-extensions-2.0.1/src/Jamendo/Makefile.in 2011-05-03 20:45:05.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Jamendo/Makefile.in 2011-09-19 20:36:51.000000000 +0000 @@ -42,6 +42,7 @@ subdir = src/Jamendo ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/m4/extensions/alarmclock.m4 \ + $(top_srcdir)/build/m4/extensions/albumartwriter.m4 \ $(top_srcdir)/build/m4/extensions/ampache.m4 \ $(top_srcdir)/build/m4/extensions/appindicator.m4 \ $(top_srcdir)/build/m4/extensions/awn.m4 \ @@ -49,6 +50,7 @@ $(top_srcdir)/build/m4/extensions/clutterflow.m4 \ $(top_srcdir)/build/m4/extensions/common.m4 \ $(top_srcdir)/build/m4/extensions/coverwallpaper.m4 \ + $(top_srcdir)/build/m4/extensions/duplicatesongdetector.m4 \ $(top_srcdir)/build/m4/extensions/jamendo.m4 \ $(top_srcdir)/build/m4/extensions/karaoke.m4 \ $(top_srcdir)/build/m4/extensions/lastfmfingerprint.m4 \ @@ -68,6 +70,11 @@ $(top_srcdir)/build/m4/shamrock/expansions.m4 \ $(top_srcdir)/build/m4/shamrock/gnome-doc.m4 \ $(top_srcdir)/build/m4/shamrock/i18n.m4 \ + $(top_srcdir)/build/m4/shamrock/libtool.m4 \ + $(top_srcdir)/build/m4/shamrock/ltoptions.m4 \ + $(top_srcdir)/build/m4/shamrock/ltsugar.m4 \ + $(top_srcdir)/build/m4/shamrock/ltversion.m4 \ + $(top_srcdir)/build/m4/shamrock/lt~obsolete.m4 \ $(top_srcdir)/build/m4/shamrock/mono.m4 \ $(top_srcdir)/build/m4/shamrock/nunit.m4 \ $(top_srcdir)/build/m4/shamrock/programs.m4 \ @@ -104,7 +111,6 @@ DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AM_MAKEFLAGS = @AM_MAKEFLAGS@ diff -Nru banshee-community-extensions-2.0.1/src/Karaoke/Banshee.Karaoke/Gui/KaraokePane.cs banshee-community-extensions-2.2.0/src/Karaoke/Banshee.Karaoke/Gui/KaraokePane.cs --- banshee-community-extensions-2.0.1/src/Karaoke/Banshee.Karaoke/Gui/KaraokePane.cs 2011-03-19 17:15:01.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Karaoke/Banshee.Karaoke/Gui/KaraokePane.cs 2011-09-10 12:51:46.000000000 +0000 @@ -45,7 +45,7 @@ private KaraokeView view; private ContextPage context_page; private TrackInfo track; - private Timer t; + private Timer timer; private Label disconnected; public KaraokePane (ContextPage context_page) @@ -53,7 +53,28 @@ ShowBorder = false; ShowTabs = false; this.context_page = context_page; - InitComponents (); + + timer = new Timer (TimerTimedOut, null, System.Threading.Timeout.Infinite, System.Threading.Timeout.Infinite); + ServiceManager.PlayerEngine.ConnectEvent (OnTrackChange, PlayerEvent.StateChange); + ServiceManager.PlayerEngine.ConnectEvent (OnSeek, PlayerEvent.Seek); + + disconnected = new Label (AddinManager.CurrentLocalizer.GetString ( + "You are disconnected from the internet, so karaoke lyrics are not available.")); + Add (disconnected); + ShowAll (); + } + + private KaraokeView View { + get { + if (view == null) { + this.view = new KaraokeView (); + view.Zoom = 1.2f; + Add (view); + ShowAll (); + } + + return view; + } } public TrackInfo Track { @@ -65,32 +86,34 @@ if (!ServiceManager.Get ().Connected) { this.CurrentPage = this.PageNum (disconnected); } else { - view.LoadLyrics (track); - view.LoadStatusChanged += OnViewLoadStatusChanged; - t.Change (0, 2000); - this.CurrentPage = this.PageNum (view); + View.LoadLyrics (track); + View.LoadStatusChanged += OnViewLoadStatusChanged; + timer.Change (0, 2000); + this.CurrentPage = this.PageNum (View); } context_page.SetState (Banshee.ContextPane.ContextState.Loaded); } else { context_page.SetState (Banshee.ContextPane.ContextState.NotLoaded); - t.Change (System.Threading.Timeout.Infinite, System.Threading.Timeout.Infinite); + timer.Change (System.Threading.Timeout.Infinite, System.Threading.Timeout.Infinite); } } } void OnViewLoadStatusChanged (object sender, EventArgs e) { - if (view.LoadStatus == Banshee.WebBrowser.OssiferLoadStatus.FirstVisuallyNonEmptyLayout) { + if (View.LoadStatus == Banshee.WebBrowser.OssiferLoadStatus.FirstVisuallyNonEmptyLayout) { SetStyle (); - view.LoadStatusChanged -= OnViewLoadStatusChanged; + View.LoadStatusChanged -= OnViewLoadStatusChanged; } } private void TimerTimedOut (object o) { - if (this.CurrentPage == this.PageNum (disconnected)) return; + if (this.CurrentPage == this.PageNum (disconnected)) { + return; + } ServiceStack.Application.Invoke (delegate { - if (track != null && ServiceManager.PlayerEngine.IsPlaying (track) && view.LoadStatus != Banshee.WebBrowser.OssiferLoadStatus.Failed) { + if (track != null && ServiceManager.PlayerEngine.IsPlaying (track) && View.LoadStatus != Banshee.WebBrowser.OssiferLoadStatus.Failed) { SetSongTime (); } }); @@ -98,43 +121,34 @@ private void PauseScrolling () { - if (this.CurrentPage == this.PageNum (disconnected)) return; - view.ExecuteScript (String.Format ("window.postMessage('pause','http://youtubelyric.com');", ServiceManager.PlayerEngine.Position / 1000)); + if (this.CurrentPage == this.PageNum (disconnected)) { + return; + } + View.ExecuteScript (String.Format ("window.postMessage('pause','http://youtubelyric.com');", ServiceManager.PlayerEngine.Position / 1000)); } private void ResumeScrolling () { - if (this.CurrentPage == this.PageNum (disconnected)) return; - view.ExecuteScript (String.Format ("window.postMessage('play','http://youtubelyric.com');", ServiceManager.PlayerEngine.Position / 1000)); + if (this.CurrentPage == this.PageNum (disconnected)) { + return; + } + View.ExecuteScript (String.Format ("window.postMessage('play','http://youtubelyric.com');", ServiceManager.PlayerEngine.Position / 1000)); } private void SetSongTime () { - if (this.CurrentPage == this.PageNum (disconnected)) return; - view.ExecuteScript (String.Format ("window.postMessage({0},'http://youtubelyric.com');", ServiceManager.PlayerEngine.Position / 1000)); + if (this.CurrentPage == this.PageNum (disconnected)) { + return; + } + View.ExecuteScript (String.Format ("window.postMessage({0},'http://youtubelyric.com');", ServiceManager.PlayerEngine.Position / 1000)); } private void SetStyle () { - if (this.CurrentPage == this.PageNum (disconnected)) return; - view.ExecuteScript ("if (document.getElementById ('lyricbox')) { document.getElementById ('lyricbox').style.fontSize='2.5em'; }"); - } - - public void InitComponents () - { - this.view = new KaraokeView (); - view.Zoom = 1.2f; - t = new Timer (TimerTimedOut, null, System.Threading.Timeout.Infinite, System.Threading.Timeout.Infinite); - ServiceManager.PlayerEngine.ConnectEvent (OnTrackChange, PlayerEvent.StateChange); - ServiceManager.PlayerEngine.ConnectEvent (OnSeek, PlayerEvent.Seek); - - this.disconnected = new Label (AddinManager.CurrentLocalizer.GetString ("You are disconnected" + - " from the internet, so karaoke lyrics are not available.")); - this.Add (disconnected); - this.Add (view); - - //PackStart (this.view, true, true, 0); - this.ShowAll (); + if (this.CurrentPage == this.PageNum (disconnected)) { + return; + } + View.ExecuteScript ("if (document.getElementById ('lyricbox')) { document.getElementById ('lyricbox').style.fontSize='2.5em'; }"); } private void OnTrackChange (PlayerEventArgs args) @@ -154,6 +168,5 @@ { SetSongTime (); } - } } diff -Nru banshee-community-extensions-2.0.1/src/Karaoke/Banshee.Karaoke/Gui/KaraokeView.cs banshee-community-extensions-2.2.0/src/Karaoke/Banshee.Karaoke/Gui/KaraokeView.cs --- banshee-community-extensions-2.0.1/src/Karaoke/Banshee.Karaoke/Gui/KaraokeView.cs 2011-03-19 17:15:01.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Karaoke/Banshee.Karaoke/Gui/KaraokeView.cs 2011-09-10 12:37:23.000000000 +0000 @@ -47,7 +47,9 @@ protected override OssiferNavigationResponse OnNavigationPolicyDecisionRequested (string uri) { - if (uri.StartsWith ("http://youtubelyric.com/lyric")) return OssiferNavigationResponse.Accept; + if (uri.StartsWith ("http://youtubelyric.com/lyric")) { + return OssiferNavigationResponse.Accept; + } return OssiferNavigationResponse.Ignore; } @@ -65,7 +67,8 @@ public void LoadLyrics (TrackInfo track) { - LoadUri (String.Format ("http://youtubelyric.com/lyric/showlyric.php?artist={0}&song={1}",track.DisplayArtistName, track.DisplayTrackTitle)); + LoadUri (String.Format ("http://youtubelyric.com/lyric/showlyric.php?artist={0}&song={1}", + track.DisplayArtistName, track.DisplayTrackTitle)); } } } diff -Nru banshee-community-extensions-2.0.1/src/Karaoke/Banshee.Karaoke/KaraokeService.cs banshee-community-extensions-2.2.0/src/Karaoke/Banshee.Karaoke/KaraokeService.cs --- banshee-community-extensions-2.0.1/src/Karaoke/Banshee.Karaoke/KaraokeService.cs 2011-05-03 18:52:17.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Karaoke/Banshee.Karaoke/KaraokeService.cs 2011-09-10 12:39:42.000000000 +0000 @@ -37,10 +37,8 @@ namespace Banshee.Karaoke { - public class KaraokeService : IExtensionService, IDelayedInitializeService, IDisposable { - Bin audiobin; Bin playbin; Bin audiotee; @@ -70,7 +68,6 @@ effect_level = effect_level / 100; filter_band = (float)FilterBandEntry.Get (); filter_width = (float)FilterWidthEntry.Get (); - } #region IExtensionService implementation @@ -109,7 +106,6 @@ action_service.UIManager.InsertActionGroup (actions, 0); ui_menu_id = action_service.UIManager.AddUiFromResource ("KaraokeMenu.xml"); ui_button_id = action_service.UIManager.AddUiFromResource ("KaraokeButton.xml"); - } /// @@ -133,7 +129,6 @@ audiokaraoke.SetFloatProperty ("level", effect_level); audiokaraoke.SetFloatProperty ("mono-level", effect_level); } - } /// @@ -153,8 +148,9 @@ void OnLyricsEnabledChanged () { EventHandler handler = LyricsEnabledChanged; - if (handler != null) + if (handler != null) { handler (this, new EventArgs ()); + } } void IDelayedInitializeService.DelayedInitialize () @@ -165,13 +161,13 @@ audiobin = new Bin (ServiceManager.PlayerEngine.ActiveEngine.GetBaseElements ()[1]); audiotee = new Bin (ServiceManager.PlayerEngine.ActiveEngine.GetBaseElements ()[2]); - if (playbin.IsNull ()) + if (playbin.IsNull ()) { Hyena.Log.Debug ("[Karaoke] Playbin is not yet initialized, cannot start Karaoke Mode"); + } audiokaraoke = audiobin.GetByName ("karaoke"); - if (audiokaraoke.IsNull ()) - { + if (audiokaraoke.IsNull ()) { audiokaraoke = ElementFactory.Make ("audiokaraoke","karaoke"); //add audiokaraoke to audiobin @@ -193,29 +189,27 @@ audiokaraoke.SetFloatProperty ("level", effect_level); audiokaraoke.SetFloatProperty ("mono-level", effect_level); } - - //Hyena.Log.DebugFormat ("Karaoke service has been initialized! {0}", audiobin.ToString ()); } #endregion #region IDisposable implementation void IDisposable.Dispose () { - if (has_karaoke && !playbin.IsNull () && !audiokaraoke.IsNull ()) - { + if (has_karaoke && !playbin.IsNull () && !audiokaraoke.IsNull ()) { audiokaraoke.SetFloatProperty ("level", 0); audiokaraoke.SetFloatProperty ("mono-level", 0); } - if (ui_menu_id > 0) + if (ui_menu_id > 0) { action_service.UIManager.RemoveUi (ui_menu_id); - - if (ui_button_id > 0) + } + if (ui_button_id > 0) { action_service.UIManager.RemoveUi (ui_button_id); - - if (actions != null) + } + if (actions != null) { action_service.UIManager.RemoveActionGroup (actions); - actions = null; + actions = null; + } } #endregion @@ -241,7 +235,9 @@ public void ApplyKaraokeEffectLevel (float new_level) { - if (!karaoke_enabled) return; + if (!karaoke_enabled) { + return; + } audiokaraoke.SetFloatProperty ("level", new_level); audiokaraoke.SetFloatProperty ("mono-level", new_level); } diff -Nru banshee-community-extensions-2.0.1/src/Karaoke/Makefile.in banshee-community-extensions-2.2.0/src/Karaoke/Makefile.in --- banshee-community-extensions-2.0.1/src/Karaoke/Makefile.in 2011-05-03 20:45:05.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Karaoke/Makefile.in 2011-09-19 20:36:51.000000000 +0000 @@ -42,6 +42,7 @@ subdir = src/Karaoke ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/m4/extensions/alarmclock.m4 \ + $(top_srcdir)/build/m4/extensions/albumartwriter.m4 \ $(top_srcdir)/build/m4/extensions/ampache.m4 \ $(top_srcdir)/build/m4/extensions/appindicator.m4 \ $(top_srcdir)/build/m4/extensions/awn.m4 \ @@ -49,6 +50,7 @@ $(top_srcdir)/build/m4/extensions/clutterflow.m4 \ $(top_srcdir)/build/m4/extensions/common.m4 \ $(top_srcdir)/build/m4/extensions/coverwallpaper.m4 \ + $(top_srcdir)/build/m4/extensions/duplicatesongdetector.m4 \ $(top_srcdir)/build/m4/extensions/jamendo.m4 \ $(top_srcdir)/build/m4/extensions/karaoke.m4 \ $(top_srcdir)/build/m4/extensions/lastfmfingerprint.m4 \ @@ -68,6 +70,11 @@ $(top_srcdir)/build/m4/shamrock/expansions.m4 \ $(top_srcdir)/build/m4/shamrock/gnome-doc.m4 \ $(top_srcdir)/build/m4/shamrock/i18n.m4 \ + $(top_srcdir)/build/m4/shamrock/libtool.m4 \ + $(top_srcdir)/build/m4/shamrock/ltoptions.m4 \ + $(top_srcdir)/build/m4/shamrock/ltsugar.m4 \ + $(top_srcdir)/build/m4/shamrock/ltversion.m4 \ + $(top_srcdir)/build/m4/shamrock/lt~obsolete.m4 \ $(top_srcdir)/build/m4/shamrock/mono.m4 \ $(top_srcdir)/build/m4/shamrock/nunit.m4 \ $(top_srcdir)/build/m4/shamrock/programs.m4 \ @@ -104,7 +111,6 @@ DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AM_MAKEFLAGS = @AM_MAKEFLAGS@ diff -Nru banshee-community-extensions-2.0.1/src/LastfmFingerprint/Banshee.LastfmFingerprint/Banshee.LastfmFingerprint.dll.config banshee-community-extensions-2.2.0/src/LastfmFingerprint/Banshee.LastfmFingerprint/Banshee.LastfmFingerprint.dll.config --- banshee-community-extensions-2.0.1/src/LastfmFingerprint/Banshee.LastfmFingerprint/Banshee.LastfmFingerprint.dll.config 1970-01-01 00:00:00.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/LastfmFingerprint/Banshee.LastfmFingerprint/Banshee.LastfmFingerprint.dll.config 2011-08-15 09:42:41.000000000 +0000 @@ -0,0 +1,3 @@ + + + diff -Nru banshee-community-extensions-2.0.1/src/LastfmFingerprint/Banshee.LastfmFingerprint/Makefile.am banshee-community-extensions-2.2.0/src/LastfmFingerprint/Banshee.LastfmFingerprint/Makefile.am --- banshee-community-extensions-2.0.1/src/LastfmFingerprint/Banshee.LastfmFingerprint/Makefile.am 2011-01-06 19:19:12.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/LastfmFingerprint/Banshee.LastfmFingerprint/Makefile.am 2011-08-22 19:42:50.000000000 +0000 @@ -1,4 +1,5 @@ ASSEMBLY = Banshee.LastfmFingerprint +DLLCONFIG = $(ASSEMBLY).dll.config LINK = $(BANSHEE_LIBS) $(BANSHEE_LASTFM_LIBS) SOURCES = \ @@ -14,4 +15,10 @@ LastfmFingerprint.addin.xml \ Resources/GlobalUI.xml +if ENABLE_LASTFMFINGERPRINT include $(top_srcdir)/build/build.mk +EXTRA_DIST += $(DLLCONFIG) +module_DATA = $(DLLCONFIG) +else +EXTRA_DIST = $(SOURCES) $(RESOURCES) $(DLLCONFIG) +endif diff -Nru banshee-community-extensions-2.0.1/src/LastfmFingerprint/Banshee.LastfmFingerprint/Makefile.in banshee-community-extensions-2.2.0/src/LastfmFingerprint/Banshee.LastfmFingerprint/Makefile.in --- banshee-community-extensions-2.0.1/src/LastfmFingerprint/Banshee.LastfmFingerprint/Makefile.in 2011-05-03 20:45:05.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/LastfmFingerprint/Banshee.LastfmFingerprint/Makefile.in 2011-09-19 20:36:51.000000000 +0000 @@ -15,6 +15,7 @@ @SET_MAKE@ + VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ @@ -38,10 +39,11 @@ $(top_srcdir)/build/build.environment.mk \ $(top_srcdir)/build/build.mk \ $(top_srcdir)/build/build.rules.mk -@ENABLE_TESTS_TRUE@am__append_1 = " $(NUNIT_LIBS) $(MONO_NUNIT_LIBS)" +@ENABLE_LASTFMFINGERPRINT_TRUE@@ENABLE_TESTS_TRUE@am__append_1 = " $(NUNIT_LIBS) $(MONO_NUNIT_LIBS)" subdir = src/LastfmFingerprint/Banshee.LastfmFingerprint ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/m4/extensions/alarmclock.m4 \ + $(top_srcdir)/build/m4/extensions/albumartwriter.m4 \ $(top_srcdir)/build/m4/extensions/ampache.m4 \ $(top_srcdir)/build/m4/extensions/appindicator.m4 \ $(top_srcdir)/build/m4/extensions/awn.m4 \ @@ -49,6 +51,7 @@ $(top_srcdir)/build/m4/extensions/clutterflow.m4 \ $(top_srcdir)/build/m4/extensions/common.m4 \ $(top_srcdir)/build/m4/extensions/coverwallpaper.m4 \ + $(top_srcdir)/build/m4/extensions/duplicatesongdetector.m4 \ $(top_srcdir)/build/m4/extensions/jamendo.m4 \ $(top_srcdir)/build/m4/extensions/karaoke.m4 \ $(top_srcdir)/build/m4/extensions/lastfmfingerprint.m4 \ @@ -68,6 +71,11 @@ $(top_srcdir)/build/m4/shamrock/expansions.m4 \ $(top_srcdir)/build/m4/shamrock/gnome-doc.m4 \ $(top_srcdir)/build/m4/shamrock/i18n.m4 \ + $(top_srcdir)/build/m4/shamrock/libtool.m4 \ + $(top_srcdir)/build/m4/shamrock/ltoptions.m4 \ + $(top_srcdir)/build/m4/shamrock/ltsugar.m4 \ + $(top_srcdir)/build/m4/shamrock/ltversion.m4 \ + $(top_srcdir)/build/m4/shamrock/lt~obsolete.m4 \ $(top_srcdir)/build/m4/shamrock/mono.m4 \ $(top_srcdir)/build/m4/shamrock/nunit.m4 \ $(top_srcdir)/build/m4/shamrock/programs.m4 \ @@ -99,12 +107,12 @@ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__installdirs = "$(DESTDIR)$(moduledir)" +am__installdirs = "$(DESTDIR)$(moduledir)" "$(DESTDIR)$(moduledir)" SCRIPTS = $(module_SCRIPTS) DIST_SOURCES = +DATA = $(module_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AM_MAKEFLAGS = @AM_MAKEFLAGS@ @@ -325,6 +333,7 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ASSEMBLY = Banshee.LastfmFingerprint +DLLCONFIG = $(ASSEMBLY).dll.config LINK = $(BANSHEE_LIBS) $(BANSHEE_LASTFM_LIBS) $(am__append_1) SOURCES = \ AudioDecoder.cs \ @@ -341,43 +350,49 @@ # Initializers -MONO_BASE_PATH = -MONO_ADDINS_PATH = +@ENABLE_LASTFMFINGERPRINT_TRUE@MONO_BASE_PATH = +@ENABLE_LASTFMFINGERPRINT_TRUE@MONO_ADDINS_PATH = # All extensions are libraries -TARGET = library -DIR_BIN = $(top_builddir)/bin +@ENABLE_LASTFMFINGERPRINT_TRUE@TARGET = library +@ENABLE_LASTFMFINGERPRINT_TRUE@DIR_BIN = $(top_builddir)/bin # Install Paths -DEFAULT_INSTALL_DIR = $(pkglibdir) -EXTENSIONS_INSTALL_DIR = $(DEFAULT_INSTALL_DIR)/Extensions -UNIQUE_FILTER_PIPE = tr [:space:] \\n | sort | uniq -BUILD_DATA_DIR = $(top_builddir)/bin/share/$(PACKAGE) -SOURCES_BUILD = $(addprefix $(srcdir)/, $(SOURCES)) \ - $(top_srcdir)/src/AssemblyInfo.cs -RESOURCES_EXPANDED = $(addprefix $(srcdir)/, $(RESOURCES)) -RESOURCES_BUILD = $(foreach resource, $(RESOURCES_EXPANDED), \ - -resource:$(resource),$(notdir $(resource))) - -INSTALL_ICONS = $(top_srcdir)/build/private-icon-theme-installer "$(mkinstalldirs)" "$(INSTALL_DATA)" -THEME_ICONS_SOURCE = $(wildcard $(srcdir)/ThemeIcons/*/*/*.png) $(wildcard $(srcdir)/ThemeIcons/scalable/*/*.svg) -THEME_ICONS_RELATIVE = $(subst $(srcdir)/ThemeIcons/, , $(THEME_ICONS_SOURCE)) -ASSEMBLY_EXTENSION = $(strip $(patsubst library, dll, $(TARGET))) -ASSEMBLY_FILE = $(top_builddir)/bin/$(ASSEMBLY).$(ASSEMBLY_EXTENSION) -INSTALL_DIR_RESOLVED = $(firstword $(subst , $(DEFAULT_INSTALL_DIR), $(INSTALL_DIR))) -@ENABLE_TESTS_TRUE@ENABLE_TESTS_FLAG = "-define:ENABLE_TESTS" -FILTERED_LINK = $(shell echo "$(LINK)" | $(UNIQUE_FILTER_PIPE)) -DEP_LINK = $(shell echo "$(LINK)" | $(UNIQUE_FILTER_PIPE) | sed s,-r:,,g | grep '$(top_builddir)/bin/') -OUTPUT_FILES = \ - $(ASSEMBLY_FILE) \ - $(ASSEMBLY_FILE).mdb - -moduledir = $(EXTENSION_DIR) -module_SCRIPTS = $(OUTPUT_FILES) -EXTRA_DIST = $(SOURCES_BUILD) $(RESOURCES_EXPANDED) $(THEME_ICONS_SOURCE) -CLEANFILES = $(OUTPUT_FILES) TestResult.xml -DISTCLEANFILES = *.pidb -MAINTAINERCLEANFILES = Makefile.in +@ENABLE_LASTFMFINGERPRINT_TRUE@DEFAULT_INSTALL_DIR = $(pkglibdir) +@ENABLE_LASTFMFINGERPRINT_TRUE@EXTENSIONS_INSTALL_DIR = $(DEFAULT_INSTALL_DIR)/Extensions +@ENABLE_LASTFMFINGERPRINT_TRUE@UNIQUE_FILTER_PIPE = tr [:space:] \\n | sort | uniq +@ENABLE_LASTFMFINGERPRINT_TRUE@BUILD_DATA_DIR = $(top_builddir)/bin/share/$(PACKAGE) +@ENABLE_LASTFMFINGERPRINT_TRUE@SOURCES_BUILD = $(addprefix $(srcdir)/, \ +@ENABLE_LASTFMFINGERPRINT_TRUE@ $(SOURCES)) \ +@ENABLE_LASTFMFINGERPRINT_TRUE@ $(top_srcdir)/src/AssemblyInfo.cs +@ENABLE_LASTFMFINGERPRINT_TRUE@RESOURCES_EXPANDED = $(addprefix $(srcdir)/, $(RESOURCES)) +@ENABLE_LASTFMFINGERPRINT_TRUE@RESOURCES_BUILD = $(foreach resource, $(RESOURCES_EXPANDED), \ +@ENABLE_LASTFMFINGERPRINT_TRUE@ -resource:$(resource),$(notdir $(resource))) + +@ENABLE_LASTFMFINGERPRINT_TRUE@INSTALL_ICONS = $(top_srcdir)/build/private-icon-theme-installer "$(mkinstalldirs)" "$(INSTALL_DATA)" +@ENABLE_LASTFMFINGERPRINT_TRUE@THEME_ICONS_SOURCE = $(wildcard $(srcdir)/ThemeIcons/*/*/*.png) $(wildcard $(srcdir)/ThemeIcons/scalable/*/*.svg) +@ENABLE_LASTFMFINGERPRINT_TRUE@THEME_ICONS_RELATIVE = $(subst $(srcdir)/ThemeIcons/, , $(THEME_ICONS_SOURCE)) +@ENABLE_LASTFMFINGERPRINT_TRUE@ASSEMBLY_EXTENSION = $(strip $(patsubst library, dll, $(TARGET))) +@ENABLE_LASTFMFINGERPRINT_TRUE@ASSEMBLY_FILE = $(top_builddir)/bin/$(ASSEMBLY).$(ASSEMBLY_EXTENSION) +@ENABLE_LASTFMFINGERPRINT_TRUE@INSTALL_DIR_RESOLVED = $(firstword $(subst , $(DEFAULT_INSTALL_DIR), $(INSTALL_DIR))) +@ENABLE_LASTFMFINGERPRINT_TRUE@@ENABLE_TESTS_TRUE@ENABLE_TESTS_FLAG = "-define:ENABLE_TESTS" +@ENABLE_LASTFMFINGERPRINT_TRUE@FILTERED_LINK = $(shell echo "$(LINK)" | $(UNIQUE_FILTER_PIPE)) +@ENABLE_LASTFMFINGERPRINT_TRUE@DEP_LINK = $(shell echo "$(LINK)" | $(UNIQUE_FILTER_PIPE) | sed s,-r:,,g | grep '$(top_builddir)/bin/') +@ENABLE_LASTFMFINGERPRINT_TRUE@OUTPUT_FILES = \ +@ENABLE_LASTFMFINGERPRINT_TRUE@ $(ASSEMBLY_FILE) \ +@ENABLE_LASTFMFINGERPRINT_TRUE@ $(ASSEMBLY_FILE).mdb + +@ENABLE_LASTFMFINGERPRINT_TRUE@moduledir = $(EXTENSION_DIR) +@ENABLE_LASTFMFINGERPRINT_TRUE@module_SCRIPTS = $(OUTPUT_FILES) +@ENABLE_LASTFMFINGERPRINT_FALSE@EXTRA_DIST = $(SOURCES) $(RESOURCES) $(DLLCONFIG) +@ENABLE_LASTFMFINGERPRINT_TRUE@EXTRA_DIST = $(SOURCES_BUILD) \ +@ENABLE_LASTFMFINGERPRINT_TRUE@ $(RESOURCES_EXPANDED) \ +@ENABLE_LASTFMFINGERPRINT_TRUE@ $(THEME_ICONS_SOURCE) \ +@ENABLE_LASTFMFINGERPRINT_TRUE@ $(DLLCONFIG) +@ENABLE_LASTFMFINGERPRINT_TRUE@CLEANFILES = $(OUTPUT_FILES) TestResult.xml +@ENABLE_LASTFMFINGERPRINT_TRUE@DISTCLEANFILES = *.pidb +@ENABLE_LASTFMFINGERPRINT_TRUE@MAINTAINERCLEANFILES = Makefile.in +@ENABLE_LASTFMFINGERPRINT_TRUE@module_DATA = $(DLLCONFIG) all: all-am .SUFFIXES: @@ -451,6 +466,26 @@ clean-libtool: -rm -rf .libs _libs +install-moduleDATA: $(module_DATA) + @$(NORMAL_INSTALL) + test -z "$(moduledir)" || $(MKDIR_P) "$(DESTDIR)$(moduledir)" + @list='$(module_DATA)'; test -n "$(moduledir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(moduledir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(moduledir)" || exit $$?; \ + done + +uninstall-moduleDATA: + @$(NORMAL_UNINSTALL) + @list='$(module_DATA)'; test -n "$(moduledir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(moduledir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(moduledir)" && rm -f $$files tags: TAGS TAGS: @@ -490,9 +525,9 @@ done check-am: all-am check: check-am -all-am: Makefile $(SCRIPTS) +all-am: Makefile $(SCRIPTS) $(DATA) installdirs: - for dir in "$(DESTDIR)$(moduledir)"; do \ + for dir in "$(DESTDIR)$(moduledir)" "$(DESTDIR)$(moduledir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am @@ -523,6 +558,8 @@ @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +@ENABLE_LASTFMFINGERPRINT_FALSE@install-data-hook: +@ENABLE_LASTFMFINGERPRINT_FALSE@uninstall-hook: clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am @@ -543,7 +580,7 @@ info-am: -install-data-am: install-moduleSCRIPTS +install-data-am: install-moduleDATA install-moduleSCRIPTS @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-data-hook install-dvi: install-dvi-am @@ -588,7 +625,7 @@ ps-am: -uninstall-am: uninstall-moduleSCRIPTS +uninstall-am: uninstall-moduleDATA uninstall-moduleSCRIPTS @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) uninstall-hook .MAKE: install-am install-data-am install-strip uninstall-am @@ -599,63 +636,63 @@ install-data install-data-am install-data-hook install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ - install-moduleSCRIPTS 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-hook \ - uninstall-moduleSCRIPTS - - -@ENABLE_TESTS_TRUE@test: $(ASSEMBLY_FILE) -@ENABLE_TESTS_TRUE@ if test "x$(TEST_ASSEMBLY)" = "xyes"; then \ -@ENABLE_TESTS_TRUE@ LD_LIBRARY_PATH="$(BANSHEE_LIBDIR):$(BANSHEE_EXTDIR):$(EXTENSION_DIR)/..:$(EXTENSION_DIR)${LD_LIBRARY_PATH+:$LD_LIBRARY_PATH}" \ -@ENABLE_TESTS_TRUE@ MONO_PATH="$(BANSHEE_LIBDIR):$(BANSHEE_EXTDIR):$(EXTENSION_DIR)/..:$(EXTENSION_DIR)${MONO_PATH+:$MONO_PATH}" \ -@ENABLE_TESTS_TRUE@ $(NUNIT_CONSOLE) -nologo -noshadow $(ASSEMBLY_FILE); \ -@ENABLE_TESTS_TRUE@ fi - -@ENABLE_TESTS_FALSE@test: - -check: test - -all: $(ASSEMBLY_FILE) theme-icons - -run: - @pushd $(top_builddir); \ - make run \ - popd; - -build-debug: - @echo $(DEP_LINK) - -$(ASSEMBLY_FILE).mdb: $(ASSEMBLY_FILE) - -$(ASSEMBLY_FILE): $(SOURCES_BUILD) $(RESOURCES_EXPANDED) $(DEP_LINK) - @mkdir -p $(top_builddir)/bin - $(MCS) \ - $(GMCS_FLAGS) \ - $(ENABLE_TESTS_FLAG) \ - $(ASSEMBLY_BUILD_FLAGS) \ - -debug -target:$(TARGET) -out:$@ \ - $(BUILD_DEFINES) \ - $(FILTERED_LINK) $(RESOURCES_BUILD) $(SOURCES_BUILD) - @if [ -e $(srcdir)/$(notdir $@.config) ]; then \ - cp $(srcdir)/$(notdir $@.config) $(top_builddir)/bin; \ - fi; - @if [ ! -z "$(EXTRA_BUNDLE)" ]; then \ - cp $(EXTRA_BUNDLE) $(top_builddir)/bin; \ - fi; - -theme-icons: $(THEME_ICONS_SOURCE) - @$(INSTALL_ICONS) -il "$(BUILD_DATA_DIR)" "$(srcdir)" $(THEME_ICONS_RELATIVE) - -install-data-hook: $(THEME_ICONS_SOURCE) - @$(INSTALL_ICONS) -i "$(DESTDIR)$(pkgdatadir)" "$(srcdir)" $(THEME_ICONS_RELATIVE) - $(EXTRA_INSTALL_DATA_HOOK) - -uninstall-hook: $(THEME_ICONS_SOURCE) - @$(INSTALL_ICONS) -u "$(DESTDIR)$(pkgdatadir)" "$(srcdir)" $(THEME_ICONS_RELATIVE) - $(EXTRA_UNINSTALL_HOOK) + install-moduleDATA install-moduleSCRIPTS 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-hook uninstall-moduleDATA uninstall-moduleSCRIPTS + + +@ENABLE_LASTFMFINGERPRINT_TRUE@@ENABLE_TESTS_TRUE@test: $(ASSEMBLY_FILE) +@ENABLE_LASTFMFINGERPRINT_TRUE@@ENABLE_TESTS_TRUE@ if test "x$(TEST_ASSEMBLY)" = "xyes"; then \ +@ENABLE_LASTFMFINGERPRINT_TRUE@@ENABLE_TESTS_TRUE@ LD_LIBRARY_PATH="$(BANSHEE_LIBDIR):$(BANSHEE_EXTDIR):$(EXTENSION_DIR)/..:$(EXTENSION_DIR)${LD_LIBRARY_PATH+:$LD_LIBRARY_PATH}" \ +@ENABLE_LASTFMFINGERPRINT_TRUE@@ENABLE_TESTS_TRUE@ MONO_PATH="$(BANSHEE_LIBDIR):$(BANSHEE_EXTDIR):$(EXTENSION_DIR)/..:$(EXTENSION_DIR)${MONO_PATH+:$MONO_PATH}" \ +@ENABLE_LASTFMFINGERPRINT_TRUE@@ENABLE_TESTS_TRUE@ $(NUNIT_CONSOLE) -nologo -noshadow $(ASSEMBLY_FILE); \ +@ENABLE_LASTFMFINGERPRINT_TRUE@@ENABLE_TESTS_TRUE@ fi + +@ENABLE_LASTFMFINGERPRINT_TRUE@@ENABLE_TESTS_FALSE@test: + +@ENABLE_LASTFMFINGERPRINT_TRUE@check: test + +@ENABLE_LASTFMFINGERPRINT_TRUE@all: $(ASSEMBLY_FILE) theme-icons + +@ENABLE_LASTFMFINGERPRINT_TRUE@run: +@ENABLE_LASTFMFINGERPRINT_TRUE@ @pushd $(top_builddir); \ +@ENABLE_LASTFMFINGERPRINT_TRUE@ make run \ +@ENABLE_LASTFMFINGERPRINT_TRUE@ popd; + +@ENABLE_LASTFMFINGERPRINT_TRUE@build-debug: +@ENABLE_LASTFMFINGERPRINT_TRUE@ @echo $(DEP_LINK) + +@ENABLE_LASTFMFINGERPRINT_TRUE@$(ASSEMBLY_FILE).mdb: $(ASSEMBLY_FILE) + +@ENABLE_LASTFMFINGERPRINT_TRUE@$(ASSEMBLY_FILE): $(SOURCES_BUILD) $(RESOURCES_EXPANDED) $(DEP_LINK) +@ENABLE_LASTFMFINGERPRINT_TRUE@ @mkdir -p $(top_builddir)/bin +@ENABLE_LASTFMFINGERPRINT_TRUE@ $(MCS) \ +@ENABLE_LASTFMFINGERPRINT_TRUE@ $(GMCS_FLAGS) \ +@ENABLE_LASTFMFINGERPRINT_TRUE@ $(ENABLE_TESTS_FLAG) \ +@ENABLE_LASTFMFINGERPRINT_TRUE@ $(ASSEMBLY_BUILD_FLAGS) \ +@ENABLE_LASTFMFINGERPRINT_TRUE@ -debug -target:$(TARGET) -out:$@ \ +@ENABLE_LASTFMFINGERPRINT_TRUE@ $(BUILD_DEFINES) \ +@ENABLE_LASTFMFINGERPRINT_TRUE@ $(FILTERED_LINK) $(RESOURCES_BUILD) $(SOURCES_BUILD) +@ENABLE_LASTFMFINGERPRINT_TRUE@ @if [ -e $(srcdir)/$(notdir $@.config) ]; then \ +@ENABLE_LASTFMFINGERPRINT_TRUE@ cp $(srcdir)/$(notdir $@.config) $(top_builddir)/bin; \ +@ENABLE_LASTFMFINGERPRINT_TRUE@ fi; +@ENABLE_LASTFMFINGERPRINT_TRUE@ @if [ ! -z "$(EXTRA_BUNDLE)" ]; then \ +@ENABLE_LASTFMFINGERPRINT_TRUE@ cp $(EXTRA_BUNDLE) $(top_builddir)/bin; \ +@ENABLE_LASTFMFINGERPRINT_TRUE@ fi; + +@ENABLE_LASTFMFINGERPRINT_TRUE@theme-icons: $(THEME_ICONS_SOURCE) +@ENABLE_LASTFMFINGERPRINT_TRUE@ @$(INSTALL_ICONS) -il "$(BUILD_DATA_DIR)" "$(srcdir)" $(THEME_ICONS_RELATIVE) + +@ENABLE_LASTFMFINGERPRINT_TRUE@install-data-hook: $(THEME_ICONS_SOURCE) +@ENABLE_LASTFMFINGERPRINT_TRUE@ @$(INSTALL_ICONS) -i "$(DESTDIR)$(pkgdatadir)" "$(srcdir)" $(THEME_ICONS_RELATIVE) +@ENABLE_LASTFMFINGERPRINT_TRUE@ $(EXTRA_INSTALL_DATA_HOOK) + +@ENABLE_LASTFMFINGERPRINT_TRUE@uninstall-hook: $(THEME_ICONS_SOURCE) +@ENABLE_LASTFMFINGERPRINT_TRUE@ @$(INSTALL_ICONS) -u "$(DESTDIR)$(pkgdatadir)" "$(srcdir)" $(THEME_ICONS_RELATIVE) +@ENABLE_LASTFMFINGERPRINT_TRUE@ $(EXTRA_UNINSTALL_HOOK) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru banshee-community-extensions-2.0.1/src/LastfmFingerprint/liblastfmfpbridge/gst-lastfmfpbridge.cpp banshee-community-extensions-2.2.0/src/LastfmFingerprint/liblastfmfpbridge/gst-lastfmfpbridge.cpp --- banshee-community-extensions-2.0.1/src/LastfmFingerprint/liblastfmfpbridge/gst-lastfmfpbridge.cpp 2011-05-03 18:52:16.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/LastfmFingerprint/liblastfmfpbridge/gst-lastfmfpbridge.cpp 2011-06-09 21:14:20.000000000 +0000 @@ -188,12 +188,6 @@ static void Lastfmfp_cb_have_data(GstElement *element, GstBuffer *buffer, GstPad *pad, LastfmfpAudio *ma) { - gint buffersamples; - gint bufferpos; - gint i; - gint j; - gint fill; - // if data continues to flow/EOS is not yet processed if (ma->quit) return; @@ -232,8 +226,6 @@ Lastfmfp_initialize(gint seconds) { LastfmfpAudio *ma; - gint i; - ma = g_new0(LastfmfpAudio, 1); ma->seconds = seconds; diff -Nru banshee-community-extensions-2.0.1/src/LastfmFingerprint/liblastfmfpbridge/Makefile.in banshee-community-extensions-2.2.0/src/LastfmFingerprint/liblastfmfpbridge/Makefile.in --- banshee-community-extensions-2.0.1/src/LastfmFingerprint/liblastfmfpbridge/Makefile.in 2011-05-03 20:45:05.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/LastfmFingerprint/liblastfmfpbridge/Makefile.in 2011-09-19 20:36:51.000000000 +0000 @@ -41,6 +41,7 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/m4/extensions/alarmclock.m4 \ + $(top_srcdir)/build/m4/extensions/albumartwriter.m4 \ $(top_srcdir)/build/m4/extensions/ampache.m4 \ $(top_srcdir)/build/m4/extensions/appindicator.m4 \ $(top_srcdir)/build/m4/extensions/awn.m4 \ @@ -48,6 +49,7 @@ $(top_srcdir)/build/m4/extensions/clutterflow.m4 \ $(top_srcdir)/build/m4/extensions/common.m4 \ $(top_srcdir)/build/m4/extensions/coverwallpaper.m4 \ + $(top_srcdir)/build/m4/extensions/duplicatesongdetector.m4 \ $(top_srcdir)/build/m4/extensions/jamendo.m4 \ $(top_srcdir)/build/m4/extensions/karaoke.m4 \ $(top_srcdir)/build/m4/extensions/lastfmfingerprint.m4 \ @@ -67,6 +69,11 @@ $(top_srcdir)/build/m4/shamrock/expansions.m4 \ $(top_srcdir)/build/m4/shamrock/gnome-doc.m4 \ $(top_srcdir)/build/m4/shamrock/i18n.m4 \ + $(top_srcdir)/build/m4/shamrock/libtool.m4 \ + $(top_srcdir)/build/m4/shamrock/ltoptions.m4 \ + $(top_srcdir)/build/m4/shamrock/ltsugar.m4 \ + $(top_srcdir)/build/m4/shamrock/ltversion.m4 \ + $(top_srcdir)/build/m4/shamrock/lt~obsolete.m4 \ $(top_srcdir)/build/m4/shamrock/mono.m4 \ $(top_srcdir)/build/m4/shamrock/nunit.m4 \ $(top_srcdir)/build/m4/shamrock/programs.m4 \ @@ -158,7 +165,6 @@ CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AM_MAKEFLAGS = @AM_MAKEFLAGS@ diff -Nru banshee-community-extensions-2.0.1/src/LastfmFingerprint/Makefile.in banshee-community-extensions-2.2.0/src/LastfmFingerprint/Makefile.in --- banshee-community-extensions-2.0.1/src/LastfmFingerprint/Makefile.in 2011-05-03 20:45:05.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/LastfmFingerprint/Makefile.in 2011-09-19 20:36:51.000000000 +0000 @@ -38,6 +38,7 @@ COPYING TODO ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/m4/extensions/alarmclock.m4 \ + $(top_srcdir)/build/m4/extensions/albumartwriter.m4 \ $(top_srcdir)/build/m4/extensions/ampache.m4 \ $(top_srcdir)/build/m4/extensions/appindicator.m4 \ $(top_srcdir)/build/m4/extensions/awn.m4 \ @@ -45,6 +46,7 @@ $(top_srcdir)/build/m4/extensions/clutterflow.m4 \ $(top_srcdir)/build/m4/extensions/common.m4 \ $(top_srcdir)/build/m4/extensions/coverwallpaper.m4 \ + $(top_srcdir)/build/m4/extensions/duplicatesongdetector.m4 \ $(top_srcdir)/build/m4/extensions/jamendo.m4 \ $(top_srcdir)/build/m4/extensions/karaoke.m4 \ $(top_srcdir)/build/m4/extensions/lastfmfingerprint.m4 \ @@ -64,6 +66,11 @@ $(top_srcdir)/build/m4/shamrock/expansions.m4 \ $(top_srcdir)/build/m4/shamrock/gnome-doc.m4 \ $(top_srcdir)/build/m4/shamrock/i18n.m4 \ + $(top_srcdir)/build/m4/shamrock/libtool.m4 \ + $(top_srcdir)/build/m4/shamrock/ltoptions.m4 \ + $(top_srcdir)/build/m4/shamrock/ltsugar.m4 \ + $(top_srcdir)/build/m4/shamrock/ltversion.m4 \ + $(top_srcdir)/build/m4/shamrock/lt~obsolete.m4 \ $(top_srcdir)/build/m4/shamrock/mono.m4 \ $(top_srcdir)/build/m4/shamrock/nunit.m4 \ $(top_srcdir)/build/m4/shamrock/programs.m4 \ @@ -118,7 +125,6 @@ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ -ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AM_MAKEFLAGS = @AM_MAKEFLAGS@ diff -Nru banshee-community-extensions-2.0.1/src/LCD/Makefile.in banshee-community-extensions-2.2.0/src/LCD/Makefile.in --- banshee-community-extensions-2.0.1/src/LCD/Makefile.in 2011-05-03 20:45:05.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/LCD/Makefile.in 2011-09-19 20:36:51.000000000 +0000 @@ -42,6 +42,7 @@ subdir = src/LCD ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/m4/extensions/alarmclock.m4 \ + $(top_srcdir)/build/m4/extensions/albumartwriter.m4 \ $(top_srcdir)/build/m4/extensions/ampache.m4 \ $(top_srcdir)/build/m4/extensions/appindicator.m4 \ $(top_srcdir)/build/m4/extensions/awn.m4 \ @@ -49,6 +50,7 @@ $(top_srcdir)/build/m4/extensions/clutterflow.m4 \ $(top_srcdir)/build/m4/extensions/common.m4 \ $(top_srcdir)/build/m4/extensions/coverwallpaper.m4 \ + $(top_srcdir)/build/m4/extensions/duplicatesongdetector.m4 \ $(top_srcdir)/build/m4/extensions/jamendo.m4 \ $(top_srcdir)/build/m4/extensions/karaoke.m4 \ $(top_srcdir)/build/m4/extensions/lastfmfingerprint.m4 \ @@ -68,6 +70,11 @@ $(top_srcdir)/build/m4/shamrock/expansions.m4 \ $(top_srcdir)/build/m4/shamrock/gnome-doc.m4 \ $(top_srcdir)/build/m4/shamrock/i18n.m4 \ + $(top_srcdir)/build/m4/shamrock/libtool.m4 \ + $(top_srcdir)/build/m4/shamrock/ltoptions.m4 \ + $(top_srcdir)/build/m4/shamrock/ltsugar.m4 \ + $(top_srcdir)/build/m4/shamrock/ltversion.m4 \ + $(top_srcdir)/build/m4/shamrock/lt~obsolete.m4 \ $(top_srcdir)/build/m4/shamrock/mono.m4 \ $(top_srcdir)/build/m4/shamrock/nunit.m4 \ $(top_srcdir)/build/m4/shamrock/programs.m4 \ @@ -104,7 +111,6 @@ DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AM_MAKEFLAGS = @AM_MAKEFLAGS@ diff -Nru banshee-community-extensions-2.0.1/src/Lirc/Banshee.Lirc/Makefile.in banshee-community-extensions-2.2.0/src/Lirc/Banshee.Lirc/Makefile.in --- banshee-community-extensions-2.0.1/src/Lirc/Banshee.Lirc/Makefile.in 2011-05-03 20:45:05.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Lirc/Banshee.Lirc/Makefile.in 2011-09-19 20:36:51.000000000 +0000 @@ -43,6 +43,7 @@ subdir = src/Lirc/Banshee.Lirc ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/m4/extensions/alarmclock.m4 \ + $(top_srcdir)/build/m4/extensions/albumartwriter.m4 \ $(top_srcdir)/build/m4/extensions/ampache.m4 \ $(top_srcdir)/build/m4/extensions/appindicator.m4 \ $(top_srcdir)/build/m4/extensions/awn.m4 \ @@ -50,6 +51,7 @@ $(top_srcdir)/build/m4/extensions/clutterflow.m4 \ $(top_srcdir)/build/m4/extensions/common.m4 \ $(top_srcdir)/build/m4/extensions/coverwallpaper.m4 \ + $(top_srcdir)/build/m4/extensions/duplicatesongdetector.m4 \ $(top_srcdir)/build/m4/extensions/jamendo.m4 \ $(top_srcdir)/build/m4/extensions/karaoke.m4 \ $(top_srcdir)/build/m4/extensions/lastfmfingerprint.m4 \ @@ -69,6 +71,11 @@ $(top_srcdir)/build/m4/shamrock/expansions.m4 \ $(top_srcdir)/build/m4/shamrock/gnome-doc.m4 \ $(top_srcdir)/build/m4/shamrock/i18n.m4 \ + $(top_srcdir)/build/m4/shamrock/libtool.m4 \ + $(top_srcdir)/build/m4/shamrock/ltoptions.m4 \ + $(top_srcdir)/build/m4/shamrock/ltsugar.m4 \ + $(top_srcdir)/build/m4/shamrock/ltversion.m4 \ + $(top_srcdir)/build/m4/shamrock/lt~obsolete.m4 \ $(top_srcdir)/build/m4/shamrock/mono.m4 \ $(top_srcdir)/build/m4/shamrock/nunit.m4 \ $(top_srcdir)/build/m4/shamrock/programs.m4 \ @@ -106,7 +113,6 @@ DATA = $(module_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AM_MAKEFLAGS = @AM_MAKEFLAGS@ diff -Nru banshee-community-extensions-2.0.1/src/Lirc/GUITestHarness/Makefile.in banshee-community-extensions-2.2.0/src/Lirc/GUITestHarness/Makefile.in --- banshee-community-extensions-2.0.1/src/Lirc/GUITestHarness/Makefile.in 2011-05-03 20:45:05.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Lirc/GUITestHarness/Makefile.in 2011-09-19 20:36:51.000000000 +0000 @@ -37,6 +37,7 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/m4/extensions/alarmclock.m4 \ + $(top_srcdir)/build/m4/extensions/albumartwriter.m4 \ $(top_srcdir)/build/m4/extensions/ampache.m4 \ $(top_srcdir)/build/m4/extensions/appindicator.m4 \ $(top_srcdir)/build/m4/extensions/awn.m4 \ @@ -44,6 +45,7 @@ $(top_srcdir)/build/m4/extensions/clutterflow.m4 \ $(top_srcdir)/build/m4/extensions/common.m4 \ $(top_srcdir)/build/m4/extensions/coverwallpaper.m4 \ + $(top_srcdir)/build/m4/extensions/duplicatesongdetector.m4 \ $(top_srcdir)/build/m4/extensions/jamendo.m4 \ $(top_srcdir)/build/m4/extensions/karaoke.m4 \ $(top_srcdir)/build/m4/extensions/lastfmfingerprint.m4 \ @@ -63,6 +65,11 @@ $(top_srcdir)/build/m4/shamrock/expansions.m4 \ $(top_srcdir)/build/m4/shamrock/gnome-doc.m4 \ $(top_srcdir)/build/m4/shamrock/i18n.m4 \ + $(top_srcdir)/build/m4/shamrock/libtool.m4 \ + $(top_srcdir)/build/m4/shamrock/ltoptions.m4 \ + $(top_srcdir)/build/m4/shamrock/ltsugar.m4 \ + $(top_srcdir)/build/m4/shamrock/ltversion.m4 \ + $(top_srcdir)/build/m4/shamrock/lt~obsolete.m4 \ $(top_srcdir)/build/m4/shamrock/mono.m4 \ $(top_srcdir)/build/m4/shamrock/nunit.m4 \ $(top_srcdir)/build/m4/shamrock/programs.m4 \ @@ -76,7 +83,6 @@ DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AM_MAKEFLAGS = @AM_MAKEFLAGS@ diff -Nru banshee-community-extensions-2.0.1/src/Lirc/lirc-glue/Makefile.in banshee-community-extensions-2.2.0/src/Lirc/lirc-glue/Makefile.in --- banshee-community-extensions-2.0.1/src/Lirc/lirc-glue/Makefile.in 2011-05-03 20:45:06.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Lirc/lirc-glue/Makefile.in 2011-09-19 20:36:52.000000000 +0000 @@ -38,6 +38,7 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/m4/extensions/alarmclock.m4 \ + $(top_srcdir)/build/m4/extensions/albumartwriter.m4 \ $(top_srcdir)/build/m4/extensions/ampache.m4 \ $(top_srcdir)/build/m4/extensions/appindicator.m4 \ $(top_srcdir)/build/m4/extensions/awn.m4 \ @@ -45,6 +46,7 @@ $(top_srcdir)/build/m4/extensions/clutterflow.m4 \ $(top_srcdir)/build/m4/extensions/common.m4 \ $(top_srcdir)/build/m4/extensions/coverwallpaper.m4 \ + $(top_srcdir)/build/m4/extensions/duplicatesongdetector.m4 \ $(top_srcdir)/build/m4/extensions/jamendo.m4 \ $(top_srcdir)/build/m4/extensions/karaoke.m4 \ $(top_srcdir)/build/m4/extensions/lastfmfingerprint.m4 \ @@ -64,6 +66,11 @@ $(top_srcdir)/build/m4/shamrock/expansions.m4 \ $(top_srcdir)/build/m4/shamrock/gnome-doc.m4 \ $(top_srcdir)/build/m4/shamrock/i18n.m4 \ + $(top_srcdir)/build/m4/shamrock/libtool.m4 \ + $(top_srcdir)/build/m4/shamrock/ltoptions.m4 \ + $(top_srcdir)/build/m4/shamrock/ltsugar.m4 \ + $(top_srcdir)/build/m4/shamrock/ltversion.m4 \ + $(top_srcdir)/build/m4/shamrock/lt~obsolete.m4 \ $(top_srcdir)/build/m4/shamrock/mono.m4 \ $(top_srcdir)/build/m4/shamrock/nunit.m4 \ $(top_srcdir)/build/m4/shamrock/programs.m4 \ @@ -124,7 +131,6 @@ CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AM_MAKEFLAGS = @AM_MAKEFLAGS@ diff -Nru banshee-community-extensions-2.0.1/src/Lirc/Makefile.in banshee-community-extensions-2.2.0/src/Lirc/Makefile.in --- banshee-community-extensions-2.0.1/src/Lirc/Makefile.in 2011-05-03 20:45:05.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Lirc/Makefile.in 2011-09-19 20:36:51.000000000 +0000 @@ -37,6 +37,7 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/m4/extensions/alarmclock.m4 \ + $(top_srcdir)/build/m4/extensions/albumartwriter.m4 \ $(top_srcdir)/build/m4/extensions/ampache.m4 \ $(top_srcdir)/build/m4/extensions/appindicator.m4 \ $(top_srcdir)/build/m4/extensions/awn.m4 \ @@ -44,6 +45,7 @@ $(top_srcdir)/build/m4/extensions/clutterflow.m4 \ $(top_srcdir)/build/m4/extensions/common.m4 \ $(top_srcdir)/build/m4/extensions/coverwallpaper.m4 \ + $(top_srcdir)/build/m4/extensions/duplicatesongdetector.m4 \ $(top_srcdir)/build/m4/extensions/jamendo.m4 \ $(top_srcdir)/build/m4/extensions/karaoke.m4 \ $(top_srcdir)/build/m4/extensions/lastfmfingerprint.m4 \ @@ -63,6 +65,11 @@ $(top_srcdir)/build/m4/shamrock/expansions.m4 \ $(top_srcdir)/build/m4/shamrock/gnome-doc.m4 \ $(top_srcdir)/build/m4/shamrock/i18n.m4 \ + $(top_srcdir)/build/m4/shamrock/libtool.m4 \ + $(top_srcdir)/build/m4/shamrock/ltoptions.m4 \ + $(top_srcdir)/build/m4/shamrock/ltsugar.m4 \ + $(top_srcdir)/build/m4/shamrock/ltversion.m4 \ + $(top_srcdir)/build/m4/shamrock/lt~obsolete.m4 \ $(top_srcdir)/build/m4/shamrock/mono.m4 \ $(top_srcdir)/build/m4/shamrock/nunit.m4 \ $(top_srcdir)/build/m4/shamrock/programs.m4 \ @@ -117,7 +124,6 @@ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ -ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AM_MAKEFLAGS = @AM_MAKEFLAGS@ diff -Nru banshee-community-extensions-2.0.1/src/Lirc/NUnitTests/Makefile.in banshee-community-extensions-2.2.0/src/Lirc/NUnitTests/Makefile.in --- banshee-community-extensions-2.0.1/src/Lirc/NUnitTests/Makefile.in 2011-05-03 20:45:06.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Lirc/NUnitTests/Makefile.in 2011-09-19 20:36:52.000000000 +0000 @@ -37,6 +37,7 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/m4/extensions/alarmclock.m4 \ + $(top_srcdir)/build/m4/extensions/albumartwriter.m4 \ $(top_srcdir)/build/m4/extensions/ampache.m4 \ $(top_srcdir)/build/m4/extensions/appindicator.m4 \ $(top_srcdir)/build/m4/extensions/awn.m4 \ @@ -44,6 +45,7 @@ $(top_srcdir)/build/m4/extensions/clutterflow.m4 \ $(top_srcdir)/build/m4/extensions/common.m4 \ $(top_srcdir)/build/m4/extensions/coverwallpaper.m4 \ + $(top_srcdir)/build/m4/extensions/duplicatesongdetector.m4 \ $(top_srcdir)/build/m4/extensions/jamendo.m4 \ $(top_srcdir)/build/m4/extensions/karaoke.m4 \ $(top_srcdir)/build/m4/extensions/lastfmfingerprint.m4 \ @@ -63,6 +65,11 @@ $(top_srcdir)/build/m4/shamrock/expansions.m4 \ $(top_srcdir)/build/m4/shamrock/gnome-doc.m4 \ $(top_srcdir)/build/m4/shamrock/i18n.m4 \ + $(top_srcdir)/build/m4/shamrock/libtool.m4 \ + $(top_srcdir)/build/m4/shamrock/ltoptions.m4 \ + $(top_srcdir)/build/m4/shamrock/ltsugar.m4 \ + $(top_srcdir)/build/m4/shamrock/ltversion.m4 \ + $(top_srcdir)/build/m4/shamrock/lt~obsolete.m4 \ $(top_srcdir)/build/m4/shamrock/mono.m4 \ $(top_srcdir)/build/m4/shamrock/nunit.m4 \ $(top_srcdir)/build/m4/shamrock/programs.m4 \ @@ -76,7 +83,6 @@ DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AM_MAKEFLAGS = @AM_MAKEFLAGS@ diff -Nru banshee-community-extensions-2.0.1/src/LiveRadio/Makefile.in banshee-community-extensions-2.2.0/src/LiveRadio/Makefile.in --- banshee-community-extensions-2.0.1/src/LiveRadio/Makefile.in 2011-05-03 20:45:06.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/LiveRadio/Makefile.in 2011-09-19 20:36:52.000000000 +0000 @@ -42,6 +42,7 @@ subdir = src/LiveRadio ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/m4/extensions/alarmclock.m4 \ + $(top_srcdir)/build/m4/extensions/albumartwriter.m4 \ $(top_srcdir)/build/m4/extensions/ampache.m4 \ $(top_srcdir)/build/m4/extensions/appindicator.m4 \ $(top_srcdir)/build/m4/extensions/awn.m4 \ @@ -49,6 +50,7 @@ $(top_srcdir)/build/m4/extensions/clutterflow.m4 \ $(top_srcdir)/build/m4/extensions/common.m4 \ $(top_srcdir)/build/m4/extensions/coverwallpaper.m4 \ + $(top_srcdir)/build/m4/extensions/duplicatesongdetector.m4 \ $(top_srcdir)/build/m4/extensions/jamendo.m4 \ $(top_srcdir)/build/m4/extensions/karaoke.m4 \ $(top_srcdir)/build/m4/extensions/lastfmfingerprint.m4 \ @@ -68,6 +70,11 @@ $(top_srcdir)/build/m4/shamrock/expansions.m4 \ $(top_srcdir)/build/m4/shamrock/gnome-doc.m4 \ $(top_srcdir)/build/m4/shamrock/i18n.m4 \ + $(top_srcdir)/build/m4/shamrock/libtool.m4 \ + $(top_srcdir)/build/m4/shamrock/ltoptions.m4 \ + $(top_srcdir)/build/m4/shamrock/ltsugar.m4 \ + $(top_srcdir)/build/m4/shamrock/ltversion.m4 \ + $(top_srcdir)/build/m4/shamrock/lt~obsolete.m4 \ $(top_srcdir)/build/m4/shamrock/mono.m4 \ $(top_srcdir)/build/m4/shamrock/nunit.m4 \ $(top_srcdir)/build/m4/shamrock/programs.m4 \ @@ -104,7 +111,6 @@ DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AM_MAKEFLAGS = @AM_MAKEFLAGS@ diff -Nru banshee-community-extensions-2.0.1/src/Lyrics/Banshee.Lyrics/Banshee.Lyrics.Gui/LyricsPane.cs banshee-community-extensions-2.2.0/src/Lyrics/Banshee.Lyrics/Banshee.Lyrics.Gui/LyricsPane.cs --- banshee-community-extensions-2.0.1/src/Lyrics/Banshee.Lyrics/Banshee.Lyrics.Gui/LyricsPane.cs 2011-05-03 19:58:52.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Lyrics/Banshee.Lyrics/Banshee.Lyrics.Gui/LyricsPane.cs 2011-09-10 11:53:42.000000000 +0000 @@ -39,23 +39,21 @@ { private Gtk.Label label; private LyricsBrowser browser; - private Gtk.ScrolledWindow scrollPane; private ContextPage context_page; public LyricsPane (ContextPage context_page) { this.context_page = context_page; - InitComponents (); - } - - public void InitComponents () - { - this.browser = new LyricsBrowser (); LyricsManager.Instance.LoadStarted += this.OnLoadStarted; LyricsManager.Instance.LoadFinished += this.OnLoadFinished; + } + private void InitComponents () + { + browser = new LyricsBrowser (); browser.InsertModeAvailable = false; + label = new Label (); label.Xalign = 0; @@ -64,13 +62,13 @@ label_align.LeftPadding = 10; label_align.Add (label); - this.scrollPane = new Gtk.ScrolledWindow (); - this.scrollPane.HscrollbarPolicy = ((Gtk.PolicyType)(2)); - this.scrollPane.ShadowType = Gtk.ShadowType.None; - this.scrollPane.Add (this.browser); + Gtk.ScrolledWindow scroll_pane = new Gtk.ScrolledWindow (); + scroll_pane.HscrollbarPolicy = PolicyType.Automatic; + scroll_pane.ShadowType = Gtk.ShadowType.None; + scroll_pane.Add (browser); PackStart (label_align, false, true, 0); - PackStart (this.scrollPane, true, true, 0); + PackStart (scroll_pane, true, true, 0); this.ShowAll (); } @@ -82,13 +80,21 @@ private void OnLoadFinished (object o, LoadFinishedEventArgs args) { - this.browser.LoadString (o, args); + if (browser == null) { + InitComponents (); + } + + browser.LoadString (o, args); context_page.SetState (Banshee.ContextPane.ContextState.Loaded); } public void UpdateLabel (string track_title) { + if (label == null) { + InitComponents (); + } + label.Markup = String.Format ("{0}", GLib.Markup.EscapeText (track_title)); this.ShowAll (); diff -Nru banshee-community-extensions-2.0.1/src/Lyrics/Makefile.in banshee-community-extensions-2.2.0/src/Lyrics/Makefile.in --- banshee-community-extensions-2.0.1/src/Lyrics/Makefile.in 2011-05-03 20:45:06.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Lyrics/Makefile.in 2011-09-19 20:36:52.000000000 +0000 @@ -42,6 +42,7 @@ subdir = src/Lyrics ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/m4/extensions/alarmclock.m4 \ + $(top_srcdir)/build/m4/extensions/albumartwriter.m4 \ $(top_srcdir)/build/m4/extensions/ampache.m4 \ $(top_srcdir)/build/m4/extensions/appindicator.m4 \ $(top_srcdir)/build/m4/extensions/awn.m4 \ @@ -49,6 +50,7 @@ $(top_srcdir)/build/m4/extensions/clutterflow.m4 \ $(top_srcdir)/build/m4/extensions/common.m4 \ $(top_srcdir)/build/m4/extensions/coverwallpaper.m4 \ + $(top_srcdir)/build/m4/extensions/duplicatesongdetector.m4 \ $(top_srcdir)/build/m4/extensions/jamendo.m4 \ $(top_srcdir)/build/m4/extensions/karaoke.m4 \ $(top_srcdir)/build/m4/extensions/lastfmfingerprint.m4 \ @@ -68,6 +70,11 @@ $(top_srcdir)/build/m4/shamrock/expansions.m4 \ $(top_srcdir)/build/m4/shamrock/gnome-doc.m4 \ $(top_srcdir)/build/m4/shamrock/i18n.m4 \ + $(top_srcdir)/build/m4/shamrock/libtool.m4 \ + $(top_srcdir)/build/m4/shamrock/ltoptions.m4 \ + $(top_srcdir)/build/m4/shamrock/ltsugar.m4 \ + $(top_srcdir)/build/m4/shamrock/ltversion.m4 \ + $(top_srcdir)/build/m4/shamrock/lt~obsolete.m4 \ $(top_srcdir)/build/m4/shamrock/mono.m4 \ $(top_srcdir)/build/m4/shamrock/nunit.m4 \ $(top_srcdir)/build/m4/shamrock/programs.m4 \ @@ -104,7 +111,6 @@ DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AM_MAKEFLAGS = @AM_MAKEFLAGS@ diff -Nru banshee-community-extensions-2.0.1/src/Magnatune/Makefile.in banshee-community-extensions-2.2.0/src/Magnatune/Makefile.in --- banshee-community-extensions-2.0.1/src/Magnatune/Makefile.in 2011-05-03 20:45:06.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Magnatune/Makefile.in 2011-09-19 20:36:52.000000000 +0000 @@ -42,6 +42,7 @@ subdir = src/Magnatune ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/m4/extensions/alarmclock.m4 \ + $(top_srcdir)/build/m4/extensions/albumartwriter.m4 \ $(top_srcdir)/build/m4/extensions/ampache.m4 \ $(top_srcdir)/build/m4/extensions/appindicator.m4 \ $(top_srcdir)/build/m4/extensions/awn.m4 \ @@ -49,6 +50,7 @@ $(top_srcdir)/build/m4/extensions/clutterflow.m4 \ $(top_srcdir)/build/m4/extensions/common.m4 \ $(top_srcdir)/build/m4/extensions/coverwallpaper.m4 \ + $(top_srcdir)/build/m4/extensions/duplicatesongdetector.m4 \ $(top_srcdir)/build/m4/extensions/jamendo.m4 \ $(top_srcdir)/build/m4/extensions/karaoke.m4 \ $(top_srcdir)/build/m4/extensions/lastfmfingerprint.m4 \ @@ -68,6 +70,11 @@ $(top_srcdir)/build/m4/shamrock/expansions.m4 \ $(top_srcdir)/build/m4/shamrock/gnome-doc.m4 \ $(top_srcdir)/build/m4/shamrock/i18n.m4 \ + $(top_srcdir)/build/m4/shamrock/libtool.m4 \ + $(top_srcdir)/build/m4/shamrock/ltoptions.m4 \ + $(top_srcdir)/build/m4/shamrock/ltsugar.m4 \ + $(top_srcdir)/build/m4/shamrock/ltversion.m4 \ + $(top_srcdir)/build/m4/shamrock/lt~obsolete.m4 \ $(top_srcdir)/build/m4/shamrock/mono.m4 \ $(top_srcdir)/build/m4/shamrock/nunit.m4 \ $(top_srcdir)/build/m4/shamrock/programs.m4 \ @@ -104,7 +111,6 @@ DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AM_MAKEFLAGS = @AM_MAKEFLAGS@ diff -Nru banshee-community-extensions-2.0.1/src/Makefile.am banshee-community-extensions-2.2.0/src/Makefile.am --- banshee-community-extensions-2.0.1/src/Makefile.am 2011-03-09 21:48:41.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Makefile.am 2011-09-10 10:31:53.000000000 +0000 @@ -1,10 +1,12 @@ SUBDIRS = \ AlarmClock \ + AlbumArtWriter \ Ampache \ AppIndicator \ Awn \ ClutterFlow \ CoverWallpaper \ + DuplicateSongDetector \ Jamendo \ LastfmFingerprint \ LCD \ diff -Nru banshee-community-extensions-2.0.1/src/Makefile.in banshee-community-extensions-2.2.0/src/Makefile.in --- banshee-community-extensions-2.0.1/src/Makefile.in 2011-05-03 20:45:06.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Makefile.in 2011-09-19 20:36:52.000000000 +0000 @@ -38,6 +38,7 @@ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/m4/extensions/alarmclock.m4 \ + $(top_srcdir)/build/m4/extensions/albumartwriter.m4 \ $(top_srcdir)/build/m4/extensions/ampache.m4 \ $(top_srcdir)/build/m4/extensions/appindicator.m4 \ $(top_srcdir)/build/m4/extensions/awn.m4 \ @@ -45,6 +46,7 @@ $(top_srcdir)/build/m4/extensions/clutterflow.m4 \ $(top_srcdir)/build/m4/extensions/common.m4 \ $(top_srcdir)/build/m4/extensions/coverwallpaper.m4 \ + $(top_srcdir)/build/m4/extensions/duplicatesongdetector.m4 \ $(top_srcdir)/build/m4/extensions/jamendo.m4 \ $(top_srcdir)/build/m4/extensions/karaoke.m4 \ $(top_srcdir)/build/m4/extensions/lastfmfingerprint.m4 \ @@ -64,6 +66,11 @@ $(top_srcdir)/build/m4/shamrock/expansions.m4 \ $(top_srcdir)/build/m4/shamrock/gnome-doc.m4 \ $(top_srcdir)/build/m4/shamrock/i18n.m4 \ + $(top_srcdir)/build/m4/shamrock/libtool.m4 \ + $(top_srcdir)/build/m4/shamrock/ltoptions.m4 \ + $(top_srcdir)/build/m4/shamrock/ltsugar.m4 \ + $(top_srcdir)/build/m4/shamrock/ltversion.m4 \ + $(top_srcdir)/build/m4/shamrock/lt~obsolete.m4 \ $(top_srcdir)/build/m4/shamrock/mono.m4 \ $(top_srcdir)/build/m4/shamrock/nunit.m4 \ $(top_srcdir)/build/m4/shamrock/programs.m4 \ @@ -118,7 +125,6 @@ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ -ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AM_MAKEFLAGS = @AM_MAKEFLAGS@ @@ -340,11 +346,13 @@ top_srcdir = @top_srcdir@ SUBDIRS = \ AlarmClock \ + AlbumArtWriter \ Ampache \ AppIndicator \ Awn \ ClutterFlow \ CoverWallpaper \ + DuplicateSongDetector \ Jamendo \ LastfmFingerprint \ LCD \ diff -Nru banshee-community-extensions-2.0.1/src/Mirage/Banshee.Mirage/Makefile.in banshee-community-extensions-2.2.0/src/Mirage/Banshee.Mirage/Makefile.in --- banshee-community-extensions-2.0.1/src/Mirage/Banshee.Mirage/Makefile.in 2011-05-03 20:45:06.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Mirage/Banshee.Mirage/Makefile.in 2011-09-19 20:36:52.000000000 +0000 @@ -42,6 +42,7 @@ subdir = src/Mirage/Banshee.Mirage ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/m4/extensions/alarmclock.m4 \ + $(top_srcdir)/build/m4/extensions/albumartwriter.m4 \ $(top_srcdir)/build/m4/extensions/ampache.m4 \ $(top_srcdir)/build/m4/extensions/appindicator.m4 \ $(top_srcdir)/build/m4/extensions/awn.m4 \ @@ -49,6 +50,7 @@ $(top_srcdir)/build/m4/extensions/clutterflow.m4 \ $(top_srcdir)/build/m4/extensions/common.m4 \ $(top_srcdir)/build/m4/extensions/coverwallpaper.m4 \ + $(top_srcdir)/build/m4/extensions/duplicatesongdetector.m4 \ $(top_srcdir)/build/m4/extensions/jamendo.m4 \ $(top_srcdir)/build/m4/extensions/karaoke.m4 \ $(top_srcdir)/build/m4/extensions/lastfmfingerprint.m4 \ @@ -68,6 +70,11 @@ $(top_srcdir)/build/m4/shamrock/expansions.m4 \ $(top_srcdir)/build/m4/shamrock/gnome-doc.m4 \ $(top_srcdir)/build/m4/shamrock/i18n.m4 \ + $(top_srcdir)/build/m4/shamrock/libtool.m4 \ + $(top_srcdir)/build/m4/shamrock/ltoptions.m4 \ + $(top_srcdir)/build/m4/shamrock/ltsugar.m4 \ + $(top_srcdir)/build/m4/shamrock/ltversion.m4 \ + $(top_srcdir)/build/m4/shamrock/lt~obsolete.m4 \ $(top_srcdir)/build/m4/shamrock/mono.m4 \ $(top_srcdir)/build/m4/shamrock/nunit.m4 \ $(top_srcdir)/build/m4/shamrock/programs.m4 \ @@ -104,7 +111,6 @@ DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AM_MAKEFLAGS = @AM_MAKEFLAGS@ diff -Nru banshee-community-extensions-2.0.1/src/Mirage/Banshee.Mirage/MiragePlugin.cs banshee-community-extensions-2.2.0/src/Mirage/Banshee.Mirage/MiragePlugin.cs --- banshee-community-extensions-2.0.1/src/Mirage/Banshee.Mirage/MiragePlugin.cs 2010-08-13 20:05:55.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Mirage/Banshee.Mirage/MiragePlugin.cs 2011-08-17 20:47:28.000000000 +0000 @@ -294,11 +294,13 @@ private void OnMirageRescanMusicHandler(object sender, EventArgs args) { + Log.Debug("Mirage - Rescan"); + ScanLibrary(); } private void OnMirageResetHandler(object sender, EventArgs args) { - /*MessageDialog md = new MessageDialog (null, DialogFlags.Modal, MessageType.Question, + MessageDialog md = new MessageDialog (null, DialogFlags.Modal, MessageType.Question, ButtonsType.Cancel, AddinManager.CurrentLocalizer.GetString ( "Do you really want to reset the Mirage Extension?\n" + "All extracted information will be lost. Your music will have to be re-analyzed to use Mirage again.")); @@ -309,8 +311,8 @@ if (result == ResponseType.Yes) { try { Analyzer.CancelAnalyze(); - ResetMirageProcessed(); - db.Reset(); + + TrackAnalysis.Provider.Delete ("1"); md = new MessageDialog(null, DialogFlags.Modal, MessageType.Info, ButtonsType.Ok, AddinManager.CurrentLocalizer.GetString ("Mirage was reset. Your music will have to be re-analyzed to use Mirage again.")); @@ -319,8 +321,7 @@ } catch (Exception) { Log.Warning("Mirage - Error resetting Mirage."); } - }*/ - + } } private void OnLibraryTracksAdded (object o, TrackEventArgs args) diff -Nru banshee-community-extensions-2.0.1/src/Mirage/libmirageaudio/Makefile.in banshee-community-extensions-2.2.0/src/Mirage/libmirageaudio/Makefile.in --- banshee-community-extensions-2.0.1/src/Mirage/libmirageaudio/Makefile.in 2011-05-03 20:45:06.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Mirage/libmirageaudio/Makefile.in 2011-09-19 20:36:52.000000000 +0000 @@ -40,6 +40,7 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/m4/extensions/alarmclock.m4 \ + $(top_srcdir)/build/m4/extensions/albumartwriter.m4 \ $(top_srcdir)/build/m4/extensions/ampache.m4 \ $(top_srcdir)/build/m4/extensions/appindicator.m4 \ $(top_srcdir)/build/m4/extensions/awn.m4 \ @@ -47,6 +48,7 @@ $(top_srcdir)/build/m4/extensions/clutterflow.m4 \ $(top_srcdir)/build/m4/extensions/common.m4 \ $(top_srcdir)/build/m4/extensions/coverwallpaper.m4 \ + $(top_srcdir)/build/m4/extensions/duplicatesongdetector.m4 \ $(top_srcdir)/build/m4/extensions/jamendo.m4 \ $(top_srcdir)/build/m4/extensions/karaoke.m4 \ $(top_srcdir)/build/m4/extensions/lastfmfingerprint.m4 \ @@ -66,6 +68,11 @@ $(top_srcdir)/build/m4/shamrock/expansions.m4 \ $(top_srcdir)/build/m4/shamrock/gnome-doc.m4 \ $(top_srcdir)/build/m4/shamrock/i18n.m4 \ + $(top_srcdir)/build/m4/shamrock/libtool.m4 \ + $(top_srcdir)/build/m4/shamrock/ltoptions.m4 \ + $(top_srcdir)/build/m4/shamrock/ltsugar.m4 \ + $(top_srcdir)/build/m4/shamrock/ltversion.m4 \ + $(top_srcdir)/build/m4/shamrock/lt~obsolete.m4 \ $(top_srcdir)/build/m4/shamrock/mono.m4 \ $(top_srcdir)/build/m4/shamrock/nunit.m4 \ $(top_srcdir)/build/m4/shamrock/programs.m4 \ @@ -141,7 +148,6 @@ CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AM_MAKEFLAGS = @AM_MAKEFLAGS@ diff -Nru banshee-community-extensions-2.0.1/src/Mirage/Makefile.in banshee-community-extensions-2.2.0/src/Mirage/Makefile.in --- banshee-community-extensions-2.0.1/src/Mirage/Makefile.in 2011-05-03 20:45:06.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Mirage/Makefile.in 2011-09-19 20:36:52.000000000 +0000 @@ -38,6 +38,7 @@ AUTHORS COPYING ChangeLog NEWS ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/m4/extensions/alarmclock.m4 \ + $(top_srcdir)/build/m4/extensions/albumartwriter.m4 \ $(top_srcdir)/build/m4/extensions/ampache.m4 \ $(top_srcdir)/build/m4/extensions/appindicator.m4 \ $(top_srcdir)/build/m4/extensions/awn.m4 \ @@ -45,6 +46,7 @@ $(top_srcdir)/build/m4/extensions/clutterflow.m4 \ $(top_srcdir)/build/m4/extensions/common.m4 \ $(top_srcdir)/build/m4/extensions/coverwallpaper.m4 \ + $(top_srcdir)/build/m4/extensions/duplicatesongdetector.m4 \ $(top_srcdir)/build/m4/extensions/jamendo.m4 \ $(top_srcdir)/build/m4/extensions/karaoke.m4 \ $(top_srcdir)/build/m4/extensions/lastfmfingerprint.m4 \ @@ -64,6 +66,11 @@ $(top_srcdir)/build/m4/shamrock/expansions.m4 \ $(top_srcdir)/build/m4/shamrock/gnome-doc.m4 \ $(top_srcdir)/build/m4/shamrock/i18n.m4 \ + $(top_srcdir)/build/m4/shamrock/libtool.m4 \ + $(top_srcdir)/build/m4/shamrock/ltoptions.m4 \ + $(top_srcdir)/build/m4/shamrock/ltsugar.m4 \ + $(top_srcdir)/build/m4/shamrock/ltversion.m4 \ + $(top_srcdir)/build/m4/shamrock/lt~obsolete.m4 \ $(top_srcdir)/build/m4/shamrock/mono.m4 \ $(top_srcdir)/build/m4/shamrock/nunit.m4 \ $(top_srcdir)/build/m4/shamrock/programs.m4 \ @@ -118,7 +125,6 @@ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ -ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AM_MAKEFLAGS = @AM_MAKEFLAGS@ diff -Nru banshee-community-extensions-2.0.1/src/Mirage/Mirage/Makefile.in banshee-community-extensions-2.2.0/src/Mirage/Mirage/Makefile.in --- banshee-community-extensions-2.0.1/src/Mirage/Mirage/Makefile.in 2011-05-03 20:45:06.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Mirage/Mirage/Makefile.in 2011-09-19 20:36:52.000000000 +0000 @@ -43,6 +43,7 @@ subdir = src/Mirage/Mirage ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/m4/extensions/alarmclock.m4 \ + $(top_srcdir)/build/m4/extensions/albumartwriter.m4 \ $(top_srcdir)/build/m4/extensions/ampache.m4 \ $(top_srcdir)/build/m4/extensions/appindicator.m4 \ $(top_srcdir)/build/m4/extensions/awn.m4 \ @@ -50,6 +51,7 @@ $(top_srcdir)/build/m4/extensions/clutterflow.m4 \ $(top_srcdir)/build/m4/extensions/common.m4 \ $(top_srcdir)/build/m4/extensions/coverwallpaper.m4 \ + $(top_srcdir)/build/m4/extensions/duplicatesongdetector.m4 \ $(top_srcdir)/build/m4/extensions/jamendo.m4 \ $(top_srcdir)/build/m4/extensions/karaoke.m4 \ $(top_srcdir)/build/m4/extensions/lastfmfingerprint.m4 \ @@ -69,6 +71,11 @@ $(top_srcdir)/build/m4/shamrock/expansions.m4 \ $(top_srcdir)/build/m4/shamrock/gnome-doc.m4 \ $(top_srcdir)/build/m4/shamrock/i18n.m4 \ + $(top_srcdir)/build/m4/shamrock/libtool.m4 \ + $(top_srcdir)/build/m4/shamrock/ltoptions.m4 \ + $(top_srcdir)/build/m4/shamrock/ltsugar.m4 \ + $(top_srcdir)/build/m4/shamrock/ltversion.m4 \ + $(top_srcdir)/build/m4/shamrock/lt~obsolete.m4 \ $(top_srcdir)/build/m4/shamrock/mono.m4 \ $(top_srcdir)/build/m4/shamrock/nunit.m4 \ $(top_srcdir)/build/m4/shamrock/programs.m4 \ @@ -106,7 +113,6 @@ DATA = $(module_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AM_MAKEFLAGS = @AM_MAKEFLAGS@ diff -Nru banshee-community-extensions-2.0.1/src/Mirage/Test/Makefile.in banshee-community-extensions-2.2.0/src/Mirage/Test/Makefile.in --- banshee-community-extensions-2.0.1/src/Mirage/Test/Makefile.in 2011-05-03 20:45:06.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Mirage/Test/Makefile.in 2011-09-19 20:36:52.000000000 +0000 @@ -37,6 +37,7 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/m4/extensions/alarmclock.m4 \ + $(top_srcdir)/build/m4/extensions/albumartwriter.m4 \ $(top_srcdir)/build/m4/extensions/ampache.m4 \ $(top_srcdir)/build/m4/extensions/appindicator.m4 \ $(top_srcdir)/build/m4/extensions/awn.m4 \ @@ -44,6 +45,7 @@ $(top_srcdir)/build/m4/extensions/clutterflow.m4 \ $(top_srcdir)/build/m4/extensions/common.m4 \ $(top_srcdir)/build/m4/extensions/coverwallpaper.m4 \ + $(top_srcdir)/build/m4/extensions/duplicatesongdetector.m4 \ $(top_srcdir)/build/m4/extensions/jamendo.m4 \ $(top_srcdir)/build/m4/extensions/karaoke.m4 \ $(top_srcdir)/build/m4/extensions/lastfmfingerprint.m4 \ @@ -63,6 +65,11 @@ $(top_srcdir)/build/m4/shamrock/expansions.m4 \ $(top_srcdir)/build/m4/shamrock/gnome-doc.m4 \ $(top_srcdir)/build/m4/shamrock/i18n.m4 \ + $(top_srcdir)/build/m4/shamrock/libtool.m4 \ + $(top_srcdir)/build/m4/shamrock/ltoptions.m4 \ + $(top_srcdir)/build/m4/shamrock/ltsugar.m4 \ + $(top_srcdir)/build/m4/shamrock/ltversion.m4 \ + $(top_srcdir)/build/m4/shamrock/lt~obsolete.m4 \ $(top_srcdir)/build/m4/shamrock/mono.m4 \ $(top_srcdir)/build/m4/shamrock/nunit.m4 \ $(top_srcdir)/build/m4/shamrock/programs.m4 \ @@ -76,7 +83,6 @@ DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AM_MAKEFLAGS = @AM_MAKEFLAGS@ diff -Nru banshee-community-extensions-2.0.1/src/OpenVP/Banshee.OpenVP/Makefile.in banshee-community-extensions-2.2.0/src/OpenVP/Banshee.OpenVP/Makefile.in --- banshee-community-extensions-2.0.1/src/OpenVP/Banshee.OpenVP/Makefile.in 2011-05-03 20:45:06.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/OpenVP/Banshee.OpenVP/Makefile.in 2011-09-19 20:36:53.000000000 +0000 @@ -42,6 +42,7 @@ subdir = src/OpenVP/Banshee.OpenVP ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/m4/extensions/alarmclock.m4 \ + $(top_srcdir)/build/m4/extensions/albumartwriter.m4 \ $(top_srcdir)/build/m4/extensions/ampache.m4 \ $(top_srcdir)/build/m4/extensions/appindicator.m4 \ $(top_srcdir)/build/m4/extensions/awn.m4 \ @@ -49,6 +50,7 @@ $(top_srcdir)/build/m4/extensions/clutterflow.m4 \ $(top_srcdir)/build/m4/extensions/common.m4 \ $(top_srcdir)/build/m4/extensions/coverwallpaper.m4 \ + $(top_srcdir)/build/m4/extensions/duplicatesongdetector.m4 \ $(top_srcdir)/build/m4/extensions/jamendo.m4 \ $(top_srcdir)/build/m4/extensions/karaoke.m4 \ $(top_srcdir)/build/m4/extensions/lastfmfingerprint.m4 \ @@ -68,6 +70,11 @@ $(top_srcdir)/build/m4/shamrock/expansions.m4 \ $(top_srcdir)/build/m4/shamrock/gnome-doc.m4 \ $(top_srcdir)/build/m4/shamrock/i18n.m4 \ + $(top_srcdir)/build/m4/shamrock/libtool.m4 \ + $(top_srcdir)/build/m4/shamrock/ltoptions.m4 \ + $(top_srcdir)/build/m4/shamrock/ltsugar.m4 \ + $(top_srcdir)/build/m4/shamrock/ltversion.m4 \ + $(top_srcdir)/build/m4/shamrock/lt~obsolete.m4 \ $(top_srcdir)/build/m4/shamrock/mono.m4 \ $(top_srcdir)/build/m4/shamrock/nunit.m4 \ $(top_srcdir)/build/m4/shamrock/programs.m4 \ @@ -104,7 +111,6 @@ DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AM_MAKEFLAGS = @AM_MAKEFLAGS@ diff -Nru banshee-community-extensions-2.0.1/src/OpenVP/Banshee.OpenVP.Visualizations/Makefile.am banshee-community-extensions-2.2.0/src/OpenVP/Banshee.OpenVP.Visualizations/Makefile.am --- banshee-community-extensions-2.0.1/src/OpenVP/Banshee.OpenVP.Visualizations/Makefile.am 2010-08-13 23:53:14.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/OpenVP/Banshee.OpenVP.Visualizations/Makefile.am 2011-09-06 18:46:22.000000000 +0000 @@ -13,6 +13,7 @@ Inferno.cs \ SimpleScope.cs \ SpectrumAnalyzer.cs \ + SpectrumScan.cs \ SpinningGrid.cs \ Voiceprint.cs diff -Nru banshee-community-extensions-2.0.1/src/OpenVP/Banshee.OpenVP.Visualizations/Makefile.in banshee-community-extensions-2.2.0/src/OpenVP/Banshee.OpenVP.Visualizations/Makefile.in --- banshee-community-extensions-2.0.1/src/OpenVP/Banshee.OpenVP.Visualizations/Makefile.in 2011-05-03 20:45:06.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/OpenVP/Banshee.OpenVP.Visualizations/Makefile.in 2011-09-19 20:36:53.000000000 +0000 @@ -42,6 +42,7 @@ subdir = src/OpenVP/Banshee.OpenVP.Visualizations ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/m4/extensions/alarmclock.m4 \ + $(top_srcdir)/build/m4/extensions/albumartwriter.m4 \ $(top_srcdir)/build/m4/extensions/ampache.m4 \ $(top_srcdir)/build/m4/extensions/appindicator.m4 \ $(top_srcdir)/build/m4/extensions/awn.m4 \ @@ -49,6 +50,7 @@ $(top_srcdir)/build/m4/extensions/clutterflow.m4 \ $(top_srcdir)/build/m4/extensions/common.m4 \ $(top_srcdir)/build/m4/extensions/coverwallpaper.m4 \ + $(top_srcdir)/build/m4/extensions/duplicatesongdetector.m4 \ $(top_srcdir)/build/m4/extensions/jamendo.m4 \ $(top_srcdir)/build/m4/extensions/karaoke.m4 \ $(top_srcdir)/build/m4/extensions/lastfmfingerprint.m4 \ @@ -68,6 +70,11 @@ $(top_srcdir)/build/m4/shamrock/expansions.m4 \ $(top_srcdir)/build/m4/shamrock/gnome-doc.m4 \ $(top_srcdir)/build/m4/shamrock/i18n.m4 \ + $(top_srcdir)/build/m4/shamrock/libtool.m4 \ + $(top_srcdir)/build/m4/shamrock/ltoptions.m4 \ + $(top_srcdir)/build/m4/shamrock/ltsugar.m4 \ + $(top_srcdir)/build/m4/shamrock/ltversion.m4 \ + $(top_srcdir)/build/m4/shamrock/lt~obsolete.m4 \ $(top_srcdir)/build/m4/shamrock/mono.m4 \ $(top_srcdir)/build/m4/shamrock/nunit.m4 \ $(top_srcdir)/build/m4/shamrock/programs.m4 \ @@ -104,7 +111,6 @@ DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AM_MAKEFLAGS = @AM_MAKEFLAGS@ @@ -338,6 +344,7 @@ Inferno.cs \ SimpleScope.cs \ SpectrumAnalyzer.cs \ + SpectrumScan.cs \ SpinningGrid.cs \ Voiceprint.cs diff -Nru banshee-community-extensions-2.0.1/src/OpenVP/Banshee.OpenVP.Visualizations/resources/Banshee.OpenVP.Visualizations.addin.xml banshee-community-extensions-2.2.0/src/OpenVP/Banshee.OpenVP.Visualizations/resources/Banshee.OpenVP.Visualizations.addin.xml --- banshee-community-extensions-2.0.1/src/OpenVP/Banshee.OpenVP.Visualizations/resources/Banshee.OpenVP.Visualizations.addin.xml 2010-11-13 11:34:54.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/OpenVP/Banshee.OpenVP.Visualizations/resources/Banshee.OpenVP.Visualizations.addin.xml 2011-09-06 18:45:37.000000000 +0000 @@ -1,5 +1,5 @@ - - + - - + + + + + - - - + + + diff -Nru banshee-community-extensions-2.0.1/src/OpenVP/Banshee.OpenVP.Visualizations/SpectrumScan.cs banshee-community-extensions-2.2.0/src/OpenVP/Banshee.OpenVP.Visualizations/SpectrumScan.cs --- banshee-community-extensions-2.0.1/src/OpenVP/Banshee.OpenVP.Visualizations/SpectrumScan.cs 1970-01-01 00:00:00.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/OpenVP/Banshee.OpenVP.Visualizations/SpectrumScan.cs 2011-09-06 18:45:37.000000000 +0000 @@ -0,0 +1,413 @@ +// +// SpectrumScan.cs +// +// Author: +// Chris Howie +// Nicholas Parker +// +// Copyright (c) 2009 Chris Howie +// Copyright (c) 2011 Nicholas Parker +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +using System; + +using OpenVP; +using OpenVP.Core; + +using Tao.OpenGl; + +namespace Banshee.OpenVP.Visualizations +{ + // Horizontal, right -> left + public class SpectrumScan : IRenderer, IDisposable + { + // what percent of the screen's width should the analyzer take up + private const double analyzerWidthPct = 0.15, + analyzerWidthOrtho = 2 / analyzerWidthPct; + + private const double scale = 0.5; + private int bufferLength = -1, voiceprintWidthPx, viewHeightPx = -1; + private float[] spectrumBuffer, smoothBuffer, + bufferScaling;//for each index in *Buffer, how wide (in px) that index should be + + private TextureHandle voiceprintBuffer; + + public SpectrumScan() + { + } + + private void GetSpectrum(IController controller) + { + //initialize/populate things that depend on spectrum length + bool rescale = false; + if (controller.PlayerData.NativeSpectrumLength != bufferLength) { + bufferLength = controller.PlayerData.NativeSpectrumLength; + + spectrumBuffer = new float[bufferLength]; + smoothBuffer = new float[bufferLength]; + bufferScaling = new float[bufferLength]; + rescale = true; + } + + controller.PlayerData.GetSpectrum(spectrumBuffer); + + for (int i = 0; i < bufferLength; i++) { + // go with a linear decrease - avoids appearance of + // disconnectedness between analyzer and voiceprint, without + // making analyzer look too jittery + smoothBuffer[i] = + Math.Max(spectrumBuffer[i], smoothBuffer[i] - 0.05f); + } + + //initialize/populate things that depend on view size + voiceprintWidthPx = (int)(controller.Width * (1 - analyzerWidthPct)); + if (viewHeightPx != controller.Height) { + viewHeightPx = controller.Height; + rescale = true; + } + + if (rescale) { + //formula: pxlen = (dataLen - dataI)^scale / dataLen^scale + //integrate over dataI from 0 to dataLen: sum(pxlen) = dataLen / (scale + 1) + //scaled formula: pxlen = (dataLen - dataI)^scale * viewLen * (scale + 1) / dataLen^(scale + 1) + double multiplier = viewHeightPx * (scale + 1) / Math.Pow(bufferLength, scale + 1); + for (int i = 0; i < bufferLength; ++i) { + bufferScaling[i] = (float)(Math.Pow(bufferLength-i, scale) * multiplier); + } + } + } + + public void Render(IController controller) + { + GetSpectrum(controller); + + Gl.glPushAttrib(Gl.GL_ENABLE_BIT); + Gl.glDisable(Gl.GL_DEPTH_TEST); + Gl.glTexEnvf(Gl.GL_TEXTURE_ENV, Gl.GL_TEXTURE_ENV_MODE, Gl.GL_DECAL); + + // voiceprint + + Gl.glMatrixMode(Gl.GL_PROJECTION); + Gl.glPushMatrix(); + Gl.glLoadIdentity(); + + Glu.gluOrtho2D(0, controller.Width, 0, controller.Height); + + Gl.glMatrixMode(Gl.GL_TEXTURE); + Gl.glPushMatrix(); + Gl.glLoadIdentity(); + + Gl.glScalef(1f / controller.Width, 1f / controller.Height, 1f); + + if (voiceprintBuffer == null) { + voiceprintBuffer = new TextureHandle(controller.Width, controller.Height); + } else { + voiceprintBuffer.SetTextureSize(controller.Width, controller.Height); + } + + Gl.glBindTexture(Gl.GL_TEXTURE_2D, voiceprintBuffer.TextureId); + // OPTIMIZATION: could just copy texture of width voiceprintWidthPx + // but then the coordinates get tricky + Gl.glCopyTexImage2D(Gl.GL_TEXTURE_2D, 0, Gl.GL_RGB, 0, 0, + controller.Width, controller.Height, 0); + + // clean palette + Gl.glClearColor(0, 0, 0, 1); + Gl.glClear(Gl.GL_COLOR_BUFFER_BIT); + + // paste voiceprint region of copied texture, shifted left 1px + Gl.glEnable(Gl.GL_TEXTURE_2D); + Gl.glBegin(Gl.GL_QUADS); + + Gl.glTexCoord2f(1, 0); + Gl.glVertex2f(0, 0); + + Gl.glTexCoord2f(1, controller.Height); + Gl.glVertex2f(0, controller.Height); + + Gl.glTexCoord2f(voiceprintWidthPx, controller.Height); + Gl.glVertex2f(voiceprintWidthPx - 1, controller.Height); + + Gl.glTexCoord2f(voiceprintWidthPx, 0); + Gl.glVertex2f(voiceprintWidthPx - 1, 0); + + Gl.glEnd(); + Gl.glDisable(Gl.GL_TEXTURE_2D); + + Gl.glBegin(Gl.GL_QUADS); + // instead of using a smoothed buffer like with the analyzer, + // use the direct buffer for nicer looking output (less blurry) + float y = 0; + for (int i = 0; i < bufferLength; i++) { + float v = spectrumBuffer[i]; + Color.FromHSL(120 * (1 - v), 1, Math.Min(0.5f, v)).Use(); + + // draw a little beyond the edge to ensure no visible seams + Gl.glVertex2f(voiceprintWidthPx-1, y); + Gl.glVertex2f(voiceprintWidthPx+1, y); + y += bufferScaling[i]; + Gl.glVertex2f(voiceprintWidthPx+1, y); + Gl.glVertex2f(voiceprintWidthPx-1, y); + } + Gl.glEnd(); + + Gl.glMatrixMode(Gl.GL_TEXTURE); + Gl.glPopMatrix(); + + Gl.glMatrixMode(Gl.GL_PROJECTION); + Gl.glPopMatrix(); + + // analyzer + + Gl.glMatrixMode(Gl.GL_PROJECTION); + Gl.glPushMatrix(); + Gl.glLoadIdentity(); + + // analyzer at right side of screen + Glu.gluOrtho2D(1 - analyzerWidthOrtho, 1, -1, 1); + + RenderAnalyzer();// coordinates: [-1,+1] in x,y + + Gl.glMatrixMode(Gl.GL_PROJECTION); + Gl.glPopMatrix(); + + Gl.glPopAttrib(); + } + + private void RenderAnalyzer() + { + Gl.glBegin(Gl.GL_QUADS); + + // instead of directly using the raw buffer like with voiceprint, + // use a smoothed buffer for nicer looking output (less jittery) + float y = -1; + float analyzerConv = 2f / viewHeightPx;//px -> [-1,1] + for (int i = 0; i < bufferLength; i++) { + float v = smoothBuffer[i]; + Color.FromHSL(120 * (1 - v), 1, Math.Min(0.5f, v)).Use(); + //Color.FromHSL(120 * (1 - v), 1, 0.5f).Use(); + + Gl.glVertex2f(-1, y); + Gl.glVertex2f(2*v - 1, y); + y += analyzerConv * bufferScaling[i]; + Gl.glVertex2f(2*v - 1, y); + Gl.glVertex2f(-1, y); + } + + Gl.glEnd(); + } + + public void Dispose() + { + if (voiceprintBuffer != null) { + voiceprintBuffer.Dispose(); + voiceprintBuffer = null; + } + } + } + + + // Vertical, top -> bottom + public class SpectrumRain : IRenderer, IDisposable + { + // what percent of the screen's height should the analyzer take up + private const double analyzerHeightPct = 0.25, + analyzerHeightOrtho = 2 / analyzerHeightPct; + + private const double scale = 0.5; + private int bufferLength = -1, voiceprintHeightPx, viewWidthPx = -1; + private float[] spectrumBuffer, smoothBuffer, + bufferScaling;//for each index in *Buffer, how wide (in px) that index should be + + private TextureHandle voiceprintBuffer; + + public SpectrumRain() + { + } + + private void GetSpectrum(IController controller) + { + //initialize/populate things that depend on spectrum length + bool rescale = false; + if (controller.PlayerData.NativeSpectrumLength != bufferLength) { + bufferLength = controller.PlayerData.NativeSpectrumLength; + + spectrumBuffer = new float[bufferLength]; + smoothBuffer = new float[bufferLength]; + bufferScaling = new float[bufferLength]; + rescale = true; + } + + controller.PlayerData.GetSpectrum(spectrumBuffer); + + for (int i = 0; i < bufferLength; i++) { + // go with a linear decrease - avoids appearance of + // disconnectedness between analyzer and voiceprint, without + // making analyzer look too jittery + smoothBuffer[i] = + Math.Max(spectrumBuffer[i], smoothBuffer[i] - 0.05f); + } + + voiceprintHeightPx = (int)(controller.Height * (1 - analyzerHeightPct)); + if (viewWidthPx != controller.Width) { + viewWidthPx = controller.Width; + rescale = true; + } + + if (rescale) { + //formula: pxlen = (dataLen - dataI)^scale / dataLen^scale + //integrate over dataI from 0 to dataLen: sum(pxlen) = dataLen / (scale + 1) + //scaled formula: pxlen = (dataLen - dataI)^scale * viewLen * (scale + 1) / dataLen^(scale + 1) + double multiplier = viewWidthPx * (scale + 1) / Math.Pow(bufferLength, scale + 1); + for (int i = 0; i < bufferLength; ++i) { + bufferScaling[i] = (float)(Math.Pow(bufferLength-i, scale) * multiplier); + } + } + } + + public void Render(IController controller) + { + GetSpectrum(controller); + + Gl.glPushAttrib(Gl.GL_ENABLE_BIT); + Gl.glDisable(Gl.GL_DEPTH_TEST); + Gl.glTexEnvf(Gl.GL_TEXTURE_ENV, Gl.GL_TEXTURE_ENV_MODE, Gl.GL_DECAL); + + // voiceprint + + Gl.glMatrixMode(Gl.GL_PROJECTION); + Gl.glPushMatrix(); + Gl.glLoadIdentity(); + + Glu.gluOrtho2D(0, controller.Width, 0, controller.Height); + + Gl.glMatrixMode(Gl.GL_TEXTURE); + Gl.glPushMatrix(); + Gl.glLoadIdentity(); + + Gl.glScalef(1f / controller.Width, 1f / controller.Height, 1f); + + if (voiceprintBuffer == null) { + voiceprintBuffer = new TextureHandle(controller.Width, controller.Height); + } else { + voiceprintBuffer.SetTextureSize(controller.Width, controller.Height); + } + + Gl.glBindTexture(Gl.GL_TEXTURE_2D, voiceprintBuffer.TextureId); + // OPTIMIZATION: could just copy texture of width voiceprintHeightPx + // but then the coordinates get tricky + Gl.glCopyTexImage2D(Gl.GL_TEXTURE_2D, 0, Gl.GL_RGB, 0, 0, + controller.Width, controller.Height, 0); + + // clean palette + Gl.glClearColor(0, 0, 0, 1); + Gl.glClear(Gl.GL_COLOR_BUFFER_BIT); + + // paste voiceprint region of copied texture, shifted down 1px + Gl.glEnable(Gl.GL_TEXTURE_2D); + Gl.glBegin(Gl.GL_QUADS); + + Gl.glTexCoord2f(0, 1); + Gl.glVertex2f(0, 0); + + Gl.glTexCoord2f(0, voiceprintHeightPx); + Gl.glVertex2f(0, voiceprintHeightPx - 1); + + Gl.glTexCoord2f(controller.Width, voiceprintHeightPx); + Gl.glVertex2f(controller.Width, voiceprintHeightPx - 1); + + Gl.glTexCoord2f(controller.Width, 1); + Gl.glVertex2f(controller.Width, 0); + + Gl.glEnd(); + Gl.glDisable(Gl.GL_TEXTURE_2D); + + Gl.glBegin(Gl.GL_QUADS); + // instead of using a smoothed buffer like with the analyzer, + // use the direct buffer for nicer looking output (less blurry) + float x = 0; + for (int i = 0; i < bufferLength; i++) { + float v = spectrumBuffer[i]; + Color.FromHSL(120 * (1 - v), 1, Math.Min(0.5f, v)).Use(); + + // draw a little beyond the edge to ensure no visible seams + Gl.glVertex2f(x, voiceprintHeightPx-1); + Gl.glVertex2f(x, voiceprintHeightPx+1); + x += bufferScaling[i]; + Gl.glVertex2f(x, voiceprintHeightPx+1); + Gl.glVertex2f(x, voiceprintHeightPx-1); + } + Gl.glEnd(); + + Gl.glMatrixMode(Gl.GL_TEXTURE); + Gl.glPopMatrix(); + + Gl.glMatrixMode(Gl.GL_PROJECTION); + Gl.glPopMatrix(); + + // analyzer + + Gl.glMatrixMode(Gl.GL_PROJECTION); + Gl.glPushMatrix(); + Gl.glLoadIdentity(); + + // analyzer at top side of screen + Glu.gluOrtho2D(-1, 1, 1 - analyzerHeightOrtho, 1); + + RenderAnalyzer();// coordinates: [-1,+1] in x,y + + Gl.glMatrixMode(Gl.GL_PROJECTION); + Gl.glPopMatrix(); + + Gl.glPopAttrib(); + } + + private void RenderAnalyzer() + { + Gl.glBegin(Gl.GL_QUADS); + + // instead of directly using the raw buffer like with voiceprint, + // use a smoothed buffer for nicer looking output (less jittery) + float x = -1; + float analyzerConv = 2f / viewWidthPx;//px -> [-1,1] + for (int i = 0; i < bufferLength; i++) { + float v = smoothBuffer[i]; + Color.FromHSL(120 * (1 - v), 1, Math.Min(0.5f, v)).Use(); + //Color.FromHSL(120 * (1 - v), 1, 0.5f).Use(); + + Gl.glVertex2f(x, -1); + Gl.glVertex2f(x, 2*v - 1); + x += analyzerConv * bufferScaling[i]; + Gl.glVertex2f(x, 2*v - 1); + Gl.glVertex2f(x, -1); + } + + Gl.glEnd(); + } + + public void Dispose() + { + if (voiceprintBuffer != null) { + voiceprintBuffer.Dispose(); + voiceprintBuffer = null; + } + } + } +} diff -Nru banshee-community-extensions-2.0.1/src/OpenVP/Banshee.OpenVP.Visualizations/Voiceprint.cs banshee-community-extensions-2.2.0/src/OpenVP/Banshee.OpenVP.Visualizations/Voiceprint.cs --- banshee-community-extensions-2.0.1/src/OpenVP/Banshee.OpenVP.Visualizations/Voiceprint.cs 2010-08-13 23:53:14.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/OpenVP/Banshee.OpenVP.Visualizations/Voiceprint.cs 2011-09-06 18:33:49.000000000 +0000 @@ -3,8 +3,10 @@ // // Author: // Chris Howie +// Nicholas Parker // // Copyright (c) 2009 Chris Howie +// Copyright (c) 2011 Nicholas Parker // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -137,6 +139,161 @@ } } + public class ScaleVoiceprint : IRenderer, IDisposable + { + private const double scale = 0.5; + private float[] spectrumBuffer, + spectrumScaling;//for each index in spectrumBuffer, how wide (in px) that index should be + private int spectrumViewLength = -1;//last value + + private TextureHandle buffer; + + public ScaleVoiceprint() + { + } + + private void EnsureBufferLengths(int dataLength, int viewLength) + { + bool rescale = false; + if (spectrumBuffer == null || spectrumBuffer.Length != dataLength) { + spectrumBuffer = new float[dataLength]; + spectrumScaling = new float[dataLength]; + rescale = true; + } + if (viewLength != spectrumViewLength) { + spectrumViewLength = viewLength; + rescale = true; + } + if (rescale) { + /* + dataLen: size of the spectrum data + viewLen: height of the display + i: range from 0 to dataLen + viewI: view width of data pixel i (what we're calculating) + dataI: data at data pixel i + + Start off with this formula: + viewI = (dataLen - dataI)^scale / dataLen^scale + + Get the integral of the above formula from 0 to dataLen to + calculate the sum view widths the above formula would produce: + + integral(viewI) = (dataI - dataLen) * dataLen^-scale * (dataLen - dataI)^s / (s + 1) + integral(viewI)[0,dataLen] = 0 - (-dataLen / (scale + 1)) + = dataLen / (scale + 1) = sum(viewI) + + Multiply the viewI formula by (viewLen/sum(viewI)) to get + things scaled to the length of the view: + + viewLenIScaled = viewLenI * viewLen / sum(viewI) + = [(dataLen - dataI)^scale / dataLen^scale] * viewLen / [dataLen / (scale + 1)] + = (dataLen - dataI)^scale * viewLen * (scale + 1) / dataLen^(scale+1) + + So now we have a formula which calculates, for each value in + the spectrum, how wide that value should appear in the display. + The scaled formula also pre-scales those widths to match + the width of the display. + */ + double multiplier = viewLength * (scale + 1) / Math.Pow(dataLength, scale + 1); + for (int i = 0; i < dataLength; ++i) { + spectrumScaling[i] = (float)(Math.Pow(dataLength-i, scale) * multiplier); + } + } + } + + private void ResizeTexture(int w, int h) + { + if (buffer == null) { + buffer = new TextureHandle(w, h); + } else { + buffer.SetTextureSize(w, h); + } + } + + public void Render(IController controller) + { + EnsureBufferLengths(controller.PlayerData.NativeSpectrumLength, controller.Height); + + controller.PlayerData.GetSpectrum(spectrumBuffer); + + Gl.glPushAttrib(Gl.GL_ENABLE_BIT); + Gl.glDisable(Gl.GL_DEPTH_TEST); + Gl.glTexEnvf(Gl.GL_TEXTURE_ENV, Gl.GL_TEXTURE_ENV_MODE, Gl.GL_DECAL); + Gl.glTexParameteri(Gl.GL_TEXTURE_2D, Gl.GL_TEXTURE_WRAP_S, Gl.GL_CLAMP); + Gl.glTexParameteri(Gl.GL_TEXTURE_2D, Gl.GL_TEXTURE_WRAP_T, Gl.GL_CLAMP); + + Gl.glMatrixMode(Gl.GL_PROJECTION); + Gl.glPushMatrix(); + Gl.glLoadIdentity(); + + Glu.gluOrtho2D(0, controller.Width, 0, controller.Height); + + Gl.glMatrixMode(Gl.GL_TEXTURE); + Gl.glPushMatrix(); + Gl.glLoadIdentity(); + + Gl.glScalef(1f / controller.Width, 1f / controller.Height, 1f); + + ResizeTexture(controller.Width, controller.Height); + + Gl.glBindTexture(Gl.GL_TEXTURE_2D, buffer.TextureId); + Gl.glCopyTexImage2D(Gl.GL_TEXTURE_2D, 0, Gl.GL_RGB, 0, 0, + controller.Width, controller.Height, 0); + + Gl.glColor4f(1, 1, 1, 1); + + Gl.glEnable(Gl.GL_TEXTURE_2D); + Gl.glBegin(Gl.GL_QUADS); + + Gl.glTexCoord2f(1, 0); + Gl.glVertex2f(0, 0); + + Gl.glTexCoord2f(1, controller.Height); + Gl.glVertex2f(0, controller.Height); + + Gl.glTexCoord2f(controller.Width, controller.Height); + Gl.glVertex2f(controller.Width - 1, controller.Height); + + Gl.glTexCoord2f(controller.Width, 0); + Gl.glVertex2f(controller.Width - 1, 0); + + Gl.glEnd(); + Gl.glDisable(Gl.GL_TEXTURE_2D); + + Gl.glBegin(Gl.GL_QUADS); + float y = 0; + for (int i = 0; i < controller.PlayerData.NativeSpectrumLength; ++i) { + float v = spectrumBuffer[i]; + + Color.FromHSL(120 * (1 - v), 1, Math.Min(0.5f, v)).Use(); + //Gl.glColor3f(v, v, v); + + Gl.glVertex2f(controller.Width - 1, y); + Gl.glVertex2f(controller.Width, y); + y += spectrumScaling[i]; + Gl.glVertex2f(controller.Width, y); + Gl.glVertex2f(controller.Width - 1, y); + } + Gl.glEnd(); + + Gl.glMatrixMode(Gl.GL_PROJECTION); + Gl.glPopMatrix(); + + Gl.glMatrixMode(Gl.GL_TEXTURE); + Gl.glPopMatrix(); + + Gl.glPopAttrib(); + } + + public void Dispose() + { + if (buffer != null) { + buffer.Dispose(); + buffer = null; + } + } + } + public class MirrorVoiceprint : IRenderer, IDisposable { private float[] spectrumBuffer; diff -Nru banshee-community-extensions-2.0.1/src/OpenVP/Cdh.Affe/Makefile.in banshee-community-extensions-2.2.0/src/OpenVP/Cdh.Affe/Makefile.in --- banshee-community-extensions-2.0.1/src/OpenVP/Cdh.Affe/Makefile.in 2011-05-03 20:45:07.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/OpenVP/Cdh.Affe/Makefile.in 2011-09-19 20:36:53.000000000 +0000 @@ -42,6 +42,7 @@ subdir = src/OpenVP/Cdh.Affe ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/m4/extensions/alarmclock.m4 \ + $(top_srcdir)/build/m4/extensions/albumartwriter.m4 \ $(top_srcdir)/build/m4/extensions/ampache.m4 \ $(top_srcdir)/build/m4/extensions/appindicator.m4 \ $(top_srcdir)/build/m4/extensions/awn.m4 \ @@ -49,6 +50,7 @@ $(top_srcdir)/build/m4/extensions/clutterflow.m4 \ $(top_srcdir)/build/m4/extensions/common.m4 \ $(top_srcdir)/build/m4/extensions/coverwallpaper.m4 \ + $(top_srcdir)/build/m4/extensions/duplicatesongdetector.m4 \ $(top_srcdir)/build/m4/extensions/jamendo.m4 \ $(top_srcdir)/build/m4/extensions/karaoke.m4 \ $(top_srcdir)/build/m4/extensions/lastfmfingerprint.m4 \ @@ -68,6 +70,11 @@ $(top_srcdir)/build/m4/shamrock/expansions.m4 \ $(top_srcdir)/build/m4/shamrock/gnome-doc.m4 \ $(top_srcdir)/build/m4/shamrock/i18n.m4 \ + $(top_srcdir)/build/m4/shamrock/libtool.m4 \ + $(top_srcdir)/build/m4/shamrock/ltoptions.m4 \ + $(top_srcdir)/build/m4/shamrock/ltsugar.m4 \ + $(top_srcdir)/build/m4/shamrock/ltversion.m4 \ + $(top_srcdir)/build/m4/shamrock/lt~obsolete.m4 \ $(top_srcdir)/build/m4/shamrock/mono.m4 \ $(top_srcdir)/build/m4/shamrock/nunit.m4 \ $(top_srcdir)/build/m4/shamrock/programs.m4 \ @@ -104,7 +111,6 @@ DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AM_MAKEFLAGS = @AM_MAKEFLAGS@ diff -Nru banshee-community-extensions-2.0.1/src/OpenVP/Cdh.Affe.Tests/Makefile.in banshee-community-extensions-2.2.0/src/OpenVP/Cdh.Affe.Tests/Makefile.in --- banshee-community-extensions-2.0.1/src/OpenVP/Cdh.Affe.Tests/Makefile.in 2011-05-03 20:45:07.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/OpenVP/Cdh.Affe.Tests/Makefile.in 2011-09-19 20:36:53.000000000 +0000 @@ -42,6 +42,7 @@ subdir = src/OpenVP/Cdh.Affe.Tests ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/m4/extensions/alarmclock.m4 \ + $(top_srcdir)/build/m4/extensions/albumartwriter.m4 \ $(top_srcdir)/build/m4/extensions/ampache.m4 \ $(top_srcdir)/build/m4/extensions/appindicator.m4 \ $(top_srcdir)/build/m4/extensions/awn.m4 \ @@ -49,6 +50,7 @@ $(top_srcdir)/build/m4/extensions/clutterflow.m4 \ $(top_srcdir)/build/m4/extensions/common.m4 \ $(top_srcdir)/build/m4/extensions/coverwallpaper.m4 \ + $(top_srcdir)/build/m4/extensions/duplicatesongdetector.m4 \ $(top_srcdir)/build/m4/extensions/jamendo.m4 \ $(top_srcdir)/build/m4/extensions/karaoke.m4 \ $(top_srcdir)/build/m4/extensions/lastfmfingerprint.m4 \ @@ -68,6 +70,11 @@ $(top_srcdir)/build/m4/shamrock/expansions.m4 \ $(top_srcdir)/build/m4/shamrock/gnome-doc.m4 \ $(top_srcdir)/build/m4/shamrock/i18n.m4 \ + $(top_srcdir)/build/m4/shamrock/libtool.m4 \ + $(top_srcdir)/build/m4/shamrock/ltoptions.m4 \ + $(top_srcdir)/build/m4/shamrock/ltsugar.m4 \ + $(top_srcdir)/build/m4/shamrock/ltversion.m4 \ + $(top_srcdir)/build/m4/shamrock/lt~obsolete.m4 \ $(top_srcdir)/build/m4/shamrock/mono.m4 \ $(top_srcdir)/build/m4/shamrock/nunit.m4 \ $(top_srcdir)/build/m4/shamrock/programs.m4 \ @@ -104,7 +111,6 @@ DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AM_MAKEFLAGS = @AM_MAKEFLAGS@ diff -Nru banshee-community-extensions-2.0.1/src/OpenVP/Makefile.in banshee-community-extensions-2.2.0/src/OpenVP/Makefile.in --- banshee-community-extensions-2.0.1/src/OpenVP/Makefile.in 2011-05-03 20:45:07.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/OpenVP/Makefile.in 2011-09-19 20:36:53.000000000 +0000 @@ -37,6 +37,7 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/m4/extensions/alarmclock.m4 \ + $(top_srcdir)/build/m4/extensions/albumartwriter.m4 \ $(top_srcdir)/build/m4/extensions/ampache.m4 \ $(top_srcdir)/build/m4/extensions/appindicator.m4 \ $(top_srcdir)/build/m4/extensions/awn.m4 \ @@ -44,6 +45,7 @@ $(top_srcdir)/build/m4/extensions/clutterflow.m4 \ $(top_srcdir)/build/m4/extensions/common.m4 \ $(top_srcdir)/build/m4/extensions/coverwallpaper.m4 \ + $(top_srcdir)/build/m4/extensions/duplicatesongdetector.m4 \ $(top_srcdir)/build/m4/extensions/jamendo.m4 \ $(top_srcdir)/build/m4/extensions/karaoke.m4 \ $(top_srcdir)/build/m4/extensions/lastfmfingerprint.m4 \ @@ -63,6 +65,11 @@ $(top_srcdir)/build/m4/shamrock/expansions.m4 \ $(top_srcdir)/build/m4/shamrock/gnome-doc.m4 \ $(top_srcdir)/build/m4/shamrock/i18n.m4 \ + $(top_srcdir)/build/m4/shamrock/libtool.m4 \ + $(top_srcdir)/build/m4/shamrock/ltoptions.m4 \ + $(top_srcdir)/build/m4/shamrock/ltsugar.m4 \ + $(top_srcdir)/build/m4/shamrock/ltversion.m4 \ + $(top_srcdir)/build/m4/shamrock/lt~obsolete.m4 \ $(top_srcdir)/build/m4/shamrock/mono.m4 \ $(top_srcdir)/build/m4/shamrock/nunit.m4 \ $(top_srcdir)/build/m4/shamrock/programs.m4 \ @@ -117,7 +124,6 @@ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ -ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AM_MAKEFLAGS = @AM_MAKEFLAGS@ diff -Nru banshee-community-extensions-2.0.1/src/OpenVP/OpenVP/Makefile.in banshee-community-extensions-2.2.0/src/OpenVP/OpenVP/Makefile.in --- banshee-community-extensions-2.0.1/src/OpenVP/OpenVP/Makefile.in 2011-05-03 20:45:07.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/OpenVP/OpenVP/Makefile.in 2011-09-19 20:36:53.000000000 +0000 @@ -42,6 +42,7 @@ subdir = src/OpenVP/OpenVP ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/m4/extensions/alarmclock.m4 \ + $(top_srcdir)/build/m4/extensions/albumartwriter.m4 \ $(top_srcdir)/build/m4/extensions/ampache.m4 \ $(top_srcdir)/build/m4/extensions/appindicator.m4 \ $(top_srcdir)/build/m4/extensions/awn.m4 \ @@ -49,6 +50,7 @@ $(top_srcdir)/build/m4/extensions/clutterflow.m4 \ $(top_srcdir)/build/m4/extensions/common.m4 \ $(top_srcdir)/build/m4/extensions/coverwallpaper.m4 \ + $(top_srcdir)/build/m4/extensions/duplicatesongdetector.m4 \ $(top_srcdir)/build/m4/extensions/jamendo.m4 \ $(top_srcdir)/build/m4/extensions/karaoke.m4 \ $(top_srcdir)/build/m4/extensions/lastfmfingerprint.m4 \ @@ -68,6 +70,11 @@ $(top_srcdir)/build/m4/shamrock/expansions.m4 \ $(top_srcdir)/build/m4/shamrock/gnome-doc.m4 \ $(top_srcdir)/build/m4/shamrock/i18n.m4 \ + $(top_srcdir)/build/m4/shamrock/libtool.m4 \ + $(top_srcdir)/build/m4/shamrock/ltoptions.m4 \ + $(top_srcdir)/build/m4/shamrock/ltsugar.m4 \ + $(top_srcdir)/build/m4/shamrock/ltversion.m4 \ + $(top_srcdir)/build/m4/shamrock/lt~obsolete.m4 \ $(top_srcdir)/build/m4/shamrock/mono.m4 \ $(top_srcdir)/build/m4/shamrock/nunit.m4 \ $(top_srcdir)/build/m4/shamrock/programs.m4 \ @@ -104,7 +111,6 @@ DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AM_MAKEFLAGS = @AM_MAKEFLAGS@ diff -Nru banshee-community-extensions-2.0.1/src/OpenVP/OpenVP.Core/Makefile.in banshee-community-extensions-2.2.0/src/OpenVP/OpenVP.Core/Makefile.in --- banshee-community-extensions-2.0.1/src/OpenVP/OpenVP.Core/Makefile.in 2011-05-03 20:45:07.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/OpenVP/OpenVP.Core/Makefile.in 2011-09-19 20:36:53.000000000 +0000 @@ -42,6 +42,7 @@ subdir = src/OpenVP/OpenVP.Core ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/m4/extensions/alarmclock.m4 \ + $(top_srcdir)/build/m4/extensions/albumartwriter.m4 \ $(top_srcdir)/build/m4/extensions/ampache.m4 \ $(top_srcdir)/build/m4/extensions/appindicator.m4 \ $(top_srcdir)/build/m4/extensions/awn.m4 \ @@ -49,6 +50,7 @@ $(top_srcdir)/build/m4/extensions/clutterflow.m4 \ $(top_srcdir)/build/m4/extensions/common.m4 \ $(top_srcdir)/build/m4/extensions/coverwallpaper.m4 \ + $(top_srcdir)/build/m4/extensions/duplicatesongdetector.m4 \ $(top_srcdir)/build/m4/extensions/jamendo.m4 \ $(top_srcdir)/build/m4/extensions/karaoke.m4 \ $(top_srcdir)/build/m4/extensions/lastfmfingerprint.m4 \ @@ -68,6 +70,11 @@ $(top_srcdir)/build/m4/shamrock/expansions.m4 \ $(top_srcdir)/build/m4/shamrock/gnome-doc.m4 \ $(top_srcdir)/build/m4/shamrock/i18n.m4 \ + $(top_srcdir)/build/m4/shamrock/libtool.m4 \ + $(top_srcdir)/build/m4/shamrock/ltoptions.m4 \ + $(top_srcdir)/build/m4/shamrock/ltsugar.m4 \ + $(top_srcdir)/build/m4/shamrock/ltversion.m4 \ + $(top_srcdir)/build/m4/shamrock/lt~obsolete.m4 \ $(top_srcdir)/build/m4/shamrock/mono.m4 \ $(top_srcdir)/build/m4/shamrock/nunit.m4 \ $(top_srcdir)/build/m4/shamrock/programs.m4 \ @@ -104,7 +111,6 @@ DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AM_MAKEFLAGS = @AM_MAKEFLAGS@ diff -Nru banshee-community-extensions-2.0.1/src/OpenVP/OpenVP.Scripting/Makefile.in banshee-community-extensions-2.2.0/src/OpenVP/OpenVP.Scripting/Makefile.in --- banshee-community-extensions-2.0.1/src/OpenVP/OpenVP.Scripting/Makefile.in 2011-05-03 20:45:07.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/OpenVP/OpenVP.Scripting/Makefile.in 2011-09-19 20:36:53.000000000 +0000 @@ -42,6 +42,7 @@ subdir = src/OpenVP/OpenVP.Scripting ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/m4/extensions/alarmclock.m4 \ + $(top_srcdir)/build/m4/extensions/albumartwriter.m4 \ $(top_srcdir)/build/m4/extensions/ampache.m4 \ $(top_srcdir)/build/m4/extensions/appindicator.m4 \ $(top_srcdir)/build/m4/extensions/awn.m4 \ @@ -49,6 +50,7 @@ $(top_srcdir)/build/m4/extensions/clutterflow.m4 \ $(top_srcdir)/build/m4/extensions/common.m4 \ $(top_srcdir)/build/m4/extensions/coverwallpaper.m4 \ + $(top_srcdir)/build/m4/extensions/duplicatesongdetector.m4 \ $(top_srcdir)/build/m4/extensions/jamendo.m4 \ $(top_srcdir)/build/m4/extensions/karaoke.m4 \ $(top_srcdir)/build/m4/extensions/lastfmfingerprint.m4 \ @@ -68,6 +70,11 @@ $(top_srcdir)/build/m4/shamrock/expansions.m4 \ $(top_srcdir)/build/m4/shamrock/gnome-doc.m4 \ $(top_srcdir)/build/m4/shamrock/i18n.m4 \ + $(top_srcdir)/build/m4/shamrock/libtool.m4 \ + $(top_srcdir)/build/m4/shamrock/ltoptions.m4 \ + $(top_srcdir)/build/m4/shamrock/ltsugar.m4 \ + $(top_srcdir)/build/m4/shamrock/ltversion.m4 \ + $(top_srcdir)/build/m4/shamrock/lt~obsolete.m4 \ $(top_srcdir)/build/m4/shamrock/mono.m4 \ $(top_srcdir)/build/m4/shamrock/nunit.m4 \ $(top_srcdir)/build/m4/shamrock/programs.m4 \ @@ -104,7 +111,6 @@ DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AM_MAKEFLAGS = @AM_MAKEFLAGS@ diff -Nru banshee-community-extensions-2.0.1/src/RadioStationFetcher/Makefile.in banshee-community-extensions-2.2.0/src/RadioStationFetcher/Makefile.in --- banshee-community-extensions-2.0.1/src/RadioStationFetcher/Makefile.in 2011-05-03 20:45:07.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/RadioStationFetcher/Makefile.in 2011-09-19 20:36:53.000000000 +0000 @@ -42,6 +42,7 @@ subdir = src/RadioStationFetcher ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/m4/extensions/alarmclock.m4 \ + $(top_srcdir)/build/m4/extensions/albumartwriter.m4 \ $(top_srcdir)/build/m4/extensions/ampache.m4 \ $(top_srcdir)/build/m4/extensions/appindicator.m4 \ $(top_srcdir)/build/m4/extensions/awn.m4 \ @@ -49,6 +50,7 @@ $(top_srcdir)/build/m4/extensions/clutterflow.m4 \ $(top_srcdir)/build/m4/extensions/common.m4 \ $(top_srcdir)/build/m4/extensions/coverwallpaper.m4 \ + $(top_srcdir)/build/m4/extensions/duplicatesongdetector.m4 \ $(top_srcdir)/build/m4/extensions/jamendo.m4 \ $(top_srcdir)/build/m4/extensions/karaoke.m4 \ $(top_srcdir)/build/m4/extensions/lastfmfingerprint.m4 \ @@ -68,6 +70,11 @@ $(top_srcdir)/build/m4/shamrock/expansions.m4 \ $(top_srcdir)/build/m4/shamrock/gnome-doc.m4 \ $(top_srcdir)/build/m4/shamrock/i18n.m4 \ + $(top_srcdir)/build/m4/shamrock/libtool.m4 \ + $(top_srcdir)/build/m4/shamrock/ltoptions.m4 \ + $(top_srcdir)/build/m4/shamrock/ltsugar.m4 \ + $(top_srcdir)/build/m4/shamrock/ltversion.m4 \ + $(top_srcdir)/build/m4/shamrock/lt~obsolete.m4 \ $(top_srcdir)/build/m4/shamrock/mono.m4 \ $(top_srcdir)/build/m4/shamrock/nunit.m4 \ $(top_srcdir)/build/m4/shamrock/programs.m4 \ @@ -104,7 +111,6 @@ DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AM_MAKEFLAGS = @AM_MAKEFLAGS@ diff -Nru banshee-community-extensions-2.0.1/src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmSimilarArtists.cs banshee-community-extensions-2.2.0/src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmSimilarArtists.cs --- banshee-community-extensions-2.0.1/src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmSimilarArtists.cs 2010-11-20 11:15:00.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmSimilarArtists.cs 2011-08-15 09:42:41.000000000 +0000 @@ -39,6 +39,7 @@ using Banshee.MediaEngine; using System.Net; using System.IO; +using Banshee.Networking; namespace Banshee.RandomByLastfm { @@ -155,6 +156,9 @@ /// Executed via Kernel Scheduler public static void QueryLastfm () { + if(!ServiceManager.Get().Connected) + return; + DatabaseTrackInfo currentTrack = ServiceManager.PlayerEngine.ActiveEngine.CurrentTrack as DatabaseTrackInfo; if (currentTrack == null) return; diff -Nru banshee-community-extensions-2.0.1/src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmUserTopArtists.cs banshee-community-extensions-2.2.0/src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmUserTopArtists.cs --- banshee-community-extensions-2.0.1/src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmUserTopArtists.cs 2010-11-20 11:15:00.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/RandomByLastfm/Banshee.RandomByLastfm/RandomByLastfmUserTopArtists.cs 2011-08-15 09:42:41.000000000 +0000 @@ -35,6 +35,7 @@ using Hyena; using Banshee.Collection.Database; using Banshee.Collection; +using Banshee.Networking; using Banshee.ServiceStack; using Banshee.MediaEngine; using System.Net; @@ -60,7 +61,7 @@ Label = AddinManager.CurrentLocalizer.GetString ("Shuffle by your Top Artists (via Lastfm)"); Adverb = AddinManager.CurrentLocalizer.GetString ("by your top artists"); Description = AddinManager.CurrentLocalizer.GetString ("Play songs from your Top Artists (via Lastfm)"); - + Condition = "CoreArtists.ArtistID = ?"; OrderBy = "RANDOM()"; @@ -121,7 +122,7 @@ { Account account = LastfmCore.Account; - if (account.UserName == null | account.UserName == string.Empty) + if(string.IsNullOrEmpty(account.UserName) || !ServiceManager.Get().Connected) return; LastfmUserData userData = new LastfmUserData (account.UserName); LastfmData topArtists = userData.GetTopArtists (TopType.Overall); diff -Nru banshee-community-extensions-2.0.1/src/RandomByLastfm/Makefile.in banshee-community-extensions-2.2.0/src/RandomByLastfm/Makefile.in --- banshee-community-extensions-2.0.1/src/RandomByLastfm/Makefile.in 2011-05-03 20:45:07.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/RandomByLastfm/Makefile.in 2011-09-19 20:36:53.000000000 +0000 @@ -42,6 +42,7 @@ subdir = src/RandomByLastfm ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/m4/extensions/alarmclock.m4 \ + $(top_srcdir)/build/m4/extensions/albumartwriter.m4 \ $(top_srcdir)/build/m4/extensions/ampache.m4 \ $(top_srcdir)/build/m4/extensions/appindicator.m4 \ $(top_srcdir)/build/m4/extensions/awn.m4 \ @@ -49,6 +50,7 @@ $(top_srcdir)/build/m4/extensions/clutterflow.m4 \ $(top_srcdir)/build/m4/extensions/common.m4 \ $(top_srcdir)/build/m4/extensions/coverwallpaper.m4 \ + $(top_srcdir)/build/m4/extensions/duplicatesongdetector.m4 \ $(top_srcdir)/build/m4/extensions/jamendo.m4 \ $(top_srcdir)/build/m4/extensions/karaoke.m4 \ $(top_srcdir)/build/m4/extensions/lastfmfingerprint.m4 \ @@ -68,6 +70,11 @@ $(top_srcdir)/build/m4/shamrock/expansions.m4 \ $(top_srcdir)/build/m4/shamrock/gnome-doc.m4 \ $(top_srcdir)/build/m4/shamrock/i18n.m4 \ + $(top_srcdir)/build/m4/shamrock/libtool.m4 \ + $(top_srcdir)/build/m4/shamrock/ltoptions.m4 \ + $(top_srcdir)/build/m4/shamrock/ltsugar.m4 \ + $(top_srcdir)/build/m4/shamrock/ltversion.m4 \ + $(top_srcdir)/build/m4/shamrock/lt~obsolete.m4 \ $(top_srcdir)/build/m4/shamrock/mono.m4 \ $(top_srcdir)/build/m4/shamrock/nunit.m4 \ $(top_srcdir)/build/m4/shamrock/programs.m4 \ @@ -104,7 +111,6 @@ DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AM_MAKEFLAGS = @AM_MAKEFLAGS@ diff -Nru banshee-community-extensions-2.0.1/src/RandomByLastfm/RandomByLastfm.addin.xml banshee-community-extensions-2.2.0/src/RandomByLastfm/RandomByLastfm.addin.xml --- banshee-community-extensions-2.0.1/src/RandomByLastfm/RandomByLastfm.addin.xml 2010-11-20 11:15:00.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/RandomByLastfm/RandomByLastfm.addin.xml 2011-08-15 09:42:41.000000000 +0000 @@ -1,8 +1,8 @@ public bool AddStreamTags (TrackInfo track, bool splitfiles) { - if (track == null || tagger == null) + if (track == null) return false; - if (tagger.IsNull ()) { + if (splitfiles && file_sink != null && track.ArtistName != null && track.ArtistName.Length > 0) { + SetMetadataFilename (track.TrackTitle, track.ArtistName); + SetNewTrackLocation (output_file + file_extension); + } + + if (tagger == null || tagger.IsNull ()) { Hyena.Log.Debug ("[Recorder] tagger is null, not tagging!"); return false; } @@ -355,11 +360,6 @@ Hyena.Log.Debug (e.StackTrace); } - if (splitfiles && file_sink != null && track.ArtistName != null && track.ArtistName.Length > 0) { - SetMetadataFilename (track.TrackTitle, track.ArtistName); - SetNewTrackLocation (output_file + file_extension); - } - return true; } diff -Nru banshee-community-extensions-2.0.1/src/StreamRecorder/Makefile.in banshee-community-extensions-2.2.0/src/StreamRecorder/Makefile.in --- banshee-community-extensions-2.0.1/src/StreamRecorder/Makefile.in 2011-05-03 20:45:07.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/StreamRecorder/Makefile.in 2011-09-19 20:36:53.000000000 +0000 @@ -42,6 +42,7 @@ subdir = src/StreamRecorder ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/m4/extensions/alarmclock.m4 \ + $(top_srcdir)/build/m4/extensions/albumartwriter.m4 \ $(top_srcdir)/build/m4/extensions/ampache.m4 \ $(top_srcdir)/build/m4/extensions/appindicator.m4 \ $(top_srcdir)/build/m4/extensions/awn.m4 \ @@ -49,6 +50,7 @@ $(top_srcdir)/build/m4/extensions/clutterflow.m4 \ $(top_srcdir)/build/m4/extensions/common.m4 \ $(top_srcdir)/build/m4/extensions/coverwallpaper.m4 \ + $(top_srcdir)/build/m4/extensions/duplicatesongdetector.m4 \ $(top_srcdir)/build/m4/extensions/jamendo.m4 \ $(top_srcdir)/build/m4/extensions/karaoke.m4 \ $(top_srcdir)/build/m4/extensions/lastfmfingerprint.m4 \ @@ -68,6 +70,11 @@ $(top_srcdir)/build/m4/shamrock/expansions.m4 \ $(top_srcdir)/build/m4/shamrock/gnome-doc.m4 \ $(top_srcdir)/build/m4/shamrock/i18n.m4 \ + $(top_srcdir)/build/m4/shamrock/libtool.m4 \ + $(top_srcdir)/build/m4/shamrock/ltoptions.m4 \ + $(top_srcdir)/build/m4/shamrock/ltsugar.m4 \ + $(top_srcdir)/build/m4/shamrock/ltversion.m4 \ + $(top_srcdir)/build/m4/shamrock/lt~obsolete.m4 \ $(top_srcdir)/build/m4/shamrock/mono.m4 \ $(top_srcdir)/build/m4/shamrock/nunit.m4 \ $(top_srcdir)/build/m4/shamrock/programs.m4 \ @@ -104,7 +111,6 @@ DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AM_MAKEFLAGS = @AM_MAKEFLAGS@ diff -Nru banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/Banshee.Telepathy/TelepathyService.cs banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/Banshee.Telepathy/TelepathyService.cs --- banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/Banshee.Telepathy/TelepathyService.cs 2010-09-04 15:55:47.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/Banshee.Telepathy/TelepathyService.cs 2011-05-27 16:50:35.000000000 +0000 @@ -150,8 +150,8 @@ public void DelayedInitialize () { - // require for bundled version of NDesk.DBus - NDesk.DBus.BusG.Init (); + // require for bundled version of DBus + global::DBus.BusG.Init (); conn_map = new Dictionary (); source_map = new Dictionary > (); diff -Nru banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/Banshee.Telepathy.API/Account.cs banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/Banshee.Telepathy.API/Account.cs --- banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/Banshee.Telepathy.API/Account.cs 2010-09-04 15:55:47.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/Banshee.Telepathy.API/Account.cs 2011-05-27 16:50:35.000000000 +0000 @@ -29,7 +29,7 @@ using System; using System.Collections.Generic; -using NDesk.DBus; +using DBus; using Telepathy; diff -Nru banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/Banshee.Telepathy.API/Channels/Channel.cs banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/Banshee.Telepathy.API/Channels/Channel.cs --- banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/Banshee.Telepathy.API/Channels/Channel.cs 2010-08-13 20:05:55.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/Banshee.Telepathy.API/Channels/Channel.cs 2011-05-27 16:50:35.000000000 +0000 @@ -29,7 +29,7 @@ using System; using System.Collections.Generic; -using NDesk.DBus; +using DBus; using Banshee.Telepathy.API.DBus; diff -Nru banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/Banshee.Telepathy.API/Channels/ContactListChannel.cs banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/Banshee.Telepathy.API/Channels/ContactListChannel.cs --- banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/Banshee.Telepathy.API/Channels/ContactListChannel.cs 2010-08-13 20:05:55.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/Banshee.Telepathy.API/Channels/ContactListChannel.cs 2011-05-27 16:50:35.000000000 +0000 @@ -31,7 +31,7 @@ using Banshee.Telepathy.API.DBus; -using NDesk.DBus; +using DBus; using Telepathy; @@ -174,4 +174,4 @@ } } } -} \ No newline at end of file +} diff -Nru banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/Banshee.Telepathy.API/Connection.cs banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/Banshee.Telepathy.API/Connection.cs --- banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/Banshee.Telepathy.API/Connection.cs 2010-08-13 20:05:55.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/Banshee.Telepathy.API/Connection.cs 2011-05-27 17:20:07.000000000 +0000 @@ -340,7 +340,7 @@ //FIXME hardcoding use of jabber connections due to Mono bug // https://bugzilla.novell.com/show_bug.cgi?id=481687 // should really being using IRequests.RequestableChannelClasses - // property, but the IConvertible object returned by NDesk cannot be unboxed + // property, but the IConvertible object returned by dbus-sharp cannot be unboxed string protocol = conn.GetProtocol (); if (protocol != null && protocol.Equals ("jabber")) { diff -Nru banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/Banshee.Telepathy.API/ConnectionLocator.cs banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/Banshee.Telepathy.API/ConnectionLocator.cs --- banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/Banshee.Telepathy.API/ConnectionLocator.cs 2010-08-13 20:05:55.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/Banshee.Telepathy.API/ConnectionLocator.cs 2011-05-27 16:50:35.000000000 +0000 @@ -29,7 +29,7 @@ using System; using System.Collections.Generic; -using NDesk.DBus; +using DBus; using Telepathy; diff -Nru banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/Banshee.Telepathy.API/DBus/DBusConnection.cs banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/Banshee.Telepathy.API/DBus/DBusConnection.cs --- banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/Banshee.Telepathy.API/DBus/DBusConnection.cs 2010-08-13 20:05:55.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/Banshee.Telepathy.API/DBus/DBusConnection.cs 2011-05-27 16:50:35.000000000 +0000 @@ -29,14 +29,14 @@ using System; using System.Collections.Generic; -using NDesk.DBus; +using DBus; namespace Banshee.Telepathy.API.DBus { public sealed class DBusConnection { private string address; - private NDesk.DBus.Connection conn = null; + private global::DBus.Connection conn = null; private IDictionary registered; private DBusConnection () @@ -47,7 +47,7 @@ public DBusConnection (string address) : this () { Address = address; - conn = NDesk.DBus.Connection.Open (address); + conn = global::DBus.Connection.Open (address); } public DBusConnection (string address, bool mainloop) : this (address) @@ -126,8 +126,8 @@ public void ConnectToMainLoop () { if (conn != null) { - BusG.Init (conn); + global::DBus.BusG.Init (conn); } } } -} \ No newline at end of file +} diff -Nru banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/Banshee.Telepathy.API/DBus/DBusUtility.cs banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/Banshee.Telepathy.API/DBus/DBusUtility.cs --- banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/Banshee.Telepathy.API/DBus/DBusUtility.cs 2010-08-13 20:05:55.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/Banshee.Telepathy.API/DBus/DBusUtility.cs 2011-05-27 16:50:35.000000000 +0000 @@ -30,7 +30,7 @@ using System; using System.Collections.Generic; -using NDesk.DBus; +using DBus; using org.freedesktop.DBus; namespace Banshee.Telepathy.API.DBus diff -Nru banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/Banshee.Telepathy.API/DBus/EmpathyHandler.cs banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/Banshee.Telepathy.API/DBus/EmpathyHandler.cs --- banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/Banshee.Telepathy.API/DBus/EmpathyHandler.cs 2010-08-13 20:05:55.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/Banshee.Telepathy.API/DBus/EmpathyHandler.cs 2011-05-27 16:50:35.000000000 +0000 @@ -28,7 +28,7 @@ using System; -using NDesk.DBus; +using DBus; namespace Banshee.Telepathy.API.DBus { diff -Nru banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/Banshee.Telepathy.API/Dispatchers/ChannelHandler.cs banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/Banshee.Telepathy.API/Dispatchers/ChannelHandler.cs --- banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/Banshee.Telepathy.API/Dispatchers/ChannelHandler.cs 2010-08-13 20:05:55.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/Banshee.Telepathy.API/Dispatchers/ChannelHandler.cs 2011-05-27 16:50:35.000000000 +0000 @@ -29,7 +29,7 @@ using System; using System.Collections.Generic; -using NDesk.DBus; +using DBus; using org.freedesktop.DBus; using Telepathy; @@ -180,4 +180,4 @@ } } -} \ No newline at end of file +} diff -Nru banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/Banshee.Telepathy.API/Dispatchers/Dispatcher.cs banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/Banshee.Telepathy.API/Dispatchers/Dispatcher.cs --- banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/Banshee.Telepathy.API/Dispatchers/Dispatcher.cs 2010-08-13 20:05:55.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/Banshee.Telepathy.API/Dispatchers/Dispatcher.cs 2011-05-27 16:50:35.000000000 +0000 @@ -29,7 +29,7 @@ using System; using System.Collections.Generic; -using NDesk.DBus; +using DBus; using Telepathy; diff -Nru banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/Banshee.Telepathy.DBus/IMetadataProvider.cs banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/Banshee.Telepathy.DBus/IMetadataProvider.cs --- banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/Banshee.Telepathy.DBus/IMetadataProvider.cs 2010-08-13 20:05:55.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/Banshee.Telepathy.DBus/IMetadataProvider.cs 2011-05-27 16:50:35.000000000 +0000 @@ -28,7 +28,7 @@ using System; using System.Collections.Generic; -using NDesk.DBus; +using DBus; namespace Banshee.Telepathy.DBus { diff -Nru banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/Banshee.Telepathy.DBus/IMetadataProviderService.cs banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/Banshee.Telepathy.DBus/IMetadataProviderService.cs --- banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/Banshee.Telepathy.DBus/IMetadataProviderService.cs 2010-08-13 20:05:55.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/Banshee.Telepathy.DBus/IMetadataProviderService.cs 2011-05-27 16:50:35.000000000 +0000 @@ -28,7 +28,7 @@ using System; using System.Collections.Generic; -using NDesk.DBus; +using DBus; namespace Banshee.Telepathy.DBus { diff -Nru banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/Banshee.Telepathy.DBus/IPlaylistProvider.cs banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/Banshee.Telepathy.DBus/IPlaylistProvider.cs --- banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/Banshee.Telepathy.DBus/IPlaylistProvider.cs 2010-08-13 20:05:55.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/Banshee.Telepathy.DBus/IPlaylistProvider.cs 2011-05-27 16:50:35.000000000 +0000 @@ -28,7 +28,7 @@ using System; using System.Collections.Generic; -using NDesk.DBus; +using DBus; namespace Banshee.Telepathy.DBus { diff -Nru banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/Banshee.Telepathy.DBus/MetadataProviderService.cs banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/Banshee.Telepathy.DBus/MetadataProviderService.cs --- banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/Banshee.Telepathy.DBus/MetadataProviderService.cs 2010-08-13 20:05:55.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/Banshee.Telepathy.DBus/MetadataProviderService.cs 2011-05-27 16:50:35.000000000 +0000 @@ -37,7 +37,7 @@ using Hyena; -using NDesk.DBus; +using DBus; namespace Banshee.Telepathy.DBus { diff -Nru banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/Banshee.Telepathy.DBus/PlaylistProvider.cs banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/Banshee.Telepathy.DBus/PlaylistProvider.cs --- banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/Banshee.Telepathy.DBus/PlaylistProvider.cs 2010-08-13 20:05:55.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/Banshee.Telepathy.DBus/PlaylistProvider.cs 2011-05-27 16:50:35.000000000 +0000 @@ -37,7 +37,7 @@ using Hyena.Data.Sqlite; -using NDesk.DBus; +using DBus; namespace Banshee.Telepathy.DBus { diff -Nru banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/Makefile.am banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/Makefile.am --- banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/Makefile.am 2010-09-04 15:55:47.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/Makefile.am 2011-05-27 16:50:35.000000000 +0000 @@ -82,39 +82,7 @@ Banshee.Telepathy.DBus/PlaylistProvider.cs \ Telepathy/Constants.cs \ Telepathy/MissionControl.cs \ - Telepathy/Telepathy.cs \ - NDesk.DBus/Address.cs \ - NDesk.DBus/Authentication.cs \ - NDesk.DBus/Bus.cs \ - NDesk.DBus/BusObject.cs \ - NDesk.DBus/Connection.cs \ - NDesk.DBus/DBus.cs \ - NDesk.DBus/DProxy.cs \ - NDesk.DBus/ExportObject.cs \ - NDesk.DBus/GLib.cs \ - NDesk.DBus/GLib.IO.cs \ - NDesk.DBus/Introspection.cs \ - NDesk.DBus/IntrospectionSchema.cs \ - NDesk.DBus/Mapper.cs \ - NDesk.DBus/MatchRule.cs \ - NDesk.DBus/Message.cs \ - NDesk.DBus/MessageFilter.cs \ - NDesk.DBus/MessageReader.cs \ - NDesk.DBus/MessageWriter.cs \ - NDesk.DBus/PendingCall.cs \ - NDesk.DBus/Protocol.cs \ - NDesk.DBus/Server.cs \ - NDesk.DBus/ServerBus.cs \ - NDesk.DBus/Signature.cs \ - NDesk.DBus/SocketTransport.cs \ - NDesk.DBus/Transport.cs \ - NDesk.DBus/TypeDefiner.cs \ - NDesk.DBus/TypeImplementer.cs \ - NDesk.DBus/Unix.cs \ - NDesk.DBus/UnixMonoTransport.cs \ - NDesk.DBus/UnixNativeTransport.cs \ - NDesk.DBus/UnixTransport.cs \ - NDesk.DBus/Wrapper.cs + Telepathy/Telepathy.cs RESOURCES = \ Resources/ActiveSourceUI.xml \ diff -Nru banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/Makefile.in banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/Makefile.in --- banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/Makefile.in 2011-05-03 20:45:07.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/Makefile.in 2011-09-19 20:36:53.000000000 +0000 @@ -43,6 +43,7 @@ subdir = src/Telepathy/Banshee.Telepathy ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/m4/extensions/alarmclock.m4 \ + $(top_srcdir)/build/m4/extensions/albumartwriter.m4 \ $(top_srcdir)/build/m4/extensions/ampache.m4 \ $(top_srcdir)/build/m4/extensions/appindicator.m4 \ $(top_srcdir)/build/m4/extensions/awn.m4 \ @@ -50,6 +51,7 @@ $(top_srcdir)/build/m4/extensions/clutterflow.m4 \ $(top_srcdir)/build/m4/extensions/common.m4 \ $(top_srcdir)/build/m4/extensions/coverwallpaper.m4 \ + $(top_srcdir)/build/m4/extensions/duplicatesongdetector.m4 \ $(top_srcdir)/build/m4/extensions/jamendo.m4 \ $(top_srcdir)/build/m4/extensions/karaoke.m4 \ $(top_srcdir)/build/m4/extensions/lastfmfingerprint.m4 \ @@ -69,6 +71,11 @@ $(top_srcdir)/build/m4/shamrock/expansions.m4 \ $(top_srcdir)/build/m4/shamrock/gnome-doc.m4 \ $(top_srcdir)/build/m4/shamrock/i18n.m4 \ + $(top_srcdir)/build/m4/shamrock/libtool.m4 \ + $(top_srcdir)/build/m4/shamrock/ltoptions.m4 \ + $(top_srcdir)/build/m4/shamrock/ltsugar.m4 \ + $(top_srcdir)/build/m4/shamrock/ltversion.m4 \ + $(top_srcdir)/build/m4/shamrock/lt~obsolete.m4 \ $(top_srcdir)/build/m4/shamrock/mono.m4 \ $(top_srcdir)/build/m4/shamrock/nunit.m4 \ $(top_srcdir)/build/m4/shamrock/programs.m4 \ @@ -106,7 +113,6 @@ DATA = $(module_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AM_MAKEFLAGS = @AM_MAKEFLAGS@ @@ -403,39 +409,7 @@ Banshee.Telepathy.DBus/PlaylistProvider.cs \ Telepathy/Constants.cs \ Telepathy/MissionControl.cs \ - Telepathy/Telepathy.cs \ - NDesk.DBus/Address.cs \ - NDesk.DBus/Authentication.cs \ - NDesk.DBus/Bus.cs \ - NDesk.DBus/BusObject.cs \ - NDesk.DBus/Connection.cs \ - NDesk.DBus/DBus.cs \ - NDesk.DBus/DProxy.cs \ - NDesk.DBus/ExportObject.cs \ - NDesk.DBus/GLib.cs \ - NDesk.DBus/GLib.IO.cs \ - NDesk.DBus/Introspection.cs \ - NDesk.DBus/IntrospectionSchema.cs \ - NDesk.DBus/Mapper.cs \ - NDesk.DBus/MatchRule.cs \ - NDesk.DBus/Message.cs \ - NDesk.DBus/MessageFilter.cs \ - NDesk.DBus/MessageReader.cs \ - NDesk.DBus/MessageWriter.cs \ - NDesk.DBus/PendingCall.cs \ - NDesk.DBus/Protocol.cs \ - NDesk.DBus/Server.cs \ - NDesk.DBus/ServerBus.cs \ - NDesk.DBus/Signature.cs \ - NDesk.DBus/SocketTransport.cs \ - NDesk.DBus/Transport.cs \ - NDesk.DBus/TypeDefiner.cs \ - NDesk.DBus/TypeImplementer.cs \ - NDesk.DBus/Unix.cs \ - NDesk.DBus/UnixMonoTransport.cs \ - NDesk.DBus/UnixNativeTransport.cs \ - NDesk.DBus/UnixTransport.cs \ - NDesk.DBus/Wrapper.cs + Telepathy/Telepathy.cs RESOURCES = \ Resources/ActiveSourceUI.xml \ diff -Nru banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/NDesk.DBus/Address.cs banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/NDesk.DBus/Address.cs --- banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/NDesk.DBus/Address.cs 2010-08-13 10:57:03.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/NDesk.DBus/Address.cs 1970-01-01 00:00:00.000000000 +0000 @@ -1,188 +0,0 @@ -// Copyright 2006 Alp Toker -// This software is made available under the MIT License -// See COPYING for details - -using System; -using System.Text; -using System.Collections.Generic; - -namespace NDesk.DBus -{ - // Subclass obsolete BadAddressException to avoid ABI break -#pragma warning disable 0618 - //public class InvalidAddressException : Exception - public class InvalidAddressException : BadAddressException - { - public InvalidAddressException (string reason) : base (reason) {} - } -#pragma warning restore 0618 - - [Obsolete ("Use InvalidAddressException")] - public class BadAddressException : Exception - { - public BadAddressException (string reason) : base (reason) {} - } - - class AddressEntry - { - public string Method; - public readonly IDictionary Properties = new Dictionary (); - public UUID GUID = UUID.Zero; - - public override string ToString () - { - StringBuilder sb = new StringBuilder (); - sb.Append (Method); - sb.Append (':'); - - bool first = true; - foreach (KeyValuePair prop in Properties) { - if (first) - first = false; - else - sb.Append (','); - - sb.Append (prop.Key); - sb.Append ('='); - sb.Append (Escape (prop.Value)); - } - - if (GUID != UUID.Zero) { - if (Properties.Count != 0) - sb.Append (','); - sb.Append ("guid"); - sb.Append ('='); - sb.Append (GUID.ToString ()); - } - - return sb.ToString (); - } - - static string Escape (string str) - { - if (str == null) - return String.Empty; - - StringBuilder sb = new StringBuilder (); - int len = str.Length; - - for (int i = 0 ; i != len ; i++) { - char c = str[i]; - - //everything other than the optionally escaped chars _must_ be escaped - if (Char.IsLetterOrDigit (c) || c == '-' || c == '_' || c == '/' || c == '\\' || c == '.') - sb.Append (c); - else - sb.Append (Uri.HexEscape (c)); - } - - return sb.ToString (); - } - - static string Unescape (string str) - { - if (str == null) - return String.Empty; - - StringBuilder sb = new StringBuilder (); - int len = str.Length; - int i = 0; - while (i != len) { - if (Uri.IsHexEncoding (str, i)) - sb.Append (Uri.HexUnescape (str, ref i)); - else - sb.Append (str[i++]); - } - - return sb.ToString (); - } - - - public static AddressEntry Parse (string s) - { - AddressEntry entry = new AddressEntry (); - - string[] parts = s.Split (':'); - - if (parts.Length < 2) - throw new InvalidAddressException ("No colon found"); - if (parts.Length > 2) - throw new InvalidAddressException ("Too many colons found"); - - entry.Method = parts[0]; - - foreach (string propStr in parts[1].Split (',')) { - parts = propStr.Split ('='); - - if (parts.Length < 2) - throw new InvalidAddressException ("No equals sign found"); - if (parts.Length > 2) - throw new InvalidAddressException ("Too many equals signs found"); - - if (parts[0] == "guid") { - try { - entry.GUID = UUID.Parse (parts[1]); - } catch { - throw new InvalidAddressException ("Invalid guid specified"); - } - continue; - } - - entry.Properties[parts[0]] = Unescape (parts[1]); - } - - return entry; - } - } - - static class Address - { - //(unix:(path|abstract)=.*,guid=.*|tcp:host=.*(,port=.*)?);? ... - public static AddressEntry[] Parse (string addresses) - { - if (addresses == null) - throw new ArgumentNullException (addresses); - - List entries = new List (); - - foreach (string entryStr in addresses.Split (';')) - entries.Add (AddressEntry.Parse (entryStr)); - - return entries.ToArray (); - } - - const string SYSTEM_BUS_ADDRESS = "unix:path=/var/run/dbus/system_bus_socket"; - public static string System - { - get { - string addr = Environment.GetEnvironmentVariable ("DBUS_SYSTEM_BUS_ADDRESS"); - - if (String.IsNullOrEmpty (addr)) - addr = SYSTEM_BUS_ADDRESS; - - return addr; - } - } - - public static string Session - { - get { - return Environment.GetEnvironmentVariable ("DBUS_SESSION_BUS_ADDRESS"); - } - } - - public static string Starter - { - get { - return Environment.GetEnvironmentVariable ("DBUS_STARTER_ADDRESS"); - } - } - - public static string StarterBusType - { - get { - return Environment.GetEnvironmentVariable ("DBUS_STARTER_BUS_TYPE"); - } - } - } -} diff -Nru banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/NDesk.DBus/Authentication.cs banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/NDesk.DBus/Authentication.cs --- banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/NDesk.DBus/Authentication.cs 2010-08-13 10:57:03.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/NDesk.DBus/Authentication.cs 1970-01-01 00:00:00.000000000 +0000 @@ -1,538 +0,0 @@ -// Copyright 2006 Alp Toker -// This software is made available under the MIT License -// See COPYING for details - -using System; -using System.Collections.Generic; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Globalization; - -namespace NDesk.DBus -{ - using Authentication; - - //using System.Runtime.InteropServices; - //[StructLayout (LayoutKind.Sequential)] - unsafe struct UUID - { - private int a, b, c, d; - const int ByteLength = 16; - - public static readonly UUID Zero = new UUID (); - - public static bool operator == (UUID a, UUID b) - { - if (a.a == b.a && a.b == b.b && a.c == b.c && a.d == b.d) - return true; - else - return false; - } - - public static bool operator != (UUID a, UUID b) - { - return !(a == b); - } - - public override bool Equals (object o) - { - if (o == null) - return false; - - if (!(o is UUID)) - return false; - - return this == (UUID)o; - } - - public override int GetHashCode () - { - return a ^ b ^ c ^ d; - } - - public override string ToString () - { - StringBuilder sb = new StringBuilder (ByteLength * 2); - - fixed (int* p = &a) { - byte* bp = (byte*)p; - for (int i = 0 ; i != ByteLength ; i++) - sb.Append (bp[i].ToString ("x2", CultureInfo.InvariantCulture)); - } - - return sb.ToString (); - } - - public static UUID Parse (string hex) - { - if (hex.Length != ByteLength * 2) - throw new Exception ("Cannot parse UUID/GUID of invalid length"); - - UUID id = new UUID (); - - byte* result = (byte*)&id.a; - int n = 0, i = 0; - while (n < ByteLength) { - result[n] = (byte)(Sasl.FromHexChar (hex[i++]) << 4); - result[n++] += Sasl.FromHexChar (hex[i++]); - } - - return id; - } - - static Random rand = new Random (); - static byte[] buf = new byte[12]; - public static UUID Generate (DateTime timestamp) - { - UUID id = new UUID (); - - lock (buf) { - rand.NextBytes (buf); - fixed (byte* bp = &buf[0]) { - int* p = (int*)bp; - id.a = p[0]; - id.b = p[1]; - id.c = p[2]; - } - } - - //id.d is assigned to by Timestamp - id.Timestamp = timestamp; - - return id; - } - - public static UUID Generate () - { - return Generate (DateTime.Now); - } - - public uint UnixTimestamp - { - get { - uint unixTime; - - fixed (int* ip = &d) { - if (BitConverter.IsLittleEndian) { - byte* p = (byte*)ip; - byte* bp = (byte*)&unixTime; - bp[0] = p[3]; - bp[1] = p[2]; - bp[2] = p[1]; - bp[3] = p[0]; - } else { - unixTime = *(uint*)ip; - } - } - - return unixTime; - } set { - uint unixTime = value; - - fixed (int* ip = &d) { - if (BitConverter.IsLittleEndian) { - byte* p = (byte*)&unixTime; - byte* bp = (byte*)ip; - bp[0] = p[3]; - bp[1] = p[2]; - bp[2] = p[1]; - bp[3] = p[0]; - } else { - *(uint*)ip = unixTime; - } - } - } - } - - public DateTime Timestamp - { - get { - return Sasl.UnixToDateTime (UnixTimestamp); - } set { - UnixTimestamp = (uint)Sasl.DateTimeToUnix (value); - } - } - } -} - -namespace NDesk.DBus.Authentication -{ - enum ClientState - { - WaitingForData, - WaitingForOK, - WaitingForReject, - } - - enum ServerState - { - WaitingForAuth, - WaitingForData, - WaitingForBegin, - } - - class AuthCommand - { - /* - public AuthCommand (string value) - { - //this.Value = value; - this.Value = value.Trim (); - } - */ - - - public AuthCommand (string value) - { - //this.Value = value; - this.Value = value.Trim (); - Args.AddRange (Value.Split (' ')); - } - - readonly List Args = new List (); - - public string this[int index] - { - get { - if (index >= Args.Count) - return String.Empty; - return Args[index]; - } - } - - /* - public AuthCommand (string value, params string[] args) - { - if (args.Length == 0) - this.Value = value; - else - this.Value = value + " " + String.Join (" ", args); - } - */ - - public readonly string Value; - } - - class SaslPeer : IEnumerable - { - //public Connection conn; - public SaslPeer Peer; - - public Stream stream = null; - public bool UseConsole = false; - - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator () - { - return GetEnumerator (); - } - - internal bool isFinalRead = false; - - public virtual IEnumerator GetEnumerator () - { - // Read the mandatory null credentials byte - /* - if (!UseConsole) - if (conn.Transport.Stream.ReadByte () != 0) - yield break; - */ - - TextReader sr; - sr = UseConsole ? Console.In : new StreamReader (stream, Encoding.ASCII); - - while (true) { - string ln; - bool isEnd = false; - if (!UseConsole && isFinalRead) { - StringBuilder sb = new StringBuilder (); - - while (true) { - //MemoryStream ms = new MemoryStream (); - // TODO: Use char instead? Check for -1? - int a = stream.ReadByte (); - - if (a == -1) { - isEnd = true; - break; - } - - if (a == '\r') { - int b = stream.ReadByte (); - if (b != '\n') - throw new Exception (); - break; - } - - sb.Append ((char)a); - } - - ln = sb.ToString (); - //isFinalRead = false; - } else { - ln = sr.ReadLine (); - } - - //if (isEnd && ln == string.Empty) - // yield break; - if (ln == null) - yield break; - if (ln != String.Empty) - yield return new AuthCommand (ln); - if (isEnd) - yield break; - } - } - - public bool Authenticate () - { - return Run (this); - } - - public bool AuthenticateSelf () - { - //IEnumerator a = Peer.GetEnumerator (); - IEnumerator b = GetEnumerator (); - //bool ret = b.MoveNext (); - while (b.MoveNext ()) { - if (b.Current.Value == "BEGIN") - return true; - } - return false; - } - - public virtual bool Run (IEnumerable commands) - { - TextWriter sw; - sw = UseConsole ? Console.Out : new StreamWriter (stream, Encoding.ASCII); - if (!UseConsole) - sw.NewLine = "\r\n"; - - foreach (AuthCommand command in commands) { - if (command == null) { - // Disconnect here? - return false; - } - sw.WriteLine (command.Value); - sw.Flush (); - } - - return true; - } - } - - class SaslClient : SaslPeer - { - public string Identity = String.Empty; - - //static Regex rejectedRegex = new Regex (@"^REJECTED(\s+(\w+))*$"); - - // This enables simple support for multiple AUTH schemes - enum AuthMech - { - External, - Anonymous, - None, - } - - public override IEnumerator GetEnumerator () - { - IEnumerator replies = Peer.GetEnumerator (); - - AuthMech currMech = AuthMech.External; - - while (true) { - Peer.isFinalRead = false; - - if (currMech == AuthMech.External) { - string str = Identity; - byte[] bs = Encoding.ASCII.GetBytes (str); - string initialData = Sasl.ToHex (bs); - yield return new AuthCommand ("AUTH EXTERNAL " + initialData); - currMech = AuthMech.Anonymous; - } else if (currMech == AuthMech.Anonymous) { - yield return new AuthCommand ("AUTH ANONYMOUS"); - currMech = AuthMech.None; - } else { - throw new Exception ("Authentication failure"); - } - - Peer.isFinalRead = true; - - AuthCommand reply; - if (!replies.MoveNext ()) - yield break; - reply = replies.Current; - - if (reply[0] == "REJECTED") { - continue; - } - - /* - Match m = rejectedRegex.Match (reply.Value); - if (m.Success) { - string[] mechanisms = m.Groups[1].Value.Split (' '); - //yield return new AuthCommand ("CANCEL"); - continue; - } - */ - - if (reply[0] != "OK") { - yield return new AuthCommand ("ERROR"); - continue; - } - - if (reply[1] == String.Empty) - ActualId = UUID.Zero; - else - ActualId = UUID.Parse (reply[1]); - - yield return new AuthCommand ("BEGIN"); - yield break; - } - - } - - public UUID ActualId = UUID.Zero; - } - - class SaslServer : SaslPeer - { - //public int MaxFailures = 10; - public UUID Guid = UUID.Zero; - - public long uid = 0; - - static Regex authRegex = new Regex (@"^AUTH\s+(\w+)(?:\s+(.*))?$"); - static string[] supportedMechanisms = {"EXTERNAL"}; - - public override IEnumerator GetEnumerator () - { - IEnumerator replies = Peer.GetEnumerator (); - - while (true) { - Peer.isFinalRead = false; - - AuthCommand reply; - if (!replies.MoveNext ()) { - yield return null; - yield break; - //continue; - } - reply = replies.Current; - - Match m = authRegex.Match (reply.Value); - if (!m.Success) { - yield return new AuthCommand ("ERROR"); - continue; - } - - string mechanism = m.Groups[1].Value; - string initialResponse = m.Groups[2].Value; - - if (mechanism == "EXTERNAL") { - try { - byte[] bs = Sasl.FromHex (initialResponse); - string authStr = Encoding.ASCII.GetString (bs); - uid = UInt32.Parse (authStr); - } catch { - uid = 0; - } - //return RunExternal (Run (), initialResponse); - } else { - yield return new AuthCommand ("REJECTED " + String.Join (" ", supportedMechanisms)); - continue; - } - - if (Guid == UUID.Zero) - yield return new AuthCommand ("OK"); - else - yield return new AuthCommand ("OK " + Guid.ToString ()); - - Peer.isFinalRead = true; - - if (!replies.MoveNext ()) { - /* - yield break; - continue; - */ - yield return null; - yield break; - } - - reply = replies.Current; - if (reply.Value != "BEGIN") { - yield return new AuthCommand ("ERROR"); - continue; - } - - yield break; - } - } - } - - static class Sasl - { - //From Mono.Unix.Native.NativeConvert - //should these methods use long or (u)int? - public static DateTime UnixToDateTime (long time) - { - DateTime LocalUnixEpoch = new DateTime (1970, 1, 1); - TimeSpan LocalUtcOffset = TimeZone.CurrentTimeZone.GetUtcOffset (DateTime.UtcNow); - return LocalUnixEpoch.AddSeconds ((double) time + LocalUtcOffset.TotalSeconds); - } - - public static long DateTimeToUnix (DateTime time) - { - DateTime LocalUnixEpoch = new DateTime (1970, 1, 1); - TimeSpan LocalUtcOffset = TimeZone.CurrentTimeZone.GetUtcOffset (DateTime.UtcNow); - TimeSpan unixTime = time.Subtract (LocalUnixEpoch) - LocalUtcOffset; - - return (long) unixTime.TotalSeconds; - } - - //From Mono.Security.Cryptography - //Modified to output lowercase hex - static public string ToHex (byte[] input) - { - if (input == null) - return null; - - StringBuilder sb = new StringBuilder (input.Length * 2); - foreach (byte b in input) { - sb.Append (b.ToString ("x2", CultureInfo.InvariantCulture)); - } - return sb.ToString (); - } - - //From Mono.Security.Cryptography - static public byte FromHexChar (char c) - { - if ((c >= 'a') && (c <= 'f')) - return (byte) (c - 'a' + 10); - if ((c >= 'A') && (c <= 'F')) - return (byte) (c - 'A' + 10); - if ((c >= '0') && (c <= '9')) - return (byte) (c - '0'); - throw new ArgumentException ("Invalid hex char"); - } - - //From Mono.Security.Cryptography - static public byte[] FromHex (string hex) - { - if (hex == null) - return null; - if ((hex.Length & 0x1) == 0x1) - throw new ArgumentException ("Length must be a multiple of 2"); - - byte[] result = new byte [hex.Length >> 1]; - int n = 0; - int i = 0; - while (n < result.Length) { - result [n] = (byte) (FromHexChar (hex [i++]) << 4); - result [n++] += FromHexChar (hex [i++]); - } - return result; - } - } -} diff -Nru banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/NDesk.DBus/Bus.cs banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/NDesk.DBus/Bus.cs --- banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/NDesk.DBus/Bus.cs 2010-08-13 10:57:03.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/NDesk.DBus/Bus.cs 1970-01-01 00:00:00.000000000 +0000 @@ -1,179 +0,0 @@ -// Copyright 2006 Alp Toker -// This software is made available under the MIT License -// See COPYING for details - -using System; -using System.Collections.Generic; -using org.freedesktop.DBus; - -namespace NDesk.DBus -{ - public sealed class Bus : Connection - { - static Bus systemBus = null; - public static Bus System - { - get { - if (systemBus == null) { - try { - if (Address.StarterBusType == "system") - systemBus = Starter; - else - systemBus = Bus.Open (Address.System); - } catch (Exception e) { - throw new Exception ("Unable to open the system message bus.", e); - } - } - - return systemBus; - } - } - - static Bus sessionBus = null; - public static Bus Session - { - get { - if (sessionBus == null) { - try { - if (Address.StarterBusType == "session") - sessionBus = Starter; - else - sessionBus = Bus.Open (Address.Session); - } catch (Exception e) { - throw new Exception ("Unable to open the session message bus.", e); - } - } - - return sessionBus; - } - } - - //TODO: parsing of starter bus type, or maybe do this another way - static Bus starterBus = null; - public static Bus Starter - { - get { - if (starterBus == null) { - try { - starterBus = Bus.Open (Address.Starter); - } catch (Exception e) { - throw new Exception ("Unable to open the starter message bus.", e); - } - } - - return starterBus; - } - } - - //public static readonly Bus Session = null; - - //TODO: use the guid, not the whole address string - //TODO: consider what happens when a connection has been closed - static Dictionary buses = new Dictionary (); - - //public static Connection Open (string address) - public static new Bus Open (string address) - { - if (address == null) - throw new ArgumentNullException ("address"); - - Bus bus; - if (buses.TryGetValue (address, out bus)) - return bus; - - bus = new Bus (address); - buses[address] = bus; - - return bus; - } - - IBus bus; - - static readonly string DBusName = "org.freedesktop.DBus"; - static readonly ObjectPath DBusPath = new ObjectPath ("/org/freedesktop/DBus"); - - public Bus (string address) : base (address) - { - bus = GetObject (DBusName, DBusPath); - - /* - bus.NameAcquired += delegate (string acquired_name) { - Console.WriteLine ("NameAcquired: " + acquired_name); - }; - */ - Register (); - } - - //should this be public? - //as long as Bus subclasses Connection, having a Register with a completely different meaning is bad - void Register () - { - if (unique_name != null) - throw new Exception ("Bus already has a unique name"); - - unique_name = bus.Hello (); - } - - public ulong GetUnixUser (string name) - { - return bus.GetConnectionUnixUser (name); - } - - public RequestNameReply RequestName (string name) - { - return RequestName (name, NameFlag.None); - } - - public RequestNameReply RequestName (string name, NameFlag flags) - { - return bus.RequestName (name, flags); - } - - public ReleaseNameReply ReleaseName (string name) - { - return bus.ReleaseName (name); - } - - public bool NameHasOwner (string name) - { - return bus.NameHasOwner (name); - } - - public StartReply StartServiceByName (string name) - { - return StartServiceByName (name, 0); - } - - public StartReply StartServiceByName (string name, uint flags) - { - return bus.StartServiceByName (name, flags); - } - - internal protected override void AddMatch (string rule) - { - bus.AddMatch (rule); - } - - internal protected override void RemoveMatch (string rule) - { - bus.RemoveMatch (rule); - } - - public string GetId () - { - return bus.GetId (); - } - - string unique_name = null; - public string UniqueName - { - get { - return unique_name; - } set { - if (unique_name != null) - throw new Exception ("Unique name can only be set once"); - unique_name = value; - } - } - } -} diff -Nru banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/NDesk.DBus/BusObject.cs banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/NDesk.DBus/BusObject.cs --- banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/NDesk.DBus/BusObject.cs 2010-08-13 10:57:03.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/NDesk.DBus/BusObject.cs 1970-01-01 00:00:00.000000000 +0000 @@ -1,398 +0,0 @@ -// Copyright 2006 Alp Toker -// This software is made available under the MIT License -// See COPYING for details - -using System; -using System.Reflection; -using System.Reflection.Emit; -using System.Collections.Generic; - -namespace NDesk.DBus -{ - class BusObject - { - protected Connection conn; - string bus_name; - ObjectPath object_path; - - //protected BusObject () - public BusObject () - { - } - - public BusObject (Connection conn, string bus_name, ObjectPath object_path) - { - this.conn = conn; - this.bus_name = bus_name; - this.object_path = object_path; - } - - public Connection Connection - { - get { - return conn; - } - } - - public string BusName - { - get { - return bus_name; - } - } - - public ObjectPath Path - { - get { - return object_path; - } - } - - public void ToggleSignal (string iface, string member, Delegate dlg, bool adding) - { - MatchRule rule = new MatchRule (); - rule.MessageType = MessageType.Signal; - rule.Fields.Add (FieldCode.Interface, new MatchTest (iface)); - rule.Fields.Add (FieldCode.Member, new MatchTest (member)); - rule.Fields.Add (FieldCode.Path, new MatchTest (object_path)); - - if (adding) { - if (conn.Handlers.ContainsKey (rule)) - conn.Handlers[rule] = Delegate.Combine (conn.Handlers[rule], dlg); - else { - conn.Handlers[rule] = dlg; - conn.AddMatch (rule.ToString ()); - } - } else { - conn.Handlers[rule] = Delegate.Remove (conn.Handlers[rule], dlg); - if (conn.Handlers[rule] == null) { - conn.RemoveMatch (rule.ToString ()); - conn.Handlers.Remove (rule); - } - } - } - - public void SendSignal (string iface, string member, string inSigStr, MessageWriter writer, Type retType, out Exception exception) - { - exception = null; - - //TODO: don't ignore retVal, exception etc. - - Signature outSig = String.IsNullOrEmpty (inSigStr) ? Signature.Empty : new Signature (inSigStr); - - Signal signal = new Signal (object_path, iface, member); - signal.message.Signature = outSig; - - Message signalMsg = signal.message; - signalMsg.Body = writer.ToArray (); - - conn.Send (signalMsg); - } - - public object SendMethodCallOld (string iface, string member, string inSigStr, MessageWriter writer, Type retType, out Exception exception) - { - exception = null; - - //TODO: don't ignore retVal, exception etc. - - Signature inSig = String.IsNullOrEmpty (inSigStr) ? Signature.Empty : new Signature (inSigStr); - - MethodCall method_call = new MethodCall (object_path, iface, member, bus_name, inSig); - - Message callMsg = method_call.message; - callMsg.Body = writer.ToArray (); - - //Invoke Code:: - - //TODO: complete out parameter support - /* - Type[] outParmTypes = Mapper.GetTypes (ArgDirection.Out, mi.GetParameters ()); - Signature outParmSig = Signature.GetSig (outParmTypes); - - if (outParmSig != Signature.Empty) - throw new Exception ("Out parameters not yet supported: out_signature='" + outParmSig.Value + "'"); - */ - - Type[] outTypes = new Type[1]; - outTypes[0] = retType; - - //we default to always requiring replies for now, even though unnecessary - //this is to make sure errors are handled synchronously - //TODO: don't hard code this - bool needsReply = true; - - //if (mi.ReturnType == typeof (void)) - // needsReply = false; - - callMsg.ReplyExpected = needsReply; - callMsg.Signature = inSig; - - if (!needsReply) { - conn.Send (callMsg); - return null; - } - -#if PROTO_REPLY_SIGNATURE - if (needsReply) { - Signature outSig = Signature.GetSig (outTypes); - callMsg.Header[FieldCode.ReplySignature] = outSig; - } -#endif - - Message retMsg = conn.SendWithReplyAndBlock (callMsg); - - object retVal = null; - - //handle the reply message - switch (retMsg.Header.MessageType) { - case MessageType.MethodReturn: - object[] retVals = MessageHelper.GetDynamicValues (retMsg, outTypes); - if (retVals.Length != 0) - retVal = retVals[retVals.Length - 1]; - break; - case MessageType.Error: - //TODO: typed exceptions - Error error = new Error (retMsg); - string errMsg = String.Empty; - if (retMsg.Signature.Value.StartsWith ("s")) { - MessageReader reader = new MessageReader (retMsg); - errMsg = reader.ReadString (); - } - exception = new Exception (error.ErrorName + ": " + errMsg); - break; - default: - throw new Exception ("Got unexpected message of type " + retMsg.Header.MessageType + " while waiting for a MethodReturn or Error"); - } - - return retVal; - } - - public MessageReader SendMethodCall (string iface, string member, string inSigStr, MessageWriter writer, Type retType, out Exception exception) - { - exception = null; - - //TODO: don't ignore retVal, exception etc. - - Signature inSig = String.IsNullOrEmpty (inSigStr) ? Signature.Empty : new Signature (inSigStr); - - MethodCall method_call = new MethodCall (object_path, iface, member, bus_name, inSig); - - Message callMsg = method_call.message; - callMsg.Body = writer.ToArray (); - - //Invoke Code:: - - //TODO: complete out parameter support - /* - Type[] outParmTypes = Mapper.GetTypes (ArgDirection.Out, mi.GetParameters ()); - Signature outParmSig = Signature.GetSig (outParmTypes); - - if (outParmSig != Signature.Empty) - throw new Exception ("Out parameters not yet supported: out_signature='" + outParmSig.Value + "'"); - */ - - Type[] outTypes = new Type[1]; - outTypes[0] = retType; - - //we default to always requiring replies for now, even though unnecessary - //this is to make sure errors are handled synchronously - //TODO: don't hard code this - bool needsReply = true; - - //if (mi.ReturnType == typeof (void)) - // needsReply = false; - - callMsg.ReplyExpected = needsReply; - callMsg.Signature = inSig; - - if (!needsReply) { - conn.Send (callMsg); - return null; - } - -#if PROTO_REPLY_SIGNATURE - if (needsReply) { - Signature outSig = Signature.GetSig (outTypes); - callMsg.Header[FieldCode.ReplySignature] = outSig; - } -#endif - - Message retMsg = conn.SendWithReplyAndBlock (callMsg); - - MessageReader retVal = null; - - //handle the reply message - switch (retMsg.Header.MessageType) { - case MessageType.MethodReturn: - retVal = new MessageReader (retMsg); - break; - case MessageType.Error: - //TODO: typed exceptions - Error error = new Error (retMsg); - string errMsg = String.Empty; - if (retMsg.Signature.Value.StartsWith ("s")) { - MessageReader reader = new MessageReader (retMsg); - errMsg = reader.ReadString (); - } - exception = new Exception (error.ErrorName + ": " + errMsg); - break; - default: - throw new Exception ("Got unexpected message of type " + retMsg.Header.MessageType + " while waiting for a MethodReturn or Error"); - } - - return retVal; - } - - public void Invoke (MethodBase methodBase, string methodName, object[] inArgs, out object[] outArgs, out object retVal, out Exception exception) - { - outArgs = new object[0]; - retVal = null; - exception = null; - - MethodInfo mi = methodBase as MethodInfo; - - if (mi != null && mi.IsSpecialName && (methodName.StartsWith ("add_") || methodName.StartsWith ("remove_"))) { - string[] parts = methodName.Split (new char[]{'_'}, 2); - string ename = parts[1]; - Delegate dlg = (Delegate)inArgs[0]; - - ToggleSignal (Mapper.GetInterfaceName (mi), ename, dlg, parts[0] == "add"); - - return; - } - - Type[] inTypes = Mapper.GetTypes (ArgDirection.In, mi.GetParameters ()); - Signature inSig = Signature.GetSig (inTypes); - - MethodCall method_call; - Message callMsg; - - //build the outbound method call message - { - //this bit is error-prone (no null checking) and will need rewriting when DProxy is replaced - string iface = null; - if (mi != null) - iface = Mapper.GetInterfaceName (mi); - - //map property accessors - //TODO: this needs to be done properly, not with simple String.Replace - //note that IsSpecialName is also for event accessors, but we already handled those and returned - if (mi != null && mi.IsSpecialName) { - methodName = methodName.Replace ("get_", "Get"); - methodName = methodName.Replace ("set_", "Set"); - } - - method_call = new MethodCall (object_path, iface, methodName, bus_name, inSig); - - callMsg = method_call.message; - - if (inArgs != null && inArgs.Length != 0) { - MessageWriter writer = new MessageWriter (Connection.NativeEndianness); - writer.connection = conn; - - for (int i = 0 ; i != inTypes.Length ; i++) - writer.Write (inTypes[i], inArgs[i]); - - callMsg.Body = writer.ToArray (); - } - } - - //TODO: complete out parameter support - /* - Type[] outParmTypes = Mapper.GetTypes (ArgDirection.Out, mi.GetParameters ()); - Signature outParmSig = Signature.GetSig (outParmTypes); - - if (outParmSig != Signature.Empty) - throw new Exception ("Out parameters not yet supported: out_signature='" + outParmSig.Value + "'"); - */ - - Type[] outTypes = new Type[1]; - outTypes[0] = mi.ReturnType; - - //we default to always requiring replies for now, even though unnecessary - //this is to make sure errors are handled synchronously - //TODO: don't hard code this - bool needsReply = true; - - //if (mi.ReturnType == typeof (void)) - // needsReply = false; - - callMsg.ReplyExpected = needsReply; - callMsg.Signature = inSig; - - if (!needsReply) { - conn.Send (callMsg); - return; - } - -#if PROTO_REPLY_SIGNATURE - if (needsReply) { - Signature outSig = Signature.GetSig (outTypes); - callMsg.Header[FieldCode.ReplySignature] = outSig; - } -#endif - - Message retMsg = conn.SendWithReplyAndBlock (callMsg); - - //handle the reply message - switch (retMsg.Header.MessageType) { - case MessageType.MethodReturn: - object[] retVals = MessageHelper.GetDynamicValues (retMsg, outTypes); - if (retVals.Length != 0) - retVal = retVals[retVals.Length - 1]; - break; - case MessageType.Error: - //TODO: typed exceptions - Error error = new Error (retMsg); - string errMsg = String.Empty; - if (retMsg.Signature.Value.StartsWith ("s")) { - MessageReader reader = new MessageReader (retMsg); - errMsg = reader.ReadString (); - } - exception = new Exception (error.ErrorName + ": " + errMsg); - break; - default: - throw new Exception ("Got unexpected message of type " + retMsg.Header.MessageType + " while waiting for a MethodReturn or Error"); - } - - return; - } - - public static object GetObject (Connection conn, string bus_name, ObjectPath object_path, Type declType) - { - Type proxyType = TypeImplementer.Root.GetImplementation (declType); - - //BusObject inst = (BusObject)Activator.CreateInstance (proxyType); - object instObj = Activator.CreateInstance (proxyType); - BusObject inst = GetBusObject (instObj); - inst.conn = conn; - inst.bus_name = bus_name; - inst.object_path = object_path; - - return instObj; - } - - static Dictionary boCache = new Dictionary(); - public static BusObject GetBusObject (object instObj) - { - if (instObj is BusObject) - return (BusObject)instObj; - - BusObject inst; - if (boCache.TryGetValue (instObj, out inst)) - return inst; - - inst = new BusObject (); - boCache[instObj] = inst; - - return inst; - } - - public Delegate GetHookupDelegate (EventInfo ei) - { - DynamicMethod hookupMethod = TypeImplementer.GetHookupMethod (ei); - Delegate d = hookupMethod.CreateDelegate (ei.EventHandlerType, this); - return d; - } - } -} diff -Nru banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/NDesk.DBus/Connection.cs banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/NDesk.DBus/Connection.cs --- banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/NDesk.DBus/Connection.cs 2010-08-13 10:57:03.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/NDesk.DBus/Connection.cs 1970-01-01 00:00:00.000000000 +0000 @@ -1,592 +0,0 @@ -// Copyright 2006 Alp Toker -// This software is made available under the MIT License -// See COPYING for details - -using System; -using System.Collections.Generic; -using System.IO; -using System.Threading; -using System.Reflection; - -namespace NDesk.DBus -{ - using Authentication; - using Transports; - - public partial class Connection - { - Transport transport; - internal Transport Transport { - get { - return transport; - } set { - transport = value; - transport.Connection = this; - } - } - - protected Connection () {} - - internal Connection (Transport transport) - { - this.transport = transport; - transport.Connection = this; - } - - //should this be public? - internal Connection (string address) - { - OpenPrivate (address); - Authenticate (); - } - - internal bool isConnected = false; - public bool IsConnected - { - get { - return isConnected; - } - } - - // TODO: Complete disconnection support - internal bool isShared = false; - public void Close () - { - if (isShared) - throw new Exception ("Cannot disconnect a shared Connection"); - - if (!IsConnected) - return; - - transport.Disconnect (); - isConnected = false; - } - - //should we do connection sharing here? - public static Connection Open (string address) - { - Connection conn = new Connection (); - conn.OpenPrivate (address); - conn.Authenticate (); - - return conn; - } - - internal void OpenPrivate (string address) - { - if (address == null) - throw new ArgumentNullException ("address"); - - AddressEntry[] entries = Address.Parse (address); - if (entries.Length == 0) - throw new Exception ("No addresses were found"); - - //TODO: try alternative addresses if needed - AddressEntry entry = entries[0]; - - Id = entry.GUID; - Transport = Transport.Create (entry); - isConnected = true; - } - - internal UUID Id = UUID.Zero; - - void Authenticate () - { - if (transport != null) - transport.WriteCred (); - - SaslClient auth = new SaslClient (); - auth.Identity = transport.AuthString (); - auth.stream = transport.Stream; - auth.Peer = new SaslPeer (); - auth.Peer.Peer = auth; - auth.Peer.stream = transport.Stream; - - if (!auth.Authenticate ()) - throw new Exception ("Authentication failure"); - - if (Id != UUID.Zero) - if (auth.ActualId != Id) - throw new Exception ("Authentication failure: Unexpected GUID"); - - if (Id == UUID.Zero) - Id = auth.ActualId; - - isAuthenticated = true; - - //(((SocketTransport)Transport).socket).Blocking = false; - } - - internal bool isAuthenticated = false; - internal bool IsAuthenticated - { - get { - return isAuthenticated; - } - } - - //Interlocked.Increment() handles the overflow condition for uint correctly, so it's ok to store the value as an int but cast it to uint - int serial = 0; - internal uint GenerateSerial () - { - //return ++serial; - return (uint)Interlocked.Increment (ref serial); - } - - internal Message SendWithReplyAndBlock (Message msg) - { - PendingCall pending = SendWithReply (msg); - return pending.Reply; - } - - internal PendingCall SendWithReply (Message msg) - { - msg.ReplyExpected = true; - - if (msg.Header.Serial == 0) - msg.Header.Serial = GenerateSerial (); - - // Should we throttle the maximum number of concurrent PendingCalls? - // Should we support timeouts? - PendingCall pending = new PendingCall (this); - pendingCalls[msg.Header.Serial] = pending; - - Send (msg); - //WriteMessage (msg); - - return pending; - } - - internal virtual uint Send (Message msg) - { - if (msg.Header.Serial == 0) - msg.Header.Serial = GenerateSerial (); - - transport.WriteMessage (msg); - - //Outbound.Enqueue (msg); - //temporary - //Flush (); - - return msg.Header.Serial; - } - - Queue Inbound = new Queue (); - /* - Queue Outbound = new Queue (); - - public void Flush () - { - //should just iterate the enumerator here - while (Outbound.Count != 0) { - Message msg = Outbound.Dequeue (); - WriteMessage (msg); - } - } - - public bool ReadWrite (int timeout_milliseconds) - { - //TODO - - return true; - } - - public bool ReadWrite () - { - return ReadWrite (-1); - } - - public bool Dispatch () - { - //TODO - Message msg = Inbound.Dequeue (); - //HandleMessage (msg); - - return true; - } - - public bool ReadWriteDispatch (int timeout_milliseconds) - { - //TODO - return Dispatch (); - } - - public bool ReadWriteDispatch () - { - return ReadWriteDispatch (-1); - } - */ - - //temporary hack - internal void DispatchSignals () - { - lock (Inbound) { - while (Inbound.Count != 0) { - Message msg = Inbound.Dequeue (); - HandleSignal (msg); - } - } - } - - internal Thread mainThread = Thread.CurrentThread; - - //temporary hack - public void Iterate () - { - mainThread = Thread.CurrentThread; - - //Message msg = Inbound.Dequeue (); - Message msg = transport.ReadMessage (); - //if (msg != null) - HandleMessage (msg); - DispatchSignals (); - } - - internal void Dispatch () - { - while (transport.Inbound.Count != 0) { - Message msg = transport.Inbound.Dequeue (); - HandleMessage (msg); - } - DispatchSignals (); - } - - internal virtual void HandleMessage (Message msg) - { - if (msg == null) - return; - - //TODO: support disconnection situations properly and move this check elsewhere - if (msg == null) - throw new ArgumentNullException ("msg", "Cannot handle a null message; maybe the bus was disconnected"); - - //TODO: Restrict messages to Local ObjectPath? - - { - object field_value = msg.Header[FieldCode.ReplySerial]; - if (field_value != null) { - uint reply_serial = (uint)field_value; - PendingCall pending; - - if (pendingCalls.TryGetValue (reply_serial, out pending)) { - if (pendingCalls.Remove (reply_serial)) - pending.Reply = msg; - - return; - } - - //we discard reply messages with no corresponding PendingCall - if (Protocol.Verbose) - Console.Error.WriteLine ("Unexpected reply message received: MessageType='" + msg.Header.MessageType + "', ReplySerial=" + reply_serial); - - return; - } - } - - switch (msg.Header.MessageType) { - case MessageType.MethodCall: - MethodCall method_call = new MethodCall (msg); - HandleMethodCall (method_call); - break; - case MessageType.Signal: - //HandleSignal (msg); - lock (Inbound) - Inbound.Enqueue (msg); - break; - case MessageType.Error: - //TODO: better exception handling - Error error = new Error (msg); - string errMsg = String.Empty; - if (msg.Signature.Value.StartsWith ("s")) { - MessageReader reader = new MessageReader (msg); - errMsg = reader.ReadString (); - } - //throw new Exception ("Remote Error: Signature='" + msg.Signature.Value + "' " + error.ErrorName + ": " + errMsg); - //if (Protocol.Verbose) - Console.Error.WriteLine ("Remote Error: Signature='" + msg.Signature.Value + "' " + error.ErrorName + ": " + errMsg); - break; - case MessageType.Invalid: - default: - throw new Exception ("Invalid message received: MessageType='" + msg.Header.MessageType + "'"); - } - } - - Dictionary pendingCalls = new Dictionary (); - - //this might need reworking with MulticastDelegate - internal void HandleSignal (Message msg) - { - Signal signal = new Signal (msg); - - //TODO: this is a hack, not necessary when MatchRule is complete - MatchRule rule = new MatchRule (); - rule.MessageType = MessageType.Signal; - rule.Fields.Add (FieldCode.Interface, new MatchTest (signal.Interface)); - rule.Fields.Add (FieldCode.Member, new MatchTest (signal.Member)); - rule.Fields.Add (FieldCode.Path, new MatchTest (signal.Path)); - - Delegate dlg; - if (Handlers.TryGetValue (rule, out dlg)) { - MethodInfo mi = dlg.GetType ().GetMethod ("Invoke"); - - bool compatible = false; - Signature inSig, outSig; - - if (TypeImplementer.SigsForMethod(mi, out inSig, out outSig)) - if (outSig == Signature.Empty && inSig == msg.Signature) - compatible = true; - - if (!compatible) { - if (Protocol.Verbose) - Console.Error.WriteLine ("Signal argument mismatch: " + signal.Interface + '.' + signal.Member); - return; - } - - //signals have no return value - dlg.DynamicInvoke (MessageHelper.GetDynamicValues (msg, mi.GetParameters ())); - } else { - //TODO: how should we handle this condition? sending an Error may not be appropriate in this case - if (Protocol.Verbose) - Console.Error.WriteLine ("Warning: No signal handler for " + signal.Member); - } - } - - internal Dictionary Handlers = new Dictionary (); - - //very messy - internal void MaybeSendUnknownMethodError (MethodCall method_call) - { - Message msg = MessageHelper.CreateUnknownMethodError (method_call); - if (msg != null) - Send (msg); - } - - //not particularly efficient and needs to be generalized - internal void HandleMethodCall (MethodCall method_call) - { - //TODO: Ping and Introspect need to be abstracted and moved somewhere more appropriate once message filter infrastructure is complete - - //FIXME: these special cases are slightly broken for the case where the member but not the interface is specified in the message - if (method_call.Interface == "org.freedesktop.DBus.Peer") { - switch (method_call.Member) { - case "Ping": - Send (MessageHelper.ConstructReply (method_call)); - return; - case "GetMachineId": - if (MachineId != UUID.Zero) { - Send (MessageHelper.ConstructReply (method_call, MachineId.ToString ())); - return; - } else { - // Might want to send back an error here? - } - break; - } - } - - if (method_call.Interface == "org.freedesktop.DBus.Introspectable" && method_call.Member == "Introspect") { - Introspector intro = new Introspector (); - intro.root_path = method_call.Path; - intro.WriteStart (); - - //FIXME: do this properly - //this is messy and inefficient - List linkNodes = new List (); - int depth = method_call.Path.Decomposed.Length; - foreach (ObjectPath pth in RegisteredObjects.Keys) { - if (pth.Value == (method_call.Path.Value)) { - ExportObject exo = (ExportObject)RegisteredObjects[pth]; - exo.WriteIntrospect (intro); - } else { - for (ObjectPath cur = pth ; cur != null ; cur = cur.Parent) { - if (cur.Value == method_call.Path.Value) { - string linkNode = pth.Decomposed[depth]; - if (!linkNodes.Contains (linkNode)) { - intro.WriteNode (linkNode); - linkNodes.Add (linkNode); - } - } - } - } - } - - intro.WriteEnd (); - - Message reply = MessageHelper.ConstructReply (method_call, intro.xml); - Send (reply); - return; - } - - BusObject bo; - if (RegisteredObjects.TryGetValue (method_call.Path, out bo)) { - ExportObject eo = (ExportObject)bo; - eo.HandleMethodCall (method_call); - } else { - MaybeSendUnknownMethodError (method_call); - } - } - - Dictionary RegisteredObjects = new Dictionary (); - - //FIXME: this shouldn't be part of the core API - //that also applies to much of the other object mapping code - - public object GetObject (Type type, string bus_name, ObjectPath path) - { - //if (type == null) - // return GetObject (bus_name, path); - - //if the requested type is an interface, we can implement it efficiently - //otherwise we fall back to using a transparent proxy - if (type.IsInterface || type.IsAbstract) { - return BusObject.GetObject (this, bus_name, path, type); - } else { - if (Protocol.Verbose) - Console.Error.WriteLine ("Warning: Note that MarshalByRefObject use is not recommended; for best performance, define interfaces"); - - BusObject busObject = new BusObject (this, bus_name, path); - DProxy prox = new DProxy (busObject, type); - return prox.GetTransparentProxy (); - } - } - - public T GetObject (string bus_name, ObjectPath path) - { - return (T)GetObject (typeof (T), bus_name, path); - } - - [Obsolete ("Use the overload of Register() which does not take a bus_name parameter")] - public void Register (string bus_name, ObjectPath path, object obj) - { - Register (path, obj); - } - - [Obsolete ("Use the overload of Unregister() which does not take a bus_name parameter")] - public object Unregister (string bus_name, ObjectPath path) - { - return Unregister (path); - } - - public void Register (ObjectPath path, object obj) - { - ExportObject eo = ExportObject.CreateExportObject (this, path, obj); - eo.Registered = true; - - //TODO: implement some kind of tree data structure or internal object hierarchy. right now we are ignoring the name and putting all object paths in one namespace, which is bad - RegisteredObjects[path] = eo; - } - - public object Unregister (ObjectPath path) - { - BusObject bo; - - if (!RegisteredObjects.TryGetValue (path, out bo)) - throw new Exception ("Cannot unregister " + path + " as it isn't registered"); - - RegisteredObjects.Remove (path); - - ExportObject eo = (ExportObject)bo; - eo.Registered = false; - - return eo.obj; - } - - //these look out of place, but are useful - internal protected virtual void AddMatch (string rule) - { - } - - internal protected virtual void RemoveMatch (string rule) - { - } - - // Maybe we should use XDG/basedir or check an env var for this? - const string machineUuidFilename = @"/var/lib/dbus/machine-id"; - static UUID? machineId = null; - private static object idReadLock = new object (); - internal static UUID MachineId - { - get { - lock (idReadLock) { - if (machineId != null) - return (UUID)machineId; - try { - machineId = ReadMachineId (machineUuidFilename); - } catch { - machineId = UUID.Zero; - } - return (UUID)machineId; - } - } - } - - static UUID ReadMachineId (string fname) - { - using (FileStream fs = File.OpenRead (fname)) { - // Length is typically 33 (32 for the UUID, plus a linefeed) - //if (fs.Length < 32) - // return UUID.Zero; - - byte[] data = new byte[32]; - - int pos = 0; - while (pos < data.Length) { - int read = fs.Read (data, pos, data.Length - pos); - if (read == 0) - break; - pos += read; - } - - if (pos != data.Length) - //return UUID.Zero; - throw new Exception ("Insufficient data while reading GUID string"); - - return UUID.Parse (System.Text.Encoding.ASCII.GetString (data)); - } - } - - - /* - [DllImport ("advapi32.dll", SetLastError = true)] - static extern bool GetCurrentHwProfile (IntPtr fProfile); - - [StructLayout (LayoutKind.Sequential)] - private class HWProfile - { - public Int32 dwDockInfo; - [MarshalAs (UnmanagedType.ByValTStr, SizeConst = 39)] - public string szHwProfileGuid; - [MarshalAs (UnmanagedType.ByValTStr, SizeConst = 80)] - public string szHwProfileName; - } - - static UUID ReadMachineIdWin32 () - { - // Completely untested - string lText = null; - - IntPtr lHWInfoPtr = Marshal.AllocHGlobal (123); - HWProfile lProfile = new HWProfile (); - Marshal.StructureToPtr (lProfile, lHWInfoPtr, false); - if (GetCurrentHwProfile (lHWInfoPtr)) { - Marshal.PtrToStructure (lHWInfoPtr, lProfile); - lText = lProfile.szHwProfileGuid.ToString (); - } - Marshal.FreeHGlobal (lHWInfoPtr); - - string uuidString = lText.Replace ("-", String.Empty).Substring (1, 32); - return UUID.Parse (uuidString); - } - */ - - static Connection () - { - if (BitConverter.IsLittleEndian) - NativeEndianness = EndianFlag.Little; - else - NativeEndianness = EndianFlag.Big; - } - - internal static readonly EndianFlag NativeEndianness; - } -} diff -Nru banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/NDesk.DBus/DBus.cs banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/NDesk.DBus/DBus.cs --- banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/NDesk.DBus/DBus.cs 2010-08-13 10:57:03.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/NDesk.DBus/DBus.cs 1970-01-01 00:00:00.000000000 +0000 @@ -1,98 +0,0 @@ -// Copyright 2006 Alp Toker -// This software is made available under the MIT License -// See COPYING for details - -using System; -using System.Collections.Generic; -using NDesk.DBus; - -namespace org.freedesktop.DBus -{ - [Flags] - public enum NameFlag : uint - { - None = 0, - AllowReplacement = 0x1, - ReplaceExisting = 0x2, - DoNotQueue = 0x4, - } - - public enum RequestNameReply : uint - { - PrimaryOwner = 1, - InQueue, - Exists, - AlreadyOwner, - } - - public enum ReleaseNameReply : uint - { - Released = 1, - NonExistent, - NotOwner, - } - - public enum StartReply : uint - { - //The service was successfully started. - Success = 1, - //A connection already owns the given name. - AlreadyRunning, - } - - public delegate void NameOwnerChangedHandler (string name, string old_owner, string new_owner); - public delegate void NameAcquiredHandler (string name); - public delegate void NameLostHandler (string name); - - [Interface ("org.freedesktop.DBus.Peer")] - public interface Peer - { - void Ping (); - [return: Argument ("machine_uuid")] - string GetMachineId (); - } - - [Interface ("org.freedesktop.DBus.Introspectable")] - public interface Introspectable - { - [return: Argument ("data")] - string Introspect (); - } - - [Interface ("org.freedesktop.DBus.Properties")] - public interface Properties - { - [return: Argument ("value")] - object Get (string @interface, string propname); - void Set (string @interface, string propname, object value); - [return: Argument ("props")] - IDictionary GetAll (string @interface); - } - - [Interface ("org.freedesktop.DBus")] - public interface IBus - { - RequestNameReply RequestName (string name, NameFlag flags); - ReleaseNameReply ReleaseName (string name); - string Hello (); - string[] ListNames (); - string[] ListActivatableNames (); - bool NameHasOwner (string name); - event NameOwnerChangedHandler NameOwnerChanged; - event NameLostHandler NameLost; - event NameAcquiredHandler NameAcquired; - StartReply StartServiceByName (string name, uint flags); - void UpdateActivationEnvironment (IDictionary environment); - string GetNameOwner (string name); - uint GetConnectionUnixUser (string connection_name); - void AddMatch (string rule); - void RemoveMatch (string rule); - string GetId (); - - //undocumented in spec - string[] ListQueuedOwners (string name); - uint GetConnectionUnixProcessID (string connection_name); - byte[] GetConnectionSELinuxSecurityContext (string connection_name); - void ReloadConfig (); - } -} diff -Nru banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/NDesk.DBus/DProxy.cs banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/NDesk.DBus/DProxy.cs --- banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/NDesk.DBus/DProxy.cs 2010-08-13 10:57:03.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/NDesk.DBus/DProxy.cs 1970-01-01 00:00:00.000000000 +0000 @@ -1,79 +0,0 @@ -// Copyright 2006 Alp Toker -// This software is made available under the MIT License -// See COPYING for details - -using System; -using System.Reflection; -using System.Runtime.Remoting.Proxies; -using System.Runtime.Remoting.Messaging; - -namespace NDesk.DBus -{ - //marked internal because this is really an implementation detail and needs to be replaced - internal class DProxy : RealProxy - { - protected BusObject busObject; - - public DProxy (BusObject busObject, Type type) : base(type) - { - this.busObject = busObject; - } - - static MethodInfo mi_GetHashCode = typeof (object).GetMethod ("GetHashCode"); - static MethodInfo mi_Equals = typeof (object).GetMethod ("Equals", BindingFlags.Instance); - static MethodInfo mi_ToString = typeof (object).GetMethod ("ToString"); - static MethodInfo mi_GetLifetimeService = typeof (MarshalByRefObject).GetMethod ("GetLifetimeService"); - - object GetDefaultReturn (MethodBase mi, object[] inArgs) - { - if (mi == mi_GetHashCode) - return busObject.Path.Value.GetHashCode (); - if (mi == mi_Equals) - return busObject.Path.Value == ((BusObject)((MarshalByRefObject)inArgs[0]).GetLifetimeService ()).Path.Value; - if (mi == mi_ToString) - return busObject.Path.Value; - if (mi == mi_GetLifetimeService) - return busObject; - - return null; - } - - public override IMessage Invoke (IMessage message) - { - IMethodCallMessage callMessage = (IMethodCallMessage) message; - - object defaultRetVal = GetDefaultReturn (callMessage.MethodBase, callMessage.InArgs); - if (defaultRetVal != null) { - MethodReturnMessageWrapper defaultReturnMessage = new MethodReturnMessageWrapper ((IMethodReturnMessage) message); - defaultReturnMessage.ReturnValue = defaultRetVal; - - return defaultReturnMessage; - } - - object[] outArgs; - object retVal; - Exception exception; - busObject.Invoke (callMessage.MethodBase, callMessage.MethodName, callMessage.InArgs, out outArgs, out retVal, out exception); - - MethodReturnMessageWrapper returnMessage = new MethodReturnMessageWrapper ((IMethodReturnMessage) message); - returnMessage.Exception = exception; - returnMessage.ReturnValue = retVal; - - return returnMessage; - } - - /* - public override ObjRef CreateObjRef (Type ServerType) - { - throw new System.NotImplementedException (); - } - */ - - ~DProxy () - { - //FIXME: remove handlers/match rules here - if (Protocol.Verbose) - Console.Error.WriteLine ("Warning: Finalization of " + busObject.Path + " not yet supported"); - } - } -} diff -Nru banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/NDesk.DBus/ExportObject.cs banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/NDesk.DBus/ExportObject.cs --- banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/NDesk.DBus/ExportObject.cs 2010-08-13 20:05:55.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/NDesk.DBus/ExportObject.cs 1970-01-01 00:00:00.000000000 +0000 @@ -1,200 +0,0 @@ -// Copyright 2006 Alp Toker -// This software is made available under the MIT License -// See COPYING for details - -using System; -using System.Collections.Generic; -using System.Reflection; -using System.Reflection.Emit; - -using org.freedesktop.DBus; - -namespace NDesk.DBus -{ - //TODO: perhaps ExportObject should not derive from BusObject - internal class ExportObject : BusObject, IDisposable //, Peer - { - public object obj; - - public ExportObject (Connection conn, ObjectPath object_path, object obj) : base (conn, null, object_path) - { - this.obj = obj; - } - - //maybe add checks to make sure this is not called more than once - //it's a bit silly as a property - bool isRegistered = false; - public virtual bool Registered - { - get { - return isRegistered; - } - set { - if (value == isRegistered) - return; - - Type type = obj.GetType (); - - foreach (MemberInfo mi in Mapper.GetPublicMembers (type)) { - EventInfo ei = mi as EventInfo; - - if (ei == null) - continue; - - Delegate dlg = GetHookupDelegate (ei); - - if (value) - ei.AddEventHandler (obj, dlg); - else - ei.RemoveEventHandler (obj, dlg); - } - - isRegistered = value; - } - } - - internal virtual void WriteIntrospect (Introspector intro) - { - intro.WriteType (obj.GetType ()); - } - - internal static MethodCaller2 GetMCaller (MethodInfo mi) - { - MethodCaller2 mCaller; - if (!mCallers.TryGetValue (mi, out mCaller)) { - //mCaller = TypeImplementer.GenCaller (mi, obj); - mCaller = TypeImplementer.GenCaller2 (mi); - mCallers[mi] = mCaller; - } - return mCaller; - } - - public static ExportObject CreateExportObject (Connection conn, ObjectPath object_path, object obj) - { - Type type = obj.GetType (); - -#if DLR - if (type.Name == "RubyObject" || type.FullName == "IronPython.Runtime.Types.OldInstance") - return new DynamicExportObject (conn, object_path, obj); -#endif - - return new ExportObject (conn, object_path, obj); - } - - static internal readonly Dictionary mCallers = new Dictionary (); - public virtual void HandleMethodCall (MethodCall method_call) - { - Type type = obj.GetType (); - - //object retObj = type.InvokeMember (msg.Member, BindingFlags.InvokeMethod, null, obj, MessageHelper.GetDynamicValues (msg)); - - //TODO: there is no member name mapping for properties etc. yet - - // FIXME: Inefficient to do this on every call - MethodInfo mi = Mapper.GetMethod (type, method_call); - - if (mi == null) { - conn.MaybeSendUnknownMethodError (method_call); - return; - } - - MethodCaller2 mCaller; - if (!mCallers.TryGetValue (mi, out mCaller)) { - //mCaller = TypeImplementer.GenCaller (mi, obj); - mCaller = TypeImplementer.GenCaller2 (mi); - mCallers[mi] = mCaller; - } - - Signature inSig, outSig; - TypeImplementer.SigsForMethod (mi, out inSig, out outSig); - - Message msg = method_call.message; - MessageReader msgReader = new MessageReader (method_call.message); - MessageWriter retWriter = new MessageWriter (); - - /* - MessageWriter retWriter = null; - if (msg.ReplyExpected) - retWriter = new MessageWriter (); - */ - - Exception raisedException = null; - try { - //mCaller (msgReader, method_call.message, retWriter); - mCaller (obj, msgReader, method_call.message, retWriter); - } catch (Exception e) { - raisedException = e; - } - - if (!msg.ReplyExpected) - return; - - Message replyMsg; - - if (raisedException == null) { - MethodReturn method_return = new MethodReturn (msg.Header.Serial); - replyMsg = method_return.message; - replyMsg.Body = retWriter.ToArray (); - replyMsg.Signature = outSig; - } else { - Error error; - // BusException allows precisely formatted Error messages. - BusException busException = raisedException as BusException; - if (busException != null) - error = method_call.CreateError (busException.ErrorName, busException.ErrorMessage); - else if (raisedException is ArgumentException && raisedException.TargetSite.Name == mi.Name) { - // Name match trick above is a hack since we don't have the resolved MethodInfo. - ArgumentException argException = (ArgumentException)raisedException; - using (System.IO.StringReader sr = new System.IO.StringReader (argException.Message)) { - error = method_call.CreateError ("org.freedesktop.DBus.Error.InvalidArgs", sr.ReadLine ()); - } - } else - error = method_call.CreateError (Mapper.GetInterfaceName (raisedException.GetType ()), raisedException.Message); - - replyMsg = error.message; - } - - if (method_call.Sender != null) - replyMsg.Header[FieldCode.Destination] = method_call.Sender; - - conn.Send (replyMsg); - } - - /* - public void Ping () - { - } - - public string GetMachineId () - { - //TODO: implement this - return String.Empty; - } - */ - -#region IDisposable - public void Dispose () - { - Dispose (true); - GC.SuppressFinalize (this); - } - - ~ExportObject () - { - Dispose (false); - } - - protected virtual void Dispose (bool disposing) - { - if (disposing) - { - if (obj != null) - { - Registered = false; - obj = null; - } - } - } -#endregion - } -} diff -Nru banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/NDesk.DBus/GLib.cs banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/NDesk.DBus/GLib.cs --- banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/NDesk.DBus/GLib.cs 2010-08-13 10:57:03.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/NDesk.DBus/GLib.cs 1970-01-01 00:00:00.000000000 +0000 @@ -1,53 +0,0 @@ -// Copyright 2006 Alp Toker -// This software is made available under the MIT License -// See COPYING for details - -using System; -using NDesk.DBus; -using NDesk.GLib; -using org.freedesktop.DBus; - -namespace NDesk.DBus -{ - //FIXME: this API needs review and de-unixification. It is horrid, but gets the job done. - public static class BusG - { - static bool initialized = false; - public static void Init () - { - if (initialized) - return; - - Init (Bus.System); - Init (Bus.Session); - //TODO: consider starter bus? - - initialized = true; - } - - public static void Init (Connection conn) - { - IOFunc dispatchHandler = delegate (IntPtr source, IOCondition condition, IntPtr data) { - if ((condition & IOCondition.Hup) == IOCondition.Hup) { - if (Protocol.Verbose) - Console.Error.WriteLine ("Warning: Connection was probably hung up (" + condition + ")"); - - //TODO: handle disconnection properly, consider memory management - return false; - } - - //this may not provide expected behaviour all the time, but works for now - conn.Iterate (); - return true; - }; - - Init (conn, dispatchHandler); - } - - static void Init (Connection conn, IOFunc dispatchHandler) - { - IOChannel channel = new IOChannel ((int)conn.Transport.SocketHandle); - IO.AddWatch (channel, IOCondition.In | IOCondition.Hup, dispatchHandler); - } - } -} diff -Nru banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/NDesk.DBus/GLib.IO.cs banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/NDesk.DBus/GLib.IO.cs --- banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/NDesk.DBus/GLib.IO.cs 2010-08-13 10:57:03.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/NDesk.DBus/GLib.IO.cs 1970-01-01 00:00:00.000000000 +0000 @@ -1,222 +0,0 @@ -// Copyright 2006 Alp Toker -// This software is made available under the MIT License -// See COPYING for details - -using System; -using System.Collections; -using System.Runtime.InteropServices; - -namespace NDesk.GLib -{ - /* - Specifies the type of function which is called when a data element is destroyed. It is passed the pointer to the data element and should free any memory and resources allocated for it. - - @data: the data element. - */ - delegate void DestroyNotify (IntPtr data); - - /* - Specifies the type of function passed to g_io_add_watch() or g_io_add_watch_full(), which is called when the requested condition on a GIOChannel is satisfied. - - @source: the GIOChannel event source. - @condition: the condition which has been satisfied. - @data: user data set in g_io_add_watch() or g_io_add_watch_full(). - - Returns: the function should return FALSE if the event source should be removed. - */ - delegate bool IOFunc (IntPtr source, IOCondition condition, IntPtr data); - - struct IOChannel - { - const string GLIB = "libglib-2.0-0.dll"; - - public IntPtr Handle; - - [DllImport(GLIB)] - static extern IntPtr g_io_channel_unix_new (int fd); - - public IOChannel (int fd) - { - Handle = g_io_channel_unix_new (fd); - } - - [DllImport(GLIB)] - static extern int g_io_channel_unix_get_fd (IntPtr channel); - - public int UnixFd - { - get { - return g_io_channel_unix_get_fd (Handle); - } - } - - [DllImport(GLIB)] - public static extern IntPtr g_io_channel_win32_new_fd (int fd); - - [DllImport(GLIB)] - public static extern IntPtr g_io_channel_win32_new_socket (int socket); - - [DllImport(GLIB)] - public static extern IntPtr g_io_channel_win32_new_messages (uint hwnd); - - - [DllImport(GLIB)] - public static extern uint g_io_channel_get_buffer_size (IntPtr channel); - - [DllImport(GLIB)] - public static extern void g_io_channel_set_buffer_size (IntPtr channel, uint size); - - public uint BufferSize - { - get { - return g_io_channel_get_buffer_size (Handle); - } set { - g_io_channel_set_buffer_size (Handle, value); - } - } - - [DllImport(GLIB)] - public static extern IOCondition g_io_channel_get_buffer_condition (IntPtr channel); - - public IOCondition BufferCondition - { - get { - return g_io_channel_get_buffer_condition (Handle); - } - } - - [DllImport(GLIB)] - public static extern IOFlags g_io_channel_get_flags (IntPtr channel); - - [DllImport(GLIB)] - static extern short g_io_channel_set_flags (IntPtr channel, IOFlags flags, IntPtr error); - - public IOFlags Flags - { - get { - return g_io_channel_get_flags (Handle); - } set { - //TODO: fix return and error - g_io_channel_set_flags (Handle, value, IntPtr.Zero); - } - } - } - - class IO - { - const string GLIB = "libglib-2.0-0.dll"; - - //TODO: better memory management - public static ArrayList objs = new ArrayList (); - - /* - Adds the GIOChannel into the main event loop with the default priority. - - @channel: a GIOChannel. - @condition: the condition to watch for. - @func: the function to call when the condition is satisfied. - @user_data: user data to pass to func. - - Returns: the event source id. - */ - [DllImport(GLIB)] - protected static extern uint g_io_add_watch (IntPtr channel, IOCondition condition, IOFunc func, IntPtr user_data); - - public static uint AddWatch (IOChannel channel, IOCondition condition, IOFunc func) - { - objs.Add (func); - - return g_io_add_watch (channel.Handle, condition, func, IntPtr.Zero); - } - - /* - Adds the GIOChannel into the main event loop with the given priority. - - @channel: a GIOChannel. - @priority: the priority of the GIOChannel source. - @condition: the condition to watch for. - @func: the function to call when the condition is satisfied. - @user_data: user data to pass to func. - @notify: the function to call when the source is removed. - - Returns: the event source id. - */ - [DllImport(GLIB)] - protected static extern uint g_io_add_watch_full (IntPtr channel, int priority, IOCondition condition, IOFunc func, IntPtr user_data, DestroyNotify notify); - - public static uint AddWatch (IOChannel channel, int priority, IOCondition condition, IOFunc func, DestroyNotify notify) - { - objs.Add (func); - objs.Add (notify); - - return g_io_add_watch_full (channel.Handle, priority, condition, func, IntPtr.Zero, notify); - } - - [DllImport(GLIB)] - protected static extern IntPtr g_main_context_default (); - - public static IntPtr MainContextDefault () - { - return g_main_context_default (); - } - - [DllImport(GLIB)] - protected static extern void g_main_context_wakeup (IntPtr context); - - public static void MainContextWakeup (IntPtr context) - { - g_main_context_wakeup (context); - } - } - - //From Mono.Unix and poll(2) - [Flags] - enum PollEvents : short { - POLLIN = 0x0001, // There is data to read - POLLPRI = 0x0002, // There is urgent data to read - POLLOUT = 0x0004, // Writing now will not block - POLLERR = 0x0008, // Error condition - POLLHUP = 0x0010, // Hung up - POLLNVAL = 0x0020, // Invalid request; fd not open - // XPG4.2 definitions (via _XOPEN_SOURCE) - POLLRDNORM = 0x0040, // Normal data may be read - POLLRDBAND = 0x0080, // Priority data may be read - POLLWRNORM = 0x0100, // Writing now will not block - POLLWRBAND = 0x0200, // Priority data may be written - } - - //A bitwise combination representing a condition to watch for on an event source. - [Flags] - enum IOCondition : short - { - //There is data to read. - In = PollEvents.POLLIN, - //Data can be written (without blocking). - Out = PollEvents.POLLOUT, - //There is urgent data to read. - Pri = PollEvents.POLLPRI, - //Error condition. - Err = PollEvents.POLLERR, - //Hung up (the connection has been broken, usually for pipes and sockets). - Hup = PollEvents.POLLHUP, - //Invalid request. The file descriptor is not open. - Nval = PollEvents.POLLNVAL, - } - - [Flags] - enum IOFlags : short - { - Append = 1 << 0, - Nonblock = 1 << 1, - //Read only flag - IsReadable = 1 << 2, - //Read only flag - isWriteable = 1 << 3, - //Read only flag - IsSeekable = 1 << 4, - //? - Mask = (1 << 5) - 1, - GetMask = Mask, - SetMask = Append | Nonblock, - } -} diff -Nru banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/NDesk.DBus/Introspection.cs banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/NDesk.DBus/Introspection.cs --- banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/NDesk.DBus/Introspection.cs 2010-08-13 10:57:03.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/NDesk.DBus/Introspection.cs 1970-01-01 00:00:00.000000000 +0000 @@ -1,316 +0,0 @@ -// Copyright 2006 Alp Toker -// This software is made available under the MIT License -// See COPYING for details - -using System; -using System.Collections.Generic; -using System.IO; -using System.Xml; -using System.Text; -using System.Reflection; - -namespace NDesk.DBus -{ - //TODO: complete this class - class Introspector - { - const string NAMESPACE = "http://www.freedesktop.org/standards/dbus"; - const string PUBLIC_IDENTIFIER = "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"; - const string SYSTEM_IDENTIFIER = "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd"; - - public StringBuilder sb; - public string xml; - public ObjectPath root_path = ObjectPath.Root; - public bool ExtendedAnnotations = false; - - protected XmlWriter writer; - - public Introspector () - { - XmlWriterSettings settings = new XmlWriterSettings (); - settings.Indent = true; - settings.IndentChars = (" "); - settings.OmitXmlDeclaration = true; - - sb = new StringBuilder (); - - writer = XmlWriter.Create (sb, settings); - } - - static string GetProductDescription () - { - String version; - - Assembly assembly = Assembly.GetExecutingAssembly (); - AssemblyName aname = assembly.GetName (); - - AssemblyInformationalVersionAttribute iversion = Attribute.GetCustomAttribute (assembly, typeof (AssemblyInformationalVersionAttribute)) as AssemblyInformationalVersionAttribute; - - if (iversion != null) - version = iversion.InformationalVersion; - else - version = aname.Version.ToString (); - - return aname.Name + " " + version; - } - - public void WriteStart () - { - writer.WriteDocType ("node", PUBLIC_IDENTIFIER, SYSTEM_IDENTIFIER, null); - - writer.WriteComment (" " + GetProductDescription () + " "); - - //the root node element - writer.WriteStartElement ("node"); - } - - public void WriteNode (string name) - { - writer.WriteStartElement ("node"); - writer.WriteAttributeString ("name", name); - writer.WriteEndElement (); - } - - public void WriteEnd () - { - /* - WriteEnum (typeof (org.freedesktop.DBus.NameFlag)); - WriteEnum (typeof (org.freedesktop.DBus.NameReply)); - WriteEnum (typeof (org.freedesktop.DBus.ReleaseNameReply)); - WriteEnum (typeof (org.freedesktop.DBus.StartReply)); - WriteInterface (typeof (org.freedesktop.DBus.IBus)); - */ - - writer.WriteEndElement (); - - writer.Flush (); - xml = sb.ToString (); - } - - //public void WriteNode () - public void WriteType (Type target_type) - { - //writer.WriteStartElement ("node"); - - //TODO: non-well-known introspection has paths as well, which we don't do yet. read the spec again - //hackishly just remove the root '/' to make the path relative for now - //writer.WriteAttributeString ("name", target_path.Value.Substring (1)); - //writer.WriteAttributeString ("name", "test"); - - //reflect our own interface manually - WriteInterface (typeof (org.freedesktop.DBus.Introspectable)); - - //reflect the target interface - if (target_type != null) { - WriteInterface (target_type); - - foreach (Type ifType in target_type.GetInterfaces ()) - WriteInterface (ifType); - } - - //TODO: review recursion of interfaces and inheritance hierarchy - - //writer.WriteEndElement (); - } - - public void WriteArg (ParameterInfo pi) - { - WriteArg (pi.ParameterType, Mapper.GetArgumentName (pi), pi.IsOut, false); - } - - public void WriteArgReverse (ParameterInfo pi) - { - WriteArg (pi.ParameterType, Mapper.GetArgumentName (pi), pi.IsOut, true); - } - - //TODO: clean up and get rid of reverse (or argIsOut) parm - public void WriteArg (Type argType, string argName, bool argIsOut, bool reverse) - { - argType = argIsOut ? argType.GetElementType () : argType; - if (argType == typeof (void)) - return; - - writer.WriteStartElement ("arg"); - - if (!String.IsNullOrEmpty (argName)) - writer.WriteAttributeString ("name", argName); - - //we can't rely on the default direction (qt-dbus requires a direction at time of writing), so we use a boolean to reverse the parameter direction and make it explicit - - if (argIsOut) - writer.WriteAttributeString ("direction", !reverse ? "out" : "in"); - else - writer.WriteAttributeString ("direction", !reverse ? "in" : "out"); - - Signature sig = Signature.GetSig (argType); - - //TODO: avoid writing null (DType.Invalid) to the XML stream - writer.WriteAttributeString ("type", sig.Value); - - //annotations aren't valid in an arg element, so this is disabled - //if (argType.IsEnum) - // WriteAnnotation ("org.ndesk.DBus.Enum", Mapper.GetInterfaceName (argType)); - - writer.WriteEndElement (); - } - - public void WriteMethod (MethodInfo mi) - { - writer.WriteStartElement ("method"); - writer.WriteAttributeString ("name", mi.Name); - - foreach (ParameterInfo pi in mi.GetParameters ()) - WriteArg (pi); - - //Mono <= 1.1.13 doesn't support MethodInfo.ReturnParameter, so avoid it - //WriteArgReverse (mi.ReturnParameter); - WriteArg (mi.ReturnType, Mapper.GetArgumentName (mi.ReturnTypeCustomAttributes, "ret"), false, true); - - WriteAnnotations (mi); - - writer.WriteEndElement (); - } - - public void WriteProperty (PropertyInfo pri) - { - //expose properties as dbus properties - writer.WriteStartElement ("property"); - writer.WriteAttributeString ("name", pri.Name); - writer.WriteAttributeString ("type", Signature.GetSig (pri.PropertyType).Value); - string access = (pri.CanRead ? "read" : String.Empty) + (pri.CanWrite ? "write" : String.Empty); - writer.WriteAttributeString ("access", access); - WriteAnnotations (pri); - writer.WriteEndElement (); - - //expose properties as methods also - //it may not be worth doing this in the long run - /* - if (pri.CanRead) { - writer.WriteStartElement ("method"); - writer.WriteAttributeString ("name", "Get" + pri.Name); - WriteArgReverse (pri.GetGetMethod ().ReturnParameter); - writer.WriteEndElement (); - } - - if (pri.CanWrite) { - writer.WriteStartElement ("method"); - writer.WriteAttributeString ("name", "Set" + pri.Name); - foreach (ParameterInfo pi in pri.GetSetMethod ().GetParameters ()) - WriteArg (pi); - writer.WriteEndElement (); - } - */ - } - - public void WriteSignal (EventInfo ei) - { - writer.WriteStartElement ("signal"); - writer.WriteAttributeString ("name", ei.Name); - - foreach (ParameterInfo pi in ei.EventHandlerType.GetMethod ("Invoke").GetParameters ()) - WriteArgReverse (pi); - - if (ExtendedAnnotations) { - string handlerName = Mapper.GetInterfaceName (ei.EventHandlerType); - WriteAnnotation ("org.ndesk.DBus.SignalHandler", handlerName); - } - - WriteAnnotations (ei); - - //no need to consider the delegate return value as dbus doesn't support it - writer.WriteEndElement (); - } - - const BindingFlags relevantBindingFlags = BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly; - - public void WriteInterface (Type type) - { - if (type == null) - return; - - //TODO: this is unreliable, fix it - if (!Mapper.IsPublic (type)) - return; - - writer.WriteStartElement ("interface"); - - writer.WriteAttributeString ("name", Mapper.GetInterfaceName (type)); - - /* - foreach (MemberInfo mbi in type.GetMembers (relevantBindingFlags)) { - switch (mbi.MemberType) { - case MemberTypes.Method: - if (!((MethodInfo)mbi).IsSpecialName) - WriteMethod ((MethodInfo)mbi); - break; - case MemberTypes.Event: - WriteSignal ((EventInfo)mbi); - break; - case MemberTypes.Property: - WriteProperty ((PropertyInfo)mbi); - break; - default: - Console.Error.WriteLine ("Warning: Unhandled MemberType '{0}' encountered while introspecting {1}", mbi.MemberType, type.FullName); - break; - } - } - */ - - foreach (MethodInfo mi in type.GetMethods (relevantBindingFlags)) - if (!mi.IsSpecialName) - WriteMethod (mi); - - foreach (EventInfo ei in type.GetEvents (relevantBindingFlags)) - WriteSignal (ei); - - foreach (PropertyInfo pri in type.GetProperties (relevantBindingFlags)) - WriteProperty (pri); - - //TODO: indexers - - //TODO: attributes as annotations? - - writer.WriteEndElement (); - - //this recursion seems somewhat inelegant - WriteInterface (type.BaseType); - } - - public void WriteAnnotations (ICustomAttributeProvider attrProvider) - { - if (Mapper.IsDeprecated (attrProvider)) - WriteAnnotation ("org.freedesktop.DBus.Deprecated", "true"); - } - - public void WriteAnnotation (string name, string value) - { - writer.WriteStartElement ("annotation"); - - writer.WriteAttributeString ("name", name); - writer.WriteAttributeString ("value", value); - - writer.WriteEndElement (); - } - - //this is not in the spec, and is not finalized - public void WriteEnum (Type type) - { - writer.WriteStartElement ("enum"); - writer.WriteAttributeString ("name", Mapper.GetInterfaceName (type)); - writer.WriteAttributeString ("type", Signature.GetSig (type.GetElementType ()).Value); - writer.WriteAttributeString ("flags", (type.IsDefined (typeof (FlagsAttribute), false)) ? "true" : "false"); - - string[] names = Enum.GetNames (type); - - int i = 0; - foreach (Enum val in Enum.GetValues (type)) { - writer.WriteStartElement ("element"); - writer.WriteAttributeString ("name", names[i++]); - writer.WriteAttributeString ("value", val.ToString ("d")); - writer.WriteEndElement (); - } - - writer.WriteEndElement (); - } - } -} diff -Nru banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/NDesk.DBus/IntrospectionSchema.cs banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/NDesk.DBus/IntrospectionSchema.cs --- banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/NDesk.DBus/IntrospectionSchema.cs 2010-08-13 10:57:03.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/NDesk.DBus/IntrospectionSchema.cs 1970-01-01 00:00:00.000000000 +0000 @@ -1,118 +0,0 @@ -// Copyright 2006 Alp Toker -// This software is made available under the MIT License -// See COPYING for details - -using System; -using System.Xml.Serialization; -using System.Collections.Generic; - -namespace NDesk.DBus.Introspection -{ - [XmlRootAttribute(IsNullable=true)] - public class Member { - [XmlAttributeAttribute("name")] - public string Name; - } - - [XmlRootAttribute("node", IsNullable=true)] - public class Node { - - [XmlAttributeAttribute("name")] - public string Name; - - [XmlElementAttribute("interface", Type=typeof(@Interface))] - public Interface[] Interfaces; - [XmlElementAttribute("node", Type=typeof(Node))] - public Node[] Nodes; - } - - [XmlRootAttribute("interface", IsNullable=true)] - public class @Interface { - - [XmlAttributeAttribute("name")] - public string Name; - - /* - [XmlElementAttribute("method", Type=typeof(Method))] - [XmlElementAttribute("signal", Type=typeof(Signal))] - [XmlElementAttribute("property", Type=typeof(Property))] - //[XmlElementAttribute("annotation", Type=typeof(Annotation))] - //public Member[] Members; - */ - - [XmlElementAttribute("method", Type=typeof(Method))] - public Method[] Methods; - - [XmlElementAttribute("signal", Type=typeof(Signal))] - public Signal[] Signals; - - [XmlElementAttribute("property", Type=typeof(Property))] - public Property[] Properties; - } - - [XmlRootAttribute(IsNullable=true)] - public class Method : Member { - - /* - [XmlElementAttribute("arg", Type=typeof(Argument))] - [XmlElementAttribute("annotation", Type=typeof(Annotation))] - public object[] Items; - */ - - //[System.ComponentModel.DefaultValue(new Argument[0])] - [XmlElementAttribute("arg", Type=typeof(Argument))] - //public List Arguments; - public Argument[] Arguments; - } - - [XmlRootAttribute(IsNullable=true)] - public class Argument { - - [XmlAttributeAttribute("name")] - public string Name = String.Empty; - - [XmlAttributeAttribute("type")] - public string Type; - - [System.ComponentModel.DefaultValue(ArgDirection.@in)] - [XmlAttributeAttribute("direction")] - public ArgDirection Direction = ArgDirection.@in; - } - - public enum ArgDirection { - @in, - @out, - } - - [XmlRootAttribute(IsNullable=true)] - public class Annotation { - - [XmlAttributeAttribute("name")] - public string Name = String.Empty; - - [XmlAttributeAttribute("value")] - public string Value = String.Empty; - } - - [XmlRootAttribute("signal", IsNullable=true)] - public class Signal : Method { - } - - [XmlRootAttribute(IsNullable=true)] - public class Property : Member { - [XmlAttributeAttribute("type")] - public string Type = String.Empty; - - [XmlAttributeAttribute("access")] - public propertyAccess Access; - - [XmlElementAttribute("annotation")] - public Annotation[] Annotations; - } - - public enum propertyAccess { - read, - write, - readwrite, - } -} diff -Nru banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/NDesk.DBus/Mapper.cs banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/NDesk.DBus/Mapper.cs --- banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/NDesk.DBus/Mapper.cs 2010-08-13 10:57:03.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/NDesk.DBus/Mapper.cs 1970-01-01 00:00:00.000000000 +0000 @@ -1,387 +0,0 @@ -// Copyright 2006 Alp Toker -// This software is made available under the MIT License -// See COPYING for details - -using System; -using System.Collections.Generic; -using System.Reflection; - -namespace NDesk.DBus -{ - static class Mapper - { - //TODO: move these Get*Name helpers somewhere more appropriate - public static string GetArgumentName (ParameterInfo pi) - { - string argName = pi.Name; - - if (pi.IsRetval && String.IsNullOrEmpty (argName)) - argName = "ret"; - - return GetArgumentName ((ICustomAttributeProvider)pi, argName); - } - - public static string GetArgumentName (ICustomAttributeProvider attrProvider, string defaultName) - { - string argName = defaultName; - - //TODO: no need for foreach - foreach (ArgumentAttribute aa in attrProvider.GetCustomAttributes (typeof (ArgumentAttribute), true)) - argName = aa.Name; - - return argName; - } - - //TODO: these two methods are quite messy and need review - public static IEnumerable GetPublicMembers (Type type) - { - //note that Type.GetInterfaces() returns all interfaces with flattened hierarchy - foreach (Type ifType in type.GetInterfaces ()) - foreach (MemberInfo mi in GetDeclaredPublicMembers (ifType)) - yield return mi; - - if (IsPublic (type)) - foreach (MemberInfo mi in GetDeclaredPublicMembers (type)) - yield return mi; - } - - static IEnumerable GetDeclaredPublicMembers (Type type) - { - if (IsPublic (type)) - foreach (MemberInfo mi in type.GetMembers (BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly)) - yield return mi; - } - - //this method walks the interface tree in an undefined manner and returns the first match, or if no matches are found, null - //the logic needs review and cleanup - //TODO: unify member name mapping as is already done with interfaces and args - public static MethodInfo GetMethod (Type type, MethodCall method_call) - { - foreach (MemberInfo member in Mapper.GetPublicMembers (type)) { - //this could be made more efficient by using the given interface name earlier and avoiding walking through all public interfaces - if (method_call.Interface != null) - if (GetInterfaceName (member) != method_call.Interface) - continue; - - MethodInfo meth = null; - Type[] inTypes = null; - - if (member is PropertyInfo) { - PropertyInfo prop = member as PropertyInfo; - - MethodInfo getter = prop.GetGetMethod (false); - MethodInfo setter = prop.GetSetMethod (false); - - if (getter != null && "Get" + prop.Name == method_call.Member) { - meth = getter; - inTypes = Type.EmptyTypes; - } else if (setter != null && "Set" + prop.Name == method_call.Member) { - meth = setter; - inTypes = new Type[] {prop.PropertyType}; - } - } else { - meth = member as MethodInfo; - - if (meth == null) - continue; - - if (meth.Name != method_call.Member) - continue; - - inTypes = Mapper.GetTypes (ArgDirection.In, meth.GetParameters ()); - } - - if (meth == null || inTypes == null) - continue; - - Signature inSig = Signature.GetSig (inTypes); - - if (inSig != method_call.Signature) - continue; - - return meth; - } - - return null; - } - - public static bool IsPublic (MemberInfo mi) - { - return IsPublic (mi.DeclaringType); - } - - public static bool IsPublic (Type type) - { - //we need to have a proper look at what's really public at some point - //this will do for now - - if (type.IsDefined (typeof (InterfaceAttribute), false)) - return true; - - if (type.IsSubclassOf (typeof (MarshalByRefObject))) - return true; - - return false; - } - - public static string GetInterfaceName (MemberInfo mi) - { - return GetInterfaceName (mi.DeclaringType); - } - - public static string GetInterfaceName (Type type) - { - string interfaceName = type.FullName; - - //TODO: better fallbacks and namespace mangling when no InterfaceAttribute is available - - //TODO: no need for foreach - foreach (InterfaceAttribute ia in type.GetCustomAttributes (typeof (InterfaceAttribute), true)) - interfaceName = ia.Name; - - return interfaceName; - } - - public static Type[] GetTypes (ArgDirection dir, ParameterInfo[] parms) - { - List types = new List (); - - //TODO: consider InOut/Ref - - for (int i = 0 ; i != parms.Length ; i++) { - switch (dir) { - case ArgDirection.In: - //docs say IsIn isn't reliable, and this is indeed true - //if (parms[i].IsIn) - if (!parms[i].IsOut) - types.Add (parms[i].ParameterType); - break; - case ArgDirection.Out: - if (parms[i].IsOut) { - //TODO: note that IsOut is optional to the compiler, we may want to use IsByRef instead - //eg: if (parms[i].ParameterType.IsByRef) - types.Add (parms[i].ParameterType.GetElementType ()); - } - break; - } - } - - return types.ToArray (); - } - - public static bool IsDeprecated (ICustomAttributeProvider attrProvider) - { - return attrProvider.IsDefined (typeof (ObsoleteAttribute), true); - } - - static bool AreEqual (Type[] a, Type[] b) - { - if (a.Length != b.Length) - return false; - - for (int i = 0 ; i != a.Length ; i++) - if (a[i] != b[i]) - return false; - - return true; - } - - //workaround for Mono bug #81035 (memory leak) - static List genTypes = new List (); - internal static Type GetGenericType (Type defType, Type[] parms) - { - foreach (Type genType in genTypes) { - if (genType.GetGenericTypeDefinition () != defType) - continue; - - Type[] genParms = genType.GetGenericArguments (); - - if (!AreEqual (genParms, parms)) - continue; - - return genType; - } - - Type type = defType.MakeGenericType (parms); - genTypes.Add (type); - return type; - } - } - - //TODO: this class is messy, move the methods somewhere more appropriate - static class MessageHelper - { - public static Message CreateUnknownMethodError (MethodCall method_call) - { - if (!method_call.message.ReplyExpected) - return null; - - string errMsg = String.Format ("Method \"{0}\" with signature \"{1}\" on interface \"{2}\" doesn't exist", method_call.Member, method_call.Signature.Value, method_call.Interface); - - Error error = new Error ("org.freedesktop.DBus.Error.UnknownMethod", method_call.message.Header.Serial); - error.message.Signature = new Signature (DType.String); - - MessageWriter writer = new MessageWriter (Connection.NativeEndianness); - writer.Write (errMsg); - error.message.Body = writer.ToArray (); - - //TODO: we should be more strict here, but this fallback was added as a quick fix for p2p - if (method_call.Sender != null) - error.message.Header[FieldCode.Destination] = method_call.Sender; - - return error.message; - } - - public static void WriteDynamicValues (MessageWriter mw, ParameterInfo[] parms, object[] vals) - { - foreach (ParameterInfo parm in parms) { - if (!parm.IsOut) - continue; - - Type actualType = parm.ParameterType.GetElementType (); - mw.Write (actualType, vals[parm.Position]); - } - } - - public static object[] GetDynamicValues (Message msg, ParameterInfo[] parms) - { - //TODO: this validation check should provide better information, eg. message dump or a stack trace, or at least the interface/member - /* - if (Protocol.Verbose) { - Signature expected = Signature.GetSig (types); - Signature actual = msg.Signature; - if (actual != expected) - Console.Error.WriteLine ("Warning: The signature of the message does not match that of the handler: " + "Expected '" + expected + "', got '" + actual + "'"); - } - */ - - object[] vals = new object[parms.Length]; - - if (msg.Body != null) { - MessageReader reader = new MessageReader (msg); - foreach (ParameterInfo parm in parms) { - if (parm.IsOut) - continue; - - vals[parm.Position] = reader.ReadValue (parm.ParameterType); - } - } - - return vals; - } - - public static object[] GetDynamicValues (Message msg, Type[] types) - { - //TODO: this validation check should provide better information, eg. message dump or a stack trace, or at least the interface/member - if (Protocol.Verbose) { - Signature expected = Signature.GetSig (types); - Signature actual = msg.Signature; - if (actual != expected) - Console.Error.WriteLine ("Warning: The signature of the message does not match that of the handler: " + "Expected '" + expected + "', got '" + actual + "'"); - } - - object[] vals = new object[types.Length]; - - if (msg.Body != null) { - MessageReader reader = new MessageReader (msg); - - for (int i = 0 ; i != types.Length ; i++) - vals[i] = reader.ReadValue (types[i]); - } - - return vals; - } - - public static object[] GetDynamicValues (Message msg) - { - Type[] types = msg.Signature.ToTypes (); - return GetDynamicValues (msg, types); - } - - public static Message ConstructReply (MethodCall method_call, params object[] vals) - { - MethodReturn method_return = new MethodReturn (method_call.message.Header.Serial); - Message replyMsg = method_return.message; - - Signature inSig = Signature.GetSig (vals); - - if (vals != null && vals.Length != 0) { - MessageWriter writer = new MessageWriter (Connection.NativeEndianness); - - foreach (object arg in vals) - writer.Write (arg.GetType (), arg); - - replyMsg.Body = writer.ToArray (); - } - - //TODO: we should be more strict here, but this fallback was added as a quick fix for p2p - if (method_call.Sender != null) - replyMsg.Header[FieldCode.Destination] = method_call.Sender; - - replyMsg.Signature = inSig; - - //replyMsg.WriteHeader (); - - return replyMsg; - } - - public static Message ConstructDynamicReply (MethodCall method_call, MethodInfo mi, object retVal, object[] vals) - { - Type retType = mi.ReturnType; - - MethodReturn method_return = new MethodReturn (method_call.message.Header.Serial); - Message replyMsg = method_return.message; - - Signature outSig = Signature.GetSig (retType); - outSig += Signature.GetSig (Mapper.GetTypes (ArgDirection.Out, mi.GetParameters ())); - - if (outSig != Signature.Empty) { - MessageWriter writer = new MessageWriter (Connection.NativeEndianness); - - //first write the return value, if any - if (retType != null && retType != typeof (void)) - writer.Write (retType, retVal); - - //then write the out args - WriteDynamicValues (writer, mi.GetParameters (), vals); - - replyMsg.Body = writer.ToArray (); - } - - //TODO: we should be more strict here, but this fallback was added as a quick fix for p2p - if (method_call.Sender != null) - replyMsg.Header[FieldCode.Destination] = method_call.Sender; - - replyMsg.Signature = outSig; - - return replyMsg; - } - } - - [AttributeUsage (AttributeTargets.Interface | AttributeTargets.Class, AllowMultiple=false, Inherited=true)] - public class InterfaceAttribute : Attribute - { - public string Name; - - public InterfaceAttribute (string name) - { - this.Name = name; - } - } - - [AttributeUsage (AttributeTargets.Parameter | AttributeTargets.ReturnValue, AllowMultiple=false, Inherited=true)] - public class ArgumentAttribute : Attribute - { - public string Name; - - public ArgumentAttribute (string name) - { - this.Name = name; - } - - public static string GetSignatureString (Type type) - { - return Signature.GetSig (type).Value; - } - } -} diff -Nru banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/NDesk.DBus/MatchRule.cs banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/NDesk.DBus/MatchRule.cs --- banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/NDesk.DBus/MatchRule.cs 2010-08-13 10:57:03.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/NDesk.DBus/MatchRule.cs 1970-01-01 00:00:00.000000000 +0000 @@ -1,319 +0,0 @@ -// Copyright 2007 Alp Toker -// This software is made available under the MIT License -// See COPYING for details - -using System; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections.Generic; - -namespace NDesk.DBus -{ - class MatchRule - { - public MessageType? MessageType; - public readonly SortedList Fields = new SortedList (); - //public readonly SortedList Args = new SortedList (); - public readonly HashSet Args = new HashSet (); - - public MatchRule () - { - } - - static void Append (StringBuilder sb, string key, object value) - { - Append (sb, key, value.ToString ()); - } - - static void Append (StringBuilder sb, string key, string value) - { - if (sb.Length != 0) - sb.Append (','); - - sb.Append (key); - sb.Append ("='"); - sb.Append (value.Replace (@"\", @"\\").Replace (@"'", @"\'")); - sb.Append ('\''); - } - - static void AppendArg (StringBuilder sb, int index, string value) - { - Append (sb, "arg" + index, value); - } - - static void AppendPathArg (StringBuilder sb, int index, ObjectPath value) - { - Append (sb, "arg" + index + "path", value.ToString ()); - } - - public override bool Equals (object o) - { - MatchRule r = o as MatchRule; - if (o == null) - return false; - - return ToString () == r.ToString (); - } - - public override int GetHashCode () - { - //FIXME: not at all optimal - return ToString ().GetHashCode (); - } - - public override string ToString () - { - StringBuilder sb = new StringBuilder (); - - if (MessageType != null) - Append (sb, "type", MessageFilter.MessageTypeToString ((MessageType)MessageType)); - - // Note that fdo D-Bus daemon sorts in a different order. - // It shouldn't matter though as long as we're consistent. - foreach (KeyValuePair pair in Fields) { - Append (sb, pair.Key.ToString ().ToLower (), pair.Value.Value); - } - - // Sorting the list here is not ideal - List tests = new List (Args); - tests.Sort ( delegate (ArgMatchTest aa, ArgMatchTest bb) { return aa.ArgNum - bb.ArgNum; } ); - - if (Args != null) - foreach (ArgMatchTest test in tests) - if (test.Signature == Signature.StringSig) - AppendArg (sb, test.ArgNum, (string)test.Value); - else if (test.Signature == Signature.ObjectPathSig) - AppendPathArg (sb, test.ArgNum, (ObjectPath)test.Value); - - return sb.ToString (); - } - - public static void Test (HashSet a, Message msg) - { - List sigs = new List (); - sigs.AddRange (msg.Signature.GetParts ()); - - if (sigs.Count == 0) { - a.Clear (); - return; - } - - a.RemoveWhere ( delegate (ArgMatchTest t) { return t.ArgNum >= sigs.Count || t.Signature != sigs[t.ArgNum]; } ); - - // Sorting the list here is not ideal - List tests = new List (a); - tests.Sort ( delegate (ArgMatchTest aa, ArgMatchTest bb) { return aa.ArgNum - bb.ArgNum; } ); - - if (tests.Count == 0) { - a.Clear (); - return; - } - - MessageReader reader = new MessageReader (msg); - - int argNum = 0; - foreach (ArgMatchTest test in tests) { - if (argNum > test.ArgNum) { - // This test cannot pass because a previous test already did. - // So we already know it will fail without even trying. - // This logic will need to be changed to support wildcards. - a.Remove (test); - continue; - } - - while (argNum != test.ArgNum) { - Signature sig = sigs[argNum]; - if (!reader.StepOver (sig)) - throw new Exception (); - argNum++; - } - - // TODO: Avoid re-reading values - int savedPos = reader.pos; - if (!reader.ReadValue (test.Signature[0]).Equals (test.Value)) { - a.Remove (test); - reader.pos = savedPos; - continue; - } - - argNum++; - } - } - - public bool MatchesHeader (Message msg) - { - if (MessageType != null) - if (msg.Header.MessageType != MessageType) - return false; - - foreach (KeyValuePair pair in Fields) { - object value; - if (!msg.Header.Fields.TryGetValue ((byte)pair.Key, out value)) - return false; - if (!pair.Value.Value.Equals (value)) - return false; - } - - return true; - } - - static Regex argNRegex = new Regex (@"^arg(\d+)(path)?$"); - static Regex matchRuleRegex = new Regex (@"(\w+)\s*=\s*'((\\\\|\\'|[^'\\])*)'", RegexOptions.Compiled); - public static MatchRule Parse (string text) - { - if (text.Length > Protocol.MaxMatchRuleLength) - throw new Exception ("Match rule length exceeds maximum " + Protocol.MaxMatchRuleLength + " characters"); - - MatchRule r = new MatchRule (); - - // TODO: Stricter validation. Tighten up the regex. - // It currently succeeds and silently drops malformed test parts. - - for (Match m = matchRuleRegex.Match (text) ; m.Success ; m = m.NextMatch ()) { - string key = m.Groups[1].Value; - string value = m.Groups[2].Value; - // This unescaping may not be perfect.. - value = value.Replace (@"\\", @"\"); - value = value.Replace (@"\'", @"'"); - - if (key.StartsWith ("arg")) { - Match mArg = argNRegex.Match (key); - if (!mArg.Success) - return null; - int argNum = (int)UInt32.Parse (mArg.Groups[1].Value); - - if (argNum < 0 || argNum >= Protocol.MaxMatchRuleArgs) - throw new Exception ("arg match must be between 0 and " + (Protocol.MaxMatchRuleArgs - 1) + " inclusive"); - - //if (r.Args.ContainsKey (argNum)) - // return null; - - string argType = mArg.Groups[2].Value; - - if (argType == "path") - r.Args.Add (new ArgMatchTest (argNum, new ObjectPath (value))); - else - r.Args.Add (new ArgMatchTest (argNum, value)); - - continue; - } - - //TODO: more consistent error handling - switch (key) { - case "type": - if (r.MessageType != null) - return null; - r.MessageType = MessageFilter.StringToMessageType (value); - break; - case "interface": - r.Fields[FieldCode.Interface] = new MatchTest (value); - break; - case "member": - r.Fields[FieldCode.Member] = new MatchTest (value); - break; - case "path": - r.Fields[FieldCode.Path] = new MatchTest (new ObjectPath (value)); - break; - case "sender": - r.Fields[FieldCode.Sender] = new MatchTest (value); - break; - case "destination": - r.Fields[FieldCode.Destination] = new MatchTest (value); - break; - default: - if (Protocol.Verbose) - Console.Error.WriteLine ("Warning: Unrecognized match rule key: " + key); - break; - } - } - - return r; - } - } - - class HeaderTest : MatchTest - { - public FieldCode Field; - public HeaderTest (FieldCode field, object value) - { - Field = field; - Signature = Signature.GetSig (value.GetType ()); - Value = value; - } - } - - struct ArgMatchTest - { - public int ArgNum; - public Signature Signature; - public object Value; - - public ArgMatchTest (int argNum, string value) - { - ArgNum = argNum; - Signature = Signature.StringSig; - Value = value; - } - - public ArgMatchTest (int argNum, ObjectPath value) - { - ArgNum = argNum; - Signature = Signature.ObjectPathSig; - Value = value; - } - - public override int GetHashCode () - { - return Signature.GetHashCode () ^ Value.GetHashCode () ^ ArgNum; - } - } - - /* - class ArgMatchTest : MatchTest - { - public int ArgNum; - - public ArgMatchTest (int argNum, string value) : base (value) - { - ArgNum = argNum; - } - - public ArgMatchTest (int argNum, ObjectPath value) : base (value) - { - ArgNum = argNum; - } - - public override int GetHashCode () - { - return base.GetHashCode () ^ ArgNum; - } - } - */ - - class MatchTest - { - public Signature Signature; - public object Value; - - public override int GetHashCode () - { - return Signature.GetHashCode () ^ Value.GetHashCode (); - } - - protected MatchTest () - { - } - - public MatchTest (string value) - { - Signature = Signature.StringSig; - Value = value; - } - - public MatchTest (ObjectPath value) - { - Signature = Signature.ObjectPathSig; - Value = value; - } - } -} diff -Nru banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/NDesk.DBus/Message.cs banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/NDesk.DBus/Message.cs --- banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/NDesk.DBus/Message.cs 2010-08-13 10:57:03.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/NDesk.DBus/Message.cs 1970-01-01 00:00:00.000000000 +0000 @@ -1,492 +0,0 @@ -// Copyright 2006 Alp Toker -// This software is made available under the MIT License -// See COPYING for details - -using System; -using System.Collections.Generic; -using System.IO; - -namespace NDesk.DBus -{ - class Message - { - public Message () - { - Header.Endianness = Connection.NativeEndianness; - Header.MessageType = MessageType.MethodCall; - Header.Flags = HeaderFlag.NoReplyExpected; //TODO: is this the right place to do this? - Header.MajorVersion = Protocol.Version; - Header.Fields = new Dictionary (); - } - - public Header Header = new Header (); - - public Connection Connection; - - public Signature Signature - { - get { - object o = Header[FieldCode.Signature]; - if (o == null) - return Signature.Empty; - else - return (Signature)o; - } set { - if (value == Signature.Empty) - Header[FieldCode.Signature] = null; - else - Header[FieldCode.Signature] = value; - } - } - - public bool ReplyExpected - { - get { - return (Header.Flags & HeaderFlag.NoReplyExpected) == HeaderFlag.None; - } set { - if (value) - Header.Flags &= ~HeaderFlag.NoReplyExpected; //flag off - else - Header.Flags |= HeaderFlag.NoReplyExpected; //flag on - } - } - - //public HeaderField[] HeaderFields; - //public Dictionary; - - public byte[] Body; - - //TODO: make use of Locked - /* - protected bool locked = false; - public bool Locked - { - get { - return locked; - } - } - */ - - public void HandleHeader (Header headerIn) - { - Header = headerIn; - } - - static System.Reflection.MethodInfo hHandler = typeof (Message).GetMethod ("HandleHeader"); - public void SetHeaderData (byte[] data) - { - EndianFlag endianness = (EndianFlag)data[0]; - MessageReader reader = new MessageReader (endianness, data); - - MethodCaller2 mCaller = ExportObject.GetMCaller (hHandler); - mCaller (this, reader, null, new MessageWriter ()); - } - - //public HeaderField[] Fields; - - /* - public void SetHeaderData (byte[] data) - { - EndianFlag endianness = (EndianFlag)data[0]; - MessageReader reader = new MessageReader (endianness, data); - - Header = (Header)reader.ReadStruct (typeof (Header)); - } - */ - - //TypeWriter
headerWriter = TypeImplementer.GetTypeWriter
(); - public byte[] GetHeaderData () - { - if (Body != null) - Header.Length = (uint)Body.Length; - - MessageWriter writer = new MessageWriter (Header.Endianness); - - //writer.stream.Capacity = 512; - //headerWriter (writer, Header); - - writer.Write ((byte)Header.Endianness); - writer.Write ((byte)Header.MessageType); - writer.Write ((byte)Header.Flags); - writer.Write (Header.MajorVersion); - writer.Write (Header.Length); - writer.Write (Header.Serial); - writer.WriteHeaderFields (Header.Fields); - - writer.CloseWrite (); - - return writer.ToArray (); - } - - public void GetHeaderDataToStream (Stream stream) - { - if (Body != null) - Header.Length = (uint)Body.Length; - - MessageWriter writer = new MessageWriter (Header.Endianness); - - //headerWriter (writer, Header); - - writer.Write ((byte)Header.Endianness); - writer.Write ((byte)Header.MessageType); - writer.Write ((byte)Header.Flags); - writer.Write (Header.MajorVersion); - writer.Write (Header.Length); - writer.Write (Header.Serial); - writer.WriteHeaderFields (Header.Fields); - - writer.CloseWrite (); - - writer.ToStream (stream); - } - } - - // Allows conversion of complex variants via System.Convert - class DValue : IConvertible - { - // TODO: Note that we currently drop the originating Connection/Message details - // They may be useful later in conversion! - - internal EndianFlag endianness; - internal Signature signature; - internal byte[] data; - - public bool CanConvertTo (Type conversionType) - { - Signature typeSig = Signature.GetSig (conversionType); - return signature == typeSig; - } - - public TypeCode GetTypeCode () - { - return TypeCode.Object; - } - - public object ToType (Type conversionType) - { - return ToType (conversionType, null); - } - - public object ToType (Type conversionType, IFormatProvider provider) - { - Signature typeSig = Signature.GetSig (conversionType); - if (typeSig != signature) - throw new InvalidCastException (); - - MessageReader reader = new MessageReader (endianness, data); - return reader.ReadValue (conversionType); - } - - public override string ToString () - { - // Seems a reasonable way of providing the signature to the API layer - return signature.ToString (); - } - - // IConvertible implementation: - - /* - public TypeCode GetTypeCode () - { - throw new NotSupportedException (); - } - */ - - public bool ToBoolean (IFormatProvider provider) - { - throw new NotSupportedException (); - } - - public byte ToByte (IFormatProvider provider) - { - throw new NotSupportedException (); - } - - public char ToChar (IFormatProvider provider) - { - throw new NotSupportedException (); - } - - public DateTime ToDateTime (IFormatProvider provider) - { - throw new NotSupportedException (); - } - - public decimal ToDecimal (IFormatProvider provider) - { - throw new NotSupportedException (); - } - - public double ToDouble (IFormatProvider provider) - { - throw new NotSupportedException (); - } - - public short ToInt16 (IFormatProvider provider) - { - throw new NotSupportedException (); - } - - public int ToInt32 (IFormatProvider provider) - { - throw new NotSupportedException (); - } - - public long ToInt64 (IFormatProvider provider) - { - throw new NotSupportedException (); - } - - public sbyte ToSByte (IFormatProvider provider) - { - throw new NotSupportedException (); - } - - public float ToSingle (IFormatProvider provider) - { - throw new NotSupportedException (); - } - - public string ToString (IFormatProvider provider) - { - throw new NotSupportedException (); - } - - /* - public object ToType (Type conversionType, IFormatProvider provider) - { - throw new NotSupportedException (); - } - */ - - public ushort ToUInt16 (IFormatProvider provider) - { - throw new NotSupportedException (); - } - - public uint ToUInt32 (IFormatProvider provider) - { - throw new NotSupportedException (); - } - - public ulong ToUInt64 (IFormatProvider provider) - { - throw new NotSupportedException (); - } - } - - partial class MessageReader - { - // Note: This method doesn't support aggregate signatures - public bool StepOver (Signature sig) - { - if (sig == Signature.VariantSig) { - Signature valueSig = ReadSignature (); - return StepOver (valueSig); - } - - if (sig == Signature.StringSig) { - uint valueLength = ReadUInt32 (); - pos += (int)valueLength; - pos++; - return true; - } - - if (sig == Signature.SignatureSig) { - byte valueLength = ReadByte (); - pos += valueLength; - pos++; - return true; - } - - // No need to handle dicts specially. IsArray does the job - if (sig.IsArray) { - Signature elemSig = sig.GetElementSignature (); - uint ln = ReadUInt32 (); - pos = Protocol.Padded (pos, elemSig.Alignment); - pos += (int)ln; - return true; - } - - int endPos = pos; - if (sig.GetFixedSize (ref endPos)) { - pos = endPos; - return true; - } - - if (sig.IsDictEntry) { - pos = Protocol.Padded (pos, sig.Alignment); - Signature sigKey, sigValue; - sig.GetDictEntrySignatures (out sigKey, out sigValue); - if (!StepOver (sigKey)) - return false; - if (!StepOver (sigValue)) - return false; - return true; - } - - if (sig.IsStruct) { - pos = Protocol.Padded (pos, sig.Alignment); - foreach (Signature fieldSig in sig.GetFieldSignatures ()) - if (!StepOver (fieldSig)) - return false; - return true; - } - - throw new Exception ("Can't step over '" + sig + "'"); - //return false; - } - - public IEnumerable StepInto (Signature sig) - { - if (sig == Signature.VariantSig) { - Signature valueSig = ReadSignature (); - yield return valueSig; - yield break; - } - - // No need to handle dicts specially. IsArray does the job - if (sig.IsArray) { - Signature elemSig = sig.GetElementSignature (); - uint ln = ReadUInt32 (); - ReadPad (elemSig.Alignment); - int endPos = pos + (int)ln; - while (pos < endPos) - yield return elemSig; - yield break; - } - - if (sig.IsDictEntry) { - pos = Protocol.Padded (pos, sig.Alignment); - Signature sigKey, sigValue; - sig.GetDictEntrySignatures (out sigKey, out sigValue); - yield return sigKey; - yield return sigValue; - yield break; - } - - if (sig.IsStruct) { - pos = Protocol.Padded (pos, sig.Alignment); - foreach (Signature fieldSig in sig.GetFieldSignatures ()) - yield return fieldSig; - yield break; - } - - throw new Exception ("Can't step into '" + sig + "'"); - //yield break; - } - } - - class MessageDumper - { - public static byte[] ReadBlock (TextReader r) - { - //if (Body == null) - // return; - - MemoryStream ms = new MemoryStream (); - - while (true) { - string ln = r.ReadLine (); - if (ln == null) - break; - if (!ReadFromHex (ms, ln)) - break; - } - - if (ms.Length == 0) - return null; - - return ms.ToArray (); - } - - public static void WriteComment (string comment, TextWriter w) - { - w.WriteLine ("# " + comment); - } - - public static void WriteBlock (byte[] Body, TextWriter w) - { - //if (Body == null) - // return; - if (Body != null) - for (int i = 0 ; i != Body.Length ; i++) { - if (i == 0) {} - else if (i % 32 == 0) - w.WriteLine (); - else if (i % 4 == 0) - w.Write (' '); - - w.Write (Body[i].ToString ("x2", System.Globalization.CultureInfo.InvariantCulture)); - } - - w.Write ('.'); - w.WriteLine (); - w.Flush (); - } - - public static void WriteMessage (Message msg, TextWriter w) - { - w.WriteLine ("# Message"); - w.WriteLine ("# Header"); - MessageDumper.WriteBlock (msg.GetHeaderData (), w); - w.WriteLine ("# Body"); - MessageDumper.WriteBlock (msg.Body, w); - w.WriteLine (); - w.Flush (); - } - - public static Message ReadMessage (TextReader r) - { - byte[] header = MessageDumper.ReadBlock (r); - - if (header == null) - return null; - - byte[] body = MessageDumper.ReadBlock (r); - - Message msg = new Message (); - msg.SetHeaderData (header); - msg.Body = body; - - return msg; - } - - static byte FromHexChar (char c) - { - if ((c >= 'a') && (c <= 'f')) - return (byte) (c - 'a' + 10); - if ((c >= 'A') && (c <= 'F')) - return (byte) (c - 'A' + 10); - if ((c >= '0') && (c <= '9')) - return (byte) (c - '0'); - throw new ArgumentException ("Invalid hex char"); - } - - static bool ReadFromHex (Stream ms, string hex) - { - if (hex.StartsWith ("#")) - return true; - - int i = 0; - while (i < hex.Length) { - if (char.IsWhiteSpace (hex [i])) { - i++; - continue; - } - - if (hex [i] == '.') { - ms.Flush (); - return false; - } - - byte res = (byte) (FromHexChar (hex [i++]) << 4); - res += FromHexChar (hex [i++]); - ms.WriteByte (res); - } - - ms.Flush (); - return true; - } - } -} diff -Nru banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/NDesk.DBus/MessageFilter.cs banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/NDesk.DBus/MessageFilter.cs --- banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/NDesk.DBus/MessageFilter.cs 2010-08-13 10:57:03.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/NDesk.DBus/MessageFilter.cs 1970-01-01 00:00:00.000000000 +0000 @@ -1,58 +0,0 @@ -// Copyright 2006 Alp Toker -// This software is made available under the MIT License -// See COPYING for details - -using System; - -namespace NDesk.DBus -{ - class MessageFilter - { - //this should probably be made to use HeaderField or similar - //this class is not generalized yet - - public static string MessageTypeToString (MessageType mtype) - { - switch (mtype) - { - case MessageType.MethodCall: - return "method_call"; - case MessageType.MethodReturn: - return "method_return"; - case MessageType.Error: - return "error"; - case MessageType.Signal: - return "signal"; - case MessageType.Invalid: - return "invalid"; - default: - throw new Exception ("Bad MessageType: " + mtype); - } - } - - public static MessageType StringToMessageType (string text) - { - switch (text) - { - case "method_call": - return MessageType.MethodCall; - case "method_return": - return MessageType.MethodReturn; - case "error": - return MessageType.Error; - case "signal": - return MessageType.Signal; - case "invalid": - return MessageType.Invalid; - default: - throw new Exception ("Bad MessageType: " + text); - } - } - - //TODO: remove this -- left here for the benefit of the monitor tool for now - public static string CreateMatchRule (MessageType mtype) - { - return "type='" + MessageTypeToString (mtype) + "'"; - } - } -} diff -Nru banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/NDesk.DBus/MessageReader.cs banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/NDesk.DBus/MessageReader.cs --- banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/NDesk.DBus/MessageReader.cs 2010-08-13 10:57:03.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/NDesk.DBus/MessageReader.cs 1970-01-01 00:00:00.000000000 +0000 @@ -1,494 +0,0 @@ -// Copyright 2006 Alp Toker -// This software is made available under the MIT License -// See COPYING for details - -using System; -using System.Text; -using System.Collections.Generic; -using System.IO; -using System.Reflection; - -namespace NDesk.DBus -{ - partial class MessageReader - { - protected EndianFlag endianness; - //protected byte[] data; - public byte[] data; - //TODO: this should be uint or long to handle long messages - //internal int pos = 0; - public int pos = 0; - protected Message message; - - public MessageReader (EndianFlag endianness, byte[] data) - { - //if (data == null) - // throw new ArgumentNullException ("data"); - if (data == null) - data = new byte[0]; - - this.endianness = endianness; - this.IsNativeEndian = endianness == Connection.NativeEndianness; - this.data = data; - } - - public MessageReader (Message message) : this (message.Header.Endianness, message.Body) - { - if (message == null) - throw new ArgumentNullException ("message"); - - this.message = message; - } - - public readonly bool IsNativeEndian; - - public object ReadValue (Type type) - { - if (type == typeof (void)) - return null; - - if (type.IsArray) { - return ReadArray (type.GetElementType ()); - } else if (type == typeof (ObjectPath)) { - return ReadObjectPath (); - } else if (type == typeof (Signature)) { - return ReadSignature (); - } else if (type == typeof (object)) { - return ReadVariant (); - } else if (type == typeof (string)) { - return ReadString (); - } else if (type.IsGenericType && type.GetGenericTypeDefinition () == typeof (IDictionary<,>)) { - Type[] genArgs = type.GetGenericArguments (); - //Type dictType = typeof (Dictionary<,>).MakeGenericType (genArgs); - //workaround for Mono bug #81035 (memory leak) - Type dictType = Mapper.GetGenericType (typeof (Dictionary<,>), genArgs); - System.Collections.IDictionary idict = (System.Collections.IDictionary)Activator.CreateInstance(dictType, new object[0]); - GetValueToDict (genArgs[0], genArgs[1], idict); - return idict; - } else if (Mapper.IsPublic (type)) { - return GetObject (type); - } else if (!type.IsPrimitive && !type.IsEnum) { - return ReadStruct (type); - } else { - object val; - DType dtype = Signature.TypeToDType (type); - val = ReadValue (dtype); - - if (type.IsEnum) - val = Enum.ToObject (type, val); - - return val; - } - } - - //helper method, should not be used generally - public object ReadValue (DType dtype) - { - switch (dtype) - { - case DType.Byte: - return ReadByte (); - - case DType.Boolean: - return ReadBoolean (); - - case DType.Int16: - return ReadInt16 (); - - case DType.UInt16: - return ReadUInt16 (); - - case DType.Int32: - return ReadInt32 (); - - case DType.UInt32: - return ReadUInt32 (); - - case DType.Int64: - return ReadInt64 (); - - case DType.UInt64: - return ReadUInt64 (); - -#if !DISABLE_SINGLE - case DType.Single: - return ReadSingle (); -#endif - - case DType.Double: - return ReadDouble (); - - case DType.String: - return ReadString (); - - case DType.ObjectPath: - return ReadObjectPath (); - - case DType.Signature: - return ReadSignature (); - - case DType.Variant: - return ReadVariant (); - - default: - throw new Exception ("Unhandled D-Bus type: " + dtype); - } - } - - public object GetObject (Type type) - { - ObjectPath path = ReadObjectPath (); - - return message.Connection.GetObject (type, (string)message.Header[FieldCode.Sender], path); - } - - public byte ReadByte () - { - return data[pos++]; - } - - public bool ReadBoolean () - { - uint intval = ReadUInt32 (); - - switch (intval) { - case 0: - return false; - case 1: - return true; - default: - throw new Exception ("Read value " + intval + " at position " + pos + " while expecting boolean (0/1)"); - } - } - - unsafe protected void MarshalUShort (void* dstPtr) - { - ReadPad (2); - - if (data.Length < pos + 2) - throw new Exception ("Cannot read beyond end of data"); - - if (endianness == Connection.NativeEndianness) { - fixed (byte* p = &data[pos]) - *((ushort*)dstPtr) = *((ushort*)p); - } else { - byte* dst = (byte*)dstPtr; - dst[0] = data[pos + 1]; - dst[1] = data[pos + 0]; - } - - pos += 2; - } - - unsafe public short ReadInt16 () - { - short val; - - MarshalUShort (&val); - - return val; - } - - unsafe public ushort ReadUInt16 () - { - ushort val; - - MarshalUShort (&val); - - return val; - } - - unsafe protected void MarshalUInt (void* dstPtr) - { - ReadPad (4); - - if (data.Length < pos + 4) - throw new Exception ("Cannot read beyond end of data"); - - if (endianness == Connection.NativeEndianness) { - fixed (byte* p = &data[pos]) - *((uint*)dstPtr) = *((uint*)p); - } else { - byte* dst = (byte*)dstPtr; - dst[0] = data[pos + 3]; - dst[1] = data[pos + 2]; - dst[2] = data[pos + 1]; - dst[3] = data[pos + 0]; - } - - pos += 4; - } - - unsafe public int ReadInt32 () - { - int val; - - MarshalUInt (&val); - - return val; - } - - unsafe public uint ReadUInt32 () - { - uint val; - - MarshalUInt (&val); - - return val; - } - - unsafe protected void MarshalULong (void* dstPtr) - { - ReadPad (8); - - if (data.Length < pos + 8) - throw new Exception ("Cannot read beyond end of data"); - - if (endianness == Connection.NativeEndianness) { - fixed (byte* p = &data[pos]) - *((ulong*)dstPtr) = *((ulong*)p); - } else { - byte* dst = (byte*)dstPtr; - for (int i = 0; i < 8; ++i) - dst[i] = data[pos + (7 - i)]; - } - - pos += 8; - } - - unsafe public long ReadInt64 () - { - long val; - - MarshalULong (&val); - - return val; - } - - unsafe public ulong ReadUInt64 () - { - ulong val; - - MarshalULong (&val); - - return val; - } - -#if !DISABLE_SINGLE - unsafe public float ReadSingle () - { - float val; - - MarshalUInt (&val); - - return val; - } -#endif - - unsafe public double ReadDouble () - { - double val; - - MarshalULong (&val); - - return val; - } - - public string ReadString () - { - uint ln = ReadUInt32 (); - - string val = Encoding.UTF8.GetString (data, pos, (int)ln); - pos += (int)ln; - ReadNull (); - - return val; - } - - public ObjectPath ReadObjectPath () - { - //exactly the same as string - return new ObjectPath (ReadString ()); - } - - public Signature ReadSignature () - { - byte ln = ReadByte (); - - // Avoid an array allocation for small signatures - if (ln == 1) { - DType dtype = (DType)ReadByte (); - ReadNull (); - return new Signature (dtype); - } - - if (ln > Protocol.MaxSignatureLength) - throw new Exception ("Signature length " + ln + " exceeds maximum allowed " + Protocol.MaxSignatureLength + " bytes"); - - byte[] sigData = new byte[ln]; - Array.Copy (data, pos, sigData, 0, (int)ln); - pos += (int)ln; - ReadNull (); - - return Signature.Take (sigData); - } - - public object ReadVariant () - { - return ReadValue (ReadSignature ()); - } - - // Used primarily for reading variant values - object ReadValue (Signature sig) - { - if (sig.IsPrimitive) - return ReadValue (sig[0]); - - Type t = null; - try { - t = sig.ToType (); - } catch (NotSupportedException e) { - // We don't catch other exceptions as they indicate a malformed signature - if (Protocol.Verbose) - Console.Error.WriteLine (e.Message); - } - - /* - if (t == null) { - StepOver (sig); - return null; - } - */ - - if (t == null) { - ReadPad (sig.Alignment); - int startPos = pos; - StepOver (sig); - int ln = pos - startPos; - - DValue dv = new DValue(); - dv.endianness = endianness; - dv.signature = sig; - dv.data = new byte[ln]; - Array.Copy (data, startPos, dv.data, 0, ln); - return dv; - } - - return ReadValue (t); - } - - //not pretty or efficient but works - public void GetValueToDict (Type keyType, Type valType, System.Collections.IDictionary val) - { - uint ln = ReadUInt32 (); - - if (ln > Protocol.MaxArrayLength) - throw new Exception ("Dict length " + ln + " exceeds maximum allowed " + Protocol.MaxArrayLength + " bytes"); - - //advance to the alignment of the element - //ReadPad (Protocol.GetAlignment (Signature.TypeToDType (type))); - ReadPad (8); - - int endPos = pos + (int)ln; - - //while (stream.Position != endPos) - while (pos < endPos) - { - ReadPad (8); - - val.Add (ReadValue (keyType), ReadValue (valType)); - } - - if (pos != endPos) - throw new Exception ("Read pos " + pos + " != ep " + endPos); - } - - //this could be made generic to avoid boxing - public Array ReadArray (Type elemType) - { - uint ln = ReadUInt32 (); - - if (ln > Protocol.MaxArrayLength) - throw new Exception ("Array length " + ln + " exceeds maximum allowed " + Protocol.MaxArrayLength + " bytes"); - - //TODO: more fast paths for primitive arrays - if (elemType == typeof (byte)) { - byte[] valb = new byte[ln]; - Array.Copy (data, pos, valb, 0, (int)ln); - pos += (int)ln; - return valb; - } - - //advance to the alignment of the element - ReadPad (Protocol.GetAlignment (Signature.TypeToDType (elemType))); - - int endPos = pos + (int)ln; - - //List vals = new List (); - System.Collections.ArrayList vals = new System.Collections.ArrayList (); - - //while (stream.Position != endPos) - while (pos < endPos) - vals.Add (ReadValue (elemType)); - - if (pos != endPos) - throw new Exception ("Read pos " + pos + " != ep " + endPos); - - return vals.ToArray (elemType); - } - - //struct - //probably the wrong place for this - //there might be more elegant solutions - public object ReadStruct (Type type) - { - ReadPad (8); - - object val = Activator.CreateInstance (type); - - /* - if (type.IsGenericType && type.GetGenericTypeDefinition () == typeof (KeyValuePair<,>)) { - object elem; - - System.Reflection.PropertyInfo key_prop = type.GetProperty ("Key"); - GetValue (key_prop.PropertyType, out elem); - key_prop.SetValue (val, elem, null); - - System.Reflection.PropertyInfo val_prop = type.GetProperty ("Value"); - GetValue (val_prop.PropertyType, out elem); - val_prop.SetValue (val, elem, null); - - return; - } - */ - - FieldInfo[] fis = type.GetFields (BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance); - - foreach (System.Reflection.FieldInfo fi in fis) - fi.SetValue (val, ReadValue (fi.FieldType)); - - return val; - } - - public void ReadNull () - { - if (data[pos] != 0) - throw new Exception ("Read non-zero byte at position " + pos + " while expecting null terminator"); - pos++; - } - - /* - public void ReadPad (int alignment) - { - pos = Protocol.Padded (pos, alignment); - } - */ - - public void ReadPad (int alignment) - { - for (int endPos = Protocol.Padded (pos, alignment) ; pos != endPos ; pos++) - if (data[pos] != 0) - throw new Exception ("Read non-zero byte at position " + pos + " while expecting padding"); - } - } -} diff -Nru banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/NDesk.DBus/MessageWriter.cs banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/NDesk.DBus/MessageWriter.cs --- banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/NDesk.DBus/MessageWriter.cs 2010-08-13 10:57:03.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/NDesk.DBus/MessageWriter.cs 1970-01-01 00:00:00.000000000 +0000 @@ -1,570 +0,0 @@ -// Copyright 2006 Alp Toker -// This software is made available under the MIT License -// See COPYING for details - -using System; -using System.Text; -using System.Collections.Generic; -using System.IO; -using System.Reflection; -using System.Runtime.InteropServices; - -namespace NDesk.DBus -{ - sealed class MessageWriter - { - EndianFlag endianness; - internal MemoryStream stream; - - public Connection connection; - - //a default constructor is a bad idea for now as we want to make sure the header and content-type match - public MessageWriter () : this (Connection.NativeEndianness) {} - - public MessageWriter (EndianFlag endianness) - { - this.endianness = endianness; - stream = new MemoryStream (); - } - - public byte[] ToArray () - { - //TODO: mark the writer locked or something here - return stream.ToArray (); - } - - public void ToStream (Stream dest) - { - stream.WriteTo (dest); - } - - public void CloseWrite () - { - WritePad (8); - } - - public void Write (byte val) - { - stream.WriteByte (val); - } - - public void Write (bool val) - { - Write ((uint) (val ? 1 : 0)); - } - - // Buffer for integer marshaling - byte[] dst = new byte[8]; - unsafe void MarshalUShort (void* dataPtr) - { - WritePad (2); - - if (endianness == Connection.NativeEndianness) { - fixed (byte* p = &dst[0]) - *((ushort*)p) = *((ushort*)dataPtr); - } else { - byte* data = (byte*)dataPtr; - dst[0] = data[1]; - dst[1] = data[0]; - } - - stream.Write (dst, 0, 2); - } - - unsafe public void Write (short val) - { - MarshalUShort (&val); - } - - unsafe public void Write (ushort val) - { - MarshalUShort (&val); - } - - unsafe void MarshalUInt (void* dataPtr) - { - WritePad (4); - - if (endianness == Connection.NativeEndianness) { - fixed (byte* p = &dst[0]) - *((uint*)p) = *((uint*)dataPtr); - } else { - byte* data = (byte*)dataPtr; - dst[0] = data[3]; - dst[1] = data[2]; - dst[2] = data[1]; - dst[3] = data[0]; - } - - stream.Write (dst, 0, 4); - } - - unsafe public void Write (int val) - { - MarshalUInt (&val); - } - - unsafe public void Write (uint val) - { - MarshalUInt (&val); - } - - unsafe void MarshalULong (void* dataPtr) - { - WritePad (8); - - if (endianness == Connection.NativeEndianness) { - fixed (byte* p = &dst[0]) - *((ulong*)p) = *((ulong*)dataPtr); - } else { - byte* data = (byte*)dataPtr; - for (int i = 0; i < 8; ++i) - dst[i] = data[7 - i]; - } - - stream.Write (dst, 0, 8); - } - - unsafe public void Write (long val) - { - MarshalULong (&val); - } - - unsafe public void Write (ulong val) - { - MarshalULong (&val); - } - -#if !DISABLE_SINGLE - unsafe public void Write (float val) - { - MarshalUInt (&val); - } -#endif - - unsafe public void Write (double val) - { - MarshalULong (&val); - } - - public void Write (string val) - { - byte[] utf8_data = Encoding.UTF8.GetBytes (val); - Write ((uint)utf8_data.Length); - stream.Write (utf8_data, 0, utf8_data.Length); - WriteNull (); - } - - public void Write (ObjectPath val) - { - Write (val.Value); - } - - public void Write (Signature val) - { - byte[] ascii_data = val.GetBuffer (); - - if (ascii_data.Length > Protocol.MaxSignatureLength) - throw new Exception ("Signature length " + ascii_data.Length + " exceeds maximum allowed " + Protocol.MaxSignatureLength + " bytes"); - - Write ((byte)ascii_data.Length); - stream.Write (ascii_data, 0, ascii_data.Length); - WriteNull (); - } - - [Obsolete] - public void WriteComplex (object val, Type type) - { - if (type == typeof (void)) - return; - - if (type.IsArray) { - MethodInfo miDict = typeof (MessageWriter).GetMethod ("WriteArray"); - MethodInfo mi = miDict.MakeGenericMethod (type.GetElementType ()); - mi.Invoke (this, new object[] {val}); - } else if (type.IsGenericType && (type.GetGenericTypeDefinition () == typeof (IDictionary<,>) || type.GetGenericTypeDefinition () == typeof (Dictionary<,>))) { - Type[] genArgs = type.GetGenericArguments (); - MethodInfo miDict = typeof (MessageWriter).GetMethod ("WriteFromDict"); - MethodInfo mi = miDict.MakeGenericMethod (genArgs); - mi.Invoke (this, new object[] {val}); - } else if (Mapper.IsPublic (type)) { - WriteObject (type, val); - } else if (!type.IsPrimitive && !type.IsEnum) { - WriteValueType (val, type); - /* - } else if (type.IsGenericType && type.GetGenericTypeDefinition () == typeof (Nullable<>)) { - //is it possible to support nullable types? - Type[] genArgs = type.GetGenericArguments (); - WriteVariant (genArgs[0], val); - */ - } else { - throw new Exception ("Can't write"); - } - } - - [Obsolete] - public void Write (Type type, object val) - { - if (type == typeof (void)) - return; - - if (type.IsArray) { - MethodInfo miDict = typeof (MessageWriter).GetMethod ("WriteArray"); - MethodInfo mi = miDict.MakeGenericMethod (type.GetElementType ()); - mi.Invoke (this, new object[] {val}); - } else if (type == typeof (ObjectPath)) { - Write ((ObjectPath)val); - } else if (type == typeof (Signature)) { - Write ((Signature)val); - } else if (type == typeof (object)) { - Write (val); - } else if (type == typeof (string)) { - Write ((string)val); - } else if (type.IsGenericType && (type.GetGenericTypeDefinition () == typeof (IDictionary<,>) || type.GetGenericTypeDefinition () == typeof (Dictionary<,>))) { - Type[] genArgs = type.GetGenericArguments (); - MethodInfo miDict = typeof (MessageWriter).GetMethod ("WriteFromDict"); - MethodInfo mi = miDict.MakeGenericMethod (genArgs); - mi.Invoke (this, new object[] {val}); - } else if (Mapper.IsPublic (type)) { - WriteObject (type, val); - } else if (!type.IsPrimitive && !type.IsEnum) { - WriteValueType (val, type); - } else { - Write (Signature.TypeToDType (type), val); - } - } - - //helper method, should not be used as it boxes needlessly - public void Write (DType dtype, object val) - { - switch (dtype) - { - case DType.Byte: - { - Write ((byte)val); - } - break; - case DType.Boolean: - { - Write ((bool)val); - } - break; - case DType.Int16: - { - Write ((short)val); - } - break; - case DType.UInt16: - { - Write ((ushort)val); - } - break; - case DType.Int32: - { - Write ((int)val); - } - break; - case DType.UInt32: - { - Write ((uint)val); - } - break; - case DType.Int64: - { - Write ((long)val); - } - break; - case DType.UInt64: - { - Write ((ulong)val); - } - break; -#if !DISABLE_SINGLE - case DType.Single: - { - Write ((float)val); - } - break; -#endif - case DType.Double: - { - Write ((double)val); - } - break; - case DType.String: - { - Write ((string)val); - } - break; - case DType.ObjectPath: - { - Write ((ObjectPath)val); - } - break; - case DType.Signature: - { - Write ((Signature)val); - } - break; - case DType.Variant: - { - Write ((object)val); - } - break; - default: - throw new Exception ("Unhandled D-Bus type: " + dtype); - } - } - - public void WriteObject (Type type, object val) - { - ObjectPath path; - - BusObject bobj = val as BusObject; - - if (bobj == null && val is MarshalByRefObject) { - bobj = ((MarshalByRefObject)val).GetLifetimeService () as BusObject; - } - - if (bobj == null) - throw new Exception ("No object reference to write"); - - path = bobj.Path; - - Write (path); - } - - //variant - public void Write (object val) - { - if (val == null) - throw new NotSupportedException ("Cannot send null variant"); - - if (val is DValue) { - DValue dv = (DValue)val; - - if (dv.endianness != endianness) - throw new NotImplementedException ("Writing opposite endian DValues not yet implemented."); - - Write (dv.signature); - WritePad (dv.signature.Alignment); - stream.Write (dv.data, 0, dv.data.Length); - return; - } - - Type type = val.GetType (); - - WriteVariant (type, val); - } - - public void WriteVariant (Type type, object val) - { - Signature sig = Signature.GetSig (type); - - Write (sig); - Write (type, val); - } - - //this requires a seekable stream for now - public unsafe void WriteArray (T[] val) - { - Type elemType = typeof (T); - - if (elemType == typeof (byte)) { - if (val.Length > Protocol.MaxArrayLength) - throw new Exception ("Array length " + val.Length + " exceeds maximum allowed " + Protocol.MaxArrayLength + " bytes"); - - Write ((uint)val.Length); - stream.Write ((byte[])(object)val, 0, val.Length); - return; - } - - if (elemType.IsEnum) - elemType = Enum.GetUnderlyingType (elemType); - - Signature sigElem = Signature.GetSig (elemType); - int fixedSize = 0; - if (endianness == Connection.NativeEndianness && elemType.IsValueType && !sigElem.IsStruct && sigElem.GetFixedSize (ref fixedSize)) { - int byteLength = fixedSize * val.Length; - if (byteLength > Protocol.MaxArrayLength) - throw new Exception ("Array length " + byteLength + " exceeds maximum allowed " + Protocol.MaxArrayLength + " bytes"); - Write ((uint)byteLength); - WritePad (sigElem.Alignment); - - GCHandle valHandle = GCHandle.Alloc (val, GCHandleType.Pinned); - IntPtr p = valHandle.AddrOfPinnedObject (); - byte[] data = new byte[byteLength]; - byte* bp = (byte*)p; - for (int i = 0 ; i != byteLength ; i++) - data[i] = bp[i]; - stream.Write (data, 0, data.Length); - valHandle.Free (); - return; - } - - long origPos = stream.Position; - Write ((uint)0); - - //advance to the alignment of the element - WritePad (sigElem.Alignment); - - long startPos = stream.Position; - - TypeWriter tWriter = TypeImplementer.GetTypeWriter (); - - foreach (T elem in val) - tWriter (this, elem); - - long endPos = stream.Position; - uint ln = (uint)(endPos - startPos); - stream.Position = origPos; - - if (ln > Protocol.MaxArrayLength) - throw new Exception ("Array length " + ln + " exceeds maximum allowed " + Protocol.MaxArrayLength + " bytes"); - - Write (ln); - stream.Position = endPos; - } - - public void WriteValueType (object val, Type type) - { - MethodInfo mi = TypeImplementer.GetWriteMethod (type); - mi.Invoke (null, new object[] {this, val}); - } - - public void WriteStructure (T value) - { - TypeWriter tWriter = TypeImplementer.GetTypeWriter (); - tWriter (this, value); - } - - public void WriteFromDict (IDictionary val) - { - long origPos = stream.Position; - Write ((uint)0); - - WritePad (8); - - long startPos = stream.Position; - - TypeWriter keyWriter = TypeImplementer.GetTypeWriter (); - TypeWriter valueWriter = TypeImplementer.GetTypeWriter (); - - foreach (KeyValuePair entry in val) - { - WritePad (8); - keyWriter (this, entry.Key); - valueWriter (this, entry.Value); - } - - long endPos = stream.Position; - uint ln = (uint)(endPos - startPos); - stream.Position = origPos; - - if (ln > Protocol.MaxArrayLength) - throw new Exception ("Dict length " + ln + " exceeds maximum allowed " + Protocol.MaxArrayLength + " bytes"); - - Write (ln); - stream.Position = endPos; - } - - /* - public void Write (IDictionary val) - { - WriteHeaderDict(val); - } - - public void Write (Dictionary val) - { - WriteHeaderDict (val); - } - */ - - /* - public void Write (Dictionary val) - { - long origPos = stream.Position; - Write ((uint)0); - - WritePad (8); - - long startPos = stream.Position; - - foreach (KeyValuePair entry in val) { - WritePad (8); - Write (entry.Key); - Write (entry.Value); - } - - long endPos = stream.Position; - uint ln = (uint)(endPos - startPos); - stream.Position = origPos; - - if (ln > Protocol.MaxArrayLength) - throw new Exception ("Dict length " + ln + " exceeds maximum allowed " + Protocol.MaxArrayLength + " bytes"); - - Write (ln); - stream.Position = endPos; - } - */ - - internal void WriteHeaderFields (Dictionary val) - { - long origPos = stream.Position; - Write ((uint)0); - - WritePad (8); - - long startPos = stream.Position; - - foreach (KeyValuePair entry in val) { - WritePad (8); - Write (entry.Key); - switch ((FieldCode)entry.Key) { - case FieldCode.Destination: - case FieldCode.ErrorName: - case FieldCode.Interface: - case FieldCode.Member: - case FieldCode.Sender: - Write (Signature.StringSig); - Write ((string)entry.Value); - break; - case FieldCode.Path: - Write (Signature.ObjectPathSig); - Write ((ObjectPath)entry.Value); - break; - case FieldCode.ReplySerial: - Write (Signature.UInt32Sig); - Write ((uint)entry.Value); - break; - default: - Write (entry.Value); - break; - } - } - - long endPos = stream.Position; - uint ln = (uint)(endPos - startPos); - stream.Position = origPos; - - if (ln > Protocol.MaxArrayLength) - throw new Exception ("Dict length " + ln + " exceeds maximum allowed " + Protocol.MaxArrayLength + " bytes"); - - Write (ln); - stream.Position = endPos; - } - - public void WriteNull () - { - stream.WriteByte (0); - } - - // Source buffer for zero-padding - static readonly byte[] nullBytes = new byte[8]; - public void WritePad (int alignment) - { - int needed = Protocol.PadNeeded ((int)stream.Position, alignment); - stream.Write (nullBytes, 0, needed); - } - } -} diff -Nru banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/NDesk.DBus/PendingCall.cs banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/NDesk.DBus/PendingCall.cs --- banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/NDesk.DBus/PendingCall.cs 2010-08-13 10:57:03.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/NDesk.DBus/PendingCall.cs 1970-01-01 00:00:00.000000000 +0000 @@ -1,111 +0,0 @@ -// Copyright 2007 Alp Toker -// This software is made available under the MIT License -// See COPYING for details - -using System; -using System.Threading; - -namespace NDesk.DBus -{ - class PendingCall : IAsyncResult - { - Connection conn; - Message reply = null; - //AutoResetEvent waitHandle = new AutoResetEvent (false); - ManualResetEvent waitHandle; - - public PendingCall (Connection conn) - { - this.conn = conn; - } - - public Message Reply - { - get { - if (reply != null) - return reply; - - if (Thread.CurrentThread == conn.mainThread) { - /* - while (reply == null) - conn.Iterate (); - */ - - while (reply == null) - conn.HandleMessage (conn.Transport.ReadMessage ()); - - completedSync = true; - - conn.DispatchSignals (); - } else { - if (waitHandle == null) - waitHandle = new ManualResetEvent (false); - - // TODO: Possible race condition? - while (reply == null) - waitHandle.WaitOne (); - - completedSync = false; - } - - return reply; - } set { - if (reply != null) - throw new Exception ("Cannot handle reply more than once"); - - reply = value; - - if (waitHandle != null) - waitHandle.Set (); - - if (Completed != null) - Completed (reply); - } - } - - public event Action Completed; - bool completedSync; - - public void Cancel () - { - throw new NotImplementedException (); - } - - - - #region IAsyncResult Members - - object IAsyncResult.AsyncState - { - get { - return conn; - } - } - - WaitHandle IAsyncResult.AsyncWaitHandle - { - get { - if (waitHandle == null) - waitHandle = new ManualResetEvent (false); - - return waitHandle; - } - } - - bool IAsyncResult.CompletedSynchronously - { - get { - return reply != null && completedSync; - } - } - - bool IAsyncResult.IsCompleted - { - get { - return reply != null; - } - } - - #endregion - } -} diff -Nru banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/NDesk.DBus/Protocol.cs banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/NDesk.DBus/Protocol.cs --- banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/NDesk.DBus/Protocol.cs 2010-08-13 10:57:03.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/NDesk.DBus/Protocol.cs 1970-01-01 00:00:00.000000000 +0000 @@ -1,497 +0,0 @@ -// Copyright 2006 Alp Toker -// This software is made available under the MIT License -// See COPYING for details - -using System; -using System.Collections.Generic; - -namespace NDesk.DBus -{ - //yyyyuua{yv} - //struct Header - class Header - { - public EndianFlag Endianness; - public MessageType MessageType; - public HeaderFlag Flags; - public byte MajorVersion; - public uint Length; - public uint Serial; - //public HeaderField[] Fields; - - // Dictionary keyed by Enum has performance issues on .NET - // So we key by byte and use an indexer instead. - public Dictionary Fields; - public object this[FieldCode key] - { - get - { - object value = null; - Fields.TryGetValue ((byte)key, out value); - return value; - } set { - if (value == null) - Fields.Remove((byte)key); - else - Fields[(byte)key] = value; - } - } - - /* - public static DType TypeForField (FieldCode f) - { - switch (f) { - case FieldCode.Invalid: - return DType.Invalid; - case FieldCode.Path: - return DType.ObjectPath; - case FieldCode.Interface: - return DType.String; - case FieldCode.Member: - return DType.String; - case FieldCode.ErrorName: - return DType.String; - case FieldCode.ReplySerial: - return DType.UInt32; - case FieldCode.Destination: - return DType.String; - case FieldCode.Sender: - return DType.String; - case FieldCode.Signature: - return DType.Signature; -#if PROTO_REPLY_SIGNATURE - case FieldCode.ReplySignature: //note: not supported in dbus - return DType.Signature; -#endif - default: - return DType.Invalid; - } - } - */ - } - - /* - public struct HeaderField - { - //public HeaderField (FieldCode code, object value) - //{ - // this.Code = code; - // this.Value = value; - //} - - public static HeaderField Create (FieldCode code, object value) - { - HeaderField hf; - - hf.Code = code; - hf.Value = value; - - return hf; - } - - public FieldCode Code; - public object Value; - } - */ - - /* - struct HeaderFieldSet - { - public ObjectPath Path; - public string Interface; - public string Member; - public string ErrorName; - public uint ReplySerial; - public string Destination; - public string Sender; - //public Signature Signature; - public Signature Sig; - -#if PROTO_REPLY_SIGNATURE - public Signature ReplySignature; -#endif - - public void Read (MessageReader reader) - { - FieldCode code = (FieldCode)reader.ReadByte (); - } - - public void Write (MessageWriter writer) - { - // TODO: Write overall length - - if (Path != null) { - writer.WritePad (8); - writer.Write ((byte)FieldCode.Path); - writer.Write (Signature.ObjectPathSig); - writer.Write (Path); - } - - if (Interface != null) { - writer.WritePad (8); - writer.Write ((byte)FieldCode.Interface); - writer.Write (Signature.StringSig); - writer.Write (Interface); - } - - if (Member != null) { - writer.WritePad (8); - writer.Write ((byte)FieldCode.Member); - writer.Write (Signature.StringSig); - writer.Write (Member); - } - - if (ErrorName != null) { - writer.WritePad (8); - writer.Write ((byte)FieldCode.ErrorName); - writer.Write (Signature.StringSig); - writer.Write (ErrorName); - } - - if (ReplySerial != 0) { - writer.WritePad (8); - writer.Write ((byte)FieldCode.ReplySerial); - writer.Write (Signature.UInt32Sig); - writer.Write (ReplySerial); - } - - if (Destination != null) { - writer.WritePad (8); - writer.Write ((byte)FieldCode.Destination); - writer.Write (Signature.StringSig); - writer.Write (Destination); - } - - if (Sender != null) { - writer.WritePad (8); - writer.Write ((byte)FieldCode.Sender); - writer.Write (Signature.StringSig); - writer.Write (Sender); - } - - if (Sig != Signature.Empty) { - writer.WritePad (8); - writer.Write ((byte)FieldCode.Signature); - writer.Write (Signature.SignatureSig); - writer.Write (Sig); - } - } - } - */ - - enum MessageType : byte - { - //This is an invalid type. - Invalid, - //Method call. - MethodCall, - //Method reply with returned data. - MethodReturn, - //Error reply. If the first argument exists and is a string, it is an error message. - Error, - //Signal emission. - Signal, - } - - enum FieldCode : byte - { - Invalid, - Path, - Interface, - Member, - ErrorName, - ReplySerial, - Destination, - Sender, - Signature, -#if PROTO_REPLY_SIGNATURE - ReplySignature, //note: not supported in dbus -#endif - } - - enum EndianFlag : byte - { - Little = (byte)'l', - Big = (byte)'B', - } - - [Flags] - enum HeaderFlag : byte - { - None = 0, - NoReplyExpected = 0x1, - NoAutoStart = 0x2, - } - - public sealed class ObjectPath : IComparable, IComparable, IEquatable - { - public static readonly ObjectPath Root = new ObjectPath ("/"); - - internal readonly string Value; - - public ObjectPath (string value) - { - if (value == null) - throw new ArgumentNullException ("value"); - - this.Value = value; - } - - public int CompareTo (ObjectPath other) - { - if (other == null) - return 1; - - return Value.CompareTo (other.Value); - } - - public int CompareTo (object otherObject) - { - ObjectPath other = otherObject as ObjectPath; - - if (other == null) - return 1; - - return Value.CompareTo (other.Value); - } - - public bool Equals (ObjectPath other) - { - if (other == null) - return false; - - return Value == other.Value; - } - - public override bool Equals (object o) - { - ObjectPath b = o as ObjectPath; - - if (b == null) - return false; - - return Value.Equals (b.Value); - } - - public static bool operator == (ObjectPath a, ObjectPath b) - { - object aa = a, bb = b; - if (aa == null && bb == null) - return true; - - if (aa == null || bb == null) - return false; - - return a.Value == b.Value; - } - - public static bool operator != (ObjectPath a, ObjectPath b) - { - return !(a == b); - } - - public override int GetHashCode () - { - return Value.GetHashCode (); - } - - public override string ToString () - { - return Value; - } - - //this may or may not prove useful - internal string[] Decomposed - { - get { - return Value.Split (new char[] {'/'}, StringSplitOptions.RemoveEmptyEntries); - /* - } set { - Value = String.Join ("/", value); - */ - } - } - - internal ObjectPath Parent - { - get { - if (Value == Root.Value) - return null; - - string par = Value.Substring (0, Value.LastIndexOf ('/')); - if (par == String.Empty) - par = "/"; - - return new ObjectPath (par); - } - } - - /* - public int CompareTo (object value) - { - return 1; - } - - public int CompareTo (ObjectPath value) - { - return 1; - } - - public bool Equals (ObjectPath value) - { - return false; - } - */ - } - - static class Protocol - { - //protocol versions that we support - public const byte MinVersion = 0; - public const byte Version = 1; - public const byte MaxVersion = Version + 1; - - public const uint MaxMessageLength = 134217728; //2 to the 27th power - public const uint MaxArrayLength = 67108864; //2 to the 26th power - public const uint MaxSignatureLength = 255; - public const uint MaxArrayDepth = 32; - public const uint MaxStructDepth = 32; - - //this is not strictly related to Protocol since names are passed around as strings - internal const uint MaxNameLength = 255; - internal const uint MaxMatchRuleLength = 1024; - internal const uint MaxMatchRuleArgs = 64; - - public static int PadNeeded (int pos, int alignment) - { - int pad = pos % alignment; - pad = pad == 0 ? 0 : alignment - pad; - - return pad; - } - - public static int Padded (int pos, int alignment) - { - int pad = pos % alignment; - if (pad != 0) - pos += alignment - pad; - - return pos; - } - - public static int GetAlignment (DType dtype) - { - switch (dtype) { - case DType.Byte: - return 1; - case DType.Boolean: - return 4; - case DType.Int16: - case DType.UInt16: - return 2; - case DType.Int32: - case DType.UInt32: - return 4; - case DType.Int64: - case DType.UInt64: - return 8; -#if !DISABLE_SINGLE - case DType.Single: //Not yet supported! - return 4; -#endif - case DType.Double: - return 8; - case DType.String: - return 4; - case DType.ObjectPath: - return 4; - case DType.Signature: - return 1; - case DType.Array: - return 4; - case DType.Struct: - case DType.StructBegin: - return 8; - case DType.Variant: - return 1; - case DType.DictEntry: - case DType.DictEntryBegin: - return 8; - case DType.Invalid: - default: - throw new Exception ("Cannot determine alignment of " + dtype); - } - } - - //this class may not be the best place for Verbose - public readonly static bool Verbose; - - static Protocol () - { - Verbose = !String.IsNullOrEmpty (Environment.GetEnvironmentVariable ("DBUS_VERBOSE")); - } - } - - // Currently only for internal use on exported objects - class BusException : Exception - { - public BusException (string errorName, string errorMessage) - { - this.ErrorName = errorName; - this.ErrorMessage = errorMessage; - } - - public BusException (string errorName, string format, params object[] args) - { - this.ErrorName = errorName; - this.ErrorMessage = String.Format (format, args); - } - - public override string Message - { - get - { - return ErrorName + ": " + ErrorMessage; - } - } - - public readonly string ErrorName; - - public readonly string ErrorMessage; - } - -#if UNDOCUMENTED_IN_SPEC -/* -"org.freedesktop.DBus.Error.Failed" -"org.freedesktop.DBus.Error.NoMemory" -"org.freedesktop.DBus.Error.ServiceUnknown" -"org.freedesktop.DBus.Error.NameHasNoOwner" -"org.freedesktop.DBus.Error.NoReply" -"org.freedesktop.DBus.Error.IOError" -"org.freedesktop.DBus.Error.BadAddress" -"org.freedesktop.DBus.Error.NotSupported" -"org.freedesktop.DBus.Error.LimitsExceeded" -"org.freedesktop.DBus.Error.AccessDenied" -"org.freedesktop.DBus.Error.AuthFailed" -"org.freedesktop.DBus.Error.NoServer" -"org.freedesktop.DBus.Error.Timeout" -"org.freedesktop.DBus.Error.NoNetwork" -"org.freedesktop.DBus.Error.AddressInUse" -"org.freedesktop.DBus.Error.Disconnected" -"org.freedesktop.DBus.Error.InvalidArgs" -"org.freedesktop.DBus.Error.FileNotFound" -"org.freedesktop.DBus.Error.UnknownMethod" -"org.freedesktop.DBus.Error.TimedOut" -"org.freedesktop.DBus.Error.MatchRuleNotFound" -"org.freedesktop.DBus.Error.MatchRuleInvalid" -"org.freedesktop.DBus.Error.Spawn.ExecFailed" -"org.freedesktop.DBus.Error.Spawn.ForkFailed" -"org.freedesktop.DBus.Error.Spawn.ChildExited" -"org.freedesktop.DBus.Error.Spawn.ChildSignaled" -"org.freedesktop.DBus.Error.Spawn.Failed" -"org.freedesktop.DBus.Error.UnixProcessIdUnknown" -"org.freedesktop.DBus.Error.InvalidSignature" -"org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown" -*/ -#endif -} diff -Nru banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/NDesk.DBus/ServerBus.cs banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/NDesk.DBus/ServerBus.cs --- banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/NDesk.DBus/ServerBus.cs 2010-08-13 10:57:03.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/NDesk.DBus/ServerBus.cs 1970-01-01 00:00:00.000000000 +0000 @@ -1,715 +0,0 @@ -// Copyright 2009 Alp Toker -// This software is made available under the MIT License -// See COPYING for details - -//#define USE_GLIB - -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.Threading; - -using NDesk.DBus.Transports; -using org.freedesktop.DBus; - -namespace NDesk.DBus -{ - public class ServerBus : org.freedesktop.DBus.IBus - { - public static readonly ObjectPath Path = new ObjectPath ("/org/freedesktop/DBus"); - public const string DBusBusName = "org.freedesktop.DBus"; - public const string DBusInterface = "org.freedesktop.DBus"; - - static string ValidateBusName (string name) - { - if (name == String.Empty) - return "cannot be empty"; - //if (name.StartsWith (":")) - // return "cannot be a unique name"; - return null; - } - - static bool BusNameIsValid (string name, out string nameError) - { - nameError = ValidateBusName (name); - return nameError == null; - } - - readonly List conns = new List (); - - internal Server server; - - ServerConnection Caller - { - get - { - return server.CurrentMessageConnection as ServerConnection; - } - } - - public void AddConnection (Connection conn) - { - if (conns.Contains (conn)) - throw new Exception ("Cannot add connection"); - - conns.Add (conn); - conn.Register (Path, this); - //((ExportObject)conn.RegisteredObjects[Path]).Registered = false; - } - - public void RemoveConnection (Connection conn) - { - Console.Error.WriteLine ("RemoveConn"); - - if (!conns.Remove (conn)) - throw new Exception ("Cannot remove connection"); - - //conn.Unregister (Path); - - List namesToDisown = new List (); - foreach (KeyValuePair pair in Names) { - if (pair.Value == conn) - namesToDisown.Add (pair.Key); - } - - List toRemove = new List (); - foreach (KeyValuePair> pair in Rules) { - //while (pair.Value.Remove (Caller)) { } - while (pair.Value.Remove (conn)) { } - //while (pair.Value.Remove (Caller)) { Console.WriteLine ("Remove!"); } - //pair.Value.RemoveAll ( delegate (Connection conn) { conn == Caller; } ) - if (pair.Value.Count == 0) - toRemove.Add (pair.Key); - //Rules.Remove (pair); - //Rules.Remove>> (pair); - //((ICollection>>)Rules).Remove>> (pair); - //((ICollection>>)Rules).Remove (pair); - } - - foreach (MatchRule r in toRemove) - Rules.Remove (r); - - // TODO: Check the order of signals - // TODO: Atomicity - - foreach (string name in namesToDisown) - Names.Remove (name); - - foreach (string name in namesToDisown) - NameOwnerChanged (name, ((ServerConnection)conn).UniqueName, String.Empty); - - // TODO: Unregister earlier? - conn.Unregister (Path); - } - - struct NameRequisition - { - public NameRequisition (Connection connection, bool allowReplacement) - { - this.Connection = connection; - this.AllowReplacement = allowReplacement; - } - - public readonly Connection Connection; - public readonly bool AllowReplacement; - } - - //SortedList<> - readonly Dictionary Names = new Dictionary (); - //readonly SortedList Names = new SortedList (); - //readonly SortedDictionary Names = new SortedDictionary (); - public RequestNameReply RequestName (string name, NameFlag flags) - { - Console.Error.WriteLine ("RequestName " + name); - string nameError; - if (!BusNameIsValid (name, out nameError)) - throw new ArgumentException (String.Format ("Requested name \"{0}\" is not valid: {1}", name, nameError), "name"); - - if (name.StartsWith (":")) - throw new ArgumentException (String.Format ("Cannot acquire a name starting with ':' such as \"{0}\"", name), "name"); - - if (name == DBusBusName) - throw new ArgumentException (String.Format ("Connection \"{0}\" is not allowed to own the name \"{1}\" because it is reserved for D-Bus' use only", Caller.UniqueName ?? "(inactive)", name), "name"); - - // TODO: Policy delegate support - - // TODO: NameFlag support - - if (flags != NameFlag.None) - Console.Error.WriteLine ("Warning: Ignoring unimplemented NameFlags: " + flags); - - Connection c; - if (!Names.TryGetValue (name, out c)) { - Names[name] = Caller; - RaiseNameSignal ("Acquired", name); - NameOwnerChanged (name, String.Empty, Caller.UniqueName); - - Message activationMessage; - if (activationMessages.TryGetValue (name, out activationMessage)) { - activationMessages.Remove (name); - Caller.SendReal (activationMessage); - } - - return RequestNameReply.PrimaryOwner; - } else if (c == Caller) - return RequestNameReply.AlreadyOwner; - else - return RequestNameReply.Exists; - } - - public ReleaseNameReply ReleaseName (string name) - { - string nameError; - if (!BusNameIsValid (name, out nameError)) - throw new ArgumentException (String.Format ("Given bus name \"{0}\" is not valid: {1}", name, nameError), "name"); - - if (name.StartsWith (":")) - throw new ArgumentException (String.Format ("Cannot release a name starting with ':' such as \"{0}\"", name), "name"); - - if (name == DBusBusName) - throw new ArgumentException (String.Format ("Cannot release the \"{0}\" name because it is owned by the bus", name), "name"); - - Connection c; - if (!Names.TryGetValue (name, out c)) - return ReleaseNameReply.NonExistent; - - if (c != Caller) - return ReleaseNameReply.NotOwner; - - Names.Remove (name); - // TODO: Does official daemon send NameLost signal here? Do the same. - RaiseNameSignal ("Lost", name); - NameOwnerChanged (name, Caller.UniqueName, String.Empty); - return ReleaseNameReply.Released; - } - - int uniqueMajor = 1; - int uniqueMinor = -1; - - string CreateUniqueName () - { - int newMajor = uniqueMajor; - int newMinor = Interlocked.Increment (ref uniqueMinor); - - // Major wrapping should probably be made atomic too. - if (newMinor == Int32.MaxValue) { - if (uniqueMajor == Int32.MaxValue) - uniqueMajor = 1; - else - uniqueMajor++; - uniqueMinor = -1; - } - - string uniqueName = String.Format (":{0}.{1}", newMajor, newMinor); - - // We could check if the unique name already has an owner here for absolute correctness. - Debug.Assert (!NameHasOwner (uniqueName)); - - return uniqueName; - } - - public string Hello () - { - if (Caller.UniqueName != null) - throw new DBusException ("Failed", "Already handled an Hello message"); - - string uniqueName = CreateUniqueName (); - - Console.Error.WriteLine ("Hello " + uniqueName + "!"); - Caller.UniqueName = uniqueName; - Names[uniqueName] = Caller; - - // TODO: Verify the order in which these messages are sent. - //NameAcquired (uniqueName); - RaiseNameSignal ("Acquired", uniqueName); - NameOwnerChanged (uniqueName, String.Empty, uniqueName); - - return uniqueName; - } - - void RaiseNameSignal (string memberSuffix, string name) - { - // Name* signals on org.freedesktop.DBus are connection-specific. - // We handle them here as a special case. - - Signal nameSignal = new Signal (Path, DBusInterface, "Name" + memberSuffix); - MessageWriter mw = new MessageWriter (); - mw.Write (name); - nameSignal.message.Body = mw.ToArray (); - nameSignal.message.Signature = Signature.StringSig; - Caller.Send (nameSignal.message); - } - - public string[] ListNames () - { - List names = new List (); - names.Add (DBusBusName); - names.AddRange (Names.Keys); - return names.ToArray (); - } - - public string[] ListActivatableNames () - { - List names = new List (); - names.AddRange (services.Keys); - return names.ToArray (); - } - - public bool NameHasOwner (string name) - { - if (name == DBusBusName) - return true; - - return Names.ContainsKey (name); - } - - public event NameOwnerChangedHandler NameOwnerChanged; - public event NameLostHandler NameLost; - public event NameAcquiredHandler NameAcquired; - - public StartReply StartServiceByName (string name, uint flags) - { - if (name == DBusBusName) - return StartReply.AlreadyRunning; - - if (Names.ContainsKey (name)) - return StartReply.AlreadyRunning; - - if (!StartProcessNamed (name)) - throw new DBusException ("Spawn.ServiceNotFound", "The name {0} was not provided by any .service files", name); - - return StartReply.Success; - } - - Dictionary activationEnv = new Dictionary (); - public void UpdateActivationEnvironment (IDictionary environment) - { - foreach (KeyValuePair pair in environment) { - if (pair.Key == String.Empty) - continue; - if (pair.Value == String.Empty) - activationEnv.Remove (pair.Key); - else - activationEnv[pair.Key] = pair.Value; - } - } - - public string GetNameOwner (string name) - { - if (name == DBusBusName) - return DBusBusName; - - Connection c; - if (!Names.TryGetValue (name, out c)) - throw new DBusException ("NameHasNoOwner", "Could not get owner of name '{0}': no such name", name); - - return ((ServerConnection)c).UniqueName; - } - - public uint GetConnectionUnixUser (string name) - { - if (name == DBusBusName) - return (uint)Process.GetCurrentProcess ().Id; - - Connection c; - if (!Names.TryGetValue (name, out c)) - throw new DBusException ("NameHasNoOwner", "Could not get UID of name '{0}': no such name", name); - - if (((ServerConnection)c).UserId == 0) - throw new DBusException ("Failed", "Could not determine UID for '{0}'", name); - - return (uint)((ServerConnection)c).UserId; - } - - Dictionary activationMessages = new Dictionary (); - - internal void HandleMessage (Message msg) - { - if (msg == null) - return; - - //List recipients = new List (); - HashSet recipients = new HashSet (); - //HashSet recipientsAll = new HashSet (Connections); - - object fieldValue = msg.Header[FieldCode.Destination]; - if (fieldValue != null) { - string destination = (string)fieldValue; - Connection destConn; - if (Names.TryGetValue (destination, out destConn)) - recipients.Add (destConn); - else if (destination != DBusBusName && !destination.StartsWith (":") && (msg.Header.Flags & HeaderFlag.NoAutoStart) != HeaderFlag.NoAutoStart) { - // Attempt activation - StartProcessNamed (destination); - //Thread.Sleep (5000); - // TODO: Route the message to the newly activated service! - activationMessages[destination] = msg; - //if (Names.TryGetValue (destination, out destConn)) - // recipients.Add (destConn); - //else - // Console.Error.WriteLine ("Couldn't route message to activated service"); - } else if (destination != DBusBusName) { - // Send an error when there's no hope of getting the requested reply - if (msg.ReplyExpected) { - // Error org.freedesktop.DBus.Error.ServiceUnknown: The name {0} was not provided by any .service files - Message rmsg = MessageHelper.CreateUnknownMethodError (new MethodCall (msg)); - if (rmsg != null) { - //Caller.Send (rmsg); - Caller.SendReal (rmsg); - return; - } - } - - } - } - - HashSet recipientsMatchingHeader = new HashSet (); - - HashSet a = new HashSet (); - foreach (KeyValuePair> pair in Rules) { - if (recipients.IsSupersetOf (pair.Value)) - continue; - if (pair.Key.MatchesHeader (msg)) { - a.UnionWith (pair.Key.Args); - recipientsMatchingHeader.UnionWith (pair.Value); - } - } - - MatchRule.Test (a, msg); - - foreach (KeyValuePair> pair in Rules) { - if (recipients.IsSupersetOf (pair.Value)) - continue; - if (!recipientsMatchingHeader.IsSupersetOf (pair.Value)) - continue; - if (a.IsSupersetOf (pair.Key.Args)) - recipients.UnionWith (pair.Value); - } - - foreach (Connection conn in recipients) { - // TODO: rewrite/don't header fields - //conn.Send (msg); - // TODO: Zero the Serial or not? - //msg.Header.Serial = 0; - ((ServerConnection)conn).SendReal (msg); - } - } - - //SortedDictionary Rules = new SortedDictionary (); - //Dictionary Rules = new Dictionary (); - Dictionary> Rules = new Dictionary> (); - public void AddMatch (string rule) - { - MatchRule r = MatchRule.Parse (rule); - - if (r == null) - throw new Exception ("r == null"); - - if (!Rules.ContainsKey (r)) - Rules[r] = new List (); - - // Each occurrence of a Connection in the list represents one value-unique AddMatch call - Rules[r].Add (Caller); - - Console.WriteLine ("Added. Rules count: " + Rules.Count); - } - - public void RemoveMatch (string rule) - { - MatchRule r = MatchRule.Parse (rule); - - if (r == null) - throw new Exception ("r == null"); - - if (!Rules.ContainsKey (r)) - throw new Exception (); - - // We remove precisely one occurrence of the calling connection - Rules[r].Remove (Caller); - if (Rules[r].Count == 0) - Rules.Remove (r); - - Console.WriteLine ("Removed. Rules count: " + Rules.Count); - } - - public string GetId () - { - return Caller.Id.ToString (); - } - - // Undocumented in spec - public string[] ListQueuedOwners (string name) - { - // ? - if (name == DBusBusName) - return new string[] { DBusBusName }; - - Connection c; - if (!Names.TryGetValue (name, out c)) - throw new DBusException ("NameHasNoOwner", "Could not get owners of name '{0}': no such name", name); - - return new string[] { ((ServerConnection)c).UniqueName }; - } - - // Undocumented in spec - public uint GetConnectionUnixProcessID (string connection_name) - { - Connection c; - if (!Names.TryGetValue (connection_name, out c)) - throw new DBusException ("NameHasNoOwner", "Could not get PID of name '{0}': no such name", connection_name); - - uint pid; - if (!c.Transport.TryGetPeerPid (out pid)) - throw new DBusException ("UnixProcessIdUnknown", "Could not determine PID for '{0}'", connection_name); - - return pid; - } - - // Undocumented in spec - public byte[] GetConnectionSELinuxSecurityContext (string connection_name) - { - throw new DBusException ("SELinuxSecurityContextUnknown", "Could not determine security context for '{0}'", connection_name); - } - - // Undocumented in spec - public void ReloadConfig () - { - ScanServices (); - } - - Dictionary services = new Dictionary (); - public string svcPath = "/usr/share/dbus-1/services"; - public void ScanServices () - { - services.Clear (); - - string[] svcs = Directory.GetFiles (svcPath, "*.service"); - foreach (string svc in svcs) { - string fname = System.IO.Path.Combine (svcPath, svc); - using (TextReader r = new StreamReader (fname)) { - string ln; - string cmd = null; - string name = null; - while ((ln = r.ReadLine ()) != null) { - if (ln.StartsWith ("Exec=")) - cmd = ln.Remove (0, 5); - else if (ln.StartsWith ("Name=")) - name = ln.Remove (0, 5); - } - - // TODO: use XdgNet - // TODO: Validate names and trim strings - if (name != null && cmd != null) - services[name] = cmd; - } - } - } - - public bool allowActivation = false; - bool StartProcessNamed (string name) - { - Console.Error.WriteLine ("Start " + name); - - if (!allowActivation) - return false; - - string cmd; - if (!services.TryGetValue (name, out cmd)) - return false; - - try { - StartProcess (cmd); - } catch (Exception e) { - Console.Error.WriteLine (e); - return false; - } - - return true; - } - - // Can be "session" or "system" - public string busType = "session"; - - void StartProcess (string fname) - { - if (!allowActivation) - return; - - try { - ProcessStartInfo startInfo = new ProcessStartInfo (fname); - startInfo.UseShellExecute = false; - - foreach (KeyValuePair pair in activationEnv) { - startInfo.EnvironmentVariables[pair.Key] = pair.Value; - } - - startInfo.EnvironmentVariables["DBUS_STARTER_BUS_TYPE"] = busType; - startInfo.EnvironmentVariables["DBUS_" + busType.ToUpper () + "_BUS_ADDRESS"] = server.address; - startInfo.EnvironmentVariables["DBUS_STARTER_ADDRESS"] = server.address; - startInfo.EnvironmentVariables["DBUS_STARTER_BUS_TYPE"] = busType; - Process myProcess = Process.Start (startInfo); - } catch (Exception e) { - Console.Error.WriteLine (e); - } - } - } - - class ServerConnection : Connection - { - public Server Server; - - public ServerConnection (Transport t) - : base (t) - { - } - - bool shouldDump = false; - - override internal void HandleMessage (Message msg) - { - if (!isConnected) - return; - - if (msg == null) { - Console.Error.WriteLine ("Disconnected!"); - isConnected = false; - //Server.Bus.RemoveConnection (this); - //ServerBus sbus = Unregister (new ObjectPath ("/org/freedesktop/DBus")) as ServerBus; - - /* - ServerBus sbus = Unregister (new ObjectPath ("/org/freedesktop/DBus")) as ServerBus; - Register (new ObjectPath ("/org/freedesktop/DBus"), sbus); - sbus.RemoveConnection (this); - */ - - Server.SBus.RemoveConnection (this); - - //Server.ConnectionLost (this); - return; - } - - Server.CurrentMessageConnection = this; - Server.CurrentMessage = msg; - - try { - if (shouldDump) { - MessageDumper.WriteComment ("Handling:", Console.Out); - MessageDumper.WriteMessage (msg, Console.Out); - } - - if (UniqueName != null) - msg.Header[FieldCode.Sender] = UniqueName; - - object fieldValue = msg.Header[FieldCode.Destination]; - if (fieldValue != null) { - if ((string)fieldValue == ServerBus.DBusBusName) { - - // Workaround for our daemon only listening on a single path - if (msg.Header.MessageType == NDesk.DBus.MessageType.MethodCall) - msg.Header[FieldCode.Path] = ServerBus.Path; - - base.HandleMessage (msg); - //return; - } - } - //base.HandleMessage (msg); - - Server.SBus.HandleMessage (msg); - } finally { - Server.CurrentMessageConnection = null; - Server.CurrentMessage = null; - } - } - - override internal uint Send (Message msg) - { - if (!isConnected) - return 0; - - /* - if (msg.Header.MessageType == NDesk.DBus.MessageType.Signal) { - Signal signal = new Signal (msg); - if (signal.Member == "NameAcquired" || signal.Member == "NameLost") { - string dest = (string)msg.Header[FieldCode.Destination]; - if (dest != UniqueName) - return 0; - } - } - */ - - if (msg.Header.MessageType != NDesk.DBus.MessageType.MethodReturn) { - msg.Header[FieldCode.Sender] = ServerBus.DBusBusName; - } - - if (UniqueName != null) - msg.Header[FieldCode.Destination] = UniqueName; - - if (shouldDump) { - MessageDumper.WriteComment ("Sending:", Console.Out); - MessageDumper.WriteMessage (msg, Console.Out); - } - - //return base.Send (msg); - return SendReal (msg); - } - - internal uint SendReal (Message msg) - { - if (!isConnected) - return 0; - - try { - return base.Send (msg); - } catch { - //} catch (System.IO.IOException) { - isConnected = false; - Server.SBus.RemoveConnection (this); - } - return 0; - } - - //ServerBus SBus; - public string UniqueName = null; - public long UserId = 0; - - ~ServerConnection () - { - Console.Error.WriteLine ("Good! ~ServerConnection () for {0}", UniqueName ?? "(inactive)"); - } - } - - internal class BusContext - { - protected Connection connection = null; - public Connection Connection - { - get - { - return connection; - } - } - - protected Message message = null; - internal Message CurrentMessage - { - get - { - return message; - } - } - - public string SenderName = null; - } - - class DBusException : BusException - { - public DBusException (string errorNameSuffix, string format, params object[] args) - : base (ServerBus.DBusInterface + ".Error." + errorNameSuffix, format, args) - { - // Note: This won't log ArgumentExceptions which are used in some places. - if (Protocol.Verbose) - Console.Error.WriteLine (Message); - } - } -} \ No newline at end of file diff -Nru banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/NDesk.DBus/Server.cs banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/NDesk.DBus/Server.cs --- banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/NDesk.DBus/Server.cs 2010-08-13 10:57:03.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/NDesk.DBus/Server.cs 1970-01-01 00:00:00.000000000 +0000 @@ -1,503 +0,0 @@ -// Copyright 2006 Alp Toker -// This software is made available under the MIT License -// See COPYING for details - -using System; -using System.IO; -using System.Net; -using System.Net.Sockets; -using System.Threading; - -#if ENABLE_PIPES -using System.IO.Pipes; -#endif - -namespace NDesk.DBus -{ - using Unix; - using Transports; - using Authentication; - - //TODO: complete this class - abstract class Server - { - // Was Listen() - public static Server ListenAt (string address) - { - AddressEntry[] entries = NDesk.DBus.Address.Parse (address); - - foreach (AddressEntry entry in entries) { - try { - switch (entry.Method) { - case "tcp": - return new TcpServer (entry.ToString ()); - case "unix": - return new UnixServer (entry.ToString ()); -#if ENABLE_PIPES - case "win": - return new WinServer (entry.ToString ()); -#endif - } - } catch (Exception e) { - if (Protocol.Verbose) - Console.Error.WriteLine (e.Message); - } - } - - // TODO: Should call Listen on the Server? - - return null; - - /* - server.address = address; - - server.Id = entry.GUID; - if (server.Id == UUID.Zero) - server.Id = UUID.Generate (); - */ - } - - public abstract void Listen (); - - public abstract void Disconnect (); - - public virtual bool IsConnected - { - get { - return true; - } - } - - internal string address; - public string Address - { - get { - return address; - } - } - - public UUID Id = UUID.Zero; - - public abstract event Action NewConnection; - - // FIXME: The follow fields do not belong here! - // TODO: Make these a thread-specific CallContext prop - [ThreadStatic] - public Connection CurrentMessageConnection; - [ThreadStatic] - public Message CurrentMessage; - public ServerBus SBus = null; - } - - class UnixServer : Server - { - string unixPath = null; - bool isAbstract; - - public UnixServer (string address) - { - AddressEntry[] entries = NDesk.DBus.Address.Parse (address); - AddressEntry entry = entries[0]; - - if (entry.Method != "unix") - throw new Exception (); - - string val; - if (entry.Properties.TryGetValue ("path", out val)) { - unixPath = val; - isAbstract = false; - } else if (entry.Properties.TryGetValue ("abstract", out val)) { - unixPath = val; - isAbstract = true; - } - - if (String.IsNullOrEmpty (unixPath)) - throw new Exception ("Address path is invalid"); - - if (entry.GUID == UUID.Zero) - entry.GUID = UUID.Generate (); - Id = entry.GUID; - - /* - Id = entry.GUID; - if (Id == UUID.Zero) - Id = UUID.Generate (); - */ - - this.address = entry.ToString (); - //Console.WriteLine ("Server address: " + Address); - } - - public override void Disconnect () - { - } - - bool AcceptClient (UnixSocket csock, out ServerConnection conn) - { - //TODO: use the right abstraction here, probably using the Server class - UnixNativeTransport transport = new UnixNativeTransport (); - //client.Client.Blocking = true; - transport.socket = csock; - transport.SocketHandle = (long)csock.Handle; - transport.Stream = new UnixStream (csock); - //Connection conn = new Connection (transport); - //Connection conn = new ServerConnection (transport); - //ServerConnection conn = new ServerConnection (transport); - conn = new ServerConnection (transport); - conn.Server = this; - conn.Id = Id; - - if (conn.Transport.Stream.ReadByte () != 0) - return false; - - conn.isConnected = true; - - SaslPeer remote = new SaslPeer (); - remote.stream = transport.Stream; - SaslServer local = new SaslServer (); - local.stream = transport.Stream; - local.Guid = Id; - - local.Peer = remote; - remote.Peer = local; - - bool success = local.Authenticate (); - - Console.WriteLine ("Success? " + success); - - if (!success) - return false; - - conn.UserId = ((SaslServer)local).uid; - - conn.isAuthenticated = true; - - return true; - } - - public override void Listen () - { - byte[] sa = isAbstract ? UnixNativeTransport.GetSockAddrAbstract (unixPath) : UnixNativeTransport.GetSockAddr (unixPath); - UnixSocket usock = new UnixSocket (); - usock.Bind (sa); - usock.Listen (50); - - while (true) { - Console.WriteLine ("Waiting for client on " + (isAbstract ? "abstract " : String.Empty) + "path " + unixPath); - UnixSocket csock = usock.Accept (); - Console.WriteLine ("Client connected"); - - ServerConnection conn; - if (!AcceptClient (csock, out conn)) { - Console.WriteLine ("Client rejected"); - csock.Close (); - continue; - } - - //GLib.Idle.Add (delegate { - - if (NewConnection != null) - NewConnection (conn); - - //BusG.Init (conn); - /* - conn.Iterate (); - Console.WriteLine ("done iter"); - BusG.Init (conn); - Console.WriteLine ("done init"); - */ - - //GLib.Idle.Add (delegate { BusG.Init (conn); return false; }); - #if USE_GLIB - BusG.Init (conn); - #else - new Thread (new ThreadStart (delegate { while (conn.IsConnected) conn.Iterate (); })).Start (); - #endif - Console.WriteLine ("done init"); - - - //return false; - //}); - } - } - - /* - public void ConnectionLost (Connection conn) - { - } - */ - - public override event Action NewConnection; - } - - class TcpServer : Server - { - uint port = 0; - public TcpServer (string address) - { - AddressEntry[] entries = NDesk.DBus.Address.Parse (address); - AddressEntry entry = entries[0]; - - if (entry.Method != "tcp") - throw new Exception (); - - string val; - if (entry.Properties.TryGetValue ("port", out val)) - port = UInt32.Parse (val); - - if (entry.GUID == UUID.Zero) - entry.GUID = UUID.Generate (); - Id = entry.GUID; - - /* - Id = entry.GUID; - if (Id == UUID.Zero) - Id = UUID.Generate (); - */ - - this.address = entry.ToString (); - //Console.WriteLine ("Server address: " + Address); - } - - public override void Disconnect () - { - } - - bool AcceptClient (TcpClient client, out ServerConnection conn) - { - //TODO: use the right abstraction here, probably using the Server class - SocketTransport transport = new SocketTransport (); - client.Client.Blocking = true; - transport.SocketHandle = (long)client.Client.Handle; - transport.Stream = client.GetStream (); - //Connection conn = new Connection (transport); - //Connection conn = new ServerConnection (transport); - //ServerConnection conn = new ServerConnection (transport); - conn = new ServerConnection (transport); - conn.Server = this; - conn.Id = Id; - - if (conn.Transport.Stream.ReadByte () != 0) - return false; - - conn.isConnected = true; - - SaslPeer remote = new SaslPeer (); - remote.stream = transport.Stream; - SaslServer local = new SaslServer (); - local.stream = transport.Stream; - local.Guid = Id; - - local.Peer = remote; - remote.Peer = local; - - bool success = local.Authenticate (); - - Console.WriteLine ("Success? " + success); - - if (!success) - return false; - - conn.UserId = ((SaslServer)local).uid; - - conn.isAuthenticated = true; - - return true; - } - - public override void Listen () - { - TcpListener server = new TcpListener (IPAddress.Any, (int)port); - server.Server.Blocking = true; - - server.Start (); - - while (true) { - //Console.WriteLine ("Waiting for client on TCP port " + port); - TcpClient client = server.AcceptTcpClient (); - /* - client.NoDelay = true; - client.ReceiveBufferSize = (int)Protocol.MaxMessageLength; - client.SendBufferSize = (int)Protocol.MaxMessageLength; - */ - //Console.WriteLine ("Client connected"); - - ServerConnection conn; - if (!AcceptClient (client, out conn)) { - Console.WriteLine ("Client rejected"); - client.Close (); - continue; - } - - //client.Client.Blocking = false; - - - //GLib.Idle.Add (delegate { - - if (NewConnection != null) - NewConnection (conn); - - //BusG.Init (conn); - /* - conn.Iterate (); - Console.WriteLine ("done iter"); - BusG.Init (conn); - Console.WriteLine ("done init"); - */ - - //GLib.Idle.Add (delegate { BusG.Init (conn); return false; }); - #if USE_GLIB - BusG.Init (conn); - #else - new Thread (new ThreadStart (delegate { while (conn.IsConnected) conn.Iterate (); })).Start (); - #endif - //Console.WriteLine ("done init"); - - //return false; - //}); - } - } - - /* - public void ConnectionLost (Connection conn) - { - } - */ - - public override event Action NewConnection; - } - - #if ENABLE_PIPES - class WinServer : Server - { - string pipePath; - - public WinServer (string address) - { - AddressEntry[] entries = NDesk.DBus.Address.Parse (address); - AddressEntry entry = entries[0]; - - if (entry.Method != "win") - throw new Exception (); - - string val; - if (entry.Properties.TryGetValue ("path", out val)) { - pipePath = val; - } - - if (String.IsNullOrEmpty (pipePath)) - throw new Exception ("Address path is invalid"); - - if (entry.GUID == UUID.Zero) - entry.GUID = UUID.Generate (); - Id = entry.GUID; - - /* - Id = entry.GUID; - if (Id == UUID.Zero) - Id = UUID.Generate (); - */ - - this.address = entry.ToString (); - Console.WriteLine ("Server address: " + Address); - } - - public override void Disconnect () - { - } - - bool AcceptClient (PipeStream client, out ServerConnection conn) - { - PipeTransport transport = new PipeTransport (); - //client.Client.Blocking = true; - //transport.SocketHandle = (long)client.Client.Handle; - transport.Stream = client; - conn = new ServerConnection (transport); - conn.Server = this; - conn.Id = Id; - - if (conn.Transport.Stream.ReadByte () != 0) - return false; - - conn.isConnected = true; - - SaslPeer remote = new SaslPeer (); - remote.stream = transport.Stream; - SaslServer local = new SaslServer (); - local.stream = transport.Stream; - local.Guid = Id; - - local.Peer = remote; - remote.Peer = local; - - bool success = local.Authenticate (); - //bool success = true; - - Console.WriteLine ("Success? " + success); - - if (!success) - return false; - - conn.UserId = ((SaslServer)local).uid; - - conn.isAuthenticated = true; - - return true; - } - - static int numPipeThreads = 16; - - public override void Listen () - { - // TODO: Use a ThreadPool to have an adaptive number of reusable threads. - for (int i = 0; i != numPipeThreads; i++) { - Thread newThread = new Thread (new ThreadStart (DoListen)); - newThread.Name = "DBusPipeServer" + i; - // Hack to allow shutdown without Joining threads for now. - newThread.IsBackground = true; - newThread.Start (); - } - - Console.WriteLine ("Press enter to exit."); - Console.ReadLine (); - } - - void DoListen () - { - while (true) - using (NamedPipeServerStream pipeServer = new NamedPipeServerStream (pipePath, PipeDirection.InOut, numPipeThreads, PipeTransmissionMode.Byte, PipeOptions.Asynchronous, (int)Protocol.MaxMessageLength, (int)Protocol.MaxMessageLength)) { - Console.WriteLine ("Waiting for client on path " + pipePath); - pipeServer.WaitForConnection (); - - Console.WriteLine ("Client connected"); - - ServerConnection conn; - if (!AcceptClient (pipeServer, out conn)) { - Console.WriteLine ("Client rejected"); - pipeServer.Disconnect (); - continue; - } - - pipeServer.Flush (); - pipeServer.WaitForPipeDrain (); - - if (NewConnection != null) - NewConnection (conn); - - while (conn.IsConnected) - conn.Iterate (); - - pipeServer.Disconnect (); - } - } - - /* - public void ConnectionLost (Connection conn) - { - } - */ - - public override event Action NewConnection; - } -#endif -} diff -Nru banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/NDesk.DBus/Signature.cs banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/NDesk.DBus/Signature.cs --- banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/NDesk.DBus/Signature.cs 2010-08-13 10:57:03.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/NDesk.DBus/Signature.cs 1970-01-01 00:00:00.000000000 +0000 @@ -1,897 +0,0 @@ -// Copyright 2006 Alp Toker -// This software is made available under the MIT License -// See COPYING for details - -using System; -using System.Text; - -using System.Collections.Generic; -//TODO: Reflection should be done at a higher level than this class -using System.Reflection; - -namespace NDesk.DBus -{ - //maybe this should be nullable? - struct Signature - { - //TODO: this class needs some work - //Data should probably include the null terminator - - public static readonly Signature Empty = new Signature (String.Empty); - public static readonly Signature ByteSig = Allocate (DType.Byte); - public static readonly Signature UInt16Sig = Allocate (DType.UInt16); - public static readonly Signature UInt32Sig = Allocate (DType.UInt32); - public static readonly Signature StringSig = Allocate (DType.String); - public static readonly Signature ObjectPathSig = Allocate (DType.ObjectPath); - public static readonly Signature SignatureSig = Allocate (DType.Signature); - public static readonly Signature VariantSig = Allocate (DType.Variant); - - public static bool operator == (Signature a, Signature b) - { - if (a.data == b.data) - return true; - - if (a.data == null) - return false; - - if (b.data == null) - return false; - - if (a.data.Length != b.data.Length) - return false; - - for (int i = 0 ; i != a.data.Length ; i++) - if (a.data[i] != b.data[i]) - return false; - - return true; - } - - public static bool operator != (Signature a, Signature b) - { - return !(a == b); - } - - public override bool Equals (object o) - { - if (o == null) - return false; - - if (!(o is Signature)) - return false; - - return this == (Signature)o; - } - - public override int GetHashCode () - { - // TODO: Avoid string conversion - return Value.GetHashCode (); - } - - public static Signature operator + (Signature s1, Signature s2) - { - return Concat (s1, s2); - } - - public static Signature Concat (Signature s1, Signature s2) - { - if (s1.data == null && s2.data == null) - return Signature.Empty; - - if (s1.data == null) - return s2; - - if (s2.data == null) - return s1; - - if (s1.Length + s2.Length == 0) - return Signature.Empty; - - byte[] data = new byte[s1.data.Length + s2.data.Length]; - s1.data.CopyTo (data, 0); - s2.data.CopyTo (data, s1.data.Length); - return Signature.Take (data); - } - - public Signature (string value) - { - if (value.Length == 0) { - this.data = Empty.data; - return; - } - - if (value.Length == 1) { - this.data = DataForDType ((DType)value[0]); - return; - } - - this.data = Encoding.ASCII.GetBytes (value); - } - - internal static Signature Take (byte[] value) - { - Signature sig; - - if (value.Length == 0) { - sig.data = Empty.data; - return sig; - } - - if (value.Length == 1) { - sig.data = DataForDType ((DType)value[0]); - return sig; - } - - sig.data = value; - return sig; - } - - static byte[] DataForDType (DType value) - { - // Reduce heap allocations. - // For now, we only cache the most common protocol signatures. - switch (value) { - case DType.Byte: - return ByteSig.data; - case DType.UInt16: - return UInt16Sig.data; - case DType.UInt32: - return UInt32Sig.data; - case DType.String: - return StringSig.data; - case DType.ObjectPath: - return ObjectPathSig.data; - case DType.Signature: - return SignatureSig.data; - case DType.Variant: - return VariantSig.data; - default: - return new byte[] {(byte)value}; - } - } - - private static Signature Allocate (DType value) - { - Signature sig; - sig.data = new byte[] {(byte)value}; - return sig; - } - - internal Signature (DType value) - { - this.data = DataForDType (value); - } - - internal Signature (DType[] value) - { - if (value.Length == 0) { - this.data = Empty.data; - return; - } - - if (value.Length == 1) { - this.data = DataForDType (value[0]); - return; - } - - this.data = new byte[value.Length]; - - for (int i = 0 ; i != value.Length ; i++) - this.data[i] = (byte)value[i]; - } - - byte[] data; - - //TODO: this should be private, but MessageWriter and Monitor still use it - //[Obsolete] - public byte[] GetBuffer () - { - return data; - } - - internal DType this[int index] - { - get { - return (DType)data[index]; - } - } - - public int Length - { - get { - return data.Length; - } - } - - //[Obsolete] - public string Value - { - get { - //FIXME: hack to handle bad case when Data is null - if (data == null) - return String.Empty; - - return Encoding.ASCII.GetString (data); - } - } - - public override string ToString () - { - return Value; - - /* - StringBuilder sb = new StringBuilder (); - - foreach (DType t in data) { - //we shouldn't rely on object mapping here, but it's an easy way to get string representations for now - Type type = DTypeToType (t); - if (type != null) { - sb.Append (type.Name); - } else { - char c = (char)t; - if (!Char.IsControl (c)) - sb.Append (c); - else - sb.Append (@"\" + (int)c); - } - sb.Append (" "); - } - - return sb.ToString (); - */ - } - - public Signature MakeArraySignature () - { - return new Signature (DType.Array) + this; - } - - public static Signature MakeStruct (params Signature[] elems) - { - Signature sig = Signature.Empty; - - sig += new Signature (DType.StructBegin); - - foreach (Signature elem in elems) - sig += elem; - - sig += new Signature (DType.StructEnd); - - return sig; - } - - public static Signature MakeDictEntry (Signature keyType, Signature valueType) - { - Signature sig = Signature.Empty; - - sig += new Signature (DType.DictEntryBegin); - - sig += keyType; - sig += valueType; - - sig += new Signature (DType.DictEntryEnd); - - return sig; - } - - public static Signature MakeDict (Signature keyType, Signature valueType) - { - return MakeDictEntry (keyType, valueType).MakeArraySignature (); - } - - public int Alignment - { - get { - if (data.Length == 0) - return 0; - - return Protocol.GetAlignment (this[0]); - } - } - - static int GetSize (DType dtype) - { - switch (dtype) { - case DType.Byte: - return 1; - case DType.Boolean: - return 4; - case DType.Int16: - case DType.UInt16: - return 2; - case DType.Int32: - case DType.UInt32: - return 4; - case DType.Int64: - case DType.UInt64: - return 8; -#if !DISABLE_SINGLE - case DType.Single: //Not yet supported! - return 4; -#endif - case DType.Double: - return 8; - case DType.String: - case DType.ObjectPath: - case DType.Signature: - case DType.Array: - case DType.StructBegin: - case DType.Variant: - case DType.DictEntryBegin: - return -1; - case DType.Invalid: - default: - throw new Exception ("Cannot determine size of " + dtype); - } - } - - public bool GetFixedSize (ref int size) - { - if (size < 0) - return false; - - if (data.Length == 0) - return true; - - // Sensible? - size = Protocol.Padded (size, Alignment); - - if (data.Length == 1) { - int valueSize = GetSize (this[0]); - - if (valueSize == -1) - return false; - - size += valueSize; - return true; - } - - if (IsStructlike) { - foreach (Signature sig in GetParts ()) - if (!sig.GetFixedSize (ref size)) - return false; - return true; - } - - if (IsArray || IsDict) - return false; - - if (IsStruct) { - foreach (Signature sig in GetFieldSignatures ()) - if (!sig.GetFixedSize (ref size)) - return false; - return true; - } - - // Any other cases? - throw new Exception (); - } - - public bool IsFixedSize - { - get { - if (data.Length == 0) - return true; - - if (data.Length == 1) { - int size = GetSize (this[0]); - return size != -1; - } - - if (IsStructlike) { - foreach (Signature sig in GetParts ()) - if (!sig.IsFixedSize) - return false; - return true; - } - - if (IsArray || IsDict) - return false; - - if (IsStruct) { - foreach (Signature sig in GetFieldSignatures ()) - if (!sig.IsFixedSize) - return false; - return true; - } - - // Any other cases? - throw new Exception (); - } - } - - //TODO: complete this - public bool IsPrimitive - { - get { - if (data.Length != 1) - return false; - - if (this[0] == DType.Variant) - return false; - - if (this[0] == DType.Invalid) - return false; - - return true; - } - } - - public bool IsStruct - { - get { - if (Length < 2) - return false; - - if (this[0] != DType.StructBegin) - return false; - - // FIXME: Incorrect! What if this is in fact a Structlike starting and finishing with structs? - if (this[Length - 1] != DType.StructEnd) - return false; - - return true; - } - } - - public bool IsDictEntry - { - get { - if (Length < 2) - return false; - - if (this[0] != DType.DictEntryBegin) - return false; - - // FIXME: Incorrect! What if this is in fact a Structlike starting and finishing with structs? - if (this[Length - 1] != DType.DictEntryEnd) - return false; - - return true; - } - } - - public bool IsStructlike - { - get { - if (Length < 2) - return false; - - if (IsArray) - return false; - - if (IsDict) - return false; - - if (IsStruct) - return false; - - return true; - } - } - - public bool IsDict - { - get { - if (Length < 3) - return false; - - if (!IsArray) - return false; - - // 0 is 'a' - if (this[1] != DType.DictEntryBegin) - return false; - - return true; - } - } - - public bool IsArray - { - get { - if (Length < 2) - return false; - - if (this[0] != DType.Array) - return false; - - return true; - } - } - - public Signature GetElementSignature () - { - if (!IsArray) - throw new Exception ("Cannot get the element signature of a non-array (signature was '" + this + "')"); - - //TODO: improve this - //if (IsDict) - // throw new NotSupportedException ("Parsing dict signature is not supported (signature was '" + this + "')"); - - // Skip over 'a' - int pos = 1; - return GetNextSignature (ref pos); - } - - public Type[] ToTypes () - { - // TODO: Find a way to avoid these null checks everywhere. - if (data == null) - return Type.EmptyTypes; - - List types = new List (); - for (int i = 0 ; i != data.Length ; types.Add (ToType (ref i))); - return types.ToArray (); - } - - public Type ToType () - { - int pos = 0; - Type ret = ToType (ref pos); - if (pos != data.Length) - throw new Exception ("Signature '" + Value + "' is not a single complete type"); - return ret; - } - - internal static DType TypeCodeToDType (TypeCode typeCode) - { - switch (typeCode) - { - case TypeCode.Empty: - return DType.Invalid; - case TypeCode.Object: - return DType.Invalid; - case TypeCode.DBNull: - return DType.Invalid; - case TypeCode.Boolean: - return DType.Boolean; - case TypeCode.Char: - return DType.UInt16; - case TypeCode.SByte: - return DType.Byte; - case TypeCode.Byte: - return DType.Byte; - case TypeCode.Int16: - return DType.Int16; - case TypeCode.UInt16: - return DType.UInt16; - case TypeCode.Int32: - return DType.Int32; - case TypeCode.UInt32: - return DType.UInt32; - case TypeCode.Int64: - return DType.Int64; - case TypeCode.UInt64: - return DType.UInt64; - case TypeCode.Single: - return DType.Single; - case TypeCode.Double: - return DType.Double; - case TypeCode.Decimal: - return DType.Invalid; - case TypeCode.DateTime: - return DType.Invalid; - case TypeCode.String: - return DType.String; - default: - return DType.Invalid; - } - } - - //FIXME: this method is bad, get rid of it - internal static DType TypeToDType (Type type) - { - if (type == typeof (void)) - return DType.Invalid; - - if (type == typeof (string)) - return DType.String; - - if (type == typeof (ObjectPath)) - return DType.ObjectPath; - - if (type == typeof (Signature)) - return DType.Signature; - - if (type == typeof (object)) - return DType.Variant; - - if (type.IsPrimitive) - return TypeCodeToDType (Type.GetTypeCode (type)); - - if (type.IsEnum) - return TypeToDType (Enum.GetUnderlyingType (type)); - - //needs work - if (type.IsArray) - return DType.Array; - - //if (type.UnderlyingSystemType != null) - // return TypeToDType (type.UnderlyingSystemType); - if (Mapper.IsPublic (type)) - return DType.ObjectPath; - - if (!type.IsPrimitive && !type.IsEnum) - return DType.Struct; - - //TODO: maybe throw an exception here - return DType.Invalid; - } - - /* - public static DType TypeToDType (Type type) - { - if (type == null) - return DType.Invalid; - else if (type == typeof (byte)) - return DType.Byte; - else if (type == typeof (bool)) - return DType.Boolean; - else if (type == typeof (short)) - return DType.Int16; - else if (type == typeof (ushort)) - return DType.UInt16; - else if (type == typeof (int)) - return DType.Int32; - else if (type == typeof (uint)) - return DType.UInt32; - else if (type == typeof (long)) - return DType.Int64; - else if (type == typeof (ulong)) - return DType.UInt64; - else if (type == typeof (float)) //not supported by libdbus at time of writing - return DType.Single; - else if (type == typeof (double)) - return DType.Double; - else if (type == typeof (string)) - return DType.String; - else if (type == typeof (ObjectPath)) - return DType.ObjectPath; - else if (type == typeof (Signature)) - return DType.Signature; - else - return DType.Invalid; - } - */ - - public IEnumerable GetFieldSignatures () - { - if (this == Signature.Empty || this[0] != DType.StructBegin) - throw new Exception ("Not a struct"); - - for (int pos = 1 ; pos < data.Length - 1 ;) - yield return GetNextSignature (ref pos); - } - - public void GetDictEntrySignatures (out Signature sigKey, out Signature sigValue) - { - if (this == Signature.Empty || this[0] != DType.DictEntryBegin) - throw new Exception ("Not a DictEntry"); - - int pos = 1; - sigKey = GetNextSignature (ref pos); - sigValue = GetNextSignature (ref pos); - } - - public IEnumerable GetParts () - { - if (data == null) - yield break; - for (int pos = 0 ; pos < data.Length ;) { - yield return GetNextSignature (ref pos); - } - } - - public Signature GetNextSignature (ref int pos) - { - if (data == null) - return Signature.Empty; - - DType dtype = (DType)data[pos++]; - - switch (dtype) { - //case DType.Invalid: - // return typeof (void); - case DType.Array: - //peek to see if this is in fact a dictionary - if ((DType)data[pos] == DType.DictEntryBegin) { - //skip over the { - pos++; - Signature keyType = GetNextSignature (ref pos); - Signature valueType = GetNextSignature (ref pos); - //skip over the } - pos++; - return Signature.MakeDict (keyType, valueType); - } else { - Signature elementType = GetNextSignature (ref pos); - return elementType.MakeArraySignature (); - } - //case DType.DictEntryBegin: // FIXME: DictEntries should be handled separately. - case DType.StructBegin: - //List fieldTypes = new List (); - Signature fieldsSig = Signature.Empty; - while ((DType)data[pos] != DType.StructEnd) - fieldsSig += GetNextSignature (ref pos); - //skip over the ) - pos++; - return Signature.MakeStruct (fieldsSig); - //return fieldsSig; - case DType.DictEntryBegin: - Signature sigKey = GetNextSignature (ref pos); - Signature sigValue = GetNextSignature (ref pos); - //skip over the } - pos++; - return Signature.MakeDictEntry (sigKey, sigValue); - default: - return new Signature (dtype); - } - } - - public Type ToType (ref int pos) - { - // TODO: Find a way to avoid these null checks everywhere. - if (data == null) - return typeof (void); - - DType dtype = (DType)data[pos++]; - - switch (dtype) { - case DType.Invalid: - return typeof (void); - case DType.Byte: - return typeof (byte); - case DType.Boolean: - return typeof (bool); - case DType.Int16: - return typeof (short); - case DType.UInt16: - return typeof (ushort); - case DType.Int32: - return typeof (int); - case DType.UInt32: - return typeof (uint); - case DType.Int64: - return typeof (long); - case DType.UInt64: - return typeof (ulong); - case DType.Single: ////not supported by libdbus at time of writing - return typeof (float); - case DType.Double: - return typeof (double); - case DType.String: - return typeof (string); - case DType.ObjectPath: - return typeof (ObjectPath); - case DType.Signature: - return typeof (Signature); - case DType.Array: - //peek to see if this is in fact a dictionary - if ((DType)data[pos] == DType.DictEntryBegin) { - //skip over the { - pos++; - Type keyType = ToType (ref pos); - Type valueType = ToType (ref pos); - //skip over the } - pos++; - //return typeof (IDictionary<,>).MakeGenericType (new Type[] {keyType, valueType}); - //workaround for Mono bug #81035 (memory leak) - return Mapper.GetGenericType (typeof (IDictionary<,>), new Type[] {keyType, valueType}); - } else { - return ToType (ref pos).MakeArrayType (); - } - case DType.Struct: - return typeof (ValueType); - case DType.DictEntry: - return typeof (System.Collections.Generic.KeyValuePair<,>); - case DType.Variant: - return typeof (object); - default: - throw new NotSupportedException ("Parsing or converting this signature is not yet supported (signature was '" + this + "'), at DType." + dtype); - } - } - - public static Signature GetSig (object[] objs) - { - return GetSig (Type.GetTypeArray (objs)); - } - - public static Signature GetSig (Type[] types) - { - if (types == null) - throw new ArgumentNullException ("types"); - - Signature sig = Signature.Empty; - - foreach (Type type in types) - sig += GetSig (type); - - return sig; - } - - public static Signature GetSig (Type type) - { - if (type == null) - throw new ArgumentNullException ("type"); - - //this is inelegant, but works for now - if (type == typeof (Signature)) - return new Signature (DType.Signature); - - if (type == typeof (ObjectPath)) - return new Signature (DType.ObjectPath); - - if (type == typeof (void)) - return Signature.Empty; - - if (type == typeof (string)) - return new Signature (DType.String); - - if (type == typeof (object)) - return new Signature (DType.Variant); - - if (type.IsArray) - return GetSig (type.GetElementType ()).MakeArraySignature (); - - if (type.IsGenericType && (type.GetGenericTypeDefinition () == typeof (IDictionary<,>) || type.GetGenericTypeDefinition () == typeof (Dictionary<,>))) { - - Type[] genArgs = type.GetGenericArguments (); - return Signature.MakeDict (GetSig (genArgs[0]), GetSig (genArgs[1])); - } - - if (Mapper.IsPublic (type)) { - return new Signature (DType.ObjectPath); - } - - if (!type.IsPrimitive && !type.IsEnum) { - Signature sig = Signature.Empty; - - foreach (FieldInfo fi in type.GetFields (BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance)) - sig += GetSig (fi.FieldType); - - return Signature.MakeStruct (sig); - } - - DType dtype = Signature.TypeToDType (type); - return new Signature (dtype); - } - } - - enum ArgDirection - { - In, - Out, - } - - enum DType : byte - { - Invalid = (byte)'\0', - - Byte = (byte)'y', - Boolean = (byte)'b', - Int16 = (byte)'n', - UInt16 = (byte)'q', - Int32 = (byte)'i', - UInt32 = (byte)'u', - Int64 = (byte)'x', - UInt64 = (byte)'t', - Single = (byte)'f', //This is not yet supported! - Double = (byte)'d', - String = (byte)'s', - ObjectPath = (byte)'o', - Signature = (byte)'g', - - Array = (byte)'a', - [Obsolete ("Not in protocol")] - Struct = (byte)'r', - [Obsolete ("Not in protocol")] - DictEntry = (byte)'e', - Variant = (byte)'v', - - StructBegin = (byte)'(', - StructEnd = (byte)')', - DictEntryBegin = (byte)'{', - DictEntryEnd = (byte)'}', - } -} diff -Nru banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/NDesk.DBus/SocketTransport.cs banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/NDesk.DBus/SocketTransport.cs --- banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/NDesk.DBus/SocketTransport.cs 2010-08-13 10:57:03.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/NDesk.DBus/SocketTransport.cs 1970-01-01 00:00:00.000000000 +0000 @@ -1,70 +0,0 @@ -// Copyright 2006 Alp Toker -// This software is made available under the MIT License -// See COPYING for details - -using System; -using System.IO; -using System.Net; -using System.Net.Sockets; - -namespace NDesk.DBus.Transports -{ - class SocketTransport : Transport - { - internal Socket socket; - - public override void Open (AddressEntry entry) - { - string host, portStr, family; - int port; - - if (!entry.Properties.TryGetValue ("host", out host)) - host = "localhost"; - - if (!entry.Properties.TryGetValue ("port", out portStr)) - throw new Exception ("No port specified"); - - if (!Int32.TryParse (portStr, out port)) - throw new Exception ("Invalid port: \"" + port + "\""); - - if (!entry.Properties.TryGetValue ("family", out family)) - family = null; - - Open (host, port, family); - } - - public void Open (string host, int port, string family) - { - //TODO: use Socket directly - TcpClient client = new TcpClient (host, port); - /* - client.NoDelay = true; - client.ReceiveBufferSize = (int)Protocol.MaxMessageLength; - client.SendBufferSize = (int)Protocol.MaxMessageLength; - */ - this.socket = client.Client; - SocketHandle = (long)client.Client.Handle; - Stream = client.GetStream (); - } - - public void Open (Socket socket) - { - this.socket = socket; - - socket.Blocking = true; - SocketHandle = (long)socket.Handle; - //Stream = new UnixStream ((int)socket.Handle); - Stream = new NetworkStream (socket); - } - - public override void WriteCred () - { - Stream.WriteByte (0); - } - - public override string AuthString () - { - return String.Empty; - } - } -} diff -Nru banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/NDesk.DBus/Transport.cs banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/NDesk.DBus/Transport.cs --- banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/NDesk.DBus/Transport.cs 2010-08-13 10:57:03.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/NDesk.DBus/Transport.cs 1970-01-01 00:00:00.000000000 +0000 @@ -1,405 +0,0 @@ -// Copyright 2006 Alp Toker -// This software is made available under the MIT License -// See COPYING for details - -using System; -using System.Collections.Generic; -using System.IO; -using System.Threading; - -namespace NDesk.DBus.Transports -{ - abstract class Transport - { - public static Transport Create (AddressEntry entry) - { - switch (entry.Method) { - case "tcp": - { - Transport transport = new SocketTransport (); - transport.Open (entry); - return transport; - } -#if !PORTABLE - case "unix": - { - //Transport transport = new UnixMonoTransport (); - Transport transport = new UnixNativeTransport (); - transport.Open (entry); - return transport; - } -#endif -#if ENABLE_PIPES - case "win": { - Transport transport = new PipeTransport (); - transport.Open (entry); - return transport; - } -#endif - default: - throw new NotSupportedException ("Transport method \"" + entry.Method + "\" not supported"); - } - } - - protected Connection connection; - - public Connection Connection - { - get { - return connection; - } set { - connection = value; - } - } - - //TODO: design this properly - - //this is just a temporary solution - public Stream Stream; - public long SocketHandle; - public abstract void Open (AddressEntry entry); - public abstract string AuthString (); - public abstract void WriteCred (); - - public virtual bool TryGetPeerPid (out uint pid) - { - pid = 0; - return false; - } - /* - } - - abstract class StreamTransport : Transport - { - */ - Stream ns { - get { - return this.Stream; - } - } - - public virtual void Disconnect () - { - ns.Dispose (); - } - - internal Queue Inbound = new Queue (); - - public event EventHandler WakeUp; - protected void FireWakeUp () - { - if (WakeUp != null) - WakeUp (this, EventArgs.Empty); - } - - internal Message TryReadMessage () - { - GetData (); - if (Inbound.Count > 0) - return Inbound.Dequeue (); - return null; - } - - public void Iterate () - { - GetData (); - } - - internal Message ReadMessage () - { - // Hack to complete pending async reads in progress. - while (msgRdr != null) - GetData (); - - //return ReadMessageReal (); - try { - return ReadMessageReal (); - } catch (IOException e) { - if (Protocol.Verbose) - Console.Error.WriteLine (e.Message); - connection.isConnected = false; - return null; - } - } - - int Read (byte[] buffer, int offset, int count) - { - int read = 0; - //System.Net.Sockets.NetworkStream nns = ns as System.Net.Sockets.NetworkStream; - //SocketTransport st = this as SocketTransport; - while (read < count) { - // FIXME: Remove this hack to support non-blocking sockets on Windows - //if (st != null && st.socket.Blocking == false && nns != null && !nns.DataAvailable) { - /* - if (nns != null && !nns.DataAvailable) { - System.Threading.Thread.Sleep (10); - continue; - } - */ - int nread = ns.Read (buffer, offset + read, count - read); - if (nread == 0) - break; - read += nread; - } - - //if (read < count) - // throw new Exception (); - - if (read > count) - throw new Exception (); - - return read; - } - //protected MemoryStream mbuf = new MemoryStream (); - //byte[] mmbuf = new byte[Protocol.MaxMessageLength]; - byte[] mmbuf = null; - - int mmpos = 0; - int mmneeded = 16; - IEnumerator msgRdr; - //int nIters = 0; - public void GetData () - { - //nIters++; - //Console.WriteLine ("nIters: " + nIters); - if (msgRdr == null) { - msgRdr = ReadMessageReal2 (); - } - - /* - { - System.Net.Sockets.NetworkStream nns = ns as System.Net.Sockets.NetworkStream; - SocketTransport st = this as SocketTransport; - if (!nns.DataAvailable) - return null; - } - */ - - SocketTransport st = this as SocketTransport; - - //int nread = ns.Read (mmbuf, mmpos, 16); - - int avail = st.socket.Available; - if (mmneeded == 0) - throw new Exception (); - //if (avail < mmneeded) - // System.Threading.Thread.Sleep (10); - - if (avail == 0) - return; - - avail = Math.Min (avail, mmneeded); - int nread = st.socket.Receive (mmbuf, mmpos, avail, System.Net.Sockets.SocketFlags.None); - mmpos += nread; - mmneeded -= nread; - if (!msgRdr.MoveNext ()) - throw new Exception (); - - MsgState state = msgRdr.Current; - if (state != MsgState.Done) - return; - - mmpos = 0; - mmneeded = 16; - - msgRdr = null; - } - - enum MsgState - { - Wait16, - WaitHeader, - WaitBody, - Done, - } - - IEnumerator ReadMessageReal2 () - { - byte[] body = null; - mmneeded = 16; - while (mmpos < 16) - yield return MsgState.Wait16; - - EndianFlag endianness = (EndianFlag)mmbuf[0]; - MessageReader reader = new MessageReader (endianness, mmbuf); - - //discard the endian byte as we've already read it - reader.ReadByte (); - - //discard message type and flags, which we don't care about here - reader.ReadByte (); - reader.ReadByte (); - - byte version = reader.ReadByte (); - - if (version < Protocol.MinVersion || version > Protocol.MaxVersion) - throw new NotSupportedException ("Protocol version '" + version.ToString () + "' is not supported"); - - if (Protocol.Verbose) - if (version != Protocol.Version) - Console.Error.WriteLine ("Warning: Protocol version '" + version.ToString () + "' is not explicitly supported but may be compatible"); - - uint bodyLength = reader.ReadUInt32 (); - //discard serial - reader.ReadUInt32 (); - uint headerLength = reader.ReadUInt32 (); - - //this check may become relevant if a future version of the protocol allows larger messages - /* - if (bodyLength > Int32.MaxValue || headerLength > Int32.MaxValue) - throw new NotImplementedException ("Long messages are not yet supported"); - */ - - int bodyLen = (int)bodyLength; - int toRead = (int)headerLength; - - //we fixup to include the padding following the header - toRead = Protocol.Padded (toRead, 8); - - long msgLength = toRead + bodyLen; - if (msgLength > Protocol.MaxMessageLength) - throw new Exception ("Message length " + msgLength + " exceeds maximum allowed " + Protocol.MaxMessageLength + " bytes"); - - byte[] header = new byte[16 + toRead]; - Array.Copy (mmbuf, header, 16); - - mmneeded = toRead; - while (mmpos < 16 + toRead) - yield return MsgState.WaitHeader; - - Array.Copy (mmbuf, 16, header, 16, toRead); - - //if (read != toRead) - // throw new Exception ("Message header length mismatch: " + read + " of expected " + toRead); - - mmneeded = bodyLen; - while (mmpos < 16 + toRead + bodyLen) - yield return MsgState.WaitBody; - - //read the body - if (bodyLen != 0) { - body = new byte[bodyLen]; - - Array.Copy (mmbuf, 16 + toRead, body, 0, bodyLen); - - //if (read != bodyLen) - // throw new Exception ("Message body length mismatch: " + read + " of expected " + bodyLen); - } - - Message msg = new Message (); - msg.Connection = this.Connection; - msg.Body = body; - msg.SetHeaderData (header); - - Inbound.Enqueue (msg); - - mmneeded = 16; - - yield return MsgState.Done; - } - - Message ReadMessageReal () - { - byte[] header; - byte[] body = null; - - int read; - - //16 bytes is the size of the fixed part of the header - byte[] hbuf = new byte[16]; - read = Read (hbuf, 0, 16); - - if (read == 0) - return null; - - if (read != 16) - throw new Exception ("Header read length mismatch: " + read + " of expected " + "16"); - - EndianFlag endianness = (EndianFlag)hbuf[0]; - MessageReader reader = new MessageReader (endianness, hbuf); - - //discard the endian byte as we've already read it - reader.ReadByte (); - - //discard message type and flags, which we don't care about here - reader.ReadByte (); - reader.ReadByte (); - - byte version = reader.ReadByte (); - - if (version < Protocol.MinVersion || version > Protocol.MaxVersion) - throw new NotSupportedException ("Protocol version '" + version.ToString () + "' is not supported"); - - if (Protocol.Verbose) - if (version != Protocol.Version) - Console.Error.WriteLine ("Warning: Protocol version '" + version.ToString () + "' is not explicitly supported but may be compatible"); - - uint bodyLength = reader.ReadUInt32 (); - //discard serial - reader.ReadUInt32 (); - uint headerLength = reader.ReadUInt32 (); - - //this check may become relevant if a future version of the protocol allows larger messages - /* - if (bodyLength > Int32.MaxValue || headerLength > Int32.MaxValue) - throw new NotImplementedException ("Long messages are not yet supported"); - */ - - int bodyLen = (int)bodyLength; - int toRead = (int)headerLength; - - //we fixup to include the padding following the header - toRead = Protocol.Padded (toRead, 8); - - long msgLength = toRead + bodyLen; - if (msgLength > Protocol.MaxMessageLength) - throw new Exception ("Message length " + msgLength + " exceeds maximum allowed " + Protocol.MaxMessageLength + " bytes"); - - header = new byte[16 + toRead]; - Array.Copy (hbuf, header, 16); - - read = Read (header, 16, toRead); - - if (read != toRead) - throw new Exception ("Message header length mismatch: " + read + " of expected " + toRead); - - //read the body - if (bodyLen != 0) { - body = new byte[bodyLen]; - - read = Read (body, 0, bodyLen); - - if (read != bodyLen) - throw new Exception ("Message body length mismatch: " + read + " of expected " + bodyLen); - } - - Message msg = new Message (); - msg.Connection = this.Connection; - msg.Body = body; - msg.SetHeaderData (header); - - return msg; - } - - object writeLock = new object (); - internal virtual void WriteMessage (Message msg) - { - /* - byte[] HeaderData = msg.GetHeaderData (); - - long msgLength = HeaderData.Length + (msg.Body != null ? msg.Body.Length : 0); - if (msgLength > Protocol.MaxMessageLength) - throw new Exception ("Message length " + msgLength + " exceeds maximum allowed " + Protocol.MaxMessageLength + " bytes"); - */ - - lock (writeLock) { - //ns.Write (HeaderData, 0, HeaderData.Length); - msg.GetHeaderDataToStream (ns); - if (msg.Body != null && msg.Body.Length != 0) - ns.Write (msg.Body, 0, msg.Body.Length); - ns.Flush (); - } - - } - } -} diff -Nru banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/NDesk.DBus/TypeDefiner.cs banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/NDesk.DBus/TypeDefiner.cs --- banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/NDesk.DBus/TypeDefiner.cs 2010-08-13 10:57:03.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/NDesk.DBus/TypeDefiner.cs 1970-01-01 00:00:00.000000000 +0000 @@ -1,227 +0,0 @@ -// Copyright 2007 Alp Toker -// This software is made available under the MIT License -// See COPYING for details - -using System; -using System.Reflection; -using System.Reflection.Emit; -using System.Collections.Generic; - -using System.IO; -using System.Xml.Serialization; - -namespace NDesk.DBus -{ - using Introspection; - - //FIXME: debug hack - public delegate void VoidHandler (); - - public partial class Connection - { - //dynamically defines a Type for the proxy object using D-Bus introspection - public object GetObject (string bus_name, ObjectPath path) - { - org.freedesktop.DBus.Introspectable intros = GetObject (bus_name, path); - string data = intros.Introspect (); - - StringReader sr = new StringReader (data); - XmlSerializer sz = new XmlSerializer (typeof (Node)); - Node node = (Node)sz.Deserialize (sr); - - Type type = TypeDefiner.Define (node.Interfaces); - - return GetObject (type, bus_name, path); - } - - //FIXME: debug hack - ~Connection () - { - if (Protocol.Verbose) - TypeDefiner.Save (); - } - } - - static class TypeDefiner - { - static AssemblyBuilder asmBdef; - static ModuleBuilder modBdef; - - static void InitHack () - { - if (asmBdef != null) - return; - - asmBdef = AppDomain.CurrentDomain.DefineDynamicAssembly (new AssemblyName ("Defs"), AssemblyBuilderAccess.RunAndSave); - //asmBdef = System.Threading.Thread.GetDomain ().DefineDynamicAssembly (new AssemblyName ("DefAssembly"), AssemblyBuilderAccess.RunAndSave); - modBdef = asmBdef.DefineDynamicModule ("Defs.dll", "Defs.dll"); - } - - static uint ifaceId = 0; - public static Type Define (Interface[] ifaces) - { - InitHack (); - - //Provide a unique interface name - //This is a bit ugly - string ifaceName = "Aggregate" + (ifaceId++); - - TypeBuilder typeB = modBdef.DefineType (ifaceName, TypeAttributes.Public | TypeAttributes.Interface | TypeAttributes.Abstract); - foreach (Interface iface in ifaces) - typeB.AddInterfaceImplementation (Define (iface)); - - return typeB.CreateType (); - } - - static Type Define (Interface iface) - { - InitHack (); - - int lastDotPos = iface.Name.LastIndexOf ('.'); - string nsName = iface.Name.Substring (0, lastDotPos); - string ifaceName = iface.Name.Substring (lastDotPos+1); - - nsName = nsName.Replace ('.', Type.Delimiter); - - //using the full interface name is ok, but makes consuming the type from C# difficult since namespaces/Type names may overlap - TypeBuilder typeB = modBdef.DefineType (nsName + Type.Delimiter + "I" + ifaceName, TypeAttributes.Public | TypeAttributes.Interface | TypeAttributes.Abstract); - Define (typeB, iface); - - return typeB.CreateType (); - } - - public static void Save () - { - asmBdef.Save ("Defs.dll"); - } - - const MethodAttributes ifaceMethAttr = MethodAttributes.HideBySig | MethodAttributes.NewSlot | MethodAttributes.Public | MethodAttributes.Abstract | MethodAttributes.Virtual; - - public static Type DefineHandler (ModuleBuilder modB, NDesk.DBus.Introspection.Signal declSignal) - { - string dlgName = declSignal.Name + "Handler"; - TypeBuilder handlerB = modB.DefineType (dlgName, TypeAttributes.Public | TypeAttributes.Class | TypeAttributes.Sealed | TypeAttributes.AnsiClass | TypeAttributes.AutoClass, typeof (System.MulticastDelegate)); - const MethodAttributes mattr = MethodAttributes.Public | MethodAttributes.HideBySig | MethodAttributes.Virtual | MethodAttributes.NewSlot; - - ConstructorBuilder constructorBuilder = handlerB.DefineConstructor (MethodAttributes.RTSpecialName | MethodAttributes.HideBySig | MethodAttributes.Public, CallingConventions.Standard, new Type[] { typeof (object), typeof (System.IntPtr) }); - constructorBuilder.SetImplementationFlags (MethodImplAttributes.Runtime | MethodImplAttributes.Managed); - - //MethodBuilder invokeB = handlerB.DefineMethod ("Invoke", mattr, typeof (void), Type.EmptyTypes); - MethodBuilder invokeB = DefineSignal (handlerB, "Invoke", mattr, declSignal.Arguments, true); - - invokeB.SetImplementationFlags (MethodImplAttributes.Runtime | MethodImplAttributes.Managed); - return handlerB.CreateType (); - } - - public static MethodBuilder DefineSignal (TypeBuilder typeB, string name, MethodAttributes mattr, Argument[] args, bool isSignal) - { - // TODO: Share this method for both signals and methods. - - //MethodBuilder mb = tb.DefineMethod (name, mattr, typeof(void), Type.EmptyTypes); - - List parms = new List (); - - if (args != null) - foreach (Argument arg in args) { - //if (arg.Direction == Introspection.ArgDirection.@in) - parms.Add (new Signature (arg.Type).ToType ()); - //if (arg.Direction == Introspection.ArgDirection.@out) - // parms.Add (new Signature (arg.Type).ToType ().MakeByRefType ()); - } - - Type retType = typeof (void); - - /* - Signature outSig = Signature.Empty; - //this just takes the last out arg and uses is as the return type - if (declMethod.Arguments != null) - foreach (Argument arg in declMethod.Arguments) - if (arg.Direction == Introspection.ArgDirection.@out) - outSig = new Signature (arg.Type); - - Type retType = outSig == Signature.Empty ? typeof (void) : outSig.ToType (); - */ - MethodBuilder mb = typeB.DefineMethod (name, mattr, retType, parms.ToArray ()); - - //define the parameter attributes and names - if (args != null) { - int argNum = 0; - - foreach (Argument arg in args) { - //if (arg.Direction == Introspection.ArgDirection.@in) - mb.DefineParameter (++argNum, ParameterAttributes.In, arg.Name ?? ("arg" + argNum)); - //if (arg.Direction == Introspection.ArgDirection.@out) - // method_builder.DefineParameter (++argNum, ParameterAttributes.Out, arg.Name); - } - } - - return mb; - } - - public static MethodBuilder DefineMethod (TypeBuilder typeB, string name, MethodAttributes mattr, Argument[] args, bool isSignal) - { - // TODO: Share this method for both signals and methods. - - List parms = new List (); - - if (args != null) - for (int argNum = 0; argNum != args.Length; argNum++) { - Argument arg = args[argNum]; - Signature sig = new Signature (arg.Type); - Type argType = sig.ToType (); - if (arg.Direction == Introspection.ArgDirection.@out) - argType = argType.MakeByRefType (); - parms.Add (argType); - } - - MethodBuilder mb = typeB.DefineMethod (name, mattr, typeof (void), parms.ToArray ()); - - if (args != null) - for (int argNum = 0; argNum != args.Length; argNum++) { - Argument arg = args[argNum]; - - ParameterAttributes pattrs = (arg.Direction == Introspection.ArgDirection.@out) ? ParameterAttributes.Out : ParameterAttributes.In; - mb.DefineParameter (argNum + 1, pattrs, arg.Name ?? ("arg" + argNum)); - } - - return mb; - } - - public static void Define (TypeBuilder typeB, Interface iface) - { - foreach (Method declMethod in iface.Methods) - DefineMethod (typeB, declMethod.Name, ifaceMethAttr, declMethod.Arguments, false); - - if (iface.Properties != null) - foreach (NDesk.DBus.Introspection.Property prop in iface.Properties) { - Type propType = new Signature (prop.Type).ToType (); - - PropertyBuilder prop_builder = typeB.DefineProperty (prop.Name, PropertyAttributes.None, propType, Type.EmptyTypes); - - if (prop.Access == propertyAccess.read || prop.Access == propertyAccess.readwrite) - prop_builder.SetGetMethod (typeB.DefineMethod ("get_" + prop.Name, ifaceMethAttr | MethodAttributes.SpecialName, propType, Type.EmptyTypes)); - - if (prop.Access == propertyAccess.write || prop.Access == propertyAccess.readwrite) - prop_builder.SetSetMethod (typeB.DefineMethod ("set_" + prop.Name, ifaceMethAttr | MethodAttributes.SpecialName, null, new Type[] {propType})); - } - - if (iface.Signals != null) - foreach (NDesk.DBus.Introspection.Signal signal in iface.Signals) { - Type eventType = DefineHandler (modBdef, signal); - - EventBuilder event_builder = typeB.DefineEvent (signal.Name, EventAttributes.None, eventType); - - event_builder.SetAddOnMethod (typeB.DefineMethod ("add_" + signal.Name, ifaceMethAttr | MethodAttributes.SpecialName, null, new Type[] {eventType})); - - event_builder.SetRemoveOnMethod (typeB.DefineMethod ("remove_" + signal.Name, ifaceMethAttr | MethodAttributes.SpecialName, null, new Type[] {eventType})); - } - - //apply InterfaceAttribute - ConstructorInfo interfaceAttributeCtor = typeof (InterfaceAttribute).GetConstructor(new Type[] {typeof (string)}); - - CustomAttributeBuilder cab = new CustomAttributeBuilder (interfaceAttributeCtor, new object[] {iface.Name}); - - typeB.SetCustomAttribute (cab); - } - } -} diff -Nru banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/NDesk.DBus/TypeImplementer.cs banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/NDesk.DBus/TypeImplementer.cs --- banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/NDesk.DBus/TypeImplementer.cs 2010-08-13 10:57:03.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/NDesk.DBus/TypeImplementer.cs 1970-01-01 00:00:00.000000000 +0000 @@ -1,1154 +0,0 @@ -// Copyright 2007 Alp Toker -// This software is made available under the MIT License -// See COPYING for details - -using System; -using System.Reflection; -using System.Reflection.Emit; -using System.Collections.Generic; - -namespace NDesk.DBus -{ - class TypeImplementer - { - public static TypeImplementer Root = new TypeImplementer ("NDesk.DBus.Proxies", false); - AssemblyBuilder asmB; - ModuleBuilder modB; - //List cacheAs = new List (); - - public TypeImplementer (string name, bool canSave) - { - //asmB = AppDomain.CurrentDomain.DefineDynamicAssembly (new AssemblyName ("NDesk.DBus.Proxies"), AssemblyBuilderAccess.Run); - asmB = AppDomain.CurrentDomain.DefineDynamicAssembly (new AssemblyName ("NDesk.DBus.Proxies"), canSave ? AssemblyBuilderAccess.RunAndSave : AssemblyBuilderAccess.Run); - modB = asmB.DefineDynamicModule ("NDesk.DBus.Proxies"); - //modB = asmB.DefineDynamicModule ("NDesk.DBus.Proxies.dll", "NDesk.DBus.Proxies.dll"); - //Load ("NDesk.DBus.Proxies"); - } - - /* - public void Load (string fname) - { - try { - cacheAs.Add (AppDomain.CurrentDomain.Load (fname)); - } catch { - } - } - - public void Save () - { - string fname = "NDesk.DBus.Proxies.dll"; - System.IO.File.Delete (fname); - asmB.Save (fname); - } - */ - - Dictionary map = new Dictionary (); - - public Type GetImplementation (Type declType) - { - Type retT; - - if (map.TryGetValue (declType, out retT)) - return retT; - - string proxyName = declType.Name + "Proxy"; - - /* - foreach (Assembly cacheA in cacheAs) { - Type rt = cacheA.GetType (proxyName, false); - if (rt != null) { - Console.WriteLine ("HIT " + rt); - map[declType] = rt; - return rt; - } - } - */ - - Type parentType; - - if (declType.IsInterface) - parentType = typeof (BusObject); - else - parentType = declType; - - TypeBuilder typeB = modB.DefineType (proxyName, TypeAttributes.Class | TypeAttributes.Public, parentType); - - if (false && !declType.IsInterface) { - foreach (MethodInfo mi in declType.GetMethods (BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly)) { - MethodBody body = mi.GetMethodBody (); - Console.WriteLine(mi + ":"); - foreach (LocalVariableInfo lvar in body.LocalVariables) { - Console.WriteLine(lvar.LocalIndex + ": " + lvar.LocalType); - } - Console.WriteLine(); - - //DynamicMethod method_builder = new DynamicMethod ("Write" + t.Name, typeof (void), new Type[] {typeof (MessageWriter), t}, typeof (MessageWriter)); - //DynamicMethod dm = new DynamicMethod ("RepProx", typeof(void), new Type[] { typeof(object), typeof(int), typeof(string) }, typeof(object)); - //DynamicILInfo dil = dm.GetDynamicILInfo (); - //dil.SetCode(body.GetILAsByteArray (), body.MaxStackSize); - - //MethodBuilder mb = typeB.DefineMethod ("RepProx", MethodAttributes.Public | MethodAttributes.Static, typeof(void), new Type[] { typeof(object), typeof(int), typeof(string) }); - //MethodBuilder mb = typeB.DefineMethod ("RepProx", MethodAttributes.Public | MethodAttributes.Static, typeof(void), new Type[] { declType, typeof(int), typeof(string) }); - // - - //MethodAttributes attrs = mi.Attributes; - //^ MethodAttributes.Abstract; - //attrs ^= MethodAttributes.NewSlot; - //attrs |= MethodAttributes.Final; - - //MethodAttributes.Public - MethodAttributes attrs = MethodAttributes.Public | MethodAttributes.Static | MethodAttributes.HideBySig; - Console.WriteLine("cwl attrs: " + typeof(Console).GetMethod("WriteLine", new Type[] { typeof(string) }).Attributes); - //DynamicILInfo dil = mi.GetDynamicILInfo (); - - ParameterInfo[] parms = mi.GetParameters(); - //MethodBuilder mb = typeB.DefineMethod ("RepProx", attrs, typeof(void), new Type[] { typeof(int), typeof(string) }); - //MethodBuilder mb = typeB.DefineMethod ("RepProx", attrs, typeof(void), new Type[] { declType, typeof(int), typeof(string) }); - MethodBuilder mb = typeB.DefineMethod ("RepProx", attrs, typeof(void), new Type[] { typeof(object), typeof(int), typeof(string) }); - - mb.DefineParameter (0, ParameterAttributes.None, "self"); - for (int i = 0; i < parms.Length ; i++) { - Console.WriteLine("i={0} pos={1} {2} {3}", i, parms[i].Position, parms[i].Attributes, parms[i]); - mb.DefineParameter (parms[i].Position + 1, parms[i].Attributes, parms[i].Name); - } - - } - } - - - if (declType.IsInterface) - Implement (typeB, declType); - - foreach (Type iface in declType.GetInterfaces ()) - Implement (typeB, iface); - - retT = typeB.CreateType (); - map[declType] = retT; - - return retT; - } - - static void Implement (TypeBuilder typeB, Type iface) - { - typeB.AddInterfaceImplementation (iface); - - Dictionary builders = new Dictionary (); - - foreach (MethodInfo declMethod in iface.GetMethods ()) { - ParameterInfo[] parms = declMethod.GetParameters (); - - Type[] parmTypes = new Type[parms.Length]; - for (int i = 0 ; i < parms.Length ; i++) - parmTypes[i] = parms[i].ParameterType; - - MethodAttributes attrs = declMethod.Attributes ^ MethodAttributes.Abstract; - attrs ^= MethodAttributes.NewSlot; - attrs |= MethodAttributes.Final; - MethodBuilder method_builder = typeB.DefineMethod (declMethod.Name, attrs, declMethod.ReturnType, parmTypes); - typeB.DefineMethodOverride (method_builder, declMethod); - - //define in/out/ref/name for each of the parameters - for (int i = 0; i < parms.Length ; i++) - method_builder.DefineParameter (i + 1, parms[i].Attributes, parms[i].Name); - - //Console.WriteLine ("retType: " + declMethod.ReturnType); - ILGenerator ilg = method_builder.GetILGenerator (); - GenHookupMethod (ilg, declMethod, sendMethodCallMethod, Mapper.GetInterfaceName (iface), declMethod.Name); - - if (declMethod.IsSpecialName) - builders[declMethod.Name] = method_builder; - } - - foreach (EventInfo declEvent in iface.GetEvents ()) - { - EventBuilder event_builder = typeB.DefineEvent (declEvent.Name, declEvent.Attributes, declEvent.EventHandlerType); - event_builder.SetAddOnMethod (builders["add_" + declEvent.Name]); - event_builder.SetRemoveOnMethod (builders["remove_" + declEvent.Name]); - } - - foreach (PropertyInfo declProp in iface.GetProperties ()) - { - List indexers = new List (); - foreach (ParameterInfo pi in declProp.GetIndexParameters ()) - indexers.Add (pi.ParameterType); - - PropertyBuilder prop_builder = typeB.DefineProperty (declProp.Name, declProp.Attributes, declProp.PropertyType, indexers.ToArray ()); - MethodBuilder mb; - if (builders.TryGetValue ("get_" + declProp.Name, out mb)) - prop_builder.SetGetMethod (mb); - if (builders.TryGetValue ("set_" + declProp.Name, out mb)) - prop_builder.SetSetMethod (mb); - } - } - - static MethodInfo sendMethodCallMethod = typeof (BusObject).GetMethod ("SendMethodCall"); - static MethodInfo sendSignalMethod = typeof (BusObject).GetMethod ("SendSignal"); - static MethodInfo toggleSignalMethod = typeof (BusObject).GetMethod ("ToggleSignal"); - - static Dictionary hookup_methods = new Dictionary (); - public static DynamicMethod GetHookupMethod (EventInfo ei) - { - DynamicMethod hookupMethod; - if (hookup_methods.TryGetValue (ei, out hookupMethod)) - return hookupMethod; - - if (ei.EventHandlerType.IsAssignableFrom (typeof (System.EventHandler))) - Console.Error.WriteLine ("Warning: Cannot yet fully expose EventHandler and its subclasses: " + ei.EventHandlerType); - - MethodInfo declMethod = ei.EventHandlerType.GetMethod ("Invoke"); - - hookupMethod = GetHookupMethod (declMethod, sendSignalMethod, Mapper.GetInterfaceName (ei), ei.Name); - - hookup_methods[ei] = hookupMethod; - - return hookupMethod; - } - - public static DynamicMethod GetHookupMethod (MethodInfo declMethod, MethodInfo invokeMethod, string @interface, string member) - { - ParameterInfo[] delegateParms = declMethod.GetParameters (); - Type[] hookupParms = new Type[delegateParms.Length+1]; - hookupParms[0] = typeof (BusObject); - for (int i = 0; i < delegateParms.Length ; i++) - hookupParms[i+1] = delegateParms[i].ParameterType; - - DynamicMethod hookupMethod = new DynamicMethod ("Handle" + member, declMethod.ReturnType, hookupParms, typeof (MessageWriter)); - - ILGenerator ilg = hookupMethod.GetILGenerator (); - - GenHookupMethod (ilg, declMethod, invokeMethod, @interface, member); - - return hookupMethod; - } - - //static MethodInfo getMethodFromHandleMethod = typeof (MethodBase).GetMethod ("GetMethodFromHandle", new Type[] {typeof (RuntimeMethodHandle)}); - static MethodInfo getTypeFromHandleMethod = typeof (Type).GetMethod ("GetTypeFromHandle", new Type[] {typeof (RuntimeTypeHandle)}); - static ConstructorInfo argumentNullExceptionConstructor = typeof (ArgumentNullException).GetConstructor (new Type[] {typeof (string)}); - static ConstructorInfo messageWriterConstructor = typeof (MessageWriter).GetConstructor (Type.EmptyTypes); - static MethodInfo messageWriterWriteMethod = typeof (MessageWriter).GetMethod ("WriteComplex", new Type[] {typeof (object), typeof (Type)}); - static MethodInfo messageWriterWritePad = typeof (MessageWriter).GetMethod ("WritePad", new Type[] {typeof (int)}); - static MethodInfo messageReaderReadPad = typeof (MessageReader).GetMethod ("ReadPad", new Type[] {typeof (int)}); - - static Dictionary writeMethods = new Dictionary (); - - public static MethodInfo GetWriteMethod (Type t) - { - MethodInfo meth; - - if (writeMethods.TryGetValue (t, out meth)) - return meth; - - /* - Type tUnder = t; - if (t.IsEnum) - tUnder = Enum.GetUnderlyingType (t); - - meth = typeof (MessageWriter).GetMethod ("Write", BindingFlags.ExactBinding | BindingFlags.Instance | BindingFlags.Public, null, new Type[] {tUnder}, null); - if (meth != null) { - writeMethods[t] = meth; - return meth; - } - */ - - DynamicMethod method_builder = new DynamicMethod ("Write" + t.Name, typeof (void), new Type[] {typeof (MessageWriter), t}, typeof (MessageWriter), true); - - ILGenerator ilg = method_builder.GetILGenerator (); - - ilg.Emit (OpCodes.Ldarg_0); - ilg.Emit (OpCodes.Ldarg_1); - - GenWriter (ilg, t); - - ilg.Emit (OpCodes.Ret); - - meth = method_builder; - - writeMethods[t] = meth; - return meth; - } - - static Dictionary typeWriters = new Dictionary (); - public static TypeWriter GetTypeWriter () - { - Type t = typeof (T); - - object value; - if (typeWriters.TryGetValue (t, out value)) - return (TypeWriter)value; - - MethodInfo mi = GetWriteMethod (t); - DynamicMethod dm = mi as DynamicMethod; - if (dm == null) - return null; - - TypeWriter tWriter = dm.CreateDelegate (typeof (TypeWriter)) as TypeWriter; - typeWriters[t] = tWriter; - return tWriter; - } - - //takes the Writer instance and the value of Type t off the stack, writes it - public static void GenWriter (ILGenerator ilg, Type t) - { - Type tUnder = t; - //bool imprecise = false; - - if (t.IsEnum) { - tUnder = Enum.GetUnderlyingType (t); - //imprecise = true; - } - - Type type = t; - - //MethodInfo exactWriteMethod = typeof (MessageWriter).GetMethod ("Write", new Type[] {tUnder}); - MethodInfo exactWriteMethod = typeof (MessageWriter).GetMethod ("Write", BindingFlags.ExactBinding | BindingFlags.Instance | BindingFlags.Public, null, new Type[] {tUnder}, null); - //ExactBinding InvokeMethod - - if (exactWriteMethod != null) { - //if (imprecise) - // ilg.Emit (OpCodes.Castclass, tUnder); - - ilg.Emit (exactWriteMethod.IsFinal ? OpCodes.Call : OpCodes.Callvirt, exactWriteMethod); - } else if (t.IsArray) { - MethodInfo mi = typeof (MessageWriter).GetMethod ("WriteArray"); - exactWriteMethod = mi.MakeGenericMethod (type.GetElementType ()); - ilg.Emit (exactWriteMethod.IsFinal ? OpCodes.Call : OpCodes.Callvirt, exactWriteMethod); - } else if (type.IsGenericType && (type.GetGenericTypeDefinition () == typeof (IDictionary<,>) || type.GetGenericTypeDefinition () == typeof (Dictionary<,>))) { - Type[] genArgs = type.GetGenericArguments (); - MethodInfo mi = typeof (MessageWriter).GetMethod ("WriteFromDict"); - exactWriteMethod = mi.MakeGenericMethod (genArgs); - ilg.Emit (exactWriteMethod.IsFinal ? OpCodes.Call : OpCodes.Callvirt, exactWriteMethod); - } else if (false) { - //..boxed if necessary - if (t.IsValueType) - ilg.Emit (OpCodes.Box, t); - - //the Type parameter - ilg.Emit (OpCodes.Ldtoken, t); - ilg.Emit (OpCodes.Call, getTypeFromHandleMethod); - - ilg.Emit (messageWriterWriteMethod.IsFinal ? OpCodes.Call : OpCodes.Callvirt, messageWriterWriteMethod); - } else { - GenStructWriter (ilg, t); - } - } - - public static IEnumerable GetMarshalFields (Type type) - { - // FIXME: Field order! - return type.GetFields (BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance); - } - - /* - public static void GetBlittableSegments (IEnumerable fields) - { - int totalSize = 0; - //List - //foreach (FieldInfo fi in GetMarshalFields (type)) - foreach (FieldInfo fi in fields) { - Type t = fi.FieldType; - Signature sig = Signature.GetSig (t); - int fixedSize = totalSize; - if (sig.GetFixedSize (ref fixedSize)) { - totalSize = fixedSize; - continue; - } - - //ilg.Emit (OpCodes.Ldflda, fiStart); - } - } - */ - - //takes a writer and a reference to an object off the stack - public static void GenStructWriter (ILGenerator ilg, Type type) - { - LocalBuilder val = ilg.DeclareLocal (type); - ilg.Emit (OpCodes.Stloc, val); - - LocalBuilder writer = ilg.DeclareLocal (typeof (MessageWriter)); - ilg.Emit (OpCodes.Stloc, writer); - - //align to 8 for structs - ilg.Emit (OpCodes.Ldloc, writer); - ilg.Emit (OpCodes.Ldc_I4, 8); - ilg.Emit (OpCodes.Call, messageWriterWritePad); - - foreach (FieldInfo fi in GetMarshalFields (type)) { - Type t = fi.FieldType; - - // null checking of fields - if (!t.IsValueType) { - Label notNull = ilg.DefineLabel (); - - //if the value is null... - //ilg.Emit (OpCodes.Ldarg, i); - ilg.Emit (OpCodes.Ldloc, val); - ilg.Emit (OpCodes.Ldfld, fi); - - ilg.Emit (OpCodes.Brtrue_S, notNull); - - //...throw Exception - string paramName = fi.Name; - ilg.Emit (OpCodes.Ldstr, paramName); - // TODO: Should not really be argumentNullException - ilg.Emit (OpCodes.Newobj, argumentNullExceptionConstructor); - ilg.Emit (OpCodes.Throw); - - //was not null, so all is well - ilg.MarkLabel (notNull); - } - - //the Writer to write to - ilg.Emit (OpCodes.Ldloc, writer); - - //the object to read from - ilg.Emit (OpCodes.Ldloc, val); - ilg.Emit (OpCodes.Ldfld, fi); - - GenWriter (ilg, t); - } - } - - //takes a reader and a reference to an object off the stack - public static void GenStructReader (ILGenerator ilg, Type type) - { - /* - int fixedSize = 0; - if (Signature.GetSig (type).GetFixedSize (ref fixedSize)) { - Console.Error.WriteLine ("Type " + type + " is blittable."); - } - */ - - // FIXME: Newobj fails if type has no default ctor! - - //Console.WriteLine ("GenStructReader " + type); - LocalBuilder val = ilg.DeclareLocal (type); - ConstructorInfo ctor = type.GetConstructor (Type.EmptyTypes); - //ConstructorInfo ctor = type.TypeInitializer; - //Console.WriteLine ("ctor: " + ctor); - //if (ctor != null) - ilg.Emit (OpCodes.Newobj, ctor); - //ilg.Emit (OpCodes.Ldloca, type); - //ilg.Emit (OpCodes.Initobj, type); - //if (!type.IsValueType) - ilg.Emit (OpCodes.Stloc, val); - - LocalBuilder reader = ilg.DeclareLocal (typeof (MessageReader)); - ilg.Emit (OpCodes.Stloc, reader); - - //align to 8 for structs - ilg.Emit (OpCodes.Ldloc, reader); - ilg.Emit (OpCodes.Ldc_I4, 8); - ilg.Emit (OpCodes.Call, messageReaderReadPad); - - foreach (FieldInfo fi in GetMarshalFields (type)) { - Type t = fi.FieldType; - - //the object to read into - ilg.Emit (OpCodes.Ldloc, val); - - //the Reader to read from - ilg.Emit (OpCodes.Ldloc, reader); - - GenReader (ilg, t); - - ilg.Emit (OpCodes.Stfld, fi); - } - - ilg.Emit (OpCodes.Ldloc, val); - //if (type.IsValueType) - // ilg.Emit (OpCodes.Box, type); - } - - static MethodInfo getBusObject = typeof(BusObject).GetMethod("GetBusObject"); - - public static void GenHookupMethod (ILGenerator ilg, MethodInfo declMethod, MethodInfo invokeMethod, string @interface, string member) - { - ParameterInfo[] parms = declMethod.GetParameters (); - Type retType = declMethod.ReturnType; - - //the BusObject instance - ilg.Emit (OpCodes.Ldarg_0); - - ilg.Emit (OpCodes.Call, getBusObject); - - //MethodInfo - /* - ilg.Emit (OpCodes.Ldtoken, declMethod); - ilg.Emit (OpCodes.Call, getMethodFromHandleMethod); - */ - - //interface - ilg.Emit (OpCodes.Ldstr, @interface); - - //special case event add/remove methods - if (declMethod.IsSpecialName && (declMethod.Name.StartsWith ("add_") || declMethod.Name.StartsWith ("remove_"))) { - string[] parts = declMethod.Name.Split (new char[]{'_'}, 2); - string ename = parts[1]; - //Delegate dlg = (Delegate)inArgs[0]; - bool adding = parts[0] == "add"; - - ilg.Emit (OpCodes.Ldstr, ename); - - ilg.Emit (OpCodes.Ldarg_1); - - ilg.Emit (OpCodes.Ldc_I4, adding ? 1 : 0); - - ilg.Emit (OpCodes.Tailcall); - ilg.Emit (toggleSignalMethod.IsFinal ? OpCodes.Call : OpCodes.Callvirt, toggleSignalMethod); - ilg.Emit (OpCodes.Ret); - return; - } - - //property accessor mapping - if (declMethod.IsSpecialName) { - if (member.StartsWith ("get_")) - member = "Get" + member.Substring (4); - else if (member.StartsWith ("set_")) - member = "Set" + member.Substring (4); - } - - //member - ilg.Emit (OpCodes.Ldstr, member); - - //signature - Signature inSig = Signature.Empty; - Signature outSig = Signature.Empty; - SigsForMethod (declMethod, out inSig, out outSig); - - ilg.Emit (OpCodes.Ldstr, inSig.Value); - - LocalBuilder writer = ilg.DeclareLocal (typeof (MessageWriter)); - ilg.Emit (OpCodes.Newobj, messageWriterConstructor); - ilg.Emit (OpCodes.Stloc, writer); - - foreach (ParameterInfo parm in parms) - { - if (parm.IsOut) - continue; - - Type t = parm.ParameterType; - //offset by one to account for "this" - int i = parm.Position + 1; - - //null checking of parameters (but not their recursive contents) - if (!t.IsValueType) { - Label notNull = ilg.DefineLabel (); - - //if the value is null... - ilg.Emit (OpCodes.Ldarg, i); - ilg.Emit (OpCodes.Brtrue_S, notNull); - - //...throw Exception - string paramName = parm.Name; - ilg.Emit (OpCodes.Ldstr, paramName); - ilg.Emit (OpCodes.Newobj, argumentNullExceptionConstructor); - ilg.Emit (OpCodes.Throw); - - //was not null, so all is well - ilg.MarkLabel (notNull); - } - - ilg.Emit (OpCodes.Ldloc, writer); - - //the parameter - ilg.Emit (OpCodes.Ldarg, i); - - GenWriter (ilg, t); - } - - ilg.Emit (OpCodes.Ldloc, writer); - - //the expected return Type - ilg.Emit (OpCodes.Ldtoken, retType); - ilg.Emit (OpCodes.Call, getTypeFromHandleMethod); - - LocalBuilder exc = ilg.DeclareLocal (typeof (Exception)); - ilg.Emit (OpCodes.Ldloca_S, exc); - - //make the call - ilg.Emit (invokeMethod.IsFinal ? OpCodes.Call : OpCodes.Callvirt, invokeMethod); - - //define a label we'll use to deal with a non-null Exception - Label noErr = ilg.DefineLabel (); - - //if the out Exception is not null... - ilg.Emit (OpCodes.Ldloc, exc); - ilg.Emit (OpCodes.Brfalse_S, noErr); - - //...throw it. - ilg.Emit (OpCodes.Ldloc, exc); - ilg.Emit (OpCodes.Throw); - - //Exception was null, so all is well - ilg.MarkLabel (noErr); - - if (invokeMethod.ReturnType == typeof (MessageReader)) { - /* - Label notNull = ilg.DefineLabel (); - //if the value is null... - ilg.Emit (OpCodes.Ldarg, i); - ilg.Emit (OpCodes.Brtrue_S, notNull); - //was not null, so all is well - ilg.MarkLabel (notNull); - */ - - LocalBuilder reader = ilg.DeclareLocal (typeof (MessageReader)); - ilg.Emit (OpCodes.Stloc, reader); - - foreach (ParameterInfo parm in parms) - { - //t.IsByRef - if (!parm.IsOut) - continue; - - Type t = parm.ParameterType.GetElementType (); - //offset by one to account for "this" - int i = parm.Position + 1; - - ilg.Emit (OpCodes.Ldarg, i); - ilg.Emit (OpCodes.Ldloc, reader); - GenReader (ilg, t); - ilg.Emit (OpCodes.Stobj, t); - } - - if (retType != typeof (void)) { - ilg.Emit (OpCodes.Ldloc, reader); - GenReader (ilg, retType); - } - - ilg.Emit (OpCodes.Ret); - return; - } - - if (retType == typeof (void)) { - //we aren't expecting a return value, so throw away the (hopefully) null return - if (invokeMethod.ReturnType != typeof (void)) - ilg.Emit (OpCodes.Pop); - } else { - if (retType.IsValueType) - ilg.Emit (OpCodes.Unbox_Any, retType); - else - ilg.Emit (OpCodes.Castclass, retType); - } - - ilg.Emit (OpCodes.Ret); - } - - - public static bool SigsForMethod (MethodInfo mi, out Signature inSig, out Signature outSig) - { - inSig = Signature.Empty; - outSig = Signature.Empty; - - foreach (ParameterInfo parm in mi.GetParameters ()) { - if (parm.IsOut) - outSig += Signature.GetSig (parm.ParameterType.GetElementType ()); - else - inSig += Signature.GetSig (parm.ParameterType); - } - - outSig += Signature.GetSig (mi.ReturnType); - - return true; - } - - static Dictionary readMethods = new Dictionary (); - static void InitReaders () - { - foreach (MethodInfo mi in typeof (MessageReader).GetMethods (BindingFlags.Instance | BindingFlags.Public)) { - if (!mi.Name.StartsWith ("Read")) - continue; - if (mi.ReturnType == typeof (void)) - continue; - if (mi.GetParameters ().Length != 0) - continue; - //Console.WriteLine ("Adding reader " + mi); - readMethods[mi.ReturnType] = mi; - } - } - - internal static MethodInfo GetReadMethod (Type t) - { - if (readMethods.Count == 0) - InitReaders (); - - MethodInfo mi; - if (readMethods.TryGetValue (t, out mi)) - return mi; - - /* - Type tIn = t; - if (t.IsValueType) - */ - - /* - DynamicMethod meth = new DynamicMethod ("Read" + t.Name, t, new Type[] {typeof (MessageReader)}, true); - - ILGenerator ilg = meth.GetILGenerator (); - ilg.Emit (OpCodes.Ldarg_0); - ilg.Emit (OpCodes.Ldarg_1); - - //GenStructReader (ilg, t); - GenReader (ilg, t); - - ilg.Emit (OpCodes.Ret); - - writeMethods[t] = meth; - return meth; - */ - return null; - } - - internal static MethodCaller2 GenCaller2 (MethodInfo target) - { - DynamicMethod hookupMethod = GenReadMethod (target); - MethodCaller2 caller = hookupMethod.CreateDelegate (typeof (MethodCaller2)) as MethodCaller2; - return caller; - } - - internal static MethodCaller GenCaller (MethodInfo target, object targetInstance) - { - DynamicMethod hookupMethod = GenReadMethod (target); - MethodCaller caller = hookupMethod.CreateDelegate (typeof (MethodCaller), targetInstance) as MethodCaller; - return caller; - } - - internal static DynamicMethod GenReadMethod (MethodInfo target) - { - //Type[] parms = new Type[] { typeof (object), typeof (MessageReader), typeof (Message) }; - Type[] parms = new Type[] { typeof (object), typeof (MessageReader), typeof (Message), typeof (MessageWriter) }; - DynamicMethod hookupMethod = new DynamicMethod ("Caller", typeof (void), parms, typeof (MessageReader)); - Gen (hookupMethod, target); - return hookupMethod; - } - - static void Gen (DynamicMethod hookupMethod, MethodInfo declMethod) - { - //Console.Error.WriteLine ("Target: " + declMethod); - ILGenerator ilg = hookupMethod.GetILGenerator (); - - ParameterInfo[] parms = declMethod.GetParameters (); - Type retType = declMethod.ReturnType; - - //if (retType != typeof (void)) - // throw new Exception ("Bad retType " + retType); - - // The target instance - ilg.Emit (OpCodes.Ldarg_0); - - Dictionary locals = new Dictionary (); - - foreach (ParameterInfo parm in parms) { - /* - if (parm.IsOut) - continue; - */ - - Type parmType = parm.ParameterType; - - if (parm.IsOut) { - LocalBuilder parmLocal = ilg.DeclareLocal (parmType.GetElementType ()); - locals[parm] = parmLocal; - ilg.Emit (OpCodes.Ldloca, parmLocal); - continue; - } - - /* - MethodInfo exactMethod = GetReadMethod (parmType); - // The MessageReader instance - ilg.Emit (OpCodes.Ldarg_1); - ilg.Emit (exactMethod.IsFinal ? OpCodes.Call : OpCodes.Callvirt, exactMethod); - */ - - ilg.Emit (OpCodes.Ldarg_1); - GenReader (ilg, parmType); - } - - //ilg.Emit (OpCodes.Ldc_I4, 8); - ilg.Emit (declMethod.IsFinal ? OpCodes.Call : OpCodes.Callvirt, declMethod); - - foreach (ParameterInfo parm in parms) { - if (!parm.IsOut) - continue; - - Type parmType = parm.ParameterType.GetElementType (); - - LocalBuilder parmLocal = locals[parm]; - ilg.Emit (OpCodes.Ldarg_3); // writer - ilg.Emit (OpCodes.Ldloc, parmLocal); - GenWriter (ilg, parmType); - } - - if (retType != typeof (void)) { - // Skip reply message construction if MessageWriter is null - /* - Label needsReply = ilg.DefineLabel (); - ilg.Emit (OpCodes.Ldarg_3); // writer - ilg.Emit (OpCodes.Brtrue_S, needsReply); - ilg.Emit (OpCodes.Pop); - //ilg.Emit (OpCodes.Brfalse_S, endLabel); - */ - - //Console.WriteLine ("retType: " + retType); - LocalBuilder retLocal = ilg.DeclareLocal (retType); - ilg.Emit (OpCodes.Stloc, retLocal); - - /* - LocalBuilder writer = ilg.DeclareLocal (typeof (MessageWriter)); - ilg.Emit (OpCodes.Newobj, messageWriterConstructor); - ilg.Emit (OpCodes.Stloc, writer); - */ - - ilg.Emit (OpCodes.Ldarg_3); // writer - //ilg.Emit (OpCodes.Ldloc, writer); - ilg.Emit (OpCodes.Ldloc, retLocal); - GenWriter (ilg, retType); - - //ilg.Emit (OpCodes.Ldloc, writer); - //ilg.MarkLabel (endLabel); - } - - ilg.Emit (OpCodes.Ret); - } - - // System.MethodAccessException: Method `ManagedDBusTestExport:
m__0 (string,object,double,MyTuple)' is inaccessible from method `(wrapper dynamic-method) object:Caller (object,NDesk.DBus.MessageReader,NDesk.DBus.Message,NDesk.DBus.MessageWriter)' - - //takes the Reader instance off the stack, puts value of type t on the stack - public static void GenReader (ILGenerator ilg, Type t) - { - // TODO: Cache generated methods - // TODO: Generate methods with the correct module/type permissions - - Type tUnder = t; - //bool imprecise = false; - - if (t.IsEnum) { - tUnder = Enum.GetUnderlyingType (t); - //imprecise = true; - } - - MethodInfo exactMethod = GetReadMethod (tUnder); - if (exactMethod != null) - ilg.Emit (exactMethod.IsFinal ? OpCodes.Call : OpCodes.Callvirt, exactMethod); - else if (t.IsArray) - GenReadCollection (ilg, t); - else if (t.IsGenericType && (t.GetGenericTypeDefinition () == typeof (IList<>))) - GenReadCollection (ilg, t); - else if (t.IsGenericType && (t.GetGenericTypeDefinition () == typeof (IDictionary<,>) || t.GetGenericTypeDefinition () == typeof (Dictionary<,>))) - GenReadCollection (ilg, t); - else if (t.IsInterface) - GenFallbackReader (ilg, tUnder); - else if (!tUnder.IsValueType) { - //Console.Error.WriteLine ("Gen struct reader for " + t); - //ilg.Emit (OpCodes.Newobj, messageWriterConstructor); - //if (tUnder.IsValueType) - // throw new Exception ("Can't handle value types yet"); - GenStructReader (ilg, tUnder); - } else - GenFallbackReader (ilg, tUnder); - - /* - //if (t.IsValueType) - // ilg.Emit (OpCodes.Unbox_Any, t); - //else - ilg.Emit (OpCodes.Castclass, t); - */ - } - - public static void GenFallbackReader (ILGenerator ilg, Type t) - { - // TODO: do we want non-tUnder here for Castclass use? - if (Protocol.Verbose) - Console.Error.WriteLine ("Bad! Generating fallback reader for " + t); - - MethodInfo exactMethod; - exactMethod = typeof (MessageReader).GetMethod ("ReadValue", new Type[] { typeof (System.Type) }); - - // The Type parameter - ilg.Emit (OpCodes.Ldtoken, t); - ilg.Emit (OpCodes.Call, getTypeFromHandleMethod); - - ilg.Emit (exactMethod.IsFinal ? OpCodes.Call : OpCodes.Callvirt, exactMethod); - - if (t.IsValueType) - ilg.Emit (OpCodes.Unbox_Any, t); - else - ilg.Emit (OpCodes.Castclass, t); - } - - public static void GenReadArrayFixed (ILGenerator ilg, Type t, int knownElemSize) - { - //Console.Error.WriteLine ("GenReadArrayFixed " + t); - LocalBuilder readerLocal = ilg.DeclareLocal (typeof (MessageReader)); - ilg.Emit (OpCodes.Stloc, readerLocal); - - Type tElem = t.GetElementType (); - Signature sigElem = Signature.GetSig (tElem); - int alignElem = sigElem.Alignment; - int knownElemSizePadded = Protocol.Padded (knownElemSize, sigElem.Alignment); - Type tUnder = tElem.IsEnum ? Enum.GetUnderlyingType (tElem) : tElem; - int managedElemSize = System.Runtime.InteropServices.Marshal.SizeOf (tUnder); - - /* - Console.WriteLine ("managedElemSize: " + managedElemSize); - Console.WriteLine ("elemSize: " + knownElemSize); - Console.WriteLine ("elemSizePadded: " + knownElemSizePadded); - */ - - // Read the array's byte length - ilg.Emit (OpCodes.Ldloc, readerLocal); - MethodInfo exactMethod = GetReadMethod (typeof (uint)); - ilg.Emit (exactMethod.IsFinal ? OpCodes.Call : OpCodes.Callvirt, exactMethod); - LocalBuilder sizeLocal = ilg.DeclareLocal (typeof (uint)); - ilg.Emit (OpCodes.Stloc, sizeLocal); - - /* - // Take the array's byte length - ilg.Emit (OpCodes.Ldloc, sizeLocal); - // Divide by the known element size - //ilg.Emit (OpCodes.Ldc_I4, knownElemSizePadded); - ilg.Emit (OpCodes.Ldc_I4, knownElemSize); - ilg.Emit (OpCodes.Div_Un); - */ - - // Create a new array of the correct element length - ilg.Emit (OpCodes.Ldloc, sizeLocal); - if (knownElemSizePadded > 1) { - ilg.Emit (OpCodes.Ldc_I4, alignElem); - MethodInfo paddedMethod = typeof (Protocol).GetMethod ("Padded"); - ilg.Emit (OpCodes.Call, paddedMethod); - // Divide by the known element size - ilg.Emit (OpCodes.Ldc_I4, knownElemSizePadded); - ilg.Emit (OpCodes.Div_Un); - } - ilg.Emit (OpCodes.Newarr, tElem); - LocalBuilder aryLocal = ilg.DeclareLocal (t); - ilg.Emit (OpCodes.Stloc, aryLocal); - - Label nonBlitLabel = ilg.DefineLabel (); - Label endLabel = ilg.DefineLabel (); - - // Skip read or blit for zero-length arrays. - ilg.Emit (OpCodes.Ldloc, sizeLocal); - ilg.Emit (OpCodes.Brfalse, endLabel); - - // WARNING: This may skew pos when we later increment it! - if (alignElem > 4) { - // Align to element if alignment requirement is higher than 4 (since we just read a uint) - ilg.Emit (OpCodes.Ldloc, readerLocal); - ilg.Emit (OpCodes.Ldc_I4, alignElem); - ilg.Emit (OpCodes.Call, messageReaderReadPad); - } - - // Blit where possible - - // shouldBlit: Blit if endian is native - // mustBlit: Blit regardless of endian (ie. byte or structs containing only bytes) - - bool shouldBlit = tElem.IsValueType && knownElemSizePadded == managedElemSize && !sigElem.IsStruct; - //bool shouldBlit = tElem.IsValueType && knownElemSizePadded == managedElemSize; - - // bool and char are not reliably blittable, so we don't allow blitting in these cases. - // Their exact layout varies between runtimes, platforms and even data types. - shouldBlit &= tElem != typeof (bool) && tElem != typeof (char); - - bool mustBlit = shouldBlit && knownElemSizePadded == 1; - - if (shouldBlit) { - //Console.Error.WriteLine ("Blit read array " + tElem); - - if (!mustBlit) { - // Check to see if we can blit the data structures - FieldInfo nativeEndianField = typeof (MessageReader).GetField ("IsNativeEndian"); - ilg.Emit (OpCodes.Ldloc, readerLocal); - ilg.Emit (OpCodes.Ldfld, nativeEndianField); - ilg.Emit (OpCodes.Brfalse_S, nonBlitLabel); - } - - // Get the destination address - ilg.Emit (OpCodes.Ldloc, aryLocal); - ilg.Emit (OpCodes.Ldc_I4_0); - ilg.Emit (OpCodes.Ldelema, tElem); - - // Get the source address - FieldInfo dataField = typeof (MessageReader).GetField ("data"); - FieldInfo posField = typeof (MessageReader).GetField ("pos"); - ilg.Emit (OpCodes.Ldloc, readerLocal); - ilg.Emit (OpCodes.Ldfld, dataField); - { - ilg.Emit (OpCodes.Ldloc, readerLocal); - ilg.Emit (OpCodes.Ldfld, posField); - } - ilg.Emit (OpCodes.Ldelema, typeof (byte)); - - // The number of bytes to copy - ilg.Emit (OpCodes.Ldloc, sizeLocal); - - // Blit the array - ilg.Emit (OpCodes.Cpblk); - - // pos += bytesRead - ilg.Emit (OpCodes.Ldloc, readerLocal); - ilg.Emit (OpCodes.Ldloc, readerLocal); - ilg.Emit (OpCodes.Ldfld, posField); - ilg.Emit (OpCodes.Ldloc, sizeLocal); - ilg.Emit (OpCodes.Add); - ilg.Emit (OpCodes.Stfld, posField); - - ilg.Emit (OpCodes.Br, endLabel); - } - - if (!mustBlit) { - ilg.MarkLabel (nonBlitLabel); - - // for (int i = 0 ; i < ary.Length ; i++) - LocalBuilder indexLocal = ilg.DeclareLocal (typeof (int)); - ilg.Emit (OpCodes.Ldc_I4_0); - ilg.Emit (OpCodes.Stloc, indexLocal); - - Label loopStartLabel = ilg.DefineLabel (); - Label loopEndLabel = ilg.DefineLabel (); - - ilg.Emit (OpCodes.Br, loopEndLabel); - - ilg.MarkLabel (loopStartLabel); - - { - // Read and store an element to the array - ilg.Emit (OpCodes.Ldloc, aryLocal); - ilg.Emit (OpCodes.Ldloc, indexLocal); - - ilg.Emit (OpCodes.Ldloc, readerLocal); - GenReader (ilg, tElem); - - ilg.Emit (OpCodes.Stelem, tElem); - } - - // i++ - ilg.Emit (OpCodes.Ldloc, indexLocal); - ilg.Emit (OpCodes.Ldc_I4_1); - ilg.Emit (OpCodes.Add); - ilg.Emit (OpCodes.Stloc, indexLocal); - - ilg.MarkLabel (loopEndLabel); - ilg.Emit (OpCodes.Ldloc, indexLocal); - ilg.Emit (OpCodes.Ldloc, aryLocal); - ilg.Emit (OpCodes.Ldlen); - ilg.Emit (OpCodes.Blt, loopStartLabel); - } - - ilg.MarkLabel (endLabel); - - // Return the new array - ilg.Emit (OpCodes.Ldloc, aryLocal); - } - - public static void GenReadCollection (ILGenerator ilg, Type type) - { - //Console.WriteLine ("GenReadCollection " + type); - //Console.WriteLine ("Sig: " + Signature.GetSig (type)); - int fixedSize = 0; - if (type.IsArray && Signature.GetSig (type.GetElementType ()).GetFixedSize (ref fixedSize)) { - GenReadArrayFixed (ilg, type, fixedSize); - return; - } - - LocalBuilder readerLocal = ilg.DeclareLocal (typeof (MessageReader)); - ilg.Emit (OpCodes.Stloc, readerLocal); - - //Type[] genArgs = type.GetGenericArguments (); - Type[] genArgs = type.IsArray ? new Type[] { type.GetElementType () } : type.GetGenericArguments (); - //Type[] genArgs = new Type[] { type.GetElementType () }; - //Type tElem = genArgs[0]; - - //Type collType = Mapper.GetGenericType (typeof (List<>), genArgs); - Type collType = Mapper.GetGenericType (genArgs.Length == 2 ? typeof (Dictionary<,>) : typeof (List<>), genArgs); - - ConstructorInfo ctor = collType.GetConstructor (Type.EmptyTypes); - ilg.Emit (OpCodes.Newobj, ctor); - - LocalBuilder collLocal = ilg.DeclareLocal (collType); - ilg.Emit (OpCodes.Stloc, collLocal); - - //MethodInfo addMethod = dictType.GetMethod ("Add", new Type[] { tKey, tValue }); - MethodInfo addMethod = collType.GetMethod ("Add", genArgs); - - - // Read the array's byte length - MethodInfo readUInt32Method = GetReadMethod (typeof (uint)); - ilg.Emit (OpCodes.Ldloc, readerLocal); - ilg.Emit (readUInt32Method.IsFinal ? OpCodes.Call : OpCodes.Callvirt, readUInt32Method); - - { - // Align to 8 for structs - ilg.Emit (OpCodes.Ldloc, readerLocal); - //ilg.Emit (OpCodes.Ldc_I4, 8); - // TODO: This padding logic is sketchy - ilg.Emit (OpCodes.Ldc_I4, genArgs.Length > 1 ? 8 : Signature.GetSig (genArgs[0]).Alignment); - ilg.Emit (OpCodes.Call, messageReaderReadPad); - } - - // Similar to the fixed array loop code - - FieldInfo posField = typeof (MessageReader).GetField ("pos"); - LocalBuilder endPosLocal = ilg.DeclareLocal (typeof (int)); - ilg.Emit (OpCodes.Ldloc, readerLocal); - ilg.Emit (OpCodes.Ldfld, posField); - - // Add the current position and byte length to determine endPos - // TODO: Consider padding? - ilg.Emit (OpCodes.Add); - ilg.Emit (OpCodes.Stloc, endPosLocal); - - { - Label loopStartLabel = ilg.DefineLabel (); - Label loopEndLabel = ilg.DefineLabel (); - - ilg.Emit (OpCodes.Br, loopEndLabel); - - ilg.MarkLabel (loopStartLabel); - - { - if (genArgs.Length > 1) { - // Align to 8 for structs - ilg.Emit (OpCodes.Ldloc, readerLocal); - ilg.Emit (OpCodes.Ldc_I4, 8); - ilg.Emit (OpCodes.Call, messageReaderReadPad); - } - - // Read and store an element to the array - ilg.Emit (OpCodes.Ldloc, collLocal); - - foreach (Type genArg in genArgs) { - ilg.Emit (OpCodes.Ldloc, readerLocal); - GenReader (ilg, genArg); - } - - ilg.Emit (OpCodes.Call, addMethod); - } - - ilg.MarkLabel (loopEndLabel); - - //ilg.Emit (OpCodes.Ldloc, indexLocal); - ilg.Emit (OpCodes.Ldloc, readerLocal); - ilg.Emit (OpCodes.Ldfld, posField); - - ilg.Emit (OpCodes.Ldloc, endPosLocal); - ilg.Emit (OpCodes.Blt, loopStartLabel); - } - - // Return the new collection - ilg.Emit (OpCodes.Ldloc, collLocal); - - if (type.IsArray) { - MethodInfo toArrayMethod = collType.GetMethod ("ToArray", Type.EmptyTypes); - ilg.Emit (OpCodes.Call, toArrayMethod); - } - } - } - - internal delegate void TypeWriter (MessageWriter writer, T value); - - internal delegate void MethodCaller (MessageReader rdr, Message msg, MessageWriter ret); - internal delegate void MethodCaller2 (object instance, MessageReader rdr, Message msg, MessageWriter ret); -} diff -Nru banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/NDesk.DBus/Unix.cs banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/NDesk.DBus/Unix.cs --- banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/NDesk.DBus/Unix.cs 2010-08-13 10:57:03.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/NDesk.DBus/Unix.cs 1970-01-01 00:00:00.000000000 +0000 @@ -1,484 +0,0 @@ -// Copyright 2008 Alp Toker -// This software is made available under the MIT License -// See COPYING for details - -using System; -using System.IO; -using System.Runtime.InteropServices; - -namespace NDesk.Unix -{ - // size_t - using SizeT = System.UIntPtr; - // ssize_t - using SSizeT = System.IntPtr; - // socklen_t: assumed to be 4 bytes - // uid_t: assumed to be 4 bytes - - sealed class UnixStream : Stream //, IDisposable - { - public readonly UnixSocket usock; - - public UnixStream (int fd) - { - this.usock = new UnixSocket (fd); - } - - public UnixStream (UnixSocket usock) - { - this.usock = usock; - } - - public override bool CanRead - { - get { - return true; - } - } - - public override bool CanSeek - { - get { - return false; - } - } - - public override bool CanWrite - { - get { - return true; - } - } - - public override long Length - { - get { - throw new NotImplementedException ("Seeking is not implemented"); - } - } - - public override long Position - { - get { - throw new NotImplementedException ("Seeking is not implemented"); - } set { - throw new NotImplementedException ("Seeking is not implemented"); - } - } - - public override long Seek (long offset, SeekOrigin origin) - { - throw new NotImplementedException ("Seeking is not implemented"); - } - - public override void SetLength (long value) - { - throw new NotImplementedException ("Not implemented"); - } - - public override void Flush () - { - } - - public override int Read ([In, Out] byte[] buffer, int offset, int count) - { - return usock.Read (buffer, offset, count); - } - - public override void Write (byte[] buffer, int offset, int count) - { - usock.Write (buffer, offset, count); - } - - unsafe public override int ReadByte () - { - byte value; - usock.Read (&value, 1); - return value; - } - - unsafe public override void WriteByte (byte value) - { - usock.Write (&value, 1); - } - } - - static class UnixUid - { - internal const string LIBC = "libc"; - - [DllImport (LIBC, CallingConvention=CallingConvention.Cdecl, SetLastError=false)] - static extern uint getuid (); - - [DllImport (LIBC, CallingConvention=CallingConvention.Cdecl, SetLastError=false)] - static extern uint geteuid (); - - public static long GetUID () - { - long uid = getuid (); - return uid; - } - - public static long GetEUID () - { - long euid = geteuid (); - return euid; - } - } - - static class UnixError - { - internal const string LIBC = "libc"; - - [DllImport (LIBC, CallingConvention=CallingConvention.Cdecl, SetLastError=false)] - static extern IntPtr strerror (int errnum); - - static string GetErrorString (int errnum) - { - IntPtr strPtr = strerror (errnum); - - if (strPtr == IntPtr.Zero) - return "Unknown Unix error"; - - return Marshal.PtrToStringAnsi (strPtr); - } - - // FIXME: Don't hard-code this. - const int EINTR = 4; - - public static bool ShouldRetry - { - get { - int errno = System.Runtime.InteropServices.Marshal.GetLastWin32Error (); - return errno == EINTR; - } - } - - public static Exception GetLastUnixException () - { - int errno = System.Runtime.InteropServices.Marshal.GetLastWin32Error (); - return new Exception (String.Format ("Error {0}: {1}", errno, GetErrorString (errno))); - } - } - - //[StructLayout(LayoutKind.Sequential, Pack=1)] - unsafe struct IOVector - { - public IOVector (IntPtr bbase, int length) - { - this.Base = (void*)bbase; - this.length = (SizeT)length; - } - - //public IntPtr Base; - public void* Base; - - public SizeT length; - public int Length - { - get { - return (int)length; - } set { - length = (SizeT)value; - } - } - } - - /* - unsafe class SockAddr - { - byte[] data; - } - */ - - unsafe class UnixSocket - { - internal const string LIBC = "libc"; - - // Solaris provides socket functionality in libsocket rather than libc. - // We use a dllmap in the .config to deal with this. - internal const string LIBSOCKET = "libsocket"; - - public const short AF_UNIX = 1; - // FIXME: SOCK_STREAM is 2 on Solaris - public const short SOCK_STREAM = 1; - - [DllImport (LIBC, CallingConvention = CallingConvention.Cdecl, SetLastError = true)] - internal static extern IntPtr fork (); - - [DllImport (LIBC, CallingConvention = CallingConvention.Cdecl, SetLastError = true)] - internal static extern int dup2 (int fd, int fd2); - - [DllImport (LIBC, CallingConvention = CallingConvention.Cdecl, SetLastError = true)] - internal static extern int open ([MarshalAs(UnmanagedType.LPStr)] string path, int oflag); - - [DllImport (LIBC, CallingConvention = CallingConvention.Cdecl, SetLastError = true)] - internal static extern IntPtr setsid (); - - - [DllImport (LIBC, CallingConvention=CallingConvention.Cdecl, SetLastError=true)] - internal static extern int close (int fd); - - [DllImport (LIBSOCKET, CallingConvention=CallingConvention.Cdecl, SetLastError=true)] - protected static extern int socket (int domain, int type, int protocol); - - [DllImport (LIBSOCKET, CallingConvention=CallingConvention.Cdecl, SetLastError=true)] - protected static extern int connect (int sockfd, byte[] serv_addr, uint addrlen); - - [DllImport (LIBSOCKET, CallingConvention=CallingConvention.Cdecl, SetLastError=true)] - protected static extern int bind (int sockfd, byte[] my_addr, uint addrlen); - - [DllImport (LIBSOCKET, CallingConvention=CallingConvention.Cdecl, SetLastError=true)] - protected static extern int listen (int sockfd, int backlog); - - //TODO: this prototype is probably wrong, fix it - [DllImport (LIBSOCKET, CallingConvention=CallingConvention.Cdecl, SetLastError=true)] - protected static extern int accept (int sockfd, void* addr, ref uint addrlen); - - //TODO: confirm and make use of these functions - [DllImport (LIBSOCKET, CallingConvention=CallingConvention.Cdecl, SetLastError=true)] - protected static extern int getsockopt (int s, int optname, IntPtr optval, ref uint optlen); - - [DllImport (LIBSOCKET, CallingConvention=CallingConvention.Cdecl, SetLastError=true)] - protected static extern int setsockopt (int s, int optname, IntPtr optval, uint optlen); - - [DllImport (LIBC, CallingConvention=CallingConvention.Cdecl, SetLastError=true)] - unsafe static extern SSizeT read (int fd, byte* buf, SizeT count); - - [DllImport (LIBC, CallingConvention=CallingConvention.Cdecl, SetLastError=true)] - unsafe static extern SSizeT write (int fd, byte* buf, SizeT count); - - [DllImport (LIBC, CallingConvention=CallingConvention.Cdecl, SetLastError=true)] - unsafe static extern SSizeT readv (int fd, IOVector* iov, int iovcnt); - - [DllImport (LIBC, CallingConvention=CallingConvention.Cdecl, SetLastError=true)] - unsafe static extern SSizeT writev (int fd, IOVector* iov, int iovcnt); - - // Linux - //[DllImport (LIBC, CallingConvention=CallingConvention.Cdecl, SetLastError=true)] - //static extern int vmsplice (int fd, IOVector* iov, uint nr_segs, uint flags); - - [DllImport (LIBSOCKET, CallingConvention=CallingConvention.Cdecl, SetLastError=true)] - public static extern SSizeT recvmsg (int s, void* msg, int flags); - - [DllImport (LIBSOCKET, CallingConvention=CallingConvention.Cdecl, SetLastError=true)] - public static extern SSizeT sendmsg (int s, void* msg, int flags); - - public int Handle; - bool ownsHandle = false; - - public UnixSocket (int handle) : this (handle, false) - { - } - - public UnixSocket (int handle, bool ownsHandle) - { - this.Handle = handle; - this.ownsHandle = ownsHandle; - // TODO: SafeHandle? - } - - public UnixSocket () - { - //TODO: don't hard-code PF_UNIX and SOCK_STREAM or SocketType.Stream - //AddressFamily family, SocketType type, ProtocolType proto - - int r = socket (AF_UNIX, SOCK_STREAM, 0); - if (r < 0) - throw UnixError.GetLastUnixException (); - - Handle = r; - ownsHandle = true; - } - - ~UnixSocket () - { - if (ownsHandle && Handle > 0) - Close (); - } - - protected bool connected = false; - - //TODO: consider memory management - public void Close () - { - int r = 0; - - do { - r = close (Handle); - } while (r < 0 && UnixError.ShouldRetry); - - if (r < 0) - throw UnixError.GetLastUnixException (); - - Handle = -1; - connected = false; - } - - //TODO: consider memory management - public void Connect (byte[] remote_end) - { - int r = 0; - - do { - r = connect (Handle, remote_end, (uint)remote_end.Length); - } while (r < 0 && UnixError.ShouldRetry); - - if (r < 0) - throw UnixError.GetLastUnixException (); - - connected = true; - } - - //assigns a name to the socket - public void Bind (byte[] local_end) - { - int r = bind (Handle, local_end, (uint)local_end.Length); - if (r < 0) - throw UnixError.GetLastUnixException (); - } - - public void Listen (int backlog) - { - int r = listen (Handle, backlog); - if (r < 0) - throw UnixError.GetLastUnixException (); - } - - public UnixSocket Accept () - { - byte[] addr = new byte[110]; - uint addrlen = (uint)addr.Length; - - fixed (byte* addrP = addr) { - int r = 0; - - do { - r = accept (Handle, addrP, ref addrlen); - } while (r < 0 && UnixError.ShouldRetry); - - if (r < 0) - throw UnixError.GetLastUnixException (); - - //TODO: use the returned addr - //string str = Encoding.Default.GetString (addr, 0, (int)addrlen); - return new UnixSocket (r, true); - } - } - - unsafe public int Read (byte[] buf, int offset, int count) - { - fixed (byte* bufP = buf) - return Read (bufP + offset, count); - } - - public int Write (byte[] buf, int offset, int count) - { - fixed (byte* bufP = buf) - return Write (bufP + offset, count); - } - - unsafe public int Read (byte* bufP, int count) - { - int r = 0; - - do { - r = (int)read (Handle, bufP, (SizeT)count); - } while (r < 0 && UnixError.ShouldRetry); - - if (r < 0) - throw UnixError.GetLastUnixException (); - - return r; - } - - public int Write (byte* bufP, int count) - { - int r = 0; - - do { - r = (int)write (Handle, bufP, (SizeT)count); - } while (r < 0 && UnixError.ShouldRetry); - - if (r < 0) - throw UnixError.GetLastUnixException (); - - return r; - } - - public int RecvMsg (void* bufP, int flags) - { - int r = 0; - - do { - r = (int)recvmsg (Handle, bufP, flags); - } while (r < 0 && UnixError.ShouldRetry); - - if (r < 0) - throw UnixError.GetLastUnixException (); - - return r; - } - - public int SendMsg (void* bufP, int flags) - { - int r = 0; - - do { - r = (int)sendmsg (Handle, bufP, flags); - } while (r < 0 && UnixError.ShouldRetry); - - if (r < 0) - throw UnixError.GetLastUnixException (); - - return r; - } - - public int ReadV (IOVector* iov, int count) - { - //FIXME: Handle EINTR here or elsewhere - //FIXME: handle r != count - //TODO: check offset correctness - - int r = (int)readv (Handle, iov, count); - if (r < 0) - throw UnixError.GetLastUnixException (); - - return r; - } - - public int WriteV (IOVector* iov, int count) - { - //FIXME: Handle EINTR here or elsewhere - //FIXME: handle r != count - //TODO: check offset correctness - - int r = (int)writev (Handle, iov, count); - if (r < 0) - throw UnixError.GetLastUnixException (); - - return r; - } - - public int Write (IOVector[] iov, int offset, int count) - { - //FIXME: Handle EINTR here or elsewhere - //FIXME: handle r != count - //TODO: check offset correctness - - fixed (IOVector* bufP = &iov[offset]) { - int r = (int)writev (Handle, bufP + offset, count); - if (r < 0) - throw UnixError.GetLastUnixException (); - - return r; - } - } - - public int Write (IOVector[] iov) - { - return Write (iov, 0, iov.Length); - } - - } -} diff -Nru banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/NDesk.DBus/UnixMonoTransport.cs banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/NDesk.DBus/UnixMonoTransport.cs --- banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/NDesk.DBus/UnixMonoTransport.cs 2010-08-13 10:57:03.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/NDesk.DBus/UnixMonoTransport.cs 1970-01-01 00:00:00.000000000 +0000 @@ -1,66 +0,0 @@ -// Copyright 2006 Alp Toker -// This software is made available under the MIT License -// See COPYING for details - -using System; -using System.IO; -using System.Net; -using System.Net.Sockets; - -using Mono.Unix; -using Mono.Unix.Native; - -namespace NDesk.DBus.Transports -{ - class UnixMonoTransport : UnixTransport - { - protected Socket socket; - - public override void Open (string path, bool @abstract) - { - if (@abstract) - socket = OpenAbstractUnix (path); - else - socket = OpenUnix (path); - - socket.Blocking = true; - SocketHandle = (long)socket.Handle; - //Stream = new UnixStream ((int)socket.Handle); - Stream = new NetworkStream (socket); - } - - //send peer credentials null byte. note that this might not be portable - //there are also selinux, BSD etc. considerations - public override void WriteCred () - { - Stream.WriteByte (0); - } - - public override string AuthString () - { - long uid = UnixUserInfo.GetRealUserId (); - - return uid.ToString (); - } - - protected Socket OpenAbstractUnix (string path) - { - AbstractUnixEndPoint ep = new AbstractUnixEndPoint (path); - - Socket client = new Socket (AddressFamily.Unix, SocketType.Stream, 0); - client.Connect (ep); - - return client; - } - - public Socket OpenUnix (string path) - { - UnixEndPoint remoteEndPoint = new UnixEndPoint (path); - - Socket client = new Socket (AddressFamily.Unix, SocketType.Stream, 0); - client.Connect (remoteEndPoint); - - return client; - } - } -} diff -Nru banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/NDesk.DBus/UnixNativeTransport.cs banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/NDesk.DBus/UnixNativeTransport.cs --- banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/NDesk.DBus/UnixNativeTransport.cs 2010-08-13 10:57:03.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/NDesk.DBus/UnixNativeTransport.cs 1970-01-01 00:00:00.000000000 +0000 @@ -1,192 +0,0 @@ -// Copyright 2006 Alp Toker -// This software is made available under the MIT License -// See COPYING for details - -//We send BSD-style credentials on all platforms -//Doesn't seem to break Linux (but is redundant there) -//This may turn out to be a bad idea -#define HAVE_CMSGCRED - -using System; -using System.IO; -using System.Text; -using System.Runtime.InteropServices; -using NDesk.Unix; - -namespace NDesk.DBus.Transports -{ - class UnixNativeTransport : UnixTransport - { - //protected UnixSocket socket; - internal UnixSocket socket; - - public override string AuthString () - { - long uid = UnixUid.GetEUID (); - return uid.ToString (); - } - - public override void Open (string path, bool @abstract) - { - if (String.IsNullOrEmpty (path)) - throw new ArgumentException ("path"); - - if (@abstract) - socket = OpenAbstractUnix (path); - else - socket = OpenUnix (path); - - //socket.Blocking = true; - SocketHandle = (long)socket.Handle; - //Stream = new UnixStream ((int)socket.Handle); - Stream = new UnixStream (socket); - } - - //send peer credentials null byte - //different platforms do this in different ways -#if HAVE_CMSGCRED - unsafe void WriteBsdCred () - { - //null credentials byte - byte buf = 0; - - IOVector iov = new IOVector (); - //iov.Base = (IntPtr)(&buf); - iov.Base = &buf; - iov.Length = 1; - - msghdr msg = new msghdr (); - msg.msg_iov = &iov; - msg.msg_iovlen = 1; - - cmsg cm = new cmsg (); - msg.msg_control = (IntPtr)(&cm); - msg.msg_controllen = (uint)sizeof (cmsg); - cm.hdr.cmsg_len = (uint)sizeof (cmsg); - cm.hdr.cmsg_level = 0xffff; //SOL_SOCKET - cm.hdr.cmsg_type = 0x03; //SCM_CREDS - - int written = socket.SendMsg (&msg, 0); - if (written != 1) - throw new Exception ("Failed to write credentials"); - } -#endif - - public override void WriteCred () - { -#if HAVE_CMSGCRED - try { - WriteBsdCred (); - return; - } catch { - if (Protocol.Verbose) - Console.Error.WriteLine ("Warning: WriteBsdCred() failed; falling back to ordinary WriteCred()"); - } -#endif - //null credentials byte - byte buf = 0; - Stream.WriteByte (buf); - } - - public static byte[] GetSockAddr (string path) - { - byte[] p = Encoding.Default.GetBytes (path); - - byte[] sa = new byte[2 + p.Length + 1]; - - //we use BitConverter to stay endian-safe - byte[] afData = BitConverter.GetBytes (UnixSocket.AF_UNIX); - sa[0] = afData[0]; - sa[1] = afData[1]; - - for (int i = 0 ; i != p.Length ; i++) - sa[2 + i] = p[i]; - sa[2 + p.Length] = 0; //null suffix for domain socket addresses, see unix(7) - - return sa; - } - - public static byte[] GetSockAddrAbstract (string path) - { - byte[] p = Encoding.Default.GetBytes (path); - - byte[] sa = new byte[2 + 1 + p.Length]; - - //we use BitConverter to stay endian-safe - byte[] afData = BitConverter.GetBytes (UnixSocket.AF_UNIX); - sa[0] = afData[0]; - sa[1] = afData[1]; - - sa[2] = 0; //null prefix for abstract domain socket addresses, see unix(7) - for (int i = 0 ; i != p.Length ; i++) - sa[3 + i] = p[i]; - - return sa; - } - - internal UnixSocket OpenUnix (string path) - { - byte[] sa = GetSockAddr (path); - UnixSocket client = new UnixSocket (); - client.Connect (sa); - return client; - } - - internal UnixSocket OpenAbstractUnix (string path) - { - byte[] sa = GetSockAddrAbstract (path); - UnixSocket client = new UnixSocket (); - client.Connect (sa); - return client; - } - } - -#if HAVE_CMSGCRED - /* - public struct msg - { - public IntPtr msg_next; - public long msg_type; - public ushort msg_ts; - short msg_spot; - IntPtr label; - } - */ - - unsafe struct msghdr - { - public IntPtr msg_name; //optional address - public uint msg_namelen; //size of address - public IOVector *msg_iov; //scatter/gather array - public int msg_iovlen; //# elements in msg_iov - public IntPtr msg_control; //ancillary data, see below - public uint msg_controllen; //ancillary data buffer len - public int msg_flags; //flags on received message - } - - struct cmsghdr - { - public uint cmsg_len; //data byte count, including header - public int cmsg_level; //originating protocol - public int cmsg_type; //protocol-specific type - } - - unsafe struct cmsgcred - { - const int CMGROUP_MAX = 16; - - public int cmcred_pid; //PID of sending process - public uint cmcred_uid; //real UID of sending process - public uint cmcred_euid; //effective UID of sending process - public uint cmcred_gid; //real GID of sending process - public short cmcred_ngroups; //number or groups - public fixed uint cmcred_groups[CMGROUP_MAX]; //groups - } - - struct cmsg - { - public cmsghdr hdr; - public cmsgcred cred; - } -#endif -} diff -Nru banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/NDesk.DBus/UnixTransport.cs banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/NDesk.DBus/UnixTransport.cs --- banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/NDesk.DBus/UnixTransport.cs 2010-08-13 10:57:03.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/NDesk.DBus/UnixTransport.cs 1970-01-01 00:00:00.000000000 +0000 @@ -1,29 +0,0 @@ -// Copyright 2006 Alp Toker -// This software is made available under the MIT License -// See COPYING for details - -using System; -using System.IO; - -namespace NDesk.DBus.Transports -{ - abstract class UnixTransport : Transport - { - public override void Open (AddressEntry entry) - { - string path; - bool abstr; - - if (entry.Properties.TryGetValue ("path", out path)) - abstr = false; - else if (entry.Properties.TryGetValue ("abstract", out path)) - abstr = true; - else - throw new Exception ("No path specified for UNIX transport"); - - Open (path, abstr); - } - - public abstract void Open (string path, bool @abstract); - } -} diff -Nru banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/NDesk.DBus/Wrapper.cs banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/NDesk.DBus/Wrapper.cs --- banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/NDesk.DBus/Wrapper.cs 2010-08-13 10:57:03.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/NDesk.DBus/Wrapper.cs 1970-01-01 00:00:00.000000000 +0000 @@ -1,158 +0,0 @@ -// Copyright 2006 Alp Toker -// This software is made available under the MIT License -// See COPYING for details - -using System; -using System.Collections.Generic; -using System.IO; - -namespace NDesk.DBus -{ - //TODO: complete and use these wrapper classes - //not sure exactly what I'm thinking but there seems to be sense here - - //FIXME: signature sending/receiving is currently ambiguous in this code - //FIXME: in fact, these classes are totally broken and end up doing no-op, do not use without understanding the problem - class MethodCall - { - public Message message = new Message (); - - public MethodCall (ObjectPath path, string @interface, string member, string destination, Signature signature) - { - message.Header.MessageType = MessageType.MethodCall; - message.ReplyExpected = true; - message.Header[FieldCode.Path] = path; - message.Header[FieldCode.Interface] = @interface; - message.Header[FieldCode.Member] = member; - message.Header[FieldCode.Destination] = destination; - //TODO: consider setting Sender here for p2p situations - //this will allow us to remove the p2p hacks in MethodCall and Message -#if PROTO_REPLY_SIGNATURE - //TODO -#endif - message.Signature = signature; - } - - public MethodCall (Message message) - { - this.message = message; - Path = (ObjectPath)message.Header[FieldCode.Path]; - Interface = (string)message.Header[FieldCode.Interface]; - Member = (string)message.Header[FieldCode.Member]; - Destination = (string)message.Header[FieldCode.Destination]; - //TODO: filled by the bus so reliable, but not the case for p2p - //so we make it optional here, but this needs some more thought - //if (message.Header.Fields.ContainsKey (FieldCode.Sender)) - Sender = (string)message.Header[FieldCode.Sender]; -#if PROTO_REPLY_SIGNATURE - //TODO: note that an empty ReplySignature should really be treated differently to the field not existing! - if (message.Header.Fields.ContainsKey (FieldCode.ReplySignature)) - ReplySignature = (Signature)message.Header[FieldCode.ReplySignature]; - else - ReplySignature = Signature.Empty; -#endif - Signature = message.Signature; - } - - public ObjectPath Path; - public string Interface; - public string Member; - public string Destination; - public string Sender; -#if PROTO_REPLY_SIGNATURE - public Signature ReplySignature; -#endif - public Signature Signature; - - public Error CreateError (string errorName, string errorMessage) - { - Error error = new Error (errorName, message.Header.Serial); - error.message.Signature = Signature.StringSig; - - MessageWriter writer = new MessageWriter (message.Header.Endianness); - //writer.connection = conn; - writer.Write (errorMessage); - error.message.Body = writer.ToArray (); - - //if (method_call.Sender != null) - // replyMsg.Header[FieldCode.Destination] = method_call.Sender; - - return error; - } - } - - class MethodReturn - { - public Message message = new Message (); - - public MethodReturn (uint reply_serial) - { - message.Header.MessageType = MessageType.MethodReturn; - message.Header.Flags = HeaderFlag.NoReplyExpected | HeaderFlag.NoAutoStart; - message.Header[FieldCode.ReplySerial] = reply_serial; - //signature optional? - //message.Header[FieldCode.Signature] = signature; - } - - public MethodReturn (Message message) - { - this.message = message; - ReplySerial = (uint)message.Header[FieldCode.ReplySerial]; - } - - public uint ReplySerial; - } - - class Error - { - public Message message = new Message (); - - public Error (string error_name, uint reply_serial) - { - message.Header.MessageType = MessageType.Error; - message.Header.Flags = HeaderFlag.NoReplyExpected | HeaderFlag.NoAutoStart; - message.Header[FieldCode.ErrorName] = error_name; - message.Header[FieldCode.ReplySerial] = reply_serial; - } - - public Error (Message message) - { - this.message = message; - ErrorName = (string)message.Header[FieldCode.ErrorName]; - ReplySerial = (uint)message.Header[FieldCode.ReplySerial]; - //Signature = (Signature)message.Header[FieldCode.Signature]; - } - - public string ErrorName; - public uint ReplySerial; - //public Signature Signature; - } - - class Signal - { - public Message message = new Message (); - - public Signal (ObjectPath path, string @interface, string member) - { - message.Header.MessageType = MessageType.Signal; - message.Header.Flags = HeaderFlag.NoReplyExpected | HeaderFlag.NoAutoStart; - message.Header[FieldCode.Path] = path; - message.Header[FieldCode.Interface] = @interface; - message.Header[FieldCode.Member] = member; - } - - public Signal (Message message) - { - this.message = message; - Path = (ObjectPath)message.Header[FieldCode.Path]; - Interface = (string)message.Header[FieldCode.Interface]; - Member = (string)message.Header[FieldCode.Member]; - Sender = (string)message.Header[FieldCode.Sender]; - } - - public ObjectPath Path; - public string Interface; - public string Member; - public string Sender; - } -} diff -Nru banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/Telepathy/MissionControl.cs banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/Telepathy/MissionControl.cs --- banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/Telepathy/MissionControl.cs 2010-08-13 20:05:55.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/Telepathy/MissionControl.cs 2011-05-27 16:50:35.000000000 +0000 @@ -23,7 +23,7 @@ using System; using System.Collections.Generic; -using NDesk.DBus; +using DBus; namespace Telepathy.MissionControl { diff -Nru banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/Telepathy/Telepathy.cs banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/Telepathy/Telepathy.cs --- banshee-community-extensions-2.0.1/src/Telepathy/Banshee.Telepathy/Telepathy/Telepathy.cs 2010-08-13 20:05:55.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Telepathy/Banshee.Telepathy/Telepathy/Telepathy.cs 2011-05-27 16:50:35.000000000 +0000 @@ -24,7 +24,7 @@ using System; using System.Collections.Generic; -using NDesk.DBus; +using DBus; namespace Telepathy { diff -Nru banshee-community-extensions-2.0.1/src/Telepathy/Makefile.in banshee-community-extensions-2.2.0/src/Telepathy/Makefile.in --- banshee-community-extensions-2.0.1/src/Telepathy/Makefile.in 2011-05-03 20:45:07.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Telepathy/Makefile.in 2011-09-19 20:36:54.000000000 +0000 @@ -38,6 +38,7 @@ AUTHORS ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/m4/extensions/alarmclock.m4 \ + $(top_srcdir)/build/m4/extensions/albumartwriter.m4 \ $(top_srcdir)/build/m4/extensions/ampache.m4 \ $(top_srcdir)/build/m4/extensions/appindicator.m4 \ $(top_srcdir)/build/m4/extensions/awn.m4 \ @@ -45,6 +46,7 @@ $(top_srcdir)/build/m4/extensions/clutterflow.m4 \ $(top_srcdir)/build/m4/extensions/common.m4 \ $(top_srcdir)/build/m4/extensions/coverwallpaper.m4 \ + $(top_srcdir)/build/m4/extensions/duplicatesongdetector.m4 \ $(top_srcdir)/build/m4/extensions/jamendo.m4 \ $(top_srcdir)/build/m4/extensions/karaoke.m4 \ $(top_srcdir)/build/m4/extensions/lastfmfingerprint.m4 \ @@ -64,6 +66,11 @@ $(top_srcdir)/build/m4/shamrock/expansions.m4 \ $(top_srcdir)/build/m4/shamrock/gnome-doc.m4 \ $(top_srcdir)/build/m4/shamrock/i18n.m4 \ + $(top_srcdir)/build/m4/shamrock/libtool.m4 \ + $(top_srcdir)/build/m4/shamrock/ltoptions.m4 \ + $(top_srcdir)/build/m4/shamrock/ltsugar.m4 \ + $(top_srcdir)/build/m4/shamrock/ltversion.m4 \ + $(top_srcdir)/build/m4/shamrock/lt~obsolete.m4 \ $(top_srcdir)/build/m4/shamrock/mono.m4 \ $(top_srcdir)/build/m4/shamrock/nunit.m4 \ $(top_srcdir)/build/m4/shamrock/programs.m4 \ @@ -118,7 +125,6 @@ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ -ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AM_MAKEFLAGS = @AM_MAKEFLAGS@ diff -Nru banshee-community-extensions-2.0.1/src/Telepathy/README banshee-community-extensions-2.2.0/src/Telepathy/README --- banshee-community-extensions-2.0.1/src/Telepathy/README 2010-03-07 20:08:48.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/Telepathy/README 2011-05-27 17:13:25.000000000 +0000 @@ -21,13 +21,11 @@ ------------ * mono >= 2.4.2 * banshee >= 1.5.1 +* dbus-sharp >= 0.7.0 * empathy >= 2.27.91 * telepathy-gabble >= 0.9 * telepathy-mission-control-5 >= 5.3.1 -A development version ie. git-master version of NDesk.DBus is bundled with this -tarball. - Installation ------------ diff -Nru banshee-community-extensions-2.0.1/src/ZeitgeistDataprovider/Makefile.am banshee-community-extensions-2.2.0/src/ZeitgeistDataprovider/Makefile.am --- banshee-community-extensions-2.0.1/src/ZeitgeistDataprovider/Makefile.am 2010-11-20 11:15:14.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/ZeitgeistDataprovider/Makefile.am 2011-05-28 12:12:34.000000000 +0000 @@ -1,6 +1,5 @@ ASSEMBLY = Banshee.ZeitgeistDataprovider LINK = $(BANSHEE_LIBS) $(ZEITGEIST_SHARP_LIBS) -TARGET = library SOURCES = Banshee.ZeitgeistDataprovider/ZeitgeistDataprovider.cs diff -Nru banshee-community-extensions-2.0.1/src/ZeitgeistDataprovider/Makefile.in banshee-community-extensions-2.2.0/src/ZeitgeistDataprovider/Makefile.in --- banshee-community-extensions-2.0.1/src/ZeitgeistDataprovider/Makefile.in 2011-05-03 20:45:07.000000000 +0000 +++ banshee-community-extensions-2.2.0/src/ZeitgeistDataprovider/Makefile.in 2011-09-19 20:36:54.000000000 +0000 @@ -42,6 +42,7 @@ subdir = src/ZeitgeistDataprovider ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/m4/extensions/alarmclock.m4 \ + $(top_srcdir)/build/m4/extensions/albumartwriter.m4 \ $(top_srcdir)/build/m4/extensions/ampache.m4 \ $(top_srcdir)/build/m4/extensions/appindicator.m4 \ $(top_srcdir)/build/m4/extensions/awn.m4 \ @@ -49,6 +50,7 @@ $(top_srcdir)/build/m4/extensions/clutterflow.m4 \ $(top_srcdir)/build/m4/extensions/common.m4 \ $(top_srcdir)/build/m4/extensions/coverwallpaper.m4 \ + $(top_srcdir)/build/m4/extensions/duplicatesongdetector.m4 \ $(top_srcdir)/build/m4/extensions/jamendo.m4 \ $(top_srcdir)/build/m4/extensions/karaoke.m4 \ $(top_srcdir)/build/m4/extensions/lastfmfingerprint.m4 \ @@ -68,6 +70,11 @@ $(top_srcdir)/build/m4/shamrock/expansions.m4 \ $(top_srcdir)/build/m4/shamrock/gnome-doc.m4 \ $(top_srcdir)/build/m4/shamrock/i18n.m4 \ + $(top_srcdir)/build/m4/shamrock/libtool.m4 \ + $(top_srcdir)/build/m4/shamrock/ltoptions.m4 \ + $(top_srcdir)/build/m4/shamrock/ltsugar.m4 \ + $(top_srcdir)/build/m4/shamrock/ltversion.m4 \ + $(top_srcdir)/build/m4/shamrock/lt~obsolete.m4 \ $(top_srcdir)/build/m4/shamrock/mono.m4 \ $(top_srcdir)/build/m4/shamrock/nunit.m4 \ $(top_srcdir)/build/m4/shamrock/programs.m4 \ @@ -104,7 +111,6 @@ DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AM_MAKEFLAGS = @AM_MAKEFLAGS@ @@ -326,16 +332,15 @@ top_srcdir = @top_srcdir@ ASSEMBLY = Banshee.ZeitgeistDataprovider LINK = $(BANSHEE_LIBS) $(ZEITGEIST_SHARP_LIBS) $(am__append_1) - -# All extensions are libraries -@ENABLE_ZEITGEISTDATAPROVIDER_TRUE@TARGET = library -TARGET = library SOURCES = Banshee.ZeitgeistDataprovider/ZeitgeistDataprovider.cs RESOURCES = ZeitgeistDataprovider.addin.xml # Initializers @ENABLE_ZEITGEISTDATAPROVIDER_TRUE@MONO_BASE_PATH = @ENABLE_ZEITGEISTDATAPROVIDER_TRUE@MONO_ADDINS_PATH = + +# All extensions are libraries +@ENABLE_ZEITGEISTDATAPROVIDER_TRUE@TARGET = library @ENABLE_ZEITGEISTDATAPROVIDER_TRUE@DIR_BIN = $(top_builddir)/bin # Install Paths