diff -Nru dleyna-server-0.4.0/aclocal.m4 dleyna-server-0.5.0/aclocal.m4 --- dleyna-server-0.4.0/aclocal.m4 2013-10-03 13:20:48.000000000 +0000 +++ dleyna-server-0.5.0/aclocal.m4 2014-12-06 11:53:24.000000000 +0000 @@ -1,8 +1,7 @@ -# generated automatically by aclocal 1.11.6 -*- Autoconf -*- +# generated automatically by aclocal 1.14.1 -*- Autoconf -*- + +# Copyright (C) 1996-2013 Free Software Foundation, Inc. -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, -# Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -12,13 +11,14 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. +m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, [m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. -To do so, use the procedure documented by the package, typically `autoreconf'.])]) +To do so, use the procedure documented by the package, typically 'autoreconf'.])]) # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # serial 1 (pkg-config-0.24) @@ -180,25 +180,22 @@ fi[]dnl ])# PKG_CHECK_MODULES -# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 2002-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 1 - # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.11' +[am__api_version='1.14' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.11.6], [], +m4_if([$1], [1.14.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -214,24 +211,22 @@ # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.11.6])dnl +[AM_AUTOMAKE_VERSION([1.14.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 1 - # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets -# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to -# `$srcdir', `$srcdir/..', or `$srcdir/../..'. +# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to +# '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and @@ -250,7 +245,7 @@ # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually -# harmless because $srcdir is `.', but things will broke when you +# harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, @@ -276,22 +271,19 @@ # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 -# Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 9 - # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], -[AC_PREREQ(2.52)dnl - ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], - [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +[AC_PREREQ([2.52])dnl + m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl @@ -310,16 +302,14 @@ Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, -# 2010, 2011 Free Software Foundation, Inc. +# Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 12 -# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be +# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing @@ -329,7 +319,7 @@ # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. -# NAME is "CC", "CXX", "GCJ", or "OBJC". +# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was @@ -342,12 +332,13 @@ AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl -ifelse([$1], CC, [depcc="$CC" am_compiler_list=], - [$1], CXX, [depcc="$CXX" am_compiler_list=], - [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], - [$1], UPC, [depcc="$UPC" am_compiler_list=], - [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], - [depcc="$$1" am_compiler_list=]) +m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], + [$1], [CXX], [depcc="$CXX" am_compiler_list=], + [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], + [$1], [UPC], [depcc="$UPC" am_compiler_list=], + [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], @@ -355,8 +346,8 @@ # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're @@ -396,16 +387,16 @@ : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - # We check with `-c' and `-o' for the sake of the "dashmstdout" + # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in @@ -414,8 +405,8 @@ test "$am__universal" = false || continue ;; nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else @@ -423,7 +414,7 @@ fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has + # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} @@ -471,7 +462,7 @@ # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. -# This macro is AC_REQUIREd in _AM_DEPENDENCIES +# This macro is AC_REQUIREd in _AM_DEPENDENCIES. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl @@ -481,9 +472,13 @@ # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], -[AC_ARG_ENABLE(dependency-tracking, -[ --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors]) +[AC_ARG_ENABLE([dependency-tracking], [dnl +AS_HELP_STRING( + [--enable-dependency-tracking], + [do not reject slow dependency extractors]) +AS_HELP_STRING( + [--disable-dependency-tracking], + [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' @@ -498,20 +493,18 @@ # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. +# Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -#serial 5 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ - # Autoconf 2.62 quotes --file arguments for eval, but not when files + # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in @@ -524,7 +517,7 @@ # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but + # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. @@ -536,21 +529,19 @@ continue fi # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. + # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue + test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` @@ -568,7 +559,7 @@ # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking -# is enabled. FIXME. This creates each `.P' file that we will +# is enabled. FIXME. This creates each '.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], @@ -578,18 +569,21 @@ # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. +# Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 16 - # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. +dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. +m4_define([AC_PROG_CC], +m4_defn([AC_PROG_CC]) +[_AM_PROG_CC_C_O +]) + # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- @@ -602,7 +596,7 @@ # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_PREREQ([2.62])dnl +[AC_PREREQ([2.65])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl @@ -631,31 +625,40 @@ # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], -[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl +[AC_DIAGNOSE([obsolete], + [$0: two- and three-arguments forms are deprecated.]) +m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. -m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, +m4_if( + m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), + [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, -[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) - AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl +[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) + AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl -AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) -AM_MISSING_PROG(AUTOCONF, autoconf) -AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) -AM_MISSING_PROG(AUTOHEADER, autoheader) -AM_MISSING_PROG(MAKEINFO, makeinfo) +AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) +AM_MISSING_PROG([AUTOCONF], [autoconf]) +AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) +AM_MISSING_PROG([AUTOHEADER], [autoheader]) +AM_MISSING_PROG([MAKEINFO], [makeinfo]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl -AC_REQUIRE([AM_PROG_MKDIR_P])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# +# +AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl @@ -666,34 +669,78 @@ [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], - [_AM_DEPENDENCIES(CC)], - [define([AC_PROG_CC], - defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl + [_AM_DEPENDENCIES([CC])], + [m4_define([AC_PROG_CC], + m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], - [_AM_DEPENDENCIES(CXX)], - [define([AC_PROG_CXX], - defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl + [_AM_DEPENDENCIES([CXX])], + [m4_define([AC_PROG_CXX], + m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], - [_AM_DEPENDENCIES(OBJC)], - [define([AC_PROG_OBJC], - defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl + [_AM_DEPENDENCIES([OBJC])], + [m4_define([AC_PROG_OBJC], + m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], + [_AM_DEPENDENCIES([OBJCXX])], + [m4_define([AC_PROG_OBJCXX], + m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) -_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl -dnl The `parallel-tests' driver may need to know about EXEEXT, so add the -dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro -dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. +AC_REQUIRE([AM_SILENT_RULES])dnl +dnl The testsuite driver may need to know about EXEEXT, so add the +dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This +dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl -]) -dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: . + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) + fi +fi]) + +dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) - # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. @@ -715,15 +762,12 @@ done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation, -# Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 1 - # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. @@ -737,16 +781,14 @@ install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi -AC_SUBST(install_sh)]) +AC_SUBST([install_sh])]) -# Copyright (C) 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2003-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 2 - # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], @@ -763,20 +805,17 @@ # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering -# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008, -# 2011 Free Software Foundation, Inc. +# Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 5 - # AM_MAINTAINER_MODE([DEFAULT-MODE]) # ---------------------------------- # Control maintainer-specific portions of Makefiles. -# Default is to disable them, unless `enable' is passed literally. -# For symmetry, `disable' may be passed as well. Anyway, the user +# Default is to disable them, unless 'enable' is passed literally. +# For symmetry, 'disable' may be passed as well. Anyway, the user # can override the default with the --enable/--disable switch. AC_DEFUN([AM_MAINTAINER_MODE], [m4_case(m4_default([$1], [disable]), @@ -787,10 +826,11 @@ AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) dnl maintainer-mode's default is 'disable' unless 'enable' is passed AC_ARG_ENABLE([maintainer-mode], -[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful - (and sometimes confusing) to the casual installer], - [USE_MAINTAINER_MODE=$enableval], - [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) + [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], + am_maintainer_other[ make rules and dependencies not useful + (and sometimes confusing) to the casual installer])], + [USE_MAINTAINER_MODE=$enableval], + [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) AC_MSG_RESULT([$USE_MAINTAINER_MODE]) AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE @@ -798,18 +838,14 @@ ] ) -AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) - # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 4 - # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. @@ -827,7 +863,7 @@ _am_result=none # First try GNU make style include. echo "include confinc" > confmf -# Ignore all kinds of additional output from `make'. +# Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include @@ -852,52 +888,14 @@ rm -f confinc confmf ]) -# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 6 - -# AM_PROG_CC_C_O -# -------------- -# Like AC_PROG_CC_C_O, but changed for automake. -AC_DEFUN([AM_PROG_CC_C_O], -[AC_REQUIRE([AC_PROG_CC_C_O])dnl -AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([compile])dnl -# FIXME: we rely on the cache variable name because -# there is no other way. -set dummy $CC -am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` -eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o -if test "$am_t" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi -dnl Make sure AC_PROG_CC is never called again, or it will override our -dnl setting of CC. -m4_define([AC_PROG_CC], - [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])]) -]) - # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 6 - # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], @@ -905,11 +903,10 @@ $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) - # AM_MISSING_HAS_RUN # ------------------ -# Define MISSING if not defined so far and test if it supports --run. -# If it does, set am_missing_run to use it, otherwise, to nothing. +# Define MISSING if not defined so far and test if it is modern enough. +# If it is, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl @@ -922,54 +919,22 @@ esac fi # Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " else am_missing_run= - AC_MSG_WARN([`missing' script is too old or missing]) + AC_MSG_WARN(['missing' script is too old or missing]) fi ]) -# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation, -# Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 1 - -# AM_PROG_MKDIR_P -# --------------- -# Check for `mkdir -p'. -AC_DEFUN([AM_PROG_MKDIR_P], -[AC_PREREQ([2.60])dnl -AC_REQUIRE([AC_PROG_MKDIR_P])dnl -dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, -dnl while keeping a definition of mkdir_p for backward compatibility. -dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. -dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of -dnl Makefile.ins that do not define MKDIR_P, so we do our own -dnl adjustment using top_builddir (which is defined more often than -dnl MKDIR_P). -AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl -case $mkdir_p in - [[\\/$]]* | ?:[[\\/]]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac -]) - # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software -# Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 5 - # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], @@ -979,7 +944,7 @@ # -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], -[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) +[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) # _AM_SET_OPTIONS(OPTIONS) # ------------------------ @@ -993,24 +958,82 @@ AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Check to make sure that the build environment is sane. -*- Autoconf -*- +# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_PROG_CC_C_O +# --------------- +# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC +# to automatically call this. +AC_DEFUN([_AM_PROG_CC_C_O], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([compile])dnl +AC_LANG_PUSH([C])dnl +AC_CACHE_CHECK( + [whether $CC understands -c and -o together], + [am_cv_prog_cc_c_o], + [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i]) +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +AC_LANG_POP([C])]) + +# For backward compatibility. +AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 -# Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 5 +# AM_RUN_LOG(COMMAND) +# ------------------- +# Run COMMAND, save the exit status in ac_status, and log it. +# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) +AC_DEFUN([AM_RUN_LOG], +[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD + ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + (exit $ac_status); }]) + +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) -# Just in case -sleep 1 -echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' @@ -1021,32 +1044,40 @@ esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) - AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; + AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac -# Do `set' in a subshell so we don't clobber the current shell's +# Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$[*]" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - rm -f conftest.file - if test "$[*]" != "X $srcdir/configure conftest.file" \ - && test "$[*]" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken -alias in your environment]) - fi - + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken + alias in your environment]) + fi + if test "$[2]" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done test "$[2]" = conftest.file ) then @@ -1056,31 +1087,50 @@ AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi -AC_MSG_RESULT(yes)]) +AC_MSG_RESULT([yes]) +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi +AC_CONFIG_COMMANDS_PRE( + [AC_MSG_CHECKING([that generated files are newer than configure]) + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + AC_MSG_RESULT([done])]) +rm -f conftest.file +]) -# Copyright (C) 2009, 2011 Free Software Foundation, Inc. +# Copyright (C) 2009-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 2 - # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT -# (`yes' being less verbose, `no' or empty being verbose). +# ("yes" being less verbose, "no" or empty being verbose). AC_DEFUN([AM_SILENT_RULES], -[AC_ARG_ENABLE([silent-rules], -[ --enable-silent-rules less verbose build output (undo: `make V=1') - --disable-silent-rules verbose build output (undo: `make V=0')]) -case $enable_silent_rules in -yes) AM_DEFAULT_VERBOSITY=0;; -no) AM_DEFAULT_VERBOSITY=1;; -*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; +[AC_ARG_ENABLE([silent-rules], [dnl +AS_HELP_STRING( + [--enable-silent-rules], + [less verbose build output (undo: "make V=1")]) +AS_HELP_STRING( + [--disable-silent-rules], + [verbose build output (undo: "make V=0")])dnl +]) +case $enable_silent_rules in @%:@ ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac dnl -dnl A few `make' implementations (e.g., NonStop OS and NextStep) +dnl A few 'make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. dnl See automake bug#9928 and bug#10237. am_make=${MAKE-make} @@ -1098,7 +1148,7 @@ am_cv_make_support_nested_variables=no fi]) if test $am_cv_make_support_nested_variables = yes; then - dnl Using `$V' instead of `$(V)' breaks IRIX make. + dnl Using '$V' instead of '$(V)' breaks IRIX make. AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else @@ -1115,44 +1165,40 @@ _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 1 - # AM_PROG_INSTALL_STRIP # --------------------- -# One issue with vendor `install' (even GNU) is that you can't +# One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we -# always use install-sh in `make install-strip', and initialize +# always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -dnl Don't test for $cross_compiling = yes, because it might be `maybe'. +# will honor the 'STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc. +# Copyright (C) 2006-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 3 - # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. @@ -1166,18 +1212,16 @@ # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc. +# Copyright (C) 2004-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 2 - # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. -# FORMAT should be one of `v7', `ustar', or `pax'. +# FORMAT should be one of 'v7', 'ustar', or 'pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory @@ -1187,76 +1231,114 @@ # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar +# AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) -m4_if([$1], [v7], - [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], - [m4_case([$1], [ustar],, [pax],, - [m4_fatal([Unknown tar format])]) -AC_MSG_CHECKING([how to create a $1 tar archive]) -# Loop over all known methods to create a tar archive until one works. + +# We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' -_am_tools=${am_cv_prog_tar_$1-$_am_tools} -# Do not fold the above two line into one, because Tru64 sh and -# Solaris sh will not grok spaces in the rhs of `-'. -for _am_tool in $_am_tools -do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; - do - AM_RUN_LOG([$_am_tar --version]) && break - done - am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x $1 -w "$$tardir"' - am__tar_='pax -L -x $1 -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H $1 -L' - am__tar_='find "$tardir" -print | cpio -o -H $1 -L' - am__untar='cpio -i -H $1 -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_$1}" && break +m4_if([$1], [v7], + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], - # tar/untar a dummy directory, and stop if the command works - rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + [m4_case([$1], + [ustar], + [# The POSIX 1988 'ustar' format is defined with fixed-size fields. + # There is notably a 21 bits limit for the UID and the GID. In fact, + # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 + # and bug#13588). + am_max_uid=2097151 # 2^21 - 1 + am_max_gid=$am_max_uid + # The $UID and $GID variables are not portable, so we need to resort + # to the POSIX-mandated id(1) utility. Errors in the 'id' calls + # below are definitely unexpected, so allow the users to see them + # (that is, avoid stderr redirection). + am_uid=`id -u || echo unknown` + am_gid=`id -g || echo unknown` + AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) + if test $am_uid -le $am_max_uid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi + AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) + if test $am_gid -le $am_max_gid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi], + + [pax], + [], + + [m4_fatal([Unknown tar format])]) + + AC_MSG_CHECKING([how to create a $1 tar archive]) + + # Go ahead even if we have the value already cached. We do so because we + # need to set the values for the 'am__tar' and 'am__untar' variables. + _am_tools=${am_cv_prog_tar_$1-$_am_tools} + + for _am_tool in $_am_tools; do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works. + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi + done rm -rf conftest.dir - if test -s conftest.tar; then - AM_RUN_LOG([$am__untar /dev/null 2>&1 && break - fi -done -rm -rf conftest.dir -AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) -AC_MSG_RESULT([$am_cv_prog_tar_$1])]) + AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) + AC_MSG_RESULT([$am_cv_prog_tar_$1])]) + AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR diff -Nru dleyna-server-0.4.0/build-aux/compile dleyna-server-0.5.0/build-aux/compile --- dleyna-server-0.4.0/build-aux/compile 2013-10-03 13:20:49.000000000 +0000 +++ dleyna-server-0.5.0/build-aux/compile 2014-12-06 11:49:38.000000000 +0000 @@ -1,10 +1,9 @@ #! /bin/sh # Wrapper for compilers which do not understand '-c -o'. -scriptversion=2012-03-05.13; # UTC +scriptversion=2012-10-14.11; # UTC -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009, 2010, 2012 Free -# Software Foundation, Inc. +# Copyright (C) 1999-2013 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify @@ -113,6 +112,11 @@ lib=$dir/$lib.lib break fi + if test -f "$dir/lib$lib.a"; then + found=yes + lib=$dir/lib$lib.a + break + fi done IFS=$save_IFS diff -Nru dleyna-server-0.4.0/build-aux/config.guess dleyna-server-0.5.0/build-aux/config.guess --- dleyna-server-0.4.0/build-aux/config.guess 2013-10-03 13:20:49.000000000 +0000 +++ dleyna-server-0.5.0/build-aux/config.guess 2014-12-06 11:49:38.000000000 +0000 @@ -1,14 +1,12 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -# 2011, 2012 Free Software Foundation, Inc. +# Copyright 1992-2013 Free Software Foundation, Inc. -timestamp='2012-02-10' +timestamp='2013-06-10' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but @@ -22,19 +20,17 @@ # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Originally written by Per Bothner. Please send patches (context -# diff format) to and include a ChangeLog -# entry. +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). # -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. +# Originally written by Per Bothner. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD +# +# Please send patches with a ChangeLog entry to config-patches@gnu.org. + me=`echo "$0" | sed -e 's,.*/,,'` @@ -54,9 +50,7 @@ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 -Free Software Foundation, Inc. +Copyright 1992-2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -138,6 +132,27 @@ UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown +case "${UNAME_SYSTEM}" in +Linux|GNU|GNU/*) + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + LIBC=gnu + + eval $set_cc_for_build + cat <<-EOF > $dummy.c + #include + #if defined(__UCLIBC__) + LIBC=uclibc + #elif defined(__dietlibc__) + LIBC=dietlibc + #else + LIBC=gnu + #endif + EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` + ;; +esac + # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in @@ -200,6 +215,10 @@ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; + *:Bitrig:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} + exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} @@ -302,7 +321,7 @@ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) + arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) @@ -801,6 +820,9 @@ i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; + *:MINGW64*:*) + echo ${UNAME_MACHINE}-pc-mingw64 + exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; @@ -852,21 +874,21 @@ exit ;; *:GNU:*:*) # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; aarch64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in @@ -879,59 +901,54 @@ EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + if test "$?" = 0 ; then LIBC="gnulibc1" ; fi + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + arc:Linux:*:* | arceb:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then - echo ${UNAME_MACHINE}-unknown-linux-gnueabi + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi else - echo ${UNAME_MACHINE}-unknown-linux-gnueabihf + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf fi fi exit ;; avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; cris:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; crisv32:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; frv:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; hexagon:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:Linux:*:*) - LIBC=gnu - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build @@ -950,54 +967,63 @@ #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; + or1k:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; or32:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; padre:Linux:*:*) - echo sparc-unknown-linux-gnu + echo sparc-unknown-linux-${LIBC} exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu + echo hppa64-unknown-linux-${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; + PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; + PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; + *) echo hppa-unknown-linux-${LIBC} ;; esac exit ;; ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu + echo powerpc64-unknown-linux-${LIBC} exit ;; ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu + echo powerpc-unknown-linux-${LIBC} + exit ;; + ppc64le:Linux:*:*) + echo powerpc64le-unknown-linux-${LIBC} + exit ;; + ppcle:Linux:*:*) + echo powerpcle-unknown-linux-${LIBC} exit ;; s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux + echo ${UNAME_MACHINE}-ibm-linux-${LIBC} exit ;; sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; tile*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu + echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. @@ -1201,6 +1227,9 @@ BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; + x86_64:Haiku:*:*) + echo x86_64-unknown-haiku + exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; @@ -1227,19 +1256,21 @@ exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in - i386) - eval $set_cc_for_build - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - UNAME_PROCESSOR="x86_64" - fi - fi ;; - unknown) UNAME_PROCESSOR=powerpc ;; - esac + eval $set_cc_for_build + if test "$UNAME_PROCESSOR" = unknown ; then + UNAME_PROCESSOR=powerpc + fi + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + fi echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) @@ -1256,7 +1287,7 @@ NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; - NSE-?:NONSTOP_KERNEL:*:*) + NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) @@ -1330,9 +1361,6 @@ exit ;; esac -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - eval $set_cc_for_build cat >$dummy.c <. @@ -26,11 +20,12 @@ # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). -# Please send patches to . Submit a context -# diff and a properly formatted GNU ChangeLog entry. +# Please send patches with a ChangeLog entry to config-patches@gnu.org. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. @@ -73,9 +68,7 @@ version="\ GNU config.sub ($timestamp) -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 -Free Software Foundation, Inc. +Copyright 1992-2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -123,7 +116,7 @@ maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ - linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ + linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) @@ -156,7 +149,7 @@ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray | -microblaze) + -apple | -axis | -knuth | -cray | -microblaze*) os= basic_machine=$1 ;; @@ -259,10 +252,12 @@ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ - | be32 | be64 \ + | arc | arceb \ + | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ + | avr | avr32 \ + | be32 | be64 \ | bfin \ - | c4x | clipper \ + | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ | epiphany \ | fido | fr30 | frv \ @@ -273,7 +268,7 @@ | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore | mep | metag \ + | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ @@ -291,16 +286,17 @@ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ + | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ - | nios | nios2 \ + | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ | open8 \ - | or32 \ + | or1k | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ @@ -370,13 +366,13 @@ | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ - | clipper-* | craynv-* | cydra-* \ + | c8051-* | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ @@ -389,7 +385,8 @@ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ + | microblaze-* | microblazeel-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ @@ -407,12 +404,13 @@ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ - | nios-* | nios2-* \ + | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ | orion-* \ @@ -788,11 +786,15 @@ basic_machine=ns32k-utek os=-sysv ;; - microblaze) + microblaze*) basic_machine=microblaze-xilinx ;; + mingw64) + basic_machine=x86_64-pc + os=-mingw64 + ;; mingw32) - basic_machine=i386-pc + basic_machine=i686-pc os=-mingw32 ;; mingw32ce) @@ -828,7 +830,7 @@ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; msys) - basic_machine=i386-pc + basic_machine=i686-pc os=-msys ;; mvs) @@ -1019,7 +1021,11 @@ basic_machine=i586-unknown os=-pw32 ;; - rdos) + rdos | rdos64) + basic_machine=x86_64-pc + os=-rdos + ;; + rdos32) basic_machine=i386-pc os=-rdos ;; @@ -1346,21 +1352,21 @@ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ - | -sym* | -kopensolaris* \ + | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -openbsd* | -solidbsd* \ + | -bitrig* | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-android* \ - | -linux-newlib* | -linux-uclibc* \ + | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ + | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ @@ -1492,9 +1498,6 @@ -aros*) os=-aros ;; - -kaos*) - os=-kaos - ;; -zvmoe) os=-zvmoe ;; @@ -1543,6 +1546,9 @@ c4x-* | tic4x-*) os=-coff ;; + c8051-*) + os=-elf + ;; hexagon-*) os=-elf ;; @@ -1586,6 +1592,9 @@ mips*-*) os=-elf ;; + or1k-*) + os=-elf + ;; or32-*) os=-coff ;; diff -Nru dleyna-server-0.4.0/build-aux/depcomp dleyna-server-0.5.0/build-aux/depcomp --- dleyna-server-0.4.0/build-aux/depcomp 2013-10-03 13:20:49.000000000 +0000 +++ dleyna-server-0.5.0/build-aux/depcomp 2014-12-06 11:49:38.000000000 +0000 @@ -1,10 +1,9 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2012-03-27.16; # UTC +scriptversion=2013-05-30.07; # UTC -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010, -# 2011, 2012 Free Software Foundation, Inc. +# Copyright (C) 1999-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -28,9 +27,9 @@ case $1 in '') - echo "$0: No command. Try '$0 --help' for more information." 1>&2 - exit 1; - ;; + echo "$0: No command. Try '$0 --help' for more information." 1>&2 + exit 1; + ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] @@ -57,11 +56,65 @@ ;; esac +# Get the directory component of the given path, and save it in the +# global variables '$dir'. Note that this directory component will +# be either empty or ending with a '/' character. This is deliberate. +set_dir_from () +{ + case $1 in + */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; + *) dir=;; + esac +} + +# Get the suffix-stripped basename of the given path, and save it the +# global variable '$base'. +set_base_from () +{ + base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` +} + +# If no dependency file was actually created by the compiler invocation, +# we still have to create a dummy depfile, to avoid errors with the +# Makefile "include basename.Plo" scheme. +make_dummy_depfile () +{ + echo "#dummy" > "$depfile" +} + +# Factor out some common post-processing of the generated depfile. +# Requires the auxiliary global variable '$tmpdepfile' to be set. +aix_post_process_depfile () +{ + # If the compiler actually managed to produce a dependency file, + # post-process it. + if test -f "$tmpdepfile"; then + # Each line is of the form 'foo.o: dependency.h'. + # Do two passes, one to just change these to + # $object: dependency.h + # and one to simply output + # dependency.h: + # which is needed to avoid the deleted-header problem. + { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" + sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" + } > "$depfile" + rm -f "$tmpdepfile" + else + make_dummy_depfile + fi +} + # A tabulation character. tab=' ' # A newline character. nl=' ' +# Character ranges might be problematic outside the C locale. +# These definitions help. +upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ +lower=abcdefghijklmnopqrstuvwxyz +digits=0123456789 +alpha=${upper}${lower} if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 @@ -75,6 +128,9 @@ rm -f "$tmpdepfile" +# Avoid interferences from the environment. +gccflag= dashmflag= + # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case @@ -86,32 +142,32 @@ fi if test "$depmode" = dashXmstdout; then - # This is just like dashmstdout with a different argument. - dashmflag=-xM - depmode=dashmstdout + # This is just like dashmstdout with a different argument. + dashmflag=-xM + depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then - # This is just like msvisualcpp but w/o cygpath translation. - # Just convert the backslash-escaped backslashes to single forward - # slashes to satisfy depend.m4 - cygpath_u='sed s,\\\\,/,g' - depmode=msvisualcpp + # This is just like msvisualcpp but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then - # This is just like msvc7 but w/o cygpath translation. - # Just convert the backslash-escaped backslashes to single forward - # slashes to satisfy depend.m4 - cygpath_u='sed s,\\\\,/,g' - depmode=msvc7 + # This is just like msvc7 but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + depmode=msvc7 fi if test "$depmode" = xlc; then - # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency informations. - gccflag=-qmakedep=gcc,-MF - depmode=gcc + # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. + gccflag=-qmakedep=gcc,-MF + depmode=gcc fi case "$depmode" in @@ -134,8 +190,7 @@ done "$@" stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi @@ -143,13 +198,17 @@ ;; gcc) +## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. +## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. +## (see the conditional assignment to $gccflag above). ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like -## -MM, not -M (despite what the docs say). +## -MM, not -M (despite what the docs say). Also, it might not be +## supported by the other compilers which use the 'gcc' depmode. ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then @@ -157,15 +216,14 @@ fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" - alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz -## The second -e expression handles DOS-style file names with drive letters. + # The second -e expression handles DOS-style file names with drive + # letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the "deleted header file" problem. @@ -174,15 +232,15 @@ ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. - tr ' ' "$nl" < "$tmpdepfile" | ## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ - | sed -e 's/$/ :/' >> "$depfile" + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; @@ -200,8 +258,7 @@ "$@" -MDupdate "$tmpdepfile" fi stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi @@ -209,7 +266,6 @@ if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" - # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in @@ -217,19 +273,15 @@ # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. tr ' ' "$nl" < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ - tr "$nl" ' ' >> "$depfile" + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ + | tr "$nl" ' ' >> "$depfile" echo >> "$depfile" - # The second pass generates a dummy entry for each header file. tr ' ' "$nl" < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ - >> "$depfile" + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ + >> "$depfile" else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" + make_dummy_depfile fi rm -f "$tmpdepfile" ;; @@ -247,9 +299,8 @@ # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + set_dir_from "$object" + set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u @@ -262,9 +313,7 @@ "$@" -M fi stat=$? - - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi @@ -273,65 +322,113 @@ do test -f "$tmpdepfile" && break done - if test -f "$tmpdepfile"; then - # Each line is of the form 'foo.o: dependent.h'. - # Do two passes, one to just change these to - # '$object: dependent.h' and one to simply 'dependent.h:'. - sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" - else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" + aix_post_process_depfile + ;; + +tcc) + # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 + # FIXME: That version still under development at the moment of writing. + # Make that this statement remains true also for stable, released + # versions. + # It will wrap lines (doesn't matter whether long or short) with a + # trailing '\', as in: + # + # foo.o : \ + # foo.c \ + # foo.h \ + # + # It will put a trailing '\' even on the last line, and will use leading + # spaces rather than leading tabs (at least since its commit 0394caf7 + # "Emit spaces for -MD"). + "$@" -MD -MF "$tmpdepfile" + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat fi + rm -f "$depfile" + # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. + # We have to change lines of the first kind to '$object: \'. + sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" + # And for each line of the second kind, we have to emit a 'dep.h:' + # dummy dependency, to avoid the deleted-header problem. + sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; -icc) - # Intel's C compiler anf tcc (Tiny C Compiler) understand '-MD -MF file'. - # However on - # $CC -MD -MF foo.d -c -o sub/foo.o sub/foo.c - # ICC 7.0 will fill foo.d with something like - # foo.o: sub/foo.c - # foo.o: sub/foo.h - # which is wrong. We want - # sub/foo.o: sub/foo.c - # sub/foo.o: sub/foo.h - # sub/foo.c: - # sub/foo.h: - # ICC 7.1 will output +## The order of this option in the case statement is important, since the +## shell code in configure will try each of these formats in the order +## listed in this file. A plain '-MD' option would be understood by many +## compilers, so we must ensure this comes after the gcc and icc options. +pgcc) + # Portland's C compiler understands '-MD'. + # Will always output deps to 'file.d' where file is the root name of the + # source file under compilation, even if file resides in a subdirectory. + # The object file name does not affect the name of the '.d' file. + # pgcc 10.2 will output # foo.o: sub/foo.c sub/foo.h - # and will wrap long lines using '\': + # and will wrap long lines using '\' : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... - # tcc 0.9.26 (FIXME still under development at the moment of writing) - # will emit a similar output, but also prepend the continuation lines - # with horizontal tabulation characters. - "$@" -MD -MF "$tmpdepfile" - stat=$? - if test $stat -eq 0; then : - else + set_dir_from "$object" + # Use the source, not the object, to determine the base name, since + # that's sadly what pgcc will do too. + set_base_from "$source" + tmpdepfile=$base.d + + # For projects that build the same source file twice into different object + # files, the pgcc approach of using the *source* file root name can cause + # problems in parallel builds. Use a locking strategy to avoid stomping on + # the same $tmpdepfile. + lockdir=$base.d-lock + trap " + echo '$0: caught signal, cleaning up...' >&2 + rmdir '$lockdir' + exit 1 + " 1 2 13 15 + numtries=100 + i=$numtries + while test $i -gt 0; do + # mkdir is a portable test-and-set. + if mkdir "$lockdir" 2>/dev/null; then + # This process acquired the lock. + "$@" -MD + stat=$? + # Release the lock. + rmdir "$lockdir" + break + else + # If the lock is being held by a different process, wait + # until the winning process is done or we timeout. + while test -d "$lockdir" && test $i -gt 0; do + sleep 1 + i=`expr $i - 1` + done + fi + i=`expr $i - 1` + done + trap - 1 2 13 15 + if test $i -le 0; then + echo "$0: failed to acquire lock after $numtries attempts" >&2 + echo "$0: check lockdir '$lockdir'" >&2 + exit 1 + fi + + if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" - # Each line is of the form 'foo.o: dependent.h', - # or 'foo.o: dep1.h dep2.h \', or ' dep3.h dep4.h \'. + # Each line is of the form `foo.o: dependent.h', + # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to - # '$object: dependent.h' and one to simply 'dependent.h:'. - sed -e "s/^[ $tab][ $tab]*/ /" -e "s,^[^:]*:,$object :," \ - < "$tmpdepfile" > "$depfile" - sed ' - s/[ '"$tab"'][ '"$tab"']*/ /g - s/^ *// - s/ *\\*$// - s/^[^:]*: *// - /^$/d - /:$/d - s/$/ :/ - ' < "$tmpdepfile" >> "$depfile" + # `$object: dependent.h' and one to simply `dependent.h:'. + sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process this invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ + | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; @@ -342,9 +439,8 @@ # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + set_dir_from "$object" + set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d @@ -355,8 +451,7 @@ "$@" +Maked fi stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi @@ -366,76 +461,61 @@ test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" + sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" # Add 'dependent.h:' lines. sed -ne '2,${ - s/^ *// - s/ \\*$// - s/$/:/ - p - }' "$tmpdepfile" >> "$depfile" + s/^ *// + s/ \\*$// + s/$/:/ + p + }' "$tmpdepfile" >> "$depfile" else - echo "#dummy" > "$depfile" + make_dummy_depfile fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) - # The Tru64 compiler uses -MD to generate dependencies as a side - # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. - # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put - # dependencies in 'foo.d' instead, so we check for that too. - # Subdirectories are respected. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - - if test "$libtool" = yes; then - # With Tru64 cc, shared objects can also be used to make a - # static library. This mechanism is used in libtool 1.4 series to - # handle both shared and static libraries in a single compilation. - # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. - # - # With libtool 1.5 this exception was removed, and libtool now - # generates 2 separate objects for the 2 libraries. These two - # compilations output dependencies in $dir.libs/$base.o.d and - # in $dir$base.o.d. We have to check for both files, because - # one of the two compilations can be disabled. We should prefer - # $dir$base.o.d over $dir.libs/$base.o.d because the latter is - # automatically cleaned when .libs/ is deleted, while ignoring - # the former would cause a distcleancheck panic. - tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 - tmpdepfile2=$dir$base.o.d # libtool 1.5 - tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 - tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 - "$@" -Wc,-MD - else - tmpdepfile1=$dir$base.o.d - tmpdepfile2=$dir$base.d - tmpdepfile3=$dir$base.d - tmpdepfile4=$dir$base.d - "$@" -MD - fi + # The Tru64 compiler uses -MD to generate dependencies as a side + # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. + # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put + # dependencies in 'foo.d' instead, so we check for that too. + # Subdirectories are respected. + set_dir_from "$object" + set_base_from "$object" + + if test "$libtool" = yes; then + # Libtool generates 2 separate objects for the 2 libraries. These + # two compilations output dependencies in $dir.libs/$base.o.d and + # in $dir$base.o.d. We have to check for both files, because + # one of the two compilations can be disabled. We should prefer + # $dir$base.o.d over $dir.libs/$base.o.d because the latter is + # automatically cleaned when .libs/ is deleted, while ignoring + # the former would cause a distcleancheck panic. + tmpdepfile1=$dir$base.o.d # libtool 1.5 + tmpdepfile2=$dir.libs/$base.o.d # Likewise. + tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 + "$@" -Wc,-MD + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + tmpdepfile3=$dir$base.d + "$@" -MD + fi + + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + exit $stat + fi - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" - else - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + do + test -f "$tmpdepfile" && break + done + # Same post-processing that is required for AIX mode. + aix_post_process_depfile + ;; msvc7) if test "$libtool" = yes; then @@ -446,8 +526,7 @@ "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" - if test "$stat" = 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi @@ -473,6 +552,7 @@ G p }' >> "$depfile" + echo >> "$depfile" # make sure the fragment doesn't end with a backslash rm -f "$tmpdepfile" ;; @@ -524,13 +604,14 @@ # in the target name. This is to cope with DOS-style filenames: # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | - sed 's:^['"$tab"' ]*[^:'"$tab"' ][^:][^:]*\:['"$tab"' ]*:'"$object"'\: :' > "$tmpdepfile" + sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" - tr ' ' "$nl" < "$tmpdepfile" | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + # Some versions of the HPUX 10.20 sed can't process this sed invocation + # correctly. Breaking it into two sed invocations is a workaround. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; @@ -583,10 +664,12 @@ # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" - sed '1,2d' "$tmpdepfile" | tr ' ' "$nl" | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + # Some versions of the HPUX 10.20 sed can't process the last invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed '1,2d' "$tmpdepfile" \ + | tr ' ' "$nl" \ + | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; @@ -622,10 +705,10 @@ esac done - "$@" -E | - sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ - -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | - sed '$ s: \\$::' > "$tmpdepfile" + "$@" -E \ + | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" @@ -657,15 +740,15 @@ shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") - set fnord "$@" - shift - shift - ;; + set fnord "$@" + shift + shift + ;; *) - set fnord "$@" "$arg" - shift - shift - ;; + set fnord "$@" "$arg" + shift + shift + ;; esac done "$@" -E 2>/dev/null | diff -Nru dleyna-server-0.4.0/build-aux/install-sh dleyna-server-0.5.0/build-aux/install-sh --- dleyna-server-0.4.0/build-aux/install-sh 2013-10-03 13:20:49.000000000 +0000 +++ dleyna-server-0.5.0/build-aux/install-sh 2014-12-06 11:49:38.000000000 +0000 @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2011-01-19.21; # UTC +scriptversion=2011-11-20.07; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -35,7 +35,7 @@ # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent -# `make' implicit rules from creating a file called install from it +# 'make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written @@ -156,7 +156,7 @@ -s) stripcmd=$stripprog;; -t) dst_arg=$2 - # Protect names problematic for `test' and other utilities. + # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac @@ -190,7 +190,7 @@ fi shift # arg dst_arg=$arg - # Protect names problematic for `test' and other utilities. + # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac @@ -202,7 +202,7 @@ echo "$0: no input file specified." >&2 exit 1 fi - # It's OK to call `install-sh -d' without argument. + # It's OK to call 'install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi @@ -240,7 +240,7 @@ for src do - # Protect names problematic for `test' and other utilities. + # Protect names problematic for 'test' and other utilities. case $src in -* | [=\(\)!]) src=./$src;; esac @@ -354,7 +354,7 @@ if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writeable bit of parent directory when it shouldn't. + # other-writable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in diff -Nru dleyna-server-0.4.0/build-aux/ltmain.sh dleyna-server-0.5.0/build-aux/ltmain.sh --- dleyna-server-0.4.0/build-aux/ltmain.sh 2013-10-03 13:20:46.000000000 +0000 +++ dleyna-server-0.5.0/build-aux/ltmain.sh 2014-12-06 11:49:36.000000000 +0000 @@ -70,7 +70,7 @@ # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1.2ubuntu1 +# $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1.7ubuntu1 # automake: $automake_version # autoconf: $autoconf_version # @@ -80,7 +80,7 @@ PROGRAM=libtool PACKAGE=libtool -VERSION="2.4.2 Debian-2.4.2-1.2ubuntu1" +VERSION="2.4.2 Debian-2.4.2-1.7ubuntu1" TIMESTAMP="" package_revision=1.3337 diff -Nru dleyna-server-0.4.0/build-aux/missing dleyna-server-0.5.0/build-aux/missing --- dleyna-server-0.4.0/build-aux/missing 2013-10-03 13:20:49.000000000 +0000 +++ dleyna-server-0.5.0/build-aux/missing 2014-12-06 11:49:38.000000000 +0000 @@ -1,11 +1,10 @@ #! /bin/sh -# Common stub for a few missing GNU programs while installing. +# Common wrapper for a few potentially missing GNU programs. -scriptversion=2012-01-06.13; # UTC +scriptversion=2013-10-28.13; # UTC -# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, -# 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. -# Originally by Fran,cois Pinard , 1996. +# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Originally written by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -26,68 +25,40 @@ # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then - echo 1>&2 "Try \`$0 --help' for more information" + echo 1>&2 "Try '$0 --help' for more information" exit 1 fi -run=: -sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' -sed_minuso='s/.* -o \([^ ]*\).*/\1/p' - -# In the cases where this matters, `missing' is being run in the -# srcdir already. -if test -f configure.ac; then - configure_ac=configure.ac -else - configure_ac=configure.in -fi +case $1 in -msg="missing on your system" + --is-lightweight) + # Used by our autoconf macros to check whether the available missing + # script is modern enough. + exit 0 + ;; -case $1 in ---run) - # Try to run requested program, and just exit if it succeeds. - run= - shift - "$@" && exit 0 - # Exit code 63 means version mismatch. This often happens - # when the user try to use an ancient version of a tool on - # a file that requires a minimum version. In this case we - # we should proceed has if the program had been absent, or - # if --run hadn't been passed. - if test $? = 63; then - run=: - msg="probably too old" - fi - ;; + --run) + # Back-compat with the calling convention used by older automake. + shift + ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... -Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an -error status if there is no known handling for PROGRAM. +Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due +to PROGRAM being missing or too old. Options: -h, --help display this help and exit -v, --version output version information and exit - --run try to run the given command, and emulate it if it fails Supported PROGRAM values: - aclocal touch file \`aclocal.m4' - autoconf touch file \`configure' - autoheader touch file \`config.h.in' - autom4te touch the output file, or create a stub one - automake touch all \`Makefile.in' files - bison create \`y.tab.[ch]', if possible, from existing .[ch] - flex create \`lex.yy.c', if possible, from existing .c - help2man touch the output file - lex create \`lex.yy.c', if possible, from existing .c - makeinfo touch the output file - yacc create \`y.tab.[ch]', if possible, from existing .[ch] + aclocal autoconf autoheader autom4te automake makeinfo + bison yacc flex lex help2man -Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and -\`g' are ignored when checking the name. +Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and +'g' are ignored when checking the name. Send bug reports to ." exit $? @@ -99,228 +70,141 @@ ;; -*) - echo 1>&2 "$0: Unknown \`$1' option" - echo 1>&2 "Try \`$0 --help' for more information" + echo 1>&2 "$0: unknown '$1' option" + echo 1>&2 "Try '$0 --help' for more information" exit 1 ;; esac -# normalize program name to check for. -program=`echo "$1" | sed ' - s/^gnu-//; t - s/^gnu//; t - s/^g//; t'` - -# Now exit if we have it, but it failed. Also exit now if we -# don't have it and --version was passed (most likely to detect -# the program). This is about non-GNU programs, so use $1 not -# $program. -case $1 in - lex*|yacc*) - # Not GNU programs, they don't have --version. - ;; +# Run the given program, remember its exit status. +"$@"; st=$? - *) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - # Could not run --version or --help. This is probably someone - # running `$TOOL --version' or `$TOOL --help' to check whether - # $TOOL exists and not knowing $TOOL uses missing. - exit 1 - fi - ;; -esac - -# If it does not exist, or fails to run (possibly an outdated version), -# try to emulate it. -case $program in - aclocal*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acinclude.m4' or \`${configure_ac}'. You might want - to install the \`Automake' and \`Perl' packages. Grab them from - any GNU archive site." - touch aclocal.m4 - ;; - - autoconf*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`${configure_ac}'. You might want to install the - \`Autoconf' and \`GNU m4' packages. Grab them from any GNU - archive site." - touch configure - ;; - - autoheader*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acconfig.h' or \`${configure_ac}'. You might want - to install the \`Autoconf' and \`GNU m4' packages. Grab them - from any GNU archive site." - files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` - test -z "$files" && files="config.h" - touch_files= - for f in $files; do - case $f in - *:*) touch_files="$touch_files "`echo "$f" | - sed -e 's/^[^:]*://' -e 's/:.*//'`;; - *) touch_files="$touch_files $f.in";; - esac - done - touch $touch_files - ;; +# If it succeeded, we are done. +test $st -eq 0 && exit 0 - automake*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. - You might want to install the \`Automake' and \`Perl' packages. - Grab them from any GNU archive site." - find . -type f -name Makefile.am -print | - sed 's/\.am$/.in/' | - while read f; do touch "$f"; done - ;; - - autom4te*) - echo 1>&2 "\ -WARNING: \`$1' is needed, but is $msg. - You might have modified some files without having the - proper tools for further handling them. - You can get \`$1' as part of \`Autoconf' from any GNU - archive site." - - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo "#! /bin/sh" - echo "# Created by GNU Automake missing as a replacement of" - echo "# $ $@" - echo "exit 0" - chmod +x $file - exit 1 - fi - ;; - - bison*|yacc*) - echo 1>&2 "\ -WARNING: \`$1' $msg. You should only need it if - you modified a \`.y' file. You may need the \`Bison' package - in order for those modifications to take effect. You can get - \`Bison' from any GNU archive site." - rm -f y.tab.c y.tab.h - if test $# -ne 1; then - eval LASTARG=\${$#} - case $LASTARG in - *.y) - SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" y.tab.c - fi - SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" y.tab.h - fi - ;; - esac - fi - if test ! -f y.tab.h; then - echo >y.tab.h - fi - if test ! -f y.tab.c; then - echo 'main() { return 0; }' >y.tab.c - fi - ;; - - lex*|flex*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.l' file. You may need the \`Flex' package - in order for those modifications to take effect. You can get - \`Flex' from any GNU archive site." - rm -f lex.yy.c - if test $# -ne 1; then - eval LASTARG=\${$#} - case $LASTARG in - *.l) - SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" lex.yy.c - fi - ;; - esac - fi - if test ! -f lex.yy.c; then - echo 'main() { return 0; }' >lex.yy.c - fi - ;; - - help2man*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a dependency of a manual page. You may need the - \`Help2man' package in order for those modifications to take - effect. You can get \`Help2man' from any GNU archive site." - - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo ".ab help2man is required to generate this page" - exit $? - fi - ;; - - makeinfo*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.texi' or \`.texinfo' file, or any other file - indirectly affecting the aspect of the manual. The spurious - call might also be the consequence of using a buggy \`make' (AIX, - DU, IRIX). You might want to install the \`Texinfo' package or - the \`GNU make' package. Grab either from any GNU archive site." - # The file to touch is that specified with -o ... - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -z "$file"; then - # ... or it is the one specified with @setfilename ... - infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` - file=`sed -n ' - /^@setfilename/{ - s/.* \([^ ]*\) *$/\1/ - p - q - }' $infile` - # ... or it is derived from the source name (dir/f.texi becomes f.info) - test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info - fi - # If the file does not exist, the user really needs makeinfo; - # let's fail without touching anything. - test -f $file || exit 1 - touch $file - ;; - - *) - echo 1>&2 "\ -WARNING: \`$1' is needed, and is $msg. - You might have modified some files without having the - proper tools for further handling them. Check the \`README' file, - it often tells you about the needed prerequisites for installing - this package. You may also peek at any GNU archive site, in case - some other package would contain this missing \`$1' program." - exit 1 - ;; -esac +# Also exit now if we it failed (or wasn't found), and '--version' was +# passed; such an option is passed most likely to detect whether the +# program is present and works. +case $2 in --version|--help) exit $st;; esac + +# Exit code 63 means version mismatch. This often happens when the user +# tries to use an ancient version of a tool on a file that requires a +# minimum version. +if test $st -eq 63; then + msg="probably too old" +elif test $st -eq 127; then + # Program was missing. + msg="missing on your system" +else + # Program was found and executed, but failed. Give up. + exit $st +fi -exit 0 +perl_URL=http://www.perl.org/ +flex_URL=http://flex.sourceforge.net/ +gnu_software_URL=http://www.gnu.org/software + +program_details () +{ + case $1 in + aclocal|automake) + echo "The '$1' program is part of the GNU Automake package:" + echo "<$gnu_software_URL/automake>" + echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" + echo "<$gnu_software_URL/autoconf>" + echo "<$gnu_software_URL/m4/>" + echo "<$perl_URL>" + ;; + autoconf|autom4te|autoheader) + echo "The '$1' program is part of the GNU Autoconf package:" + echo "<$gnu_software_URL/autoconf/>" + echo "It also requires GNU m4 and Perl in order to run:" + echo "<$gnu_software_URL/m4/>" + echo "<$perl_URL>" + ;; + esac +} + +give_advice () +{ + # Normalize program name to check for. + normalized_program=`echo "$1" | sed ' + s/^gnu-//; t + s/^gnu//; t + s/^g//; t'` + + printf '%s\n' "'$1' is $msg." + + configure_deps="'configure.ac' or m4 files included by 'configure.ac'" + case $normalized_program in + autoconf*) + echo "You should only need it if you modified 'configure.ac'," + echo "or m4 files included by it." + program_details 'autoconf' + ;; + autoheader*) + echo "You should only need it if you modified 'acconfig.h' or" + echo "$configure_deps." + program_details 'autoheader' + ;; + automake*) + echo "You should only need it if you modified 'Makefile.am' or" + echo "$configure_deps." + program_details 'automake' + ;; + aclocal*) + echo "You should only need it if you modified 'acinclude.m4' or" + echo "$configure_deps." + program_details 'aclocal' + ;; + autom4te*) + echo "You might have modified some maintainer files that require" + echo "the 'autom4te' program to be rebuilt." + program_details 'autom4te' + ;; + bison*|yacc*) + echo "You should only need it if you modified a '.y' file." + echo "You may want to install the GNU Bison package:" + echo "<$gnu_software_URL/bison/>" + ;; + lex*|flex*) + echo "You should only need it if you modified a '.l' file." + echo "You may want to install the Fast Lexical Analyzer package:" + echo "<$flex_URL>" + ;; + help2man*) + echo "You should only need it if you modified a dependency" \ + "of a man page." + echo "You may want to install the GNU Help2man package:" + echo "<$gnu_software_URL/help2man/>" + ;; + makeinfo*) + echo "You should only need it if you modified a '.texi' file, or" + echo "any other file indirectly affecting the aspect of the manual." + echo "You might want to install the Texinfo package:" + echo "<$gnu_software_URL/texinfo/>" + echo "The spurious makeinfo call might also be the consequence of" + echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" + echo "want to install GNU make:" + echo "<$gnu_software_URL/make/>" + ;; + *) + echo "You might have modified some files without having the proper" + echo "tools for further handling them. Check the 'README' file, it" + echo "often tells you about the needed prerequisites for installing" + echo "this package. You may also peek at any GNU archive site, in" + echo "case some other package contains this missing '$1' program." + ;; + esac +} + +give_advice "$1" | sed -e '1s/^/WARNING: /' \ + -e '2,$s/^/ /' >&2 + +# Propagate the correct exit status (expected to be 127 for a program +# not found, 63 for a program that failed due to version mismatch). +exit $st # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) diff -Nru dleyna-server-0.4.0/ChangeLog dleyna-server-0.5.0/ChangeLog --- dleyna-server-0.4.0/ChangeLog 2013-10-03 13:11:58.000000000 +0000 +++ dleyna-server-0.5.0/ChangeLog 2014-12-06 11:52:12.000000000 +0000 @@ -1,3 +1,30 @@ +version 0.5.0 + - [Build] Fix out-of-source-tree builds + https://github.com/01org/dleyna-server/issues/143 + - Fix various configure & build issues + [Autoconf] Sub Makefile: Remove ACLOCAL_AMFLAGS + https://github.com/01org/dleyna-collabora-android/issues/127 + [Autoconf] Add --no-undefined to compiler option + - [upnp] Use "port" setting when creating GUPnPContextManager + https://github.com/01org/dleyna-collabora-android/issues/140 + - [Deprecated API] Use new API instead of deprecated + https://github.com/01org/dleyna-server/issues/104 + - [Device] Fix wake-on ip address used for broadcast + - [Device] Sleeping devices cache cleanup + - [Device] Improve sleeping context lookup + - [Device] Move the network interface info storage + - [Device] Improve Network Interface info and device context matching + - [Device] Retrieve sleeping state via GetInterfaceInfo action + - [Device] Add sleeping device memory cache + - [Device] Add wake packet sending support + - [Device] Add Energy Management features + - [Configuration] Remove libdleyna-server .pc file + https://github.com/01org/dleyna-server/issues/113 + - [Documentation] Fix URL to MediaServer2Spec + - [test] Save changed ServiceResetToken in configuration + - [test] Survive a missing ServiceResetToken in dsc + - [Tests] Fix a typo in the Upload Sync Controller's error management + version 0.4.0 - Logs: provide correct component version - Don't return empty properties in GetAll diff -Nru dleyna-server-0.4.0/config.h.in dleyna-server-0.5.0/config.h.in --- dleyna-server-0.4.0/config.h.in 2013-10-03 13:20:48.000000000 +0000 +++ dleyna-server-0.5.0/config.h.in 2014-12-06 11:49:37.000000000 +0000 @@ -111,9 +111,6 @@ */ #undef LT_OBJDIR -/* Define to 1 if your C compiler doesn't accept -c and -o together. */ -#undef NO_MINUS_C_MINUS_O - /* Name of package */ #undef PACKAGE diff -Nru dleyna-server-0.4.0/configure dleyna-server-0.5.0/configure --- dleyna-server-0.4.0/configure 2013-10-03 13:20:48.000000000 +0000 +++ dleyna-server-0.5.0/configure 2014-12-06 11:53:26.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for dleyna-server 0.4.0. +# Generated by GNU Autoconf 2.69 for dleyna-server 0.5.0. # # Report bugs to . # @@ -590,8 +590,8 @@ # Identity of this package. PACKAGE_NAME='dleyna-server' PACKAGE_TARNAME='dleyna-server' -PACKAGE_VERSION='0.4.0' -PACKAGE_STRING='dleyna-server 0.4.0' +PACKAGE_VERSION='0.5.0' +PACKAGE_STRING='dleyna-server 0.5.0' PACKAGE_BUGREPORT='https://github.com/01org/dleyna-server/issues/new' PACKAGE_URL='https://01.org/dleyna/' @@ -649,6 +649,8 @@ DLEYNA_CORE_LIBS DLEYNA_CORE_CFLAGS LIBOBJS +LIBXML_LIBS +LIBXML_CFLAGS SOUP_LIBS SOUP_CFLAGS GUPNPDLNA_LIBS @@ -713,13 +715,13 @@ LDFLAGS CFLAGS CC +MAINT +MAINTAINER_MODE_FALSE +MAINTAINER_MODE_TRUE AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V -MAINT -MAINTAINER_MODE_FALSE -MAINTAINER_MODE_TRUE am__untar am__tar AMTAR @@ -784,8 +786,8 @@ ac_subst_files='' ac_user_opts=' enable_option_checking -enable_maintainer_mode enable_silent_rules +enable_maintainer_mode enable_dependency_tracking enable_static enable_shared @@ -832,6 +834,8 @@ GUPNPDLNA_LIBS SOUP_CFLAGS SOUP_LIBS +LIBXML_CFLAGS +LIBXML_LIBS DLEYNA_CORE_CFLAGS DLEYNA_CORE_LIBS' @@ -1374,7 +1378,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 dleyna-server 0.4.0 to adapt to many kinds of systems. +\`configure' configures dleyna-server 0.5.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1444,7 +1448,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of dleyna-server 0.4.0:";; + short | recursive ) echo "Configuration of dleyna-server 0.5.0:";; esac cat <<\_ACEOF @@ -1452,12 +1456,15 @@ --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 - (and sometimes confusing) to the casual installer - --enable-silent-rules less verbose build output (undo: `make V=1') - --disable-silent-rules verbose build output (undo: `make V=0') - --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors + --enable-silent-rules less verbose build output (undo: "make V=1") + --disable-silent-rules verbose build output (undo: "make V=0") + --enable-maintainer-mode + enable make rules and dependencies not useful (and + sometimes confusing) to the casual installer + --enable-dependency-tracking + do not reject slow dependency extractors + --disable-dependency-tracking + speeds up one-time build --enable-static[=PKGS] build static libraries [default=no] --enable-shared[=PKGS] build shared libraries [default=yes] --enable-fast-install[=PKGS] @@ -1522,6 +1529,9 @@ linker flags for GUPNPDLNA, overriding pkg-config SOUP_CFLAGS C compiler flags for SOUP, overriding pkg-config SOUP_LIBS linker flags for SOUP, overriding pkg-config + LIBXML_CFLAGS + C compiler flags for LIBXML, overriding pkg-config + LIBXML_LIBS linker flags for LIBXML, overriding pkg-config DLEYNA_CORE_CFLAGS C compiler flags for DLEYNA_CORE, overriding pkg-config DLEYNA_CORE_LIBS @@ -1594,7 +1604,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -dleyna-server configure 0.4.0 +dleyna-server configure 0.5.0 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2071,7 +2081,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by dleyna-server $as_me 0.4.0, which was +It was created by dleyna-server $as_me 0.5.0, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2456,7 +2466,7 @@ -am__api_version='1.11' +am__api_version='1.14' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or @@ -2553,9 +2563,6 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } -# Just in case -sleep 1 -echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' @@ -2566,32 +2573,40 @@ esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; + as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac -# Do `set' in a subshell so we don't clobber the current shell's +# Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$*" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - rm -f conftest.file - if test "$*" != "X $srcdir/configure conftest.file" \ - && test "$*" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - as_fn_error $? "ls -t appears to fail. Make sure there is not a broken -alias in your environment" "$LINENO" 5 - fi + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken + alias in your environment" "$LINENO" 5 + fi + if test "$2" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done test "$2" = conftest.file ) then @@ -2603,6 +2618,16 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi + +rm -f conftest.file + test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. @@ -2625,12 +2650,12 @@ esac fi # Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " else am_missing_run= - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 -$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then @@ -2642,10 +2667,10 @@ esac fi -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. +# will honor the 'STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. @@ -2784,12 +2809,6 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } -mkdir_p="$MKDIR_P" -case $mkdir_p in - [\\/$]* | ?:[\\/]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac - for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. @@ -2872,6 +2891,45 @@ fi rmdir .tst 2>/dev/null +# Check whether --enable-silent-rules was given. +if test "${enable_silent_rules+set}" = set; then : + enableval=$enable_silent_rules; +fi + +case $enable_silent_rules in # ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=1;; +esac +am_make=${MAKE-make} +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 +$as_echo_n "checking whether $am_make supports nested variables... " >&6; } +if ${am_cv_make_support_nested_variables+:} false; then : + $as_echo_n "(cached) " >&6 +else + if $as_echo 'TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 +$as_echo "$am_cv_make_support_nested_variables" >&6; } +if test $am_cv_make_support_nested_variables = yes; then + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AM_BACKSLASH='\' + if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." @@ -2894,7 +2952,7 @@ # Define the identity of the package. PACKAGE='dleyna-server' - VERSION='0.4.0' + VERSION='0.5.0' cat >>confdefs.h <<_ACEOF @@ -2922,12 +2980,22 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# +# +mkdir_p='$(MKDIR_P)' + # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' + +# We'll loop over all known methods to create a tar archive until one works. +_am_tools='gnutar pax cpio none' + am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' @@ -2935,6 +3003,48 @@ +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: . + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 + fi +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } @@ -2963,10 +3073,10 @@ enableval=$enable_silent_rules; fi -case $enable_silent_rules in -yes) AM_DEFAULT_VERBOSITY=0;; -no) AM_DEFAULT_VERBOSITY=1;; -*) AM_DEFAULT_VERBOSITY=0;; +case $enable_silent_rules in # ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=0;; esac am_make=${MAKE-make} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 @@ -3030,6 +3140,7 @@ fi CFLAGS+=" -Wno-format-extra-args" + CFLAGS+=" -Wl,--no-undefined" # Checks for languages. @@ -3829,6 +3940,65 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 +$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } +if ${am_cv_prog_cc_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 + ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 +$as_echo "$am_cv_prog_cc_c_o" >&6; } +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" @@ -3848,7 +4018,7 @@ _am_result=none # First try GNU make style include. echo "include confinc" > confmf -# Ignore all kinds of additional output from `make'. +# Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include @@ -3904,8 +4074,8 @@ # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're @@ -3940,16 +4110,16 @@ : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - # We check with `-c' and `-o' for the sake of the "dashmstdout" + # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in @@ -3958,8 +4128,8 @@ test "$am__universal" = false || continue ;; nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else @@ -3967,7 +4137,7 @@ fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has + # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} @@ -4021,131 +4191,6 @@ fi -if test "x$CC" != xcc; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5 -$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5 -$as_echo_n "checking whether cc understands -c and -o together... " >&6; } -fi -set dummy $CC; ac_cc=`$as_echo "$2" | - sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -# Make sure it works both with $CC and with simple cc. -# We do the test twice because some compilers refuse to overwrite an -# existing .o file with -o, though they will create one. -ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' -rm -f conftest2.* -if { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && - test -f conftest2.$ac_objext && { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; -then - eval ac_cv_prog_cc_${ac_cc}_c_o=yes - if test "x$CC" != xcc; then - # Test first that cc exists at all. - if { ac_try='cc -c conftest.$ac_ext >&5' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' - rm -f conftest2.* - if { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && - test -f conftest2.$ac_objext && { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; - then - # cc works too. - : - else - # cc exists but doesn't like -o. - eval ac_cv_prog_cc_${ac_cc}_c_o=no - fi - fi - fi -else - eval ac_cv_prog_cc_${ac_cc}_c_o=no -fi -rm -f core conftest* - -fi -if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h - -fi - -# FIXME: we rely on the cache variable name because -# there is no other way. -set dummy $CC -am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o -if test "$am_t" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi - @@ -6559,7 +6604,7 @@ rm -rf conftest* ;; -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext @@ -6584,7 +6629,10 @@ ;; esac ;; - ppc64-*linux*|powerpc64-*linux*) + powerpc64le-*) + LD="${LD-ld} -m elf32lppclinux" + ;; + powerpc64-*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) @@ -6603,7 +6651,10 @@ x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; - ppc*-*linux*|powerpc*-*linux*) + powerpcle-*) + LD="${LD-ld} -m elf64lppc" + ;; + powerpc-*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) @@ -12502,6 +12553,97 @@ fi +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBXML" >&5 +$as_echo_n "checking for LIBXML... " >&6; } + +if test -n "$LIBXML_CFLAGS"; then + pkg_cv_LIBXML_CFLAGS="$LIBXML_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libxml-2.0") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_LIBXML_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$LIBXML_LIBS"; then + pkg_cv_LIBXML_LIBS="$LIBXML_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libxml-2.0") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_LIBXML_LIBS=`$PKG_CONFIG --libs "libxml-2.0" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + LIBXML_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libxml-2.0" 2>&1` + else + LIBXML_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libxml-2.0" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$LIBXML_PKG_ERRORS" >&5 + + as_fn_error $? "Package requirements (libxml-2.0) were not met: + +$LIBXML_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables LIBXML_CFLAGS +and LIBXML_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details." "$LINENO" 5 +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables LIBXML_CFLAGS +and LIBXML_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details" "$LINENO" 5; } +else + LIBXML_CFLAGS=$pkg_cv_LIBXML_CFLAGS + LIBXML_LIBS=$pkg_cv_LIBXML_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi + # Checks for header files. for ac_header in stdlib.h string.h syslog.h do : @@ -12860,12 +13002,12 @@ pkg_cv_DLEYNA_CORE_CFLAGS="$DLEYNA_CORE_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dleyna-core-1.0 >= 0.4.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "dleyna-core-1.0 >= 0.4.0") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dleyna-core-1.0 >= 0.5.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "dleyna-core-1.0 >= 0.5.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_DLEYNA_CORE_CFLAGS=`$PKG_CONFIG --cflags "dleyna-core-1.0 >= 0.4.0" 2>/dev/null` + pkg_cv_DLEYNA_CORE_CFLAGS=`$PKG_CONFIG --cflags "dleyna-core-1.0 >= 0.5.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -12877,12 +13019,12 @@ pkg_cv_DLEYNA_CORE_LIBS="$DLEYNA_CORE_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dleyna-core-1.0 >= 0.4.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "dleyna-core-1.0 >= 0.4.0") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dleyna-core-1.0 >= 0.5.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "dleyna-core-1.0 >= 0.5.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_DLEYNA_CORE_LIBS=`$PKG_CONFIG --libs "dleyna-core-1.0 >= 0.4.0" 2>/dev/null` + pkg_cv_DLEYNA_CORE_LIBS=`$PKG_CONFIG --libs "dleyna-core-1.0 >= 0.5.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -12903,14 +13045,14 @@ _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - DLEYNA_CORE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "dleyna-core-1.0 >= 0.4.0" 2>&1` + DLEYNA_CORE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "dleyna-core-1.0 >= 0.5.0" 2>&1` else - DLEYNA_CORE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "dleyna-core-1.0 >= 0.4.0" 2>&1` + DLEYNA_CORE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "dleyna-core-1.0 >= 0.5.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$DLEYNA_CORE_PKG_ERRORS" >&5 - as_fn_error $? "Package requirements (dleyna-core-1.0 >= 0.4.0) were not met: + as_fn_error $? "Package requirements (dleyna-core-1.0 >= 0.5.0) were not met: $DLEYNA_CORE_PKG_ERRORS @@ -13210,7 +13352,7 @@ -ac_config_files="$ac_config_files Makefile libdleyna/server/Makefile libdleyna/server/dleyna-server-1.0.pc libdleyna/server/dleyna-server-service.conf server/dleyna-server-service-1.0.pc server/Makefile test/dbus/Makefile" +ac_config_files="$ac_config_files Makefile libdleyna/server/Makefile libdleyna/server/dleyna-server-service.conf server/dleyna-server-service-1.0.pc server/Makefile test/dbus/Makefile" cat >confcache <<\_ACEOF @@ -13322,6 +13464,14 @@ LTLIBOBJS=$ac_ltlibobjs +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 +$as_echo_n "checking that generated files are newer than configure... " >&6; } + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 +$as_echo "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' @@ -13743,7 +13893,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by dleyna-server $as_me 0.4.0, which was +This file was extended by dleyna-server $as_me 0.5.0, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -13810,7 +13960,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -dleyna-server config.status 0.4.0 +dleyna-server config.status 0.5.0 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -14221,7 +14371,6 @@ "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "libdleyna/server/Makefile") CONFIG_FILES="$CONFIG_FILES libdleyna/server/Makefile" ;; - "libdleyna/server/dleyna-server-1.0.pc") CONFIG_FILES="$CONFIG_FILES libdleyna/server/dleyna-server-1.0.pc" ;; "libdleyna/server/dleyna-server-service.conf") CONFIG_FILES="$CONFIG_FILES libdleyna/server/dleyna-server-service.conf" ;; "server/dleyna-server-service-1.0.pc") CONFIG_FILES="$CONFIG_FILES server/dleyna-server-service-1.0.pc" ;; "server/Makefile") CONFIG_FILES="$CONFIG_FILES server/Makefile" ;; @@ -14822,7 +14971,7 @@ case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { - # Autoconf 2.62 quotes --file arguments for eval, but not when files + # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in @@ -14835,7 +14984,7 @@ # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but + # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. @@ -14869,21 +15018,19 @@ continue fi # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. + # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue + test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || diff -Nru dleyna-server-0.4.0/configure.ac dleyna-server-0.5.0/configure.ac --- dleyna-server-0.4.0/configure.ac 2013-10-03 13:00:00.000000000 +0000 +++ dleyna-server-0.5.0/configure.ac 2014-12-06 11:52:12.000000000 +0000 @@ -1,7 +1,7 @@ AC_PREREQ([2.66]) AC_INIT([dleyna-server], - [0.4.0], + [0.5.0], [https://github.com/01org/dleyna-server/issues/new], , [https://01.org/dleyna/]) @@ -43,6 +43,7 @@ PKG_CHECK_MODULES([GUPNPAV], [gupnp-av-1.0 >= 0.11.5]) PKG_CHECK_MODULES([GUPNPDLNA], [gupnp-dlna-2.0 >= 0.9.4]) PKG_CHECK_MODULES([SOUP], [libsoup-2.4 >= 2.28.2]) +PKG_CHECK_MODULES([LIBXML], [libxml-2.0]) # Checks for header files. AC_CHECK_HEADERS([stdlib.h string.h syslog.h]) @@ -83,7 +84,7 @@ [master_build=no]) AS_IF([test "x$master_build" = "xno"], - [PKG_CHECK_MODULES([DLEYNA_CORE], [dleyna-core-1.0 >= 0.4.0])], + [PKG_CHECK_MODULES([DLEYNA_CORE], [dleyna-core-1.0 >= 0.5.0])], [this_abs_top_srcdir=`cd "$srcdir" && pwd`; DLEYNA_CORE_CFLAGS="-I$this_abs_top_srcdir/../dleyna-core"; DLEYNA_CORE_LIBS="-L$this_abs_top_srcdir/../dleyna-core/.libs -ldleyna-core-1.0" @@ -226,7 +227,6 @@ AC_CONFIG_FILES([Makefile \ libdleyna/server/Makefile \ - libdleyna/server/dleyna-server-1.0.pc \ libdleyna/server/dleyna-server-service.conf \ server/dleyna-server-service-1.0.pc \ server/Makefile \ diff -Nru dleyna-server-0.4.0/debian/changelog dleyna-server-0.5.0/debian/changelog --- dleyna-server-0.4.0/debian/changelog 2013-12-31 17:47:50.000000000 +0000 +++ dleyna-server-0.5.0/debian/changelog 2015-07-17 19:10:27.000000000 +0000 @@ -1,3 +1,9 @@ +dleyna-server (0.5.0-1~jensge1~vivid1) vivid; urgency=medium + + * Import new upstream version + + -- Jens Georg Fri, 17 Jul 2015 20:43:00 +0200 + dleyna-server (0.4.0-1) unstable; urgency=low [ Ludovic Ferrandis ] diff -Nru dleyna-server-0.4.0/debian/control dleyna-server-0.5.0/debian/control --- dleyna-server-0.4.0/debian/control 2013-12-31 17:47:50.000000000 +0000 +++ dleyna-server-0.5.0/debian/control 2015-07-17 19:02:28.000000000 +0000 @@ -11,7 +11,7 @@ libgupnp-av-1.0-dev (>= 0.11.5), libgupnp-dlna-2.0-dev (>= 0.9.4), libsoup2.4-dev, - libdleyna-core-1.0-dev (>= 0.4.0) + libdleyna-core-1.0-dev (>= 0.5.0) Standards-Version: 3.9.5 Homepage: https://01.org/dleyna/ Vcs-Git: git://anonscm.debian.org/collab-maint/pkg-dleyna-server.git diff -Nru dleyna-server-0.4.0/INSTALL dleyna-server-0.5.0/INSTALL --- dleyna-server-0.4.0/INSTALL 2013-10-03 13:20:49.000000000 +0000 +++ dleyna-server-0.5.0/INSTALL 2014-12-06 11:49:38.000000000 +0000 @@ -1,7 +1,7 @@ Installation Instructions ************************* -Copyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, +Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, @@ -12,8 +12,8 @@ Basic Installation ================== - Briefly, the shell commands `./configure; make; make install' should -configure, build, and install this package. The following + Briefly, the shell command `./configure && make && make install' +should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for instructions specific to this package. Some packages provide this `INSTALL' file but do not implement all of the features documented @@ -309,9 +309,10 @@ overridden in the site shell script). Unfortunately, this technique does not work for `CONFIG_SHELL' due to -an Autoconf bug. Until the bug is fixed you can use this workaround: +an Autoconf limitation. Until the limitation is lifted, you can use +this workaround: - CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash + CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== @@ -367,4 +368,3 @@ `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. - diff -Nru dleyna-server-0.4.0/libdleyna/server/async.h dleyna-server-0.5.0/libdleyna/server/async.h --- dleyna-server-0.4.0/libdleyna/server/async.h 2013-10-03 12:48:23.000000000 +0000 +++ dleyna-server-0.5.0/libdleyna/server/async.h 2014-12-06 11:52:12.000000000 +0000 @@ -62,6 +62,7 @@ const gchar *protocol_info; gboolean need_child_count; gboolean device_object; + GUPnPServiceProxy *proxy; }; typedef struct dls_async_upload_t_ dls_async_upload_t; diff -Nru dleyna-server-0.4.0/libdleyna/server/device.c dleyna-server-0.5.0/libdleyna/server/device.c --- dleyna-server-0.4.0/libdleyna/server/device.c 2013-10-03 12:48:23.000000000 +0000 +++ dleyna-server-0.5.0/libdleyna/server/device.c 2014-12-06 11:52:12.000000000 +0000 @@ -21,6 +21,16 @@ */ #include +#include +#include +#include +#include +#include +#include +#include +#include +#include + #include #include #include @@ -36,17 +46,25 @@ #include "interface.h" #include "path.h" #include "server.h" +#include "xml-util.h" #define DLS_SYSTEM_UPDATE_VAR "SystemUpdateID" #define DLS_CONTAINER_UPDATE_VAR "ContainerUpdateIDs" #define DLS_LAST_CHANGE_VAR "LastChange" +#define DLS_NETWORK_INTERFACE_INFO_VAR "NetworkInterfaceInfo" #define DLS_DMS_DEVICE_TYPE "urn:schemas-upnp-org:device:MediaServer:" - +#define DLS_CONTENT_DIRECTORY_SERVICE_TYPE \ + "urn:schemas-upnp-org:service:ContentDirectory" +#define DLS_ENERGY_MANAGEMENT_SERVICE_TYPE \ + "urn:schemas-upnp-org:service:EnergyManagement:1" #define DLS_UPLOAD_STATUS_IN_PROGRESS "IN_PROGRESS" #define DLS_UPLOAD_STATUS_CANCELLED "CANCELLED" #define DLS_UPLOAD_STATUS_ERROR "ERROR" #define DLS_UPLOAD_STATUS_COMPLETED "COMPLETED" +#define DLS_DEFAULT_WAKE_PORT 9 +#define DLS_DEFAULT_WAKE_ON_DELAY 30 + typedef gboolean(*dls_device_count_cb_t)(dls_async_task_t *cb_data, gint count); @@ -89,6 +107,17 @@ dls_async_task_t *task; }; +typedef struct dls_tcp_wake_t_ dls_tcp_wake_t; +struct dls_tcp_wake_t_ { + GOutputStream *output_stream; + GSocketConnection *socket_connection; + guint8 *buffer; + gssize to_send; + gssize sent; + guint max_wake_on_delay; + dls_async_task_t *task; +}; + /* Private structure used in chain task */ typedef struct prv_new_device_ct_t_ prv_new_device_ct_t; struct prv_new_device_ct_t_ { @@ -122,6 +151,10 @@ const char *variable, GValue *value, gpointer user_data); +static void prv_network_interface_info_cb(GUPnPServiceProxy *proxy, + const char *variable, + GValue *value, + gpointer user_data); static void prv_upload_delete(gpointer up); static void prv_upload_job_delete(gpointer up); static void prv_get_sr_token_for_props(GUPnPServiceProxy *proxy, @@ -135,6 +168,12 @@ GUPnPServiceProxy *proxy, gboolean *failed); +static void prv_get_sleeping_for_props(GUPnPServiceProxy *proxy, + const dls_device_t *device, + dls_async_task_t *cb_data); + +static void prv_free_network_if_info(dls_network_if_info_t *info); + static void prv_object_builder_delete(void *dob) { dls_device_object_builder_t *builder = dob; @@ -163,71 +202,138 @@ static void prv_context_unsubscribe(dls_device_context_t *ctx) { - if (ctx->timeout_id) { - (void) g_source_remove(ctx->timeout_id); - ctx->timeout_id = 0; + if (ctx->cds.timeout_id) { + (void) g_source_remove(ctx->cds.timeout_id); + ctx->cds.timeout_id = 0; } - if (ctx->subscribed) { - gupnp_service_proxy_remove_notify( - ctx->service_proxy, - DLS_SYSTEM_UPDATE_VAR, - prv_system_update_cb, - ctx->device); - gupnp_service_proxy_remove_notify( - ctx->service_proxy, - DLS_CONTAINER_UPDATE_VAR, - prv_container_update_cb, - ctx->device); + if (ctx->ems.timeout_id) { + (void) g_source_remove(ctx->ems.timeout_id); + ctx->ems.timeout_id = 0; + } + + if (ctx->cds.subscribed) { + gupnp_service_proxy_remove_notify(ctx->cds.proxy, + DLS_SYSTEM_UPDATE_VAR, + prv_system_update_cb, + ctx->device); + gupnp_service_proxy_remove_notify(ctx->cds.proxy, + DLS_CONTAINER_UPDATE_VAR, + prv_container_update_cb, + ctx->device); + gupnp_service_proxy_remove_notify(ctx->cds.proxy, + DLS_LAST_CHANGE_VAR, + prv_last_change_cb, + ctx->device); + + gupnp_service_proxy_set_subscribed(ctx->cds.proxy, FALSE); + + ctx->cds.subscribed = FALSE; + } + + if (ctx->ems.subscribed) { gupnp_service_proxy_remove_notify( - ctx->service_proxy, - DLS_LAST_CHANGE_VAR, - prv_last_change_cb, - ctx->device); + ctx->ems.proxy, + DLS_NETWORK_INTERFACE_INFO_VAR, + prv_network_interface_info_cb, + ctx->device); - gupnp_service_proxy_set_subscribed(ctx->service_proxy, - FALSE); + gupnp_service_proxy_set_subscribed(ctx->ems.proxy, FALSE); - ctx->subscribed = FALSE; + ctx->ems.subscribed = FALSE; } } -static void prv_context_delete(gpointer context) +void dls_device_delete_context(dls_device_context_t *ctx) { - dls_device_context_t *ctx = context; - if (ctx) { prv_context_unsubscribe(ctx); + if (ctx->device_info) + g_object_unref(ctx->device_info); + if (ctx->device_proxy) g_object_unref(ctx->device_proxy); - if (ctx->service_proxy) - g_object_unref(ctx->service_proxy); + if (ctx->cds.proxy) + g_object_unref(ctx->cds.proxy); + + if (ctx->ems.proxy) + g_object_unref(ctx->ems.proxy); g_free(ctx->ip_address); g_free(ctx); } } + +static GUPnPServiceInfo *prv_lookup_em_service(GUPnPDeviceInfo *device_info) +{ + GList *child_devices; + GList *next; + GUPnPDeviceInfo *child_info = NULL; + GUPnPServiceInfo *service_info = NULL; + + child_devices = gupnp_device_info_list_devices(device_info); + + next = child_devices; + while (next != NULL) { + child_info = (GUPnPDeviceInfo *)next->data; + + service_info = gupnp_device_info_get_service(child_info, + DLS_ENERGY_MANAGEMENT_SERVICE_TYPE); + + if (service_info != NULL) + break; + + service_info = prv_lookup_em_service(child_info); + + if (service_info != NULL) + break; + + next = g_list_next(next); + } + + g_list_free_full(child_devices, g_object_unref); + + return service_info; +} + static void prv_context_new(const gchar *ip_address, GUPnPDeviceProxy *proxy, + GUPnPDeviceInfo *device_info, dls_device_t *device, dls_device_context_t **context) { - const gchar *service_type = - "urn:schemas-upnp-org:service:ContentDirectory"; dls_device_context_t *ctx = g_new(dls_device_context_t, 1); ctx->ip_address = g_strdup(ip_address); ctx->device_proxy = proxy; + ctx->device_info = device_info; + ctx->device = device; + ctx->cds.subscribed = FALSE; + ctx->cds.timeout_id = 0; + ctx->ems.subscribed = FALSE; + ctx->ems.timeout_id = 0; + g_object_ref(proxy); - ctx->service_proxy = (GUPnPServiceProxy *) - gupnp_device_info_get_service((GUPnPDeviceInfo *)proxy, - service_type); - ctx->subscribed = FALSE; - ctx->timeout_id = 0; + g_object_ref(device_info); + + ctx->cds.proxy = (GUPnPServiceProxy *) + gupnp_device_info_get_service( + device_info, + DLS_CONTENT_DIRECTORY_SERVICE_TYPE); + + ctx->ems.proxy = (GUPnPServiceProxy *) + gupnp_device_info_get_service( + (GUPnPDeviceInfo *)proxy, + DLS_ENERGY_MANAGEMENT_SERVICE_TYPE); + + if (ctx->ems.proxy == NULL) + ctx->ems.proxy = (GUPnPServiceProxy *) + prv_lookup_em_service( + (GUPnPDeviceInfo *)proxy); *context = ctx; } @@ -250,7 +356,14 @@ (void) dls_server_get_connector()->unpublish_subtree( dev->connection, dev->id); + prv_free_network_if_info(dev->network_if_info); + g_ptr_array_unref(dev->contexts); + dls_device_delete_context(dev->sleeping_context); + + if (dev->wake_on_timeout_id) + (void) g_source_remove(dev->wake_on_timeout_id); + g_free(dev->path); g_variant_unref(dev->search_caps); g_variant_unref(dev->sort_caps); @@ -459,6 +572,311 @@ g_error_free(error); } +static void prv_free_network_if_info(dls_network_if_info_t *info) +{ + if (info != NULL) { + g_free(info->mac_address); + g_free(info->device_uuid); + g_free(info->network_if_mode); + g_free(info->wake_on_pattern); + g_free(info->wake_transport); + g_list_free_full(info->ip_addresses, g_free); + + g_free(info); + } +} + +static dls_network_if_info_t *prv_get_network_if_info(xmlNode *device_if_node, + const gchar *udn) +{ + dls_network_if_info_t *info = NULL; + GList *ipv4_addresses; + GList *ipv6_addresses; + gchar *wake_on_delay = NULL; + + info = g_new0(dls_network_if_info_t, 1); + + ipv4_addresses = xml_util_get_child_string_list_content_by_name( + device_if_node, + "NetworkInterface", + "AssociatedIpAddresses", + "Ipv4", + NULL); + + ipv6_addresses = xml_util_get_child_string_list_content_by_name( + device_if_node, + "NetworkInterface", + "AssociatedIpAddresses", + "Ipv6", + NULL); + + info->ip_addresses = g_list_concat(ipv4_addresses, ipv6_addresses); + + info->device_uuid = xml_util_get_child_string_content_by_name( + device_if_node, + "DeviceUUID", + NULL); + + info->mac_address = xml_util_get_child_string_content_by_name( + device_if_node, + "NetworkInterface", + "MacAddress", + NULL); + + info->network_if_mode = xml_util_get_child_string_content_by_name( + device_if_node, + "NetworkInterface", + "NetworkInterfaceMode", + NULL); + + info->wake_on_pattern = xml_util_get_child_string_content_by_name( + device_if_node, + "NetworkInterface", + "WakeOnPattern", + NULL); + + info->wake_transport = xml_util_get_child_string_content_by_name( + device_if_node, + "NetworkInterface", + "WakeSupportedTransport", + NULL); + + wake_on_delay = xml_util_get_child_string_content_by_name( + device_if_node, + "NetworkInterface", + "MaxWakeOnDelay", + NULL); + + if (wake_on_delay == NULL) { + info->max_wake_on_delay = DLS_DEFAULT_WAKE_ON_DELAY; + } else { + info->max_wake_on_delay = atoi(wake_on_delay); + + g_free(wake_on_delay); + } + + if ((info->device_uuid == NULL || strlen(info->device_uuid) > 70) || + (info->mac_address == NULL || strlen(info->mac_address) != 17) || + (info->network_if_mode == NULL) || (info->ip_addresses == NULL) || + (info->wake_on_pattern == NULL)) + goto on_error; + + if (strcmp(info->device_uuid, udn)) + goto on_error; + + return info; + +on_error: + prv_free_network_if_info(info); + + return NULL; +} + +static GList *prv_network_if_info_decode(const gchar *info, const gchar *udn) +{ + xmlDoc *doc; + xmlNode *node; + GList *info_list = NULL; + dls_network_if_info_t *if_info; + + DLEYNA_LOG_DEBUG("Enter"); + + DLEYNA_LOG_DEBUG_NL(); + DLEYNA_LOG_DEBUG("NetworkInterfaceInfo XML: %s", info); + DLEYNA_LOG_DEBUG_NL(); + + doc = xmlParseMemory(info, strlen(info) + 1); + if (doc == NULL) { + DLEYNA_LOG_WARNING("XML: invalid document"); + + goto on_exit; + } + + node = xmlDocGetRootElement(doc); + if (node == NULL) { + DLEYNA_LOG_WARNING("XML: empty document"); + + goto on_exit; + } + + if (node->name == NULL) { + DLEYNA_LOG_WARNING("XML: empty document name"); + + goto on_exit; + } + + if (strcmp((char *)node->name, "NetworkInterfaceInfo")) { + DLEYNA_LOG_WARNING("XML: invalid document name"); + + goto on_exit; + } + + for (node = node->children; node; node = node->next) { + if (node->name != NULL && + !strcmp((char *)node->name, "DeviceInterface")) { + if_info = prv_get_network_if_info(node, udn); + + if (if_info != NULL) + info_list = g_list_prepend(info_list, if_info); + } + } + +on_exit: + DLEYNA_LOG_DEBUG("Exit"); + + if (doc != NULL) + xmlFreeDoc(doc); + + return info_list; +} + +static gboolean prv_get_device_sleeping_state(dls_device_t *device, + const gchar *network_if_info_xml, + gboolean *sleeping) +{ + dls_network_if_info_t *info; + GList *info_list; + GList *next; + unsigned int i; + dls_device_context_t *ctx; + gboolean found = FALSE; + const gchar *udn; + GList *next_ip; + guint ip_idx; + gchar *ip_address; + + DLEYNA_LOG_DEBUG("Enter"); + + if (device->contexts->len == 0) + goto on_exit; + + ctx = g_ptr_array_index(device->contexts, 0); + + udn = gupnp_device_info_get_udn((GUPnPDeviceInfo *)ctx->device_proxy); + + info_list = prv_network_if_info_decode(network_if_info_xml, udn); + if (info_list == NULL) { + DLEYNA_LOG_DEBUG("no UDN match found."); + + goto on_exit; + } + + DLEYNA_LOG_DEBUG("Device UUID = %s", udn); + + next = info_list; + while (next != NULL) { + info = (dls_network_if_info_t *)next->data; + for (i = 0; i < device->contexts->len; ++i) { + ctx = g_ptr_array_index(device->contexts, i); + + DLEYNA_LOG_DEBUG("Context[%u] - IP address = %s", + i, ctx->ip_address); + + next_ip = info->ip_addresses; + ip_idx = 0; + while (next_ip != NULL) { + ip_address = (gchar *)next_ip->data; + + DLEYNA_LOG_DEBUG( + "Network Interface Info - IP address #%u = %s", + ip_idx, ip_address); + + if (!strcmp(ctx->ip_address, ip_address)) { + found = TRUE; + + DLEYNA_LOG_DEBUG("IP+UDN match found"); + + break; + } + + next_ip = g_list_next(next_ip); + + ip_idx++; + } + + if (found) + break; + } + + next = g_list_next(next); + + if (found) + break; + } + + if (!found) { + DLEYNA_LOG_DEBUG("IP+UDN match not found, use UDN match only"); + + ctx = g_ptr_array_index(device->contexts, 0); + + info = (dls_network_if_info_t *)info_list->data; + + ip_idx = 0; + + found = TRUE; + } + + info->ip_address_position = ip_idx; + + DLEYNA_LOG_DEBUG("Matching Network Interface Info:"); + DLEYNA_LOG_DEBUG("- Mode = %s", info->network_if_mode); + DLEYNA_LOG_DEBUG("- Wake-on IP address = %s", + (gchar *)g_list_nth_data(info->ip_addresses, ip_idx)); + + if (!strcmp(info->network_if_mode, "IP-up")) + *sleeping = FALSE; + else + *sleeping = TRUE; + + prv_free_network_if_info(device->network_if_info); + + device->network_if_info = info; + + info_list = g_list_remove(info_list, info); + + g_list_free_full(info_list, (GDestroyNotify)prv_free_network_if_info); + +on_exit: + DLEYNA_LOG_DEBUG("Exit"); + + return found; +} + +static void prv_network_interface_info_cb(GUPnPServiceProxy *proxy, + const char *variable, + GValue *value, + gpointer user_data) +{ + dls_device_t *device = user_data; + GVariantBuilder *array; + GVariant *val; + gboolean sleeping; + + if (prv_get_device_sleeping_state(device, + g_value_get_string(value), + &sleeping)) { + device->sleeping = sleeping; + + array = g_variant_builder_new(G_VARIANT_TYPE("a{sv}")); + g_variant_builder_add(array, "{sv}", + DLS_INTERFACE_PROP_SLEEPING, + g_variant_new_boolean(sleeping)); + val = g_variant_new("(s@a{sv}as)", + DLEYNA_SERVER_INTERFACE_MEDIA_DEVICE, + g_variant_builder_end(array), + NULL); + + (void) dls_server_get_connector()->notify(device->connection, + device->path, + DLS_INTERFACE_PROPERTIES, + DLS_INTERFACE_PROPERTIES_CHANGED, + val, + NULL); + + g_variant_builder_unref(array); + } +} + static void prv_build_container_update_array(const gchar *root_path, const gchar *value, GVariantBuilder *builder) @@ -599,49 +1017,82 @@ g_variant_builder_unref(array); } -static gboolean prv_re_enable_subscription(gpointer user_data) +static gboolean prv_re_enable_cd_subscription(gpointer user_data) { dls_device_context_t *context = user_data; - context->timeout_id = 0; + context->cds.timeout_id = 0; return FALSE; } -static void prv_subscription_lost_cb(GUPnPServiceProxy *proxy, +static void prv_cd_subscription_lost_cb(GUPnPServiceProxy *proxy, const GError *reason, gpointer user_data) { dls_device_context_t *context = user_data; - if (!context->timeout_id) { - gupnp_service_proxy_set_subscribed(context->service_proxy, - TRUE); - context->timeout_id = g_timeout_add_seconds( + if (!context->cds.timeout_id) { + gupnp_service_proxy_set_subscribed(context->cds.proxy, TRUE); + context->cds.timeout_id = g_timeout_add_seconds( 10, - prv_re_enable_subscription, + prv_re_enable_cd_subscription, context); } else { - g_source_remove(context->timeout_id); - gupnp_service_proxy_remove_notify(context->service_proxy, + g_source_remove(context->cds.timeout_id); + gupnp_service_proxy_remove_notify(context->cds.proxy, DLS_SYSTEM_UPDATE_VAR, prv_system_update_cb, context->device); - gupnp_service_proxy_remove_notify(context->service_proxy, + gupnp_service_proxy_remove_notify(context->cds.proxy, DLS_CONTAINER_UPDATE_VAR, prv_container_update_cb, context->device); - gupnp_service_proxy_remove_notify(context->service_proxy, + gupnp_service_proxy_remove_notify(context->cds.proxy, DLS_LAST_CHANGE_VAR, prv_last_change_cb, context->device); - context->timeout_id = 0; - context->subscribed = FALSE; + context->cds.timeout_id = 0; + context->cds.subscribed = FALSE; + } +} + +static gboolean prv_re_enable_em_subscription(gpointer user_data) +{ + dls_device_context_t *context = user_data; + + context->cds.timeout_id = 0; + + return FALSE; +} + +static void prv_em_subscription_lost_cb(GUPnPServiceProxy *proxy, + const GError *reason, + gpointer user_data) +{ + dls_device_context_t *context = user_data; + + if (!context->ems.timeout_id) { + gupnp_service_proxy_set_subscribed(context->ems.proxy, TRUE); + context->ems.timeout_id = g_timeout_add_seconds( + 10, + prv_re_enable_em_subscription, + context); + } else { + g_source_remove(context->ems.timeout_id); + gupnp_service_proxy_remove_notify( + context->ems.proxy, + DLS_NETWORK_INTERFACE_INFO_VAR, + prv_network_interface_info_cb, + context->device); + + context->ems.timeout_id = 0; + context->ems.subscribed = FALSE; } } -void dls_device_subscribe_to_contents_change(dls_device_t *device) +void dls_device_subscribe_to_service_changes(dls_device_t *device) { dls_device_context_t *context; @@ -650,31 +1101,47 @@ DLEYNA_LOG_DEBUG("Subscribe for events on context: %s", context->ip_address); - gupnp_service_proxy_add_notify(context->service_proxy, - DLS_SYSTEM_UPDATE_VAR, - G_TYPE_UINT, - prv_system_update_cb, - device); - - gupnp_service_proxy_add_notify(context->service_proxy, - DLS_CONTAINER_UPDATE_VAR, - G_TYPE_STRING, - prv_container_update_cb, - device); - - gupnp_service_proxy_add_notify(context->service_proxy, - DLS_LAST_CHANGE_VAR, - G_TYPE_STRING, - prv_last_change_cb, - device); - - context->subscribed = TRUE; - gupnp_service_proxy_set_subscribed(context->service_proxy, TRUE); - - g_signal_connect(context->service_proxy, - "subscription-lost", - G_CALLBACK(prv_subscription_lost_cb), - context); + if (context->cds.proxy) { + gupnp_service_proxy_add_notify(context->cds.proxy, + DLS_SYSTEM_UPDATE_VAR, + G_TYPE_UINT, + prv_system_update_cb, + device); + + gupnp_service_proxy_add_notify(context->cds.proxy, + DLS_CONTAINER_UPDATE_VAR, + G_TYPE_STRING, + prv_container_update_cb, + device); + + gupnp_service_proxy_add_notify(context->cds.proxy, + DLS_LAST_CHANGE_VAR, + G_TYPE_STRING, + prv_last_change_cb, + device); + + context->cds.subscribed = TRUE; + gupnp_service_proxy_set_subscribed(context->cds.proxy, TRUE); + + g_signal_connect(context->cds.proxy, "subscription-lost", + G_CALLBACK(prv_cd_subscription_lost_cb), + context); + } + + if (context->ems.proxy) { + gupnp_service_proxy_add_notify(context->ems.proxy, + DLS_NETWORK_INTERFACE_INFO_VAR, + G_TYPE_STRING, + prv_network_interface_info_cb, + device); + + context->ems.subscribed = TRUE; + gupnp_service_proxy_set_subscribed(context->ems.proxy, TRUE); + + g_signal_connect(context->ems.proxy, "subscription-lost", + G_CALLBACK(prv_em_subscription_lost_cb), + context); + } } static void prv_feature_list_add_feature(gchar *root_path, @@ -1039,7 +1506,7 @@ device = (dls_device_t *)dleyna_service_task_get_user_data(task); device->construct_step++; - dls_device_subscribe_to_contents_change(device); + dls_device_subscribe_to_service_changes(device); *failed = FALSE; @@ -1141,7 +1608,7 @@ priv_t->vtable = dispatch_table; priv_t->property_map = property_map; - s_proxy = context->service_proxy; + s_proxy = context->cds.proxy; if (dev->construct_step < 1) dleyna_service_task_add(queue_id, prv_get_search_capabilities, @@ -1179,6 +1646,7 @@ dls_device_t *dls_device_new( dleyna_connector_id_t connection, GUPnPDeviceProxy *proxy, + GUPnPDeviceInfo *device_info, const gchar *ip_address, const dleyna_connector_dispatch_cb_t *dispatch_table, GHashTable *property_map, @@ -1197,10 +1665,12 @@ dev = g_new0(dls_device_t, 1); dev->connection = connection; - dev->contexts = g_ptr_array_new_with_free_func(prv_context_delete); + dev->contexts = g_ptr_array_new_with_free_func((GDestroyNotify) + dls_device_delete_context); dev->path = new_path; - context = dls_device_append_new_context(dev, ip_address, proxy); + context = dls_device_append_new_context(dev, ip_address, + proxy, device_info); dls_device_construct(dev, context, connection, dispatch_table, property_map, queue_id); @@ -1209,12 +1679,13 @@ } dls_device_context_t *dls_device_append_new_context(dls_device_t *device, - const gchar *ip_address, - GUPnPDeviceProxy *proxy) + const gchar *ip_address, + GUPnPDeviceProxy *proxy, + GUPnPDeviceInfo *device_info) { dls_device_context_t *context; - prv_context_new(ip_address, proxy, device, &context); + prv_context_new(ip_address, proxy, device_info, device, &context); g_ptr_array_add(device->contexts, context); return context; @@ -1495,8 +1966,13 @@ context = dls_device_get_context(task->target.device, client); + cb_data->proxy = context->cds.proxy; + + g_object_add_weak_pointer((G_OBJECT(context->cds.proxy)), + (gpointer *)&cb_data->proxy); + cb_data->action = - gupnp_service_proxy_begin_action(context->service_proxy, + gupnp_service_proxy_begin_action(cb_data->proxy, "Browse", prv_get_children_cb, cb_data, @@ -1517,11 +1993,6 @@ sort_by, NULL); - cb_data->proxy = context->service_proxy; - - g_object_add_weak_pointer((G_OBJECT(context->service_proxy)), - (gpointer *)&cb_data->proxy); - cb_data->cancel_id = g_cancellable_connect( cb_data->cancellable, G_CALLBACK(dls_async_task_cancelled_cb), @@ -1645,7 +2116,7 @@ } } -static gboolean prv_subscribed(const dls_device_t *device) +static gboolean prv_cds_subscribed(const dls_device_t *device) { dls_device_context_t *context; unsigned int i; @@ -1653,7 +2124,7 @@ for (i = 0; i < device->contexts->len; ++i) { context = g_ptr_array_index(device->contexts, i); - if (context->subscribed) { + if (context->cds.subscribed) { subscribed = TRUE; break; } @@ -1712,7 +2183,7 @@ DLEYNA_LOG_DEBUG("Enter"); - if (prv_subscribed(device)) { + if (prv_cds_subscribed(device)) { suid = device->system_update_id; cb_data->task.result = g_variant_ref_sink( @@ -1805,7 +2276,7 @@ DLEYNA_LOG_DEBUG("Enter"); - if (prv_subscribed(device)) { + if (prv_cds_subscribed(device)) { suid = device->system_update_id; cb_task_data = &cb_data->ut.get_all; @@ -1830,6 +2301,7 @@ (gpointer *)&cb_data->proxy); cb_data->proxy = proxy; + g_object_add_weak_pointer((G_OBJECT(proxy)), (gpointer *)&cb_data->proxy); @@ -1844,6 +2316,136 @@ DLEYNA_LOG_DEBUG("Exit"); } +static gboolean prv_ems_subscribed(const dls_device_t *device) +{ + dls_device_context_t *context; + unsigned int i; + gboolean subscribed = FALSE; + + for (i = 0; i < device->contexts->len; ++i) { + context = g_ptr_array_index(device->contexts, i); + if (context->ems.subscribed) { + subscribed = TRUE; + break; + } + } + + return subscribed; +} + +static void prv_sleeping_for_props_cb(GUPnPServiceProxy *proxy, + GUPnPServiceProxyAction *action, + gpointer user_data) +{ + GError *error = NULL; + const gchar *message; + gchar *info = NULL; + gboolean end; + dls_async_task_t *cb_data = user_data; + dls_async_get_all_t *cb_task_data; + gboolean sleeping; + + DLEYNA_LOG_DEBUG("Enter"); + + end = gupnp_service_proxy_end_action(proxy, action, &error, + "NetworkInterfaceInfo", + G_TYPE_STRING, + &info, NULL); + + if (!end || (info == NULL)) { + message = (error != NULL) ? error->message : "Invalid result"; + DLEYNA_LOG_WARNING("NetworkInterfaceInfo retrieval failed: %s", + message); + + cb_data->error = g_error_new(DLEYNA_SERVER_ERROR, + DLEYNA_ERROR_OPERATION_FAILED, + "GetInterfaceInfo failed: %s", + message); + goto on_complete; + } + + if (prv_get_device_sleeping_state(cb_data->task.target.device, + info, + &sleeping)) { + cb_task_data = &cb_data->ut.get_all; + g_variant_builder_add(cb_task_data->vb, "{sv}", + DLS_INTERFACE_PROP_SLEEPING, + g_variant_new_boolean(sleeping)); + + cb_data->task.result = g_variant_ref_sink(g_variant_builder_end( + cb_task_data->vb)); + } + + g_free(info); + +on_complete: + + (void) g_idle_add(dls_async_task_complete, cb_data); + g_cancellable_disconnect(cb_data->cancellable, cb_data->cancel_id); + + if (error) + g_error_free(error); + + DLEYNA_LOG_DEBUG("Exit"); +} + +static void prv_get_sleeping_for_props(GUPnPServiceProxy *proxy, + const dls_device_t *device, + dls_async_task_t *cb_data) +{ + dls_async_get_all_t *cb_task_data; + gboolean sleeping; + + DLEYNA_LOG_DEBUG("Enter"); + + cb_task_data = &cb_data->ut.get_all; + + if (proxy == NULL) + goto on_complete; + + if (prv_ems_subscribed(device)) { + sleeping = device->sleeping; + + g_variant_builder_add(cb_task_data->vb, "{sv}", + DLS_INTERFACE_PROP_SLEEPING, + g_variant_new_boolean(sleeping)); + + goto on_complete; + } + + cb_data->action = gupnp_service_proxy_begin_action( + proxy, "GetInterfaceInfo", + prv_sleeping_for_props_cb, + cb_data, + NULL); + + if (cb_data->proxy != NULL) + g_object_remove_weak_pointer((G_OBJECT(cb_data->proxy)), + (gpointer *)&cb_data->proxy); + + cb_data->proxy = proxy; + + g_object_add_weak_pointer((G_OBJECT(proxy)), + (gpointer *)&cb_data->proxy); + + if (!cb_data->cancel_id) + cb_data->cancel_id = g_cancellable_connect( + cb_data->cancellable, + G_CALLBACK(dls_async_task_cancelled_cb), + cb_data, NULL); + + return; + +on_complete: + + cb_data->task.result = g_variant_ref_sink(g_variant_builder_end( + cb_task_data->vb)); + + (void) g_idle_add(dls_async_task_complete, cb_data); + + DLEYNA_LOG_DEBUG("Exit"); +} + static int prv_get_media_server_version(const dls_device_t *device) { dls_device_context_t *context; @@ -1961,6 +2563,8 @@ DLEYNA_LOG_DEBUG("Enter"); + cb_task_data = &cb_data->ut.get_all; + end = gupnp_service_proxy_end_action(proxy, action, &error, "ResetToken", G_TYPE_STRING, &token, NULL); @@ -1977,22 +2581,28 @@ goto on_complete; } - cb_task_data = &cb_data->ut.get_all; g_variant_builder_add(cb_task_data->vb, "{sv}", DLS_INTERFACE_PROP_SV_SERVICE_RESET_TOKEN, g_variant_new_string(token)); - cb_data->task.result = g_variant_ref_sink(g_variant_builder_end( - cb_task_data->vb)); - DLEYNA_LOG_DEBUG("Service Reset %s", token); g_free(token); on_complete: - (void) g_idle_add(dls_async_task_complete, cb_data); - g_cancellable_disconnect(cb_data->cancellable, cb_data->cancel_id); + if ((!cb_data->error) && (cb_task_data->proxy)) + prv_get_sleeping_for_props(cb_task_data->proxy, + cb_data->task.target.device, + cb_data); + else { + cb_data->task.result = g_variant_ref_sink(g_variant_builder_end( + cb_task_data->vb)); + + (void) g_idle_add(dls_async_task_complete, cb_data); + g_cancellable_disconnect(cb_data->cancellable, + cb_data->cancel_id); + } if (error) g_error_free(error); @@ -2011,10 +2621,10 @@ if (prv_get_media_server_version(device) < 3) { cb_task_data = &cb_data->ut.get_all; - cb_data->task.result = g_variant_ref_sink(g_variant_builder_end( - cb_task_data->vb)); + prv_get_sleeping_for_props(cb_task_data->proxy, + device, cb_data); - goto on_complete; /* No error here, just skip the property */ + goto on_exit; /* No error here, just skip the property */ } cb_data->action = gupnp_service_proxy_begin_action( @@ -2037,13 +2647,107 @@ G_CALLBACK(dls_async_task_cancelled_cb), cb_data, NULL); +on_exit: + DLEYNA_LOG_DEBUG("Exit"); return; +} + +static void prv_sleeping_for_prop_cb(GUPnPServiceProxy *proxy, + GUPnPServiceProxyAction *action, + gpointer user_data) +{ + GError *error = NULL; + const gchar *message; + gchar *info = NULL; + gboolean end; + dls_async_task_t *cb_data = user_data; + gboolean sleeping; + + DLEYNA_LOG_DEBUG("Enter"); + + end = gupnp_service_proxy_end_action(proxy, action, &error, + "NetworkInterfaceInfo", + G_TYPE_STRING, + &info, NULL); + + if (!end || (info == NULL)) { + message = (error != NULL) ? error->message : "Invalid result"; + DLEYNA_LOG_WARNING("NetworkInterfaceInfo retrieval failed: %s", + message); + + cb_data->error = g_error_new(DLEYNA_SERVER_ERROR, + DLEYNA_ERROR_OPERATION_FAILED, + "GetNetworkInterfaceInfo failed: %s", + message); + + goto on_complete; + } + + if (prv_get_device_sleeping_state(cb_data->task.target.device, + info, + &sleeping)) { + cb_data->task.result = g_variant_ref_sink( + g_variant_new_boolean(sleeping)); + } + + g_free(info); on_complete: (void) g_idle_add(dls_async_task_complete, cb_data); + g_cancellable_disconnect(cb_data->cancellable, cb_data->cancel_id); + + if (error) + g_error_free(error); + + DLEYNA_LOG_DEBUG("Exit"); +} + +static void prv_get_sleeping_for_prop(GUPnPServiceProxy *proxy, + const dls_device_t *device, + dls_async_task_t *cb_data) +{ + gboolean sleeping; + + DLEYNA_LOG_DEBUG("Enter"); + + if (proxy == NULL) { + cb_data->error = g_error_new(DLEYNA_SERVER_ERROR, + DLEYNA_ERROR_UNKNOWN_PROPERTY, + "Unknown property"); + + (void) g_idle_add(dls_async_task_complete, cb_data); + + goto on_complete; + } else if ((device->contexts->len == 0) || prv_ems_subscribed(device)) { + sleeping = device->sleeping; + + cb_data->task.result = g_variant_ref_sink( + g_variant_new_boolean(sleeping)); + + (void) g_idle_add(dls_async_task_complete, cb_data); + + goto on_complete; + } + + cb_data->action = gupnp_service_proxy_begin_action( + proxy, "GetInterfaceInfo", + prv_sleeping_for_prop_cb, + cb_data, + NULL); + + cb_data->proxy = proxy; + + g_object_add_weak_pointer((G_OBJECT(proxy)), + (gpointer *)&cb_data->proxy); + + cb_data->cancel_id = g_cancellable_connect( + cb_data->cancellable, + G_CALLBACK(dls_async_task_cancelled_cb), + cb_data, NULL); +on_complete: DLEYNA_LOG_DEBUG("Exit"); } @@ -2193,7 +2897,7 @@ } cb_data->action = gupnp_service_proxy_begin_action( - context->service_proxy, "Browse", + context->cds.proxy, "Browse", prv_get_all_ms2spec_props_cb, cb_data, "ObjectID", G_TYPE_STRING, task->target.id, "BrowseFlag", G_TYPE_STRING, "BrowseMetadata", @@ -2203,9 +2907,9 @@ "SortCriteria", G_TYPE_STRING, "", NULL); - cb_data->proxy = context->service_proxy; + cb_data->proxy = context->cds.proxy; - g_object_add_weak_pointer((G_OBJECT(context->service_proxy)), + g_object_add_weak_pointer((G_OBJECT(context->cds.proxy)), (gpointer *)&cb_data->proxy); cb_data->cancel_id = g_cancellable_connect( @@ -2242,19 +2946,21 @@ cb_task_data->vb = g_variant_builder_new(G_VARIANT_TYPE("a{sv}")); cb_task_data->device_object = root_object; + cb_task_data->proxy = context->ems.proxy; if (!strcmp(task_data->interface_name, DLEYNA_SERVER_INTERFACE_MEDIA_DEVICE)) { if (root_object) { - dls_props_add_device( - (GUPnPDeviceInfo *)context->device_proxy, - task->target.device, - cb_task_data->vb); - + dls_props_add_device((GUPnPDeviceInfo *) + context->device_proxy, + context->device_info, + context->ems.proxy, + task->target.device, + cb_task_data->vb); prv_get_system_update_id_for_props( - context->service_proxy, - task->target.device, - cb_data); + context->cds.proxy, + task->target.device, + cb_data); } else { cb_data->error = g_error_new(DLEYNA_SERVER_ERROR, @@ -2269,11 +2975,12 @@ prv_get_all_ms2spec_props(context, cb_data); } else { if (root_object) - dls_props_add_device( - (GUPnPDeviceInfo *)context->device_proxy, - task->target.device, - cb_task_data->vb); - + dls_props_add_device((GUPnPDeviceInfo *) + context->device_proxy, + context->device_info, + context->ems.proxy, + task->target.device, + cb_task_data->vb); prv_get_all_ms2spec_props(context, cb_data); } @@ -2599,8 +3306,13 @@ goto on_error; } + cb_data->proxy = context->cds.proxy; + + g_object_add_weak_pointer((G_OBJECT(context->cds.proxy)), + (gpointer *)&cb_data->proxy); + cb_data->action = gupnp_service_proxy_begin_action( - context->service_proxy, "Browse", + cb_data->proxy, "Browse", prv_get_ms2spec_prop_cb, cb_data, "ObjectID", G_TYPE_STRING, cb_data->task.target.id, @@ -2613,11 +3325,6 @@ "", NULL); - cb_data->proxy = context->service_proxy; - - g_object_add_weak_pointer((G_OBJECT(context->service_proxy)), - (gpointer *)&cb_data->proxy); - cb_data->cancel_id = g_cancellable_connect( cb_data->cancellable, G_CALLBACK(dls_async_task_cancelled_cb), @@ -2647,7 +3354,10 @@ DLEYNA_LOG_DEBUG("Enter"); - context = dls_device_get_context(task->target.device, client); + if (task->target.device->contexts->len != 0) + context = dls_device_get_context(task->target.device, client); + else + context = task->target.device->sleeping_context; if (!strcmp(task_data->interface_name, DLEYNA_SERVER_INTERFACE_MEDIA_DEVICE)) { @@ -2656,27 +3366,35 @@ task_data->prop_name, DLS_INTERFACE_PROP_ESV_SYSTEM_UPDATE_ID)) { prv_get_system_update_id_for_prop( - context->service_proxy, + context->cds.proxy, task->target.device, cb_data); } else if (!strcmp( task_data->prop_name, DLS_INTERFACE_PROP_SV_SERVICE_RESET_TOKEN)) { prv_get_sr_token_for_prop( - context->service_proxy, + context->cds.proxy, + task->target.device, + cb_data); + } else if (!strcmp( + task_data->prop_name, + DLS_INTERFACE_PROP_SLEEPING)) { + prv_get_sleeping_for_prop( + context->ems.proxy, task->target.device, cb_data); } else { cb_data->task.result = dls_props_get_device_prop( - (GUPnPDeviceInfo *) - context->device_proxy, - task->target.device, - task_data->prop_name); + (GUPnPDeviceInfo *) + context->device_proxy, + context->device_info, + task->target.device, + task_data->prop_name); if (!cb_data->task.result) cb_data->error = g_error_new( - DLEYNA_SERVER_ERROR, + DLEYNA_SERVER_ERROR, DLEYNA_ERROR_UNKNOWN_PROPERTY, "Unknown property"); @@ -2702,7 +3420,7 @@ task_data->prop_name, DLS_INTERFACE_PROP_ESV_SYSTEM_UPDATE_ID)) { prv_get_system_update_id_for_prop( - context->service_proxy, + context->cds.proxy, task->target.device, cb_data); complete = TRUE; @@ -2710,17 +3428,27 @@ task_data->prop_name, DLS_INTERFACE_PROP_SV_SERVICE_RESET_TOKEN)) { prv_get_sr_token_for_prop( - context->service_proxy, + context->cds.proxy, + task->target.device, + cb_data); + complete = TRUE; + } else if (!strcmp( + task_data->prop_name, + DLS_INTERFACE_PROP_SLEEPING)) { + prv_get_sleeping_for_prop( + context->ems.proxy, task->target.device, cb_data); complete = TRUE; } else { cb_data->task.result = - dls_props_get_device_prop( + dls_props_get_device_prop( (GUPnPDeviceInfo *) context->device_proxy, + context->device_info, task->target.device, task_data->prop_name); + if (cb_data->task.result) { (void) g_idle_add( dls_async_task_complete, @@ -2919,8 +3647,13 @@ context = dls_device_get_context(task->target.device, client); + cb_data->proxy = context->cds.proxy; + + g_object_add_weak_pointer((G_OBJECT(context->cds.proxy)), + (gpointer *)&cb_data->proxy); + cb_data->action = gupnp_service_proxy_begin_action( - context->service_proxy, "Search", + cb_data->proxy, "Search", prv_search_cb, cb_data, "ContainerID", G_TYPE_STRING, task->target.id, @@ -2931,11 +3664,6 @@ "SortCriteria", G_TYPE_STRING, sort_by, NULL); - cb_data->proxy = context->service_proxy; - - g_object_add_weak_pointer((G_OBJECT(context->service_proxy)), - (gpointer *)&cb_data->proxy); - cb_data->cancel_id = g_cancellable_connect( cb_data->cancellable, G_CALLBACK(dls_async_task_cancelled_cb), @@ -3383,7 +4111,7 @@ dleyna_task_queue_set_user_data(queue_id, task); context = dls_device_get_context(task->target.device, client); - cb_data->proxy = context->service_proxy; + cb_data->proxy = context->cds.proxy; cb_task_data = &cb_data->ut.browse_objects; cb_task_data->queue_id = queue_id; @@ -3391,7 +4119,7 @@ cb_task_data->objects_id = objs; cb_task_data->object_count = length; - g_object_add_weak_pointer((G_OBJECT(context->service_proxy)), + g_object_add_weak_pointer((G_OBJECT(context->cds.proxy)), (gpointer *)&cb_data->proxy); cb_data->cancel_id = g_cancellable_connect( @@ -3427,9 +4155,15 @@ cb_task_data->vb = g_variant_builder_new(G_VARIANT_TYPE("a{sv}")); cb_task_data->prop_func = G_CALLBACK(prv_get_resource); cb_task_data->device_object = FALSE; + cb_task_data->proxy = context->ems.proxy; + + cb_data->proxy = context->cds.proxy; + + g_object_add_weak_pointer((G_OBJECT(context->cds.proxy)), + (gpointer *)&cb_data->proxy); cb_data->action = gupnp_service_proxy_begin_action( - context->service_proxy, "Browse", + cb_data->proxy, "Browse", prv_get_all_ms2spec_props_cb, cb_data, "ObjectID", G_TYPE_STRING, task->target.id, "BrowseFlag", G_TYPE_STRING, "BrowseMetadata", @@ -3439,11 +4173,6 @@ "SortCriteria", G_TYPE_STRING, "", NULL); - cb_data->proxy = context->service_proxy; - - g_object_add_weak_pointer((G_OBJECT(context->service_proxy)), - (gpointer *)&cb_data->proxy); - cb_data->cancel_id = g_cancellable_connect( cb_data->cancellable, G_CALLBACK(dls_async_task_cancelled_cb), @@ -4127,18 +4856,18 @@ DLEYNA_LOG_DEBUG("DIDL: %s", didl); DLEYNA_LOG_DEBUG_NL(); + cb_data->proxy = context->cds.proxy; + + g_object_add_weak_pointer((G_OBJECT(context->cds.proxy)), + (gpointer *)&cb_data->proxy); + cb_data->action = gupnp_service_proxy_begin_action( - context->service_proxy, "CreateObject", + cb_data->proxy, "CreateObject", prv_create_object_upload_cb, cb_data, "ContainerID", G_TYPE_STRING, parent_id, "Elements", G_TYPE_STRING, didl, NULL); - cb_data->proxy = context->service_proxy; - - g_object_add_weak_pointer((G_OBJECT(context->service_proxy)), - (gpointer *)&cb_data->proxy); - cb_data->cancel_id = g_cancellable_connect( cb_data->cancellable, G_CALLBACK(dls_async_task_cancelled_cb), @@ -4280,17 +5009,17 @@ context = dls_device_get_context(task->target.device, client); + cb_data->proxy = context->cds.proxy; + + g_object_add_weak_pointer((G_OBJECT(context->cds.proxy)), + (gpointer *)&cb_data->proxy); + cb_data->action = gupnp_service_proxy_begin_action( - context->service_proxy, "DestroyObject", + cb_data->proxy, "DestroyObject", prv_destroy_object_cb, cb_data, "ObjectID", G_TYPE_STRING, task->target.id, NULL); - cb_data->proxy = context->service_proxy; - - g_object_add_weak_pointer((G_OBJECT(context->service_proxy)), - (gpointer *)&cb_data->proxy); - cb_data->cancel_id = g_cancellable_connect(cb_data->cancellable, G_CALLBACK(dls_async_task_cancelled_cb), cb_data, NULL); @@ -4322,18 +5051,18 @@ DLEYNA_LOG_DEBUG("DIDL: %s", didl); + cb_data->proxy = context->cds.proxy; + + g_object_add_weak_pointer((G_OBJECT(context->cds.proxy)), + (gpointer *)&cb_data->proxy); + cb_data->action = gupnp_service_proxy_begin_action( - context->service_proxy, "CreateObject", + cb_data->proxy, "CreateObject", prv_create_container_cb, cb_data, "ContainerID", G_TYPE_STRING, parent_id, "Elements", G_TYPE_STRING, didl, NULL); - cb_data->proxy = context->service_proxy; - - g_object_add_weak_pointer((G_OBJECT(context->service_proxy)), - (gpointer *)&cb_data->proxy); - cb_data->cancel_id = g_cancellable_connect( cb_data->cancellable, G_CALLBACK(dls_async_task_cancelled_cb), @@ -4670,8 +5399,13 @@ context = dls_device_get_context(task->target.device, client); + cb_data->proxy = context->cds.proxy; + + g_object_add_weak_pointer((G_OBJECT(context->cds.proxy)), + (gpointer *)&cb_data->proxy); + cb_data->action = gupnp_service_proxy_begin_action( - context->service_proxy, "Browse", + cb_data->proxy, "Browse", prv_update_object_browse_cb, cb_data, "ObjectID", G_TYPE_STRING, task->target.id, "BrowseFlag", G_TYPE_STRING, "BrowseMetadata", @@ -4681,11 +5415,6 @@ "SortCriteria", G_TYPE_STRING, "", NULL); - cb_data->proxy = context->service_proxy; - - g_object_add_weak_pointer((G_OBJECT(context->service_proxy)), - (gpointer *)&cb_data->proxy); - cb_data->cancel_id = g_cancellable_connect(cb_data->cancellable, G_CALLBACK(dls_async_task_cancelled_cb), cb_data, NULL); @@ -4750,8 +5479,13 @@ context = dls_device_get_context(task->target.device, client); + cb_data->proxy = context->cds.proxy; + + g_object_add_weak_pointer((G_OBJECT(context->cds.proxy)), + (gpointer *)&cb_data->proxy); + cb_data->action = gupnp_service_proxy_begin_action( - context->service_proxy, "Browse", + cb_data->proxy, "Browse", prv_get_object_metadata_cb, cb_data, "ObjectID", G_TYPE_STRING, task->target.id, "BrowseFlag", G_TYPE_STRING, "BrowseMetadata", @@ -4761,11 +5495,6 @@ "SortCriteria", G_TYPE_STRING, "", NULL); - cb_data->proxy = context->service_proxy; - - g_object_add_weak_pointer((G_OBJECT(context->service_proxy)), - (gpointer *)&cb_data->proxy); - cb_data->cancel_id = g_cancellable_connect(cb_data->cancellable, G_CALLBACK(dls_async_task_cancelled_cb), cb_data, NULL); @@ -4852,18 +5581,18 @@ context = dls_device_get_context(task->target.device, client); + cb_data->proxy = context->cds.proxy; + + g_object_add_weak_pointer((G_OBJECT(context->cds.proxy)), + (gpointer *)&cb_data->proxy); + cb_data->action = gupnp_service_proxy_begin_action( - context->service_proxy, "CreateReference", + cb_data->proxy, "CreateReference", prv_create_reference_cb, cb_data, "ContainerID", G_TYPE_STRING, task->target.id, "ObjectID", G_TYPE_STRING, i_id, NULL); - cb_data->proxy = context->service_proxy; - - g_object_add_weak_pointer((G_OBJECT(context->service_proxy)), - (gpointer *)&cb_data->proxy); - cb_data->cancel_id = g_cancellable_connect( cb_data->cancellable, G_CALLBACK(dls_async_task_cancelled_cb), @@ -4949,7 +5678,6 @@ void dls_device_get_icon(dls_client_t *client, dls_task_t *task) { - GUPnPDeviceInfo *info; dls_device_context_t *context; dls_async_task_t *cb_data = (dls_async_task_t *)task; dls_device_t *device = task->target.device; @@ -4962,9 +5690,9 @@ } context = dls_device_get_context(device, client); - info = (GUPnPDeviceInfo *)context->device_proxy; - url = gupnp_device_info_get_icon_url(info, NULL, -1, -1, -1, FALSE, + url = gupnp_device_info_get_icon_url(context->device_info, + NULL, -1, -1, -1, FALSE, &device->icon.mime_type, NULL, NULL, NULL); if (url == NULL) { @@ -5008,3 +5736,471 @@ (void) g_idle_add(dls_async_task_complete, cb_data); } + +static void prv_free_tcp_data(dls_tcp_wake_t *tcp_data) +{ + if (tcp_data != NULL) { + g_free(tcp_data->buffer); + + g_object_unref(tcp_data->socket_connection); + + g_object_unref(tcp_data->output_stream); + + g_free(tcp_data); + } +} + +static gboolean prv_wake_on_timeout_elapsed(gpointer user_data) +{ + dls_device_t *device = user_data; + + DLEYNA_LOG_DEBUG("WAKE-ON time-out ellapsed."); + + dls_server_delete_sleeping_device(device); + + return FALSE; +} + +static void prv_start_wake_on_watcher(dls_device_t *device, guint timeout) +{ + if (device->wake_on_timeout_id) + (void) g_source_remove(device->wake_on_timeout_id); + + DLEYNA_LOG_DEBUG("Starting WAKE-ON watcher..."); + + device->wake_on_timeout_id = g_timeout_add_seconds( + timeout, + prv_wake_on_timeout_elapsed, + device); +} + +static void tcp_wake_cb(GObject *source, GAsyncResult *result, + gpointer user_data) +{ + dls_tcp_wake_t *tcp_data = (dls_tcp_wake_t *)user_data; + dls_async_task_t *cb_data = (dls_async_task_t *)tcp_data->task; + GError *tcp_error = NULL; + gssize written; + + DLEYNA_LOG_DEBUG("Enter"); + + if (tcp_data->socket_connection == NULL) { + tcp_data->socket_connection = + g_socket_client_connect_to_host_finish( + G_SOCKET_CLIENT(source), + result, &tcp_error); + + g_object_unref(source); + + g_object_unref(result); + + if (tcp_data->socket_connection == NULL) { + cb_data->error = g_error_new(DLEYNA_SERVER_ERROR, + DLEYNA_ERROR_IO, + "Failed to connect"); + if (tcp_error) { + DLEYNA_LOG_WARNING("Failed to connect: %s", + tcp_error->message); + g_error_free(tcp_error); + } + + goto on_complete; + } + + tcp_data->output_stream = + g_io_stream_get_output_stream( + G_IO_STREAM(tcp_data->socket_connection)); + + goto on_write; + } + + written = g_output_stream_write_finish(G_OUTPUT_STREAM(source), result, + &tcp_error); + + if (written < 0) { + cb_data->error = g_error_new(DLEYNA_SERVER_ERROR, + DLEYNA_ERROR_IO, + "Failed to write"); + if (tcp_error) { + DLEYNA_LOG_WARNING("Failed to write: %s", + tcp_error->message); + g_error_free(tcp_error); + } + + goto on_complete; + } + + tcp_data->sent += written; + + if (tcp_data->sent == tcp_data->to_send) + goto on_complete; + +on_write: + g_output_stream_write_async(tcp_data->output_stream, + tcp_data->buffer + tcp_data->sent, + tcp_data->to_send - tcp_data->sent, + G_PRIORITY_DEFAULT, + cb_data->cancellable, + tcp_wake_cb, tcp_data); + + goto on_exit; + +on_complete: + prv_free_tcp_data(tcp_data); + + if (!g_cancellable_is_cancelled(cb_data->cancellable)) { + (void) g_idle_add(dls_async_task_complete, cb_data); + + if (cb_data->task.target.device->sleeping_context != NULL) + prv_start_wake_on_watcher(cb_data->task.target.device, + tcp_data->max_wake_on_delay); + } + + g_cancellable_disconnect(cb_data->cancellable, cb_data->cancel_id); + +on_exit: + DLEYNA_LOG_DEBUG("Exit"); + + return; +} + +static gboolean prv_hex_char_to_byte(const gchar hex_char, uint8_t *byte) +{ + gchar ch; + gboolean result = TRUE; + + if (!g_ascii_isxdigit(hex_char)) + goto on_exit; + + ch = g_ascii_toupper(hex_char); + + if (ch >= '0' && ch <= '9') + *byte = ch - '0'; + else if (ch >= 'A' && ch <= 'F') + *byte = 10 + ch - 'A'; + +on_exit: + return result; +} + +static uint8_t *prv_hex_str_to_bin(const gchar *hex_str, gsize *out_len) +{ + gsize i; + gsize j; + uint8_t *buffer = NULL; + uint8_t byte; + gsize len; + + len = strlen(hex_str); + + if (len % 2 != 0) { + DLEYNA_LOG_WARNING("Invalid Hex String"); + goto on_exit; + } + + buffer = g_malloc(len / 2); + + for (i = 0, j = 0; i < len; i += 2, j++) { + if (!prv_hex_char_to_byte(hex_str[i], &buffer[j])) + goto on_error; + + if (!prv_hex_char_to_byte(hex_str[i+1], &byte)) + goto on_error; + + buffer[j] = (buffer[j] << 4) + byte; + } + + *out_len = j; + + goto on_exit; + +on_error: + g_free(buffer); + buffer = NULL; + +on_exit: + return buffer; +} + +static void prv_device_wake_tcp(guint8 *packet, gsize packet_len, + const gchar *host, + guint max_wake_on_delay, + dls_async_task_t *cb_data) +{ + GSocketClient *socket_client; + dls_tcp_wake_t *tcp_data; + + socket_client = g_socket_client_new(); + + tcp_data = g_new0(dls_tcp_wake_t, 1); + tcp_data->task = cb_data; + tcp_data->buffer = packet; + tcp_data->to_send = packet_len; + tcp_data->max_wake_on_delay = max_wake_on_delay; + + cb_data->cancel_id = + g_cancellable_connect(cb_data->cancellable, + G_CALLBACK(dls_async_task_cancelled_cb), + cb_data, NULL); + + g_socket_client_connect_to_host_async(socket_client, + host, DLS_DEFAULT_WAKE_PORT, + cb_data->cancellable, + tcp_wake_cb, tcp_data); +} + +static GError *prv_device_wake_udp(guint8 *packet, gsize packet_len, + GInetAddress *host_inet_address, + GSocketFamily socket_family, + gboolean broadcast) +{ + GSocket *socket; + GError *send_error = NULL; + GError *error = NULL; + gssize bytes_sent; + GSocketAddress *host_address = NULL; + + socket = g_socket_new(socket_family, + G_SOCKET_TYPE_DATAGRAM, + G_SOCKET_PROTOCOL_UDP, NULL); + + if (socket == NULL) { + error = g_error_new(DLEYNA_SERVER_ERROR, DLEYNA_ERROR_IO, + "Cannot create UDP socket"); + goto on_complete; + } + + host_address = g_inet_socket_address_new(host_inet_address, + DLS_DEFAULT_WAKE_PORT); + + g_socket_set_blocking(socket, FALSE); + + if (broadcast) + g_socket_set_broadcast(socket, broadcast); + + bytes_sent = g_socket_send_to(socket, host_address, + (const gchar *)packet, packet_len, + NULL, &send_error); + + if (bytes_sent == -1) { + error = g_error_new(DLEYNA_SERVER_ERROR, DLEYNA_ERROR_IO, + "Failed to send UDP packet"); + + DLEYNA_LOG_WARNING("Failed to send UDP packet: %s", + send_error->message); + + g_error_free(send_error); + } + +on_complete: + if (socket) { + g_socket_close(socket, NULL); + + g_object_unref(socket); + } + + if (host_address) + g_object_unref(host_address); + + return error; +} + +static gboolean prv_get_interface_ip_address(struct sockaddr *sock_address, + gchar *host) +{ + socklen_t sock_len; + gint family; + gboolean res = FALSE; + + family = sock_address->sa_family; + + if (family != AF_INET && family != AF_INET6) + goto on_exit; + + if (family == AF_INET) + sock_len = sizeof(struct sockaddr_in); + else + sock_len = sizeof(struct sockaddr_in6); + + if (getnameinfo(sock_address, sock_len, host, + NI_MAXHOST, NULL, 0, NI_NUMERICHOST) == 0) { + if (family == AF_INET6) + inet_ntop(AF_INET6, &sock_address, host, NI_MAXHOST); + + res = TRUE; + } + +on_exit: + return res; +} + +static gchar *prv_get_broadcast_ip_address(gchar *ip_address) +{ + struct ifaddrs *ifaddr; + struct ifaddrs *ifa; + char host[NI_MAXHOST]; + gchar *broadcast_ip_address = NULL; + + if (getifaddrs(&ifaddr) == -1) { + DLEYNA_LOG_WARNING("Failed to call getifaddrs"); + goto on_exit; + } + + ifa = ifaddr; + for (ifa = ifaddr; ifa != NULL; ifa = ifa->ifa_next) { + if ((ifa->ifa_addr == NULL) || + (!prv_get_interface_ip_address(ifa->ifa_addr, host)) || + strcmp(host, ip_address)) + continue; + + if ((ifa->ifa_flags & IFF_BROADCAST) && + (ifa->ifa_ifu.ifu_broadaddr != NULL) && + prv_get_interface_ip_address(ifa->ifa_ifu.ifu_broadaddr, + host)) { + broadcast_ip_address = g_strdup(host); + + break; + } + } + + freeifaddrs(ifaddr); + +on_exit: + + return broadcast_ip_address; +} + +void dls_device_wake(dls_client_t *client, dls_task_t *task) +{ + dls_device_context_t *context; + dls_async_task_t *cb_data = (dls_async_task_t *)task; + dls_device_t *device = task->target.device; + dls_network_if_info_t *info; + GSocketFamily socket_family; + GSocketProtocol socket_protocol; + GInetAddress *host_inet_address = NULL; + gboolean broadcast = FALSE; + gsize packet_len; + guint8 *packet = NULL; + gchar *wake_on_ip_address; + gchar *broadcast_ip_address = NULL; + + DLEYNA_LOG_DEBUG("Enter"); + + if (!device->sleeping) { + DLEYNA_LOG_DEBUG("Device is not sleeping"); + goto on_complete; + } + + context = dls_device_get_context(device, client); + + if ((context->ems.proxy == NULL) || + (device->network_if_info == NULL)) { + cb_data->error = g_error_new(DLEYNA_SERVER_ERROR, + DLEYNA_ERROR_NOT_SUPPORTED, + "Wake is not supported"); + goto on_complete; + } + + info = device->network_if_info; + + if ((info->wake_transport == NULL) || + !strcmp(info->wake_transport, "UDP-Broadcast")) { + socket_protocol = G_SOCKET_PROTOCOL_UDP; + broadcast = TRUE; + } else if (!strcmp(info->wake_transport, "UDP-Unicast")) { + socket_protocol = G_SOCKET_PROTOCOL_UDP; + } else if (!strcmp(info->wake_transport, "TCP-Unicast")) { + socket_protocol = G_SOCKET_PROTOCOL_TCP; + } else { + cb_data->error = g_error_new(DLEYNA_SERVER_ERROR, + DLEYNA_ERROR_NOT_SUPPORTED, + "Unsupported wake transport"); + goto on_complete; + } + + DLEYNA_LOG_DEBUG("MacAddress = %s", info->mac_address); + DLEYNA_LOG_DEBUG("DeviceUUID = %s", info->device_uuid); + DLEYNA_LOG_DEBUG("NetworkInterfaceMode = %s", info->network_if_mode); + DLEYNA_LOG_DEBUG("WakeOnPattern = %s", info->wake_on_pattern); + DLEYNA_LOG_DEBUG("WakeSupportedTransport = %s", info->wake_transport); + DLEYNA_LOG_DEBUG("WakeOnDelay = %u", info->max_wake_on_delay); + + wake_on_ip_address = (gchar *)g_list_nth_data(info->ip_addresses, + info->ip_address_position); + + DLEYNA_LOG_DEBUG("Context IP Address = %s", context->ip_address); + DLEYNA_LOG_DEBUG("Wake ON IP Address = %s", wake_on_ip_address); + + if (broadcast) { + broadcast_ip_address = prv_get_broadcast_ip_address( + context->ip_address); + + if (broadcast_ip_address != NULL) { + wake_on_ip_address = broadcast_ip_address; + + DLEYNA_LOG_DEBUG("Use Broadcast IP Address = %s", + broadcast_ip_address); + } + } + + host_inet_address = g_inet_address_new_from_string(wake_on_ip_address); + + if (host_inet_address == NULL) { + cb_data->error = g_error_new(DLEYNA_SERVER_ERROR, + DLEYNA_ERROR_HOST_FAILED, + "Invalid host address: %s", + wake_on_ip_address); + goto on_complete; + } + + socket_family = g_inet_address_get_family(host_inet_address); + + if ((socket_family != G_SOCKET_FAMILY_IPV4) && + (socket_family != G_SOCKET_FAMILY_IPV6)) { + cb_data->error = g_error_new(DLEYNA_SERVER_ERROR, + DLEYNA_ERROR_HOST_FAILED, + "Invalid host address family: %s", + wake_on_ip_address); + goto on_complete; + } + + packet = prv_hex_str_to_bin(info->wake_on_pattern, &packet_len); + + if (packet == NULL) { + cb_data->error = g_error_new(DLEYNA_SERVER_ERROR, + DLEYNA_ERROR_HOST_FAILED, + "Invalid wake on pattern"); + goto on_complete; + } + + if (socket_protocol == G_SOCKET_PROTOCOL_UDP) { + cb_data->error = prv_device_wake_udp(packet, packet_len, + host_inet_address, + socket_family, broadcast); + + if (device->sleeping_context != NULL) + prv_start_wake_on_watcher(device, + info->max_wake_on_delay); + } else { + prv_device_wake_tcp(packet, packet_len, wake_on_ip_address, + info->max_wake_on_delay, cb_data); + + goto on_exit; + } + +on_complete: + if (host_inet_address != NULL) + g_object_unref(host_inet_address); + + g_free(packet); + + (void) g_idle_add(dls_async_task_complete, cb_data); + +on_exit: + g_free(broadcast_ip_address); + + DLEYNA_LOG_DEBUG("Exit"); + + return; +} diff -Nru dleyna-server-0.4.0/libdleyna/server/device.h dleyna-server-0.5.0/libdleyna/server/device.h --- dleyna-server-0.4.0/libdleyna/server/device.h 2013-10-03 12:48:23.000000000 +0000 +++ dleyna-server-0.5.0/libdleyna/server/device.h 2014-12-06 11:52:12.000000000 +0000 @@ -32,13 +32,33 @@ #include "client.h" #include "props.h" +typedef struct dls_network_if_info_t_ dls_network_if_info_t; +struct dls_network_if_info_t_ { + gchar *system_name; + gchar *mac_address; + gchar *device_uuid; + gchar *network_if_mode; + gchar *wake_on_pattern; + gchar *wake_transport; + guint max_wake_on_delay; + GList *ip_addresses; + guint ip_address_position; +}; + +typedef struct dls_service_t_ dls_service_t; +struct dls_service_t_ { + GUPnPServiceProxy *proxy; + gboolean subscribed; + guint timeout_id; +}; + struct dls_device_context_t_ { gchar *ip_address; GUPnPDeviceProxy *device_proxy; - GUPnPServiceProxy *service_proxy; + GUPnPDeviceInfo *device_info; dls_device_t *device; - gboolean subscribed; - guint timeout_id; + dls_service_t cds; + dls_service_t ems; }; typedef struct dls_device_icon_t_ dls_device_icon_t; @@ -53,6 +73,8 @@ guint id; gchar *path; GPtrArray *contexts; + dls_device_context_t *sleeping_context; + guint wake_on_timeout_id; guint timeout_id; GHashTable *uploads; GHashTable *upload_jobs; @@ -66,11 +88,15 @@ gboolean has_last_change; guint construct_step; dls_device_icon_t icon; + gboolean sleeping; + dls_network_if_info_t *network_if_info; }; dls_device_context_t *dls_device_append_new_context(dls_device_t *device, - const gchar *ip_address, - GUPnPDeviceProxy *proxy); + const gchar *ip_address, + GUPnPDeviceProxy *proxy, + GUPnPDeviceInfo *device_info); + void dls_device_delete(void *device); void dls_device_unsubscribe(void *device); @@ -86,6 +112,7 @@ dls_device_t *dls_device_new( dleyna_connector_id_t connection, GUPnPDeviceProxy *proxy, + GUPnPDeviceInfo *device_info, const gchar *ip_address, const dleyna_connector_dispatch_cb_t *dispatch_table, GHashTable *filter_map, @@ -97,6 +124,8 @@ dls_device_context_t *dls_device_get_context(const dls_device_t *device, dls_client_t *client); +void dls_device_delete_context(dls_device_context_t *context); + void dls_device_get_children(dls_client_t *client, dls_task_t *task, const gchar *upnp_filter, const gchar *sort_by); @@ -120,7 +149,7 @@ dls_task_t *task, const gchar *upnp_filter); -void dls_device_subscribe_to_contents_change(dls_device_t *device); +void dls_device_subscribe_to_service_changes(dls_device_t *device); void dls_device_upload(dls_client_t *client, dls_task_t *task, const gchar *parent_id); @@ -152,4 +181,7 @@ void dls_device_get_icon(dls_client_t *client, dls_task_t *task); +void dls_device_wake(dls_client_t *client, + dls_task_t *task); + #endif /* DLS_DEVICE_H__ */ diff -Nru dleyna-server-0.4.0/libdleyna/server/dleyna-server-1.0.pc.in dleyna-server-0.5.0/libdleyna/server/dleyna-server-1.0.pc.in --- dleyna-server-0.4.0/libdleyna/server/dleyna-server-1.0.pc.in 2013-08-29 13:53:03.000000000 +0000 +++ dleyna-server-0.5.0/libdleyna/server/dleyna-server-1.0.pc.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,11 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libexecdir=@libexecdir@ -includedir=${prefix}/include -libdir=@libdir@/@PACKAGE@ - -Name: @PACKAGE@ -Description: UPnP & DLNA server library -Libs: -L${libdir} -ldleyna-server-1.0 -Requires.private: glib-2.0 gio-2.0 gupnp-1.0 gupnp-av-1.0 dleyna-core-1.0 -Version: @VERSION@ \ No newline at end of file diff -Nru dleyna-server-0.4.0/libdleyna/server/dleyna-server-service.conf dleyna-server-0.5.0/libdleyna/server/dleyna-server-service.conf --- dleyna-server-0.4.0/libdleyna/server/dleyna-server-service.conf 2013-10-03 13:20:53.000000000 +0000 +++ dleyna-server-0.5.0/libdleyna/server/dleyna-server-service.conf 2014-12-10 18:19:50.000000000 +0000 @@ -12,6 +12,8 @@ # IPC connector name connector-name=dbus +# Source port for SSDP messages +#port=4321 # Log configuration options [log] @@ -35,7 +37,7 @@ # IMPORTANT: This log level is a subset of the log level defined at compile time # You can't enable levels disabled at compile time # level=8 means all level flags defined at compile time. -log-level=8 +log-level=7 # Network filtering diff -Nru dleyna-server-0.4.0/libdleyna/server/dleyna-server-service.conf.in dleyna-server-0.5.0/libdleyna/server/dleyna-server-service.conf.in --- dleyna-server-0.4.0/libdleyna/server/dleyna-server-service.conf.in 2013-08-29 13:53:03.000000000 +0000 +++ dleyna-server-0.5.0/libdleyna/server/dleyna-server-service.conf.in 2014-12-06 11:52:12.000000000 +0000 @@ -12,6 +12,8 @@ # IPC connector name connector-name=@with_connector_name@ +# Source port for SSDP messages +#port=4321 # Log configuration options [log] diff -Nru dleyna-server-0.4.0/libdleyna/server/interface.h dleyna-server-0.5.0/libdleyna/server/interface.h --- dleyna-server-0.4.0/libdleyna/server/interface.h 2013-10-03 12:48:23.000000000 +0000 +++ dleyna-server-0.5.0/libdleyna/server/interface.h 2014-12-06 11:52:12.000000000 +0000 @@ -85,6 +85,7 @@ /* Device Properties */ #define DLS_INTERFACE_PROP_LOCATION "Location" #define DLS_INTERFACE_PROP_UDN "UDN" +#define DLS_INTERFACE_PROP_ROOT_UDN "RootUDN" #define DLS_INTERFACE_PROP_DEVICE_TYPE "DeviceType" #define DLS_INTERFACE_PROP_FRIENDLY_NAME "FriendlyName" #define DLS_INTERFACE_PROP_MANUFACTURER "Manufacturer" @@ -96,6 +97,7 @@ #define DLS_INTERFACE_PROP_SERIAL_NUMBER "SerialNumber" #define DLS_INTERFACE_PROP_PRESENTATION_URL "PresentationURL" #define DLS_INTERFACE_PROP_ICON_URL "IconURL" +#define DLS_INTERFACE_PROP_SLEEPING "Sleeping" #define DLS_INTERFACE_PROP_SV_DLNA_CAPABILITIES "DLNACaps" #define DLS_INTERFACE_PROP_SV_SEARCH_CAPABILITIES "SearchCaps" #define DLS_INTERFACE_PROP_SV_SORT_CAPABILITIES "SortCaps" @@ -215,6 +217,7 @@ #define DLS_INTERFACE_ICON_BYTES "Bytes" #define DLS_INTERFACE_MIME_TYPE "MimeType" #define DLS_INTERFACE_REQ_MIME_TYPE "RequestedMimeType" +#define DLS_INTERFACE_WAKE "Wake" #define DLS_INTERFACE_GET_METADATA "GetMetaData" #define DLS_INTERFACE_METADATA "MetaData" diff -Nru dleyna-server-0.4.0/libdleyna/server/Makefile.am dleyna-server-0.5.0/libdleyna/server/Makefile.am --- dleyna-server-0.4.0/libdleyna/server/Makefile.am 2013-08-29 13:53:03.000000000 +0000 +++ dleyna-server-0.5.0/libdleyna/server/Makefile.am 2014-12-06 11:52:12.000000000 +0000 @@ -1,5 +1,3 @@ -libdleyna_serverincdir = $(includedir)/dleyna-1.0/libdleyna/server - DLEYNA_SERVER_VERSION = 1:3:0 AM_CFLAGS = $(GLIB_CFLAGS) \ @@ -10,13 +8,14 @@ $(GUPNPAV_CFLAGS) \ $(GUPNPDLNA_CFLAGS) \ $(SOUP_CFLAGS) \ + $(LIBXML_CFLAGS) \ -include config.h -ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} - pkglib_LTLIBRARIES = libdleyna-server-1.0.la -libdleyna_serverinc_HEADERS = control-point-server.h +libdleyna_serverincdir = $(includedir)/dleyna-1.0/libdleyna/server + +libdleyna_serverinc_HEADERS = control-point-server.h libdleyna_server_1_0_la_LDFLAGS = -version-info $(DLEYNA_SERVER_VERSION) \ -no-undefined @@ -31,7 +30,8 @@ search.c \ sort.c \ task.c \ - upnp.c + upnp.c \ + xml-util.c libdleyna_server_1_0_la_LIBADD = $(GLIB_LIBS) \ $(GIO_LIBS) \ @@ -40,7 +40,8 @@ $(GUPNP_LIBS) \ $(GUPNPAV_LIBS) \ $(GUPNPDLNA_LIBS) \ - $(SOUP_LIBS) + $(SOUP_LIBS) \ + $(LIBXML_LIBS) MAINTAINERCLEANFILES = Makefile.in \ aclocal.m4 \ @@ -54,9 +55,6 @@ sysconf_DATA = dleyna-server-service.conf -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = dleyna-server-1.0.pc - EXTRA_DIST = $(sysconf_DATA) \ async.h \ client.h \ @@ -69,10 +67,11 @@ server.h \ sort.h \ task.h \ - upnp.h + upnp.h \ + xml-util.h -CLEANFILES = $(pkgconfig_DATA) dleyna-server-service.conf -DISTCLEANFILES = $(pkgconfig_DATA) dleyna-server-service.conf +CLEANFILES = dleyna-server-service.conf +DISTCLEANFILES = dleyna-server-service.conf maintainer-clean-local: rm -rf build-aux diff -Nru dleyna-server-0.4.0/libdleyna/server/Makefile.in dleyna-server-0.5.0/libdleyna/server/Makefile.in --- dleyna-server-0.4.0/libdleyna/server/Makefile.in 2013-10-03 13:20:49.000000000 +0000 +++ dleyna-server-0.5.0/libdleyna/server/Makefile.in 2014-12-06 11:53:26.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 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. @@ -18,23 +17,51 @@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -54,9 +81,9 @@ build_triplet = @build@ host_triplet = @host@ subdir = libdleyna/server -DIST_COMMON = $(libdleyna_serverinc_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(srcdir)/dleyna-server-1.0.pc.in \ - $(srcdir)/dleyna-server-service.conf.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(srcdir)/dleyna-server-service.conf.in \ + $(top_srcdir)/build-aux/depcomp $(libdleyna_serverinc_HEADERS) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/compiler-flags.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/log.m4 \ @@ -67,7 +94,7 @@ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = dleyna-server-1.0.pc dleyna-server-service.conf +CONFIG_CLEAN_FILES = dleyna-server-service.conf CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ @@ -96,8 +123,7 @@ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } -am__installdirs = "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(pkgconfigdir)" \ - "$(DESTDIR)$(sysconfdir)" \ +am__installdirs = "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(sysconfdir)" \ "$(DESTDIR)$(libdleyna_serverincdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) am__DEPENDENCIES_1 = @@ -105,20 +131,33 @@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) am__objects_1 = am_libdleyna_server_1_0_la_OBJECTS = $(am__objects_1) server.lo \ async.lo device.lo manager.lo path.lo props.lo search.lo \ - sort.lo task.lo upnp.lo + sort.lo task.lo upnp.lo xml-util.lo libdleyna_server_1_0_la_OBJECTS = \ $(am_libdleyna_server_1_0_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent +am__v_lt_1 = libdleyna_server_1_0_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(libdleyna_server_1_0_la_LDFLAGS) \ $(LDFLAGS) -o $@ +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles @@ -131,20 +170,16 @@ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) -am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) -am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(libdleyna_server_1_0_la_SOURCES) DIST_SOURCES = $(libdleyna_server_1_0_la_SOURCES) am__can_run_installinfo = \ @@ -152,8 +187,25 @@ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac -DATA = $(pkgconfig_DATA) $(sysconf_DATA) +DATA = $(sysconf_DATA) HEADERS = $(libdleyna_serverinc_HEADERS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -211,6 +263,8 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ +LIBXML_CFLAGS = @LIBXML_CFLAGS@ +LIBXML_LIBS = @LIBXML_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ @@ -299,7 +353,6 @@ with_connector_name = @with_connector_name@ with_log_level = @with_log_level@ with_log_type = @with_log_type@ -libdleyna_serverincdir = $(includedir)/dleyna-1.0/libdleyna/server DLEYNA_SERVER_VERSION = 1:3:0 AM_CFLAGS = $(GLIB_CFLAGS) \ $(GIO_CFLAGS) \ @@ -309,10 +362,11 @@ $(GUPNPAV_CFLAGS) \ $(GUPNPDLNA_CFLAGS) \ $(SOUP_CFLAGS) \ + $(LIBXML_CFLAGS) \ -include config.h -ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} pkglib_LTLIBRARIES = libdleyna-server-1.0.la +libdleyna_serverincdir = $(includedir)/dleyna-1.0/libdleyna/server libdleyna_serverinc_HEADERS = control-point-server.h libdleyna_server_1_0_la_LDFLAGS = -version-info $(DLEYNA_SERVER_VERSION) \ -no-undefined @@ -327,7 +381,8 @@ search.c \ sort.c \ task.c \ - upnp.c + upnp.c \ + xml-util.c libdleyna_server_1_0_la_LIBADD = $(GLIB_LIBS) \ $(GIO_LIBS) \ @@ -336,7 +391,8 @@ $(GUPNP_LIBS) \ $(GUPNPAV_LIBS) \ $(GUPNPDLNA_LIBS) \ - $(SOUP_LIBS) + $(SOUP_LIBS) \ + $(LIBXML_LIBS) MAINTAINERCLEANFILES = Makefile.in \ aclocal.m4 \ @@ -349,8 +405,6 @@ build-aux/install-sh sysconf_DATA = dleyna-server-service.conf -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = dleyna-server-1.0.pc EXTRA_DIST = $(sysconf_DATA) \ async.h \ client.h \ @@ -363,10 +417,11 @@ server.h \ sort.h \ task.h \ - upnp.h + upnp.h \ + xml-util.h -CLEANFILES = $(pkgconfig_DATA) dleyna-server-service.conf -DISTCLEANFILES = $(pkgconfig_DATA) dleyna-server-service.conf +CLEANFILES = dleyna-server-service.conf +DISTCLEANFILES = dleyna-server-service.conf all: all-am .SUFFIXES: @@ -401,10 +456,9 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): -dleyna-server-1.0.pc: $(top_builddir)/config.status $(srcdir)/dleyna-server-1.0.pc.in - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ dleyna-server-service.conf: $(top_builddir)/config.status $(srcdir)/dleyna-server-service.conf.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ + install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ @@ -431,12 +485,15 @@ clean-pkglibLTLIBRARIES: -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) - @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done + @list='$(pkglib_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } + libdleyna-server-1.0.la: $(libdleyna_server_1_0_la_OBJECTS) $(libdleyna_server_1_0_la_DEPENDENCIES) $(EXTRA_libdleyna_server_1_0_la_DEPENDENCIES) $(AM_V_CCLD)$(libdleyna_server_1_0_la_LINK) -rpath $(pkglibdir) $(libdleyna_server_1_0_la_OBJECTS) $(libdleyna_server_1_0_la_LIBADD) $(LIBS) @@ -456,6 +513,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sort.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/task.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/upnp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xml-util.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @@ -486,27 +544,6 @@ clean-libtool: -rm -rf .libs _libs -install-pkgconfigDATA: $(pkgconfig_DATA) - @$(NORMAL_INSTALL) - @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \ - fi; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ - done - -uninstall-pkgconfigDATA: - @$(NORMAL_UNINSTALL) - @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) install-sysconfDATA: $(sysconf_DATA) @$(NORMAL_INSTALL) @list='$(sysconf_DATA)'; test -n "$(sysconfdir)" || list=; \ @@ -550,26 +587,15 @@ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(libdleyna_serverincdir)'; $(am__uninstall_files_from_dir) -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -581,15 +607,11 @@ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -598,6 +620,21 @@ here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -636,7 +673,7 @@ check: check-am all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) installdirs: - for dir in "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(sysconfdir)" "$(DESTDIR)$(libdleyna_serverincdir)"; do \ + for dir in "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(sysconfdir)" "$(DESTDIR)$(libdleyna_serverincdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am @@ -695,8 +732,7 @@ info-am: -install-data-am: install-libdleyna_serverincHEADERS \ - install-pkgconfigDATA +install-data-am: install-libdleyna_serverincHEADERS install-dvi: install-dvi-am @@ -744,26 +780,25 @@ ps-am: uninstall-am: uninstall-libdleyna_serverincHEADERS \ - uninstall-pkgconfigDATA uninstall-pkglibLTLIBRARIES \ - uninstall-sysconfDATA + uninstall-pkglibLTLIBRARIES uninstall-sysconfDATA .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-pkglibLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am \ - install-libdleyna_serverincHEADERS install-man install-pdf \ - install-pdf-am install-pkgconfigDATA install-pkglibLTLIBRARIES \ +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-pkglibLTLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-libdleyna_serverincHEADERS install-man \ + install-pdf install-pdf-am install-pkglibLTLIBRARIES \ install-ps install-ps-am install-strip install-sysconfDATA \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic maintainer-clean-local mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am \ - uninstall-libdleyna_serverincHEADERS uninstall-pkgconfigDATA \ + pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ + uninstall-libdleyna_serverincHEADERS \ uninstall-pkglibLTLIBRARIES uninstall-sysconfDATA diff -Nru dleyna-server-0.4.0/libdleyna/server/props.c dleyna-server-0.5.0/libdleyna/server/props.c --- dleyna-server-0.4.0/libdleyna/server/props.c 2013-10-03 12:48:23.000000000 +0000 +++ dleyna-server-0.5.0/libdleyna/server/props.c 2014-12-06 11:52:12.000000000 +0000 @@ -715,7 +715,9 @@ return g_variant_builder_end(&vb); } -void dls_props_add_device(GUPnPDeviceInfo *proxy, +void dls_props_add_device(GUPnPDeviceInfo *root_proxy, + GUPnPDeviceInfo *proxy, + GUPnPServiceProxy *ems_proxy, const dls_device_t *device, GVariantBuilder *vb) { @@ -729,6 +731,10 @@ prv_add_string_prop(vb, DLS_INTERFACE_PROP_UDN, gupnp_device_info_get_udn(proxy)); + if (proxy != root_proxy) + prv_add_string_prop(vb, DLS_INTERFACE_PROP_ROOT_UDN, + gupnp_device_info_get_udn(root_proxy)); + prv_add_string_prop(vb, DLS_INTERFACE_PROP_DEVICE_TYPE, gupnp_device_info_get_device_type(proxy)); @@ -804,7 +810,8 @@ device->feature_list); } -GVariant *dls_props_get_device_prop(GUPnPDeviceInfo *proxy, +GVariant *dls_props_get_device_prop(GUPnPDeviceInfo *root_proxy, + GUPnPDeviceInfo *proxy, const dls_device_t *device, const gchar *prop) { @@ -818,6 +825,9 @@ str = gupnp_device_info_get_location(proxy); } else if (!strcmp(DLS_INTERFACE_PROP_UDN, prop)) { str = gupnp_device_info_get_udn(proxy); + } else if (!strcmp(DLS_INTERFACE_PROP_ROOT_UDN, prop)) { + if (proxy != root_proxy) + str = gupnp_device_info_get_udn(root_proxy); } else if (!strcmp(DLS_INTERFACE_PROP_DEVICE_TYPE, prop)) { str = gupnp_device_info_get_device_type(proxy); } else if (!strcmp(DLS_INTERFACE_PROP_FRIENDLY_NAME, prop)) { diff -Nru dleyna-server-0.4.0/libdleyna/server/props.h dleyna-server-0.5.0/libdleyna/server/props.h --- dleyna-server-0.4.0/libdleyna/server/props.h 2013-10-03 12:48:23.000000000 +0000 +++ dleyna-server-0.5.0/libdleyna/server/props.h 2014-12-06 11:52:12.000000000 +0000 @@ -93,11 +93,14 @@ dls_upnp_prop_mask *mask, gchar **upnp_filter); -void dls_props_add_device(GUPnPDeviceInfo *proxy, +void dls_props_add_device(GUPnPDeviceInfo *root_proxy, + GUPnPDeviceInfo *proxy, + GUPnPServiceProxy *ems_proxy, const dls_device_t *device, GVariantBuilder *vb); -GVariant *dls_props_get_device_prop(GUPnPDeviceInfo *proxy, +GVariant *dls_props_get_device_prop(GUPnPDeviceInfo *root_proxy, + GUPnPDeviceInfo *proxy, const dls_device_t *device, const gchar *prop); diff -Nru dleyna-server-0.4.0/libdleyna/server/server.c dleyna-server-0.5.0/libdleyna/server/server.c --- dleyna-server-0.4.0/libdleyna/server/server.c 2013-10-03 12:48:23.000000000 +0000 +++ dleyna-server-0.5.0/libdleyna/server/server.c 2014-12-06 11:52:12.000000000 +0000 @@ -150,8 +150,7 @@ " " " " " " - " " + " " " " " " " " @@ -440,6 +439,8 @@ " " " " " " + " " + " " " " " " @@ -468,11 +469,9 @@ " access='read'/>" " " - " " - " " " " @@ -486,6 +485,8 @@ " access='read'/>" " " + " " " " @@ -550,7 +551,7 @@ dls_task_complete(task); break; case DLS_TASK_GET_SERVERS: - task->result = dls_upnp_get_server_ids(g_context.upnp); + task->result = dls_upnp_get_device_ids(g_context.upnp); dls_task_complete(task); break; case DLS_TASK_RESCAN: @@ -702,6 +703,10 @@ dls_upnp_get_icon(g_context.upnp, client, task, prv_async_task_complete); break; + case DLS_TASK_WAKE: + dls_upnp_wake(g_context.upnp, client, task, + prv_async_task_complete); + break; default: break; } @@ -937,7 +942,13 @@ } *device = dls_device_from_path(*root_path, - dls_upnp_get_server_udn_map(g_context.upnp)); + dls_upnp_get_device_udn_map(g_context.upnp)); + + if (*device == NULL) { + *device = dls_device_from_path(*root_path, + dls_upnp_get_sleeping_device_udn_map( + g_context.upnp)); + } if (*device == NULL) { DLEYNA_LOG_WARNING("Cannot locate device for %s", *root_path); @@ -960,6 +971,20 @@ return FALSE; } +gboolean dls_server_is_device_sleeping(dls_device_t *dev) +{ + if (dev->sleeping_context != NULL) + return TRUE; + else + return dev->sleeping; +} + +void dls_server_delete_sleeping_device(dls_device_t *dev) +{ + if (dev->sleeping_context != NULL) + dls_upnp_delete_sleeping_device(g_context.upnp, dev); +} + static const gchar *prv_get_device_id(const gchar *object, GError **error) { dls_device_t *device; @@ -983,7 +1008,8 @@ static void prv_object_method_call(dleyna_connector_id_t conn, const gchar *sender, const gchar *object, const gchar *interface, - const gchar *method, GVariant *parameters, + const gchar *method, + GVariant *parameters, dleyna_connector_msg_id_t invocation) { dls_task_t *task; @@ -1014,9 +1040,11 @@ } static void prv_item_method_call(dleyna_connector_id_t conn, - const gchar *sender, const gchar *object, + const gchar *sender, + const gchar *object, const gchar *interface, - const gchar *method, GVariant *parameters, + const gchar *method, + GVariant *parameters, dleyna_connector_msg_id_t invocation) { dls_task_t *task; @@ -1149,9 +1177,11 @@ } static void prv_device_method_call(dleyna_connector_id_t conn, - const gchar *sender, const gchar *object, + const gchar *sender, + const gchar *object, const gchar *interface, - const gchar *method, GVariant *parameters, + const gchar *method, + GVariant *parameters, dleyna_connector_msg_id_t invocation) { dls_task_t *task; @@ -1183,6 +1213,8 @@ } else if (!strcmp(method, DLS_INTERFACE_BROWSE_OBJECTS)) { task = dls_task_browse_objects_new(invocation, object, parameters, &error); + } else if (!strcmp(method, DLS_INTERFACE_WAKE)) { + task = dls_task_wake_new(invocation, object, &error); } else if (!strcmp(method, DLS_INTERFACE_CANCEL)) { task = NULL; @@ -1294,6 +1326,7 @@ if (g_context.dls_id[DLS_MANAGER_INTERFACE_MANAGER]) { g_context.upnp = dls_upnp_new(connection, + dleyna_settings_port(g_context.settings), g_server_vtables, prv_found_media_server, prv_lost_media_server, diff -Nru dleyna-server-0.4.0/libdleyna/server/server.h dleyna-server-0.5.0/libdleyna/server/server.h --- dleyna-server-0.4.0/libdleyna/server/server.h 2013-08-29 13:53:03.000000000 +0000 +++ dleyna-server-0.5.0/libdleyna/server/server.h 2014-12-06 11:52:12.000000000 +0000 @@ -40,6 +40,10 @@ dls_upnp_t *dls_server_get_upnp(void); +gboolean dls_server_is_device_sleeping(dls_device_t *dev); + +void dls_server_delete_sleeping_device(dls_device_t *dev); + dleyna_task_processor_t *dls_server_get_task_processor(void); const dleyna_connector_t *dls_server_get_connector(void); diff -Nru dleyna-server-0.4.0/libdleyna/server/task.c dleyna-server-0.5.0/libdleyna/server/task.c --- dleyna-server-0.4.0/libdleyna/server/task.c 2013-10-03 12:48:23.000000000 +0000 +++ dleyna-server-0.5.0/libdleyna/server/task.c 2014-12-06 11:52:12.000000000 +0000 @@ -97,6 +97,8 @@ g_free(task->ut.get_icon.resolution); g_free(task->ut.get_icon.mime_type); break; + case DLS_TASK_WAKE: + break; default: break; } @@ -220,6 +222,24 @@ &task->target.device, error); } +static gboolean prv_is_task_allowed(dls_task_t *task, GError **error) +{ + if (dls_server_is_device_sleeping(task->target.device)) { + if (task->type != DLS_TASK_WAKE && + task->type != DLS_TASK_GET_PROP) + goto on_error; + } + + return TRUE; + +on_error: + *error = g_error_new(DLEYNA_SERVER_ERROR, + DLEYNA_ERROR_OPERATION_FAILED, + "Target device is sleeping"); + + return FALSE; +} + static dls_task_t *prv_m2spec_task_new(dls_task_type_t type, dleyna_connector_msg_id_t invocation, const gchar *path, @@ -236,14 +256,16 @@ task = (dls_task_t *)g_new0(dls_async_task_t, 1); } - if (!prv_set_task_target_info(task, path, error)) { + task->type = type; + + if (!prv_set_task_target_info(task, path, error) || + !prv_is_task_allowed(task, error)) { prv_delete(task); task = NULL; goto finished; } - task->type = type; task->invocation = invocation; task->result_format = result_format; @@ -657,6 +679,17 @@ return task; } + +dls_task_t *dls_task_wake_new(dleyna_connector_msg_id_t invocation, + const gchar *path, GError **error) +{ + dls_task_t *task; + + task = prv_m2spec_task_new(DLS_TASK_WAKE, invocation, path, + NULL, error, FALSE); + + return task; +} void dls_task_complete(dls_task_t *task) { diff -Nru dleyna-server-0.4.0/libdleyna/server/task.h dleyna-server-0.5.0/libdleyna/server/task.h --- dleyna-server-0.4.0/libdleyna/server/task.h 2013-10-03 12:48:23.000000000 +0000 +++ dleyna-server-0.5.0/libdleyna/server/task.h 2014-12-06 11:52:12.000000000 +0000 @@ -57,7 +57,8 @@ DLS_TASK_GET_ICON, DLS_TASK_MANAGER_GET_ALL_PROPS, DLS_TASK_MANAGER_GET_PROP, - DLS_TASK_MANAGER_SET_PROP + DLS_TASK_MANAGER_SET_PROP, + DLS_TASK_WAKE }; typedef enum dls_task_type_t_ dls_task_type_t; @@ -309,6 +310,10 @@ GVariant *parameters, GError **error); +dls_task_t *dls_task_wake_new(dleyna_connector_msg_id_t invocation, + const gchar *path, + GError **error); + void dls_task_cancel(dls_task_t *task); void dls_task_complete(dls_task_t *task); diff -Nru dleyna-server-0.4.0/libdleyna/server/upnp.c dleyna-server-0.5.0/libdleyna/server/upnp.c --- dleyna-server-0.4.0/libdleyna/server/upnp.c 2013-10-03 12:48:23.000000000 +0000 +++ dleyna-server-0.5.0/libdleyna/server/upnp.c 2014-12-06 11:52:12.000000000 +0000 @@ -38,6 +38,8 @@ #include "sort.h" #include "upnp.h" +#define DLS_DMS_DEVICE_TYPE "urn:schemas-upnp-org:device:MediaServer:" + struct dls_upnp_t_ { dleyna_connector_id_t connection; const dleyna_connector_dispatch_cb_t *interface_info; @@ -47,8 +49,9 @@ dls_upnp_callback_t lost_server; GUPnPContextManager *context_manager; void *user_data; - GHashTable *server_udn_map; - GHashTable *server_uc_map; + GHashTable *device_udn_map; + GHashTable *sleeping_device_udn_map; + GHashTable *device_uc_map; guint counter; }; @@ -84,13 +87,13 @@ goto on_clear; DLEYNA_LOG_DEBUG("Notify new server available: %s", device->path); - g_hash_table_insert(priv_t->upnp->server_udn_map, g_strdup(priv_t->udn), + g_hash_table_insert(priv_t->upnp->device_udn_map, g_strdup(priv_t->udn), device); priv_t->upnp->found_server(device->path, priv_t->upnp->user_data); on_clear: - g_hash_table_remove(priv_t->upnp->server_uc_map, priv_t->udn); + g_hash_table_remove(priv_t->upnp->device_uc_map, priv_t->udn); if (cancelled) dls_device_delete(device); @@ -106,7 +109,7 @@ DLEYNA_LOG_DEBUG("Enter"); - g_hash_table_remove(priv_t->upnp->server_uc_map, priv_t->udn); + g_hash_table_remove(priv_t->upnp->device_uc_map, priv_t->udn); prv_device_new_free(priv_t); DLEYNA_LOG_DEBUG("Exit"); @@ -146,10 +149,49 @@ priv_t->queue_id = queue_id; priv_t->device = device; - g_hash_table_insert(upnp->server_uc_map, g_strdup(udn), priv_t); + g_hash_table_insert(upnp->device_uc_map, g_strdup(udn), priv_t); +} + +static GUPnPDeviceInfo *prv_lookup_dms_child_device(GUPnPDeviceInfo *proxy) +{ + GList *child_devices; + GList *next; + const gchar *device_type; + GUPnPDeviceInfo *info = NULL; + GUPnPDeviceInfo *child_info = NULL; + + child_devices = gupnp_device_info_list_device_types(proxy); + + next = child_devices; + while (next != NULL) { + device_type = (gchar *)next->data; + + child_info = gupnp_device_info_get_device(proxy, device_type); + + if (g_str_has_prefix(device_type, DLS_DMS_DEVICE_TYPE)) { + break; + } else { + info = prv_lookup_dms_child_device(child_info); + + g_object_unref(child_info); + child_info = NULL; + + if (info != NULL) { + child_info = info; + + break; + } + } + + next = g_list_next(next); + } + + g_list_free_full(child_devices, (GDestroyNotify)g_free); + + return child_info; } -static void prv_server_available_cb(GUPnPControlPoint *cp, +static void prv_device_available_cb(GUPnPControlPoint *cp, GUPnPDeviceProxy *proxy, gpointer user_data) { @@ -161,11 +203,17 @@ const dleyna_task_queue_key_t *queue_id; unsigned int i; prv_device_new_ct_t *priv_t; + GUPnPDeviceInfo *device_proxy = (GUPnPDeviceInfo *)proxy; + GUPnPDeviceInfo *device_info = NULL; + const gchar *device_type; + gboolean subscribe = FALSE; + gpointer key; + gpointer val; - udn = gupnp_device_info_get_udn((GUPnPDeviceInfo *)proxy); + udn = gupnp_device_info_get_udn(device_proxy); - ip_address = gupnp_context_get_host_ip( - gupnp_control_point_get_context(cp)); + ip_address = gssdp_client_get_host_ip( + GSSDP_CLIENT(gupnp_control_point_get_context(cp))); if (!udn || !ip_address) goto on_error; @@ -173,10 +221,55 @@ DLEYNA_LOG_DEBUG("UDN %s", udn); DLEYNA_LOG_DEBUG("IP Address %s", ip_address); - device = g_hash_table_lookup(upnp->server_udn_map, udn); + device_type = gupnp_device_info_get_device_type(device_proxy); + + if (!g_str_has_prefix(device_type, DLS_DMS_DEVICE_TYPE)) { + device_info = prv_lookup_dms_child_device(device_proxy); + + if (device_info == NULL) + goto on_error; + } else { + device_info = device_proxy; + } + + device = g_hash_table_lookup(upnp->device_udn_map, udn); + + if (!device) { + device = g_hash_table_lookup(upnp->sleeping_device_udn_map, + udn); + + if (device != NULL) { + if (g_hash_table_lookup_extended( + upnp->sleeping_device_udn_map, + udn, + &key, + &val)) { + g_hash_table_steal( + upnp->sleeping_device_udn_map, + udn); + + g_free(key); + } + + g_hash_table_insert(upnp->device_udn_map, g_strdup(udn), + device); + + if (device->wake_on_timeout_id) { + DLEYNA_LOG_DEBUG("Stop WAKE-ON watcher..."); + + (void) g_source_remove( + device->wake_on_timeout_id); + device->wake_on_timeout_id = 0; + } + dls_device_delete_context(device->sleeping_context); + device->sleeping_context = NULL; + device->sleeping = FALSE; + subscribe = TRUE; + } + } if (!device) { - priv_t = g_hash_table_lookup(upnp->server_uc_map, udn); + priv_t = g_hash_table_lookup(upnp->device_uc_map, udn); if (priv_t) device = priv_t->device; @@ -188,7 +281,10 @@ queue_id = prv_create_device_queue(&priv_t); - device = dls_device_new(upnp->connection, proxy, ip_address, + device = dls_device_new(upnp->connection, + proxy, + device_info, + ip_address, upnp->interface_info, upnp->property_map, upnp->counter, queue_id); @@ -208,8 +304,12 @@ if (i == device->contexts->len) { DLEYNA_LOG_DEBUG("Adding Context"); - (void) dls_device_append_new_context(device, ip_address, - proxy); + (void) dls_device_append_new_context(device, + ip_address, + proxy, + device_info); + if (subscribe) + dls_device_subscribe_to_service_changes(device); } DLEYNA_LOG_DEBUG_NL(); @@ -220,17 +320,17 @@ return; } -static gboolean prv_subscribe_to_contents_change(gpointer user_data) +static gboolean prv_subscribe_to_service_changes(gpointer user_data) { dls_device_t *device = user_data; device->timeout_id = 0; - dls_device_subscribe_to_contents_change(device); + dls_device_subscribe_to_service_changes(device); return FALSE; } -static void prv_server_unavailable_cb(GUPnPControlPoint *cp, +static void prv_device_unavailable_cb(GUPnPControlPoint *cp, GUPnPDeviceProxy *proxy, gpointer user_data) { @@ -245,6 +345,9 @@ gboolean under_construction = FALSE; prv_device_new_ct_t *priv_t; const dleyna_task_queue_key_t *queue_id; + dls_device_context_t *lost_context; + gpointer key; + gpointer val; DLEYNA_LOG_DEBUG("Enter"); @@ -259,10 +362,10 @@ DLEYNA_LOG_DEBUG("UDN %s", udn); DLEYNA_LOG_DEBUG("IP Address %s", ip_address); - device = g_hash_table_lookup(upnp->server_udn_map, udn); + device = g_hash_table_lookup(upnp->device_udn_map, udn); if (!device) { - priv_t = g_hash_table_lookup(upnp->server_uc_map, udn); + priv_t = g_hash_table_lookup(upnp->device_uc_map, udn); if (priv_t) { device = priv_t->device; @@ -284,18 +387,56 @@ if (i >= device->contexts->len) goto on_error; - subscribed = context->subscribed; + subscribed = (context->cds.subscribed || context->ems.subscribed); if (under_construction) construction_ctx = !strcmp(context->ip_address, priv_t->ip_address); - (void) g_ptr_array_remove_index(device->contexts, i); + g_ptr_array_set_free_func(device->contexts, NULL); + + lost_context = g_ptr_array_remove_index(device->contexts, i); + + g_ptr_array_set_free_func(device->contexts, + (GDestroyNotify)dls_device_delete_context); if (device->contexts->len == 0) { if (!under_construction) { - DLEYNA_LOG_DEBUG("Last Context lost. Delete device"); - upnp->lost_server(device->path, upnp->user_data); - g_hash_table_remove(upnp->server_udn_map, udn); + DLEYNA_LOG_DEBUG("Last Context lost."); + + if (!device->sleeping) { + DLEYNA_LOG_DEBUG("Delete device."); + + upnp->lost_server(device->path, + upnp->user_data); + + g_hash_table_remove(upnp->device_udn_map, udn); + } else { + DLEYNA_LOG_DEBUG("Persist sleeping device."); + + dleyna_task_processor_remove_queues_for_sink( + dls_server_get_task_processor(), + device->path); + + g_hash_table_insert( + upnp->sleeping_device_udn_map, + g_strdup(udn), + device); + + if (g_hash_table_lookup_extended( + upnp->device_udn_map, + udn, + &key, + &val)) { + g_hash_table_steal(upnp->device_udn_map, + udn); + + g_free(key); + } + + device->sleeping_context = lost_context; + + lost_context = NULL; + } } else { DLEYNA_LOG_WARNING( "Device under construction. Cancelling"); @@ -307,7 +448,7 @@ "Device under construction. Switching context"); /* Cancel previous contruction task chain */ - g_hash_table_remove(priv_t->upnp->server_uc_map, priv_t->udn); + g_hash_table_remove(priv_t->upnp->device_uc_map, priv_t->udn); dleyna_task_queue_set_finally(priv_t->queue_id, prv_device_context_switch_end); dleyna_task_processor_cancel_queue(priv_t->queue_id); @@ -330,10 +471,13 @@ DLEYNA_LOG_DEBUG("Subscribe on new context"); device->timeout_id = g_timeout_add_seconds(1, - prv_subscribe_to_contents_change, + prv_subscribe_to_service_changes, device); } + if (lost_context != NULL) + dls_device_delete_context(lost_context); + on_error: DLEYNA_LOG_DEBUG("Exit"); @@ -351,13 +495,13 @@ cp = gupnp_control_point_new( context, - "urn:schemas-upnp-org:device:MediaServer:1"); + "upnp:rootdevice"); g_signal_connect(cp, "device-proxy-available", - G_CALLBACK(prv_server_available_cb), upnp); + G_CALLBACK(prv_device_available_cb), upnp); g_signal_connect(cp, "device-proxy-unavailable", - G_CALLBACK(prv_server_unavailable_cb), upnp); + G_CALLBACK(prv_device_unavailable_cb), upnp); gssdp_resource_browser_set_active(GSSDP_RESOURCE_BROWSER(cp), TRUE); gupnp_context_manager_manage_control_point(upnp->context_manager, cp); @@ -365,6 +509,7 @@ } dls_upnp_t *dls_upnp_new(dleyna_connector_id_t connection, + guint port, const dleyna_connector_dispatch_cb_t *dispatch_table, dls_upnp_callback_t found_server, dls_upnp_callback_t lost_server, @@ -378,16 +523,21 @@ upnp->found_server = found_server; upnp->lost_server = lost_server; - upnp->server_udn_map = g_hash_table_new_full(g_str_hash, g_str_equal, - g_free, - dls_device_delete); + upnp->device_udn_map = g_hash_table_new_full(g_str_hash, g_str_equal, + g_free, + dls_device_delete); + + upnp->sleeping_device_udn_map = g_hash_table_new_full(g_str_hash, + g_str_equal, + g_free, + dls_device_delete); - upnp->server_uc_map = g_hash_table_new_full(g_str_hash, g_str_equal, + upnp->device_uc_map = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, NULL); dls_prop_maps_new(&upnp->property_map, &upnp->filter_map); - upnp->context_manager = gupnp_context_manager_create(0); + upnp->context_manager = gupnp_context_manager_create(port); g_signal_connect(upnp->context_manager, "context-available", G_CALLBACK(prv_on_context_available), @@ -402,13 +552,14 @@ g_object_unref(upnp->context_manager); g_hash_table_unref(upnp->property_map); g_hash_table_unref(upnp->filter_map); - g_hash_table_unref(upnp->server_udn_map); - g_hash_table_unref(upnp->server_uc_map); + g_hash_table_unref(upnp->device_udn_map); + g_hash_table_unref(upnp->sleeping_device_udn_map); + g_hash_table_unref(upnp->device_uc_map); g_free(upnp); } } -GVariant *dls_upnp_get_server_ids(dls_upnp_t *upnp) +GVariant *dls_upnp_get_device_ids(dls_upnp_t *upnp) { GVariantBuilder vb; GHashTableIter iter; @@ -420,13 +571,20 @@ g_variant_builder_init(&vb, G_VARIANT_TYPE("ao")); - g_hash_table_iter_init(&iter, upnp->server_udn_map); + g_hash_table_iter_init(&iter, upnp->device_udn_map); while (g_hash_table_iter_next(&iter, NULL, &value)) { device = value; DLEYNA_LOG_DEBUG("Have device %s", device->path); g_variant_builder_add(&vb, "o", device->path); } + g_hash_table_iter_init(&iter, upnp->sleeping_device_udn_map); + while (g_hash_table_iter_next(&iter, NULL, &value)) { + device = value; + DLEYNA_LOG_DEBUG("Have sleeping device %s", device->path); + g_variant_builder_add(&vb, "o", device->path); + } + retval = g_variant_ref_sink(g_variant_builder_end(&vb)); DLEYNA_LOG_DEBUG("Exit"); @@ -434,9 +592,26 @@ return retval; } -GHashTable *dls_upnp_get_server_udn_map(dls_upnp_t *upnp) +GHashTable *dls_upnp_get_device_udn_map(dls_upnp_t *upnp) +{ + return upnp->device_udn_map; +} + +GHashTable *dls_upnp_get_sleeping_device_udn_map(dls_upnp_t *upnp) { - return upnp->server_udn_map; + return upnp->sleeping_device_udn_map; +} + +void dls_upnp_delete_sleeping_device(dls_upnp_t *upnp, dls_device_t *device) +{ + const char *udn; + dls_device_context_t *ctx = device->sleeping_context; + + udn = gupnp_device_info_get_udn((GUPnPDeviceInfo *)ctx->device_proxy); + + upnp->lost_server(device->path, upnp->user_data); + + g_hash_table_remove(upnp->sleeping_device_udn_map, udn); } void dls_upnp_get_children(dls_upnp_t *upnp, dls_client_t *client, @@ -1088,6 +1263,21 @@ DLEYNA_LOG_DEBUG("Exit"); } +void dls_upnp_wake(dls_upnp_t *upnp, dls_client_t *client, + dls_task_t *task, + dls_upnp_task_complete_t cb) +{ + dls_async_task_t *cb_data = (dls_async_task_t *)task; + + DLEYNA_LOG_DEBUG("Enter"); + + cb_data->cb = cb; + + dls_device_wake(client, task); + + DLEYNA_LOG_DEBUG("Exit"); +} + void dls_upnp_unsubscribe(dls_upnp_t *upnp) { GHashTableIter iter; @@ -1096,7 +1286,7 @@ DLEYNA_LOG_DEBUG("Enter"); - g_hash_table_iter_init(&iter, upnp->server_udn_map); + g_hash_table_iter_init(&iter, upnp->device_udn_map); while (g_hash_table_iter_next(&iter, NULL, &value)) { device = value; dls_device_unsubscribe(device); @@ -1131,11 +1321,11 @@ goto on_exit; /* Check if the device still exist */ - result = g_hash_table_find(upnp->server_udn_map, prv_device_find, + result = g_hash_table_find(upnp->device_udn_map, prv_device_find, device); if (result == NULL) - if (g_hash_table_find(upnp->server_uc_map, prv_device_uc_find, + if (g_hash_table_find(upnp->device_uc_map, prv_device_uc_find, device) == NULL) goto on_exit; diff -Nru dleyna-server-0.4.0/libdleyna/server/upnp.h dleyna-server-0.5.0/libdleyna/server/upnp.h --- dleyna-server-0.4.0/libdleyna/server/upnp.h 2013-10-03 12:48:23.000000000 +0000 +++ dleyna-server-0.5.0/libdleyna/server/upnp.h 2014-12-06 11:52:12.000000000 +0000 @@ -32,6 +32,7 @@ typedef void (*dls_upnp_task_complete_t)(dls_task_t *task, GError *error); dls_upnp_t *dls_upnp_new(dleyna_connector_id_t connection, + guint port, const dleyna_connector_dispatch_cb_t *dispatch_table, dls_upnp_callback_t found_server, dls_upnp_callback_t lost_server, @@ -39,9 +40,13 @@ void dls_upnp_delete(dls_upnp_t *upnp); -GVariant *dls_upnp_get_server_ids(dls_upnp_t *upnp); +GVariant *dls_upnp_get_device_ids(dls_upnp_t *upnp); -GHashTable *dls_upnp_get_server_udn_map(dls_upnp_t *upnp); +GHashTable *dls_upnp_get_device_udn_map(dls_upnp_t *upnp); + +GHashTable *dls_upnp_get_sleeping_device_udn_map(dls_upnp_t *upnp); + +void dls_upnp_delete_sleeping_device(dls_upnp_t *upnp, dls_device_t *device); void dls_upnp_get_children(dls_upnp_t *upnp, dls_client_t *client, dls_task_t *task, @@ -109,6 +114,10 @@ dls_task_t *task, dls_upnp_task_complete_t cb); +void dls_upnp_wake(dls_upnp_t *upnp, dls_client_t *client, + dls_task_t *task, + dls_upnp_task_complete_t cb); + void dls_upnp_unsubscribe(dls_upnp_t *upnp); gboolean dls_upnp_device_context_exist(dls_device_t *device, diff -Nru dleyna-server-0.4.0/libdleyna/server/xml-util.c dleyna-server-0.5.0/libdleyna/server/xml-util.c --- dleyna-server-0.4.0/libdleyna/server/xml-util.c 1970-01-01 00:00:00.000000000 +0000 +++ dleyna-server-0.5.0/libdleyna/server/xml-util.c 2014-12-06 11:52:12.000000000 +0000 @@ -0,0 +1,133 @@ +/* + * dLeyna + * + * Copyright (C) 2012-2013 Intel Corporation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU Lesser General Public License, + * version 2.1, as published by the Free Software Foundation. + * + * This program is distributed in the hope it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License + * for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. + * + * Christophe Guiraud + * + */ + +#include +#include + +#include "xml-util.h" + +static xmlNode *prv_get_child_node(xmlNode *node, va_list args) +{ + const gchar *name; + + name = va_arg(args, const gchar *); + while (name != NULL) { + node = node->children; + while (node != NULL) { + if (node->name != NULL && + !strcmp(name, (char *)node->name)) + break; + + node = node->next; + } + + if (node == NULL) + break; + + name = va_arg(args, const gchar *); + } + + return node; +} + +static GList *prv_get_children_list(xmlNode *node, const gchar *name) +{ + GList *child_list = NULL; + + node = node->children; + while (node != NULL) { + if (node->name != NULL && + !strcmp(name, (char *)node->name)) + child_list = g_list_prepend(child_list, node); + + node = node->next; + } + + return child_list; +} + +GList *xml_util_get_child_string_list_content_by_name(xmlNode *node, ...) +{ + xmlChar *content; + va_list args; + GList *child_list = NULL; + GList *next; + GList *str_list = NULL; + xmlNode *child_list_node; + xmlNode *child_node; + + va_start(args, node); + + child_node = prv_get_child_node(node, args); + + va_end(args); + + if (child_node != NULL) { + child_list = prv_get_children_list(child_node->parent, + (const gchar *)child_node->name); + next = child_list; + while (next) { + child_list_node = (xmlNode *)next->data; + + content = xmlNodeGetContent(child_list_node); + + if (content != NULL) { + str_list = g_list_prepend(str_list, + g_strdup((gchar *)content)); + + xmlFree(content); + } + + next = g_list_next(next); + } + + g_list_free(child_list); + } + + return str_list; +} + +gchar *xml_util_get_child_string_content_by_name(xmlNode *node, ...) +{ + xmlChar *content; + va_list args; + gchar *str = NULL; + xmlNode *child_node; + + va_start(args, node); + + child_node = prv_get_child_node(node, args); + + va_end(args); + + if (child_node != NULL) { + content = xmlNodeGetContent(child_node); + + if (content != NULL) { + str = g_strdup((gchar *)content); + + xmlFree(content); + } + } + + return str; +} diff -Nru dleyna-server-0.4.0/libdleyna/server/xml-util.h dleyna-server-0.5.0/libdleyna/server/xml-util.h --- dleyna-server-0.4.0/libdleyna/server/xml-util.h 1970-01-01 00:00:00.000000000 +0000 +++ dleyna-server-0.5.0/libdleyna/server/xml-util.h 2014-12-06 11:52:12.000000000 +0000 @@ -0,0 +1,35 @@ +/* + * dLeyna + * + * Copyright (C) 2012-2013 Intel Corporation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU Lesser General Public License, + * version 2.1, as published by the Free Software Foundation. + * + * This program is distributed in the hope it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License + * for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. + * + * Christophe Guiraud + * + */ + + +#ifndef DLS_XML_UTIL_H__ +#define DLS_XML_UTIL_H__ + +#include +#include +#include + +GList *xml_util_get_child_string_list_content_by_name(xmlNode *node, ...); + +gchar *xml_util_get_child_string_content_by_name(xmlNode *node, ...); + +#endif /* DLS_XML_UTIL_H__ */ diff -Nru dleyna-server-0.4.0/m4/compiler-flags.m4 dleyna-server-0.5.0/m4/compiler-flags.m4 --- dleyna-server-0.4.0/m4/compiler-flags.m4 2013-08-29 13:53:03.000000000 +0000 +++ dleyna-server-0.5.0/m4/compiler-flags.m4 2014-12-06 11:52:12.000000000 +0000 @@ -52,4 +52,5 @@ fi CFLAGS+=" -Wno-format-extra-args" + CFLAGS+=" -Wl,--no-undefined" ]) diff -Nru dleyna-server-0.4.0/m4/libtool.m4 dleyna-server-0.5.0/m4/libtool.m4 --- dleyna-server-0.4.0/m4/libtool.m4 2013-10-03 13:20:46.000000000 +0000 +++ dleyna-server-0.5.0/m4/libtool.m4 2014-12-06 11:49:36.000000000 +0000 @@ -1312,7 +1312,7 @@ rm -rf conftest* ;; -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext @@ -1333,7 +1333,10 @@ ;; esac ;; - ppc64-*linux*|powerpc64-*linux*) + powerpc64le-*) + LD="${LD-ld} -m elf32lppclinux" + ;; + powerpc64-*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) @@ -1352,7 +1355,10 @@ x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; - ppc*-*linux*|powerpc*-*linux*) + powerpcle-*) + LD="${LD-ld} -m elf64lppc" + ;; + powerpc-*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) diff -Nru dleyna-server-0.4.0/Makefile.in dleyna-server-0.5.0/Makefile.in --- dleyna-server-0.4.0/Makefile.in 2013-10-03 13:20:49.000000000 +0000 +++ dleyna-server-0.5.0/Makefile.in 2014-12-06 11:53:26.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -15,23 +14,51 @@ @SET_MAKE@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ esac; \ - test $$am__dry = yes; \ - } + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -52,12 +79,18 @@ host_triplet = @host@ @BUILD_SERVER_TRUE@am__append_1 = server test/dbus subdir = . -DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(srcdir)/config.h.in \ - $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ - build-aux/compile build-aux/config.guess build-aux/config.sub \ - build-aux/depcomp build-aux/install-sh build-aux/ltmain.sh \ - build-aux/missing +DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \ + $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/configure $(am__configure_deps) \ + $(srcdir)/config.h.in COPYING build-aux/compile \ + build-aux/config.guess build-aux/config.sub build-aux/depcomp \ + build-aux/install-sh build-aux/missing build-aux/ltmain.sh \ + $(top_srcdir)/build-aux/compile \ + $(top_srcdir)/build-aux/config.guess \ + $(top_srcdir)/build-aux/config.sub \ + $(top_srcdir)/build-aux/install-sh \ + $(top_srcdir)/build-aux/ltmain.sh \ + $(top_srcdir)/build-aux/missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/compiler-flags.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/log.m4 \ @@ -72,21 +105,28 @@ CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -94,11 +134,33 @@ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ - distdir dist dist-all distcheck +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + cscope distdir dist dist-all distcheck +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ + $(LISP)config.h.in +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +CSCOPE = cscope DIST_SUBDIRS = libdleyna/server server test/dbus DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) @@ -109,6 +171,7 @@ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi +am__post_remove_distdir = $(am__remove_distdir) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ @@ -136,6 +199,7 @@ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best +DIST_TARGETS = dist-gzip distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' @@ -194,6 +258,8 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ +LIBXML_CFLAGS = @LIBXML_CFLAGS@ +LIBXML_LIBS = @LIBXML_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ @@ -334,8 +400,8 @@ $(am__aclocal_m4_deps): config.h: stamp-h1 - @if test ! -f $@; then rm -f stamp-h1; else :; fi - @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi + @test -f $@ || rm -f stamp-h1 + @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 @@ -358,22 +424,25 @@ -rm -f libtool config.lt # This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ @@ -388,57 +457,12 @@ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -$(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags -TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ @@ -454,12 +478,7 @@ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ - list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -471,15 +490,11 @@ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -488,9 +503,31 @@ here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscope: cscope.files + test ! -s cscope.files \ + || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) +clean-cscope: + -rm -f cscope.files +cscope.files: clean-cscope cscopelist +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(DISTFILES) $(am__remove_distdir) @@ -558,40 +595,42 @@ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) + $(am__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 - $(am__remove_distdir) + $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz - $(am__remove_distdir) - -dist-lzma: distdir - tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma - $(am__remove_distdir) + $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz - $(am__remove_distdir) + $(am__post_remove_distdir) dist-tarZ: distdir + @echo WARNING: "Support for shar distribution archives is" \ + "deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z - $(am__remove_distdir) + $(am__post_remove_distdir) dist-shar: distdir + @echo WARNING: "Support for distribution archives compressed with" \ + "legacy program 'compress' is deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz - $(am__remove_distdir) + $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) - $(am__remove_distdir) + $(am__post_remove_distdir) -dist dist-all: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) +dist dist-all: + $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' + $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another @@ -602,8 +641,6 @@ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ - *.tar.lzma*) \ - lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ @@ -615,18 +652,19 @@ *.zip*) \ unzip $(distdir).zip ;;\ esac - chmod -R a-w $(distdir); chmod u+w $(distdir) - mkdir $(distdir)/_build - mkdir $(distdir)/_inst + chmod -R a-w $(distdir) + chmod u+w $(distdir) + mkdir $(distdir)/_build $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ - && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + && ../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ + --srcdir=.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ @@ -649,7 +687,7 @@ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 - $(am__remove_distdir) + $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' @@ -786,25 +824,24 @@ uninstall-am: -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ - ctags-recursive install-am install-strip tags-recursive +.MAKE: $(am__recursive_targets) all install-am install-strip -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am am--refresh check check-am clean clean-generic \ - clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ - dist-gzip dist-lzip dist-lzma dist-shar dist-tarZ dist-xz \ - dist-zip distcheck distclean distclean-generic distclean-hdr \ - distclean-libtool distclean-tags distcleancheck distdir \ - distuninstallcheck dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - installdirs-am maintainer-clean maintainer-clean-generic \ - maintainer-clean-local mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ + am--refresh check check-am clean clean-cscope clean-generic \ + clean-libtool cscope cscopelist-am ctags ctags-am dist \ + dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \ + dist-xz dist-zip distcheck distclean distclean-generic \ + distclean-hdr distclean-libtool distclean-tags distcleancheck \ + distdir distuninstallcheck dvi dvi-am html html-am info \ + info-am install install-am install-data install-data-am \ + install-dvi install-dvi-am install-exec install-exec-am \ + install-html install-html-am install-info install-info-am \ + install-man install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic maintainer-clean-local mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am maintainer-clean-local: diff -Nru dleyna-server-0.4.0/server/dleyna-server-service-1.0.pc.in dleyna-server-0.5.0/server/dleyna-server-service-1.0.pc.in --- dleyna-server-0.4.0/server/dleyna-server-service-1.0.pc.in 2013-08-29 13:53:03.000000000 +0000 +++ dleyna-server-0.5.0/server/dleyna-server-service-1.0.pc.in 2014-12-06 11:52:12.000000000 +0000 @@ -4,5 +4,5 @@ Name: @PACKAGE@-service Description: UPnP & DLNA media content management -Requires.private: glib-2.0 gio-2.0 dleyna-core-1.0 dleyna-server-1.0 -Version: @VERSION@ \ No newline at end of file +Requires.private: glib-2.0 gio-2.0 dleyna-core-1.0 +Version: @VERSION@ diff -Nru dleyna-server-0.4.0/server/Makefile.am dleyna-server-0.5.0/server/Makefile.am --- dleyna-server-0.4.0/server/Makefile.am 2013-08-29 13:53:03.000000000 +0000 +++ dleyna-server-0.5.0/server/Makefile.am 2014-12-06 11:52:12.000000000 +0000 @@ -1,11 +1,9 @@ AM_CFLAGS = $(GLIB_CFLAGS) \ $(GIO_CFLAGS) \ $(DLEYNA_CORE_CFLAGS) \ - -I$(top_builddir)/libdleyna/server \ + -I$(top_srcdir) \ -include config.h -ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} - libexec_PROGRAMS = dleyna-server-service dleyna_server_service_SOURCES = daemon.c @@ -14,7 +12,7 @@ $(GIO_LIBS) \ $(DLEYNA_CORE_LIBS) \ $(top_builddir)/libdleyna/server/libdleyna-server-1.0.la - + dbusservicedir = $(DBUS_SERVICE_DIR) dbusservice_in_files = com.intel.dleyna-server.service.in dbusservice_DATA = com.intel.dleyna-server.service diff -Nru dleyna-server-0.4.0/server/Makefile.in dleyna-server-0.5.0/server/Makefile.in --- dleyna-server-0.4.0/server/Makefile.in 2013-10-03 13:20:49.000000000 +0000 +++ dleyna-server-0.5.0/server/Makefile.in 2014-12-06 11:53:26.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 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. @@ -17,23 +16,51 @@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -54,8 +81,9 @@ host_triplet = @host@ libexec_PROGRAMS = dleyna-server-service$(EXEEXT) subdir = server -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(srcdir)/dleyna-server-service-1.0.pc.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(srcdir)/dleyna-server-service-1.0.pc.in \ + $(top_srcdir)/build-aux/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/compiler-flags.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/log.m4 \ @@ -80,6 +108,19 @@ AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent +am__v_lt_1 = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles @@ -92,20 +133,16 @@ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) -am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) -am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(dleyna_server_service_SOURCES) DIST_SOURCES = $(dleyna_server_service_SOURCES) am__can_run_installinfo = \ @@ -141,6 +178,23 @@ $(am__cd) "$$dir" && rm -f $$files; }; \ } DATA = $(dbusservice_DATA) $(pkgconfig_DATA) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -198,6 +252,8 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ +LIBXML_CFLAGS = @LIBXML_CFLAGS@ +LIBXML_LIBS = @LIBXML_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ @@ -289,10 +345,9 @@ AM_CFLAGS = $(GLIB_CFLAGS) \ $(GIO_CFLAGS) \ $(DLEYNA_CORE_CFLAGS) \ - -I$(top_builddir)/libdleyna/server \ + -I$(top_srcdir) \ -include config.h -ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} dleyna_server_service_SOURCES = daemon.c dleyna_server_service_LDADD = $(GLIB_LIBS) \ $(GIO_LIBS) \ @@ -352,10 +407,12 @@ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ @@ -376,7 +433,8 @@ @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ + -e 's/$$/$(EXEEXT)/' \ + `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(libexecdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(libexecdir)" && rm -f $$files @@ -389,6 +447,7 @@ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list + dleyna-server-service$(EXEEXT): $(dleyna_server_service_OBJECTS) $(dleyna_server_service_DEPENDENCIES) $(EXTRA_dleyna_server_service_DEPENDENCIES) @rm -f dleyna-server-service$(EXEEXT) $(AM_V_CCLD)$(LINK) $(dleyna_server_service_OBJECTS) $(dleyna_server_service_LDADD) $(LIBS) @@ -473,26 +532,15 @@ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -504,15 +552,11 @@ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -521,6 +565,21 @@ here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -668,20 +727,20 @@ .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libexecPROGRAMS clean-libtool ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am \ - install-dbusserviceDATA install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-libexecPROGRAMS \ - install-man install-pdf install-pdf-am install-pkgconfigDATA \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libexecPROGRAMS clean-libtool cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dbusserviceDATA install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am \ + install-libexecPROGRAMS install-man install-pdf install-pdf-am \ + install-pkgconfigDATA install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-dbusserviceDATA \ + tags tags-am uninstall uninstall-am uninstall-dbusserviceDATA \ uninstall-libexecPROGRAMS uninstall-pkgconfigDATA diff -Nru dleyna-server-0.4.0/test/dbus/Makefile.am dleyna-server-0.5.0/test/dbus/Makefile.am --- dleyna-server-0.4.0/test/dbus/Makefile.am 2013-08-29 13:53:03.000000000 +0000 +++ dleyna-server-0.5.0/test/dbus/Makefile.am 2014-12-06 11:52:12.000000000 +0000 @@ -1,7 +1,5 @@ AM_CFLAGS = $(GLIB_CFLAGS) \ $(GIO_CFLAGS) - -ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} dms_info_sources = dms-info.c diff -Nru dleyna-server-0.4.0/test/dbus/Makefile.in dleyna-server-0.5.0/test/dbus/Makefile.in --- dleyna-server-0.4.0/test/dbus/Makefile.in 2013-10-03 13:20:49.000000000 +0000 +++ dleyna-server-0.5.0/test/dbus/Makefile.in 2014-12-06 11:53:26.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,23 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ esac; \ - test $$am__dry = yes; \ - } + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -53,7 +80,8 @@ host_triplet = @host@ noinst_PROGRAMS = dms-info$(EXEEXT) subdir = test/dbus -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/build-aux/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/compiler-flags.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/log.m4 \ @@ -75,9 +103,22 @@ AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent +am__v_lt_1 = dms_info_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(dms_info_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles @@ -90,20 +131,16 @@ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) -am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) -am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(dms_info_SOURCES) DIST_SOURCES = $(dms_info_SOURCES) am__can_run_installinfo = \ @@ -111,6 +148,23 @@ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -168,6 +222,8 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ +LIBXML_CFLAGS = @LIBXML_CFLAGS@ +LIBXML_LIBS = @LIBXML_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ @@ -259,7 +315,6 @@ AM_CFLAGS = $(GLIB_CFLAGS) \ $(GIO_CFLAGS) -ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} dms_info_sources = dms-info.c dms_info_SOURCES = $(dms_info_sources) dms_info_CFLAGS = $(GLIB_CFLAGS) \ @@ -311,6 +366,7 @@ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list + dms-info$(EXEEXT): $(dms_info_OBJECTS) $(dms_info_DEPENDENCIES) $(EXTRA_dms_info_DEPENDENCIES) @rm -f dms-info$(EXEEXT) $(AM_V_CCLD)$(dms_info_LINK) $(dms_info_OBJECTS) $(dms_info_LDADD) $(LIBS) @@ -367,26 +423,15 @@ clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -398,15 +443,11 @@ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -415,6 +456,21 @@ here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -556,18 +612,19 @@ .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstPROGRAMS ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstPROGRAMS cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables.